doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
2eab8789-8f14-433d-af6e-c49b8c476008
{ "language": "C#" }
```c# using System.ComponentModel; namespace Msiler.DialogPages { public class ExtensionDisplayOptions : MsilerDialogPage { [Category("Display")] [DisplayName("Listing font name")] [Description("")] public string FontName { get; set; } = "Consolas"; [Category("Display"...
```c# using System.ComponentModel; namespace Msiler.DialogPages { public class ExtensionDisplayOptions : MsilerDialogPage { [Category("Display")] [DisplayName("Listing font name")] [Description("")] public string FontName { get; set; } = "Consolas"; [Category("Display"...
26e2ce34-c1a0-4c6b-b6e6-5c9342eb599b
{ "language": "C#" }
```c# using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using OpcMock; namespace OpcMockTests { [TestClass] public class ProtocolComparerTests { private const int EQUALITY = 0; [TestMethod] public void Protocols_With_The_Same_Name_Are_Equal() { ...
```c# using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using OpcMock; namespace OpcMockTests { [TestClass] public class ProtocolComparerTests { private const int EQUALITY = 0; [TestMethod] public void ProtocolsWithTheSameNameShould_Be_Equal() { ...
daadd0fc-1fc7-455f-bb11-90dfb1b7b7f0
{ "language": "C#" }
```c# using System; namespace Glimpse { public interface IMessageBus { IObservable<T> Listen<T>(); IObservable<T> ListenIncludeLatest<T>(); void SendMessage(object message); } }``` Update types on Message Bus definition
```c# using System; namespace Glimpse { public interface IMessageBus { IObservable<T> Listen<T>() where T : IMessage; IObservable<T> ListenIncludeLatest<T>() where T : IMessage; void SendMessage(IMessage message); } }```
7ec08f7d-4e26-46e5-86ea-a0996e375cff
{ "language": "C#" }
```c# using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces; using HashidsNet; namespace SFA.DAS.EmployerApprenticeshipsService.Infrastructure.Services { public class HashingService : IHashingService { public string HashValue(long id) { var hashIds = new Hashids("SFA: digi...
```c# using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces; using HashidsNet; namespace SFA.DAS.EmployerApprenticeshipsService.Infrastructure.Services { public class HashingService : IHashingService { public string HashValue(long id) { var hashIds = new Hashids("SFA: digi...
c1083f1d-ebad-47d2-9065-5f732f6985ad
{ "language": "C#" }
```c# using TAP; using System; using System.Net; public class TAPCfgTest { private static void Main(string[] args) { EthernetDevice dev = new EthernetDevice(); dev.Start("Device name"); Console.WriteLine("Got device name: {0}", dev.DeviceName); dev.MTU = 1280; dev.SetAddress(IPAddress.Parse("192.168.1.1"),...
```c# using TAP; using System; using System.Net; public class TAPCfgTest { private static void Main(string[] args) { EthernetDevice dev = new EthernetDevice(); dev.Start("Device name"); Console.WriteLine("Got device name: {0}", dev.DeviceName); dev.MTU = 1280; dev.SetAddress(IPAddress.Parse("192.168.1.1"),...
acdca92d-04ae-43e3-9a4c-45d5e5d178b1
{ "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.Utils { public static class FormatUtils { /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal ...
```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.Utils { public static class FormatUtils { /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal ...
e225b50b-8b5a-48b6-a5b8-96be299de69d
{ "language": "C#" }
```c# ////////////////////////////////////////////////////////////////////// // ARGUMENTS ////////////////////////////////////////////////////////////////////// var target = Argument("target", "Default"); var configuration = Argument("configuration", "Release"); ///////////////////////////////////////////////////////...
```c# ////////////////////////////////////////////////////////////////////// // ARGUMENTS ////////////////////////////////////////////////////////////////////// var target = Argument("target", "Default"); var configuration = Argument("configuration", "Release"); ///////////////////////////////////////////////////////...
cab8e382-961d-483c-aec3-db09d98dc6ee
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ECS { public class EntityComponentSystem { private EntityManager entityManager; private SystemManager systemManager; public EntityComponentSystem() ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ECS { public class EntityComponentSystem { private EntityManager entityManager; private SystemManager systemManager; public EntityComponentSystem() ...
be43b3d3-1b88-43e3-8f02-ca006fb7e03c
{ "language": "C#" }
```c# // -------------------------------------------------------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Starboard"> // Copyright © 2011 All Rights Reserved // </copyright> // <summary> // AssemblyInfo.cs // </summary> // --------------------------...
```c# // -------------------------------------------------------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Starboard"> // Copyright © 2011 All Rights Reserved // </copyright> // <summary> // AssemblyInfo.cs // </summary> // --------------------------...
545d8492-a799-4c62-9537-23eebba6bc94
{ "language": "C#" }
```c# // Copyright (c) 2010-2012 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy...
```c# // Copyright (c) 2010-2012 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy...
5f436228-61f9-4ed5-8e6d-b879a20d67d0
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using Manisero.DSLExecutor.Parser.SampleDSL.Parsing.Tokens; namespace Manisero.DSLExecutor.Parser.SampleDSL.ExpressionGeneration.FunctionExpressionGeneration.FunctionTypeResolvers { public class TypeSamplesAndSuffixConventionBasedFunctionTypeResolver : I...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using Manisero.DSLExecutor.Domain.FunctionsDomain; using Manisero.DSLExecutor.Extensions; using Manisero.DSLExecutor.Parser.SampleDSL.Parsing.Tokens; namespace Manisero.DSLExecutor.Parser.SampleDSL.ExpressionGene...
1245958e-3fe7-44c4-8b8e-d97c28935b6e
{ "language": "C#" }
```c# using Microsoft.MixedReality.Toolkit.Physics; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { /// <summary> /// The default implementation of IMixedRealityRaycastProvider. /// </summary> public class DefaultRaycastProvider : BaseDataProvider, IMixedRealityRaycastProvider ...
```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.Physics; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { /// <summary> /// The default implem...
fab9e27f-3aad-45c8-a5b2-86df467c8471
{ "language": "C#" }
```c# using System; using UIKit; namespace MyTrips.iOS { public partial class TripSummaryViewController : UIViewController { public ViewModel.CurrentTripViewModel ViewModel { get; set; } public TripSummaryViewController(IntPtr handle) : base(handle) { } public override void ViewDidLoad() { lblDate...
```c# using System; using UIKit; namespace MyTrips.iOS { public partial class TripSummaryViewController : UIViewController { public ViewModel.CurrentTripViewModel ViewModel { get; set; } public TripSummaryViewController(IntPtr handle) : base(handle) { } public override void ViewDidLoad() { lblDate...
82622067-5a1d-485b-90dd-ede2704f1256
{ "language": "C#" }
```c# using Nito.AsyncEx; using WalletWasabi.Crypto; namespace WalletWasabi.Io { public class MutexIoManager : IoManager { public MutexIoManager(string filePath) : base(filePath) { var shortHash = HashHelpers.GenerateSha256Hash(FilePath).Substring(1, 7); // https://docs.microsoft.com/en-us/dotnet/api/syst...
```c# using Nito.AsyncEx; using WalletWasabi.Crypto; namespace WalletWasabi.Io { public class MutexIoManager : IoManager { public MutexIoManager(string filePath) : base(filePath) { var shortHash = HashHelpers.GenerateSha256Hash(FilePath).Substring(0, 7); // https://docs.microsoft.com/en-us/dotnet/api/syst...
14026cad-3c8b-400c-90ee-60feb473b7ac
{ "language": "C#" }
```c# using FluentAssertions; using MergableMigrations.EF6; using MergableMigrations.Specification.Implementation; using System; using System.Linq; using Xunit; namespace Mathematicians.UnitTests { public class SqlGeneratorTests { [Fact] public void CanGenerateSql() { var m...
```c# using FluentAssertions; using MergableMigrations.EF6; using MergableMigrations.Specification; using MergableMigrations.Specification.Implementation; using System; using System.Linq; using Xunit; namespace Mathematicians.UnitTests { public class SqlGeneratorTests { [Fact] public void CanG...
71558cba-3717-4fa2-a082-01ba6c6650c0
{ "language": "C#" }
```c# using System; using System.Threading; namespace Criteo.Profiling.Tracing.Utils { /// <summary> /// Thread-safe random long generator. /// /// See "Correct way to use Random in multithread application" /// http://stackoverflow.com/questions/19270507/correct-way-to-use-random-in-multithread-ap...
```c# using System; using System.Threading; namespace Criteo.Profiling.Tracing.Utils { /// <summary> /// Thread-safe random long generator. /// /// See "Correct way to use Random in multithread application" /// http://stackoverflow.com/questions/19270507/correct-way-to-use-random-in-multithread-ap...
c6c9baa7-def1-4e10-8971-cb58ca6fbf47
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; namespace NuPack { public class PackageAuthoring { private static readonly HashSet<string> _exclude = new HashSet<string>(new[] { ".nupack", ".nuspec" }, ...
```c# using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; namespace NuPack { public class PackageAuthoring { private static readonly HashSet<string> _exclude = new HashSet<string>(new[] { ".nupack", ".nuspec" }, ...
3450ff10-a7e3-443a-98e2-701bffd81619
{ "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 System.Threading.Tasks; using osu.Framework.Statistics; namespace osu.Framework.Allocation { /// <summary...
```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 System.Threading.Tasks; using osu.Framework.Statistics; namespace osu.Framework.Allocation { /// <summary...
14ca073f-f776-43fc-88d9-ed3ce38b3a27
{ "language": "C#" }
```c# using System.Diagnostics; using FluentAssertions; using Xunit; namespace Okanshi.Test { public class PerformanceCounterTest { [Fact] public void Performance_counter_without_instance_name() { var performanceCounter = new PerformanceCounter("Memory", "Available Bytes"); var monitor = new Performanc...
```c# using System.Diagnostics; using FluentAssertions; using Xunit; namespace Okanshi.Test { public class PerformanceCounterTest { [Fact] public void Performance_counter_without_instance_name() { var performanceCounter = new PerformanceCounter("Memory", "Available Bytes"); var monitor = new Performanc...
6387b424-0717-4b8e-b570-11012a943823
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; using System.Web.Hosting; using System.Web.Mvc; namespace mvcWebApp.Controllers { public class HomeController : Controller { // // GET: /Home/ public ActionResult Index() ...
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; using System.Web.Hosting; using System.Web.Mvc; namespace mvcWebApp.Controllers { public class HomeController : Controller { public string domain { get { ...
8677da11-e201-4716-b3c5-b7213e46e2bc
{ "language": "C#" }
```c# using System.Collections.Generic; using Nest.Domain; using Newtonsoft.Json; using System.Linq.Expressions; using System; using System.Linq; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnumerable<Searc...
```c# using Nest.Domain; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnum...
612e099a-2e2c-4fcd-a733-2643e7284733
{ "language": "C#" }
```c# using System.Collections.Generic; using Glimpse.Core.Extensibility; using Nancy.Bootstrapper; namespace Glimpse.Nancy { public class GlimpseRegistrations : IApplicationRegistrations { public GlimpseRegistrations() { AppDomainAssemblyTypeScanner.AddAssembliesToScan(typeof(Glim...
```c# using System.Collections.Generic; using Glimpse.Core.Extensibility; using Nancy.Bootstrapper; namespace Glimpse.Nancy { public class GlimpseRegistrations : IRegistrations { public GlimpseRegistrations() { AppDomainAssemblyTypeScanner.AddAssembliesToScan(typeof(Glimpse.Core.Ta...
7b70e51c-5951-4185-9e2a-1bdd9bc9f34c
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; namespace BatteryCommander.Web.Models { public class EvaluationListViewModel { public IEnumerable<Evaluation> Evaluations { get; set; } = Enumerable.Empty<Evaluation>(); [Disp...
```c# using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; namespace BatteryCommander.Web.Models { public class EvaluationListViewModel { public IEnumerable<Evaluation> Evaluations { get; set; } = Enumerable.Empty<Evaluation>(); [Disp...
a3cfad8a-7bce-4112-9a71-b40312aa654c
{ "language": "C#" }
```c# using System; using System.Linq; using FluentAssertions; using NSaga; using Xunit; namespace Tests { public class NamespaceTests { [Fact] public void NSaga_Contains_Only_One_Namespace() { //Arrange var assembly = typeof(ISagaMediator).Assembly; ...
```c# using System; using System.Linq; using FluentAssertions; using NSaga; using Xunit; namespace Tests { public class NamespaceTests { [Fact] public void NSaga_Contains_Only_One_Namespace() { //Arrange var assembly = typeof(ISagaMediator).Assembly; ...
d85939eb-7120-4486-a948-0666078d78b4
{ "language": "C#" }
```c# @{ var version = ""; var versionName = Yio.Data.Constants.VersionConstant.Codename.ToString(); if(Yio.Data.Constants.VersionConstant.Patch == 0) { version = Yio.Data.Constants.VersionConstant.Release.ToString(); } else { version = Yio.Data.Constants.VersionConstant.Release.ToStrin...
```c# @{ var version = ""; var versionName = Yio.Data.Constants.VersionConstant.Codename.ToString(); if(Yio.Data.Constants.VersionConstant.Patch == 0) { version = Yio.Data.Constants.VersionConstant.Release.ToString(); } else { version = Yio.Data.Constants.VersionConstant.Release.ToStrin...
1d182982-32d3-4d57-bb2b-cfde9bd5e01b
{ "language": "C#" }
```c# // ---------------------------------------------------------------------------------- // // Copyright Microsoft 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://w...
```c# // ---------------------------------------------------------------------------------- // // Copyright Microsoft 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://w...
a12def5d-1132-4ffc-8d87-92a7a2ea2390
{ "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.Linq; namespace osu.Game.Rulesets.Osu.Mods { public class OsuModSingleTap : InputBlockingMod { public override string Na...
```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.Linq; namespace osu.Game.Rulesets.Osu.Mods { public class OsuModSingleTap : InputBlockingMod { public override string Na...
7f9b094c-65ec-40d9-b682-1373827ec903
{ "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.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Tournament.Components; usi...
```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.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Screens; using osu.Game.To...
fe3a404c-967b-4ed9-b937-03b883a8d713
{ "language": "C#" }
```c# using System; using System.Dynamic; namespace BobTheBuilder { public class NamedArgumentsDynamicBuilder<T> : DynamicObject, IDynamicBuilder<T> where T : class { private readonly IDynamicBuilder<T> wrappedBuilder; private readonly IArgumentStore argumentStore; internal NamedArgum...
```c# using System; using System.Dynamic; using System.Linq; namespace BobTheBuilder { public class NamedArgumentsDynamicBuilder<T> : DynamicObject, IDynamicBuilder<T> where T : class { private readonly IDynamicBuilder<T> wrappedBuilder; private readonly IArgumentStore argumentStore; ...
dccb304a-779e-4ffb-b346-dbcc5566833c
{ "language": "C#" }
```c# // Copyright 2014 The Noda Time Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0, // as found in the LICENSE.txt file. #if !PCL using System.Diagnostics; using JetBrains.Annotations; using NodaTime.Utility; namespace NodaTime.Extensions { /// <summary> /// E...
```c# // Copyright 2014 The Noda Time Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0, // as found in the LICENSE.txt file. using System.Diagnostics; using JetBrains.Annotations; using NodaTime.Utility; namespace NodaTime.Extensions { /// <summary> /// Extension ...
bebbd6ee-715f-4a90-b1f9-261874858ba1
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using RedCard.API.Contexts; // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 namespace RedCard.API.Controllers { [R...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using RedCard.API.Contexts; using RedCard.API.Models; // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 namespace RedCar...
88a17b4b-9f0c-4e65-b813-99711d855b07
{ "language": "C#" }
```c# using System; using System.Collections; using UnityEngine; namespace LunaClient.Utilities { public class CoroutineUtil { public static void StartDelayedRoutine(string routineName, Action action, float delayInSec) { Client.Singleton.StartCoroutine(DelaySeconds(routineName, act...
```c# using System; using System.Collections; using UnityEngine; namespace LunaClient.Utilities { public class CoroutineUtil { public static void StartDelayedRoutine(string routineName, Action action, float delayInSec) { Client.Singleton.StartCoroutine(DelaySeconds(routineName, act...
9d96abb8-0028-4953-9711-4d2888aa5b51
{ "language": "C#" }
```c# namespace uSync { /// <summary> /// we only have this class, so there is a dll in the root /// uSync package. /// /// With a root dll, the package can be stopped from installing /// on .netframework sites. /// </summary> public static class uSync { // private sta...
```c# using System; using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.Packaging; using Umbraco.Cms.Core.PropertyEditors; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Strings; using Umbraco.Cms.Infrastructure.Migrations; using Umbraco.Cms.Infrastructure.Packaging; namespace uSync { /// <summary> //...
b56a1bb1-6c0e-4271-a19b-c769fdb5364d
{ "language": "C#" }
```c# using System; using System.Net.Http.Headers; using System.Threading.Tasks; using Infrastructure.Model; using Microsoft.AspNetCore.Mvc; namespace Web.Controllers { public class HomeController : Controller { [HttpGet] public async Task<string> Index() { var client = new ...
```c# using System; using System.Net.Http.Headers; using System.Threading.Tasks; using Infrastructure.Model; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; namespace Web.Controllers { public class HomeController : Controller { [HttpGet] public async Task<string> Index() { ...
2f0bee5a-f4be-4f93-8315-02ffc88f8d61
{ "language": "C#" }
```c# using System; using System.IO; using System.Runtime.CompilerServices; using ExpressionToCodeLib; using Xunit; //requires binary serialization, which is omitted in older .net cores - but those are out of support: https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core namespace ExpressionT...
```c# using System; using System.IO; using System.Runtime.CompilerServices; using ExpressionToCodeLib; using Xunit; //requires binary serialization, which is omitted in older .net cores - but those are out of support: https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core namespace ExpressionT...
6fde7adb-ddc0-4ddf-84a3-b18533a039a5
{ "language": "C#" }
```c# //////////////////////////////////////////////////////////////// // // (c) 2009, 2010 Careminster Limited and Melanie Thielker // // All rights reserved // using System; using System.Diagnostics; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading; using System.Reflection;...
```c# //////////////////////////////////////////////////////////////// // // (c) 2009, 2010 Careminster Limited and Melanie Thielker // // All rights reserved // using System; using Nini.Config; namespace OpenSim.Services.Interfaces { public interface IAttachmentsService { string Get(string id); ...
238a589c-fae1-4785-a463-5e79ff84aada
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using FizzWare.NBuilder; using IntermediatorBotSample.Models; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Schema; using Newtonsoft.Json; namespace IntermediatorBotSample.Cont...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using FizzWare.NBuilder; using IntermediatorBotSample.Models; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Schema; using Newtonsoft.Json; namespace IntermediatorBotSample.Cont...
8585d2cc-1e19-4698-901b-6102095b79b7
{ "language": "C#" }
```c# //------------------------------------------------------------------------------ // Revenge Of The Cats: Ethernet // Copyright (C) 2008, mEthLab Interactive //------------------------------------------------------------------------------ datablock AudioProfile(MinigunProjectileImpactSound) { filename = "share/s...
```c# //------------------------------------------------------------------------------ // Revenge Of The Cats: Ethernet // Copyright (C) 2008, mEthLab Interactive //------------------------------------------------------------------------------ datablock AudioProfile(MinigunProjectileImpactSound) { filename = "share/s...
ac6f7b49-f05d-4b75-830a-ae7111d5c080
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace EchoServer { class Program { static void Main(string[] args) { Task main = MainAsync(args); ...
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace EchoServer { class Program { static void Main(string[] args) { Task main = MainAsync(args); ...
f8407ee1-78a6-47b0-b6b5-a1dddc067fe1
{ "language": "C#" }
```c# using System.Linq; using CppSharp.AST; using CppSharp.Generators; namespace CppSharp.Passes { public class FieldToPropertyPass : TranslationUnitPass { public override bool VisitClassDecl(Class @class) { if (@class.CompleteDeclaration != null) return VisitClass...
```c# using System.Linq; using CppSharp.AST; using CppSharp.Generators; namespace CppSharp.Passes { public class FieldToPropertyPass : TranslationUnitPass { public override bool VisitClassDecl(Class @class) { if (@class.CompleteDeclaration != null) return VisitClass...
fff2c78b-83f5-4ae3-b417-d6dc971cd3d8
{ "language": "C#" }
```c#  using System; using NUnit.Framework; namespace HttpMock.Unit.Tests { [TestFixture] public class HttpFactoryTests { [Test] public void ShouldBeAbleToHostAtSameAddressIfPreviousWasDisposed() { var serverFactory = new HttpServerFactory(); var uri = new Uri(String.Format("http://local...
```c#  using System; using NUnit.Framework; namespace HttpMock.Unit.Tests { [TestFixture] public class HttpFactoryTests { [Test] [Ignore ("Makes the test suite flaky (???)")] public void ShouldBeAbleToHostAtSameAddressIfPreviousWasDisposed() { var serverFactory = new HttpServerFactory(); ...
9b91238f-814d-4096-ae47-7fa5a61b415e
{ "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; using osu.Game.Rulesets.Osu.Difficulty.Preprocessing; namespace osu.Game.Rulesets.Osu.Difficulty.Skills { /// <summary> /// Represents the ...
```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; using osu.Game.Rulesets.Osu.Difficulty.Preprocessing; namespace osu.Game.Rulesets.Osu.Difficulty.Skills { /// <summary> /// Represents the ...
ecbd5714-3891-4323-943a-59052f7edd61
{ "language": "C#" }
```c# using Qart.Core.DataStore; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Qart.Testing { public class TestSystem { public IDataStore DataStorage { get; private set; } public TestSystem(IDataS...
```c# using Qart.Core.DataStore; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Qart.Testing { public class TestSystem { public IDataStore DataStorage { get; private set; } public TestSystem(IDataS...
c6910d75-2281-47eb-8c6d-c72eb5df435e
{ "language": "C#" }
```c# using System; using System.ComponentModel.DataAnnotations; namespace JoyOI.OnlineJudge.Models { public class VirtualJudgeUser { /// <summary> /// Gets or sets the identifier. /// </summary> /// <value>The identifier.</value> public Guid Id { get; set; } /...
```c# using System; using System.ComponentModel.DataAnnotations; namespace JoyOI.OnlineJudge.Models { public class VirtualJudgeUser { /// <summary> /// Gets or sets the identifier. /// </summary> /// <value>The identifier.</value> public Guid Id { get; set; } /...
b372641b-17bc-4588-98da-a7325770da8f
{ "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; using osu.Framework.Allocation; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; namespace osu.Game.Beatmaps.Drawables ...
```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; using osu.Framework.Allocation; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; namespace osu.Game.Beatmaps.Drawables ...
c376c11e-775b-4e05-8a9d-b4d8ea3eb820
{ "language": "C#" }
```c# // Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using System.Collections.Generic; namespace EOLib.Net.Handlers { public class PacketHandlingTypeFinder : IPacketHandlingTypeFinder { private readonly List<Fami...
```c# // Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using System.Collections.Generic; using System.Linq; namespace EOLib.Net.Handlers { public class PacketHandlingTypeFinder : IPacketHandlingTypeFinder { private...
68253c5a-5a97-4f1b-ba8a-3b5c23f4ee94
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace Chainey { internal class SentenceConstruct { internal int WordCount { get { return Forwards.Count + Backwards.Count - order; } } internal string Sentence { get { ...
```c# using System; using System.Collections.Generic; namespace Chainey { internal class SentenceConstruct { internal int WordCount { get; private set; } internal string Sentence { get { var sen = new List<string>(Backwards); sen...
79d2c188-e31a-4a3f-867d-88486ce0dc6b
{ "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("KeyPay")] [assembly: AssemblyDescrip...
```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("KeyPay")] [assembly: AssemblyDescrip...
8602c422-7fdf-4ad5-b513-9af631f51696
{ "language": "C#" }
```c# using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using NUnit.Migrator.Model; namespace NUnit.Migrator.CodeActions { internal class AssertUserMessageDecorator : AssertExceptionBlockDecorator { private readonly ExceptionExpectancyAtAttri...
```c# using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using NUnit.Migrator.Model; namespace NUnit.Migrator.CodeActions { internal class AssertUserMessageDecorator : AssertExceptionBlockDecorator { private readonly string _user...
277882de-4756-4292-996d-11807f4830c2
{ "language": "C#" }
```c#  using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Linq; namespace MFlow.Core.Internal { /// <summary> /// An expression builder /// </summary> class ExpressionBuilder<T> : IExpressionBuilder<T> { static IDictionary<object, object> _expressions= ...
```c#  using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Linq; namespace MFlow.Core.Internal { /// <summary> /// An expression builder /// </summary> class ExpressionBuilder<T> : IExpressionBuilder<T> { static IDictionary<object, object> _expressions= ...
21a56cc8-83bc-4bf9-92d6-65c86bec5fd0
{ "language": "C#" }
```c# using SSMScripter.Integration; using System; using System.Data; namespace SSMScripter.Scripter.Smo { public class SmoObjectMetadata { public SmoObjectType Type { get; protected set; } public string Schema { get; protected set; } public string Name { get; protected set; } ...
```c# using SSMScripter.Integration; using System; using System.Data; namespace SSMScripter.Scripter.Smo { public class SmoObjectMetadata { public SmoObjectType Type { get; protected set; } public string Schema { get; protected set; } public string Name { get; protected set; } ...
631afc0c-7043-4387-afed-9f7daf967389
{ "language": "C#" }
```c# @model SpaceBlog.Models.CommentViewModel @{ ViewBag.Title = "Edit"; } <h2>Edit</h2> @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal"> <h4>Comment</h4> <hr /> @Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Ht...
```c# @model SpaceBlog.Models.CommentViewModel @{ ViewBag.Title = "Edit"; ViewBag.Message = "Comment"; } @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="container"> <h2>@ViewBag.Title</h2> <h4>@ViewBag.Message</h4> <hr /> @Html.ValidationSummary(t...
6a09dc31-8ff9-4d13-a9a2-928e21852551
{ "language": "C#" }
```c# using System.Threading.Tasks; using Xunit; using YouTrackSharp.Issues; using YouTrackSharp.Tests.Infrastructure; namespace YouTrackSharp.Tests.Integration.Issues { public partial class IssuesServiceTests { public class GetIssuesInProject { [Fact] public async Task ...
```c# using System.Threading.Tasks; using Xunit; using YouTrackSharp.Issues; using YouTrackSharp.Tests.Infrastructure; namespace YouTrackSharp.Tests.Integration.Issues { public partial class IssuesServiceTests { public class GetIssuesInProject { [Fact] public async Task ...
45f78b34-2965-45d5-82a3-a7dd2e44cbd2
{ "language": "C#" }
```c#  using Microsoft.AspNet.Builder; using System; namespace Glimpse.Host.Web.AspNet { public static class GlimpseExtension { /// <summary> /// Adds a middleware that allows GLimpse to be registered into the system. /// </summary> /// <param name="app"></param> /// <r...
```c#  using Glimpse.Web; using Microsoft.AspNet.Builder; using System; namespace Glimpse.Host.Web.AspNet { public static class GlimpseExtension { /// <summary> /// Adds a middleware that allows GLimpse to be registered into the system. /// </summary> /// <param name="app"></pa...
8640e184-58bf-4020-8990-bac131264f41
{ "language": "C#" }
```c# using System; using System.Threading; using MbCacheTest.TestData; using NUnit.Framework; using SharpTestsEx; namespace MbCacheTest.Logic.Concurrency { public class SimultaneousCachePutTest : TestCase { public SimultaneousCachePutTest(Type proxyType) : base(proxyType) { } [Test] public void ShouldNo...
```c# using System; using System.Threading; using MbCacheTest.TestData; using NUnit.Framework; using SharpTestsEx; namespace MbCacheTest.Logic.Concurrency { public class SimultaneousCachePutTest : TestCase { public SimultaneousCachePutTest(Type proxyType) : base(proxyType) { } [Test] public void ShouldNo...
07b49c9f-a37e-4934-a52a-83781546a6d4
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("MigrateMSTest")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("MigrateMSTest")] [assembly: Assemb...
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("MigrateMSTest")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("MigrateMSTest")] [assembly: Assemb...
09ba0fee-3afe-4b99-a4bd-1649c1ecc435
{ "language": "C#" }
```c# namespace Fixie.Tests { using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text.RegularExpressions; using System.Threading; using Fixie.Execution; public static class TestExtensions { const BindingFlags InstanceMet...
```c# namespace Fixie.Tests { using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Reflection; using System.Text.RegularExpressions; using Fixie.Execution; public static class TestExtensions { const BindingFlags Instanc...
5bab320e-602d-49db-8a5d-79c14a80b300
{ "language": "C#" }
```c# using MultiMiner.Engine.Configuration; using System; using System.IO; namespace MultiMiner.Win { public class ApplicationConfiguration { public ApplicationConfiguration() { this.StartupMiningDelay = 45; } public bool LaunchOnWindowsLogin { get; set; } ...
```c# using Microsoft.Win32; using MultiMiner.Engine.Configuration; using System; using System.IO; using System.Windows.Forms; namespace MultiMiner.Win { public class ApplicationConfiguration { public ApplicationConfiguration() { this.StartupMiningDelay = 45; } pub...
7e5c8e8d-885e-4cb0-a60b-5b16453064bd
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Battlezeppelins.Models { public class GameTable { public const int TABLE_ROWS = 10; public const int TABLE_COLS = 10; public Game.Role role { get; private set; } ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Battlezeppelins.Models { public class GameTable { public const int TABLE_ROWS = 10; public const int TABLE_COLS = 10; public Game.Role role { get; private set; } ...
e282f6e5-4adf-4346-9cf8-583a882e6f94
{ "language": "C#" }
```c# namespace NBench.VisualStudio.TestAdapter.Tests.Unit.NBenchTestDiscoverer.NBenchTestDiscoverer { using JustBehave; using NBench.VisualStudio.TestAdapter; using NBench.VisualStudio.TestAdapter.Helpers; using Ploeh.AutoFixture; using Ploeh.AutoFixture.AutoNSubstitute; using Xunit; ...
```c# namespace NBench.VisualStudio.TestAdapter.Tests.Unit.NBenchTestDiscoverer.NBenchTestDiscoverer { using JustBehave; using NBench.VisualStudio.TestAdapter; using NBench.VisualStudio.TestAdapter.Helpers; using Ploeh.AutoFixture; using Ploeh.AutoFixture.AutoNSubstitute; using Xunit; ...
7e61bce9-45b8-41b6-8303-18deb4bf64da
{ "language": "C#" }
```c# using System; using System.Diagnostics; using System.Reflection; namespace FonctionsUtiles.Fred.Csharp { public class FunctionsWindows { public static bool IsInWinPath(string substring) { bool result = false; string winPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariable...
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Security.Principal; namespace FonctionsUtiles.Fred.Csharp { public class FunctionsWindows { public static bool IsInWinPath(string substring) { bool result = false;...
a3f9e2ed-b1e2-4766-86e4-b12984666585
{ "language": "C#" }
```c# using System.Globalization; using System.Reflection; using FluentAssertions; using Microsoft.Office.Interop.Outlook; using Moq; using NUnit.Framework; using OutlookMatters.Core.Settings; namespace Test.OutlookMatters.Core.Settings { [TestFixture] public class EnumMatchToBooleanConverterTest { ...
```c# using System.Globalization; using System.Reflection; using FluentAssertions; using Microsoft.Office.Interop.Outlook; using Moq; using NUnit.Framework; using OutlookMatters.Core.Settings; namespace Test.OutlookMatters.Core.Settings { [TestFixture] public class EnumMatchToBooleanConverterTest { ...
63fa2b42-a216-4983-ae5d-72793d87c4ba
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ChutesAndLadders.GamePlay; using ChutesAndLadders.Entities; using System.Diagnostics; namespace Chute { class Program { static void Main(string[] args) { ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ChutesAndLadders.GamePlay; using ChutesAndLadders.Entities; using System.Diagnostics; namespace Chute { class Program { static void Main(string[] args) { ...
6d9d32db-b1ad-471b-bcc0-85e2aef2615a
{ "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; using Bogus; using Dexiom.EPPlusExporter; using OfficeOpenXml; namespace Dexiom.EPPlusExporterTests.Helpers { public static class TestHelper { ...
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Bogus; using Dexiom.EPPlusExporter; using OfficeOpenXml; namespace Dexiom.EPPlusExporterTests.Helpers { public static class TestHelper { ...
ac03ac51-f461-437a-9f1f-14cb3d5e99e0
{ "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.Rulesets.Mania.Objects.Types; using osu.Game.Rulesets.Objects; namespace osu.Game.Rulesets.Mania.Objects { public abstract class Mania...
```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.Rulesets.Mania.Objects.Types; using osu.Game.Rulesets.Objects; namespace osu.Game.Rulesets.Mania.Objects { public abstract class Mania...
9d2cedf6-e23d-47b8-830f-009d9002d728
{ "language": "C#" }
```c# using LtiLibrary.Core.Common; using Newtonsoft.Json; namespace LtiLibrary.Core.Outcomes.v2 { /// <summary> /// A LineItemContainer defines the endpoint to which clients POST new LineItem resources /// and from which they GET the list of LineItems associated with a a given learning context. /// ...
```c# using LtiLibrary.Core.Common; using Newtonsoft.Json; namespace LtiLibrary.Core.Outcomes.v2 { /// <summary> /// A LineItemContainer defines the endpoint to which clients POST new LineItem resources /// and from which they GET the list of LineItems associated with a a given learning context. /// ...
d68e3d13-1a1a-4228-8ae0-827502f22d5c
{ "language": "C#" }
```c# using System.Collections.Generic; using Nest.Domain; using Newtonsoft.Json; using System.Linq.Expressions; using System; using System.Linq; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnumerable<Searc...
```c# using Nest.Domain; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnum...
6c5754f0-a7c9-4e2f-a484-d7efa5ddf141
{ "language": "C#" }
```c# using HotChocolate.Types; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem.Contextual; using Snowflake.Framework.Remoting.GraphQL.Schema; using Snowflake.Services; using System; using System.Collections.Generic; using System.IO; using System...
```c# using HotChocolate.Types; using Microsoft.DotNet.PlatformAbstractions; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem.Contextual; using Snowflake.Framework.Remoting.GraphQL.Schema; using Snowflake.Services; using System; using System.Colle...
e0ab5b9b-6646-4f67-bf5a-b7538329d31c
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("Tiny-JSON")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [ass...
```c# using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("Tiny-JSON")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [ass...
01ec78fa-19bb-4ac6-bc74-7867434c0cb6
{ "language": "C#" }
```c# using System.Collections.Concurrent; using System.Collections.Generic; namespace Utility.Extensions { public static class ConcurrentDictionaryExtensions { public static bool TryRemove<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key) { TValue value; ...
```c# using System.Collections.Concurrent; using System.Collections.Generic; namespace Utility.Extensions { public static class ConcurrentDictionaryExtensions { public static bool TryRemove<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key) { TValue value; ...
ceabde4a-f1b0-43c9-a2d3-4d08f57a9768
{ "language": "C#" }
```c# using IdeaWeb.Controllers; using Microsoft.AspNetCore.Mvc; using NUnit.Framework; namespace IdeaWeb.Test { [TestFixture] public class HomeControllerTests { HomeController _controller; [SetUp] public void SetUp() { _controller = new HomeController(); ...
```c# using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using IdeaWeb.Controllers; using IdeaWeb.Data; using IdeaWeb.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using NUnit.Framework; namespace IdeaWeb.Test { [TestFixture] public class HomeCont...
3815ff07-4878-47a6-8fe8-e25f76aa5d93
{ "language": "C#" }
```c# namespace DependencyInjection.Console { internal class PatternApp { private readonly PatternWriter _patternWriter; private readonly PatternGenerator _patternGenerator; public PatternApp(bool useColours) { _patternWriter = new PatternWriter(useColours); ...
```c# namespace DependencyInjection.Console { internal class PatternApp { private readonly PatternWriter _patternWriter; private readonly PatternGenerator _patternGenerator; public PatternApp(bool useColours) { _patternWriter = new PatternWriter(useColours); ...
12c528b7-3763-441f-9a39-5278150e40cb
{ "language": "C#" }
```c# using Xunit; namespace EmotionAPI.Tests { public class EmotionAPIClientTests : EmotionAPITestsBase { [Fact] public void Can_Create_EmotionAPIClient_Controller() { var controller = new EmotionAPIClient(mockOcpApimSubscriptionKey); Assert.NotNul...
```c# using Xunit; namespace EmotionAPI.Tests { public class EmotionAPIClientTests : EmotionAPITestsBase { [Fact] public void Can_Create_EmotionAPIClient_Class() { var sut = new EmotionAPIClient(mockOcpApimSubscriptionKey); Assert.NotNull(sut); ...
733305b2-a05d-4503-9a46-db36e415981c
{ "language": "C#" }
```c# using System.Windows.Forms; using CefSharp; namespace TweetDuck.Core.Handling{ class KeyboardHandlerBase : IKeyboardHandler{ protected virtual bool HandleRawKey(IWebBrowser browserControl, IBrowser browser, Keys key, CefEventFlags modifiers){ return false; } bool IKeyboa...
```c# using System.Windows.Forms; using CefSharp; using TweetDuck.Core.Controls; using TweetDuck.Core.Other; using TweetDuck.Core.Utils; namespace TweetDuck.Core.Handling{ class KeyboardHandlerBase : IKeyboardHandler{ protected virtual bool HandleRawKey(IWebBrowser browserControl, IBrowser browser, Keys k...
1b46a46b-2786-4b06-bd4f-3f8cc9f7949e
{ "language": "C#" }
```c# using System; using System.Web.Mvc; using Orchard.Localization; using Orchard.ContentManagement; using Orchard.Pages.Services; using Orchard.Pages.ViewModels; using Orchard.Security; namespace Orchard.Pages.Controllers { [ValidateInput(false)] public class PageController : Controller, IUpdateM...
```c# using System; using System.Web.Mvc; using Orchard.Localization; using Orchard.ContentManagement; using Orchard.Mvc.Results; using Orchard.Pages.Services; using Orchard.Pages.ViewModels; using Orchard.Security; namespace Orchard.Pages.Controllers { [ValidateInput(false)] public class PageContr...
ee33404b-df0d-4db7-88e1-33abed1f8e13
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Game.Screens.Play { public static class GameplayClockExtensions { /// <summary> /// The rate of gameplay when p...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Game.Screens.Play { public static class GameplayClockExtensions { /// <summary> /// The rate of gameplay when p...
ae49bc93-673d-4475-b196-94e473370d76
{ "language": "C#" }
```c# using OpenTK.Input; namespace MonoHaven.Input { public abstract class InputEvent { private readonly KeyModifiers mods; protected InputEvent() { mods = GetCurrentKeyModifiers(); } public bool Handled { get; set; } public KeyModifiers Modifiers { get { return mods; } } priv...
```c# using System; using OpenTK.Input; namespace MonoHaven.Input { public abstract class InputEvent : EventArgs { private readonly KeyModifiers mods; protected InputEvent() { mods = GetCurrentKeyModifiers(); } public bool Handled { get; set; } public KeyModifiers Modifiers { get { ...
6d8d97ad-8768-40d5-a403-5dac79870596
{ "language": "C#" }
```c# using Newtonsoft.Json; using ShopifySharp.Converters; using System.Runtime.Serialization; namespace ShopifySharp.Enums { [JsonConverter(typeof(NullableEnumConverter<ShopifyAuthorizationScope>))] public enum ShopifyAuthorizationScope { [EnumMember(Value = "read_content")] ReadContent,...
```c# using Newtonsoft.Json; using ShopifySharp.Converters; using System.Runtime.Serialization; namespace ShopifySharp.Enums { [JsonConverter(typeof(NullableEnumConverter<ShopifyAuthorizationScope>))] public enum ShopifyAuthorizationScope { [EnumMember(Value = "read_content")] ReadContent,...
760f914c-0c47-40f5-936f-a2dfc784d61a
{ "language": "C#" }
```c# using SlugityLib.Configuration; namespace SlugityLib.Tests { public class CustomSlugityConfig : ISlugityConfig { public CustomSlugityConfig() { TextCase = TextCase.LowerCase; StripStopWords = false; MaxLength = 30; StringSeparator = ' '; ...
```c# namespace SlugityLib.Tests { public class CustomSlugityConfig : ISlugityConfig { public CustomSlugityConfig() { TextCase = TextCase.LowerCase; StripStopWords = false; MaxLength = 30; StringSeparator = ' '; ReplacementCharacters =...
c1b19d5e-3b08-4b7a-8385-14181103f148
{ "language": "C#" }
```c# <div class="panel" id="error-panel"> <div class="panel-inner"> <div class="panel-close"> <a href="#" id="about-panel-close"><i class="fa fa-fw fa-times"></i></a> </div> <h1 id="error-title">Error!</h1> <p id="error-message"> Oh no! </p> </div...
```c# <div class="panel" id="error-panel"> <div class="panel-inner"> <div class="panel-close"> <a href="#" id="error-panel-close"><i class="fa fa-fw fa-times"></i></a> </div> <h1 id="error-title">Error!</h1> <p id="error-message"> <img src="http://i.imgur.com/...
3a167953-034d-45a4-b21a-7aee1499ba49
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Syndication; using System.Web; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class ChristianHoejsager : IFilterMyBlogPosts, IAmACommunityMember { public string FirstName => "C...
```c# using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Syndication; using System.Web; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class ChristianHoejsager : IAmACommunityMember { public string FirstName => "Christian"; p...
6822d085-d2dc-4853-bcd2-5f8c93901a6b
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Linq; namespace SharpRaven.Utilities { public class CircularBuffer<T> { private readonly int size; private readonly Queue<T> queue; public CircularBuffer(int size = 100) { this.size = size; queue = ne...
```c# using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; namespace SharpRaven.Utilities { public class CircularBuffer<T> { private readonly int size; private ConcurrentQueue<T> queue; public CircularBuffer(int size = 100) { ...
d0a13514-aa6e-4b4e-b178-5914dadbe403
{ "language": "C#" }
```c# using System; using Nancy.Helpers; namespace Nancy.ViewEngines.Razor { /// <summary> /// An html string that is encoded. /// </summary> public class EncodedHtmlString : IHtmlString { /// <summary> /// Represents the empty <see cref="EncodedHtmlString"/>. This field is readonly...
```c# namespace Nancy.ViewEngines.Razor { using System; using Nancy.Helpers; /// <summary> /// An html string that is encoded. /// </summary> public class EncodedHtmlString : IHtmlString { /// <summary> /// Represents the empty <see cref="EncodedHtmlString"/>. This field is ...
16b9446f-249f-48c4-96c8-056ee764afbf
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading.Tasks; using Vipr.Core; namespace Vipr { internal static class FileWriter { public static async void WriteAsync(IEnumerable<TextFile> textFilesToWrite, string outputDirectoryPath = nu...
```c# using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading; using System.Threading.Tasks; using Vipr.Core; namespace Vipr { internal static class FileWriter { public static async void WriteAsync(IEnumerable<TextFile> textFilesToWrite, string...
b12f77a5-a84f-408f-8c54-14a7faa78324
{ "language": "C#" }
```c# namespace Gu.Analyzers.Benchmarks.Benchmarks { using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; using BenchmarkDotNet.Attributes; using Microsoft.CodeAnalysis.Diagnostics; public abstract class Analyzer { private readonly CompilationWi...
```c# namespace Gu.Analyzers.Benchmarks.Benchmarks { using System.Collections.Immutable; using System.Threading; using BenchmarkDotNet.Attributes; using Microsoft.CodeAnalysis.Diagnostics; public abstract class Analyzer { private readonly CompilationWithAnalyzers compilation; ...
464e2057-8db8-4782-874c-f30c2c0129a8
{ "language": "C#" }
```c# namespace InfinniPlatform.Sdk.Hosting { /// <summary> /// . /// </summary> public interface IHostAddressParser { /// <summary> /// , . /// </summary> /// <param name="hostNameOrAddress"> .</param> /// <returns> <c>true</c>, ; <c>false</c>....
```c# namespace InfinniPlatform.Sdk.Hosting { /// <summary> /// Интерфейс для разбора адресов узлов. /// </summary> public interface IHostAddressParser { /// <summary> /// Определяет, является ли адрес локальным. /// </summary> /// <param name="hostNameOrAddress">Имя...
40ed9f4b-56ff-464d-8451-ed453df385fc
{ "language": "C#" }
```c# using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace Mindscape.Raygun4Net { public class RaygunBreadcrumb { public string Message { get; set; } public string Category { get; set; } public RaygunBreadcrumbs.Level Level { get; se...
```c# using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace Mindscape.Raygun4Net { public class RaygunBreadcrumb { public string Message { get; set; } public string Category { get; set; } public RaygunBreadcrumbs.Level Level { get; se...
31b74518-83b3-4cfb-8965-9e9dfc7cde53
{ "language": "C#" }
```c# using System.Collections; using System.Reflection; using Assets.Scripts.Props; using UnityEngine; public class AlarmClockHoldableHandler : HoldableHandler { public AlarmClockHoldableHandler(KMHoldableCommander commander, FloatingHoldable holdable, IRCConnection connection, CoroutineCanceller canceller) : base(...
```c# using System.Collections; using System.Reflection; using Assets.Scripts.Props; using UnityEngine; public class AlarmClockHoldableHandler : HoldableHandler { public AlarmClockHoldableHandler(KMHoldableCommander commander, FloatingHoldable holdable, IRCConnection connection, CoroutineCanceller canceller) : base(...
614594bf-2c53-4ef9-abca-1ea0cec93c85
{ "language": "C#" }
```c# using System; namespace EvilDICOM.Core.Helpers { public class EnumHelper { public static T StringToEnum<T>(string name) { return (T) Enum.Parse(typeof (T), name); } } }``` Use Enum.Parse overload available in PCL
```c# using System; namespace EvilDICOM.Core.Helpers { public class EnumHelper { public static T StringToEnum<T>(string name) { return (T) Enum.Parse(typeof (T), name, false); } } }```
d770a34d-078e-4c59-995d-3a52783fbb30
{ "language": "C#" }
```c# using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace MonoGameUtils.UI.GameComponents { /// <summary> /// Represents a rectangular button that can be clicked in a game. /// </summary> public class Button : DrawableGameComponent { public SpriteFont Font { ge...
```c# using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace MonoGameUtils.UI.GameComponents { /// <summary> /// Represents a rectangular button that can be clicked in a game. /// </summary> public class Button : DrawableGameComponent { public SpriteFont Font { ge...
13112b82-4280-478f-a417-14d01a861053
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using NutzCode.Libraries.Web.StreamProvider; namespace NutzCode.CloudFileSystem {...
```c# using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using NutzCode.Libraries.Web.StreamProvider; namespace NutzCode.CloudFileSystem {...
4afe0270-3777-42dc-9ca5-b06f58d129d8
{ "language": "C#" }
```c# namespace EFRepository { /// <summary> /// IRepository /// </summary> /// <typeparam name="TEntity">The type of the entity.</typeparam> public interface IRepository<TEntity> where TEntity : class { /// <summary> /// Adds the specified data. /// </summary> /...
```c# using System.Collections.Generic; namespace EFRepository { /// <summary> /// IRepository /// </summary> /// <typeparam name="TEntity">The type of the entity.</typeparam> public interface IRepository<TEntity> where TEntity : class { /// <summary> /// Adds the specified dat...
0a15286f-22eb-467f-a682-ae4cd83904db
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public class ReturnToBounds : MonoBehaviour { [SerializeField] Transform frontBounds = null; [SerializeField] Transform backBounds = null; [SerializeField] Transform leftBounds = null; [SerializeField] ...
```c# // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Examples.Experimental.Demos { publ...
a854f35a-256d-4822-a62d-a501aff872f3
{ "language": "C#" }
```c# using System; using System.Linq; using System.Net; namespace BmpListener.Bgp { public class IPAddrPrefix { public IPAddrPrefix(ArraySegment<byte> data, AddressFamily afi = AddressFamily.IP) { DecodeFromBytes(data, afi); } public byte Length { get; private set...
```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...
a926168a-a8a0-4d40-b2d3-0a2005f9ce5e
{ "language": "C#" }
```c# using System; using System.Net.Http; using System.Threading.Tasks; namespace Archon.WebApi { public abstract class Link { public Authorization Authorization { get; set; } public HttpRequestMessage CreateRequest() { var req = CreateRequestInternal(); if (Authorization != null) req.Headers.Aut...
```c# using System; using System.Net.Http; using System.Threading; using System.Threading.Tasks; namespace Archon.WebApi { public abstract class Link { public Authorization Authorization { get; set; } public HttpRequestMessage CreateRequest() { var req = CreateRequestInternal(); var authToken = GetAut...
49d600d0-04f3-4e49-b28a-cb862bb90e7d
{ "language": "C#" }
```c# <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>@ViewBag.Title - Atata.Bootstrap.TestApp v5</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ0...
```c# <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>@ViewBag.Title - Atata.Bootstrap.TestApp v5</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet"> @RenderSection("styles", false)...
9532d87b-e217-4574-993e-f9cf2e3446d8
{ "language": "C#" }
```c# using System; using System.Threading; using Microsoft.VisualStudio.TestTools.UnitTesting; using AdmoInstallerCustomAction; using System.Windows; namespace AdmoTests.CustomActionTests { [TestClass] public class CustomActionTests { [TestMethod] public void TestMethod1() { ...
```c# using System; using System.Threading; using Admo; using Microsoft.VisualStudio.TestTools.UnitTesting; using AdmoInstallerCustomAction; using System.Windows; namespace AdmoTests.CustomActionTests { [TestClass] public class CustomActionTests { [TestMethod] public void TestRunWPFOnSTA...
34b475f3-d01f-4e1d-878d-0cd11f4497d2
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using TechTalk.SpecFlow; namespace FizzBuzz.Specification.AutomationLayer { [Binding] public class StepDefinitions { [Given(@"the current number is '(.*)'")] public void GivenTheCurrentNumberIs(int p0) { ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using TechTalk.SpecFlow; namespace FizzBuzz.Specification.AutomationLayer { [Binding] public class StepDefinitions { private int currentNumber; [Given(@"the current number is '(.*)'")] public void GivenTheCu...
c81fd80c-b307-43a3-b49f-f50c0ec0fb07
{ "language": "C#" }
```c# using Microsoft.Extensions.DependencyInjection; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Install.InstallSteps; using Umbraco.Cms.Core.Install.Models; using Umbraco.Cms.Infrastructure.Install; using Umbraco.Cms.Infrastructure.Install.InstallSteps; using Umbraco.Extensions; namespace Umbr...
```c# using Microsoft.Extensions.DependencyInjection; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Install.InstallSteps; using Umbraco.Cms.Core.Install.Models; using Umbraco.Cms.Infrastructure.Install; using Umbraco.Cms.Infrastructure.Install.InstallSteps; using Umbraco.Extensions; namespace Umbr...
eb94251b-b6f5-4232-8785-cb86a2a9bffd
{ "language": "C#" }
```c# using System.Threading.Tasks; using Microsoft.Owin; using System.Linq; using System; using Foundation.Api.Implementations; using System.Threading; namespace Foundation.Api.Middlewares { public class OwinCacheResponseMiddleware : DefaultOwinActionFilterMiddleware { public OwinCacheResponseMiddlewa...
```c# using System.Threading.Tasks; using Microsoft.Owin; using System.Linq; using System; using Foundation.Api.Implementations; namespace Foundation.Api.Middlewares { public class OwinCacheResponseMiddleware : DefaultOwinActionFilterMiddleware { public OwinCacheResponseMiddleware() { ...