doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
0c133d89-572b-4cc2-a750-f56dc6416454
{ "language": "C#" }
```c# //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18033 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-ge...
```c# //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18033 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-ge...
1ecb925f-2b73-4742-981e-2ad9796a8193
{ "language": "C#" }
```c# using System; namespace Hangman { public class Hangman { public static void Main(string[] args) { // char key = Console.ReadKey(true).KeyChar; // var game = new Game("HANG THE MAN"); // bool wasCorrect = game.GuessLetter(key); // Console.WriteLine(wasCorrect.ToString()); // ...
```c# using System; namespace Hangman { public class Hangman { public static void Main(string[] args) { // char key = Console.ReadKey(true).KeyChar; // var game = new Game("HANG THE MAN"); // bool wasCorrect = game.GuessLetter(key); // Console.WriteLine(wasCorrect.ToString()); // ...
b2d7ade0-c1ef-41fc-9cf7-fc67f16eacc1
{ "language": "C#" }
```c# using Peasy; using Peasy.Core; using Orders.com.BLL.DataProxy; namespace Orders.com.BLL.Services { public abstract class OrdersDotComServiceBase<T> : BusinessServiceBase<T, long> where T : IDomainObject<long>, new() { public OrdersDotComServiceBase(IOrdersDotComDataProxy<T> dataProxy) : base(dat...
```c# using Peasy; using Peasy.Core; using Orders.com.BLL.DataProxy; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace Orders.com.BLL.Services { public abstract class OrdersDotComServiceBase<T> : BusinessServiceBase<T, long> w...
bff35b55-46f0-4002-8e55-d51058e0e29e
{ "language": "C#" }
```c# // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Microsoft.DotNet.Archive; namespace RepoTasks { publ...
```c# // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Microsoft.DotNet.Archive; namespace RepoTasks { publ...
4c1a03f0-223f-4334-9ff8-3a19273e73ba
{ "language": "C#" }
```c# using System; using System.Diagnostics; using System.IO; namespace HolzShots.IO { public static class HolzShotsPaths { private static readonly string SystemAppDataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); private static readonly string UserPicturesD...
```c# using System; using System.Diagnostics; using System.IO; namespace HolzShots.IO { public static class HolzShotsPaths { private static readonly string SystemAppDataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); private static readonly string UserPicturesD...
b19affb0-dfea-42c2-8697-89b8f5d4d051
{ "language": "C#" }
```c# namespace Nancy.Extensions { using System; using System.Linq; /// <summary> /// Containing extensions for the <see cref="Request"/> object /// </summary> public static class RequestExtensions { /// <summary> /// An extension method making it easy to check i...
```c# namespace Nancy.Extensions { using System; using System.Linq; /// <summary> /// Containing extensions for the <see cref="Request"/> object /// </summary> public static class RequestExtensions { /// <summary> /// An extension method making it easy to check i...
e29cde0b-cb81-4dfd-aeab-4a2fde68e703
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Refit.Generator { class Program { static void Main(string[] args) { var generator = new InterfaceStubGenera...
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Refit.Generator { class Program { static void Main(string[] args) { // NB: @Compile passes us a list of fil...
72ac3d5a-1448-49b6-809c-45d5226668db
{ "language": "C#" }
```c# using System.Globalization; using Abp.Configuration.Startup; using Abp.Extensions; using Abp.Logging; namespace Abp.Localization { public static class LocalizationSourceHelper { public static string ReturnGivenNameOrThrowException(ILocalizationConfiguration configuration, string sourceName, stri...
```c# using System.Globalization; using Abp.Configuration.Startup; using Abp.Extensions; using Abp.Logging; namespace Abp.Localization { public static class LocalizationSourceHelper { public static string ReturnGivenNameOrThrowException(ILocalizationConfiguration configuration, string sourceName, stri...
347e6d3d-a0c3-4a55-8fa8-7ab2a4925928
{ "language": "C#" }
```c# using System; using AspNet.WebApi.HtmlMicrodataFormatter; namespace NuGet.Lucene.Web.Models { public class PackageVersionSummary { private readonly StrictSemanticVersion version; private readonly DateTimeOffset lastUpdated; private readonly int versionDownloadCount; privat...
```c# using System; using AspNet.WebApi.HtmlMicrodataFormatter; namespace NuGet.Lucene.Web.Models { public class PackageVersionSummary { private readonly string id; private readonly string title; private readonly StrictSemanticVersion version; private readonly DateTimeOffset las...
71d1e354-deef-4404-967a-ba3ddf6ca830
{ "language": "C#" }
```c# using System; using System.Linq; using System.IO; using System.IO.IsolatedStorage; using System.Collections.Generic; using Microsoft.LightSwitch; using Microsoft.LightSwitch.Framework.Client; using Microsoft.LightSwitch.Presentation; using Microsoft.LightSwitch.Presentation.Extensions; namespace LightSwitchAppl...
```c# using System; using System.Linq; using System.IO; using System.IO.IsolatedStorage; using System.Collections.Generic; using Microsoft.LightSwitch; using Microsoft.LightSwitch.Framework.Client; using Microsoft.LightSwitch.Presentation; using Microsoft.LightSwitch.Presentation.Extensions; namespace LightSwitchAppl...
f556edbb-1245-4385-8147-68b026461486
{ "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.Net.Http; using osu.Framework.IO.Network; using osu.Game.Online.API; namespace osu.Game.Online.Rooms { public class JoinRoomRequest : APIRequest ...
```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.Net.Http; using osu.Framework.IO.Network; using osu.Game.Online.API; namespace osu.Game.Online.Rooms { public class JoinRoomRequest : APIRequest ...
1ccb03c0-d9f9-472d-b622-eab8f78a4faf
{ "language": "C#" }
```c# using DynamicData; using DynamicData.Aggregation; using ReactiveUI; using Sakuno.ING.Game.Models; using System.Collections.Generic; using System.Linq; using System.Reactive.Linq; namespace Sakuno.ING.ViewModels.Homeport { public sealed class FleetViewModel : ReactiveObject, IHomeportTabViewModel { ...
```c# using DynamicData; using DynamicData.Aggregation; using DynamicData.Binding; using ReactiveUI; using Sakuno.ING.Game.Models; using System.Collections.Generic; using System.Linq; using System.Reactive.Linq; namespace Sakuno.ING.ViewModels.Homeport { public sealed class FleetViewModel : ReactiveObject, IHomep...
da30d59d-137d-482e-8c3b-4cb209af3deb
{ "language": "C#" }
```c# @model RedFolder.Podcast.Models.PodcastMetrics <div class="podcast-metrics"> <div> <h3 class="title">Number of episodes</h3> <p class="metric"> @Model.NumberOfEpisodes </p> </div> <div> <h3 class="title">Total duration</h3> <p class="metric"> ...
```c# @model RedFolder.Podcast.Models.PodcastMetrics <div class="podcast-metrics"> <div> <h3 class="title">Number of episodes</h3> <p class="metric"> @Model.NumberOfEpisodes </p> </div> <div> <h3 class="title">Total duration</h3> <p class="metric"> ...
8ea6f048-cacf-462d-b28d-c2ccbca94167
{ "language": "C#" }
```c# using System.Linq; namespace CmsEngine.Extensions { public static class ObjectExtensions { public static object MapTo(this object source, object target) { foreach (var sourceProp in source.GetType().GetProperties()) { var targetProp = target.GetTyp...
```c# using System.Linq; namespace CmsEngine.Extensions { public static class ObjectExtensions { public static object MapTo(this object source, object target) { foreach (var sourceProp in source.GetType().GetProperties()) { var targetProp = target.GetTyp...
cc72b3a2-d767-4dd2-b103-df51d2c57c89
{ "language": "C#" }
```c# using MbDotNet.Models.Stubs; using Newtonsoft.Json; using System.Collections.Generic; namespace MbDotNet.Models.Imposters { public class HttpsImposter : Imposter { [JsonProperty("stubs")] public ICollection<HttpStub> Stubs { get; private set; } // TODO Need to not inclu...
```c# using MbDotNet.Models.Stubs; using Newtonsoft.Json; using System.Collections.Generic; namespace MbDotNet.Models.Imposters { public class HttpsImposter : Imposter { [JsonProperty("stubs")] public ICollection<HttpStub> Stubs { get; private set; } // TODO This won't serial...
4a90a8f7-ffd8-4c08-8b17-fd721bef4504
{ "language": "C#" }
```c# using System; using System.Linq; using System.Windows.Forms; namespace Palaso.UI.WindowsForms.Miscellaneous { /// ---------------------------------------------------------------------------------------- public class WaitCursor { /// --------------------------------------------------------------------------...
```c# using System; using System.Linq; using System.Windows.Forms; namespace Palaso.UI.WindowsForms.Miscellaneous { /// ---------------------------------------------------------------------------------------- public class WaitCursor { /// --------------------------------------------------------------------------...
e0c4655e-aa99-4440-8a4d-0292fa34c12e
{ "language": "C#" }
```c# using System.Diagnostics; namespace Renci.SshNet.Abstractions { internal static class DiagnosticAbstraction { #if FEATURE_DIAGNOSTICS_TRACESOURCE private static readonly SourceSwitch SourceSwitch = new SourceSwitch("SshNetSwitch"); public static bool IsEnabled(TraceEventType traceEvent...
```c# using System.Diagnostics; using System.Threading; namespace Renci.SshNet.Abstractions { internal static class DiagnosticAbstraction { #if FEATURE_DIAGNOSTICS_TRACESOURCE private static readonly SourceSwitch SourceSwitch = new SourceSwitch("SshNetSwitch"); public static bool IsEnabled(T...
c6d3508f-ad0c-446f-947e-a13230c6e1a6
{ "language": "C#" }
```c# @{ Layout = "default"; Title = "Module"; } <div class="row"> <div class="span1"></div> <div class="span10" id="main"> <h1>@Model.Module.Name</h1> <div class="xmldoc"> @Model.Module.Comment.FullText </div> @if (Model.Module.NestedTypes.Length > 0) { <div> <table class="t...
```c# @{ Layout = "default"; Title = "Module"; } <div class="row"> <div class="span1"></div> <div class="span10" id="main"> <h1>@Model.Module.Name</h1> <div class="xmldoc"> @Model.Module.Comment.FullText </div> @if (Model.Module.NestedTypes.Length > 0) { <h2>Nested types</h2> <...
6055b424-366c-4f69-968b-1a18c694319e
{ "language": "C#" }
```c# namespace BScript.Tests.Expressions { using System; using System.Collections.Generic; using System.Linq; using System.Text; using BScript.Commands; using BScript.Expressions; using BScript.Language; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] ...
```c# namespace BScript.Tests.Expressions { using System; using System.Collections.Generic; using System.Linq; using System.Text; using BScript.Commands; using BScript.Expressions; using BScript.Language; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] ...
2e91628f-f00b-4b87-967a-ab8bf6e376a1
{ "language": "C#" }
```c# using UnityEngine; namespace Pear.InteractionEngine.Interactions { /// <summary> /// Manipulating objects, such as resizing and moving, can be tricky when you have multiple scripts trying the modify the same thing. /// This class creates an anchor element which is used to help these manipulations /// </summ...
```c# using UnityEngine; namespace Pear.InteractionEngine.Interactions { /// <summary> /// Manipulating objects, such as resizing and moving, can be tricky when you have multiple scripts trying the modify the same thing. /// This class creates an anchor element which is used to help these manipulations /// </summ...
f57f6b44-9b55-40c7-8e9a-c8cfeeef6655
{ "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.Extensions.ObjectExtensions; namespace osu.Game.Tests.Visual { /// <summary> /// Test case which adjusts the beatmap's rate to match an...
```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.Diagnostics; using osu.Framework.Extensions.ObjectExtensions; namespace osu.Game.Tests.Visual { /// <summary> /// Test case which adjusts the ...
1ea94ba9-3773-4c55-9ac2-aa105a535acc
{ "language": "C#" }
```c# using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.WriteLine("Hello World!"); } } } ``` Remove namespace and public from console app
```c# using System; public class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } ```
6696b114-708a-4ea1-8576-de1f63ddb217
{ "language": "C#" }
```c# using Pablo.Gallery.Models; using System.Data.Entity; using System.Web; using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using System; using System.Threading; namespace Pablo.Gallery { public class MvcApplication : HttpApplication { static MvcApplication(...
```c# using Pablo.Gallery.Models; using System.Data.Entity; using System.Web; using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using System; using System.Threading; namespace Pablo.Gallery { public class MvcApplication : HttpApplication { static MvcApplication(...
525586d5-8a85-4a8d-804a-a92ff4f82b0e
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.Attributed")] [assembly: AssemblyDescription("Autofac Extensions for categorized discovery using attributes")] [assembly: InternalsVisibleTo("Autofac.Tests.Extras....
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.Attributed")] [assembly: InternalsVisibleTo("Autofac.Tests.Extras.Attributed, PublicKey=00240000048000009400000006020000002400005253413100040000010001008728425885ef...
eaed7d5c-596b-4b70-b284-867873663954
{ "language": "C#" }
```c# using Newtonsoft.Json; using OniBot.Interfaces; using System.Collections.Generic; namespace OniBot.CommandConfigs { public class SweepConfig : CommandConfig { public Dictionary<ulong, string> Equiped = new Dictionary<ulong, string>(); [JsonIgnore] public override string ConfigKe...
```c# using Newtonsoft.Json; using OniBot.Interfaces; using System.Collections.Generic; namespace OniBot.CommandConfigs { public class SweepConfig : CommandConfig { public Dictionary<ulong, string> Equiped { get; set; } = new Dictionary<ulong, string>(); [JsonIgnore] public override s...
ca8219f0-7509-437b-bcb6-da63b0c5aabe
{ "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.Linq; using osu.Framework.Audio.Track; using osu.Game.Rulesets.Objects.Types; namespace osu.Game.Beatmaps { public partial class WorkingBeatmap ...
```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.Linq; using osu.Framework.Audio.Track; using osu.Game.Rulesets.Objects.Types; namespace osu.Game.Beatmaps { public partial class WorkingBeatmap ...
b2f2ceb8-3343-4585-8bd0-759112a0dafe
{ "language": "C#" }
```c# using System; using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.EnterpriseLibraryConfigurator")] [assembly: AssemblyDescription("Autofac support for Enterprise Library container configuration.")] [assembly: ComVisible(false)]``` Build script now write...
```c# using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.EnterpriseLibraryConfigurator")] [assembly: ComVisible(false)]```
a111cc41-efac-45f7-9091-7486e76f9976
{ "language": "C#" }
```c# using System; using System.Web; using System.Web.Hosting; namespace NuGet.Server.Infrastructure { public class PackageUtility { internal static string PackagePhysicalPath = HostingEnvironment.MapPath("~/Packages"); public static Uri GetPackageUrl(string path, Uri baseUri) { ...
```c# using System; using System.Web; using System.Web.Hosting; using System.Configuration; namespace NuGet.Server.Infrastructure { public class PackageUtility { internal static string PackagePhysicalPath; private static string DefaultPackagePhysicalPath = HostingEnvironment.MapPath...
4c33ceb5-b5da-4f6d-834b-d0329f5a0b69
{ "language": "C#" }
```c# using System; using System.Linq; using System.Net; using Google.Protobuf.Reflection; using KillrVideo.Host.Config; namespace KillrVideo.Protobuf.ServiceDiscovery { /// <summary> /// Service discovery implementation that just points all service clients to the host/port where they /// have been config...
```c# using System; using Google.Protobuf.Reflection; using KillrVideo.Host.Config; namespace KillrVideo.Protobuf.ServiceDiscovery { /// <summary> /// Service discovery implementation that just points all service clients to 'localhost' and the port /// where they have been configured to run locally. /...
521247b6-466f-4281-88f9-14b22db3c15a
{ "language": "C#" }
```c# using System.Reflection; using System.Windows; namespace Arkivverket.Arkade.UI.Views { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Title = string.Format(UI.Resources.UI.General_WindowTitle, typeof(App).Assembly.GetName()...
```c# using System.Reflection; using System.Windows; namespace Arkivverket.Arkade.UI.Views { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Title = string.Format(UI.Resources.UI.General_WindowTitle, "0.3.0"); // Todo - get correc...
9c017231-3c43-4c3c-be63-df4fd5c73239
{ "language": "C#" }
```c# using System.Collections.Generic; namespace Microsoft.Build.Logging.StructuredLogger { public class ParentedNode : BaseNode { public TreeNode Parent { get; set; } public IEnumerable<ParentedNode> GetParentChain() { var chain = new List<ParentedNode>(); ...
```c# using System.Collections.Generic; namespace Microsoft.Build.Logging.StructuredLogger { public class ParentedNode : BaseNode { private TreeNode parent; public TreeNode Parent { get => parent; set { #if DEBUG if (pare...
5eea7dad-fb14-4219-86c1-af53329228e7
{ "language": "C#" }
```c# using CareerHub.Client.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CareerHub.Client.API.Integrations.Workflows { internal class WorkflowProgressApi : IWorkflowProgressApi { private const string ApiBase = "a...
```c# using CareerHub.Client.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CareerHub.Client.API.Integrations.Workflows { internal class WorkflowProgressApi : IWorkflowProgressApi { private const string ApiBase = "a...
985d0b62-33b8-403a-9abc-73e00955c443
{ "language": "C#" }
```c# using Autofac; using Bit.Model.Events; using Plugin.Connectivity.Abstractions; using Prism; using Prism.Autofac; using Prism.Events; using Prism.Ioc; using Xamarin.Forms; namespace Bit { public abstract class BitApplication : PrismApplication { protected BitApplication(IPlatformInitializer platf...
```c# using Autofac; using Bit.Model.Events; using Plugin.Connectivity.Abstractions; using Prism; using Prism.Autofac; using Prism.Events; using Prism.Ioc; using Xamarin.Forms; namespace Bit { public abstract class BitApplication : PrismApplication { protected BitApplication(IPlatformInitializer platf...
a310920b-16d1-4b2d-98e3-e89cb32eb49e
{ "language": "C#" }
```c# using static System.Console; public class Counter { public Counter() { } public int Count; public Counter Increment() { Count++; return this; } } public static class Program { public static readonly Counter printCounter = new Counter(); public static void Main() ...
```c# using static System.Console; public class Counter { public Counter() { } public int Count; public Counter Increment() { Count++; return this; } public Counter Decrement<T>() { Count--; return this; } } public static class Program { public st...
be9ffc93-5f17-4437-b8ab-9d86d8a57e89
{ "language": "C#" }
```c# namespace JetBrains.TeamCity.NuGet.Tests { public static class NuGetConstants { public const string DefaultFeedUrl_v1 = "https://go.microsoft.com/fwlink/?LinkID=206669"; public const string DefaultFeedUrl_v2 = "https://go.microsoft.com/fwlink/?LinkID=230477"; public const string NuGetDevFeed...
```c# namespace JetBrains.TeamCity.NuGet.Tests { public static class NuGetConstants { public const string DefaultFeedUrl_v1 = "https://packages.nuget.org/v1/FeedService.svc/"; public const string DefaultFeedUrl_v2 = "https://www.nuget.org/api/v2/"; public const string NuGetDevFeed = "https://dotnet.myge...
ef57de44-c30f-46b7-9c3a-623b1764165f
{ "language": "C#" }
```c# namespace Bakery.Cqrs { using SimpleInjector; using System; using System.Linq; using System.Threading.Tasks; public class SimpleInjectorDispatcher : IDispatcher { private readonly Container container; public SimpleInjectorDispatcher(Container container) { if (container == null) ...
```c# namespace Bakery.Cqrs { using SimpleInjector; using System; using System.Linq; using System.Threading.Tasks; public class SimpleInjectorDispatcher : IDispatcher { private readonly Container container; public SimpleInjectorDispatcher(Container container) { if (container == null) ...
eed7c622-95ac-4c67-a567-61590b8bee3a
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; namespace PixelPet { /// <summary> /// PixelPet workbench instance. /// </summary> public class Workbench { public IList<Color> Palette { get; } publ...
```c# using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; namespace PixelPet { /// <summary> /// PixelPet workbench instance. /// </summary> public class Workbench { public IList<Color> Palette { get; } publ...
c75b7a3e-afca-43eb-88b6-28ca7ef4f487
{ "language": "C#" }
```c# using DeJson; using System.Collections.Generic; using System; using System.IO; using UnityEngine; namespace HappyFunTimes { public class HFTWebFileLoader { // TODO: Put this in one place static private string HFT_WEB_PATH = "HappyFunTimesAutoGeneratedDoNotEdit/"; static private s...
```c# using DeJson; using System.Collections.Generic; using System; using System.IO; using UnityEngine; namespace HappyFunTimes { public class HFTWebFileLoader { // TODO: Put this in one place static private string HFT_WEB_PATH = "HappyFunTimesAutoGeneratedDoNotEdit/"; static private s...
12aa610e-6e57-4c68-95e3-b0138b80a677
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Text; using System.Collections.Specialized; using MonoTorrent.BEncoding; using System.Net; namespace MonoTorrent.Tracker { public abstract class RequestParameters : EventArgs { protected internal static readonly string FailureKey = "fai...
```c# using System; using System.Collections.Generic; using System.Text; using System.Collections.Specialized; using MonoTorrent.BEncoding; using System.Net; namespace MonoTorrent.Tracker { public abstract class RequestParameters : EventArgs { protected internal static readonly string FailureKey = "fai...
df26fa0a-ed8e-4b67-a398-ac7af9c339aa
{ "language": "C#" }
```c# using System.Collections.Generic; using StockportContentApi.Model; using StockportContentApi.Utils; using System.Linq; using System.Threading.Tasks; namespace StockportContentApi.Services { public interface IHealthcheckService { Task<Healthcheck> Get(); } public class HealthcheckService...
```c# using System.Collections.Generic; using StockportContentApi.Model; using StockportContentApi.Utils; using System.Linq; using System.Threading.Tasks; namespace StockportContentApi.Services { public interface IHealthcheckService { Task<Healthcheck> Get(); } public class HealthcheckService...
19820a10-5af0-46a5-b859-321f81b35204
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; namespace Microsoft.CodeAnalysis.RulesetToEditorconfig { internal static class Program { public static ...
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; namespace Microsoft.CodeAnalysis.RulesetToEditorconfig { internal static class Program { public static ...
1cf1ca5d-8f10-4b0e-b15d-24e6e3d57644
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.CodeAnalysis.Internal.Log { internal sealed class StatisticLogAggregator : AbstractLogAggregator<StatisticLogAggregator.Statist...
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.CodeAnalysis.Internal.Log { internal sealed class StatisticLogAggregator : AbstractLogAggregator<StatisticLogAggregator.Statist...
398858c7-46b8-4a17-8fa9-a0f86aa4d990
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace OneDrive { public class ThumbnailRetrievalOptions : RetrievalOptions { /// <summary> /// List of thumbnail size names to return /// </summary> public string[] SelectThumbnailNames { get; set; } /// <summar...
```c# using System; using System.Collections.Generic; namespace OneDrive { public class ThumbnailRetrievalOptions : RetrievalOptions { /// <summary> /// List of thumbnail size names to return /// </summary> public string[] SelectThumbnailNames { get; set; } /// <summa...
89eb4127-7ba8-42ae-876a-ca9f5a79f561
{ "language": "C#" }
```c# using System; using InfinniPlatform.Sdk.Types; using MongoDB.Bson; using MongoDB.Bson.Serialization; using MongoDB.Bson.Serialization.Serializers; namespace InfinniPlatform.DocumentStorage.MongoDB { /// <summary> /// Реализует логику сериализации и десериализации <see cref="Time"/> для MongoDB. //...
```c# using System; using InfinniPlatform.Sdk.Types; using MongoDB.Bson; using MongoDB.Bson.Serialization; using MongoDB.Bson.Serialization.Serializers; namespace InfinniPlatform.DocumentStorage.MongoDB { /// <summary> /// Реализует логику сериализации и десериализации <see cref="Time"/> для MongoDB. //...
29468f82-cd64-4cf7-87c9-eebdf2141f6b
{ "language": "C#" }
```c# using System; using System.Text; namespace ExtensionBlocks { public class Beef001a : BeefBase { public Beef001a(byte[] rawBytes) : base(rawBytes) { if (Signature != 0xbeef001a) { throw new Exception($"Signature mismatch! Should be Beef0...
```c# using System; using System.Text; namespace ExtensionBlocks { public class Beef001a : BeefBase { public Beef001a(byte[] rawBytes) : base(rawBytes) { if (Signature != 0xbeef001a) { throw new Exception($"Signature mismatch! Should be Beef0...
66d6c286-b317-45e4-8d1d-7eb6559e5ca7
{ "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 System; using osu.Framework.Platform; using osu.Framework.Testing; namespace osu.Game.Tests.Visual { public abstract class OsuTestCase : TestC...
```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 System; using osu.Framework.Platform; using osu.Framework.Testing; namespace osu.Game.Tests.Visual { public abstract class OsuTestCase : TestC...
18a327a7-1ec3-4bfc-aa12-066f309d71e6
{ "language": "C#" }
```c# using System; using System.Linq; using Avalonia; namespace ControlCatalog.NetCore { class Program { static void Main(string[] args) { if (args.Contains("--fbdev")) AppBuilder.Configure<App>() .InitializeWithLinuxFramebuffer(tl => tl.Content...
```c# using System; using System.Linq; using Avalonia; namespace ControlCatalog.NetCore { class Program { static void Main(string[] args) { if (args.Contains("--fbdev")) AppBuilder.Configure<App>().InitializeWithLinuxFramebuffer(tl => { tl.Content = new ...
6b73166c-c040-420a-aefe-a493ae06ddc0
{ "language": "C#" }
```c# using System; using Glimpse.Core.Extensibility; using Glimpse.Core.Resource; using Moq; using Xunit; namespace Glimpse.Test.Core.Resource { public class ConfigurationShould { [Fact] public void ReturnProperName() { var name = "glimpse_config"; var resourc...
```c# using System; using Glimpse.Core.Extensibility; using Glimpse.Core.Framework; using Glimpse.Core.Resource; using Glimpse.Core.ResourceResult; using Moq; using Xunit; namespace Glimpse.Test.Core.Resource { public class ConfigurationShould { [Fact] public void ReturnProperName() { ...
4552b8d0-9fd0-4781-a865-6c789bf65ce7
{ "language": "C#" }
```c# using System.Collections.Generic; using Android.App; using Android.Content; namespace Plugin.FirebasePushNotification { [BroadcastReceiver] public class PushNotificationActionReceiver : BroadcastReceiver { public override void OnReceive(Context context, Intent intent) { ...
```c# using System.Collections.Generic; using Android.App; using Android.Content; namespace Plugin.FirebasePushNotification { [BroadcastReceiver(Enabled = true, Exported = false)] public class PushNotificationActionReceiver : BroadcastReceiver { public override void OnReceive(Context context, Int...
4e33ac28-4664-49b6-b257-6d61dfd4b206
{ "language": "C#" }
```c# using System; using System.Threading; using Microsoft.SPOT; namespace AgentIntervals { public delegate void HeartBeatEventHandler(object sender, EventArgs e); public class HeartBeat { private Timer _timer; private int _period; public event HeartBeatEventHand...
```c# using System; using System.Threading; using Microsoft.SPOT; namespace AgentIntervals { public delegate void HeartBeatEventHandler(object sender, EventArgs e); public class HeartBeat { private Timer _timer; private int _period; public event HeartBeatEventHand...
2588ddfb-dac5-4d66-b143-ba99c1c003b7
{ "language": "C#" }
```c# using AppKit; using Foundation; namespace Skia.OSX.Demo { [Register ("AppDelegate")] public partial class AppDelegate : NSApplicationDelegate { public AppDelegate () { } public override void DidFinishLaunching (NSNotification notification) { // Insert code here to initialize your application ...
```c# using AppKit; using Foundation; namespace Skia.OSX.Demo { [Register ("AppDelegate")] public partial class AppDelegate : NSApplicationDelegate { public AppDelegate () { } public override void DidFinishLaunching (NSNotification notification) { // Insert code here to initialize your application ...
68a02049-8d33-41c1-8187-1e0ceda01e39
{ "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.Game.Rulesets.Mods; namespace osu.Game.Rulesets.Taiko.Mods { public class TaikoModEasy : ModEasy { public override string Description =>...
```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 Humanizer; using osu.Framework.Bindables; using osu.Framework.Graphics.Sprites; using osu.Game.Beatmaps; using osu.Game.Configuration; using os...
3acedd55-ad95-4bed-ba15-3033cc1a0c45
{ "language": "C#" }
```c# using NUnit.Framework; using System; using System.Linq.Expressions; using TestStack.FluentMVCTesting.Internal; namespace TestStack.FluentMVCTesting.Tests.Internal { [TestFixture] public class ExpressionInspectorShould { [Test] public void Correctly_parse_equality_comparison_with_stri...
```c# using NUnit.Framework; using System; using System.Linq.Expressions; using TestStack.FluentMVCTesting.Internal; namespace TestStack.FluentMVCTesting.Tests.Internal { [TestFixture] public class ExpressionInspectorShould { [Test] public void Correctly_parse_equality_comparison_with_stri...
9a210909-b7a6-464e-81d8-c6d5f541e59c
{ "language": "C#" }
```c# using System.Threading.Tasks; using NSubstitute; using Ploeh.AutoFixture; using Ploeh.AutoFixture.Xunit; using TeamCityApi.Domain; using TeamCityApi.Locators; using TeamCityApi.Tests.Helpers; using TeamCityApi.Tests.Scenarios; using TeamCityApi.UseCases; using Xunit; using Xunit.Extensions; namespace TeamCityAp...
```c# using System.Threading.Tasks; using NSubstitute; using Ploeh.AutoFixture; using Ploeh.AutoFixture.Xunit; using TeamCityApi.Domain; using TeamCityApi.Locators; using TeamCityApi.Tests.Helpers; using TeamCityApi.Tests.Scenarios; using TeamCityApi.UseCases; using Xunit; using Xunit.Extensions; namespace TeamCityAp...
bb2d8631-a06a-4d98-9a2a-a9e02440bb64
{ "language": "C#" }
```c# @using System.Configuration; @{ ViewBag.Title = "Login"; } <div id="root" style="width: 320px; margin: 40px auto; padding: 10px; border-style: dashed; border-width: 1px;"> embeded area </div> @Html.AntiForgeryToken() <script src="https://cdn.auth0.com/js/lock-8.2.2.min.js"></script> <script> var l...
```c# @using System.Configuration; @{ ViewBag.Title = "Login"; } <div id="root" style="width: 320px; margin: 40px auto; padding: 10px; border-style: dashed; border-width: 1px;"> embeded area </div> @Html.AntiForgeryToken() <script src="https://cdn.auth0.com/js/lock-9.0.js"></script> <script> var lock = ...
0625e29d-08f7-42c1-b912-1ed5a703e3e2
{ "language": "C#" }
```c# using Umbraco.Core; using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [PropertyEditor(Constants.PropertyEditors.TextboxMultipleAlias, "Textarea", "textarea", IsParameterEditor = true)] public class TextAreaPropertyEditor : PropertyEditor { } }``` Set value typ...
```c# using Umbraco.Core; using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { [PropertyEditor(Constants.PropertyEditors.TextboxMultipleAlias, "Textarea", "textarea", IsParameterEditor = true, ValueType = "TEXT")] public class TextAreaPropertyEditor : PropertyEditor { } ...
770058bf-9a42-41ec-a5fb-c92426192788
{ "language": "C#" }
```c# // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using UnityEngine; namespace HoloToolkit.Unity { public static class EditorUtils { /// <summary> /// Deletes all objects in the scene ...
```c# // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using System.Linq; using UnityEngine; namespace HoloToolkit.Unity { public static class EditorUtils { /// <summary> /// Deletes all ob...
590bfbbc-8ef6-4ede-a533-f212c8da4ad0
{ "language": "C#" }
```c# namespace dotless.Core.Parser.Functions { using System.Linq; using Infrastructure; using Infrastructure.Nodes; using Tree; using Utils; public class RgbaFunction : Function { protected override Node Evaluate(Env env) { if (Arguments.Count == 2) ...
```c# namespace dotless.Core.Parser.Functions { using System.Linq; using Infrastructure; using Infrastructure.Nodes; using Tree; using Utils; public class RgbaFunction : Function { protected override Node Evaluate(Env env) { if (Arguments.Count == 2) ...
ff025c1e-3ee5-4148-84f4-c591ff9e4baf
{ "language": "C#" }
```c# //------------------------------------------------------------------------------ // <copyright file="SharedAssemblyInfo.cs" company="Microsoft"> // Copyright (c) Microsoft Corporation // </copyright> // <summary> // Assembly global configuration. // </summary> //------------------------------------------...
```c# //------------------------------------------------------------------------------ // <copyright file="SharedAssemblyInfo.cs" company="Microsoft"> // Copyright (c) Microsoft Corporation // </copyright> // <summary> // Assembly global configuration. // </summary> //------------------------------------------...
7f3c428a-8156-4236-91aa-22a7069e36ce
{ "language": "C#" }
```c# @model SFA.DAS.EmployerAccounts.Web.OrchestratorResponse<SFA.DAS.EmployerAccounts.Web.ViewModels.AccountDashboardViewModel> @{ ViewBag.Title = "Home"; ViewBag.PageID = "page-company-homepage"; } <div class="das-dashboard-header"> <div class="govuk-width-container das-dashboard-header__border"> ...
```c# @model SFA.DAS.EmployerAccounts.Web.OrchestratorResponse<SFA.DAS.EmployerAccounts.Web.ViewModels.AccountDashboardViewModel> @{ ViewBag.Title = "Home"; ViewBag.PageID = "page-company-homepage"; } <div class="das-dashboard-header das-section--header"> <div class="govuk-width-container das-dashboard-h...
387eb863-eba1-4f89-aa94-57f9abbb9ea2
{ "language": "C#" }
```c# using System; using System.Linq; namespace CefSharp.Example { public static class CefExample { public const string DefaultUrl = "custom://cefsharp/BindingTest.html"; // Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work. private const boo...
```c# using System; using System.Diagnostics; using System.Linq; namespace CefSharp.Example { public static class CefExample { public const string DefaultUrl = "custom://cefsharp/BindingTest.html"; // Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work....
4f8c7b48-09d4-488e-b5e7-c25809a8b9e8
{ "language": "C#" }
```c# using System; using System.IO; using System.Text; namespace Eleven41.Helpers { public static class JsonHelper { public static string Serialize<T>(T obj) { return ServiceStack.Text.JsonSerializer.SerializeToString(obj, typeof(T)); } public static void SerializeToStream<T>(T obj, Stream stream) {...
```c# using System; using System.IO; using System.Text; using ServiceStack.Text; namespace Eleven41.Helpers { public static class JsonHelper { public static string Serialize<T>(T obj) { return JsonSerializer.SerializeToString(obj, typeof(T)); } public static string SerializeAndFormat<T>(T obj) { re...
8547eca5-0c5f-4416-8c04-1e3dd0f03ab3
{ "language": "C#" }
```c# #if DECOMPILE namespace UELib.Core { public partial class UConst : UField { /// <summary> /// Decompiles this object into a text format of: /// /// const NAME = VALUE; /// </summary> /// <returns></returns> public override string Decompile() { return "const " + Name + " = " + Value + ";"; ...
```c# #if DECOMPILE namespace UELib.Core { public partial class UConst : UField { /// <summary> /// Decompiles this object into a text format of: /// /// const NAME = VALUE; /// </summary> /// <returns></returns> public override string Decompile() { return "const " + Name + " = " + Value.Trim() ...
915009fe-e25e-42f8-a19a-ebc22f17a8df
{ "language": "C#" }
```c# <div id="challengeInbox" style="display: none;"> <p id="challengeText"></p> <input type="button" onclick="acceptChallenge()" value="Accept" /> <input type="button" onclick="rejectChallenge()" value="Reject" /> </div> <script> function pollChallengeInbox() { $.getJSON('@Url.Content(...
```c# <div id="challengeInbox" style="display: none;"> <p id="challengeText"></p> <input type="button" onclick="acceptChallenge()" value="Accept" /> <input type="button" onclick="rejectChallenge()" value="Reject" /> </div> <script> function pollChallengeInbox() { $.getJSON('@Url.Content(...
3dafb59d-d908-4b8d-b378-f48bf0e51e15
{ "language": "C#" }
```c# using Microsoft.AspNetCore.Identity; namespace DragonSpark.Application.Security.Identity; public readonly record struct Login<T>(ExternalLoginInfo Information, T User);``` Upgrade to allocation as it is used a bit
```c# using Microsoft.AspNetCore.Identity; namespace DragonSpark.Application.Security.Identity; public sealed record Login<T>(ExternalLoginInfo Information, T User);```
0ca638df-b063-4cec-880a-84978ac7ece6
{ "language": "C#" }
```c# using System; using NUnit.Framework; namespace Plivo.Test { [TestFixture] public class TestSignature { [Test] public void TestSignatureV2Pass() { string url = "https://answer.url"; string nonce = "12345"; string signature = "ehV3IKhLysWB...
```c# using System; using NUnit.Framework; namespace Plivo.Test { [TestFixture] public class TestSignature { [Test] public void TestSignatureV2Pass() { string url = "https://answer.url"; string nonce = "12345"; string signature = "ehV3IKhLysWB...
67343c19-ca95-4534-9841-aa8e6e4f8aad
{ "language": "C#" }
```c# using Silphid.Extensions; using UnityEngine; namespace Silphid.Showzup.ListLayouts { public class HorizontalListLayout : ListLayout { public float HorizontalSpacing; public float ItemWidth; protected float ItemOffsetX => ItemWidth + HorizontalSpacing; public ove...
```c# using Silphid.Extensions; using UnityEngine; namespace Silphid.Showzup.ListLayouts { public class HorizontalListLayout : ListLayout { public float HorizontalSpacing; public float ItemWidth; protected float ItemOffsetX => ItemWidth + HorizontalSpacing; private Rect Visibl...
8f42c303-9383-45f1-a18b-6c0fbcaf2a60
{ "language": "C#" }
```c# using System; using System.Linq; using Microsoft.OpenApi.Models; using Newtonsoft.Json.Serialization; namespace Swashbuckle.AspNetCore.SwaggerGen { public class PolymorphicSchemaGenerator : ChainableSchemaGenerator { public PolymorphicSchemaGenerator( SchemaGeneratorOptions options, ...
```c# using System; using System.Linq; using Microsoft.OpenApi.Models; using Newtonsoft.Json.Serialization; namespace Swashbuckle.AspNetCore.SwaggerGen { public class PolymorphicSchemaGenerator : ChainableSchemaGenerator { public PolymorphicSchemaGenerator( SchemaGeneratorOptions options, ...
b0a361cf-fef5-4292-a95e-d512c94815b3
{ "language": "C#" }
```c# using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using LtiLibrary.NetCore.Common; using LtiLibrary.NetCore.Extensions; namespace LtiLibrary.NetCore.Profiles { public static class ToolConsumerProfileClient { /// <summary> /// Get a ToolConsumerProfile fr...
```c# using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using LtiLibrary.NetCore.Common; using LtiLibrary.NetCore.Extensions; namespace LtiLibrary.NetCore.Profiles { public static class ToolConsumerProfileClient { /// <summary> /// Get a ToolConsumerProfile fr...
f8b22c42-2d4f-4852-a772-928f058ce942
{ "language": "C#" }
```c# using UnityEngine.Events; [System.Serializable] public class LiteNetLibLoadSceneEvent : UnityEvent<string, bool, float> { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } } ``` Remove unused functions (that generate by unity :p)
```c# using UnityEngine.Events; [System.Serializable] public class LiteNetLibLoadSceneEvent : UnityEvent<string, bool, float> { } ```
b4681ac9-eb4b-469f-97d9-097acace2dc2
{ "language": "C#" }
```c# using UnityEngine; [CreateAssetMenu (menuName = "AI/Actions/Enemy_Attack")] public class Action_Attack : Action { public override void Init(StateController controller) { return; } public override void Act(StateController controller) { } } ``` Rewrite Action Attack erased by mistake
```c# using UnityEngine; [CreateAssetMenu (menuName = "AI/Actions/Enemy_Attack")] public class Action_Attack : Action { [SerializeField] float staminaRequired = 2f; [SerializeField] float attackDelay = 1f; [SerializeField] float attackDuration = 1f; [SerializeField] float attackDamage = 1f; [SerializeFie...
42e4ace6-ce5d-4aa8-b721-3482a499e457
{ "language": "C#" }
```c# using System.Collections.ObjectModel; using System.Linq; using SOVND.Lib.Models; namespace SOVND.Client.Util { public class ChannelDirectory { public ObservableCollection<Channel> channels = new ObservableCollection<Channel>(); public bool AddChannel(Channel channel) { ...
```c# using System.Collections.ObjectModel; using System.Linq; using SOVND.Lib.Models; namespace SOVND.Client.Util { public class ChannelDirectory { private readonly SyncHolder _sync; public ObservableCollection<Channel> channels = new ObservableCollection<Channel>(); public ChannelDir...
ca9d86ab-b286-46a9-a5ec-c37ce0e57138
{ "language": "C#" }
```c# namespace TAUtil.Gaf.Structures { using System.IO; public struct GafFrameData { public ushort Width; public ushort Height; public ushort XPos; public ushort YPos; public byte Unknown1; public bool Compressed; public ushort FramePoin...
```c# namespace TAUtil.Gaf.Structures { using System.IO; public struct GafFrameData { public ushort Width; public ushort Height; public ushort XPos; public ushort YPos; public byte TransparencyIndex; public bool Compressed; public ushort ...
5ba2cb16-89db-4d23-9ce1-b170ac1ecb0b
{ "language": "C#" }
```c# using System; using Xunit; namespace Cascara.Tests { public class AssertExtension : Assert { public static T ThrowsWithMessage<T>(Func<object> testCode, string message) where T : Exception { var ex = Assert.Throws<T>(testCode); Assert.Equal(ex.Message,...
```c# using System; using Xunit; namespace Cascara.Tests { public class AssertExtension : Assert { public static T ThrowsWithMessage<T>(Func<object> testCode, string message) where T : Exception { var ex = Assert.Throws<T>(testCode); Assert.Equal(ex.Message,...
48d80aa6-9028-438f-9973-da3bf6182c20
{ "language": "C#" }
```c# using System; using Moq; using Xunit; using Should; namespace Foggle { public class EnableByHostnameTests { [Fact] public void IsEnabled_ClassMarkedWithFoggleByHostName_TrysToGetListOfHostname() { var mockConfig = new Mock<IConfigWrapper>(); Feature.configurationWrapper = mockConfig.Object; Fe...
```c# using System; using Moq; using Xunit; using Should; namespace Foggle { public class EnableByHostnameTests { [Fact] public void IsEnabled_ClassMarkedWithFoggleByHostName_TrysToGetListOfHostname() { var mockConfig = new Mock<IConfigWrapper>(); Feature.configurationWrapper = mockConfig.Object; Fe...
81b278a5-ba6f-4c0f-8f07-c4e944d226d8
{ "language": "C#" }
```c# using MacroDiagnostics; using MacroExceptions; using MacroGuards; namespace produce { public class NuGitModule : Module { public override void Attach(ProduceRepository repository, Graph graph) { Guard.NotNull(repository, nameof(repository)); Guard.NotNull(graph, nameof(graph)); ...
```c# using MacroDiagnostics; using MacroExceptions; using MacroGuards; namespace produce { public class NuGitModule : Module { public override void Attach(ProduceRepository repository, Graph graph) { Guard.NotNull(repository, nameof(repository)); Guard.NotNull(graph, nameof(graph)); ...
ec441e8c-3a87-4302-8846-69db4fcf89b5
{ "language": "C#" }
```c# using MediatR; using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; using System; using System.Collections.Generic; using System.Text; namespace Ordering.Domain.Events { /// <summary> /// Event used when an order is created /// </summary> public class OrderS...
```c# using MediatR; using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; using System; using System.Collections.Generic; using System.Text; namespace Ordering.Domain.Events { /// <summary> /// Event used when an order is created /// </summary> public class OrderS...
b759589a-d025-4833-8457-76de68557ba3
{ "language": "C#" }
```c# using System; namespace Hlpr { class WarpHelp { public static double Distance(double x1, double y1, double z1, double x2, double y2, double z2) { double dis; dis = Math.Pow(x1-x2,2) + Math.Pow(y1-y2,2) + Math.Pow(z1-z2,2); dis = Math.Pow(dis,0.5); return dis; } public static double Distance...
```c# using System; namespace Hlpr { class WarpHelp { public static double Distance(double x1, double y1, double z1, double x2, double y2, double z2) { double dis; dis = Math.Pow(x1-x2,2) + Math.Pow(y1-y2,2) + Math.Pow(z1-z2,2); dis = Math.Pow(dis,0.5); return dis; } public static double Distance...
8c54274b-83e0-4140-a87d-6ad1ad14ddcb
{ "language": "C#" }
```c# using System; namespace Umbraco.Web.Models.ContentEditing { public class RollbackVersion { public int VersionId { get; set; } public DateTime VersionDate { get; set; } public string VersionAuthorName { get; set; } } } ``` Make the JSON model over the API control be the cor...
```c# using System; using System.Runtime.Serialization; namespace Umbraco.Web.Models.ContentEditing { [DataContract(Name = "rollbackVersion", Namespace = "")] public class RollbackVersion { [DataMember(Name = "versionId")] public int VersionId { get; set; } [DataMember(Name = "ver...
e624e75f-999c-4956-9c75-0267f8972e78
{ "language": "C#" }
```c# using System; using log4net; using Quartz; namespace DCS.Core.Scheduler { public sealed class CronTask : IJob { private readonly string _cronConfig; private readonly ILog _logger = LogManager.GetLogger(typeof(CronTask)); private readonly Action _task; private readonly str...
```c# using System; using log4net; using Quartz; namespace DCS.Core.Scheduler { public sealed class CronTask : IJob { private readonly string _cronConfig; private readonly ILog _logger = LogManager.GetLogger(typeof(CronTask)); private readonly Action _task; private readonly str...
701d4563-76bd-4c5d-af2f-554916dcb95e
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Zermelo.API.Interfaces; using Zermelo.API.Services.Interfaces; namespace Zermelo.API.Services { internal class UrlBuilder : IUrlBuilder { const string _https = "https://"; ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Zermelo.API.Interfaces; using Zermelo.API.Services.Interfaces; namespace Zermelo.API.Services { internal class UrlBuilder : IUrlBuilder { const string _https = "https://"; ...
cdf12dca-d48d-4ef0-b47d-54fb00827ffc
{ "language": "C#" }
```c# using InfluxDB.LineProtocol.Collector; using System; namespace InfluxDB.LineProtocol { public class CollectorConfiguration { readonly IPointEmitter _parent; readonly PipelinedCollectorTagConfiguration _tag; readonly PipelinedCollectorEmitConfiguration _emitter; readonly P...
```c# using InfluxDB.LineProtocol.Collector; using System; namespace InfluxDB.LineProtocol { public class CollectorConfiguration { readonly IPointEmitter _parent; readonly PipelinedCollectorTagConfiguration _tag; readonly PipelinedCollectorEmitConfiguration _emitter; readonly P...
1a13e553-3d71-48dd-b906-242cc080b6f4
{ "language": "C#" }
```c# //////////////////////////////////////////////////////////////// // // (c) 2009, 2010 Careminster Limited and Melanie Thielker // // All rights reserved // using System; using Nini.Config; using OpenSim.Framework; using OpenMetaverse; namespace OpenSim.Services.Interfaces { public interface IBakedTextureModu...
```c# /* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code ...
b1b4199c-536c-4442-82f9-de987563470b
{ "language": "C#" }
```c# @model HeadRaceTimingSite.Models.Competition @{ ViewData["Title"] = Model.Name; } <results-list competition-id="@Model.CompetitionId" first-intermediate-name="Barnes" second-intermediate-name="Hammersmith" search-value="{{searchValue}}" show-first-intermediate show-second-intermediate></results-list> @sect...
```c# @model HeadRaceTimingSite.Models.Competition @{ ViewData["Title"] = Model.Name; } <results-list competition-id="@Model.CompetitionId" first-intermediate-name="Barnes" second-intermediate-name="Hammersmith" search-value="{{searchValue}}" show-first-intermediate show-second-intermediate></results-list> @sect...
23f87841-f342-4937-8559-6a615a3d96dc
{ "language": "C#" }
```c# using System; using NUnit.Framework; namespace nunit.v3 { [TestFixture] public class FlakyTest { [Test] [Retry(5)] public void TestFlakyMethod() { int result = 0; try { result = FlakyAdd(2, 2); } ...
```c# using System; using NUnit.Framework; namespace nunit.v3 { [TestFixture] public class FlakyTest { [Test] [Retry(5)] public void TestFlakyMethod() { int result = 0; try { result = FlakyAdd(2, 2); } ...
22f5e495-548d-4a1d-81b3-354a277f7fad
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using System.IO; namespace Snowflake.Information.MediaStore { public class MediaStoreSection { public string SectionName { get; set; } public Diction...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using System.IO; namespace Snowflake.Information.MediaStore { public class MediaStoreSection { public string SectionName { get; set; } public Diction...
be5f9821-c754-41ef-9364-e9bc8da3b281
{ "language": "C#" }
```c# /* JustMock Lite Copyright © 2019 Progress Software Corporation 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...
```c# /* JustMock Lite Copyright © 2019 Progress Software Corporation 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...
0f8a201c-36d8-4ecd-b1b2-dc5e0994d091
{ "language": "C#" }
```c# // -------------------------------------------------------------------------------------------------------------------- // <copyright file="IHaveInitializationStrategiesExtensionMethods.cs" company="Naos"> // Copyright 2015 Naos // </copyright> // ---------------------------------------------------------------...
```c# // -------------------------------------------------------------------------------------------------------------------- // <copyright file="IHaveInitializationStrategiesExtensionMethods.cs" company="Naos"> // Copyright 2015 Naos // </copyright> // ---------------------------------------------------------------...
5a7eb5ef-a374-4eb7-9621-e22bf871f685
{ "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; namespace osu.Game.Overlays.Settings { public class SettingsTextBox : SettingsItem<string> { protected override Draw...
```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.Bindables; using osu.Framework.Graphics; namespace osu.Game.Overlays.Settings { public class SettingsTextBox : SettingsItem<...
61e8c0cb-89a5-4e29-b191-02cfbbd0abf0
{ "language": "C#" }
```c# using System.Threading.Tasks; namespace osu.Game.Online.RealtimeMultiplayer { /// <summary> /// An interface defining the spectator server instance. /// </summary> public interface IMultiplayerServer { /// <summary> /// Request to join a multiplayer room. /// </summary...
```c# using System.Threading.Tasks; namespace osu.Game.Online.RealtimeMultiplayer { /// <summary> /// An interface defining the spectator server instance. /// </summary> public interface IMultiplayerServer { /// <summary> /// Request to join a multiplayer room. /// </summary...
bc4623ec-b3aa-4322-8652-779ea68a8b9c
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Symbols; using Microsoft.CodeAnalysis.CSharp.Syntax; using Micro...
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Symbols; using Microsoft.CodeAnalysis.CSharp.Syntax; using Micro...
c21fcca5-2bd8-49e9-a6d0-07bb789fe083
{ "language": "C#" }
```c# using System.Text.RegularExpressions; using System.Linq; using System; using System.Collections.Generic; namespace WikipediaAvsAnTrieExtractor { public partial class RegexTextUtils { //Note: regexes are NOT static and shared because of... http://stackoverflow.com/questions/7585087/multithread...
```c# using System.Text.RegularExpressions; using System.Linq; using System; using System.Collections.Generic; namespace WikipediaAvsAnTrieExtractor { public partial class RegexTextUtils { //Note: regexes are NOT static and shared because of... http://stackoverflow.com/questions/7585087/multithread...
4d03dfe1-c3bf-404d-8b45-a6b6f58c5718
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Text; using MiX.Integrate.Shared.Entities.Communications; namespace MiX.Integrate.Shared.Entities.Messages { public class SendJobMessageCarrier { public SendJobMessageCarrier() { } public short VehicleId { get; set; } public string Descriptio...
```c# using System; using System.Collections.Generic; using System.Text; using MiX.Integrate.Shared.Entities.Communications; namespace MiX.Integrate.Shared.Entities.Messages { public class SendJobMessageCarrier { public SendJobMessageCarrier() { } public short VehicleId { get; set; } public string Descriptio...
f61f19bf-169e-4543-b159-459ab88681a9
{ "language": "C#" }
```c# using UnityEngine; using NPBehave; public class NPBehaveExampleHelloBlackboardsAI : MonoBehaviour { private Root behaviorTree; void Start() { behaviorTree = new Root( // toggle the 'toggled' blackboard boolean flag around every 500 milliseconds new Service(0.5f, () ...
```c# using UnityEngine; using NPBehave; public class NPBehaveExampleHelloBlackboardsAI : MonoBehaviour { private Root behaviorTree; void Start() { behaviorTree = new Root( // toggle the 'toggled' blackboard boolean flag around every 500 milliseconds new Service(0.5f, () ...
0cf2a763-ef9a-4a3b-9388-27f221372e5a
{ "language": "C#" }
```c# // Copyright (c) Multi-Emu. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using AuthServer.Attributes; using AuthServer.Constants.Net; using Framework.Database; using Framework.Database.Auth; namespace AuthServer.Network.Packets.Handler { ...
```c# // Copyright (c) Multi-Emu. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using AuthServer.Attributes; using AuthServer.Constants.Net; using Framework.Database; using Framework.Database.Auth; namespace AuthServer.Network.Packets.Handler { ...
8de86c76-5b2a-42a5-a471-347d2e6f1709
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DropdownLanguageFontUpdater : MonoBehaviour { [SerializeField] private Text textComponent; void Start () { var language = LocalizationManager.instance.getAllLanguages()[transfo...
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DropdownLanguageFontUpdater : MonoBehaviour { [SerializeField] private Text textComponent; void Start () { var languages = LocalizationManager.instance.getAllLanguages(); ...
1f2f38c2-807b-4e5c-86aa-f06f26f1aab3
{ "language": "C#" }
```c# #if !NETCOREAPP using System.ComponentModel; #endif using System.IO; #if !NETCOREAPP using System.Runtime.InteropServices; #endif namespace winsw.Util { public static class FileHelper { public static void MoveOrReplaceFile(string sourceFileName, string destFileName) { #if NETCOREAPP ...
```c# #if !NETCOREAPP using System; #endif using System.IO; #if !NETCOREAPP using System.Runtime.InteropServices; #endif namespace winsw.Util { public static class FileHelper { public static void MoveOrReplaceFile(string sourceFileName, string destFileName) { #if NETCOREAPP File.Mo...
be79a599-bd0a-4898-ac1d-a64dcca8af35
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Diagnostics; using Autofac; using Crane.Core.Configuration.Modules; using Crane.Core.IO; using log4net; namespace Crane.Integration.Tests.TestUtilities { public static class ioc { private static IContainer _container; public s...
```c# using System; using System.Collections.Generic; using System.Diagnostics; using Autofac; using Crane.Core.Configuration.Modules; using Crane.Core.IO; using log4net; namespace Crane.Integration.Tests.TestUtilities { public static class ioc { private static IContainer _container; private ...
47cd2d5b-6736-4580-bcd8-f1e906b6d46b
{ "language": "C#" }
```c# using System.Web; using System.Web.Mvc; using Pelasoft.AspNet.Mvc.Slack; using System.Configuration; namespace Pelasoft.AspNet.Mvc.Slack.TestWeb { public class FilterConfig { public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); ...
```c# using System.Web; using System.Web.Mvc; using Pelasoft.AspNet.Mvc.Slack; using System.Configuration; namespace Pelasoft.AspNet.Mvc.Slack.TestWeb { public class FilterConfig { public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); ...
7a0d9c71-34b8-4ffa-8789-834794ab1c16
{ "language": "C#" }
```c# using System; using System.Xml.Serialization; using SevenDigital.Api.Schema.Attributes; using SevenDigital.Api.Schema.ParameterDefinitions.Get; namespace SevenDigital.Api.Schema.ReleaseEndpoint { [XmlRoot("editorial")] [ApiEndpoint("release/editorial")] [Serializable] public class ReleaseEditorial...
```c# using System; using System.Xml.Serialization; using SevenDigital.Api.Schema.Attributes; using SevenDigital.Api.Schema.ParameterDefinitions.Get; namespace SevenDigital.Api.Schema.ReleaseEndpoint { [XmlRoot("editorial")] [ApiEndpoint("release/editorial")] [Serializable] public class ReleaseEditorial...