doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
a94402e4-1d90-48d9-b2df-514441f10629
{ "language": "C#" }
```c# using System.Collections.Generic; using Newtonsoft.Json; namespace Stripe { public class StripePlanUpdateOptions : StripeBaseOptions, ISupportMetadata { [JsonProperty("active")] public bool? Active { get; set; } [JsonProperty("metadata")] public Dictionary<string, string...
```c# using System.Collections.Generic; using Newtonsoft.Json; namespace Stripe { public class StripePlanUpdateOptions : StripeBaseOptions, ISupportMetadata { [JsonProperty("active")] public bool? Active { get; set; } [JsonProperty("metadata")] public Dictionary<string, string...
1c91e15e-b368-41b6-8791-cf82e904bca9
{ "language": "C#" }
```c# using System; using CefSharp.BrowserSubprocess; namespace TweetDuck.Browser{ static class Program{ internal const string Version = "1.4.1.0"; private static int Main(string[] args){ SubProcess.EnableHighDPISupport(); const string typePrefix = "--type="; ...
```c# using System; using System.Diagnostics; using System.Threading.Tasks; using CefSharp.BrowserSubprocess; namespace TweetDuck.Browser{ static class Program{ internal const string Version = "1.4.1.0"; private static int Main(string[] args){ SubProcess.EnableHighDPISupport(); ...
eb120abc-8320-4ce5-9a2b-aa7cb2ba5725
{ "language": "C#" }
```c# using RimWorld; using Verse; namespace PrepareLanding.Defs { /// <summary> /// This class is called from a definition file when clicking the "World" button on the bottom menu bar while playing /// (see "PrepareLanding/Defs/Misc/MainButtonDefs/MainButtons.xml"). /// </summary> public class M...
```c# using RimWorld; using Verse; namespace PrepareLanding.Defs { /// <summary> /// This class is called from a definition file when clicking the "World" button on the bottom menu bar while playing /// (see "\PrepareLanding\Patches\MainButtonDef_Patch.xml"). /// </summary> public class MainButto...
b0065bbc-e774-4d8e-8103-8bd7857bc15d
{ "language": "C#" }
```c# using System.Linq; using ZobShop.Data.Contracts; using ZobShop.Factories; using ZobShop.Models; using ZobShop.Services.Contracts; namespace ZobShop.Services { public class CategoryService : ICategoryService { private readonly IRepository<Category> repository; private readonly IUnitOfWork...
```c# using System; using System.Linq; using ZobShop.Data.Contracts; using ZobShop.Factories; using ZobShop.Models; using ZobShop.Services.Contracts; namespace ZobShop.Services { public class CategoryService : ICategoryService { private readonly IRepository<Category> repository; private readon...
8cb3386d-3b41-4dc6-9184-e24fdf0e9a35
{ "language": "C#" }
```c# using InEngine.Core; namespace InEngine.Commands { /// <summary> /// Dummy command for testing and sample code. /// </summary> public class AlwaysSucceed : AbstractCommand { public override void Run() { Info("Ths command always succeeds."); } } } ``` ...
```c# using InEngine.Core; namespace InEngine.Commands { /// <summary> /// Dummy command for testing and sample code. /// </summary> public class AlwaysSucceed : AbstractCommand { public override void Run() { Info("This command always succeeds."); } } } ```
56d67f18-1e0c-4999-84d2-b864d0300dfb
{ "language": "C#" }
```c# using Avalonia.Controls; using Avalonia.Markup.Xaml; using Avalonia; using Avalonia.Input; using ReactiveUI; using System.Reactive.Linq; using System; namespace WalletWasabi.Gui.Controls.LockScreen { public class PinLockScreen : UserControl { public static readonly DirectProperty<PinLockScreen, bool> IsLocke...
```c# using Avalonia.Controls; using Avalonia.Markup.Xaml; using Avalonia; using Avalonia.Input; using ReactiveUI; using System.Reactive.Linq; using System; using Avalonia.LogicalTree; namespace WalletWasabi.Gui.Controls.LockScreen { public class PinLockScreen : UserControl { public static readonly DirectProperty<...
3d81b634-952b-481f-afc9-b1651536d2ff
{ "language": "C#" }
```c# var octokit = Require<OctokitPack>(); var client = octokit.Create("ScriptCs.Octokit"); var userTask = client.User.Get("alfhenrik"); var user = userTask.Result; Console.WriteLine(user.Name); var repoTask = client.Repository.GetAllBranches("alfhenrik", "octokit.net"); var branches = repoTask.Result; Console.WriteL...
```c# var octokit = Require<OctokitPack>(); var client = octokit.Create("ScriptCs.Octokit"); var userTask = client.User.Get("alfhenrik"); var user = userTask.Result; Console.WriteLine(user.Name); var repoTask = client.Repository.Branch.GetAll("alfhenrik", "octokit.net"); var branches = repoTask.Result; Console.WriteLi...
36a740d5-d0b6-43e1-b5a8-4d1c9db7d635
{ "language": "C#" }
```c# using System; namespace Mocca { public class MoccaCompiler { public MoccaCompiler() { } } } ``` Add Target Language, Compiler Interface
```c# using System; using System.Collections.Generic; using System.Text; using Mocca.DataType; namespace Mocca { public enum TargetLanguage { Python, // Now available Java, // NOT available Javascript, // NOT available C_sharp, // NOT available Swift // NOT Available } public interface Compiler { s...
be2c83fe-cce1-4be8-a32b-8d0a70e6f639
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using JoinRpg.DataModel; namespace JoinRpg.Domain { public static class FieldExtensions { public static bool HasValueList(this ProjectField field) { return field.FieldType == ProjectFieldType.Dropdown || field.FieldType == Proj...
```c# using System; using System.Collections.Generic; using System.Linq; using JoinRpg.DataModel; namespace JoinRpg.Domain { public static class FieldExtensions { public static bool HasValueList(this ProjectField field) { return field.FieldType == ProjectFieldType.Dropdown || field.FieldType == Proj...
ac0ff553-0c68-49d7-b4d1-a7720b983995
{ "language": "C#" }
```c#  namespace SettlersOfCatan.Mutable { public class Player { public Resources Hand { get; private set; } public Player() { Hand = new Resources(); } public void Trade(Player other, Resources give, Resources take) { Hand.RequireAtLeas...
```c#  namespace SettlersOfCatan.Mutable { public class Player { public Resources Hand { get; } public Player() { Hand = new Resources(); } public void Trade(Player other, Resources give, Resources take) { Hand.RequireAtLeast(give); ...
9d53f835-ccf3-461a-b33b-7a82bb1df9b3
{ "language": "C#" }
```c# using System.Data.Services; using System.ServiceModel.Activation; using System.Web.Routing; using NuGet.Server; using NuGet.Server.DataServices; using NuGet.Server.Publishing; using RouteMagic; [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(MyGet.NuGetRoutes), "Start")] namespace MyGet { public ...
```c# using System.Data.Services; using System.ServiceModel.Activation; using System.Web.Routing; using NuGet.Server; using NuGet.Server.DataServices; using NuGet.Server.Publishing; using RouteMagic; [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(MyGet.NuGetRoutes), "Start")] namespace MyGet { public ...
227da4e9-d9aa-4e2f-9881-97e108b677aa
{ "language": "C#" }
```c# using System; namespace VGPrompter { public class Logger { public bool Enabled { get; set; } public string Name { get; private set; } Action<object> _logger; public Logger(bool enabled = true) : this("Default", enabled: enabled) { } public Logger(string name, Acti...
```c# using System; namespace VGPrompter { [Serializable] public class Logger { public bool Enabled { get; set; } public string Name { get; private set; } Action<object> _logger; public Logger(bool enabled = true) : this("Default", enabled: enabled) { } public Logge...
89cf6bd3-54af-4f0b-b173-c9e348d2dd4f
{ "language": "C#" }
```c# using System; using System.Collections.Concurrent; using System.Linq; using KafkaNet.Model; using KafkaNet.Protocol; namespace KafkaNet { public class DefaultPartitionSelector : IPartitionSelector { private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDicti...
```c# using System; using System.Collections.Concurrent; using System.Linq; using KafkaNet.Model; using KafkaNet.Protocol; namespace KafkaNet { public class DefaultPartitionSelector : IPartitionSelector { private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDicti...
d8aa6f88-703f-4d8f-ae03-1bee7f95ede8
{ "language": "C#" }
```c# using KeyPay.DomainModels.V2.Business; using KeyPay.DomainModels.V2.Manager; using System.Collections.Generic; namespace KeyPay.ApiFunctions.V2 { public class ManagerFunction : BaseFunction { public ManagerFunction(ApiRequestExecutor api) : base(api) { LeaveRequests = new Mana...
```c# using KeyPay.DomainModels.V2.Business; using KeyPay.DomainModels.V2.Manager; using System.Collections.Generic; namespace KeyPay.ApiFunctions.V2 { public class ManagerFunction : BaseFunction { public ManagerFunction(ApiRequestExecutor api) : base(api) { LeaveRequests = new Mana...
7408d314-abf4-4b48-a617-cc91433e4fb8
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Threading.Tasks; using System.Web; namespace MIMWebClient.Core.Update { public class UpdateWorld { public static void Init() { Task.Run(UpdateTime); ...
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Threading.Tasks; using System.Web; namespace MIMWebClient.Core.Update { public class UpdateWorld { public static void Init() { Task.Run(UpdateTime); ...
37e64a90-2ddb-4032-82ab-6c8d47e38257
{ "language": "C#" }
```c# using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PrefabsPool : GameObjectBehavior { public Dictionary<string, GameObject> prefabs; // Only one ObjectPoolManager can exist. We use a singleton pattern to enforce this. private static Pre...
```c# using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PrefabsPool : GameObjectBehavior { public Dictionary<string, GameObject> prefabs; // Only one ObjectPoolManager can exist. We use a singleton pattern to enforce this. private static Pre...
ae0b18d2-c132-4e13-9edc-7d4dbb552709
{ "language": "C#" }
```c# using System; using System.Net; using BmpListener.Bmp; using BmpListener.JSON; using Newtonsoft.Json; namespace BmpListener { internal class Program { private static void Main() { JsonConvert.DefaultSettings = () => { var settings = new JsonSeriali...
```c# using System; using System.Net; using BmpListener.Bmp; using BmpListener.JSON; using Newtonsoft.Json; namespace BmpListener { internal class Program { private static void Main() { JsonConvert.DefaultSettings = () => { var settings = new JsonSeriali...
1467b79d-f030-4734-be74-f3b431b19cee
{ "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; using Realms; #nullable enable namespace osu.Game.Database { /// <summary> /// Provides a method of working with unmanaged realm objects. ...
```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 Realms; #nullable enable namespace osu.Game.Database { /// <summary> /// Provides a method of working with unmanaged realm objects. ...
ed6f93f4-48b4-4abf-bdc4-14bb07c2e36e
{ "language": "C#" }
```c# using System; namespace GitIStage { internal sealed class ConsoleCommand { private readonly Action _handler; private readonly ConsoleKey _key; public readonly string Description; private readonly ConsoleModifiers _modifiers; public ConsoleCommand(Action handler, C...
```c# using System; namespace GitIStage { internal sealed class ConsoleCommand { private readonly Action _handler; private readonly ConsoleKey _key; public readonly string Description; private readonly ConsoleModifiers _modifiers; public ConsoleCommand(Action handler, C...
c99187e4-0a03-4d73-9c28-aa9cf3dc65d7
{ "language": "C#" }
```c# namespace DD.CBU.Compute.Api.Contracts.Backup { /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://oec.api.opsource.net/schemas/backup")] public enum ServicePlan...
```c# namespace DD.CBU.Compute.Api.Contracts.Backup { /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://oec.api.opsource.net/schemas/backup")] public enum ServicePlan...
a2f0fb97-630d-4772-b249-e4cb43ccbaa2
{ "language": "C#" }
```c# using Xunit; using System; using System.Collections; using System.Collections.ObjectModel; using System.Globalization; using System.Management.Automation; using System.Management.Automation.Host; using System.Management.Automation.Internal; using System.Management.Automation.Internal.Host; using System.Management...
```c# using Xunit; using System; using System.Collections; using System.Collections.ObjectModel; using System.Globalization; using System.Management.Automation; using System.Management.Automation.Host; using System.Management.Automation.Internal; using System.Management.Automation.Internal.Host; using System.Management...
feb0bf19-9949-42ce-a9b0-0f8b0d7eb502
{ "language": "C#" }
```c# using System.Text; using log4net; using Mail2Bug.Email.EWS; namespace Mail2Bug.Email { class AckEmailHandler { private readonly Config.InstanceConfig _config; public AckEmailHandler(Config.InstanceConfig config) { _config = config; } /// <summary> ...
```c# using System.Text; using log4net; using Mail2Bug.Email.EWS; namespace Mail2Bug.Email { class AckEmailHandler { private readonly Config.InstanceConfig _config; public AckEmailHandler(Config.InstanceConfig config) { _config = config; } /// <summary> ...
4334ee36-b469-478b-8ceb-60dd12c50c02
{ "language": "C#" }
```c# using System; using Model = Discord.API.InviteMetadata; namespace Discord.Rest { public class RestInviteMetadata : RestInvite, IInviteMetadata { private long _createdAtTicks; public bool IsRevoked { get; private set; } public bool IsTemporary { get; private set; } public...
```c# using System; using Model = Discord.API.InviteMetadata; namespace Discord.Rest { public class RestInviteMetadata : RestInvite, IInviteMetadata { private long _createdAtTicks; public bool IsRevoked { get; private set; } public bool IsTemporary { get; private set; } public...
d4ad60c1-d37c-4084-9ed1-f13a15a31492
{ "language": "C#" }
```c# using Newtonsoft.Json; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Webpack.AspNetCore.Internal; namespace Webpack.AspNetCore.Static { internal class PhysicalFileManifestReader : IManifestReader { private readonly WebpackContext context; public ...
```c# using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Webpack.AspNetCore.Internal; namespace Webpack.AspNetCore.Static { internal class PhysicalFileManifestReader : IManifestReader { private readonly WebpackContext context; ...
cbfce50e-e858-4255-93c1-d84d1b0ea9cb
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class TableNetworking : NetworkBehaviour { [SyncVar] public string variant; [SyncVar] public string table; [SyncVar] public bool selected; [ServerCallback] void Start () { selected...
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class TableNetworking : NetworkBehaviour { [SyncVar] public string variant; [SyncVar] public string table; [SyncVar] public bool selected; public float logPingFrequency = 5.0f; [Serve...
198a2155-44b7-47cb-b0dd-87f053818fbd
{ "language": "C#" }
```c# using ServiceStack.ServiceHost; using Rainy.Db; using ServiceStack.OrmLite; using System; using ServiceStack.ServiceInterface.Cors; using ServiceStack.Common.Web; namespace Rainy.WebService.Admin { [Route("/api/admin/status/","GET, OPTIONS")] [AdminPasswordRequired] public class StatusRequest : IReturn<Status...
```c# using ServiceStack.ServiceHost; using Rainy.Db; using ServiceStack.OrmLite; using System; using ServiceStack.ServiceInterface.Cors; using ServiceStack.Common.Web; namespace Rainy.WebService.Admin { [Route("/api/admin/status/","GET, OPTIONS")] [AdminPasswordRequired] public class StatusRequest : IReturn<Status...
41930b13-f1a1-4db7-9628-31ac893c603d
{ "language": "C#" }
```c# #if NETFRAMEWORK using System; using Oracle.ManagedDataAccess.Client; public static class OracleConnectionBuilder { public static OracleConnection Build() { return Build(false); } public static OracleConnection Build(bool disableMetadataPooling) { var connection = Environment...
```c# using System; using Oracle.ManagedDataAccess.Client; public static class OracleConnectionBuilder { public static OracleConnection Build() { return Build(false); } public static OracleConnection Build(bool disableMetadataPooling) { var connection = Environment.GetEnvironmentVa...
9aaa80db-6964-4db3-bf60-dd4c09f6c7dd
{ "language": "C#" }
```c#  #if NET45 using Microsoft.AspNet.Abstractions; using Microsoft.AspNet.DependencyInjection; using Microsoft.AspNet.DependencyInjection.Fallback; using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Routing; namespace MvcSample.Web { public class Startup { public void Configuration(IBuilder builder...
```c# using Microsoft.AspNet.Abstractions; using Microsoft.AspNet.DependencyInjection; using Microsoft.AspNet.DependencyInjection.Fallback; using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Routing; namespace MvcSample.Web { public class Startup { public void Configuration(IBuilder builder) {...
1868e6ef-3256-4730-b977-beec590b8dbb
{ "language": "C#" }
```c# using BatteryCommander.Web.Models.Data; using System; using Xunit; namespace BatteryCommander.Tests { public class ACFTTests { [Theory] [InlineData(15, 54, 84)] public void Calculate_Run_Score(int minutes, int seconds, int expected) { Assert.Equal(expected, AC...
```c# using BatteryCommander.Web.Models.Data; using System; using Xunit; namespace BatteryCommander.Tests { public class ACFTTests { [Theory] [InlineData(15, 54, 84)] [InlineData(13, 29, 100)] [InlineData(23, 01, 0)] [InlineData(19, 05, 64)] [InlineData(17, 42, ...
1f9bb29b-7827-42f9-a356-2db9513251c0
{ "language": "C#" }
```c# using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using FluentNHibernate.Mapping; using UCDArch.Core.DomainModel; namespace Commencement.Core.Domain { public class Template : DomainObject { public Template(string bodyText, TemplateType templateType, Ceremony...
```c# using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using FluentNHibernate.Mapping; using UCDArch.Core.DomainModel; namespace Commencement.Core.Domain { public class Template : DomainObject { public Template(string bodyText, TemplateType templateType, Ceremony...
71177b20-e3c2-486b-b22b-c6ab269b475e
{ "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; namespace osu.Game.Tests.NonVisual { [TestFixture] public class BeatmapSetInfoEqualityTest { [T...
```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.Extensions; namespace osu.Game.Tests.NonVisual { [TestFixture] public class BeatmapSetInfoEq...
1c1dc22e-8b4f-429b-a500-4532d1fd496f
{ "language": "C#" }
```c# using System.IO; using System.Runtime.CompilerServices; using Assent; namespace ExpressionToCodeTest { static class ApprovalTest { public static void Verify(string text, [CallerFilePath] string filepath = null, [CallerMemberName] string membername = null) { var filen...
```c# using System.IO; using System.Runtime.CompilerServices; using Assent; namespace ExpressionToCodeTest { static class ApprovalTest { public static void Verify(string text, [CallerFilePath] string filepath = null, [CallerMemberName] string membername = null) { var filen...
7d34a09b-bea9-4be2-a106-0b516b63ebe9
{ "language": "C#" }
```c# using System; using System.Linq; using NUnit.Framework; namespace Faker.Tests { [TestFixture] public class RandomNumberFixture { [TestCase(1, "Coin flip")] // 0 ... 1 Coin flip [TestCase(6, "6 sided die")] // 0 .. 6 [TestCase(9, "Random single digit")] // 0 ... 9 [Tes...
```c# using System; using System.Linq; using NUnit.Framework; namespace Faker.Tests { [TestFixture] public class RandomNumberFixture { [TestCase(1, "Coin flip")] // 0 ... 1 Coin flip [TestCase(6, "6 sided die")] // 0 .. 6 [TestCase(9, "Random single digit")] // 0 ... 9 [Tes...
537e9251-de46-4fb2-9f3f-dacdf8c9e5f5
{ "language": "C#" }
```c# using System; namespace Rooijakkers.MeditationTimer.Data { /// <summary> /// Stores settings data in local settings storage /// </summary> public class Settings { private const string TIME_TO_GET_READY_IN_SECONDS_STORAGE = "TimeToGetReadyStorage"; public TimeSpan TimeToGetRe...
```c# using System; namespace Rooijakkers.MeditationTimer.Data { /// <summary> /// Stores settings data in local settings storage /// </summary> public class Settings { private const string TIME_TO_GET_READY_IN_SECONDS_STORAGE = "TimeToGetReadyStorage"; public TimeSpan TimeToGetRe...
c321a1a0-1f87-4260-83b4-cc705dfc5465
{ "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. #nullable enable using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using osu.Game.Online.API; namespace osu.Game.Onl...
```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. #nullable enable using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using osu.Game.Online.API; namespace osu.Game.Onl...
7305c439-2bd3-4512-b58f-99ab9336b3eb
{ "language": "C#" }
```c# <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Calendar Proxy</title> <link href="~/Content/iCalStyles.min.css" rel="stylesheet" /> <link href="~/Content/timer.min.css" rel="stylesheet" /> ...
```c# <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Calendar Proxy</title> <link href="~/Content/bootstrap.min.css" rel="stylesheet" /> <link href="~/Content/iCalStyles.min.css" rel="stylesheet" ...
61dee76e-2722-4968-8c4b-32d146cd26b9
{ "language": "C#" }
```c# namespace OmniSharp.Rename { public class ModifiedFileResponse { public ModifiedFileResponse() {} public ModifiedFileResponse(string fileName, string buffer) { this.FileName = fileName; this.Buffer = buffer; } public string FileName { get; set; } ...
```c# using OmniSharp.Solution; namespace OmniSharp.Rename { public class ModifiedFileResponse { private string _fileName; public ModifiedFileResponse() {} public ModifiedFileResponse(string fileName, string buffer) { this.FileName = fileName; this.Buffer = buf...
72f5023c-9d58-4840-bf3b-3ff4f24511f8
{ "language": "C#" }
```c# namespace Gu.Units.Tests { using NUnit.Framework; public class UnitParserTests { [TestCase("1m", 1)] [TestCase("-1m", -1)] [TestCase("1e3m", 1e3)] [TestCase("1e+3m", 1e+3)] [TestCase("-1e+3m", -1e+3)] [TestCase("1e-3m", 1e-3)] [TestCase("-1e-3m...
```c# namespace Gu.Units.Tests { using NUnit.Framework; public class UnitParserTests { [TestCase("1m", 1)] [TestCase("-1m", 1)] [TestCase("1e3m", 1e3)] [TestCase("1e+3m", 1e+3)] [TestCase("1e-3m", 1e-3)] [TestCase(" 1m", 1)] [TestCase("1 m", 1)] ...
f90ff336-c4fd-47d8-a5d7-74167d6fe1fe
{ "language": "C#" }
```c# using System.Reflection; #if XAMMAC [assembly: AssemblyTitle("Eto.Forms - OS X Platform using Xamarin.Mac")] [assembly: AssemblyDescription("OS X Platform for the Eto.Forms UI Framework using Xamarin.Mac")] #else [assembly: AssemblyTitle("Eto.Forms - OS X Platform using MonoMac")] [assembly: AssemblyDescription(...
```c# using System.Reflection; #if XAMMAC [assembly: AssemblyTitle("Eto.Forms - Xamarin.Mac Platform")] [assembly: AssemblyDescription("OS X Platform for the Eto.Forms UI Framework using Xamarin.Mac")] #elif Mac64 [assembly: AssemblyTitle("Eto.Forms - MonoMac Platform")] [assembly: AssemblyDescription("OS X Platform f...
f58b19fa-b36a-4500-b0da-b00992f494c8
{ "language": "C#" }
```c# @using Microsoft.AspNetCore.Identity @using mvc_individual_authentication.Models @inject SignInManager<ApplicationUser> SignInManager @inject UserManager<ApplicationUser> UserManager @if (SignInManager.IsSignedIn(User)) { <form asp-area="" asp-controller="Account" asp-action="Logout" method="post" i...
```c# @using Microsoft.AspNetCore.Identity @using mvc_individual_authentication.Models @inject SignInManager<ApplicationUser> SignInManager @inject UserManager<ApplicationUser> UserManager @if (SignInManager.IsSignedIn(User)) { <form asp-area="" asp-controller="Account" asp-action="Logout" method="post" c...
31478ddf-9e4b-4139-8b2f-f2eecbae5258
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. using System; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Microsoft.DirectX")] [assembly: Assembl...
```c# using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. using System; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Microsoft.DirectX")] [assembly: Assembl...
9055314f-b33c-4395-819d-8eb861505a0c
{ "language": "C#" }
```c# // Copyright 2013 J.C. Moyer // // 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
```c# // Copyright 2013 J.C. Moyer // // 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
415ace16-71fe-4093-b256-e0ebc096ec6d
{ "language": "C#" }
```c# using System; Console.WriteLine("Hello World!"); ``` Add a bunch of junk you might find in a top-level program
```c# using System; using System.Linq.Expressions; using ExpressionToCodeLib; const int SomeConst = 27; var myVariable = "implicitly closed over"; var withImplicitType = new { A = "ImplicitTypeMember", }; Console.WriteLine(ExpressionToCode.ToCode(() => myVariable)); new InnerClass().DoIt(); LocalFuncti...
ae1c2e0c-71d8-4076-8347-f847444c9d6b
{ "language": "C#" }
```c# using System.Threading.Tasks; using Moq; using NUnit.Framework; using Ploeh.AutoFixture.NUnit3; using SlackConnector.Connections; using SlackConnector.Connections.Clients.Channel; using SlackConnector.Connections.Models; using SlackConnector.Connections.Sockets; using SlackConnector.Connections.Sockets.Messages....
```c# using System.Threading.Tasks; using Moq; using NUnit.Framework; using Ploeh.AutoFixture.NUnit3; using SlackConnector.Connections; using SlackConnector.Connections.Sockets; using SlackConnector.Connections.Sockets.Messages.Outbound; using SlackConnector.Models; namespace SlackConnector.Tests.Unit.SlackConnection...
1544fb32-ce2f-4582-a5a8-ba2fa5af83e9
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Threading.Tasks; using Smooth.IoC.Dapper.Repository.UnitOfWork.Data; namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Repo { public interface IRepository<TEntity, TPk> where TEntity : class { TEntity GetKey(TPk key, ISession session); ...
```c# using System.Collections.Generic; using System.Threading.Tasks; using Smooth.IoC.Dapper.Repository.UnitOfWork.Data; namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Repo { public interface IRepository<TEntity, TPk> where TEntity : class { TEntity GetKey(TPk key, ISession session); ...
9253dd5c-7dda-46ca-87a3-f4e1b1d85f2a
{ "language": "C#" }
```c# namespace Glimpse.Core.Plugin.Assist { public static class FormattingKeywords { public const string Error = "error"; public const string Fail = "fail"; public const string Info = "info"; public const string Loading = "loading"; public const string Ms = "ms"; ...
```c# namespace Glimpse.Core.Plugin.Assist { public static class FormattingKeywords { public const string Error = "error"; public const string Fail = "fail"; public const string Info = "info"; public const string Loading = "loading"; public const string Ms = "ms"; ...
e397dd34-b817-49e5-8b9e-b802348c8a75
{ "language": "C#" }
```c# using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.IdentityModel.Protocols; using Microsoft.IdentityModel.Protocols.OpenIdConnect; namespace Auth0.AuthenticationApi { internal class OpenIdConfigurationCac...
```c# using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.IdentityModel.Protocols; using Microsoft.IdentityModel.Protocols.OpenIdConnect; namespace Auth0.AuthenticationApi { internal class OpenIdConfigurationCac...
b8f24033-8e89-45dd-8d81-0685563a192c
{ "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; using System.Collections.Generic; using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Shapes; using osu.Framework.Scree...
```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 System.Collections.Generic; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.S...
512356a8-284f-4de9-a721-03e58ba571f2
{ "language": "C#" }
```c# using System.Collections; using JetBrains.Annotations; using UnityEngine; namespace HarryPotterUnity.Utils { public class StaticCoroutine : MonoBehaviour { private static StaticCoroutine _mInstance; private static StaticCoroutine Instance { get { ...
```c# using System.Collections; using JetBrains.Annotations; using UnityEngine; namespace HarryPotterUnity.Utils { public class StaticCoroutine : MonoBehaviour { private static StaticCoroutine _mInstance; private static StaticCoroutine Instance { get { ...
a78fe0ab-7083-43ff-8434-a4ea78acf807
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; namespace System.Reflection.Metadata { public static clas...
```c# // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; namespace System.Reflection.Metadata { public static clas...
c627020f-2ee6-4818-8b21-a501145b864c
{ "language": "C#" }
```c# using System; using Xunit; namespace FromString.Tests { public class ParsedTTests { [Fact] public void CanParseAnInt() { var parsedInt = new Parsed<int>("123"); Assert.True(parsedInt.HasValue); Assert.Equal(123, parsedInt.Value); } ...
```c# using System; using Xunit; namespace FromString.Tests { public class ParsedTTests { [Fact] public void CanParseAnInt() { var parsedInt = new Parsed<int>("123"); Assert.True(parsedInt.HasValue); Assert.Equal(123, parsedInt.Value); } ...
9a355652-8ddc-4691-a751-234cf8bc5685
{ "language": "C#" }
```c# using BenchmarkDotNet.Configs; using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Running; using SwissArmyKnife.Benchmarks.Benches.Extensions; using System; using BenchmarkDotNet.Diagnosers; using BenchmarkDotNet.Toolchains.CsProj; namespace SwissArmyKnife.Benchmarks { class Program { private sta...
```c# using BenchmarkDotNet.Configs; using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Running; using SwissArmyKnife.Benchmarks.Benches.Extensions; using System; using BenchmarkDotNet.Diagnosers; using BenchmarkDotNet.Toolchains.CsProj; namespace SwissArmyKnife.Benchmarks { class Program { private sta...
c0754fce-55cd-4256-acf8-fdf8622310b6
{ "language": "C#" }
```c# using System; using BudgetAnalyser.Engine.Annotations; namespace BudgetAnalyser.Engine.Widgets { public sealed class BudgetBucketMonitorWidget : RemainingBudgetBucketWidget, IUserDefinedWidget { private readonly string disabledToolTip; private string doNotUseId; public...
```c# using System; using BudgetAnalyser.Engine.Annotations; namespace BudgetAnalyser.Engine.Widgets { public sealed class BudgetBucketMonitorWidget : RemainingBudgetBucketWidget, IUserDefinedWidget { private readonly string disabledToolTip; private string doNotUseId; public...
185e737f-cb92-4342-96b0-e04507ed1822
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using TicTacToe.Core; using TicTacToe.Web.Data; using TicTacToe.Web.ViewModels; namespace TicTacToe.Controllers { public class GameController : Controller { private ApplicationDbContext con...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using TicTacToe.Core; using TicTacToe.Web.Data; using TicTacToe.Web.ViewModels; namespace TicTacToe.Controllers { public class GameController : Controller { private ApplicationDbContext con...
0c16e57a-15a8-4532-934e-2c5f401d4500
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Text; using Xunit; namespace Autofac.Test.Features.OpenGenerics { public class OpenGenericDelegateTests { private interface IInterfaceA<T> { } private class ImplementationA<T> : IInterfaceA<T> { ...
```c# using System; using System.Collections.Generic; using System.Text; using Autofac.Core; using Autofac.Core.Registration; using Xunit; namespace Autofac.Test.Features.OpenGenerics { public class OpenGenericDelegateTests { private interface IInterfaceA<T> { } private interf...
e4513202-9fc4-436a-b7b7-f432d5b5cab1
{ "language": "C#" }
```c# namespace AgileObjects.AgileMapper.UnitTests.SimpleTypeConversion { using System; using TestClasses; using Xunit; public class WhenMappingToDateTimes { [Fact] public void ShouldMapANullableDateTimeToADateTime() { var source = new PublicProperty<DateTime?> ...
```c# namespace AgileObjects.AgileMapper.UnitTests.SimpleTypeConversion { using System; using Shouldly; using TestClasses; using Xunit; public class WhenMappingToDateTimes { [Fact] public void ShouldMapANullableDateTimeToADateTime() { var source = new Public...
941a9e14-7590-4d60-a4c4-5381d9d04432
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using WalletWasabi.Bases; using WalletWasabi.Coins; namespace WalletWasabi.BlockchainAnalysis { public class Cluster : NotifyPropertyChangedBase { private List<SmartCoin> Coins { get; set; } private string _labels; public Cluster(params...
```c# using System; using System.Collections.Generic; using System.Linq; using WalletWasabi.Bases; using WalletWasabi.Coins; namespace WalletWasabi.BlockchainAnalysis { public class Cluster : NotifyPropertyChangedBase { private List<SmartCoin> Coins { get; set; } private string _labels; public Cluster(params...
95a1f45c-bba4-44cf-a11f-293b6e6fb77d
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.Models.Question; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api/question")] public class QuestionsController : Controller { private readonly IQuestionRepos...
```c# using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.Models.Question; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api/question")] public class QuestionsController : Controller { private readonly IQuestionRepos...
c31ea9bf-d0f7-43c2-bc01-2a1ef5e49b62
{ "language": "C#" }
```c# // Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace NOpenCL.Test { internal static class TestCategories { public const string RequireGpu = nameof(RequireGpu); } ...
```c# // Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace NOpenCL.Test { internal static class TestCategories { public const string RequireGpu = nameof(RequireGpu); } ...
baef018b-15c5-4e7d-8cec-73d95b4c93d2
{ "language": "C#" }
```c# using System.Threading.Tasks; using Windows.ApplicationModel.Activation; namespace Sample { sealed partial class App : Template10.Common.BootStrapper { public App() { InitializeComponent(); } public override async Task OnStartAsync(StartKind startKind, IActiva...
```c# using System.Threading.Tasks; using Windows.ApplicationModel.Activation; namespace Sample { sealed partial class App : Template10.Common.BootStrapper { public App() { InitializeComponent(); } public override Task OnStartAsync(StartKind startKind, IActivatedEve...
4bc85fce-a030-4083-9d34-661453b7dcf9
{ "language": "C#" }
```c# @page "{id}" @model SessionModel <ol class="breadcrumb"> <li><a asp-page="/Index">Agenda</a></li> <li><a asp-page="/Index" asp-route-day="@Model.DayOffset">Day @(Model.DayOffset + 1)</a></li> <li class="active">@Model.Session.Title</li> </ol> <h1>@Model.Session.Title</h1> <span class="label label-de...
```c# @page "{id}" @model SessionModel <ol class="breadcrumb"> <li><a asp-page="/Index">Agenda</a></li> <li><a asp-page="/Index" asp-route-day="@Model.DayOffset">Day @(Model.DayOffset + 1)</a></li> <li class="active">@Model.Session.Title</li> </ol> <h1>@Model.Session.Title</h1> <span class="label label-de...
8b38aee1-5407-4c86-b5aa-034468b9ae64
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using Affecto.IdentityManagement.ApplicationServices.Model; using Affecto.IdentityManagement.Interfaces.Model; using Affecto.Mapping.AutoMapper; using AutoMapper; namespace Affecto.IdentityManagement.ApplicationServices.Mapping { internal cl...
```c# using System.Collections.Generic; using System.Linq; using Affecto.IdentityManagement.ApplicationServices.Model; using Affecto.Mapping.AutoMapper; using AutoMapper; namespace Affecto.IdentityManagement.ApplicationServices.Mapping { internal class RoleMapper : OneWayMapper<Querying.Data.Role, Role> { ...
8423388d-d462-4298-ac4a-63c592f65df9
{ "language": "C#" }
```c# using System; using Autofac; namespace AGS.Engine.IOS { public class AGSEngineIOS { private static IOSAssemblies _assembly; public static void Init() { OpenTK.Toolkit.Init(); var device = new IOSDevice(_assembly); AGSGame.Device = device; ...
```c# using System; using Autofac; namespace AGS.Engine.IOS { public class AGSEngineIOS { private static IOSAssemblies _assembly; public static void Init() { // On IOS, when the mono linker is enabled (and it's enabled by default) it strips out all parts of // ...
993c09ba-f4bd-4d87-9aec-bfcd46a2c841
{ "language": "C#" }
```c# using System; using System.IO; using Newtonsoft.Json; namespace Scanner { using System.Collections.Generic; public class BackingStore { private string backingStoreName; public BackingStore(string backingStoreName) { this.backingStoreName = backingStoreName; ...
```c# using System; using System.IO; using Newtonsoft.Json; namespace Scanner { using System.Collections.Generic; public class BackingStore { private string backingStoreName; public BackingStore(string backingStoreName) { this.backingStoreName = backingStoreName; ...
e9663a3c-9cb8-4979-8634-eafd52c08304
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using HarryPotterUnity.Tween; using HarryPotterUnity.Utils; using JetBrains.Annotations; using UnityEngine; namespace HarryPotterUnity.Cards.Generic { public abstract class GenericSpell : GenericCard { private static readonly Vector3 Spell...
```c# using System.Collections; using System.Collections.Generic; using HarryPotterUnity.Tween; using HarryPotterUnity.Utils; using JetBrains.Annotations; using UnityEngine; namespace HarryPotterUnity.Cards.Generic { public abstract class GenericSpell : GenericCard { private static readonly Vector3 Spell...
a9ad0e7d-98ed-4629-aa20-c05fda81ff7e
{ "language": "C#" }
```c# using Microsoft.Azure.ServiceBus; using System; using System.Collections.Generic; using QueueMessage = Storage.Net.Messaging.QueueMessage; namespace Storage.Net.Microsoft.Azure.ServiceBus { static class Converter { public static Message ToMessage(QueueMessage message) { if(message == ...
```c# using Microsoft.Azure.ServiceBus; using System; using System.Collections.Generic; using QueueMessage = Storage.Net.Messaging.QueueMessage; namespace Storage.Net.Microsoft.Azure.ServiceBus { static class Converter { public static Message ToMessage(QueueMessage message) { if(message == ...
c557a60f-6982-449e-940a-9705535d60c8
{ "language": "C#" }
```c# using System; using System.Threading.Tasks; using Discord; using Discord.Commands; using Microsoft.Extensions.DependencyInjection; using MongoDB.Driver; using NoAdsHere.Database; using NoAdsHere.Database.Models.GuildSettings; using NoAdsHere.Common; using NoAdsHere.Common.Preconditions; using NoAdsHere.Services.A...
```c# using System.Threading.Tasks; using Discord.Commands; using NoAdsHere.Common; using NoAdsHere.Common.Preconditions; using NoAdsHere.Services.AntiAds; namespace NoAdsHere.Commands.Blocks { [Name("Blocks"), Group("Blocks")] public class BlockModule : ModuleBase { [Command("Invite")] [Re...
f3e4d044-a434-42ec-9e47-8d4a039e10f0
{ "language": "C#" }
```c# using System; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using ClientSamples.CachingTools; namespace Tavis.PrivateCache { public class CacheEntry { public PrimaryCacheKey Key { get; private set; } public HttpHeaderValueCollection<string> VaryHeaders { get; p...
```c# using System; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Text; using ClientSamples.CachingTools; namespace Tavis.PrivateCache { public class CacheEntry { public PrimaryCacheKey Key { get; private set; } public HttpHeaderValueCollection<string> Va...
edcc069a-2d49-44e2-9794-a489ed23d6ab
{ "language": "C#" }
```c# using NBi.Core.Evaluate; using NBi.Core.ResultSet; using NBi.Core.Transformation; using NBi.Xml.Variables; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; namespace NBi.Xml.Items.Calc...
```c# using NBi.Core.Evaluate; using NBi.Core.ResultSet; using NBi.Core.Transformation; using NBi.Xml.Variables; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; namespace NBi.Xml.Items.Calc...
0f7565e2-cec4-4641-a4ff-ecd28715977c
{ "language": "C#" }
```c# // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Builder; using Microsoft.Framework.DependencyInjection; namespace TagHelpersWebSite { public class S...
```c# // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Builder; using Microsoft.Framework.DependencyInjection; namespace TagHelpersWebSite { public class S...
236a7e86-8505-43bc-b9da-06eca7acec71
{ "language": "C#" }
```c# using System; using System.IO; using System.Reflection; using System.Windows.Forms; namespace VigilantCupcake.SubForms { partial class AboutBox : Form { public AboutBox() { InitializeComponent(); Text = $"About {AssemblyTitle}"; labelProductName.Text = AssemblyT...
```c# using System; using System.IO; using System.Reflection; using System.Windows.Forms; namespace VigilantCupcake.SubForms { partial class AboutBox : Form { public AboutBox() { InitializeComponent(); Text = $"About {AssemblyTitle}"; labelProductName.Text = AssemblyT...
78d57e4c-f02f-4fc2-bf98-a4606f33a267
{ "language": "C#" }
```c# using System; using System.IO; using System.Reflection; using System.Windows.Forms; namespace VigilantCupcake.SubForms { partial class AboutBox : Form { public AboutBox() { InitializeComponent(); Text = $"About {AssemblyTitle}"; labelProductName.Text = AssemblyT...
```c# using System; using System.IO; using System.Reflection; using System.Windows.Forms; namespace VigilantCupcake.SubForms { partial class AboutBox : Form { public AboutBox() { InitializeComponent(); Text = $"About {AssemblyTitle}"; labelProductName.Text = AssemblyT...
bab609a5-e62d-420c-b9ef-59fc2ab4dc30
{ "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...
90445758-cedd-4323-ba86-849cf73b18f0
{ "language": "C#" }
```c# // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using System; using Newtonsoft.Json; namespace osu.Framework.IO.Network { /// <summary> /// A web request with a specific JSON response...
```c# // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using System; using System.Net; using Newtonsoft.Json; namespace osu.Framework.IO.Network { /// <summary> /// A web request with a spe...
af825548-ec55-4af7-9e60-39463c74abcd
{ "language": "C#" }
```c# using Microsoft.Owin; using Owin; [assembly: OwinStartup(typeof(SFA.DAS.EmployerUsers.Api.Startup))] namespace SFA.DAS.EmployerUsers.Api { public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); } } }``` Add TLS change to ...
```c# using System.Net; using Microsoft.Owin; using Owin; [assembly: OwinStartup(typeof(SFA.DAS.EmployerUsers.Api.Startup))] namespace SFA.DAS.EmployerUsers.Api { public partial class Startup { public void Configuration(IAppBuilder app) { ServicePointManager.SecurityProtocol |= Se...
b7d2cf95-3e4b-4a05-85fe-9c4346b614d8
{ "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...
688ecbc5-616e-45a3-9eb9-3c46e99f695c
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Http; using Obsidian.Domain; using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Http.Authentication; using Obsidian.Application.OAuth20; namespace Obsidian.Services { public clas...
```c# using Microsoft.AspNetCore.Http; using Obsidian.Domain; using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Http.Authentication; using Obsidian.Application.OAuth20; namespace Obsidian.Services { public clas...
27fc47c5-c972-4e87-a9a4-16d9a3d66440
{ "language": "C#" }
```c# #region Copyright and license // // <copyright file="AlwaysTests.cs" company="Oliver Zick"> // // Copyright (c) 2016 Oliver Zick. All rights reserved. // // </copyright> // // <author>Oliver Zick</author> // // <license> // // Licensed under the Apache License, Version 2.0 (the "License"); // // you ...
```c# #region Copyright and license // // <copyright file="AlwaysTests.cs" company="Oliver Zick"> // // Copyright (c) 2016 Oliver Zick. All rights reserved. // // </copyright> // // <author>Oliver Zick</author> // // <license> // // Licensed under the Apache License, Version 2.0 (the "License"); // // you ...
6f44a965-edd4-4ab3-a98e-c73b0cc969ed
{ "language": "C#" }
```c# using NUnit.Framework; [assembly: Category("IntegrationTest")] [assembly: Parallelizable(ParallelScope.Fixtures)] [assembly: LevelOfParallelism(32)]``` Reduce concurrency (not eliminate) in integration tests so that starting up a test suite run doesn't soak up all the threads in our thread pool.
```c# using NUnit.Framework; [assembly: Category("IntegrationTest")] [assembly: Parallelizable(ParallelScope.Fixtures)] [assembly: LevelOfParallelism(2)]```
a4311705-5830-419b-9c02-3a336c86baa8
{ "language": "C#" }
```c# void DownloadAudienceNetwork (Artifact artifact) { var podSpec = artifact.PodSpecs [0]; var id = podSpec.Name; var version = podSpec.Version; var url = $"https://origincache.facebook.com/developers/resources/?id={id}-{version}.zip"; var basePath = $"./externals/{id}"; DownloadFile (url, $"{basePath}.zip", n...
```c# void DownloadAudienceNetwork (Artifact artifact) { var podSpec = artifact.PodSpecs [0]; var id = podSpec.Name; var version = podSpec.Version; var url = $"https://developers.facebook.com/resources/{id}-{version}.zip"; var basePath = $"./externals/{id}"; DownloadFile (url, $"{basePath}.zip", new Cake.Xamarin....
355782b3-128f-4abd-b5f7-8030603e6ade
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using NuGet.Packaging; namespace PackageExplorerViewModel.Utilities { public class TemporaryFile : IDisposable { public TemporaryFile(Stream stream, string extensi...
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using NuGet.Packaging; namespace PackageExplorerViewModel.Utilities { public class TemporaryFile : IDisposable { public TemporaryFile(Stream stream, string extensi...
fc38bde7-d0e7-4e96-a342-3cbcfdb580e6
{ "language": "C#" }
```c# using System.Threading; using System.Threading.Tasks; using Console = System.Console; namespace ConsoleWritePrettyOneDay.App { class Program { static void Main(string[] args) { Spinner.Wait(() => Thread.Sleep(5000), "waiting for sleep"); var task = Ta...
```c# using System.Threading; using System.Threading.Tasks; using Console = System.Console; namespace ConsoleWritePrettyOneDay.App { class Program { static void Main(string[] args) { Spinner.Wait(() => Thread.Sleep(5000), "waiting for sleep"); var task = Ta...
9dab8f34-4524-49b8-a56e-3c1de550ce8d
{ "language": "C#" }
```c# using System.Windows; namespace twitch_tv_viewer.Views { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Edit_Click(objec...
```c# using System.Windows; using System.Windows.Input; namespace twitch_tv_viewer.Views { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } p...
6abb97e9-3d49-4f21-9b2d-538223c956d2
{ "language": "C#" }
```c# using System; namespace uSync8.Core.Dependency { [Flags] public enum DependencyFlags { None = 0, IncludeChildren = 2, IncludeAncestors = 4, IncludeDependencies = 8, IncludeViews = 16, IncludeMedia = 32, IncludeLinked = 64, IncludeMediaF...
```c# using System; namespace uSync8.Core.Dependency { [Flags] public enum DependencyFlags { None = 0, IncludeChildren = 2, IncludeAncestors = 4, IncludeDependencies = 8, IncludeViews = 16, IncludeMedia = 32, IncludeLinked = 64, IncludeMediaF...
9f6664e8-cdca-4aff-895c-751974936532
{ "language": "C#" }
```c# using BmpListener.Extensions; using System; using System.Linq; namespace BmpListener.Bgp { public class CapabilityMultiProtocol : Capability { public CapabilityMultiProtocol(ArraySegment<byte> data) : base(data) { var afi = data.ToInt16(2); var safi = data.Element...
```c# using System; namespace BmpListener.Bgp { public class CapabilityMultiProtocol : Capability { public CapabilityMultiProtocol(ArraySegment<byte> data) : base(data) { Decode(CapabilityValue); } public AddressFamily Afi { get; set; } public SubsequentAdd...
a599d2e4-87eb-496f-9220-9b1e8ff9d04b
{ "language": "C#" }
```c# using System; namespace Mammoth.Couscous.java.net { internal class URI { private readonly Uri _uri; internal URI(string uri) { try { _uri = new Uri(uri, UriKind.RelativeOrAbsolute); } catch (UriFormatException exception) { throw...
```c# using System; namespace Mammoth.Couscous.java.net { internal class URI { private readonly Uri _uri; internal URI(string uri) { try { _uri = new Uri(uri, UriKind.RelativeOrAbsolute); } catch (UriFormatException exception) { throw...
0ac085ee-43d1-4c46-8b79-2b3219bc95a1
{ "language": "C#" }
```c# // Copyright (c) the authors of nanoGames. All rights reserved. // Licensed under the MIT license. See LICENSE.txt in the project root. using NanoGames.Engine; using System.Collections.Generic; using System.Diagnostics; namespace NanoGames.Application { /// <summary> /// A view that measures and draws ...
```c# // Copyright (c) the authors of nanoGames. All rights reserved. // Licensed under the MIT license. See LICENSE.txt in the project root. using NanoGames.Engine; using System.Collections.Generic; using System.Diagnostics; namespace NanoGames.Application { /// <summary> /// A view that measures and draws ...
69d3a5e8-8593-4fb5-802a-d93b1bd77e88
{ "language": "C#" }
```c# public static class AssemblyLine { private const int ProductionRatePerHourForDefaultSpeed = 221; public static double ProductionRatePerHour(int speed) => ProductionRatePerHourForSpeed(speed) * SuccessRate(speed); private static int ProductionRatePerHourForSpeed(int speed) => Producti...
```c# public static class AssemblyLine { private const int ProductionRatePerHourForDefaultSpeed = 221; public static double ProductionRatePerHour(int speed) => ProductionRatePerHourForSpeed(speed) * SuccessRate(speed); private static int ProductionRatePerHourForSpeed(int speed) => Producti...
9928ea38-77ba-4009-8e8d-6b37164de090
{ "language": "C#" }
```c# using System; using System.Net; namespace PackageExplorerViewModel.Types { public interface ICredentialManager { void TryAddUriCredentials(Uri feedUri); void Add(ICredentials credentials, Uri feedUri); ICredentials GetForUri(Uri uri); } } ``` Remove unused method from inte...
```c# using System; using System.Net; namespace PackageExplorerViewModel.Types { public interface ICredentialManager { void Add(ICredentials credentials, Uri feedUri); ICredentials GetForUri(Uri uri); } } ```
976df02c-fb5b-43f8-85cd-c8058ec0c754
{ "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.Allocation; using osu.Framework.Graphics; using osu.Game.Rulesets.Catch.Skinning.Default; using osu.Game.Rulesets.Objects.Pooling; using osu.Gam...
```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.Game.Rulesets.Catch.Skinning.Default; using osu.Game.Rulesets.Objects.Pooling; using osu.Gam...
e5aa65b1-cd5c-4da8-8ba8-04bf476f737a
{ "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; using osu.Framework.Input.Bindings; using osu.Game.Database; using Realms; namespace osu.Game.Input.Bindings { [MapTo(nameof(KeyBinding))] pu...
```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.Input.Bindings; using osu.Game.Database; using Realms; namespace osu.Game.Input.Bindings { [MapTo(nameof(KeyBinding))] pu...
3e2e42d0-eafd-43fd-a357-c90876929318
{ "language": "C#" }
```c# using UnityEngine; using System.Collections; using System; public class AnimateToPoint : MonoBehaviour { private SimpleTween tween; private Vector3 sourcePos; private Vector3 targetPos; private Action onComplete; private float timeScale; private float timer; public void Trigger(SimpleTween tween, Vector...
```c# using UnityEngine; using System.Collections; using System; public class AnimateToPoint : MonoBehaviour { private SimpleTween tween; private Vector3 sourcePos; private Vector3 targetPos; private Action onComplete; private float timeScale; private float timer; public void Trigger(SimpleTween tween, Vector...
7d2f3b67-6d2d-4712-8270-42ac81189584
{ "language": "C#" }
```c# using UnityEngine; using System.Collections; public class AdminModeMessageWindow : MonoBehaviour { private const float WINDOW_WIDTH = 300; private const float WINDOW_HEIGHT = 120; private const float MESSAGE_HEIGHT = 60; private const float BUTTON_HEIGHT = 30; private const float BUTTON_WIDTH...
```c# using UnityEngine; using System.Collections; public class AdminModeMessageWindow : MonoBehaviour { private const float WINDOW_WIDTH = 300; private const float WINDOW_HEIGHT = 120; private const float MESSAGE_HEIGHT = 60; private const float BUTTON_HEIGHT = 30; private const float BUTTON_WIDTH...
28f614f3-ed55-4d26-88b9-53a4f1a2c71b
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Okanshi.Dashboard.Models; namespace Okanshi.Dashboard { public interface IGetMetrics { IEnumerable<Metric> Deserialize(string response); } public class GetMetrics : IGetMetrics { public IEnumerable<Metric> Deserialize(st...
```c# using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Okanshi.Dashboard.Models; namespace Okanshi.Dashboard { public interface IGetMetrics { IEnumerable<Metric> Deserialize(string response); } public class GetMetrics : IGetMetrics { ...
2b1e14f3-d2db-4a96-a9f4-95b944ed7653
{ "language": "C#" }
```c# using System.Reactive.Linq; using System.Threading.Tasks; using NSubstitute; using Xunit; using UnitTests; using GitHub.Models; using System; using GitHub.Services; using GitHub.ViewModels; public class PullRequestCreationViewModelTests : TempFileBaseClass { [Fact] public async Task NullDescriptionBecom...
```c# using System.Reactive.Linq; using System.Threading.Tasks; using NSubstitute; using Xunit; using UnitTests; using GitHub.Models; using System; using GitHub.Services; using GitHub.ViewModels; public class PullRequestCreationViewModelTests : TempFileBaseClass { [Fact] public async Task NullDescriptionBecom...
55c72fec-ca2f-4ffb-8163-6118f7499f1a
{ "language": "C#" }
```c# // ========================================================================== // SingleUrlsMiddleware.cs // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex Group // All rights reserved. // ============================================...
```c# // ========================================================================== // SingleUrlsMiddleware.cs // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex Group // All rights reserved. // ============================================...
94f73d13-0a75-4d5b-8667-ffc38059d368
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SceneJect.Common { public abstract class DepedencyInjectionFactoryService { /// <summary> /// Service for resolving dependencies. /// </summary> protected IResolver resolverService { get; } /// <summary>...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SceneJect.Common { public abstract class DepedencyInjectionFactoryService { /// <summary> /// Service for resolving dependencies. /// </summary> protected IResolver resolverService { get; } /// <summary>...
c72abe90-4ba2-414e-8142-374517d7a98b
{ "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.Runtime.CompilerServices; using ObjCRuntime; // We publish our internal attributes to other sub-projects of the framework. // Note, that we omit visu...
```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.Runtime.CompilerServices; using ObjCRuntime; // We publish our internal attributes to other sub-projects of the framework. // Note, that we omit visu...
00f97b99-fa21-4bcb-8e60-c8a33246ea49
{ "language": "C#" }
```c# using System; using System.Linq; using System.Reflection; using System.Threading.Tasks; namespace WootzJs.Mvc { public class ControllerActionInvoker : IActionInvoker { public Task<ActionResult> InvokeAction(ControllerContext context, MethodInfo action) { var parameters = acti...
```c# using System; using System.Linq; using System.Reflection; using System.Threading.Tasks; namespace WootzJs.Mvc { public class ControllerActionInvoker : IActionInvoker { public Task<ActionResult> InvokeAction(ControllerContext context, MethodInfo action) { var parameters = acti...
7189e818-61a2-4a90-b52f-39ecba3afb09
{ "language": "C#" }
```c# using FluentScheduler; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Logging; using System; namespace BatteryCommander.Web.Jobs { internal static class JobHandler { public static void WithScheduler(this IApplicationBuilder app, ILoggerFactory loggerFactory) { ...
```c# using FluentScheduler; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Logging; using System; namespace BatteryCommander.Web.Jobs { internal static class JobHandler { public static void WithScheduler(this IApplicationBuilder app, ILoggerFactory loggerFactory) { ...