doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
0f28b2eb-c811-4a1f-a7f2-87e59b92136f
{ "language": "C#" }
```c# using System; using System.IO; using System.Linq; using UnityEditor; using UnityEngine; public static class PackageExporter { [MenuItem("Tools/Export Unitypackage")] public static void Export() { // configure var root = "Scripts/MagicOnion"; var exportPath = "./MagicOnion.Cli...
```c# using System; using System.IO; using System.Linq; using UnityEditor; using UnityEngine; public static class PackageExporter { [MenuItem("Tools/Export Unitypackage")] public static void Export() { // configure var root = "Scripts/MagicOnion"; var exportPath = "./MagicOnion.Cli...
3fb1ee72-ae98-488d-920c-35ebe6a9f17c
{ "language": "C#" }
```c# using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Nest { [JsonObject(MemberSerialization.OptIn)] [JsonConverter(typeof(ReadAsTypeJsonConverter<RolloverConditions>))] public interface IRolloverConditions { [J...
```c# using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Nest { [JsonObject(MemberSerialization.OptIn)] [JsonConverter(typeof(ReadAsTypeJsonConverter<RolloverConditions>))] public interface IRolloverConditions { [J...
7fd8a597-b987-4c1d-909d-2091b096b41f
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Beatmaps { public static class BeatSyncProviderExtensions { /// <summary> /// Check whether beat sync is currently availa...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Beatmaps { public static class BeatSyncProviderExtensions { /// <summary> /// Check whether beat sync is currently availa...
5937ddfa-62e4-494c-b9b2-6fab862dc598
{ "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 osu.Game.Online.API.Requests; using osu.Game.Overlays.Profile.Sections.Beatmaps; namespace osu.Game.Overlays.Profile.Sections { public class Be...
```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 osu.Game.Online.API.Requests; using osu.Game.Overlays.Profile.Sections.Beatmaps; namespace osu.Game.Overlays.Profile.Sections { public class Be...
2e25a6b1-12b5-4446-b241-7bf83365b33b
{ "language": "C#" }
```c# using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Training.CSharpWorkshop.Tests { [TestClass] public class ProgramTests { [Ignore] [TestMethod] public void IgnoreTest() { Assert.Fail(); } [TestMethod()] pu...
```c# using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Training.CSharpWorkshop.Tests { [TestClass] public class ProgramTests { [Ignore] [TestMethod] public void IgnoreTest() { Assert.Fail(); } [TestMethod()] pu...
99658b15-d162-4805-9b86-e46a00c97031
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Totem.Runtime.Json { /// <summary> /// Settings used when serializing and deserializing objects in the Totem runtime /// </summary> public class TotemSerializerSettings : Jso...
```c# using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Totem.Runtime.Json { /// <summary> /// Settings used when serializing and deserializing objects in the Totem runtime /// </summary> public class T...
6c41324a-091e-4ea5-808f-cc5e66266abf
{ "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.Input.StateChanges.Events; namespace osu.Framework.Input.StateChanges { public interface ISourcedFromTouch { TouchStateChangeEv...
```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.Input.StateChanges.Events; namespace osu.Framework.Input.StateChanges { /// <summary> /// Denotes an input which was sourced from a tou...
8d9b80a9-50f7-4d12-892a-b88c96ca4bcf
{ "language": "C#" }
```c# using System.Reflection; namespace NHibernate.Mapping.ByCode.Impl.CustomizersImpl { public class ComposedIdCustomizer<TEntity> : PropertyContainerCustomizer<TEntity>, IComposedIdMapper<TEntity> where TEntity : class { public ComposedIdCustomizer(IModelExplicitDeclarationsHolder explicitDeclarationsHold...
```c# using System.Reflection; namespace NHibernate.Mapping.ByCode.Impl.CustomizersImpl { public class ComposedIdCustomizer<TEntity> : PropertyContainerCustomizer<TEntity>, IComposedIdMapper<TEntity> where TEntity : class { public ComposedIdCustomizer(IModelExplicitDeclarationsHolder explicitDeclarationsHold...
5c8b4f73-4598-4496-9311-fb80265e77c9
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Configuration; using System.Linq; namespace NLogger { public class CustomLogFactory<T> where T : NLoggerSection { private readonly List<ILogWriterRegistration<T>> _logWriterTypes; public CustomLogFactory() { _logWriterTy...
```c# using System.Collections.Generic; using System.Configuration; using System.Linq; namespace NLogger { public class CustomLogFactory<T> where T : NLoggerSection { private readonly List<ILogWriterRegistration<T>> _logWriterTypes; public CustomLogFactory() { _logWriterTy...
bb704142-0a6c-4d10-b6a4-6c9efc90e3b5
{ "language": "C#" }
```c# using System.Reflection; [assembly: AssemblyCompany("Picoe Software Solutions Inc.")] [assembly: AssemblyProduct("")] [assembly: AssemblyCopyright("(c) 2010-2014 by Curtis Wensley, 2012-2014 by Vivek Jhaveri and contributors")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: Assembl...
```c# using System.Reflection; [assembly: AssemblyCompany("Picoe Software Solutions Inc.")] [assembly: AssemblyProduct("")] [assembly: AssemblyCopyright("(c) 2010-2014 by Curtis Wensley, 2012-2014 by Vivek Jhaveri and contributors")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: Assembl...
80e2c969-4b0f-4ba2-b982-b04bb67d174e
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; namespace AutoReservation.Ui.ViewModels { public class AsyncRelayCommand : ICommand { protected readonly Predicate<object> _canExecute; protecte...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; namespace AutoReservation.Ui.ViewModels { /** * From: http://blog.mycupof.net/2012/08/23/mvvm-asyncdelegatecommand-what-asyncawait-can-do-for-uidevelopment/ ...
b2f1f279-4229-4ee7-916e-2befac501fb7
{ "language": "C#" }
```c# using System; using System.Web; namespace WebServer { public class StatusCode : IHttpHandler { public void ProcessRequest(HttpContext context) { string statusCodeString = context.Request.QueryString["statuscode"]; string statusDescription = context.Request.QuerySt...
```c# using System; using System.Web; namespace WebServer { public class StatusCode : IHttpHandler { public void ProcessRequest(HttpContext context) { string statusCodeString = context.Request.QueryString["statuscode"]; string statusDescription = context.Request.QuerySt...
cccf7bb5-f07b-4052-bb11-27d7a5ff32bb
{ "language": "C#" }
```c# //We are given numbers N and M and the following operations: // * `N = N+1` // * `N = N+2` // * `N = N*2` // - Write a program that finds the shortest sequence of operations from the list above that starts from `N` and finishes in `M`. // - _Hint_: use a queue. // - Example: `N = 5`, `M = 16` // - Sequen...
```c# //We are given numbers N and M and the following operations: // * `N = N+1` // * `N = N+2` // * `N = N*2` // - Write a program that finds the shortest sequence of operations from the list above that starts from `N` and finishes in `M`. // - _Hint_: use a queue. // - Example: `N = 5`, `M = 16` // - Sequen...
78cc1cc5-2715-4d93-8801-30230c543250
{ "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...
b75a1137-9ea5-463d-a501-1413019431d1
{ "language": "C#" }
```c# using Xunit; using Unity.SolrNetCloudIntegration; using Unity; namespace SolrNet.Cloud.Tests { public class UnityTests { private IUnityContainer Setup() { return new SolrNetContainerConfiguration().ConfigureContainer( new FakeProvider(), new UnityConta...
```c# using Xunit; using Unity.SolrNetCloudIntegration; using Unity; namespace SolrNet.Cloud.Tests { public class UnityTests { private IUnityContainer Setup() { return new SolrNetContainerConfiguration().ConfigureContainer( new FakeProvider(), new UnityConta...
c6a20d27-e0b6-4821-b719-406821eb89e8
{ "language": "C#" }
```c# using System; using Cake.Core; using Cake.Core.Diagnostics; using Cake.Module.Shared; using CakeBuildLog = Cake.Core.Diagnostics.CakeBuildLog; namespace Cake.TeamCity.Module { public class TeamCityLog : ICakeLog { public TeamCityLog(IConsole console, Verbosity verbosity = Verbosity.Normal) ...
```c# using System; using Cake.Core; using Cake.Core.Diagnostics; using Cake.Module.Shared; using CakeBuildLog = Cake.Core.Diagnostics.CakeBuildLog; namespace Cake.TeamCity.Module { public class TeamCityLog : ICakeLog { public TeamCityLog(IConsole console, Verbosity verbosity = Verbosity.Normal) ...
453a2ef2-0284-453b-99a9-3f2e12a996a9
{ "language": "C#" }
```c# using System; using System.Threading.Tasks; using Messages_Stateless; using NServiceBus; namespace Back_Stateless { public class SubmitOrderHandler : IHandleMessages<SubmitOrder> { private OrderContext orderContext; public SubmitOrderHandler(OrderContext orderContext) ...
```c# using System; using System.Threading.Tasks; using Messages_Stateless; using NServiceBus; namespace Back_Stateless { public class SubmitOrderHandler : IHandleMessages<SubmitOrder> { private OrderContext orderContext; public SubmitOrderHandler(OrderContext orderContext) ...
ecd85935-2422-4e87-8640-0810aab8bbbd
{ "language": "C#" }
```c# #tool "nuget:?package=GitVersion.CommandLine" #addin "Cake.Yaml" public class ContextInfo { public string NugetVersion { get; set; } public string AssemblyVersion { get; set; } public GitVersion Git { get; set; } public string BuildVersion { get { return NugetVersion + "-" + Git.Sha;...
```c# #tool "nuget:?package=GitVersion.CommandLine" #addin "Cake.Yaml" public class ContextInfo { public string NugetVersion { get; set; } public string AssemblyVersion { get; set; } public GitVersion Git { get; set; } public string BuildVersion { get { return NugetVersion + "-" + Git.Sha;...
4c68fdbe-5c68-48aa-89c9-aca29d718b7f
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RazorEngine; using NUnit.Framework; namespace Test.RazorEngine { /// <summary> /// Various general tests. /// </summary> [TestFixture] public class VariousTestsFixture ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RazorEngine; using NUnit.Framework; namespace Test.RazorEngine { /// <summary> /// Various general tests. /// </summary> [TestFixture] public class VariousTestsFixture ...
a12cde50-4d59-49b4-9dc6-807544bfc19b
{ "language": "C#" }
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; namespace System.Collections.Generic { /// <summary> /// Thes...
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable enable using System.Runtime.CompilerServices; namespace System.Collections.Generic { /// <summ...
8340c072-2b2c-4edb-8614-6e15e8e124eb
{ "language": "C#" }
```c# using System; using System.IO; using System.Text; namespace ValveResourceFormat.ResourceTypes { public class Panorama : Blocks.ResourceData { public byte[] Data { get; private set; } public uint Crc32 { get; private set; } public override void Read(BinaryReader reader, Resource ...
```c# using System; using System.Collections.Generic; using System.IO; using System.Text; namespace ValveResourceFormat.ResourceTypes { public class Panorama : Blocks.ResourceData { public class NameEntry { public string Name { get; set; } public uint CRC32 { get; set; ...
7c6ef8cb-f04e-4f70-8c2f-568029e6aa54
{ "language": "C#" }
```c# // Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
```c# // Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
b640e2e1-858f-45fd-bd5f-f64e13dd0215
{ "language": "C#" }
```c# using Umbraco.Core; using Archetype.Umbraco.Models; namespace Archetype.Umbraco.Extensions { public static class Extensions { //lifted from the core as it is marked 'internal' public static bool DetectIsJson(this string input) { input = input.Trim(); retur...
```c# using System; using System.Web; using System.Text; using System.Text.RegularExpressions; using System.Collections.Generic; using Umbraco.Core; using Umbraco.Web; using Archetype.Umbraco.Models; namespace Archetype.Umbraco.Extensions { public static class Extensions { //lifted from the core as it...
5ffd86d0-8df8-4039-a0d5-9c9a85e9f99b
{ "language": "C#" }
```c# using System; using System.Linq; using Android.OS; using Android.Views; using Android.Widget; using Toggl.Joey.UI.Adapters; using ListFragment = Android.Support.V4.App.ListFragment; namespace Toggl.Joey.UI.Fragments { public class RecentTimeEntriesListFragment : ListFragment { public override vo...
```c# using System; using System.Linq; using Android.OS; using Android.Views; using Android.Widget; using Toggl.Joey.UI.Adapters; using ListFragment = Android.Support.V4.App.ListFragment; namespace Toggl.Joey.UI.Fragments { public class RecentTimeEntriesListFragment : ListFragment { public override vo...
0db20ffd-d598-43ac-9c9b-67cc12823d39
{ "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 Newtonsoft.Json; using osu.Game.Users; namespace osu.Game.Online.Multiplayer { [Serializable] public class Multiplaye...
```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 Newtonsoft.Json; using osu.Game.Online.Rooms; using osu.Game.Users; namespace osu.Game.Online.Multiplayer { [Serializable...
5c0d4721-64ff-4814-a4e8-42e1f18f82ce
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Linq; using FastMember; using Newtonsoft.Json; namespace MyAccounts.Business.Extensions { public static class ObjectExtensions { public static IDictionary<string, string> ToRawMembersDictionary(this object obj) { var accessor = T...
```c# using System.Collections.Generic; using System.Linq; using FastMember; using Newtonsoft.Json; namespace MyAccounts.Business.Extensions { public static class ObjectExtensions { public static IDictionary<string, string> ToRawMembersDictionary(this object obj) { var accessor = T...
78d226db-6842-4763-936f-7b106d478cf2
{ "language": "C#" }
```c# using System.Web.Http; using Newtonsoft.Json; namespace WebApiTestApplication.Controllers { public class MegaClass : AnotherClass { public int Something { get; set; } } [RoutePrefix("api/thingy")] public class ThingyController : ApiController { [HttpGet] [Route("...
```c# using System.Web.Http; using Newtonsoft.Json; namespace WebApiTestApplication.Controllers { public class MegaClass : AnotherClass { public int Something { get; set; } } public class Chain1<T> { public T Value1 { get; set; } } public class Chain2<TValue> : Chain1<TVa...
f166c49a-975d-4662-8a3f-1f4eb8cd0d7c
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; namespace PixelPet.Commands { internal class ImportBitmapCmd : CliCommand { public ImportBitmapCmd() : base ("Import-Bi...
```c# using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; namespace PixelPet.Commands { internal class ImportBitmapCmd : CliCommand { public ImportBitmapCmd() : base ("Import-Bi...
f5cb226a-3cd2-4a3b-a2a9-eafcc4b99058
{ "language": "C#" }
```c# using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly...
```c# using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly...
9e6f158c-7491-4a40-8ef6-47463e3fff8f
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Framework.Localisation { /// <summary> /// Indicates that the members of an enum can be localised. /// </summary> [Attr...
```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.Extensions.TypeExtensions; namespace osu.Framework.Localisation { /// <summary> /// Indicates that the members of an enum...
8a6c73c8-12d8-432b-9df5-b5502579b44d
{ "language": "C#" }
```c# namespace AngleSharp.Services.Default { using System; using System.Net; /// <summary> /// Represents the default cookie service. This class can be inherited. /// </summary> public class MemoryCookieService : ICookieService { readonly CookieContainer _container; /// <...
```c# namespace AngleSharp.Services.Default { using System; using System.Net; /// <summary> /// Represents the default cookie service. This class can be inherited. /// </summary> public class MemoryCookieService : ICookieService { readonly CookieContainer _container; /// <...
04a0bef9-489e-40fa-8158-9c7af0dcf292
{ "language": "C#" }
```c# using ErgastApi.Client.Attributes; using ErgastApi.Responses; using ErgastApi.Responses.Models; namespace ErgastApi.Requests { public abstract class StandardRequest<TResponse> : ErgastRequest<TResponse> where TResponse : ErgastResponse { [UrlSegment("constructors")] public virtual string ...
```c# using ErgastApi.Client.Attributes; using ErgastApi.Responses; using ErgastApi.Responses.Models; namespace ErgastApi.Requests { public abstract class StandardRequest<TResponse> : ErgastRequest<TResponse> where TResponse : ErgastResponse { [UrlSegment("constructors")] public virtual string ...
cfe06ac0-1828-48fe-8226-2de37334b6b4
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Android.App; // 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. [as...
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Android.App; // 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. [as...
16f2e4f6-825e-4850-af14-d77f97580fc2
{ "language": "C#" }
```c# using osu_StreamCompanion.Code.Core.DataTypes; using osu_StreamCompanion.Code.Interfeaces; using osu_StreamCompanion.Code.Windows; namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window { public class WindowDataGetter :IModule,IMapDataGetter,IMainWindowUpdater { private MainWindowUpdat...
```c# using osu_StreamCompanion.Code.Core.DataTypes; using osu_StreamCompanion.Code.Interfeaces; using osu_StreamCompanion.Code.Windows; namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window { public class WindowDataGetter :IModule,IMapDataGetter,IMainWindowUpdater { private MainWindowUpdat...
599e3af2-9f7c-455d-b459-30ab1650c22c
{ "language": "C#" }
```c# using System; using System.IO; namespace Hangfire.LiteDB.Test.Utils { #pragma warning disable 1591 public static class ConnectionUtils { private const string Ext = "db"; private static string GetConnectionString() { return Path.GetFullPath(string.Format("Hang...
```c# using System; using System.IO; namespace Hangfire.LiteDB.Test.Utils { #pragma warning disable 1591 public static class ConnectionUtils { private const string Ext = "db"; private static string GetConnectionString() { var pathDb = Path.GetFullPath(string.Format...
7c8d8cb2-4b8c-4da5-9a18-9be943fdac93
{ "language": "C#" }
```c# using System; using System.Collections; using UnityEngine; public class ClockText : MonoBehaviour { private TextMesh _textMesh = null; private void Awake() { _textMesh = GetComponent<TextMesh>(); } private void Update() { StartCoroutine(UpdatePerSecond()); } pr...
```c# using System; using System.Collections; using UnityEngine; public class ClockText : MonoBehaviour { private TextMesh _textMesh = null; private void Awake() { _textMesh = GetComponent<TextMesh>(); } private void OnEnable() { StartCoroutine(UpdatePerSecond()); } ...
e334e821-1782-413b-83fb-bf69d6561f06
{ "language": "C#" }
```c# using Akka.Actor; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; namespace TrivialWebApiWithActor.Web { public class GreetController : Controller { readonly IActorRef _greeter; public GreetController(IActorRef greeter) { _greeter = greeter; ...
```c# using Akka.Actor; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using System.Threading.Tasks; namespace TrivialWebApiWithActor.Web { public class GreetController : Controller { readonly IActorRef _greeter; public GreetController(ILogger<GreetController> logg...
774a1b7d-d87d-4a6d-98a0-2d556be43ac1
{ "language": "C#" }
```c# using System; using NQuery.Data.Samples; namespace NQuery.Authoring.UnitTests { internal static class CompilationFactory { private static readonly DataContext DataContext = DataContextFactory.CreateNorthwind(); public static Compilation CreateQuery(string query) { in...
```c# using System; using NQuery.Data.Samples; using NQuery.Text; namespace NQuery.Authoring.UnitTests { internal static class CompilationFactory { private static readonly DataContext DataContext = DataContextFactory.CreateNorthwind(); public static Compilation CreateQuery(string query) ...
37addc7c-5ea0-4efe-9c9a-360ca806cb75
{ "language": "C#" }
```c# using System; using System.Threading.Tasks; using Nimbus.MessageContracts; namespace Nimbus { public static class BackwardCompatibilityAdaptorExtensions { [Obsolete("Deprecated in favour of .SendAt(...) and .SendAfter(...) methods. This adaptor method will be removed in a future release.")] ...
```c# using System; using System.Threading.Tasks; using Nimbus.MessageContracts; namespace Nimbus { public static class BackwardCompatibilityAdaptorExtensions { [Obsolete("Deprecated in favour of .SendAt(...) and .SendAfter(...) methods. This adaptor method will be removed in a future release.", true)...
6e8c2e46-2811-4ffc-a6a8-af99b3ac82f3
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using Oogstplanner.Data; using Oogstplanner.Models; namespace Oogstplanner.Services { public class CalendarLikingService : ServiceBase, ICalendarLikingService { readonly IUserService userService; public CalendarLikingSe...
```c# using System; using System.Collections.Generic; using System.Linq; using Oogstplanner.Data; using Oogstplanner.Models; namespace Oogstplanner.Services { public class CalendarLikingService : ServiceBase, ICalendarLikingService { readonly IUserService userService; public CalendarLikingSe...
3d4d5a71-982f-46ed-85a9-2cfebab50c14
{ "language": "C#" }
```c# using System.Collections.Generic; using HarryPotterUnity.Cards.Interfaces; using JetBrains.Annotations; using UnityEngine; namespace HarryPotterUnity.Cards.Generic { [UsedImplicitly] public class Lesson : GenericCard, IPersistentCard { public enum LessonTypes { Creatures = 0...
```c# using System.Collections.Generic; using HarryPotterUnity.Cards.Interfaces; using JetBrains.Annotations; using UnityEngine; namespace HarryPotterUnity.Cards.Generic { [UsedImplicitly] public class Lesson : GenericCard, IPersistentCard { public enum LessonTypes { Creatures = 0...
da54b072-7eec-446d-9f32-08945e9ed875
{ "language": "C#" }
```c# using Microsoft.Azure.Jobs.Host.Bindings; using Microsoft.Azure.Jobs.Host.Executors; using Microsoft.Azure.Jobs.Host.Indexers; using Microsoft.Azure.Jobs.Host.Listeners; using Microsoft.Azure.Jobs.Host.Loggers; using Microsoft.WindowsAzure.Storage.Queue; namespace Microsoft.Azure.Jobs.Host.Queues.Listeners { ...
```c# using System; using Microsoft.Azure.Jobs.Host.Bindings; using Microsoft.Azure.Jobs.Host.Executors; using Microsoft.Azure.Jobs.Host.Indexers; using Microsoft.Azure.Jobs.Host.Listeners; using Microsoft.Azure.Jobs.Host.Loggers; using Microsoft.WindowsAzure.Storage.Queue; namespace Microsoft.Azure.Jobs.Host.Queues....
67ddcbeb-eeba-4bb6-ac95-5f4bedf08e75
{ "language": "C#" }
```c# using ML.TypingClassifier.Models; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace ML.TypingClassifier.Controllers { [RoutePrefix("sink")] public class SinkControl...
```c# using ML.TypingClassifier.Models; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace ML.TypingClassifier.Controllers { [RoutePrefix("sink")] public class SinkControl...
d3be3061-c69b-41c9-84b4-ae2da2bcec6b
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using NServiceMVC; using AttributeRouting; namespace NServiceMVC.Examples.Todomvc.Controllers { public class TodosController : ServiceController { [GET("todos")] public IEnumerable<Models.Todo> Index() ...
```c# using System; using System.Collections.Generic; using System.Linq; using NServiceMVC; using AttributeRouting; using System.ComponentModel; namespace NServiceMVC.Examples.Todomvc.Controllers { public class TodosController : ServiceController { private static IList<Models.Todo> Todos; /...
70483be7-b9ce-489f-b0ad-0f482825d923
{ "language": "C#" }
```c# using System.Collections.Generic; namespace Twitter.Streaming.Configurations { public interface ITwitterListnerConfiguration { ITwitterCredential Credentials { get; } IEnumerable<string> Tracks { get; } IEnumerable<int> Languages { get; } } public class TwitterListnerC...
```c# using System.Collections.Generic; namespace Twitter.Streaming.Configurations { public interface ITwitterListnerConfiguration { ITwitterCredential Credentials { get; } IEnumerable<string> Tracks { get; } IEnumerable<int> Languages { get; } } public class TwitterListnerC...
4c0d43e6-13da-43ac-ba77-7e34eeff5437
{ "language": "C#" }
```c# using System; using CppSharp.Types; namespace CppSharp.Passes { public class ResolveIncompleteDeclsPass : TranslationUnitPass { public ResolveIncompleteDeclsPass() { } public override bool VisitClassDecl(Class @class) { if (@class.Ignore) ...
```c# using System; using CppSharp.Types; namespace CppSharp.Passes { public class ResolveIncompleteDeclsPass : TranslationUnitPass { public ResolveIncompleteDeclsPass() { } public override bool VisitClassDecl(Class @class) { if (@class.Ignore) ...
9df8595b-95a7-4acc-a411-9f0d5b71f57d
{ "language": "C#" }
```c# using System; using System.Diagnostics; using O365.Security.ETW; namespace hiddentreasure_etw_demo { public static class PowerShellImageLoad { public static UserTrace CreateTrace() { var filter = new EventFilter(Filter .EventIdIs(5) .And(Unicod...
```c# using System; using System.Diagnostics; using O365.Security.ETW; namespace hiddentreasure_etw_demo { public static class PowerShellImageLoad { public static UserTrace CreateTrace() { // Unfortunately, this detection won't work for // processes that *already* have ...
529f8799-26ee-431a-a77f-633c0df43caa
{ "language": "C#" }
```c# // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. using Microsoft.Extensions.Logging; using System.Threading.Tasks; using IdentityServer4.Models; namespace IdentityServer4.Validation { ...
```c# // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. using Microsoft.Extensions.Logging; using System.Threading.Tasks; using IdentityServer4.Models; namespace IdentityServer4.Validation { ...
a8c01837-4571-40cb-8ed1-93b382532368
{ "language": "C#" }
```c# @model IEnumerable<Unit> <div class="page-header"> <h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default btn-xs" })</h1> </div> <table class="table table-striped"> <thead> <tr> <th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th> ...
```c# @model IEnumerable<Unit> <div class="page-header"> <h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default btn-xs" })</h1> </div> <table class="table table-striped"> <thead> <tr> <th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th> ...
c5b7cd2a-b2c5-4483-8f06-39f2665dd38d
{ "language": "C#" }
```c# using System.IO; using System.Web.Hosting; namespace NuGet.Lucene.Web { public class NuGetWebApiWebHostSettings : NuGetWebApiSettings { protected override string MapPathFromAppSetting(string key, string defaultValue) { var path = base.GetAppSetting(key, defaultValue); ...
```c# using System.Collections.Specialized; using System.IO; using System.Web.Hosting; namespace NuGet.Lucene.Web { public class NuGetWebApiWebHostSettings : NuGetWebApiSettings { public NuGetWebApiWebHostSettings(string prefix) : base(prefix) { } public NuGetWebApiWebHostSett...
13379512-3029-4f92-97ea-6d2d82ef6f29
{ "language": "C#" }
```c# using Sakuno.UserInterface.ObjectOperations; using System; using System.Windows.Markup; namespace Sakuno.UserInterface.Commands { public class InvokeMethodExtension : MarkupExtension { string r_Method; object r_Parameter; public InvokeMethodExtension(string rpMethod) : this(rpM...
```c# using Sakuno.UserInterface.ObjectOperations; using System; using System.Windows.Data; using System.Windows.Markup; namespace Sakuno.UserInterface.Commands { public class InvokeMethodExtension : MarkupExtension { string r_Method; object r_Parameter; public InvokeMethodExtension(...
3809fe1e-6c93-45fc-93b3-f7b79c4f01b9
{ "language": "C#" }
```c# using BatteryCommander.Web.Models; using BatteryCommander.Web.Services; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Memory; using System.Net; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers.API { public class UsersController : ApiController { priva...
```c# using BatteryCommander.Web.Models; using BatteryCommander.Web.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; using Newtonsoft.Json; using System; using System.Net; using System.Net.Http; using Syst...
2e98d48e-3d7d-4b17-abbe-0440fc248530
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using UrlShortenerApi.Data; using UrlShortenerApi.Models; namespace UrlShortenerApi.Repositories { public class UrlRepository : IUrlRepository { ApplicationDbContext _context; public UrlRepository(ApplicationDbContext con...
```c# using System; using System.Collections.Generic; using System.Linq; using UrlShortenerApi.Data; using UrlShortenerApi.Models; namespace UrlShortenerApi.Repositories { public class UrlRepository : IUrlRepository { ApplicationDbContext _context; public UrlRepository(ApplicationDbContext con...
f241d2ce-06f6-40d2-bc61-d041ec314f0b
{ "language": "C#" }
```c# using System; using System.Globalization; using Newtonsoft.Json; namespace Twilio.Converters { /// <summary> /// Serialization methods for various datatypes before making requests to the API /// </summary> public class Serializers { /// <summary> /// Produce a json string fro...
```c# using System; using System.Globalization; using Newtonsoft.Json; namespace Twilio.Converters { /// <summary> /// Serialization methods for various datatypes before making requests to the API /// </summary> public class Serializers { /// <summary> /// Produce a json string fro...
8d5862ac-2071-4255-9fa0-06b73f76aa63
{ "language": "C#" }
```c#  using System.Collections.Generic; using DataHelpers.Contracts; namespace DataHelpers { /// <summary> /// Base class validator. All validators should be derived from this class. /// </summary> public class ValidationRunner { /// <summary> /// Check to see if the current ...
```c#  using System.Collections.Generic; using DataHelpers.Contracts; namespace DataHelpers { /// <summary> /// Base class validator. All validators should be derived from this class. /// </summary> public class ValidationRunner { /// <summary> /// Check to see if the cur...
fa9025fd-4db3-465e-b57a-40a49b0e4b01
{ "language": "C#" }
```c# using System.Linq; using GekkoAssembler.IntermediateRepresentation; namespace GekkoAssembler.Optimizers { public class WriteDataOptimizer : IOptimizer { public IRCodeBlock Optimize(IRCodeBlock block) { var units = block.Units; var replaced = true; whi...
```c# using System.Linq; using GekkoAssembler.IntermediateRepresentation; namespace GekkoAssembler.Optimizers { public class WriteDataOptimizer : IOptimizer { public IRCodeBlock Optimize(IRCodeBlock block) { var units = block.Units; var replaced = true; whi...
1ed972ad-d271-415c-8c7c-cf7ed32687c9
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using Autofac.Core.Lifetime; namespace Autofac.Core { /// <summary> /// Extension methods for <see cref="IComponentRegistration"/>. /// </summary> public static class ComponentRegistrationExtensions { /// <summary> ...
```c# using System; using System.Collections.Generic; using System.Linq; using Autofac.Core.Lifetime; namespace Autofac.Core { /// <summary> /// Extension methods for <see cref="IComponentRegistration"/>. /// </summary> public static class ComponentRegistrationExtensions { /// <summary> ...
74bc53f2-d985-44b9-9ad0-7178799f2dd8
{ "language": "C#" }
```c# using System.Xml.Serialization; namespace SevenDigital.Api.Schema.Playlists.Response.Endpoints { public class PlaylistTag { [XmlElement("name")] public string Name { get; set; } } }``` Add playlist tags hidden property
```c# using System.Xml.Serialization; namespace SevenDigital.Api.Schema.Playlists.Response.Endpoints { public class PlaylistTag { [XmlElement("name")] public string Name { get; set; } [XmlElement("hidden")] public bool Hidden { get; set; } } }```
c5f8689e-3c03-4846-bfb2-ab8f817b3792
{ "language": "C#" }
```c# using System.IO; using Microsoft.Win32; namespace Cosmos.Build.Builder.Services { internal class InnoSetupService : IInnoSetupService { private const string InnoSetupRegistryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1"; public string GetInnoSetupInstalla...
```c# using System.IO; using Microsoft.Win32; namespace Cosmos.Build.Builder.Services { internal class InnoSetupService : IInnoSetupService { private const string InnoSetupRegistryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 6_is1"; public string GetInnoSetupInstalla...
c4d0e216-faee-4749-a073-78bf4b46f190
{ "language": "C#" }
```c# using System; using NUnit.Framework; using Realms; using System.Threading; using System.IO; namespace IntegrationTests.Shared { [TestFixture] public class NotificationTests { private string _databasePath; private Realm _realm; private void WriteOnDifferentThread(Action<Realm...
```c# using System; using NUnit.Framework; using Realms; using System.Threading; using System.IO; namespace IntegrationTests.Shared { [TestFixture] public class NotificationTests { private string _databasePath; private Realm _realm; [SetUp] public void Setup() { ...
af1a939f-7852-4c3f-b989-49ebaebb30be
{ "language": "C#" }
```c# using System; using System.IO; namespace NuGetPe { public sealed class TemporaryFile : IDisposable { public TemporaryFile(Stream stream, string? extension = null) { if (stream == null) throw new ArgumentNullException(nameof(stream)); if (string.Is...
```c# using System; using System.IO; namespace NuGetPe { public sealed class TemporaryFile : IDisposable { public TemporaryFile(Stream stream, string? extension = null) { if (stream == null) throw new ArgumentNullException(nameof(stream)); if (string.Is...
e12630cd-b51d-433c-b33d-94b5f0dfef83
{ "language": "C#" }
```c# using UnityEngine; using System.Collections; public class DamageDealer : MonoBehaviour { public float damageToDeal = 1; // Use this for initialization void OnCollisionStay2D(Collision2D col) { OnTriggerEnter2D(col.collider); } void OnTriggerStay2D(Collider2D col) { OnT...
```c# using UnityEngine; using System.Collections; public class DamageDealer : MonoBehaviour { public float damageToDeal = 1; void OnCollisionStay2D(Collision2D col) { handleCollision(col.collider); } void OnTriggerStay2D(Collider2D col) { handleCollision(col); } void OnCollisi...
dc5fedb5-d821-4a92-84af-e1151076c55a
{ "language": "C#" }
```c# namespace EPPlusEnumerable { using System; using System.Reflection; internal static class Extensions { public static T GetCustomAttribute<T>(this MemberInfo element, bool inherit) where T : Attribute { return (T)Attribute.GetCustomAttribute(element, typeof(T), inherit...
```c# namespace EPPlusEnumerable { using System; using System.Reflection; internal static class Extensions { public static T GetCustomAttribute<T>(this MemberInfo element, Type type, bool inherit) where T : Attribute { var attr = (T)Attribute.GetCustomAttribute(element, typ...
595202c1-5020-4e4f-952a-790f86ba4d01
{ "language": "C#" }
```c# using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Text.Editor; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Microsoft.CodeAnalysis.Editor.UnitTests { internal static class TextEditorFactoryExtensions { ...
```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 Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Text.Editor; using System; namespace Microsoft.CodeAnalysis.Editor.UnitTests { int...
c7d377e6-31be-4dc7-b79c-2e0e5622ece7
{ "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.Framework.Input; using osu.Framework.Testing; namespace osu.Framework.Tests.Platform { [TestFixture] public class UserInpu...
```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.Framework.Graphics; using osu.Framework.Platform; namespace osu.Framework.Tests.Platform { [TestFixture] public class User...
54554b30-49bd-4e5a-86fb-161670ceee62
{ "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.Game.Graphics; using osuTK.Graphics; namespace osu.Game.Overlays.Home.Friends { public class FriendsOnlineStatusItem : OverlayUpdateSt...
```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.Game.Graphics; using osuTK.Graphics; namespace osu.Game.Overlays.Home.Friends { public class FriendsOnlineStatusItem : OverlayUpdateSt...
f935b8a0-527e-44ad-a61e-0533b765eae2
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Mania.Edit.Blueprints; using osu.Game.Rulesets.Mania.Objects.Drawables; usin...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Mania.Edit.Blueprints; using osu.Game.Rulesets.Mania.Objects.Drawables; usin...
b0344434-a50c-4ab9-9780-d55a015f8262
{ "language": "C#" }
```c# using System; using System.IO; using System.Linq; namespace NBi.Service.RunnerConfig { class NUnitRunnerConfigBuilder : AbstractRunnerConfigBuilder { public NUnitRunnerConfigBuilder() : base("NBi.config", "NUnit.nunit") { } public NUnitRunnerCo...
```c# using System; using System.IO; using System.Linq; namespace NBi.Service.RunnerConfig { class NUnitRunnerConfigBuilder : AbstractRunnerConfigBuilder { public NUnitRunnerConfigBuilder() : base("NBi.config", "NUnit.nunit") { } public NUnitRunnerCo...
bb696708-76d5-4e3a-a4c6-699e66d9e743
{ "language": "C#" }
```c# using System; using System.Threading; using System.Threading.Tasks; using Knapcode.CheckRepublic.Logic.Entities; using Microsoft.EntityFrameworkCore; namespace Knapcode.CheckRepublic.Logic.Business { public class HeartbeatService : IHeartbeatService { private readonly CheckContext _context; ...
```c# using System; using System.Threading; using System.Threading.Tasks; using Knapcode.CheckRepublic.Logic.Entities; using Microsoft.EntityFrameworkCore; namespace Knapcode.CheckRepublic.Logic.Business { public class HeartbeatService : IHeartbeatService { private readonly CheckContext _context; ...
f094e2d1-87c8-4534-a6aa-a8600d2778b9
{ "language": "C#" }
```c# using System; using Glimpse.Common; using Glimpse.Initialization; using Microsoft.AspNet.Razor.Runtime.TagHelpers; namespace Glimpse.Agent.Razor { [HtmlTargetElement("body")] public class ScriptInjector : TagHelper { private readonly Guid _requestId; private readonly ScriptOptions _sc...
```c# using System; using Glimpse.Common; using Glimpse.Initialization; using Microsoft.AspNet.Razor.Runtime.TagHelpers; namespace Glimpse.Agent.Razor { [HtmlTargetElement("body")] public class ScriptInjector : TagHelper { private readonly Guid _requestId; private readonly ScriptOptions _sc...
9e2fc572-35fa-4c86-a573-8469638906c0
{ "language": "C#" }
```c# using System; using System.Threading.Tasks; using Newtonsoft.Json; namespace Microsoft.AspNet.Mvc { public class SmartJsonResult : ActionResult { public SmartJsonResult() : base() { } public JsonSerializerSettings Settings { get; set; } public objec...
```c# using System; using System.Threading.Tasks; using Microsoft.AspNet.Http; using Newtonsoft.Json; namespace Microsoft.AspNet.Mvc { public class SmartJsonResult : ActionResult { public SmartJsonResult() : base() { } public JsonSerializerSettings Settings { get;...
16978ce8-1640-4dfa-a99d-c2ab0fe00bfd
{ "language": "C#" }
```c# using System.Collections.Generic; // Using directives for plugin use. using MeidoCommon; using System.ComponentModel.Composition; [Export(typeof(IMeidoHook))] public class MyClass : IMeidoHook { readonly IIrcComm irc; public string Prefix { get; set; } public string Name { get { return ...
```c# using System.Collections.Generic; // Using directives for plugin use. using MeidoCommon; using System.ComponentModel.Composition; // IMeidoHook wants you to implement `Name`, `Version`, `Help` and the `Stop` method. [Export(typeof(IMeidoHook))] public class MyClass : IMeidoHook { public string Name { ...
a0a81ca8-7568-408f-b9a0-aa2fd8be21db
{ "language": "C#" }
```c# using System; using SFA.DAS.CommitmentsV2.Types; namespace SFA.DAS.CommitmentsV2.Messages.Events { public class EntityStateChangedEvent { public Guid CorrelationId { get; set; } public UserAction StateChangeType { get; set; } public string EntityType { get; set; } public ...
```c# using System; using SFA.DAS.CommitmentsV2.Types; namespace SFA.DAS.CommitmentsV2.Messages.Events { public class EntityStateChangedEvent { public Guid CorrelationId { get; set; } public UserAction StateChangeType { get; set; } public string EntityType { get; set; } public ...
fd49f278-62ed-4e2e-9e49-033177d63145
{ "language": "C#" }
```c# using System; using System.Net; namespace BmpListener.Bgp { public class IPAddrPrefix { public IPAddrPrefix(byte[] data, AddressFamily afi = AddressFamily.IP) { DecodeFromBytes(data, afi); } public byte Length { get; private set; } public IPAddress Pr...
```c# using System; using System.Net; namespace BmpListener.Bgp { public class IPAddrPrefix { public IPAddrPrefix(ArraySegment<byte> data, AddressFamily afi = AddressFamily.IP) { Length = data.Array[data.Offset]; var ipBytes = new byte[ByteLength - 1]; Array...
5134a97e-edf9-4b7d-b3b6-6bef62675e63
{ "language": "C#" }
```c# using System.Windows; using System.Windows.Controls; using System.Windows.Data; namespace Junctionizer.UI.Columns { public partial class DependentOnFinalSizeColumn { public DependentOnFinalSizeColumn() { InitializeComponent(); } public override BindingBase Bi...
```c# using System.Windows; using System.Windows.Controls; using System.Windows.Data; using Junctionizer.Model; namespace Junctionizer.UI.Columns { public partial class DependentOnFinalSizeColumn { public DependentOnFinalSizeColumn() { InitializeComponent(); } pub...
bbb6f400-359c-49df-990a-2f479e8add16
{ "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 osu.Framework.Graphics; using osu.Framework.Bindables; using osu.Framework.Graphics.Shapes; using osu.Framewo...
```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 osu.Framework.Graphics; using osu.Framework.Bindables; using osu.Framework.Graphics.Shapes; using osu.Framewo...
87e7cbaa-a5ef-404f-8451-2383ba13d67c
{ "language": "C#" }
```c# using System.Web.Mvc; namespace OdeToFood.Controllers { public class CuisineController : Controller { // // GET: /Cuisine/ // Including parameter named "name" causes MVC framework to try to // find a parameter named "name" in ANY of the web request (routing // d...
```c# using System.Net; using System.Web.Mvc; namespace OdeToFood.Controllers { public class CuisineController : Controller { // // GET: /Cuisine/ // Including parameter named "name" causes MVC framework to try to // find a parameter named "name" in ANY of the web request (ro...
ef488810-7d06-4f67-a6dd-59f278aa9023
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using Assent.Reporters.DiffPrograms; namespace Assent.Reporters { public class DiffReporter : IReporter { #if NET45 internal static readonly bool IsWindows = Environment.OSVersion.Platform == PlatformID.Win32NT; #else internal static readonl...
```c# using System; using System.Collections.Generic; using Assent.Reporters.DiffPrograms; namespace Assent.Reporters { public class DiffReporter : IReporter { #if NET45 internal static readonly bool IsWindows = Environment.OSVersion.Platform == PlatformID.Win32NT; #else internal static readonl...
664b1281-d4c2-4d16-ab26-8e3f739d2b46
{ "language": "C#" }
```c# // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. using OpenLiveWriter.CoreServices; using OpenLiveWriter.CoreServices.ResourceDownloading; using Squirrel; using System; using System.Collections; using System.Diagnostics; u...
```c# // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. using OpenLiveWriter.CoreServices; using OpenLiveWriter.CoreServices.ResourceDownloading; using Squirrel; using System; using System.Collections; using System.Diagnostics; u...
964b09af-f26b-4cc8-b0c2-832403ae028f
{ "language": "C#" }
```c# #if !NETSTANDARD1_3 && !NETSTANDARD1_6 using System.Runtime.InteropServices; using System.Threading; namespace NUnit.Framework.Internal { [TestFixture] public class ThreadUtilityTests { [Platform("Win")] [Timeout(1000)] [TestCase(false, TestName = "Abort")] [TestCase...
```c# #if !NETSTANDARD1_3 && !NETSTANDARD1_6 using System.Runtime.InteropServices; using System.Threading; namespace NUnit.Framework.Internal { [TestFixture] public class ThreadUtilityTests { [Platform("Win")] [TestCase(false, TestName = "Abort")] [TestCase(true, TestName = "Kill"...
0aee307b-7fb8-4de0-9fb5-c9314f29251d
{ "language": "C#" }
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.ComponentModel.Composition; using Microsoft.CodeAnalysis.Editor.Host; using Micros...
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.ComponentModel.Composition; using Microsoft.CodeAnalysis.Editor.Host; using Micros...
ddd6b7e4-cc5d-44ba-957b-fbb84c45281f
{ "language": "C#" }
```c# using LogicalShift.Reason.Api; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace LogicalShift.Reason.Solvers { /// <summary> /// A query result where the next result is retrieved by a function /// </summary> public class ChainedResult : IQ...
```c# using LogicalShift.Reason.Api; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace LogicalShift.Reason.Solvers { /// <summary> /// A query result where the next result is retrieved by a function /// </summary> public class ChainedResult : IQ...
249a89a1-5d02-4f42-877e-98f836c29ca4
{ "language": "C#" }
```c# using System; using System.Reactive.Disposables; using SolidWorks.Interop.sldworks; namespace SolidworksAddinFramework { public static class ModelViewManagerExtensions { public static IDisposable CreateSectionView(this IModelViewManager modelViewManager, Action<SectionViewData> config) { ...
```c# using System; using System.Reactive.Disposables; using SolidWorks.Interop.sldworks; namespace SolidworksAddinFramework { public static class ModelViewManagerExtensions { public static IDisposable CreateSectionView(this IModelViewManager modelViewManager, Action<SectionViewData> config) { ...
d6dec325-b06a-4ed5-bc68-7055518ea549
{ "language": "C#" }
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; internal static partial class Interop { internal stat...
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; internal static partial class Interop { internal stat...
b805d812-8515-4ab6-8bcd-9326cea86de8
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using wwwplatform.Extensions; using wwwplatform.Models; namespace wwwplatform.Controllers { public class HomeController : BaseController { public ActionResult Index() { ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using wwwplatform.Extensions; using wwwplatform.Models; namespace wwwplatform.Controllers { public class HomeController : BaseController { public ActionResult Index() { ...
c6290e39-f179-4902-b926-2863a1f2c07f
{ "language": "C#" }
```c# using CarFuel.Models; using CarFuel.Services; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Microsoft.AspNet.Identity; using CarFuel.DataAccess; namespace CarFuel.Controllers { public class CarsController : Controller { //private...
```c# using CarFuel.Models; using CarFuel.Services; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Microsoft.AspNet.Identity; using CarFuel.DataAccess; using System.Net; namespace CarFuel.Controllers { public class CarsController : Controller {...
3bc5722a-8619-40b1-8c10-8775364c82f0
{ "language": "C#" }
```c# using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; using System.Threading.Tasks; namespace Box.V2.Test.Integration { [TestClass] public class BoxUsersManagerTestIntegration : BoxResourceManagerTestIntegration { [TestMethod] public async Task Users...
```c# using System; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; using System.Threading.Tasks; namespace Box.V2.Test.Integration { [TestClass] public class BoxUsersManagerTestIntegration : BoxResourceManagerTestIntegration { [TestMethod] publ...
644d7f65-e576-434b-9d0d-f7a1b7115191
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Edit; using osu.Game.Screens.Edit.Compose.Components.Timeline; using ...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Edit; using osu.Game.Screens.Edit.Compose.Components.Timeline; using ...
84655a0f-cfab-47a6-a300-bfba350368d0
{ "language": "C#" }
```c# using System; namespace Stylet.Samples.MasterDetail { public class EmployeeModel { public string Name { get; set; } } } ``` Make Master/Detail sample not rely on WPF magic
```c# using System; namespace Stylet.Samples.MasterDetail { public class EmployeeModel : PropertyChangedBase { private string _name; public string Name { get { return this._name; } set { this.SetAndNotify(ref this._name, value); } } } } ```
a7c4391f-3416-49d6-8a12-d97bea1ee4a8
{ "language": "C#" }
```c# using Alensia.Core.UI; using UniRx; using UnityEditor; using UnityEngine; namespace Alensia.Demo.Controller { public class MainMenu : Box { protected readonly CompositeDisposable Observers; public MainMenu(IUIManager manager) : base( new BoxLayout(BoxLayout.BoxOrientation.Ver...
```c# using Alensia.Core.UI; using UniRx; using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif namespace Alensia.Demo.Controller { public class MainMenu : Box { protected readonly CompositeDisposable Observers; public MainMenu(IUIManager manager) : base( new BoxLayout(BoxL...
4f64e478-e123-43cf-82c3-eb12e686b891
{ "language": "C#" }
```c# using System.Threading.Tasks; using System.Web.Mvc; using DancingGoat.Models; using System.Collections.Generic; namespace DancingGoat.Controllers { public class AboutController : ControllerBase { public async Task<ActionResult> Index() { var response = await client.GetItemAsy...
```c# using System.Threading.Tasks; using System.Web.Mvc; using DancingGoat.Models; using System.Collections.Generic; using KenticoCloud.Delivery; namespace DancingGoat.Controllers { public class AboutController : ControllerBase { public async Task<ActionResult> Index() { var respon...
5adf8ad1-1c6b-4ca0-85f0-ba6e0beeaa41
{ "language": "C#" }
```c# using System.Reflection; 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: AssemblyTitle("SiteWarmer.Core")] [assembly: Assem...
```c# using System.Reflection; 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: AssemblyTitle("SiteWarmer.Core")] [assembly: Assem...
f499fa7a-51ad-421f-8ca9-3e2151aa35e9
{ "language": "C#" }
```c# /* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) 2015, MPL Ali Taheri Moghaddar ali.taheri.m@gmail.com */ namespace Pablo.Graphics {...
```c# /* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) 2015, MPL Ali Taheri Moghaddar ali.taheri.m@gmail.com */ namespace Pablo.Graphics {...
95a3c6fa-b74b-43cd-a522-e4a9cce202d5
{ "language": "C#" }
```c# using Microsoft.Extensions.Logging; using Newtonsoft.Json; namespace ExRam.Gremlinq.Providers.WebSocket { public readonly struct QueryLoggingOptions { public static readonly QueryLoggingOptions Default = new QueryLoggingOptions(LogLevel.Trace, QueryLoggingVerbosity.QueryOnly, Formatting.None); ...
```c# using Microsoft.Extensions.Logging; using Newtonsoft.Json; namespace ExRam.Gremlinq.Providers.WebSocket { public readonly struct QueryLoggingOptions { public static readonly QueryLoggingOptions Default = new QueryLoggingOptions(LogLevel.Debug, QueryLoggingVerbosity.QueryOnly, Formatting.None); ...
0c62c5b8-6b35-4768-879e-fa2a958436e2
{ "language": "C#" }
```c# using System; using System.Linq; using System.Web.Http; using Peregrine.Data; namespace Peregrine.Web.Controllers { [RoutePrefix("api/tournaments")] public class TournamentsController : ApiController { [Route] public IHttpActionResult Get() { using(var dataContext = new DataContext()) ...
```c# using System; using System.Linq; using System.Web.Http; using Peregrine.Data; namespace Peregrine.Web.Controllers { [RoutePrefix("api/tournaments")] public class TournamentsController : ApiController { [Route] public IHttpActionResult Get() { using(var dataContext = new DataContext()) ...
92fc3e59-4f69-4603-ad0a-12a9e0f1aef8
{ "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 Microsoft.MixedReality.Toolkit.Utilities; namespace Microsoft.MixedReality.Toolkit.Input { public static class HandJointUtils { /// <sum...
```c# // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Utilities; namespace Microsoft.MixedReality.Toolkit.Input { public static class HandJointUtils { /// <sum...
06edf765-05b1-4d4d-95ad-054617df547d
{ "language": "C#" }
```c# using ExplicitlyImpl.AspNetCore.Mvc.FluentActions; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace HelloWorld { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddMvc().AddFluentActions...
```c# using ExplicitlyImpl.AspNetCore.Mvc.FluentActions; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace HelloWorld { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddMvc().AddFluentActions...
5f17b5fd-db6a-492c-84c5-142f9f602294
{ "language": "C#" }
```c# <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Vaskelista</title> @Styles.Render("~/Content/css") @Mvc.RazorTools...
```c# <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Vaskelista</title> @Styles.Render("~/Content/css") @Mvc.RazorTools...
a60f2764-3afc-400a-8c17-d1a3820622b4
{ "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 System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.Graphics; using o...
```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 System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.Graphics; using o...
5d777f27-5f24-4ffe-b5f0-64b688b59ff4
{ "language": "C#" }
```c# using System; using System.Linq; using System.Transactions; using NMF.Expressions; using NMF.Models.Evolution; using NMF.Models.Repository; namespace NMF.Models { class NMFTransaction : IDisposable { private bool _committed; private readonly ExecutionEngine _engine = ExecutionEngine.Curr...
```c# using System; using System.Linq; using System.Transactions; using NMF.Expressions; using NMF.Models.Evolution; using NMF.Models.Repository; namespace NMF.Models { class NMFTransaction : IDisposable { private bool _committed; private readonly ExecutionEngine _engine = ExecutionEngine.Curr...