doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
aba7cdce-758b-406e-8b16-d3836ce5be6b
{ "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.Bindings; using osu.Framework.Input.States; using osuTK.Input; using KeyboardState = osu.Framework.Input.States.Key...
```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.Bindings; namespace osu.Framework.Tests.Input { [TestFixture] public class KeyCombinationTest { ...
d7f08b6f-af7f-442e-a140-7271bcb1a930
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using DapperTesting.Core.Model; namespace DapperTesting.Core.Data { public class DapperPostRepository : DapperRepositoryBase, IPostRepository { public DapperPostRepository(IConnectionFactory connectionFactory, string connectionStringName) : base(co...
```c# using System; using System.Collections.Generic; using System.Linq; using Dapper; using DapperTesting.Core.Model; namespace DapperTesting.Core.Data { public class DapperPostRepository : DapperRepositoryBase, IPostRepository { public DapperPostRepository(IConnectionFactory connectionFactory, str...
7188364b-6c71-4c34-bda5-f4a169ecf87d
{ "language": "C#" }
```c# using System; using NUnit.Framework; using SevenDigital.Api.Schema; using SevenDigital.Api.Wrapper.Exceptions; using SevenDigital.Api.Schema.ArtistEndpoint; using SevenDigital.Api.Schema.LockerEndpoint; namespace SevenDigital.Api.Wrapper.Integration.Tests.Exceptions { [TestFixture] public class Error...
```c# using System; using NUnit.Framework; using SevenDigital.Api.Schema; using SevenDigital.Api.Wrapper.Exceptions; using SevenDigital.Api.Schema.ArtistEndpoint; using SevenDigital.Api.Schema.LockerEndpoint; namespace SevenDigital.Api.Wrapper.Integration.Tests.Exceptions { [TestFixture] public class Error...
134ed92e-4eda-4c2d-a0b9-eee81ccdfb9e
{ "language": "C#" }
```c# using System.IO; namespace NuGet.Extensions.Tests.TestData { public class Isolation { public static DirectoryInfo GetIsolatedTestSolutionDir() { var solutionDir = new DirectoryInfo(Path.GetRandomFileName()); CopyFilesRecursively(new DirectoryInfo(Paths.TestSoluti...
```c# using System.IO; namespace NuGet.Extensions.Tests.TestData { public class Isolation { public static DirectoryInfo GetIsolatedTestSolutionDir() { var solutionDir = new DirectoryInfo(GetRandomTempDirectoryPath()); CopyFilesRecursively(new DirectoryInfo(Paths.TestSo...
83751c3a-bef9-4aaf-92db-7a944c905418
{ "language": "C#" }
```c# // Compile with: // docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore2.0 dotnet publish -c Release -o pub // Run with: // docker run --rm -v "$PWD"/pub:/var/task lambci/lambda:dotnetcore2.0 test::test.Function::FunctionHandler "some" using Amazon.Lambda.Core; [assembly: LambdaSerializer(typeof...
```c# // Compile with: // docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore2.0 dotnet publish -c Release -o pub // Run with: // docker run --rm -v "$PWD"/pub:/var/task lambci/lambda:dotnetcore2.0 test::test.Function::FunctionHandler "some" using System; using System.Collections; using Amazon.Lambda.C...
b1ad7865-2fc1-4a97-bfee-403479b655c8
{ "language": "C#" }
```c# using System.Linq; using GitVersion; using GitVersionTask; using Microsoft.Build.Framework; using NUnit.Framework; using Shouldly; [TestFixture] public class GetVersionTaskTests { [Test] public void OutputsShouldMatchVariableProvider() { var taskProperties = typeof(GetVersion) .G...
```c# using System.Linq; using GitVersion; using GitVersionTask; using Microsoft.Build.Framework; using NUnit.Framework; using Shouldly; [TestFixture] public class GetVersionTaskTests { [Test] public void OutputsShouldMatchVariableProvider() { var taskProperties = typeof(GetVersion) .G...
f1a9a521-bcc9-43a2-9df9-690566853cf6
{ "language": "C#" }
```c# using System; namespace WundergroundClient.Autocomplete { enum ResultFilter { CitiesOnly, HurricanesOnly, CitiesAndHurricanes } class AutocompleteRequest { private String _searchString; private ResultFilter _filter = ResultFilter.CitiesOnly; p...
```c# using System; namespace WundergroundClient.Autocomplete { enum ResultFilter { CitiesOnly, HurricanesOnly, CitiesAndHurricanes } class AutocompleteRequest { private const String BaseUrl = "http://autocomplete.wunderground.com/"; private readonly Strin...
07c9ef69-5f66-4d16-8b08-dda83dbcad71
{ "language": "C#" }
```c# using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using OpenStardriveServer.Domain.Database; using OpenStardriveServer.Domain.Systems; namespace OpenStardriveServer.HostedServices; public class ServerInitializationService : BackgroundSe...
```c# using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using OpenStardriveServer.Domain; using OpenStardriveServer.Domain.Database; using OpenStardriveServer.Domain.Systems; namespace OpenStardriveServer.HostedServices; public class ServerIn...
9f75e698-504c-40f4-afaa-325e73ebbd6e
{ "language": "C#" }
```c# // Copyright 2017 Google 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 required by ...
```c# // Copyright 2017 Google 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 required by ...
629fb80d-2dd5-438c-9038-13fd194fa72c
{ "language": "C#" }
```c# @{ViewBag.Title = "Home";} <div class="jumbotron"> <h1>CasperJS Testing!</h1> <p>CasperJS is a navigation scripting & testing utility for PhantomJS written in Javascript</p> <p><a target="_blank" href="http://casperjs.org/" class="btn btn-primary btn-lg" role="button">Learn more</a></p> </div> <di...
```c# @{ViewBag.Title = "Home";} <div class="jumbotron"> <h1>CasperJS Testing!!!</h1> <p>CasperJS is a navigation scripting & testing utility for PhantomJS written in Javascript</p> <p><a target="_blank" href="http://casperjs.org/" class="btn btn-primary btn-lg" role="button">Learn more</a></p> </div> <...
5ed783c5-6540-451e-a51d-9e655e0c440c
{ "language": "C#" }
```c# // Copyright 2013 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; using System.Linq; using NodaTime.Annotations; using NUnit.Framework; namespace NodaTime.Test.Annotations { [TestFixture] pu...
```c# // Copyright 2013 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; using System.Linq; using NodaTime.Annotations; using NUnit.Framework; namespace NodaTime.Test.Annotations { [TestFixture] pu...
5e3fd3e1-c41f-4917-8da5-6cb0b573b119
{ "language": "C#" }
```c# using DarkSky.Models; using DarkSky.Services; using Microsoft.Extensions.Options; using System.Collections.Generic; using System.Threading.Tasks; using WeatherLink.Models; namespace WeatherLink.Services { /// <summary> /// A service to get a Dark Sky forecast for a latitude and longitude. /// </summa...
```c# using DarkSky.Models; using DarkSky.Services; using Microsoft.Extensions.Options; using System.Collections.Generic; using System.Threading.Tasks; using WeatherLink.Models; namespace WeatherLink.Services { /// <summary> /// A service to get a Dark Sky forecast for a latitude and longitude. /// </summa...
64ee5821-4b9b-47a4-8b46-9a5157d62dd6
{ "language": "C#" }
```c# using System; using System.Globalization; namespace LiveSplit.Model { public static class TimeSpanParser { public static TimeSpan? ParseNullable(String timeString) { if (String.IsNullOrEmpty(timeString)) return null; return Parse(timeString); ...
```c# using System; using System.Linq; using System.Globalization; namespace LiveSplit.Model { public static class TimeSpanParser { public static TimeSpan? ParseNullable(String timeString) { if (String.IsNullOrEmpty(timeString)) return null; return Parse...
ecd2a6ee-2c68-4656-8bbe-f0ae44250021
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; 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.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; using...
d4f52b63-5bf0-44bf-aa8e-70126cce13d0
{ "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.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; namespace HelloWorld { public class Startup { public void ConfigureServices(IServiceCollection services) { se...
465241b9-60fc-4f1f-977d-ffaca1b5780e
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace StreamDeckSharp { /// <summary> /// </summary> /// <remarks> /// The <see cref="IStreamDeck"/> interf...
```c# using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace StreamDeckSharp { /// <summary> /// </summary> /// <remarks> /// The <see cref="IStreamDeck"/> interf...
d2faf55d-3b0d-469d-a2bd-0e98be4c871b
{ "language": "C#" }
```c# using System.Globalization; using Xunit; namespace ByteSizeLib.Tests.BinaryByteSizeTests { public class ToBinaryStringMethod { [Fact] public void ReturnsDefaultRepresenation() { // Arrange var b = ByteSize.FromKiloBytes(10); // Act ...
```c# using System.Globalization; using Xunit; namespace ByteSizeLib.Tests.BinaryByteSizeTests { public class ToBinaryStringMethod { [Fact] public void ReturnsDefaultRepresenation() { // Arrange var b = ByteSize.FromKiloBytes(10); // Act ...
0248858c-d974-42f1-890a-e96608981b99
{ "language": "C#" }
```c# namespace AngleSharp.Performance.Css { using AngleSharp; using AngleSharp.Parser.Css; using System; class AngleSharpParser : ITestee { static readonly IConfiguration configuration = new Configuration().WithCss(); public String Name { get { return "AngleSh...
```c# namespace AngleSharp.Performance.Css { using AngleSharp; using AngleSharp.Parser.Css; using System; class AngleSharpParser : ITestee { static readonly IConfiguration configuration = new Configuration().WithCss(); static readonly CssParserOptions options = new CssParserOptions...
6fe80e49-e0bc-46e6-843f-417faf15a618
{ "language": "C#" }
```c# using System.Threading.Tasks; namespace DanTup.DartAnalysis { class AnalysisGetHoverRequest : Request<AnalysisGetHoverParams, Response<AnalysisGetHoverResponse>> { public string method = "analysis.getHover"; public AnalysisGetHoverRequest(string file, int offset) { this.@params = new AnalysisGetHove...
```c# using System.Threading.Tasks; namespace DanTup.DartAnalysis { class AnalysisGetHoverRequest : Request<AnalysisGetHoverParams, Response<AnalysisGetHoverResponse>> { public string method = "analysis.getHover"; public AnalysisGetHoverRequest(string file, int offset) { this.@params = new AnalysisGetHove...
0f4a1142-bf8e-423e-a1b7-493e736cf9c4
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CodePlayground { public static class MyLinqMethods { public static IEnumerable<T> Where<T>( this IEnumerable<T> inputSequence, Func<T, bool> pred...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CodePlayground { public static class MyLinqMethods { public static IEnumerable<T> Where<T>( this IEnumerable<T> inputSequence, Func<T, bool> pred...
e31fad45-f5b7-4cb2-b03e-921cf4ebda1d
{ "language": "C#" }
```c# using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq...
```c# using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq...
4873ec8c-c657-451e-a40c-889d680c3976
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using Moq; using Engine; namespace EngineTest { [TestFixture()] public class ActorShould { Mock<IScene> scene; Actor actor; Mock<IStrategy> strategy; [SetUp()] public void SetUp() { ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using Moq; using Engine; namespace EngineTest { [TestFixture()] public class ActorShould { Mock<IScene> scene; Actor actor; Mock<IStrategy> strategy; private Mock<IAct> act; [SetUp()...
6dc370dd-95eb-4b25-832b-799e8f497817
{ "language": "C#" }
```c# using System; using Newtonsoft.Json; using TeleBot.API.Enums; namespace TeleBot.API.Extensions { public class ParseModeEnumConverter : JsonConverter { public override bool CanConvert(Type objectType) { return objectType == typeof(string); } public override ob...
```c# using System; using Newtonsoft.Json; using TeleBot.API.Enums; namespace TeleBot.API.Extensions { public class ParseModeEnumConverter : JsonConverter { public override bool CanConvert(Type objectType) { return objectType == typeof(string); } public override ob...
028b63b0-ad25-46e2-ab48-df77b021edb2
{ "language": "C#" }
```c# using BikeMates.DataAccess.Entity; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BikeMates.Contracts { //TODO: Create folder Repositories and move this interface into it //TODO: Create a base IRepository interface public...
```c# using BikeMates.DataAccess.Entity; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BikeMates.Contracts { //TODO: Create folder Repositories and move this interface into it //TODO: Create a base IRepository interface public...
40f417dd-d0bf-469a-a3d3-bf1b5560d38b
{ "language": "C#" }
```c# // Copyright (c) 2017 Sergey Zhigunov. // Licensed under the MIT License. See LICENSE file in the project root for full license information. using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Hangfire.EntityFramework { internal class Han...
```c# // Copyright (c) 2017 Sergey Zhigunov. // Licensed under the MIT License. See LICENSE file in the project root for full license information. using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Hangfire.EntityFramework { internal class Han...
8efe1fea-65f7-4647-9bbb-0953dbfa5c26
{ "language": "C#" }
```c# using CarFuel.DataAccess; using CarFuel.Models; using CarFuel.Services; using Microsoft.AspNet.Identity; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace CarFuel.Controllers { public class CarsController : Controller { private I...
```c# using CarFuel.DataAccess; using CarFuel.Models; using CarFuel.Services; using Microsoft.AspNet.Identity; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Web; using System.Web.Mvc; namespace CarFuel.Controllers { public class CarsController : Controller {...
10f22612-69af-4284-8e7a-51c8848c47d2
{ "language": "C#" }
```c# // Copyright (c) The Avalonia Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using Avalonia.Data; using Xunit; namespace Avalonia.Controls.UnitTests { public class TextBlockTests { [Fact] public void ...
```c# // Copyright (c) The Avalonia Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using Avalonia.Data; using Xunit; namespace Avalonia.Controls.UnitTests { public class TextBlockTests { [Fact] public void ...
5744da11-131f-4fb0-b160-c72e2fc9cf26
{ "language": "C#" }
```c# using System; using System.IO; using System.IO.MemoryMappedFiles; using System.Threading; using UltimaRX.Proxy.InjectionApi; namespace Infusion.Desktop { internal static class InterProcessCommunication { private static readonly EventWaitHandle MessageSentEvent = new EventWaitHandle(false, EventR...
```c# using System; using System.IO; using System.IO.MemoryMappedFiles; using System.Threading; using UltimaRX.Proxy.InjectionApi; namespace Infusion.Desktop { internal static class InterProcessCommunication { private static readonly EventWaitHandle MessageSentEvent = new EventWaitHandle(false, EventR...
76036146-643e-4afa-ac71-2331a2e59e0f
{ "language": "C#" }
```c# using Xunit; using System.IO; namespace Mammoth.Tests { public class DocumentConverterTests { [Fact] public void DocxContainingOneParagraphIsConvertedToSingleParagraphElement() { assertSuccessfulConversion( convertToHtml("single-paragraph.docx"), "<p>Walking on imported air</p>"); } private...
```c# using Xunit; using System.IO; namespace Mammoth.Tests { public class DocumentConverterTests { [Fact] public void DocxContainingOneParagraphIsConvertedToSingleParagraphElement() { assertSuccessfulConversion( ConvertToHtml("single-paragraph.docx"), "<p>Walking on imported air</p>"); } [Fact] ...
1cbcda55-0e28-477e-82dd-cca62572d670
{ "language": "C#" }
```c# using System; using System.Linq; using MyApplication.dependencies; using System.Collections.Generic; namespace MyApplication { public class PersonService { /// <summary> /// Initializes a new instance of the <see cref="PersonService"/> class. /// </summary> public...
```c# using System; using System.Linq; using MyApplication.dependencies; using System.Collections.Generic; namespace MyApplication { public class PersonService { /// <summary> /// Initializes a new instance of the <see cref="PersonService"/> class. /// </summary> public...
8a253581-4a42-4c9b-8132-6e08550bd94a
{ "language": "C#" }
```c# using ONIT.VismaNetApi.Models; using System.Threading.Tasks; namespace ONIT.VismaNetApi.Lib.Data { public class JournalTransactionData : BaseCrudDataClass<JournalTransaction> { public JournalTransactionData(VismaNetAuthorization auth) : base(auth) { ApiControllerUri = VismaNe...
```c# using ONIT.VismaNetApi.Models; using System.Threading.Tasks; namespace ONIT.VismaNetApi.Lib.Data { public class JournalTransactionData : BaseCrudDataClass<JournalTransaction> { public JournalTransactionData(VismaNetAuthorization auth) : base(auth) { ApiControllerUri = VismaNe...
e2d44b84-a9e4-4b8e-88fd-a3acb7d78acf
{ "language": "C#" }
```c# using Alensia.Core.Actor; using Alensia.Core.Camera; using Alensia.Tests.Actor; using NUnit.Framework; namespace Alensia.Tests.Camera { [TestFixture, Description("Test suite for ThirdPersonCamera class.")] public class ThirdPersonCameraTest : BaseOrbitingCameraTest<ThirdPersonCamera, IHumanoid> { ...
```c# using Alensia.Core.Actor; using Alensia.Core.Camera; using Alensia.Tests.Actor; using NUnit.Framework; using UnityEngine; namespace Alensia.Tests.Camera { [TestFixture, Description("Test suite for ThirdPersonCamera class.")] public class ThirdPersonCameraTest : BaseOrbitingCameraTest<ThirdPersonCamera, ...
bd70a0a1-5e53-431c-8c8b-3c6f4a2850d1
{ "language": "C#" }
```c# @model MarkdownPage <section class="body"> <div class="row"> <div class="large-9 columns"> <h1>@Model.Title</h1> @Model.Content </div> <div class="large-3 columns"> <div class="section-container accordian"> @foreach (var category i...
```c# @model MarkdownPage @{ ViewBag.Title = Model.Title; } <section class="body"> <div class="row"> <div class="large-9 columns"> <h1>@Model.Title</h1> @Model.Content </div> <div class="large-3 columns"> <div class="section-container accordian"> ...
6bebe9bd-16bf-4d03-8601-c1244aa31f5c
{ "language": "C#" }
```c# using TicketTimer.Core.Infrastructure; namespace TicketTimer.Core.Services { // TODO this should have a better name public class WorkItemServiceImpl : WorkItemService { private readonly WorkItemStore _workItemStore; private readonly DateProvider _dateProvider; public WorkItem...
```c# using TicketTimer.Core.Infrastructure; namespace TicketTimer.Core.Services { // TODO this should have a better name public class WorkItemServiceImpl : WorkItemService { private readonly WorkItemStore _workItemStore; private readonly DateProvider _dateProvider; public WorkItem...
897decec-a4d3-4d78-85df-1c3493155c7d
{ "language": "C#" }
```c# // Copyright (c) 2014 Eberhard Beilharz // This software is licensed under the MIT license (http://opensource.org/licenses/MIT) using System; using Undisposed; namespace UndisposedExe { class MainClass { private static void Usage() { Console.WriteLine("Usage"); Console.WriteLine("Undisposed.exe [-o ...
```c# // Copyright (c) 2014 Eberhard Beilharz // This software is licensed under the MIT license (http://opensource.org/licenses/MIT) using System; using Undisposed; namespace UndisposedExe { class MainClass { private static void Usage() { Console.WriteLine("Usage"); Console.WriteLine("Undisposed.exe [-o ...
e3924e0c-970f-4911-8517-c90ea7ae3155
{ "language": "C#" }
```c# using System.Web.Http.Controllers; namespace System.Web.Http.ModelBinding { // Interface for model binding public interface IModelBinder { bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext); } } ``` Change comment to doc comment
```c# using System.Web.Http.Controllers; namespace System.Web.Http.ModelBinding { /// <summary> /// Interface for model binding. /// </summary> public interface IModelBinder { bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext); } } ```
6bd8353c-2076-4085-a331-342d1eab7ece
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Linq; using RestImageResize.Security; using RestImageResize.Utils; namespace RestImageResize { /// <summary> /// Provides configuration options. /// </summary> internal static class Config { private static class AppSettingKeys { ...
```c# using System.Collections.Generic; using System.Linq; using RestImageResize.Security; using RestImageResize.Utils; namespace RestImageResize { /// <summary> /// Provides configuration options. /// </summary> internal static class Config { private static class AppSettingKeys { ...
4a3151ab-7844-4af5-8977-0890a234511e
{ "language": "C#" }
```c# using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; namespace Tamarind.Cache { // TODO: NEEDS DOCUMENTATION. public interface ICache<K, V> { V GetIfPresent(K key); V Get(K key, Func<V> valueLoader); ...
```c# using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; namespace Tamarind.Cache { // Guava Reference: https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/cache/Cache.java // TODO: NEEDS DOCUMENTATIO...
84a5e164-2ae6-4b58-a24a-4ecde595e835
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Web; using Twilio; using Twilio.Rest.Api.V2010.Account; using Twilio.Types; namespace VendingMachineNew { public class TwilioAPI { static void Main(string[] args) { S...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Web; using Twilio; using Twilio.Rest.Api.V2010.Account; using Twilio.Types; namespace VendingMachineNew { public class TwilioAPI { static void Main(string[] args) { S...
06122fe1-ad4f-4f4c-9e15-0cfd029e0c31
{ "language": "C#" }
```c# using System.Reflection; using Abp.Modules; namespace Abp.TestBase { [DependsOn(typeof(AbpKernelModule))] public class AbpTestBaseModule : AbpModule { public override void PreInitialize() { Configuration.EventBus.UseDefaultEventBus = false; } public overr...
```c# using System.Reflection; using Abp.Modules; namespace Abp.TestBase { [DependsOn(typeof(AbpKernelModule))] public class AbpTestBaseModule : AbpModule { public override void PreInitialize() { Configuration.EventBus.UseDefaultEventBus = false; Configuration.Defau...
97cd382d-9f8c-465a-be7e-c101493e7202
{ "language": "C#" }
```c# using System; using System.Xml; using Hacknet; using Pathfinder.Util; using Pathfinder.Util.XML; namespace Pathfinder.Action { public abstract class DelayablePathfinderAction : PathfinderAction { [XMLStorage] public string DelayHost; [XMLStorage] public string Delay; ...
```c# using System; using System.Xml; using Hacknet; using Pathfinder.Util; using Pathfinder.Util.XML; namespace Pathfinder.Action { public abstract class DelayablePathfinderAction : PathfinderAction { [XMLStorage] public string DelayHost; [XMLStorage] public string Delay; ...
25ec3089-5032-4e12-a5bb-6d32c7afb558
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace ControlsLibrary.BasicControls { public partial class TextWindow : Form { public TextWindow() {...
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace ControlsLibrary.BasicControls { public partial class TextWindow : Form { public TextWindow() {...
e801339e-cdef-4bd3-8e96-cad467289f85
{ "language": "C#" }
```c# using System; using Xunit; using Branch.Clients.Json; using System.Threading.Tasks; using Branch.Clients.Http.Models; using System.Collections.Generic; namespace Branch.Tests.Clients.JsonTests { public class OptionTests { [Fact] public void RespectOptions() { var options = new Options ...
```c# using System; using Xunit; using Branch.Clients.Json; using System.Threading.Tasks; using Branch.Clients.Http.Models; using System.Collections.Generic; namespace Branch.Tests.Clients.JsonTests { public class OptionTests { [Fact] public void RespectOptions() { var options = new Options ...
05e44db0-c607-4d90-8215-f8c3926157c8
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; namespace KmlToGpxConverter { internal static class KmlReader { public const string FileExtension = "kml"; public static IList<GpsTimePoint> ReadFile(str...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; namespace KmlToGpxConverter { internal static class KmlReader { public const string FileExtension = "kml"; public static IList<GpsTimePoint> ReadFile(str...
79e6a08e-ae27-487d-af8d-69e1d6588237
{ "language": "C#" }
```c# using NSubstitute; using Xunit; namespace Core.Shogi.Tests.BitVersion { public class BitboardShogiGameShould { [Fact] public void IdentifyACheckMateState() { var blackPlayer = new Player(PlayerType.Black); var whitePlayer = new Player(PlayerType.White); ...
```c# using NSubstitute; using Xunit; namespace Core.Shogi.Tests.BitVersion { public class BitboardShogiGameShould { [Fact] public void IdentifyACheckMateState() { var blackPlayer = new Player(PlayerType.Black); var whitePlayer = new Player(PlayerType.White); ...
f7e59359-3f83-461b-a6b5-ce475c180347
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; 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.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; using...
1c21ffbd-948c-4866-81fa-19141d4727e2
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace Pennyworth { public static class DropHelper { public static IEnumerable<String> GetAssembliesFromDropData(IEnumerable<FileInfo> data) { Func<FileInfo, Boolean> isDir = fi => ((fi.Attributes & Fi...
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace Pennyworth { public static class DropHelper { public static IEnumerable<String> GetAssembliesFromDropData(IEnumerable<FileInfo> data) { Func<FileInfo, Boolean> isDir = fi => ((fi.Attributes & F...
fa3dc8fb-8cee-4f82-843e-2bd2596ea9b2
{ "language": "C#" }
```c# using System; using Android.App; using AndroidHUD; namespace XHUD { public enum MaskType { // None = 1, Clear, Black, // Gradient } public static class HUD { public static Activity MyActivity; public static void Show(string message, int progress = -1, MaskType maskType = MaskType.Black) { ...
```c# using System; using Android.App; using AndroidHUD; namespace XHUD { public enum MaskType { // None = 1, Clear = 2, Black = 3, // Gradient } public static class HUD { public static Activity MyActivity; public static void Show(string message, int progress = -1, MaskType maskType = MaskType.Black...
ccc332c1-7eaf-4567-bb9a-85d2b5bf79b1
{ "language": "C#" }
```c# using System; using Autofac; using WordList.Composition; namespace WordList { public class Program { public static void Main(string[] args) { var compositionRoot = CompositionRoot.Compose(); var wordListProgram = compositionRoot.Resolve<IWordListProgram>(); wordListProgram.Run(); ...
```c# using System; using Autofac; using WordList.Composition; namespace WordList { public class Program { public static void Main(string[] args) { CompositionRoot.Compose().Resolve<IWordListProgram>().Run(); Console.WriteLine("Press any key to quit..."); Console.ReadKey(); } } }```
74515fa9-9749-43c3-b1f2-8bf3f2cb75e3
{ "language": "C#" }
```c# using System; namespace Evolve { public class EvolveConfigurationException : EvolveException { private const string EvolveConfigurationError = "Evolve configuration error: "; public EvolveConfigurationException(string message) : base(EvolveConfigurationError + message) { } publ...
```c# using System; namespace Evolve { public class EvolveConfigurationException : EvolveException { private const string EvolveConfigurationError = "Evolve configuration error: "; public EvolveConfigurationException(string message) : base(EvolveConfigurationError + FirstLetterToLower(message...
6348ee75-e441-41b6-8549-9e378186ebd0
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Diagnostics; namespace Symbooglix { public class ExecutionTreeNode { public readonly ExecutionTreeNode Parent; public readonly ProgramLocation CreatedAt; public readonly ExecutionState State; // Should this be a weak re...
```c# using System; using System.Collections.Generic; using System.Diagnostics; namespace Symbooglix { public class ExecutionTreeNode { public readonly ExecutionTreeNode Parent; public readonly ProgramLocation CreatedAt; public readonly ExecutionState State; // Should this be a weak re...
943c8528-799e-49b3-ad1d-0e797ad457d7
{ "language": "C#" }
```c# namespace BracesValidator { using System.Collections.Generic; public class BracesValidator { public bool Validate(string code) { char[] codeArray = code.ToCharArray(); List<char> openers = new List<char> { '{', '[', '(' }; List<char> closers = new ...
```c# namespace BracesValidator { using System.Collections.Generic; public class BracesValidator { public bool Validate(string code) { char[] codeArray = code.ToCharArray(); Dictionary<char, char> openersClosersMap = new Dictionary<char, char>(); opener...
6bac64b9-ae0b-4291-868f-22c909338b18
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading; using DotNetApis.Common.Internals; using Microsoft.Extensions.Logging; namespace DotNetApis.Common { /// <summary> /// A logger that attempts to write to an implicit Ably channel. This type can be safely created b...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading; using DotNetApis.Common.Internals; using Microsoft.Extensions.Logging; namespace DotNetApis.Common { /// <summary> /// A logger that attempts to write to an implicit Ably channel. This type can be safely created b...
18747930-2bf4-44e0-b668-26233f766eee
{ "language": "C#" }
```c# // Copyright 2006 Alp Toker <alp@atoker.com> // This software is made available under the MIT License // See COPYING for details using System; //using GLib; //using Gtk; using NDesk.DBus; using NDesk.GLib; using org.freedesktop.DBus; namespace NDesk.DBus { //FIXME: this API needs review and de-unixification. I...
```c# // Copyright 2006 Alp Toker <alp@atoker.com> // This software is made available under the MIT License // See COPYING for details using System; //using GLib; //using Gtk; using NDesk.DBus; using NDesk.GLib; using org.freedesktop.DBus; namespace NDesk.DBus { //FIXME: this API needs review and de-unixification. I...
317066cc-125c-4ffb-b295-bdb2454a1f5e
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using Android.App; using Android.Content; using Android.OS; using Android.Runtime; using Android.Views; using Android.Widget; using Android.Util; using Android.Graphics; namespace SignaturePad { public class ClearingImageVi...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using Android.App; using Android.Content; using Android.OS; using Android.Runtime; using Android.Views; using Android.Widget; using Android.Util; using Android.Graphics; namespace SignaturePad { public class ClearingImageVi...
a6c901a4-ecc6-4f4c-ab3d-fe084a1c9753
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Atata.Tests")] [assembly: Guid("9d0aa4f2-4987-4395-be95-76abc329b7a0")]``` Add parallelism to Tests project
```c# using NUnit.Framework; using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Atata.Tests")] [assembly: Guid("9d0aa4f2-4987-4395-be95-76abc329b7a0")] [assembly: LevelOfParallelism(4)] [assembly: Parallelizable(ParallelScope.Fixtures)] [assembly: Atata.Culture("en-us")]```
78bca0df-590e-4bf3-ac77-a2a56c8dd42c
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using HeadRaceTimingSite.Models; using Microsoft.EntityFrameworkCore; namespace HeadRaceTimingSite.Controllers { public class CrewController : BaseController { public C...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using HeadRaceTimingSite.Models; using Microsoft.EntityFrameworkCore; namespace HeadRaceTimingSite.Controllers { public class CrewController : BaseController { public C...
c0942ade-e102-44b8-84aa-4794aa72273e
{ "language": "C#" }
```c# #pragma warning disable CS1720 // Expression will always cause a System.NullReferenceException because the type's default value is null #pragma warning disable xUnit1013 // Public method should be marked as test using Xunit; using MonoMod.RuntimeDetour; using System; using System.Reflection; using System.Runtim...
```c# #pragma warning disable CS1720 // Expression will always cause a System.NullReferenceException because the type's default value is null #pragma warning disable xUnit1013 // Public method should be marked as test using Xunit; using MonoMod.RuntimeDetour; using System; using System.Reflection; using System.Runtim...
05a7af5b-3fac-4267-bc59-3f2379104395
{ "language": "C#" }
```c# using System; using System.Threading.Tasks; using JabbR.ContentProviders.Core; using JabbR.Infrastructure; namespace JabbR.ContentProviders { public class UserVoiceContentProvider : CollapsibleContentProvider { private static readonly string _uservoiceAPIURL = "http://{0}/api/v1/oembed.json?url=...
```c# using System; using System.Threading.Tasks; using JabbR.ContentProviders.Core; using JabbR.Infrastructure; namespace JabbR.ContentProviders { public class UserVoiceContentProvider : CollapsibleContentProvider { private static readonly string _uservoiceAPIURL = "https://{0}/api/v1/oembed.json?url...
ce651d98-2976-4028-857b-67e3f5a7e76c
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Localisation; using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Settings.Sections { /// <summary> /// A ...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Globalization; using osu.Framework.Localisation; using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Settings.Sections { ...
17def1e1-739c-4794-a750-70d171158d36
{ "language": "C#" }
```c# using System.Net.Http; using System.Security.Cryptography.X509Certificates; namespace Docker.DotNet.X509 { public class CertificateCredentials : Credentials { private readonly WebRequestHandler _handler; public CertificateCredentials(X509Certificate2 clientCertificate) { ...
```c# using System.Net; using System.Net.Http; using System.Security.Cryptography.X509Certificates; using Microsoft.Net.Http.Client; namespace Docker.DotNet.X509 { public class CertificateCredentials : Credentials { private X509Certificate2 _certificate; public CertificateCredentials(X509Cert...
6c637e29-c81f-46fb-a3d3-a548db15fc72
{ "language": "C#" }
```c#  using FluentMigrator; namespace Azimuth.Migrations { [Migration(201409101200)] public class Migration_201409101200_RemoveListenedTableAndAddCounterToPlaylistTable: Migration { public override void Up() { Delete.Table("Listened"); Alter.Table("Playlists").AddC...
```c#  using FluentMigrator; namespace Azimuth.Migrations { [Migration(201409101200)] public class Migration_201409101200_RemoveListenedTableAndAddCounterToPlaylistTable: Migration { public override void Up() { Delete.Table("Listened"); Alter.Table("Playlists").AddC...
9fd5484d-e1b9-4f30-864d-ae33140224b7
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MathParser.Tests { public class InfixLexicalAnalyzerTest { public void Expressao_binaria_simples_com_espacos() { //var analyzer = new Infi...
```c# using Xunit; namespace MathParser.Tests { public class InfixLexicalAnalyzerTest { [Fact] public void Expressao_binaria_simples_com_espacos() { //var analyzer = new InfixLexicalAnalyzer(); //analyzer.Analyze("2 + 2"); } } } ```
a1786c6d-da38-417d-ae94-48fa2b13fb4d
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Synapse.RestClient.Transaction; namespace Synapse.RestClient { using User; using Node; public class SynapseRestClientFactory { private SynapseApiCredentials _creds; ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Synapse.RestClient.Transaction; namespace Synapse.RestClient { using User; using Node; using System.Net; public class SynapseRestClientFactory { private SynapseA...
61c0de89-8866-4ca5-bf05-29b35521632d
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using Bloom; using Bloom.MiscUI; using NUnit.Framework; namespace BloomTests { [TestFixture] #if __MonoCS__ [RequiresSTA] #endif public class ProblemReporterDialogTests { [TestFixtureSetUp] ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using Bloom; using Bloom.MiscUI; using NUnit.Framework; #if __MonoCS__ using Gecko; #endif namespace BloomTests { [TestFixture] #if __MonoCS__ [RequiresSTA] #endif public class ProblemReporterDi...
377d5b97-4227-46fe-aa9c-618978d4e689
{ "language": "C#" }
```c# using System; namespace HelloClient { class MainClass { public static void Main(string[] args) { Console.WriteLine("Hello World!"); } } } ``` Add client for simple call
```c# using System; using Grpc.Core; using Hello; namespace HelloClient { class Program { public static void Main(string[] args) { Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure); var client = new HelloService.HelloServiceClient(channel); String user = "Euler"; var re...
dddfab69-9e4d-43fc-a8a2-5b4b3e134e20
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace WebNoodle { public static class NodeHelper { public static IEnumerable<object> YieldChildren(this object node, string path, bool breakOnNull = false) { path = string.IsNullOrWhiteSpace(path) ? "/" : path; yi...
```c# using System; using System.Collections.Generic; using System.Web; namespace WebNoodle { public static class NodeHelper { public static IEnumerable<object> YieldChildren(this object node, string path, bool breakOnNull = false) { path = string.IsNullOrWhiteSpace(path) ? "/" : pa...
24615e4a-ab8a-402b-8829-218e160e078e
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; namespace MonoGame.Extended { public class FramesPerSecondCounter : IUpdate { public FramesPerSecondCounter(int maximumSamples = 100) { MaximumSamples = maximumSamples; } priv...
```c# using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; namespace MonoGame.Extended { public class FramesPerSecondCounter : DrawableGameComponent { public FramesPerSecondCounter(Game game, int maximumSamples = 100) :base(game) { Maximum...
84804e9d-8bd0-4b70-b3b1-d545e9b6c84c
{ "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.Globalization; using NUnit.Framework; using osu.Framework.Localisation; namespace osu.Framework.Tests.Localisation { [TestFixture] public clas...
```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.Globalization; using NUnit.Framework; using osu.Framework.Localisation; namespace osu.Framework.Tests.Localisation { [TestFixture] public clas...
1c91f55c-582d-47de-ad46-566ff6512361
{ "language": "C#" }
```c# // Copyright (c) 2015 SIL International // This software is licensed under the MIT license (http://opensource.org/licenses/MIT) using System; namespace LfMerge.LanguageForge.Model { public class LfAuthorInfo : LfFieldBase { public string CreatedByUserRef { get; set; } public DateTime CreatedDate { get; se...
```c# // Copyright (c) 2015 SIL International // This software is licensed under the MIT license (http://opensource.org/licenses/MIT) using System; using MongoDB.Bson; namespace LfMerge.LanguageForge.Model { public class LfAuthorInfo : LfFieldBase { public ObjectId? CreatedByUserRef { get; set; } public DateTim...
07ea989b-083b-4f63-af14-7ab18fb6e8f1
{ "language": "C#" }
```c# namespace Umbraco.Core.Models { public enum TagCacheStorageType { Json, Csv } } ``` Reset commit to not break backwards compatibility mode
```c# namespace Umbraco.Core.Models { public enum TagCacheStorageType { Csv, Json } }```
dcf9de61-d2ec-46b4-8881-16021ee92ea0
{ "language": "C#" }
```c# using AutomaticTypeMapper; using EOLib.Domain.NPC; using EOLib.IO.Repositories; using EOLib.Net; using EOLib.Net.Communication; namespace EOLib.Domain.Interact { [AutoMappedType] public class MapNPCActions : IMapNPCActions { private readonly IPacketSendService _packetSendService; pri...
```c# using AutomaticTypeMapper; using EOLib.Domain.Interact.Quest; using EOLib.Domain.NPC; using EOLib.IO.Repositories; using EOLib.Net; using EOLib.Net.Communication; namespace EOLib.Domain.Interact { [AutoMappedType] public class MapNPCActions : IMapNPCActions { private readonly IPacketSendServ...
99d0a61a-14d0-44aa-9bfb-dc5fc8bdbdb8
{ "language": "C#" }
```c# namespace Glimpse.Core2.Extensibility { public enum ScriptOrder { IncludeBeforeClientInterfaceScript, ClientInterfaceScript, IncludeAfterClientInterfaceScript, IncludeBeforeRequestDataScript, RequestDataScript, RequestMetadataScript, IncludeAfterRe...
```c# namespace Glimpse.Core2.Extensibility { public enum ScriptOrder { IncludeBeforeClientInterfaceScript, ClientInterfaceScript, IncludeAfterClientInterfaceScript, IncludeBeforeRequestDataScript, RequestMetadataScript, RequestDataScript, IncludeAfterRe...
92ffc775-f3d3-4f30-a19c-fb2545e473d4
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Reflection; namespace Roslyn.Utilities { /// <summary> /// This is a bridge for APIs that are only available on Des...
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Reflection; namespace Roslyn.Utilities { /// <summary> /// This is a bridge for APIs that are only available on Des...
25dfb194-191b-4fcf-a238-943f3ddb5d3b
{ "language": "C#" }
```c# using System; using System.Diagnostics; using System.IO; using System.Windows.Forms; using NuGet.VisualStudio; namespace NuGet.Options { public partial class GeneralOptionControl : UserControl { private IRecentPackageRepository _recentPackageRepository; private IProductUpdateSetti...
```c# using System; using System.Diagnostics; using System.IO; using System.Windows.Forms; using NuGet.VisualStudio; namespace NuGet.Options { public partial class GeneralOptionControl : UserControl { private IRecentPackageRepository _recentPackageRepository; private IProductUpdateSetti...
5332227b-0465-43de-873b-7e18eea39560
{ "language": "C#" }
```c# namespace dotless.Core.Parser.Tree { using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Infrastructure; using Infrastructure.Nodes; using Utils; using Exceptions; public class Url : Node { public Node Value { get; set; } ...
```c# namespace dotless.Core.Parser.Tree { using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Infrastructure; using Infrastructure.Nodes; using Utils; using Exceptions; public class Url : Node { public Node Value { get; set; } ...
e09ce49c-6b86-4c8e-8ee1-1feafaf24499
{ "language": "C#" }
```c# using System; using Glimpse.Agent.AspNet.Messages; using Glimpse.Agent.Inspectors; using Microsoft.AspNet.Http; namespace Glimpse.Agent.AspNet.Internal.Inspectors.AspNet { public class EnvironmentInspector : Inspector { private readonly IAgentBroker _broker; private EnvironmentMessage _m...
```c# using System; using Glimpse.Agent.AspNet.Messages; using Glimpse.Agent.Inspectors; using Microsoft.AspNet.Http; namespace Glimpse.Agent.AspNet.Internal.Inspectors.AspNet { public class EnvironmentInspector : Inspector { private readonly IAgentBroker _broker; private EnvironmentMessage _m...
e6e61cf7-64e9-4514-b1c8-482feb4e2888
{ "language": "C#" }
```c# using Navigation.Sample.Models; using System; using System.Web.Mvc; namespace Navigation.Sample.Controllers { public class PersonController : Controller { public ActionResult Index(PersonSearchModel model, string sortExpression, int startRowIndex, int maximumRows) { DateTime outDate; if (...
```c# using Navigation.Sample.Models; using System; using System.Web.Mvc; namespace Navigation.Sample.Controllers { public class PersonController : Controller { public ActionResult Index(PersonSearchModel model) { DateTime outDate; if (model.MinDateOfBirth == null || DateTime.TryParse(model.Min...
81a2b82d-fe66-45a2-8a1a-37ba9b52ed59
{ "language": "C#" }
```c# using System.Collections.Generic; namespace RestSharp.Portable.Test.HttpBin { public class HttpBinResponse { public Dictionary<string, string> Args { get; set; } public Dictionary<string, string> Form { get; set; } public Dictionary<string, string> Headers { get; set; } ...
```c# using System.Collections.Generic; namespace RestSharp.Portable.Test.HttpBin { public class HttpBinResponse { public Dictionary<string, string> Args { get; set; } public Dictionary<string, string> Form { get; set; } public Dictionary<string, string> Headers { get; set; } ...
a6c5bd0d-20ea-46ca-afd4-f03b4491f715
{ "language": "C#" }
```c# using System; using System.Globalization; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; namespace SparkPost.RequestSenders { public class AsyncRequestSender : IRequestSender { private readonly IClient client; public AsyncRequestSender(IClient client...
```c# using System; using System.Globalization; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; namespace SparkPost.RequestSenders { public class AsyncRequestSender : IRequestSender { private readonly IClient client; public AsyncRequestSender(IClient client...
06539b3a-ceea-40d5-ad6a-78a5fa3d4fe6
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using ISTS.Domain.Rooms; using ISTS.Domain.Schedules; namespace ISTS.Infrastructure.Repository { public class RoomRepository : IRoomRepository { public Room Get(Guid id) { return null; } publi...
```c# using System; using System.Collections.Generic; using System.Linq; using ISTS.Domain.Rooms; using ISTS.Domain.Schedules; using ISTS.Infrastructure.Model; namespace ISTS.Infrastructure.Repository { public class RoomRepository : IRoomRepository { private readonly IstsContext _context; pub...
c40f0a9e-3158-4225-85f1-f60001690196
{ "language": "C#" }
```c# <div class="grid-row"> <div class="column-half"> <h1 class="heading-large">Sign in</h1> <form method="post"> @Html.AntiForgeryToken() <div class="form-group"> <label class="form-label" for="email-address">Email address</label> <in...
```c# @model bool @{ var invalidAttributes = Model ? "aria-invalid=\"true\" aria-labeledby=\"invalidMessage\"" : ""; } <div class="grid-row"> <div class="column-half"> <h1 class="heading-large">Sign in</h1> @if (Model) { <div class="error" style="margin-bottom: 10...
3c4cd486-1426-431f-b751-b52cb5ec8b62
{ "language": "C#" }
```c# namespace CppSharp.AST { public enum MacroLocation { Unknown, ClassHead, ClassBody, FunctionHead, FunctionParameters, FunctionBody, }; /// <summary> /// Base class that describes a preprocessed entity, which may /// be a preprocessor direct...
```c# namespace CppSharp.AST { public enum MacroLocation { Unknown, ClassHead, ClassBody, FunctionHead, FunctionParameters, FunctionBody, }; /// <summary> /// Base class that describes a preprocessed entity, which may /// be a preprocessor direct...
46cd4d4e-45af-447c-acac-f9a0e17ac5ed
{ "language": "C#" }
```c# using Microsoft.VisualStudio.TestTools.UnitTesting; using System.IO; namespace LiteDB.Tests { [TestClass] public class FileStorage_Test { [TestMethod] public void FileStorage_InsertDelete() { // create a dump file File.WriteAllText("Core.dll", "FileCor...
```c# using Microsoft.VisualStudio.TestTools.UnitTesting; using System.IO; using System.Linq; using System.Text; namespace LiteDB.Tests { [TestClass] public class FileStorage_Test { [TestMethod] public void FileStorage_InsertDelete() { // create a dump file ...
5f1aa981-7968-4375-bf68-ee3a8d16ef7c
{ "language": "C#" }
```c# using Newtonsoft.Json; namespace OfficeDevPnP.Core.Pages { public class ClientSideSectionEmphasis { [JsonIgnore] public int ZoneEmphasis { get { if (!string.IsNullOrWhiteSpace(ZoneEmphasisString) && int.TryParse(ZoneEmphasisString, out int ...
```c# using Newtonsoft.Json; namespace OfficeDevPnP.Core.Pages { public class ClientSideSectionEmphasis { [JsonProperty(PropertyName = "zoneEmphasis", NullValueHandling = NullValueHandling.Ignore)] public int ZoneEmphasis { get { if (!string.IsNu...
11697242-4a67-40dc-9d7c-524dbd00af29
{ "language": "C#" }
```c# using System.Collections; using UnityEngine; using UnityEngine.Networking; public abstract class GameMessageBase : MessageBase { public GameObject NetworkObject; public GameObject[] NetworkObjects; protected IEnumerator WaitFor(NetworkInstanceId id) { int tries = 0; while ((NetworkObject = ClientScene....
```c# using System.Collections; using UnityEngine; using UnityEngine.Networking; public abstract class GameMessageBase : MessageBase { public GameObject NetworkObject; public GameObject[] NetworkObjects; protected IEnumerator WaitFor(NetworkInstanceId id) { int tries = 0; while ((NetworkObject = ClientScene....
de519c64-325f-43d7-b30e-13ae247cea28
{ "language": "C#" }
```c# using System; using Microsoft.AspNetCore.Builder; using Criteo.Profiling.Tracing; using Criteo.Profiling.Tracing.Utils; namespace Criteo.Profiling.Tracing.Middleware { public static class TracingMiddleware { public static void UseTracing(this IApplicationBuilder app, string serviceName) {...
```c# using System; using Microsoft.AspNetCore.Builder; using Criteo.Profiling.Tracing; using Criteo.Profiling.Tracing.Utils; namespace Criteo.Profiling.Tracing.Middleware { public static class TracingMiddleware { public static void UseTracing(this IApplicationBuilder app, string serviceName) {...
445af786-c2d1-4d3c-a226-99c7e03f1fb3
{ "language": "C#" }
```c# namespace TensorSharp.Operations { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class DivideDoubleDoubleOperation : IBinaryOperation<double, double, double> { public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<do...
```c# namespace TensorSharp.Operations { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class DivideDoubleDoubleOperation : IBinaryOperation<double, double, double> { public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<do...
fc62cff6-8646-4ce9-9645-cc14b8efecc9
{ "language": "C#" }
```c# namespace Akka.Interfaced { public static class InterfacedActorRefExtensions { // Cast (not type-safe) public static TRef Cast<TRef>(this InterfacedActorRef actorRef) where TRef : InterfacedActorRef, new() { if (actorRef == null) return nul...
```c# namespace Akka.Interfaced { public static class InterfacedActorRefExtensions { // Cast (not type-safe) public static TRef Cast<TRef>(this InterfacedActorRef actorRef) where TRef : InterfacedActorRef, new() { if (actorRef == null) return nul...
2b3ab885-a46d-461f-ad03-7c6de697a25d
{ "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 System.Net.Http.Headers; using System.Text; namespace System.Net.Http { public class BasicAuthenticationHeaderValue : Authent...
```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 System.Net.Http.Headers; using System.Text; namespace System.Net.Http { public class BasicAuthenticationHeaderValue : Authent...
e546a99a-5b5c-42b6-9fc3-7cc558c04160
{ "language": "C#" }
```c# using System.Linq; using System.Threading; using System.Threading.Tasks; using BatteryCommander.Web.Models; using MediatR; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; namespace BatteryCommander.Web.Queries { public class GetCurrentUser : IRequest<Soldier> { private clas...
```c# using System.Linq; using System.Threading; using System.Threading.Tasks; using BatteryCommander.Web.Models; using MediatR; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; namespace BatteryCommander.Web.Queries { public class GetCurrentUser : IRequest<Soldier> { private clas...
cb014a47-0c2a-4cd8-8da8-1f7e2080685d
{ "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. namespace Cake.Common.Tools.NuGet { /// <summary> /// NuGet MSBuild version /// </summary> pu...
```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. namespace Cake.Common.Tools.NuGet { /// <summary> /// NuGet MSBuild version /// </summary> pu...
e1ff7d9b-e55a-4c49-827d-56a6ead1239d
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Updater { class Program { static void Main(string[] args) { if (args.Length == 0) { ...
```c# using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Updater { class Program { static void Main(string[] args) { if (args.Length == 0) { ...
a73be33b-4f3c-4484-bcd1-8c35097ad210
{ "language": "C#" }
```c# using System.Runtime.Serialization; using Elasticsearch.Net.Utf8Json; namespace Nest { [DataContract] public class CatSnapshotsRecord : ICatRecord { [DataMember(Name ="duration")] public Time Duration { get; set; } [DataMember(Name ="end_epoch")] [JsonFormatter(typeof(StringLongFormatter))] public...
```c# using System.Runtime.Serialization; using Elasticsearch.Net.Utf8Json; namespace Nest { [DataContract] public class CatSnapshotsRecord : ICatRecord { [DataMember(Name ="duration")] public Time Duration { get; set; } [DataMember(Name ="end_epoch")] [JsonFormatter(typeof(StringLongFormatter))] public...
cb291f46-ac89-4094-b0d9-4d33d50446e6
{ "language": "C#" }
```c# namespace JetBrains.ReSharper.Koans.Editing { // Smart Completion // // Narrows candidates to those that best suit the current context // // Ctrl+Alt+Space (VS) // Ctrl+Shift+Space (IntelliJ) public class SmartCompletion { // 1. Start typing: string s = // Aut...
```c# namespace JetBrains.ReSharper.Koans.Editing { // Smart Completion // // Narrows candidates to those that best suit the current context // // Ctrl+Alt+Space (VS) // Ctrl+Shift+Space (IntelliJ) public class SmartCompletion { // 1. Start typing: string s = // Aut...
7a305e8e-c7b5-497a-8137-c2f60108747b
{ "language": "C#" }
```c# using System; using System.Data; using System.Linq; using Cobweb.Data; using Cobweb.Data.NHibernate; using NHibernate; namespace Data.NHibernate.Tests { /// <summary> /// These tests are not executed by NUnit. They are here for compile-time checking. 'If it builds, ship it.' /// </summary> p...
```c# using System; using System.Data; using System.Linq; using NHibernate; namespace Cobweb.Data.NHibernate.Tests { /// <summary> /// These tests are not executed by NUnit. They are here for compile-time checking. 'If it builds, ship it.' /// </summary> public class CompileTests { interna...
0ee231a4-acc1-484b-aff7-037686713b62
{ "language": "C#" }
```c# using System; public struct Foo : ICloneable { public int CloneCounter { get; private set; } public object Clone() { CloneCounter++; return this; } } public static class Program { public static ICloneable BoxAndCast<T>(T Value) { return (ICloneable)Value; } ...
```c# using System; public struct Foo : ICloneable { public int CloneCounter { get; private set; } public object Clone() { CloneCounter++; return this; } } public static class Program { public static ICloneable BoxAndCast<T>(T Value) { return (ICloneable)Value; } ...
c744abcf-2c78-4c93-8841-9bce98fe680e
{ "language": "C#" }
```c# using System.Data; using System.Data.SQLite; using System.Reflection; using FakeItEasy; using FakeItEasy.Core; using SimpleMigrations; using SimpleMigrations.VersionProvider; using Smoother.IoC.Dapper.Repository.UnitOfWork.Data; using Smoother.IoC.Dapper.Repository.UnitOfWork.UoW; namespace Smoother.IoC.Dapper....
```c# using System.Data; using System.Data.SQLite; using System.Reflection; using FakeItEasy; using FakeItEasy.Core; using SimpleMigrations; using SimpleMigrations.VersionProvider; using Smoother.IoC.Dapper.Repository.UnitOfWork.Data; using Smoother.IoC.Dapper.Repository.UnitOfWork.UoW; namespace Smoother.IoC.Dapper....
c7e25cf1-fe58-4247-b70f-10d092750377
{ "language": "C#" }
```c# using System; class Program { static void Main() { Console.WriteLine("Hello, C#!"); } } ``` Repair error in Console Writeline
```c# using System; class Program { static void Main() { Console.WriteLine(DateTime.Now); } } ```
f598980c-0895-47db-ac97-bf630b9d5f56
{ "language": "C#" }
```c# using System; using System.ComponentModel; using GitHub.Models; namespace GitHub.Services { /// <summary> /// Responsible for watching the active repository in Team Explorer. /// </summary> /// <remarks> /// A <see cref="PropertyChanged"/> event is fired when moving to a new repository. ...
```c# using System; using System.ComponentModel; using GitHub.Models; namespace GitHub.Services { /// <summary> /// Responsible for watching the active repository in Team Explorer. /// </summary> /// <remarks> /// A <see cref="PropertyChanged"/> event is fired when moving to a new repository. ...