doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
2e9cc72a-2699-4dcf-926b-6e5d191e080c
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Web.Http; using System.Web.Http.Cors; namespace CORS.Controllers { public class ValuesController : ApiController { // GET api/values public IEnumerable<string> Get() { return new string[] { "This is a CORS requ...
```c# using System.Collections.Generic; using System.Web.Http; using System.Web.Http.Cors; namespace CORS.Controllers { public class ValuesController : ApiController { // GET api/values public IEnumerable<string> Get() { return new string[] { "T...
a68afac7-6e21-4b40-8414-6f92dfc24079
{ "language": "C#" }
```c# using Microsoft.AspNet.Builder; using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Http; using Microsoft.AspNet.StaticFiles; using Microsoft.Extensions.Logging; using System.Threading.Tasks; namespace WebPackAngular2TypeScript.Routing { public class DeepLinkingMiddleware { public DeepLinking...
```c# using Microsoft.AspNet.Builder; using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Http; using Microsoft.AspNet.StaticFiles; using Microsoft.Extensions.Logging; using System.Threading.Tasks; namespace WebPackAngular2TypeScript.Routing { public class DeepLinkingMiddleware { public DeepLinking...
404b3d4e-2ef3-4531-9c8f-d9c21c9864b4
{ "language": "C#" }
```c# @using Dashboard @using Microsoft.WindowsAzure.Jobs @{ ViewBag.Title = "Configuration Error"; } <h2>Bad Config</h2> <p> The configuration is not properly set for the Windows Azure Web Jobs SDK Dashboard. In your configuration (such as web.config), you must set a connection string named <i>@JobHost.LoggingCo...
```c# @using Dashboard @using Microsoft.WindowsAzure.Jobs @{ ViewBag.Title = "Configuration Error"; } <h2>Bad Config</h2> <p> The configuration is not properly set for the Windows Azure Web Jobs SDK Dashboard. In your configuration (such as web.config), you must set a connection string named <i>@JobHost.LoggingCo...
36a41c07-6850-4780-80e1-a8c5933a5cf4
{ "language": "C#" }
```c# using System; using System.Text; using System.Collections.Generic; using System.Linq; namespace RepoZ.UI.Mac.Story { public class StringCommandHandler { private Dictionary<string, Action> _commands = new Dictionary<string, Action>(); private StringBuilder _helpBuilder = new StringBuilder...
```c# using System; using System.Text; using System.Collections.Generic; using System.Linq; namespace RepoZ.UI.Mac.Story { public class StringCommandHandler { private Dictionary<string, Action> _commands = new Dictionary<string, Action>(); private StringBuilder _helpBuilder = new StringBuilder...
e25eb65f-7909-4b1c-b469-392aebf826d3
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using ActionMailer.Net.Mvc; using RationalVote.Models; using System.Configuration; namespace RationalVote.Controllers { public class MailController : MailerBase { public static string GetFromEmail( string purpose ) { r...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using ActionMailer.Net.Mvc; using RationalVote.Models; using System.Configuration; namespace RationalVote.Controllers { public class MailController : MailerBase { public static string GetFromEmail( string purpose ) { r...
76e1f703-077f-45a9-bcd2-3149c1a029b4
{ "language": "C#" }
```c# namespace InfoCarrier.Core.EFCore.FunctionalTests { using Microsoft.EntityFrameworkCore.Specification.Tests; using Xunit; public class BuiltInDataTypesInfoCarrierTest : BuiltInDataTypesTestBase<BuiltInDataTypesInfoCarrierFixture> { public BuiltInDataTypesInfoCarrierTest(BuiltInDataTypesI...
```c# namespace InfoCarrier.Core.EFCore.FunctionalTests { using System.Linq; using Microsoft.EntityFrameworkCore.Specification.Tests; using Xunit; public class BuiltInDataTypesInfoCarrierTest : BuiltInDataTypesTestBase<BuiltInDataTypesInfoCarrierFixture> { public BuiltInDataTypesInfoCarrie...
6cdddb91-5177-4ac2-a19b-f47e957300af
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace WebAPIApplication.Controllers { [Route("api/[controller]")] public class ValuesController : Controller { [HttpGet] [Route("ping")] public string Ping() { return "All good. Y...
```c# using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace WebAPIApplication.Controllers { [Route("api/[controller]")] public class ValuesController : Controller { [HttpGet] [Route("ping")] public dynamic Ping() { return new { ...
5486b210-6240-4b8e-8f48-262d576f538f
{ "language": "C#" }
```c# // Copyright (c) Alexandre Mutel. All rights reserved. // Licensed under the BSD-Clause 2 license. // See license.txt file in the project root for full license information. using Scriban.Runtime; namespace Scriban.Syntax { [ScriptSyntax("capture statement", "capture <variable> ... end")] public class S...
```c# // Copyright (c) Alexandre Mutel. All rights reserved. // Licensed under the BSD-Clause 2 license. // See license.txt file in the project root for full license information. using Scriban.Runtime; namespace Scriban.Syntax { [ScriptSyntax("capture statement", "capture <variable> ... end")] public class S...
8cb16e21-f898-41b7-8fca-5d6742f8e0f2
{ "language": "C#" }
```c# using System.Reflection; [assembly: AssemblyTitle("Autofac.Tests.Configuration")] [assembly: AssemblyDescription("")] ``` Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the a...
```c# using System.Reflection; [assembly: AssemblyTitle("Autofac.Tests.Configuration")] ```
aeb6bd79-63ac-4998-abaa-6dcb032a1b37
{ "language": "C#" }
```c# using System.Reflection; [assembly: AssemblyTitle("Autofac.Tests.Integration.Mvc")] [assembly: AssemblyDescription("")] ``` Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the...
```c# using System.Reflection; [assembly: AssemblyTitle("Autofac.Tests.Integration.Mvc")] ```
261f8358-1c18-4854-98b1-f6511c6edf5f
{ "language": "C#" }
```c# using System.Configuration; using Microsoft.Owin; using Microsoft.Owin.Security.ActiveDirectory; using Owin; using SFA.DAS.EmployerFinance.Api; [assembly: OwinStartup(typeof(Startup))] namespace SFA.DAS.EmployerFinance.Api { public class Startup { public void Configuration(IAppBuilder app) ...
```c# using System.Configuration; using Microsoft.Owin; using Microsoft.Owin.Security.ActiveDirectory; using Owin; using SFA.DAS.EmployerFinance.Api; [assembly: OwinStartup(typeof(Startup))] namespace SFA.DAS.EmployerFinance.Api { public class Startup { public void Configuration(IAppBuilder app) ...
5a54b242-41c1-4ed0-b531-64c4ca6fa52a
{ "language": "C#" }
```c# using System.Collections.Generic; namespace CroquetAustraliaWebsite.Application.App.Infrastructure { public static class PublicNavigationBar { public static IEnumerable<NavigationItem> GetNavigationItems() { return new[] { new NavigationItem("Conta...
```c# using System.Collections.Generic; namespace CroquetAustraliaWebsite.Application.App.Infrastructure { public static class PublicNavigationBar { public static IEnumerable<NavigationItem> GetNavigationItems() { return new[] { new NavigationItem("Conta...
02a80a3a-e3aa-43c3-8c83-c1f14f0bb0e3
{ "language": "C#" }
```c# using System; using System.Linq; namespace Abc.NCrafts.Quizz.Performance.Questions._028 { [CorrectAnswer(Difficulty = Difficulty.Medium)] public class Answer1 { public static void Run() { // begin var primes = Enumerable.Range(0, 10 * 1000) ...
```c# using System; using System.Linq; namespace Abc.NCrafts.Quizz.Performance.Questions._028 { [CorrectAnswer(Difficulty = Difficulty.Medium)] public class Answer1 { public static void Run() { // begin var primes = Enumerable.Range(0, 10 * 1000) ...
960fedf2-cfd3-4d70-aad6-e089c9fa0ba1
{ "language": "C#" }
```c# using System; using System.Diagnostics; using Microsoft.Extensions.Configuration; using Xunit; using SocksSharp; using SocksSharp.Proxy; namespace SocksSharp.Tests { public class ProxyClientTests { private ProxySettings proxySettings; private void GatherTestConfiguration() { ...
```c# using System; using System.Diagnostics; using Microsoft.Extensions.Configuration; using Xunit; using SocksSharp; using SocksSharp.Proxy; namespace SocksSharp.Tests { public class ProxyClientTests { private Uri baseUri = new Uri("http://httpbin.org/"); private ProxySettings proxySettings;...
89fd6670-9c61-4842-8e40-09183476cf56
{ "language": "C#" }
```c# using System; using System.ComponentModel.Composition; namespace Cogito.Composition { /// <summary> /// Attaches an Order metadata property to the export. /// </summary> [MetadataAttribute] public class ExportOrderAttribute : Attribute { readonly int order; ///...
```c# using System; using System.ComponentModel.Composition; namespace Cogito.Composition { /// <summary> /// Attaches an Order metadata property to the export. /// </summary> [MetadataAttribute] public class ExportOrderAttribute : Attribute, IOrderedExportMetadata { ...
21558581-de25-4b03-a979-96f61fb70ff9
{ "language": "C#" }
```c# namespace DarkSky.UnitTests.Extensions { using System; using NodaTime; using Xunit; using static DarkSky.Extensions.LongExtensions; public class LongExtensionsUnitTests { public static System.Collections.Generic.IEnumerable<object[]> GetDateTimeOffsets() { yield return new object[] { DateTimeOffset...
```c# namespace DarkSky.UnitTests.Extensions { using System; using NodaTime; using Xunit; using static DarkSky.Extensions.LongExtensions; public class LongExtensionsUnitTests { public static System.Collections.Generic.IEnumerable<object[]> GetDateTimeOffsets() { yield return new object[] { DateTimeOffset...
170d8509-7084-4c28-8860-0cfc80c53d09
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Screens.Edit.Setup { public class SetupScreen : EditorScreen { public SetupScreen() { Child = new ScreenWhit...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Game.Beatmaps...
aa40b398-7508-4f76-a3a8-5a64955e8408
{ "language": "C#" }
```c# // Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using AutomaticTypeMapper; using EOLib.IO.Pub; namespace EOLib.IO.Repositories { [MappedType(BaseType = typeof(IPubFileRepository), IsSingleton = true)] [M...
```c# // Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using AutomaticTypeMapper; using EOLib.IO.Pub; namespace EOLib.IO.Repositories { [MappedType(BaseType = typeof(IPubFileRepository), IsSingleton = true)] [M...
1e0bbad6-a842-4bcb-bcea-06824ef02556
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Linq; using Wox.Plugin.BrowserBookmark.Commands; using Wox.Plugin.SharedCommands; namespace Wox.Plugin.BrowserBookmark { public class Main : IPlugin { private PluginInitContext context; private List<Bookmark> cachedBookmarks = new L...
```c# using System.Collections.Generic; using System.Linq; using Wox.Plugin.BrowserBookmark.Commands; using Wox.Plugin.SharedCommands; namespace Wox.Plugin.BrowserBookmark { public class Main : IPlugin, IReloadable { private PluginInitContext context; private List<Bookmark> cachedBook...
f51f9003-66fe-4dec-bb4d-6efc7db023ab
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Skylight")] [assembly: AssemblyDescription("An API by TakoMan02 for Everybody Edits")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("TakoMan02")] [assembly: Assembl...
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Skylight")] [assembly: AssemblyDescription("An API by TakoMan02 for Everybody Edits")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("TakoMan02")] [assembly: Assembl...
fa1098df-3cc4-4d68-a0bd-376008bdacd4
{ "language": "C#" }
```c# using System; namespace SQLite.Net { public class BlobSerializerDelegate : IBlobSerializer { public delegate byte[] SerializeDelegate(object obj); public delegate bool CanSerializeDelegate(Type type); public delegate object DeserializeDelegate(byte[] data, Type type); pr...
```c# using System; namespace SQLite.Net { public class BlobSerializerDelegate : IBlobSerializer { public delegate byte[] SerializeDelegate(object obj); public delegate bool CanSerializeDelegate(Type type); public delegate object DeserializeDelegate(byte[] data, Type type); ...
bbeb0987-5bb1-45eb-bfb0-98f513f3f9e5
{ "language": "C#" }
```c# using Cake.Core.IO; using Ensconce.Update; using System.IO; namespace Ensconce.Cake { public static class EnsconceFileUpdateExtensions { public static void TextSubstitute(this IFile file, FilePath fixedStructureFile) { var tagDictionary = fixedStructureFile == null ? TagDicti...
```c# using Cake.Core.IO; using Ensconce.Update; using System.IO; namespace Ensconce.Cake { public static class EnsconceFileUpdateExtensions { public static void TextSubstitute(this IFile file, FilePath fixedStructureFile) { file.Path.TextSubstitute(fixedStructureFile); } ...
67fe712b-23e7-4909-ab10-f17d11ef5f52
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using BForms.Models; using BForms.Mvc; namespace BForms.Docs { public class MvcApplication : System.Web.HttpApplication { protected...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using BForms.Models; using BForms.Mvc; namespace BForms.Docs { public class MvcApplication : System.Web.HttpApplication { protected...
10075adb-ab76-4fc9-99bc-b016af4cbf57
{ "language": "C#" }
```c# namespace ServiceStack.Common.Web { public static class HttpHeaders { public const string XParamOverridePrefix = "X-Param-Override-"; public const string XHttpMethodOverride = "X-Http-Method-Override"; public const string XUserAuthId = "X-UAId"; public const st...
```c# namespace ServiceStack.Common.Web { public static class HttpHeaders { public const string XParamOverridePrefix = "X-Param-Override-"; public const string XHttpMethodOverride = "X-Http-Method-Override"; public const string XUserAuthId = "X-UAId"; public const string XForw...
7e72e857-efae-4d48-b7bb-984b8fec054e
{ "language": "C#" }
```c# using Nito.AsyncEx; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; namespace Microsoft.Extensions.Caching.Memory { public static class MemoryExtensions { private static Dictionary<object, AsyncLock> AsyncLocks { get; } = new Dictionary<object, AsyncLock>(); ...
```c# using Nito.AsyncEx; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Microsoft.Extensions.Caching.Memory { public static class MemoryExtensions { private static Dictionary<object, AsyncLock> AsyncLocks { get; } = new Dictionary<obje...
cb637973-9517-4f76-a678-77f5308b50fd
{ "language": "C#" }
```c# using System.Reflection; [assembly: AssemblyTitle("Autofac.Tests.Integration.Web")] [assembly: AssemblyDescription("")] ``` Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the...
```c# using System.Reflection; [assembly: AssemblyTitle("Autofac.Tests.Integration.Web")] ```
3c5fa242-4f91-4fa4-83ae-e1af53d4e36d
{ "language": "C#" }
```c# using System; namespace XeroApi.Model { public class Journal : EndpointModelBase { [ItemId] public Guid JournalID { get; set; } public DateTime JournalDate { get; set; } public long JournalNumber { get; set; } [ItemUpdatedDate] public Da...
```c# using System; namespace XeroApi.Model { public class Journal : EndpointModelBase { [ItemId] public Guid JournalID { get; set; } public DateTime JournalDate { get; set; } public long JournalNumber { get; set; } [ItemUpdatedDate] public Da...
cbefdf17-0669-42d2-b814-06ced404e200
{ "language": "C#" }
```c# using System; using System.Configuration; using System.Data.SqlClient; using MySql.Data.MySqlClient; namespace TrackableData.MySql.Tests { public class Database : IDisposable { public Database() { var cstr = ConfigurationManager.ConnectionStrings["TestDb"].ConnectionString; ...
```c# using System; using System.Configuration; using System.Data.SqlClient; using MySql.Data.MySqlClient; namespace TrackableData.MySql.Tests { public class Database : IDisposable { public Database() { var cstr = ConfigurationManager.ConnectionStrings["TestDb"].ConnectionString; ...
d90356c2-73aa-4e8b-bbf2-48cd376eefb2
{ "language": "C#" }
```c# namespace Certify.Models.Config { public class ActionResult { public ActionResult() { } public ActionResult(string msg, bool isSuccess) { Message = msg; IsSuccess = isSuccess; } public bool IsSuccess { get; set; } public string Mess...
```c# namespace Certify.Models.Config { public class ActionResult { public ActionResult() { } public ActionResult(string msg, bool isSuccess) { Message = msg; IsSuccess = isSuccess; } public bool IsSuccess { get; set; } public bool IsWarn...
82c62248-2947-47d0-8933-99fe5692fbe1
{ "language": "C#" }
```c# using System.Threading.Tasks; using Cake.Core; using Cake.Core.Diagnostics; using Cake.Frosting; public static class Program { public static int Main(string[] args) { return new CakeHost() .UseContext<BuildContext>() .UseWorkingDirectory("..") .Run(args); }...
```c# using System.Threading.Tasks; using Cake.Core; using Cake.Core.Diagnostics; using Cake.Frosting; public static class Program { public static int Main(string[] args) { return new CakeHost() .UseContext<BuildContext>() .Run(args); } } public class BuildContext : Frostin...
3fe522e8-fde3-4da7-b431-ac2791bde7d4
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public enum Upgrade { NONE, ROBOT, NIGHTVISION, UNICORN, ZOMBIE, REDHAT, BEEARD } ``` Add other upgrades to enum
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public enum Upgrade { NONE, ROBOT, NIGHTVISION, UNICORN, ZOMBIE, REDHAT, BEEARD, BEEBALL, SCHOOLBUZZ, BUZZFEED, BEACH, GUM, VISOR } ```
c2efd0a9-8944-436a-baf0-4b3ed7cbe9e2
{ "language": "C#" }
```c# using System; using System.ComponentModel.DataAnnotations; using System.Reflection; using Newtonsoft.Json.Serialization; namespace Swashbuckle.Swagger { public static class JsonPropertyExtensions { public static bool IsRequired(this JsonProperty jsonProperty) { return jsonPro...
```c# using System; using System.ComponentModel.DataAnnotations; using System.Reflection; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; namespace Swashbuckle.Swagger { public static class JsonPropertyExtensions { public static bool IsRequired(this JsonProperty jsonProperty) { ...
4cb0c73c-3119-47e5-8a52-9e4636707a84
{ "language": "C#" }
```c# using Microsoft.Extensions.Configuration; using Xunit; namespace RedditSharpTests { public class AuthenticatedTestsFixture { public IConfigurationRoot Config { get; private set; } public string AccessToken { get; private set; } public RedditSharp.BotWebAgent WebAgent { get; set; ...
```c# using Microsoft.Extensions.Configuration; using Xunit; namespace RedditSharpTests { public class AuthenticatedTestsFixture { public IConfigurationRoot Config { get; private set; } public string AccessToken { get; private set; } public RedditSharp.BotWebAgent WebAgent { get; set; ...
f6684360-3dbb-4ff5-adf2-6db116e0ebf0
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using LiteNetLib.Utils; namespace LiteNetLibManager { public struct ServerTimeMessage : INetSerializable { public int serverUnixTime; public float serverTime; public void Deserialize(NetDataReader reader) { ...
```c# using System.Collections; using System.Collections.Generic; using LiteNetLib.Utils; namespace LiteNetLibManager { public struct ServerTimeMessage : INetSerializable { public int serverUnixTime; public void Deserialize(NetDataReader reader) { serverUnixTime = reader.G...
e7e97398-c150-443d-bd45-9dc711c2dd2e
{ "language": "C#" }
```c# // Needed for Workaround using System; using System.Threading; using Theraot.Collections.ThreadSafe; namespace Theraot.Threading { public static partial class GCMonitor { private static class Internal { private static readonly WeakDelegateCollection _collectedEventHandlers; ...
```c# // Needed for Workaround using System; using System.Threading; using Theraot.Collections.ThreadSafe; namespace Theraot.Threading { public static partial class GCMonitor { private static class Internal { private static readonly WeakDelegateCollection _collectedEventHandlers; ...
4da45b65-8fe3-4a9b-aa6c-a1acee9ae875
{ "language": "C#" }
```c# using UnityEngine; using System.Collections; /** * Dealing with raw touch input from a Cardboard device */ public class ParsedTouchData { private bool wasTouched = false; public ParsedTouchData() {} public void Update() { wasTouched |= this.IsDown(); } public bool IsDown() { return Input.to...
```c# using UnityEngine; using System.Collections; /** * Dealing with raw touch input from a Cardboard device */ public class ParsedTouchData { private bool wasTouched = false; public ParsedTouchData() { Cardboard cardboard = CardboardGameObject().GetComponent<Cardboard>(); cardboard.TapIsTrigger = false...
2ca73c5d-28fa-4e48-8e81-5a4fc535f77c
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; namespace BTCPayServer.Security; public class AuthorizationFilterHandle { public AuthorizationHandlerContext Context { get; } public PolicyRequirement Requirement { get; } public HttpContext HttpContext { get; } public bo...
```c# using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; namespace BTCPayServer.Security; public class AuthorizationFilterHandle { public AuthorizationHandlerContext Context { get; } public PolicyRequirement Requirement { get; } public HttpContext HttpContext { get; } public bo...
1b4a124d-5774-41b9-990f-d4e736818fc3
{ "language": "C#" }
```c# /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2008-2009 Jason Booth Copyright (c) 2011-2012 openxlive.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
```c# /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2008-2009 Jason Booth Copyright (c) 2011-2012 openxlive.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
90311579-e6bd-47cc-b940-b2a1ed2bb3a9
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; namespace BoardGamesApi.Controllers { [ApiExplorerSettings(IgnoreApi = true)] public class TempController : Controller { private readonly IConfiguration _configuration; ...
```c# using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; namespace BoardGamesApi.Controllers { [ApiExplorerSettings(IgnoreApi = true)] public class TempController : Controller { private readonly IConfiguration _configuration; ...
e9ae10c0-c100-440d-882b-a7be8ee0bd4a
{ "language": "C#" }
```c# using Eto.Forms; using MonoMac.AppKit; using Eto.Drawing; namespace Eto.Mac.Forms.Controls { public abstract class MacButton<TControl, TWidget, TCallback> : MacControl<TControl, TWidget, TCallback>, TextControl.IHandler where TControl: NSButton where TWidget: Control where TCallback: Control.ICallback { ...
```c# using Eto.Forms; using MonoMac.AppKit; using Eto.Drawing; namespace Eto.Mac.Forms.Controls { public abstract class MacButton<TControl, TWidget, TCallback> : MacControl<TControl, TWidget, TCallback>, TextControl.IHandler where TControl: NSButton where TWidget: Control where TCallback: Control.ICallback { ...
bf0621f3-8b7d-4995-8fec-95748d0b0d44
{ "language": "C#" }
```c# // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.ComponentModel; using osu.Framework.Input.Bindings; using osu.Game.Rulesets.UI; namespace osu.Game.Rulesets.Mania { public class ManiaI...
```c# // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.ComponentModel; using osu.Framework.Input.Bindings; using osu.Game.Rulesets.UI; namespace osu.Game.Rulesets.Mania { public class ManiaI...
11e80612-0aa9-4d46-8835-048c79c917b5
{ "language": "C#" }
```c# using System; using System.Linq; using System.Threading.Tasks; using Octokit; using Rackspace.Threading; using UnityEditor; using UnityEngine; namespace GitHub.Unity { class LoadingView : Subview { private static readonly Vector2 viewSize = new Vector2(300, 250); private bool isBusy; ...
```c# using System; using System.Linq; using System.Threading.Tasks; using Octokit; using Rackspace.Threading; using UnityEditor; using UnityEngine; namespace GitHub.Unity { class LoadingView : Subview { private static readonly Vector2 viewSize = new Vector2(300, 250); private const string Wi...
2971a609-5024-453a-96f2-1ba1fa2cac5c
{ "language": "C#" }
```c# using System; using Xamarin.Forms; using Xamarin.Forms.OAuth; namespace OAuthTestApp { public class ResultPage : ContentPage { public ResultPage(AuthenticatonResult result, Action returnCallback) { var stack = new StackLayout { VerticalOptions = La...
```c# using System; using Xamarin.Forms; using Xamarin.Forms.OAuth; using Xamarin.Forms.OAuth.Views; namespace OAuthTestApp { public class ResultPage : ContentPage, IBackHandlingView { private readonly Action _returnCallback; public ResultPage(AuthenticatonResult result, Action retur...
f2561c60-d8f6-4985-bba7-9c5e48f6dfeb
{ "language": "C#" }
```c# using Sync.Command; using Sync.MessageFilter; using Sync.Plugins; using Sync.Source; using Sync.Tools; using System; using System.Diagnostics; using static Sync.Tools.IO; namespace Sync { public static class Program { //public static I18n i18n; static void Main(string[] args) { ...
```c# using Sync.Command; using Sync.MessageFilter; using Sync.Plugins; using Sync.Source; using Sync.Tools; using System; using System.Diagnostics; using static Sync.Tools.IO; namespace Sync { public static class Program { //public static I18n i18n; static void Main(string[] args) { ...
4c4fccb5-0e40-4384-b121-1e5aaff53724
{ "language": "C#" }
```c# using Microsoft.VisualStudio.ConnectedServices; namespace AzureIoTHubConnectedService { [ConnectedServiceHandlerExport("Microsoft.AzureIoTHubService", AppliesTo = "VisualC+WindowsAppContainer")] internal class CppHandlerWAC : GenericAzureIoTHubServiceHandler { protected override HandlerM...
```c# using Microsoft.VisualStudio.ConnectedServices; namespace AzureIoTHubConnectedService { #if false // Disabled to a bug: https://github.com/Azure/azure-iot-sdks/issues/289 [ConnectedServiceHandlerExport("Microsoft.AzureIoTHubService", AppliesTo = "VisualC+WindowsAppContainer")] #endif internal class ...
ba6cd961-aff7-46fe-9a36-9aceac39abbd
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using Newtonsoft.Json; using osu.Game.Online.API; namespace osu.Game.Online.Multiplayer { public class IndexPlaylistScoresReq...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using Newtonsoft.Json; using osu.Framework.IO.Network; using osu.Game.Extensions; using osu.Game.Online.API; using osu.Game.Online...
91d76592-d550-41e7-9d8f-810bb970039e
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Game.Rulesets.Difficulty { /// <summary> /// Wraps a <see cref="DifficultyAttributes"/> object and adds a time value for which ...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Game.Rulesets.Difficulty { /// <summary> /// Wraps a <see cref="DifficultyAttributes"/> object and adds a time value for which ...
30d6d6ba-d1e1-44b6-911c-a6ed41ffad3b
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; namespace Orchard.Caching { public class Cache<TKey, TResult> : ICache<TKey, TResult> { private readonly Dictionary<TKey, CacheEntry> _entries; public Cache() { _entries = new Dictionary<TKey, CacheEntry...
```c# using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; namespace Orchard.Caching { public class Cache<TKey, TResult> : ICache<TKey, TResult> { private readonly ConcurrentDictionary<TKey, CacheEntry> _entries; public Cache() { ...
f70d678a-76f2-40f2-9535-265e31632054
{ "language": "C#" }
```c# using FootballLeague.Models; using System.DirectoryServices; namespace FootballLeague.Services { public class UsersADSearcher : IUsersADSearcher { public User LoadUserDetails(string userName) { var entry = new DirectoryEntry(); var searcher = new DirectorySearcher...
```c# using System.Linq; using System.Web; using FootballLeague.Models; using System.DirectoryServices; namespace FootballLeague.Services { public class UsersADSearcher : IUsersADSearcher { public User LoadUserDetails(string userName) { var entry = new DirectoryEntry(); ...
207e22cc-4f11-4f84-a642-94c93c7c08d7
{ "language": "C#" }
```c# using UnityEditor; using UnityEditor.Build; #if UNITY_2018_1_OR_NEWER using UnityEditor.Build.Reporting; #endif using UnityEngine; class TeakPreProcessDefiner : #if UNITY_2018_1_OR_NEWER IPreprocessBuildWithReport #else IPreprocessBuild #endif { public int callbackOrder { get { return 0; } } publ...
```c# using UnityEditor; using UnityEditor.Build; #if UNITY_2018_1_OR_NEWER using UnityEditor.Build.Reporting; #endif using UnityEngine; using System.Collections.Generic; class TeakPreProcessDefiner : #if UNITY_2018_1_OR_NEWER IPreprocessBuildWithReport #else IPreprocessBuild #endif { public int callbackO...
cf15b5cb-f777-48ab-b8c8-44849ba132b8
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace Stripe.Tests.Xunit { public class coupons_fixture : IDisposable { public StripeCouponCreateOptions CouponCreateOptions { get; set; } public StripeCouponUpdateOptions CouponUpdateOptions { get; set; } public StripeCoupon Co...
```c# using System; using System.Collections.Generic; namespace Stripe.Tests.Xunit { public class coupons_fixture : IDisposable { public StripeCouponCreateOptions CouponCreateOptions { get; set; } public StripeCouponUpdateOptions CouponUpdateOptions { get; set; } public StripeCoupon Co...
cbeae653-c7f4-440a-acf8-178e4d09dec1
{ "language": "C#" }
```c# using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly...
```c# using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly...
ca28e8d8-c2d9-4eb6-afe9-c8359e8ef5ff
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Dynamic; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; namespace RazorLight.Extensions { public static class TypeExtensions { public static ExpandoObject ToExpando(this object anonymousObject) ...
```c# using System; using System.Collections.Generic; using System.Dynamic; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; namespace RazorLight.Extensions { public static class TypeExtensions { public static ExpandoObject ToExpando(this object anonymousObject) ...
b8c2990b-9684-4c9a-8555-add5d66d4c8d
{ "language": "C#" }
```c# using UnityEngine; namespace PrepareLanding.Core.Extensions { public static class FilterBooleanExtensions { public static string ToStringHuman(this FilterBoolean filterBool) { switch (filterBool) { case FilterBoolean.AndFiltering: ...
```c# using UnityEngine; using Verse; namespace PrepareLanding.Core.Extensions { public static class FilterBooleanExtensions { public static string ToStringHuman(this FilterBoolean filterBool) { switch (filterBool) { case FilterBoolean.AndFiltering: ...
0f42069a-ab0d-48b7-83d4-2a1ee65ac070
{ "language": "C#" }
```c# using System; using System.Runtime.InteropServices; namespace OpenSage.Utilities { public static class PlatformUtility { /// <summary> /// Check if current platform is windows /// </summary> /// <returns></returns> public static bool IsWindowsPlatform() { ...
```c# using System; using System.Runtime.InteropServices; namespace OpenSage.Utilities { public static class PlatformUtility { /// <summary> /// Check if current platform is windows /// </summary> /// <returns></returns> public static bool IsWindowsPlatform() { ...
55fc8f5a-be54-4259-b0f6-0445b173e76c
{ "language": "C#" }
```c# using System.Text; using TweetDuck.Plugins.Enums; namespace TweetDuck.Plugins{ static class PluginScriptGenerator{ public static string GenerateConfig(PluginConfig config){ return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"", config.DisabledPlugins)+"\"];" ...
```c# using System.Globalization; using TweetDuck.Plugins.Enums; namespace TweetDuck.Plugins{ static class PluginScriptGenerator{ public static string GenerateConfig(PluginConfig config){ return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"", config.DisabledPlugins...
4659fc89-0665-415b-8495-1e6f9957430e
{ "language": "C#" }
```c# using System.Collections.Generic; using Newtonsoft.Json; namespace OmniSharp.Models { public class Request : SimpleFileRequest { [JsonConverter(typeof(ZeroBasedIndexConverter))] public int Line { get; set; } [JsonConverter(typeof(ZeroBasedIndexConverter))] public int Colum...
```c# using System.Collections.Generic; using Newtonsoft.Json; namespace OmniSharp.Models { public class Request : SimpleFileRequest { [JsonConverter(typeof(ZeroBasedIndexConverter))] public int Line { get; set; } [JsonConverter(typeof(ZeroBasedIndexConverter))] public int Colum...
9161ea54-2cd1-46f0-b92a-36d685eede0d
{ "language": "C#" }
```c# using System.Collections.Generic; using System.IO; using System.Linq; using Newtonsoft.Json.Linq; namespace LibYear.Lib.FileTypes { public class ProjectJsonFile : IProjectFile { private string _fileContents; public string FileName { get; } public IDictionary<string, PackageVersion...
```c# using System.Collections.Generic; using System.IO; using System.Linq; using Newtonsoft.Json.Linq; namespace LibYear.Lib.FileTypes { public class ProjectJsonFile : IProjectFile { private string _fileContents; public string FileName { get; } public IDictionary<string, PackageVersion> Packages { get; } pr...
4a8c3bd3-4d50-4dbc-b7ba-100503123245
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using LearnositySDK.Request; using LearnositySDK.Utils; // static LearnositySDK.Credentials; namespace LearnosityDemo.Pages { public cla...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using LearnositySDK.Request; using LearnositySDK.Utils; // static LearnositySDK.Credentials; namespace LearnosityDemo.Pages { public cla...
1d2d0d44-f646-4043-8417-14489ca89092
{ "language": "C#" }
```c# namespace DesktopWidgets.Widgets.RSSFeed { public static class Metadata { public const string FriendlyName = "RSS Headlines"; } }``` Change "RSS Headlines" widget name
```c# namespace DesktopWidgets.Widgets.RSSFeed { public static class Metadata { public const string FriendlyName = "RSS Feed"; } }```
2f672a3f-7fb1-43d0-89fe-8082d6460a0b
{ "language": "C#" }
```c# @using Microsoft.ApplicationInsights.Extensibility @inject TelemetryConfiguration TelemetryConfiguration <environment names="Production"> <script type="text/javascript"> (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { ...
```c# @using Microsoft.ApplicationInsights.Extensibility @inject TelemetryConfiguration TelemetryConfiguration <environment names="Production"> <script type="text/javascript"> (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { ...
9e615250-a321-4308-8a0b-d4282560f3e3
{ "language": "C#" }
```c# using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an as...
```c# using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an as...
e37d01c2-f02e-4956-8902-a920b7a7f416
{ "language": "C#" }
```c# using System; using QuantConnect.Parameters; using QuantConnect.Util; namespace QuantConnect.Data.Custom.Intrinio { /// <summary> /// Auxiliary class to access all Intrinio API data. /// </summary> public static class IntrinioConfig { /// <summary> /// </summary> ...
```c# using System; using QuantConnect.Parameters; using QuantConnect.Util; namespace QuantConnect.Data.Custom.Intrinio { /// <summary> /// Auxiliary class to access all Intrinio API data. /// </summary> public static class IntrinioConfig { /// <summary> /// </summary> ...
24e28d02-c119-454d-96a4-36c7cbc1ecf6
{ "language": "C#" }
```c# using System.Text.RegularExpressions; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace conekta { public class PaymentSource : Resource { public string id { get; set; } public string type { get; set; } /* In case card token */ public string token_id { get; set; } /* In case card object...
```c# using System.Text.RegularExpressions; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace conekta { public class PaymentSource : Resource { public string id { get; set; } public string type { get; set; } /* In case card token */ public string token_id { get; set; } /* In case card object...
7bd29b80-9dcd-4330-bc99-fbfb594124ad
{ "language": "C#" }
```c# using System.Web.Http; using System.Web.Routing; namespace Vidyano.Web2 { public static class Web2ControllerFactory { public static void MapVidyanoWeb2Route(this RouteCollection routes, string routeTemplate = "web2/") { routes.MapHttpRoute("VidyanoWeb2 Vulcanize", routeTempla...
```c# using System.Web.Http; using System.Web.Routing; namespace Vidyano.Web2 { public static class Web2ControllerFactory { public static void MapVidyanoWeb2Route(this RouteCollection routes, string routeTemplate = "web2/") { routes.MapHttpRoute("VidyanoWeb2 Vulcanize", routeTempla...
80e100d9-9cd5-449c-839a-e3cc351dc6b3
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Game.Beatmaps; using osu.Game.Rulesets.Difficulty; using osu.Game.Rulesets.Osu.Difficulty; using osu.Game.Tests.Beatmaps; namespac...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Game.Beatmaps; using osu.Game.Rulesets.Difficulty; using osu.Game.Rulesets.Osu.Difficulty; using osu.Game.Tests.Beatmaps; namespac...
622d3460-6035-480c-b2eb-67986eb71052
{ "language": "C#" }
```c# using System; using System.Collections; using System.Collections.Generic; using Newtonsoft.Json; namespace Shippo { [JsonObject (MemberSerialization.OptIn)] public class Track : ShippoId { [JsonProperty (PropertyName = "carrier")] public string Carrier { get; set; } [JsonProperty...
```c# using System; using System.Collections; using System.Collections.Generic; using Newtonsoft.Json; namespace Shippo { [JsonObject (MemberSerialization.OptIn)] public class Track : ShippoId { [JsonProperty (PropertyName = "carrier")] private string Carrier; [JsonProperty (Proper...
48c824f2-b5a0-4579-893e-929262ec5622
{ "language": "C#" }
```c# namespace OctoAwesome { /// <summary> /// Repräsentiert die physikalischen Eigenschaften eines Blocks/Items/... /// </summary> public class PhysicalProperties { /// <summary> /// Härte /// </summary> public float Hardness { get; set; } /// <summary> ...
```c# namespace OctoAwesome { /// <summary> /// Repräsentiert die physikalischen Eigenschaften eines Blocks/Items/... /// </summary> public class PhysicalProperties { /// <summary> /// Härte, welche Materialien können abgebaut werden /// </summary> public float Hardn...
941df08e-4135-46cf-957e-75400cc8853c
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Framework.Bindables { /// <summary> /// An interface that represents a read-only leased bindable. /// </summary> public interface ILea...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Framework.Bindables { /// <summary> /// An interface that represents a read-only leased bindable. /// </summary> public interface ILea...
11899a15-fb22-4e32-8a15-494512717cce
{ "language": "C#" }
```c# #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // /...
```c# #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // /...
fd4b9cea-6a3c-4c6f-9aa8-63bf69ff0240
{ "language": "C#" }
```c# using System; using System.Linq; using System.Reflection; namespace TDDUnit { class Runner { public Runner(Type exceptType) { Suite suite = new Suite(); m_result = new Result(); foreach (Type t in Assembly.GetEntryAssembly().GetTypes()) { if (t.Name.StartsWith("Test") && t.Name ...
```c# using System; using System.Linq; using System.Reflection; namespace TDDUnit { class Runner { public Runner(Type callingType) { Suite suite = new Suite(); m_result = new Result(); Type[] forbiddenTypes = new Type[] { callingType , typeof (TDDUnit.WasRunObj) , typeof (T...
7b08de0a-833e-4edb-8423-fde8eb99d6c7
{ "language": "C#" }
```c# namespace Stripe { using System; using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; public class StripeCoupon : StripeEntityWithId, ISupportMetadata { [JsonProperty("object")] public string Object { get; set; } [JsonProperty("am...
```c# namespace Stripe { using System; using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; public class StripeCoupon : StripeEntityWithId, ISupportMetadata { [JsonProperty("object")] public string Object { get; set; } [JsonProperty("am...
01514432-86a5-4ba2-a1bc-6c2ae8ebdb1b
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace MitternachtWeb { public class Startup { public Startup(IConfiguration configuration) { Configuratio...
```c# using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Hosting; using System.Linq; namespace MitternachtWeb { public cl...
7d2fdf69-a083-43a9-8727-718b31e6a167
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using CommandLine.Text; namespace PhotoOrganizer { class Program { static void Main(string[] args) { var opts = new CommandLineOptions(); ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using CommandLine.Text; namespace PhotoOrganizer { class Program { static void Main(string[] args) { var opts = new CommandLineOptions(); ...
a3be3a4c-8205-48e3-b700-83b8c2ec103a
{ "language": "C#" }
```c# using System.IO; using Microsoft.AspNetCore.Hosting; using Orchard.Hosting; using Orchard.Web; namespace Orchard.Console { public class Program { public static void Main(string[] args) { var currentDirectory = Directory.GetCurrentDirectory(); var host = new WebHo...
```c# using System.IO; using Microsoft.AspNetCore.Hosting; using Orchard.Hosting; using Orchard.Web; namespace Orchard.Console { public class Program { public static void Main(string[] args) { var currentDirectory = Directory.GetCurrentDirectory(); var host = new WebHo...
77275dfc-e3df-4efc-88d3-f3bd672a8cad
{ "language": "C#" }
```c# using Cafe.Tab; using Edument.CQRS; using Events.Cafe; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WebFrontend; namespace CafeTests { [TestFixture] public class AddingEventHandlers { [Test] ...
```c# using Cafe.Tab; using Edument.CQRS; using Events.Cafe; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WebFrontend; namespace CafeTests { [TestFixture] public class AddingEventHandlers { private ...
656d0922-66af-435a-b720-2afba3aa9eb9
{ "language": "C#" }
```c# using Xunit; using Squirrel; using Squirrel.Nodes; namespace Tests { public class EnvironmentTests { private static readonly string TestVariableName = "x"; private static readonly INode TestVariableValue = new IntegerNode(1); [Fact] public void TestGetValueFromCurrentEnvi...
```c# using Xunit; using Squirrel; using Squirrel.Nodes; namespace Tests { public class EnvironmentTests { private static readonly string TestVariableName = "x"; private static readonly INode TestVariableValue = new IntegerNode(1); [Fact] public void TestCanGetValueFromCurrentE...
ce6b99a8-cf4d-4c50-a5d2-5126f8e7ab21
{ "language": "C#" }
```c# using MongoDB.Bson.Serialization.Attributes; using System.Diagnostics; namespace ChessVariantsTraining.Models.Variant960 { public class Clock { Stopwatch stopwatch; [BsonElement("secondsLeftAfterLatestMove")] public double SecondsLeftAfterLatestMove { get; ...
```c# using MongoDB.Bson.Serialization.Attributes; using System.Diagnostics; namespace ChessVariantsTraining.Models.Variant960 { public class Clock { Stopwatch stopwatch; [BsonElement("secondsLeftAfterLatestMove")] public double SecondsLeftAfterLatestMove { get; ...
c378e85c-8e24-44e5-b67c-003f4bac5d03
{ "language": "C#" }
```c# using NBi.GenbiL.Action; using Sprache; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.GenbiL.Parser { class Action { public readonly static Parser<IAction> Parser = ( from sentence in Case...
```c# using NBi.GenbiL.Action; using Sprache; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.GenbiL.Parser { class Action { public readonly static Parser<IAction> Parser = ( from sentence in Case...
8b7ee74c-e7f5-4683-91a2-6e018c4d2a9b
{ "language": "C#" }
```c# using System; using System.IO; using System.Net; using System.Text; using Wox.Plugin; namespace Wox.Infrastructure.Http { public class HttpRequest { public static string Get(string url, string encoding = "UTF8") { return Get(url, encoding, HttpProxy.Instance); } ...
```c# using System; using System.IO; using System.Net; using System.Text; using Wox.Plugin; namespace Wox.Infrastructure.Http { public class HttpRequest { public static string Get(string url, string encoding = "UTF-8") { return Get(url, encoding, HttpProxy.Instance); } ...
95fe27dc-b227-49e5-a872-4f02968c2227
{ "language": "C#" }
```c# using Microsoft.SqlServer.Management.Smo; using System; using System.Collections.Generic; using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.Core.Batch.SqlServer { class BatchRunCommand : IDecorationCommandImplementation...
```c# using Microsoft.SqlServer.Management.Smo; using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.Core.Batch.SqlServer { class BatchRunCommand : IDeco...
fc9ed815-4851-4fbc-8bc2-ecbbb9af2d87
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Transforms; using osu.Game.Graphics.Backgrounds; using osuTK; namespace osu.Game.Screens { public a...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Transforms; using osu.Game.Graphics.Backgrounds; using osuTK; namespace osu.Game.Screens { public a...
df36a8d2-b4e9-4286-8a18-9b8befbc23a7
{ "language": "C#" }
```c# using System; using DbLocalizationProvider.Internal; namespace DbLocalizationProvider.DataAnnotations { internal class ModelMetadataLocalizationHelper { internal static string GetTranslation(string resourceKey) { var result = resourceKey; if(!ConfigurationContext.C...
```c# using System; using DbLocalizationProvider.Internal; namespace DbLocalizationProvider.DataAnnotations { internal class ModelMetadataLocalizationHelper { internal static string GetTranslation(string resourceKey) { var result = resourceKey; if(!ConfigurationContext.C...
f04caf1d-647f-4d51-87e5-c2317a559e0a
{ "language": "C#" }
```c# using System; public delegate int IntMap(int x); public static class Program { private static int Apply(IntMap f, int x) { return f(x); } private static int Square(int x) { return x * x; } public static void Main() { Console.WriteLine(Apply(Square, 10));...
```c# using System; public delegate T2 Map<T1, T2>(T1 x); public static class Program { private static int Apply(Map<int, int> f, int x) { return f(x); } private static int Square(int x) { return x * x; } public static void Main() { Console.WriteLine(Apply(Squ...
35604fcc-998a-42b6-b74b-20834eb5985d
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitl...
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitl...
7978a471-18b0-4abe-a557-a4ca389001db
{ "language": "C#" }
```c# namespace LinkedListInOrderInsertion { using System; using System.Collections.Generic; public class LinkedList { private Element Head = null; private Element Iterator = new Element(); internal void Add(int value) { Element insertedElement = new Eleme...
```c# namespace LinkedListInOrderInsertion { using System; using System.Collections.Generic; public class LinkedList { private Element Head = null; private Element Iterator = new Element(); internal void Add(int value) { Element insertedElement = new Eleme...
437b7a6a-f8f0-4f71-b9d5-bec2a80611f3
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Framework.Graphics { /// <summary> /// Holds extension methods for <see cref="Drawable"/>. /// </summary> public static...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Development; using osu.Framework.Graphics.Containers; namespace osu.Framework.Graphics { /// <summary> /// Holds extensio...
f8f8dc91-1f0c-4f56-8ab5-7bc2660746ff
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; public static class Extensions { public static DayResult Days(this int days) { return new DayResult(days); } public static YearResult Years(this int years) { ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; public static class Extensions { public static MinuteResult Minutes(this int minutes) { return new MinuteResult(minutes); } public static DayResult Days(this int days) {...
5316b869-3330-41ed-b191-f4b1b0a5eee4
{ "language": "C#" }
```c# // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using Newtonsoft.Json; namespace osu.Game.Users { public class UserStatistics { [JsonProperty(@"level")] public LevelInfo Level...
```c# // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using Newtonsoft.Json; namespace osu.Game.Users { public class UserStatistics { [JsonProperty(@"level")] public LevelInfo Level...
37005553-268f-4b20-83ab-adbbe5397b81
{ "language": "C#" }
```c# // WhistTest.cs // <copyright file="WhistTest.cs"> This code is protected under the MIT License. </copyright> using System; using CardGames.Whist; namespace ConsoleTesting { /// <summary> /// The whist test class /// </summary> public class WhistTest : IGameTest { /// <su...
```c# // WhistTest.cs // <copyright file="WhistTest.cs"> This code is protected under the MIT License. </copyright> using System; using CardGames.Whist; namespace ConsoleTesting { /// <summary> /// The whist test class /// </summary> public class WhistTest : IGameTest { /// <su...
9b09350f-113f-4034-b819-fb30e53de0bb
{ "language": "C#" }
```c# // <copyright> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // The following assembly information is common to all Python Tools for Visual // Studio assemblies. // If...
```c# // <copyright> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // The following assembly information is common to all Python Tools for Visual // Studio assemblies. // If...
62bac7a3-d372-4bcf-a256-6e4e3cc63f06
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using osu_StreamCompanion.Code.Helpers; using Sentry; using StreamCompanionTypes.Enums; using StreamCompanionTypes.Interfaces.Services; namespace osu_StreamCompanion.Code.Core.Loggers { public class SentryLogger : IContextAwareLogger { public stati...
```c# using System; using System.Collections.Generic; using osu_StreamCompanion.Code.Helpers; using Sentry; using StreamCompanionTypes.Enums; using StreamCompanionTypes.Interfaces.Services; namespace osu_StreamCompanion.Code.Core.Loggers { public class SentryLogger : IContextAwareLogger { public stati...
a1366392-fba9-43e4-ab16-f0cdd4abaf8f
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTit...
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTit...
c33913f7-2ae4-4a6f-89a5-089c59308007
{ "language": "C#" }
```c# using System.Collections.Generic; using SFA.DAS.Audit.Types; namespace SFA.DAS.EmployerUsers.Domain.Auditing { public class AccountLockedAuditMessage : EmployerUsersAuditMessage { public AccountLockedAuditMessage(User user) { Category = "ACCOUNT_LOCKED"; ...
```c# using System.Collections.Generic; using SFA.DAS.Audit.Types; namespace SFA.DAS.EmployerUsers.Domain.Auditing { public class AccountLockedAuditMessage : EmployerUsersAuditMessage { public AccountLockedAuditMessage(User user) { Category = "ACCOUNT_LOCKED"; ...
804c1903-3b45-484f-afb3-8b1d18d0edc3
{ "language": "C#" }
```c# using System; using FluentMigrator.Runner.Generators.Generic; namespace FluentMigrator.Runner.Generators.Jet { public class JetQuoter : GenericQuoter { public override string OpenQuote { get { return "["; } } public override string CloseQuote { get { return "]"; } } public over...
```c# using System; using FluentMigrator.Runner.Generators.Generic; namespace FluentMigrator.Runner.Generators.Jet { public class JetQuoter : GenericQuoter { public override string OpenQuote { get { return "["; } } public override string CloseQuote { get { return "]"; } } public over...
cbd3133d-f343-4a16-be42-667360142c16
{ "language": "C#" }
```c# // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================= ** ** Class: NotSupportedException ** ** ** Purpose: For methods that should be implemented on subclasses. ** ** =============================...
```c# // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================= ** ** Class: NotSupportedException ** ** ** Purpose: For methods that should be implemented on subclasses. ** ** =============================...
51eafde8-28a2-450e-ba69-acb54b13dc40
{ "language": "C#" }
```c# using System.Data.Entity; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using SupportManager.DAL; namespace SupportManager.Web.Infr...
```c# using System.Data.Entity; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using SupportManager.DAL; namespace SupportManager.Web.Infr...
513c8e70-abf0-4d7c-a9eb-676352f72701
{ "language": "C#" }
```c# using Newtonsoft.Json; using Telegram.Bot.Requests; using Xunit; namespace Telegram.Bot.Tests.Unit.Serialization { public class MethodNameTests { [Fact(DisplayName = "Should serialize method name in webhook responses")] public void Should_Serialize_MethodName_In_Webhook_Responses() ...
```c# using Newtonsoft.Json; using Telegram.Bot.Requests; using Xunit; namespace Telegram.Bot.Tests.Unit.Serialization { public class MethodNameTests { [Fact(DisplayName = "Should serialize method name in webhook responses")] public void Should_Serialize_MethodName_In_Webhook_Responses() ...
302564f2-3a37-4de5-a483-00e437bf0d24
{ "language": "C#" }
```c# using System; using System.Reflection; namespace FullSerializer.Internal { /// <summary> /// Provides APIs for looking up types based on their name. /// </summary> internal static class fsTypeLookup { public static Type GetType(string typeName) { //-- // see ...
```c# using System; using System.Reflection; namespace FullSerializer.Internal { /// <summary> /// Provides APIs for looking up types based on their name. /// </summary> internal static class fsTypeLookup { /// <summary> /// Attempts to lookup the given type. Returns null if the type l...
add252df-2c3c-481c-a026-7a91f4bd48f3
{ "language": "C#" }
```c# using Lokad.Cqrs.Build.Engine; using NUnit.Framework; namespace Lokad.Cqrs { [TestFixture] public sealed class MiscTests { // ReSharper disable InconsistentNaming [Test] public void Azure_queues_regex_is_valid() { Assert.IsTrue(AzureEngineModule.QueueName.I...
```c# using Lokad.Cqrs.Build.Engine; using NUnit.Framework; namespace Lokad.Cqrs { [TestFixture] public sealed class MiscTests { // ReSharper disable InconsistentNaming [Test] public void Azure_queues_regex_is_valid() { Assert.IsTrue(AzureEngineModule.QueueName.I...