doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
20ea7b28-68d3-4f41-a057-1cd90d937952 | {
"language": "C#"
} | ```c#
#load "LogHelper.csx"
#load "FunctionNameHelper.csx"
using System.Configuration;
public static class AppSettingsHelper
{
public static string GetAppSetting(string SettingName, bool LogValue = true )
{
string SettingValue = "";
string methodName = this.GetType().FullName;
try
... | ```c#
#load "LogHelper.csx"
#load "FunctionNameHelper.csx"
using System.Configuration;
public static class AppSettingsHelper
{
public static string GetAppSetting(string SettingName, bool LogValue = true )
{
string SettingValue = "";
string methodName = this.GetType().FullName;
try
... |
85cec91c-f18b-41ba-b62e-5bedab21a828 | {
"language": "C#"
} | ```c#
namespace PKHeX.WinForms
{
partial class Main
{
public System.Windows.Forms.ToolStripMenuItem EnableAutoLegality(System.ComponentModel.ComponentResourceManager resources)
{
this.Menu_ShowdownImportPKMModded = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_S... | ```c#
namespace PKHeX.WinForms
{
partial class Main
{
public System.Windows.Forms.ToolStripMenuItem EnableAutoLegality(System.ComponentModel.ComponentResourceManager resources)
{
this.Menu_ShowdownImportPKMModded = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_S... |
f1a948e3-2312-4135-9602-77206a169349 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
using NuGet.Test.Helpers;
using Sleet.Test.Common;
namespace Sleet.AmazonS3.Tests
{
public class AmazonS3FileSystemTests
{
[EnvVarExistsFact(AmazonS3Tes... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
using NuGet.Test.Helpers;
using Sleet.Test.Common;
namespace Sleet.AmazonS3.Tests
{
public class AmazonS3FileSystemTests
{
[EnvVarExistsFact(AmazonS3Tes... |
3ab987f3-79f1-4c0d-9342-fb2af0fe2957 | {
"language": "C#"
} | ```c#
using NGM.Forum.Models;
namespace NGM.Forum.ViewModels {
public class PostBodyEditorViewModel {
public PostPart PostPart { get; set; }
public string Text {
get { return PostPart.Record.Text; }
set { PostPart.Record.Text = value; }
}
public... | ```c#
using NGM.Forum.Models;
namespace NGM.Forum.ViewModels {
public class PostBodyEditorViewModel {
public PostPart PostPart { get; set; }
public string Text {
get { return PostPart.Record.Text; }
set { PostPart.Record.Text = string.IsNullOrWhiteSpace(value) ? va... |
197de137-750a-46d1-a8a4-3cd604719c56 | {
"language": "C#"
} | ```c#
using System;
using System.Web;
namespace Umbraco.Web
{
internal class AspNetHttpContextAccessor : IHttpContextAccessor
{
public HttpContextBase HttpContext
{
get
{
return new HttpContextWrapper(System.Web.HttpContext.Current);
}
... | ```c#
using System;
using System.Web;
namespace Umbraco.Web
{
internal class AspNetHttpContextAccessor : IHttpContextAccessor
{
public HttpContextBase HttpContext
{
get
{
var httpContext = System.Web.HttpContext.Current;
return httpContex... |
96449b09-8e8c-47a5-a3a2-b9a2a389f13f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;
namespace ADWS.Models
{
[DataContract]
public class UserInfoResponse
{
[DataMember]
public string Title { set; get; }
[DataMember]
public string D... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;
namespace ADWS.Models
{
[DataContract]
public class UserInfoResponse
{
[DataMember]
public string Title { set; get; }
[DataMember]
public string D... |
f70b744a-3d03-4117-9a61-77d3303f54af | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using MediatR;
using NLog;
using SFA.DAS.EmployerUsers.Application.Commands.DeleteUser;
using SFA.DAS.EmployerUsers.Application.Queries.GetUsersWithExpiredRegistrations;
namespace SFA.DAS.EmployerUsers.RegistrationTidyUpJob.RegistrationManagement
{
public... | ```c#
using System;
using System.Threading.Tasks;
using MediatR;
using Microsoft.Azure;
using NLog;
using SFA.DAS.EmployerUsers.Application.Commands.DeleteUser;
using SFA.DAS.EmployerUsers.Application.Queries.GetUsersWithExpiredRegistrations;
namespace SFA.DAS.EmployerUsers.RegistrationTidyUpJob.RegistrationM... |
82fbb0be-4aab-4555-85a1-ec88f1e18bea | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using hutel.Filters;
using hutel.Middleware;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using N... | ```c#
using System;
using System.IO;
using hutel.Filters;
using hutel.Middleware;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using N... |
af59dfbe-c2a7-422c-abd0-33bb91c6ba4c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RailPhase.Demo
{
class Program
{
static void Main(string[] args)
{
// Create a simple web app and serve content on to URLs.
var app = new ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RailPhase.Demo
{
class Program
{
static void Main(string[] args)
{
// Create a simple web app and serve content on to URLs.
var app = new ... |
e26d562b-5b82-4b44-8f27-f1275117e161 | {
"language": "C#"
} | ```c#
using System;
namespace Casper {
public class CasperException : Exception {
public const int EXIT_CODE_COMPILATION_ERROR = 1;
public const int EXIT_CODE_MISSING_TASK = 2;
public const int EXIT_CODE_CONFIGURATION_ERROR = 3;
public const int EXIT_CODE_TASK_FAILED = 4;
public const int EXIT_CODE_UNHAND... | ```c#
using System;
namespace Casper {
public class CasperException : Exception {
public const int EXIT_CODE_COMPILATION_ERROR = 1;
public const int EXIT_CODE_MISSING_TASK = 2;
public const int EXIT_CODE_CONFIGURATION_ERROR = 3;
public const int EXIT_CODE_TASK_FAILED = 4;
public const int EXIT_CODE_UNHAND... |
063804b2-12f4-41c2-880a-8e98f211cef7 | {
"language": "C#"
} | ```c#
using Raven.Abstractions.Data;
using System;
namespace Dotnet.Microservice.Health.Checks
{
public class RavenDbHealthCheck
{
public static HealthResponse CheckHealth(string connectionString)
{
try
{
ConnectionStringParser<RavenConnectionStringOptio... | ```c#
using Raven.Abstractions.Data;
using System;
namespace Dotnet.Microservice.Health.Checks
{
public class RavenDbHealthCheck
{
public static HealthResponse CheckHealth(string connectionString)
{
try
{
ConnectionStringParser<RavenConnectionStringOptio... |
20d4ed27-075b-41e7-8442-0451a2624ec1 | {
"language": "C#"
} | ```c#
using System;
namespace GraphQL.Types
{
public interface IInputObjectGraphType : IComplexGraphType
{
}
public class InputObjectGraphType : InputObjectGraphType<object>
{
}
public class InputObjectGraphType<TSourceType> : ComplexGraphType<TSourceType>, IInputObjectGraphType
{
... | ```c#
using System;
namespace GraphQL.Types
{
public interface IInputObjectGraphType : IComplexGraphType
{
}
public class InputObjectGraphType : InputObjectGraphType<object>
{
}
public class InputObjectGraphType<TSourceType> : ComplexGraphType<TSourceType>, IInputObjectGraphType
{
... |
f63b09df-acab-4e2a-b84f-aaf2c672cabc | {
"language": "C#"
} | ```c#
using FluentEmail.Core;
using FluentScheduler;
using System;
namespace BatteryCommander.Web.Jobs
{
public class SqliteBackupJob : IJob
{
private const String Recipient = "mattgwagner+backup@gmail.com"; // TODO Make this configurable
private readonly IFluentEmail emailSvc;
publi... | ```c#
using FluentEmail.Core;
using FluentScheduler;
using System;
namespace BatteryCommander.Web.Jobs
{
public class SqliteBackupJob : IJob
{
private const String Recipient = "Backups@RedLeg.app";
private readonly IFluentEmail emailSvc;
public SqliteBackupJob(IFluentEmail emailSvc)
... |
97161acf-27b5-4f99-8e91-136f2dea827b | {
"language": "C#"
} | ```c#
using System;
using LinqToTTreeInterfacesLib;
using LINQToTTreeLib.Utils;
namespace LINQToTTreeLib.Variables
{
/// <summary>
/// A simple variable (like int, etc.).
/// </summary>
public class VarSimple : IVariable
{
public string VariableName { get; private set; }
... | ```c#
using System;
using LinqToTTreeInterfacesLib;
using LINQToTTreeLib.Utils;
namespace LINQToTTreeLib.Variables
{
/// <summary>
/// A simple variable (like int, etc.).
/// </summary>
public class VarSimple : IVariable
{
public string VariableName { get; private set; }
... |
74c44d96-cd9d-4151-a5dd-08787ca4d9e8 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(MicrogameCollection))]
public class MicrogameCollectionEditor : Editor
{
public override void OnInspectorGUI()
{
MicrogameCollection collection = (MicrogameCollection)target;
if (GUILayou... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(MicrogameCollection))]
public class MicrogameCollectionEditor : Editor
{
public override void OnInspectorGUI()
{
MicrogameCollection collection = (MicrogameCollection)target;
if (GUILayou... |
1a279c65-0882-4754-8224-cb565c780476 | {
"language": "C#"
} | ```c#
using System;
namespace DynamixelServo.Quadruped
{
static class MathExtensions
{
public static double RadToDegree(this double angle)
{
return angle * (180.0 / Math.PI);
}
public static float RadToDegree(this float angle)
{
return angle * (... | ```c#
using System;
namespace DynamixelServo.Quadruped
{
static class MathExtensions
{
public static double RadToDegree(this double angle)
{
return angle * (180.0 / Math.PI);
}
public static float RadToDegree(this float angle)
{
return angle * (... |
a02eb3ac-d808-4ce0-ba99-6a11c1522034 | {
"language": "C#"
} | ```c#
using System;
using Eto.Forms;
using JabbR.Eto.Interface.Dialogs;
using JabbR.Eto.Model.JabbR;
using System.Diagnostics;
namespace JabbR.Eto.Actions
{
public class AddServer : ButtonAction
{
public const string ActionID = "AddServer";
public bool AutoConnect { get; set; }
public AddServer ()
{
... | ```c#
using System;
using Eto.Forms;
using JabbR.Eto.Interface.Dialogs;
using JabbR.Eto.Model.JabbR;
using System.Diagnostics;
namespace JabbR.Eto.Actions
{
public class AddServer : ButtonAction
{
public const string ActionID = "AddServer";
public bool AutoConnect { get; set; }
public AddServer ()
{
... |
03475418-0aeb-4c19-b53b-76ce8a46e2b8 | {
"language": "C#"
} | ```c#
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "_Layout.cshtml";
}
@{ Html.RenderPartial("PageHeading"); }
<div class="row">
<div class="small-12 large-12 columns">
@{
var members = Umbraco.TypedContentAtXPath("//OrganizationMember")
.Where(m => m.GetPrope... | ```c#
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "_Layout.cshtml";
}
@{ Html.RenderPartial("PageHeading"); }
<div class="row">
<div class="small-12 large-12 columns">
@{
var members = Umbraco.TypedContentAtXPath("//OrganizationMember")
.Where(m => m.GetPrope... |
d5a97343-f12f-4608-9322-8847e5e5bb77 | {
"language": "C#"
} | ```c#
using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Eto.Platform.iOS.Forms;
using Eto.Forms;
namespace Eto.Platform.iOS
{
[MonoTouch.Foundation.Register("EtoAppDelegate")]
public class EtoAppDelegate : UIApplicationDelegate
{
public EtoAppDelegate ()
{
}
public override bool WillFi... | ```c#
using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Eto.Platform.iOS.Forms;
using Eto.Forms;
namespace Eto.Platform.iOS
{
[MonoTouch.Foundation.Register("EtoAppDelegate")]
public class EtoAppDelegate : UIApplicationDelegate
{
public EtoAppDelegate ()
{
}
public override bool Finish... |
aec00b76-560f-4f2f-abad-d4ccf2c85043 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace SurveyMonkey.Containers
{
[JsonConverter(typeof(TolerantJsonConverter))]
public class QuestionDisplayOptionsCustomOptions
{
}
}```
Add custom display option props based on sliders | ```c#
using Newtonsoft.Json;
using System.Collections.Generic;
namespace SurveyMonkey.Containers
{
[JsonConverter(typeof(TolerantJsonConverter))]
public class QuestionDisplayOptionsCustomOptions
{
public List<string> OptionSet { get; set; }
public int StartingPosition { get; set; }
... |
865a8c4e-b6cc-465f-bc89-8fe292ccf622 | {
"language": "C#"
} | ```c#
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
namespace Presentation.Web
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http... | ```c#
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Presentation.Web
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=939480... |
8fba020a-fe39-4407-b81b-d58a02c583d6 | {
"language": "C#"
} | ```c#
namespace BmpListener.Bgp
{
public class ASPathSegment
{
public ASPathSegment(Type type, int[] asns)
{
SegmentType = Type;
ASNs = asns;
}
public enum Type
{
AS_SET = 1,
AS_SEQUENCE,
AS_CONFED_SEQUENCE,
... | ```c#
using System.Collections.Generic;
namespace BmpListener.Bgp
{
public class ASPathSegment
{
public ASPathSegment(Type type, IList<int> asns)
{
SegmentType = type;
ASNs = asns;
}
public enum Type
{
AS_SET = 1,
AS_SEQU... |
3d97d2c5-ec66-4be2-89aa-aba6ef19f67e | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTit... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTit... |
51fc1a92-965d-4208-831b-a9610583dd47 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEditor;
namespace Microsoft.MixedReality.Toolkit.Input.Editor
{
[CustomEditor(typeof(MixedRealityControllerVisualizer))]
public class Mixed... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEditor;
namespace Microsoft.MixedReality.Toolkit.Input.Editor
{
[CustomEditor(typeof(MixedRealityControllerVisualizer), true)]
public class... |
211ae9e3-9aef-4c19-aa38-20cb6d661629 | {
"language": "C#"
} | ```c#
using System.Diagnostics.CodeAnalysis;
using System.Web.Optimization;
namespace T4MVCHostMvcApp.App_Start
{
public static class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
[SuppressMessage("Microsoft.Design", "CA1062:Validate ar... | ```c#
using System.Diagnostics.CodeAnalysis;
using System.Web.Optimization;
namespace T4MVCHostMvcApp.App_Start
{
public static class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
[SuppressMessage("Microsoft.Design", "CA1062:Validate ar... |
b12d67c7-4542-4226-9933-e26dc56882fe | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace slang.Lexing.Trees.Nodes
{
public class Transitions : Dictionary<char,Node>
{
}
}
```
Use character class as transition key | ```c#
using System.Collections.Generic;
namespace slang.Lexing.Trees.Nodes
{
public class Transitions : Dictionary<Character,Transition>
{
}
}
``` |
39f74100-eadd-4fe2-9948-81b7261985be | {
"language": "C#"
} | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using SmugMug.v2.Authentication;
using System.Threading.Tasks;
namespace SmugMug.v2.Types
{
public class SiteEntity : SmugMugEntity
{
public... | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using SmugMug.v2.Authentication;
using System.Threading.Tasks;
namespace SmugMug.v2.Types
{
public class SiteEntity : SmugMugEntity
{
public... |
e0d8730f-66e2-4fa1-8075-0ce28069559c | {
"language": "C#"
} | ```c#
using System.ComponentModel.Composition;
using Microsoft.EntityFrameworkCore;
using Waf.BookLibrary.Library.Applications.Data;
using Waf.BookLibrary.Library.Applications.Services;
using Waf.BookLibrary.Library.Domain;
namespace Test.BookLibrary.Library.Applications.Services
{
[Export, Export(typeof(IDBConte... | ```c#
using System.ComponentModel.Composition;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using Waf.BookLibrary.Library.Applications.Data;
using Waf.BookLibrary.Library.Applications.Services;
using Waf.BookLibrary.Library.Domain;
namespace Test.BookLibrary.Library.Applications.S... |
b4a6f2a3-d019-46fe-8b4f-7e861b89aee4 | {
"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.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
{
public class SettingsEnumDropdown<T>... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
{
public class SettingsEnumDropdown<T>... |
52359040-cb0d-45f1-b9b9-7b5046e8929d | {
"language": "C#"
} | ```c#
// Copyright (c) 2015 Bartlomiej Wolk (bartlomiejwolk@gmail.com)
//
// This file is part of the HealthBar extension for Unity. Licensed under the
// MIT license. See LICENSE file in the project root folder. Based on HealthBar
// component made by Zero3Growlithe (zero3growlithe@gmail.com).
using UnityEngine;
na... | ```c#
// Copyright (c) 2015 Bartlomiej Wolk (bartlomiejwolk@gmail.com)
//
// This file is part of the HealthBar extension for Unity. Licensed under the
// MIT license. See LICENSE file in the project root folder. Based on HealthBar
// component made by Zero3Growlithe (zero3growlithe@gmail.com).
using UnityEngine;
na... |
f69421c3-a712-4197-b712-5633f724f6a3 | {
"language": "C#"
} | ```c#
using System;
using FluentAssertions;
using Xunit;
namespace Grobid.PdfToXml.Test
{
public class TokenBlockFactoryTest
{
[Fact]
public void TestA()
{
var stub = new TextRenderInfoStub();
var testSubject = new TokenBlockFactory(100, 100);
... | ```c#
using System;
using FluentAssertions;
using iTextSharp.text.pdf.parser;
using Xunit;
namespace Grobid.PdfToXml.Test
{
public class TokenBlockFactoryTest
{
[Fact]
public void FactoryShouldNormalizeUnicodeStrings()
{
var stub = new TextRenderInfoStub
... |
57df967c-351f-4256-91ee-fbabefbd623e | {
"language": "C#"
} | ```c#
// Copyright(c) 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | ```c#
// Copyright(c) 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
1515e8e4-940f-451e-9e6e-ec3ea12aba41 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.Screens... |
b3af441d-612b-40e6-803b-4ca28c65bc20 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using commercetools.Common;
using commercetools.CustomFields;
using Newtonsoft.Json;
namespace commercetools.Carts
{
/// <summary>
/// API representation for creating a new CustomLineItem.
/// </summary>
/// <see href="http://dev.commercetools.com/http-api-pro... | ```c#
using System.Collections.Generic;
using commercetools.Common;
using commercetools.CustomFields;
using Newtonsoft.Json;
namespace commercetools.Carts
{
/// <summary>
/// API representation for creating a new CustomLineItem.
/// </summary>
/// <see href="http://dev.commercetools.com/http-api-pro... |
73a2c7a8-8e9d-4179-bfb5-bac09c6fb967 | {
"language": "C#"
} | ```c#
namespace Cronofy
{
using System;
/// <summary>
/// Interface for a Cronofy client base that manages the
/// access token and any shared client methods.
/// </summary>
public interface ICronofyUserInfoClient
{
/// <summary>
/// Gets the user info belonging to the acco... | ```c#
namespace Cronofy
{
using System;
/// <summary>
/// Interface for a Cronofy client base that manages the
/// access token and any shared client methods.
/// </summary>
public interface ICronofyUserInfoClient
{
/// <summary>
/// Gets the user info belonging to the acco... |
ff9f75e7-44c7-42a6-8a79-30cd4f9338ee | {
"language": "C#"
} | ```c#
namespace MyParcelApi.Net.Models
{
public enum Carrier
{
PostNl = 1,
BPost = 2
}
}
```
Improve when there is no carrier | ```c#
namespace MyParcelApi.Net.Models
{
public enum Carrier
{
None = 0,
PostNl = 1,
BPost = 2
}
}
``` |
1970f4a9-d5f4-4381-a73d-8453b1944352 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class ShotControl : MonoBehaviour {
public float speed = 0.2f;
private bool inBlock;
private int life = 3;
void Start () {
}
void Update () {
// Old position
Vector3 position = transform.position;
// Move
transform.Translate(Vector3.up * s... | ```c#
using UnityEngine;
using System.Collections;
public class ShotControl : MonoBehaviour {
public float speed = 0.2f;
private bool inBlock;
private int life = 3;
void Start () {
}
void Update () {
// Old position
Vector3 position = transform.position;
// Move
transform.Translate(Vector3.up * s... |
ad936b6c-b859-4b80-bfa8-3cc8bd7c43b0 | {
"language": "C#"
} | ```c#
using WootzJs.Mvc.Views;
using WootzJs.Mvc.Views.Css;
namespace WootzJs.Mvc
{
public static class StyleExtensions
{
public static T WithBold<T>(this T control) where T : Control
{
control.Style.Font.Weight = new CssFontWeight(CssFontWeightType.Bold);
return contro... | ```c#
using WootzJs.Mvc.Views;
using WootzJs.Mvc.Views.Css;
namespace WootzJs.Mvc
{
public static class StyleExtensions
{
public static T WithBold<T>(this T control) where T : Control
{
control.Style.Font.Weight = new CssFontWeight(CssFontWeightType.Bold);
return contro... |
dace51cf-26d3-4bb9-8abe-70591f852c4f | {
"language": "C#"
} | ```c#
using System.Net;
using System.Web.Script.Serialization;
namespace MultiMiner.MobileMiner.Api
{
public class ApiContext
{
static public void SubmitMiningStatistics(string url, MiningStatistics miningStatistics)
{
string fullUrl = url + "/api/MiningStatisticsInput";
... | ```c#
using System.Net;
using System.Web.Script.Serialization;
namespace MultiMiner.MobileMiner.Api
{
public class ApiContext
{
static public void SubmitMiningStatistics(string url, MiningStatistics miningStatistics)
{
if (!url.EndsWith("/"))
url = url + "/";
... |
18135345-dc1a-4158-b527-7acc420a9707 | {
"language": "C#"
} | ```c#
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease
Environment.SetVariableNames();
BuildParameters.SetParameters(context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title... | ```c#
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease
Environment.SetVariableNames();
BuildParameters.SetParameters(context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title: "Cake.Hg",
repositoryOwner: "cake-contrib",
repositoryName: "C... |
09b955db-d2a6-4b81-b512-260387aa717d | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTit... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTit... |
4f8b9611-fc4d-4b1a-a9ba-c2394c920571 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Extras.DomainServices")]
[assembly: AssemblyDescription("Autofac Integration for RIA Services")]
[assembly: ComVisible(false)]```
Build script now writes the package name and version into the AssemblyDescriptio... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Extras.DomainServices")]
[assembly: ComVisible(false)]``` |
03a07414-9781-4c76-afbd-cd569294ea70 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Audio.Track;
using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Beatmaps
{
public partial class WorkingBeatmap
... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Audio.Track;
using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Beatmaps
{
public partial class WorkingBeatmap
... |
dc98437d-35dd-43f1-b163-1becf6332cc9 | {
"language": "C#"
} | ```c#
// Copyright Matthias Koch 2017.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Core.Utilities;
namespace Nuke.C... | ```c#
// Copyright Matthias Koch 2017.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Core.Utilities;
namespace Nuke.C... |
2ec7d416-1d72-4e60-a3b0-4565c4bdfcd4 | {
"language": "C#"
} | ```c#
using System;
using System.Drawing.Imaging;
using System.IO;
using Tellurium.MvcPages.Utils;
namespace Tellurium.MvcPages.BrowserCamera.Storage
{
public class FileSystemScreenshotStorage : IScreenshotStorage
{
private readonly string screenshotDirectoryPath;
public FileSystemScreenshotS... | ```c#
using System;
using System.Drawing.Imaging;
using System.IO;
using Tellurium.MvcPages.Utils;
namespace Tellurium.MvcPages.BrowserCamera.Storage
{
public class FileSystemScreenshotStorage : IScreenshotStorage
{
private readonly string screenshotDirectoryPath;
public FileSystemScreenshotS... |
de2e58d3-87dd-4436-8567-45ad6c5e861b | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Mvc.Internal
{
public static class TaskCache
{
#if NET451
static rea... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Mvc.Internal
{
public static class TaskCache
{
/// <summary>
... |
7c56de85-cd65-4664-8a80-36f50b60a8af | {
"language": "C#"
} | ```c#
// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET.
// Licensed under the Apache License, Version 2.0.
using ImageMagick;
using Xunit;
using Xunit.Sdk;
namespace Magick.NET.Tests
{
public partial class ResourceLimitsTests
{
[Collection(nameof(RunTestsSeparately))]
public c... | ```c#
// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET.
// Licensed under the Apache License, Version 2.0.
using ImageMagick;
using Xunit;
using Xunit.Sdk;
namespace Magick.NET.Tests
{
public partial class ResourceLimitsTests
{
[Collection(nameof(RunTestsSeparately))]
public c... |
ef367693-89b8-497c-8d60-56e6ad4bb77c | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace AttachToolbar
{
internal static class State
{
public static string ProcessName = "";
public static List<string> ProcessList = new List<string>();
public static EngineType EngineType = EngineType.Native;
public static bool IsAtta... | ```c#
using System.Collections.Generic;
namespace AttachToolbar
{
internal static class State
{
public static int ProcessIndex = -1;
public static List<string> ProcessList = new List<string>();
public static EngineType EngineType = EngineType.Native;
public static bool IsAttach... |
7c3b49cb-0aa6-46ac-8dc0-f6848abd95ce | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bloom.Utils
{
class MemoryUtils
{
/// <summary>
/// A crude way of measuring when we might be short enough of memory to need a full reload.
/// </summar... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bloom.Utils
{
class MemoryUtils
{
/// <summary>
/// A crude way of measuring when we might be short enough of memory to need a full reload.
/// </summar... |
be68c136-0570-408a-ae4f-b86a48cf44ee | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Amazon.DynamoDBv2.Model;
namespace Narochno.Credstash.Internal
{
public class CredstashItem
{
public const string DEFAULT_DIGEST = "SHA256";
public string Name { get; set; }
public string Version { get; set; }
public string Content... | ```c#
using System.Collections.Generic;
using Amazon.DynamoDBv2.Model;
namespace Narochno.Credstash.Internal
{
public class CredstashItem
{
public const string DEFAULT_DIGEST = "SHA256";
public string Name { get; set; }
public string Version { get; set; }
public string Content... |
25b10466-521c-4ba7-a6ce-ff9d1afb0226 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.IO;
namespace PackageRunner
{
/// <summary>
/// </summary>
internal class FileLogging
{
private readonly string _file;
private static readonly object _lock = new object();
public FileLogging(string file)
{
... | ```c#
using System;
using System.Diagnostics;
using System.IO;
namespace PackageRunner
{
/// <summary>
/// </summary>
internal class FileLogging
{
private readonly string _file;
private static readonly object _lock = new object();
public FileLogging(string file)
{
... |
4907f662-fdf4-4e73-9ec3-0c50f996de5f | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using Topshelf;
namespace Tellurium.VisualAssertion.Dashboard
{
public class Program
{
public static void Main(string[] args)
{
#if DEBUG
using (var server = new WebServer())
{
server.Run(consoleMode:true);
... | ```c#
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using Topshelf;
namespace Tellurium.VisualAssertion.Dashboard
{
public class Program
{
public static void Main(string[] args)
{
#if DEBUG
using (var server = new WebServer())
{
... |
f27306ae-ca89-4c19-a482-0218ea3c96c2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Baskerville.Models.DataModels
{
public class ProductCategory
{
public ProductCategory()
{
this.Products = new HashSet<Product>();
this.Sub... | ```c#
namespace Baskerville.Models.DataModels
{
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public class ProductCategory
{
public ProductCategory()
{
this.Products = new HashSet<Product>();
this.Subcategories = new HashSet<Prod... |
d31b3fd9-bd1b-4a10-a041-1ec62530b9df | {
"language": "C#"
} | ```c#
#if FAT
namespace Theraot.Threading
{
public static partial class ThreadingHelper
{
private static readonly RuntimeUniqueIdProdiver _threadIdProvider = new RuntimeUniqueIdProdiver();
// Leaked until AppDomain unload
private static readonly NoTrackingThreadLocal<RuntimeUniqueIdPro... | ```c#
#if FAT
namespace Theraot.Threading
{
public static partial class ThreadingHelper
{
// Leaked until AppDomain unload
private static readonly NoTrackingThreadLocal<RuntimeUniqueIdProdiver.UniqueId> _threadRuntimeUniqueId = new NoTrackingThreadLocal<RuntimeUniqueIdProdiver.UniqueId>(Runtim... |
03a52000-be8a-4d59-81d8-7bce3488cdab | {
"language": "C#"
} | ```c#
using IdentityServer3.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IdentityServer3.Core.Models;
using IdentityServer3.Contrib.RedisStores.Models;
using StackExchange.Redis;
using IdentityServer3.Contrib.RedisStores.Converters;
namespace Id... | ```c#
using IdentityServer3.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IdentityServer3.Core.Models;
using IdentityServer3.Contrib.RedisStores.Models;
using StackExchange.Redis;
using IdentityServer3.Contrib.RedisStores.Converters;
namespace Id... |
beb2811e-ffcc-47fb-a7fe-ee164bde2291 | {
"language": "C#"
} | ```c#
using AutomaticTypeMapper;
using EOLib.Logger;
using EOLib.Net;
using EOLib.Net.Communication;
using EOLib.Net.Handlers;
using EOLib.Net.PacketProcessing;
namespace EOLib.PacketHandlers
{
/// <summary>
/// Handles incoming CONNECTION_PLAYER packets which are used for updating sequence numbers in the EO ... | ```c#
using AutomaticTypeMapper;
using EOLib.Logger;
using EOLib.Net;
using EOLib.Net.Communication;
using EOLib.Net.Handlers;
using EOLib.Net.PacketProcessing;
namespace EOLib.PacketHandlers
{
/// <summary>
/// Handles incoming CONNECTION_PLAYER packets which are used for updating sequence numbers in the EO ... |
bad4b775-8a64-47ac-9b1f-dba9d9b88b0b | {
"language": "C#"
} | ```c#
using System;
namespace gdRead.Data.Models
{
public class Post
{
public int Id { get; set; }
public int FeedId { get; set; }
public string Name { get; set; }
public string Url { get; set; }
public string Summary { get; set; }
public string Content { get; ... | ```c#
using System;
using DapperExtensions.Mapper;
namespace gdRead.Data.Models
{
public class Post
{
public int Id { get; set; }
public int FeedId { get; set; }
public string Name { get; set; }
public string Url { get; set; }
public string Summary { get; set; }
... |
42835f21-74f8-4459-b0b6-161258b5074d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Gui.ManagedDialogs
{
internal class ManagedFileChooserFilterViewModel : ViewModelBase
{
private readonly string[] Extensions;
public string Name { get; }
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Gui.ManagedDialogs
{
internal class ManagedFileChooserFilterViewModel : ViewModelBase
{
private IEnumerable<string> Extensions { get; }
public string Name { ... |
406ff2f4-7466-4a1c-be48-1db54c3efe12 | {
"language": "C#"
} | ```c#
// Copyright (c) 2015 Eberhard Beilharz
// This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
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... | ```c#
// Copyright (c) 2015 Eberhard Beilharz
// This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
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... |
6905c007-7c0e-4b39-93d5-8d43019fe750 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace DotVVM.Framework.Compilation.Binding
{
public class DefaultExtensionsProvider : IExtensionsProvider
{
private readonly List<Type> typesLookup;
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace DotVVM.Framework.Compilation.Binding
{
public class DefaultExtensionsProvider : IExtensionsProvider
{
private readonly List<Type> typesLookup;
... |
2f6fb05b-f40f-46b5-8cee-3ebbbb80d861 | {
"language": "C#"
} | ```c#
// project created on 11.11.2001 at 15:19
using System;
using System.IO;
using ICSharpCode.SharpZipLib.GZip;
class MainClass
{
public static void Main(string[] args)
{
if (args[0] == "-d") { // decompress
Stream s = new GZipInputStream(File.OpenRead(args[1]));
FileStream fs = File.Create(Path.GetFileN... | ```c#
// project created on 11.11.2001 at 15:19
using System;
using System.IO;
using ICSharpCode.SharpZipLib.GZip;
class MainClass
{
public static void Main(string[] args)
{
if ( args.Length > 0 ) {
if ( args[0] == "-d" ) { // decompress
Stream s = new GZipInputStream(File.OpenRead(args[1]));
FileStrea... |
be36e30f-482a-4d5a-b069-b6a02d300ad6 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Reflection;
// ReSharper disable once CheckNamespace
internal static class Program
{
private static int Main(string[] args)
{
// Mono's XBuild uses assembly redirects to make sure it uses .NET 4.5 target binaries.
// We emulate it using our own... | ```c#
using System;
using System.IO;
using System.Reflection;
// ReSharper disable once CheckNamespace
internal static class Program
{
private static int Main(string[] args)
{
var mainAsm = Assembly.Load("citizenmp_server_updater");
mainAsm.GetType("Costura.AssemblyLoader")
.GetMe... |
4a4728be-dcf1-450f-ac5f-70b7d528c03a | {
"language": "C#"
} | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SaurusConsole.OthelloAI;
namespace SaurusConsoleTests
{
[TestClass]
public class MoveTests
{
[TestMethod]
public void NotationConstuctorTest()
{
Move e4move = new Move("E4");
Assert.AreEqual("E4",... | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SaurusConsole.OthelloAI;
namespace SaurusConsoleTests
{
[TestClass]
public class MoveTests
{
[TestMethod]
public void NotationConstuctorTest()
{
Move e4move = new Move("E4");
Assert.AreEqual("E4",... |
b12ebf43-b617-4c97-9b40-4ad8c3860dc4 | {
"language": "C#"
} | ```c#
using System.Diagnostics;
using System.IO;
using Hangfire;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.HttpSys;
using SupportManager.Contracts;
using Topshelf;
namespace SupportManager.Web
{
public class Program
{
private static string[] args... | ```c#
using System.Diagnostics;
using System.IO;
using Hangfire;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.HttpSys;
using SupportManager.Contracts;
using Topshelf;
namespace SupportManager.Web
{
public class Program
{
private static string[] args... |
e857029b-5a7b-43ee-9639-7dab0e2f5651 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
namespace Nether.Web.Features.Identity
{
[Route("identity-test"... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
namespace Nether.Web.Features.Identity
{
[Route("identity-test"... |
9b45006f-1ffd-4675-85a0-ce4c39c3c4de | {
"language": "C#"
} | ```c#
/*
* The official C# API client for alpaca brokerage
* Sourced from: https://github.com/alpacahq/alpaca-trade-api-csharp/tree/v3.0.2
*/
using System;
using Newtonsoft.Json;
namespace QuantConnect.Brokerages.Alpaca.Markets
{
internal sealed class JsonError
{
[JsonProperty(PropertyName = "code"... | ```c#
/*
* The official C# API client for alpaca brokerage
* Sourced from: https://github.com/alpacahq/alpaca-trade-api-csharp/tree/v3.0.2
*/
using System;
using Newtonsoft.Json;
namespace QuantConnect.Brokerages.Alpaca.Markets
{
internal sealed class JsonError
{
[JsonProperty(PropertyName = "code"... |
264bc289-baaa-413b-b391-9ec9e1025464 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System;
using osu.Game.Users;
namespace osu.Game.Online.RealtimeMultiplayer
{
[Serializable]
public class MultiplayerRoomUser : IEq... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System;
using osu.Game.Users;
namespace osu.Game.Online.RealtimeMultiplayer
{
[Serializable]
public class MultiplayerRoomUser : IEq... |
7774f76a-8ea1-4b99-8296-99264275c463 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace IvionSoft
{
public class History<T>
{
public int Length { get; private set; }
HashSet<T> hashes;
Queue<T> queue;
object _locker = new object();
public History(int length) : this(length, null)
{}
... | ```c#
using System;
using System.Collections.Generic;
namespace IvionSoft
{
public class History<T>
{
public int Length { get; private set; }
HashSet<T> hashes;
Queue<T> queue;
public History()
{
Length = 0;
}
public History(int length) : ... |
0965842a-4559-4c0e-8d43-4674242169df | {
"language": "C#"
} | ```c#
using System;
using dnlib.DotNet;
namespace Confuser.Core.Project.Patterns {
/// <summary>
/// A function that compare the module of definition.
/// </summary>
public class ModuleFunction : PatternFunction {
internal const string FnName = "module";
/// <inheritdoc />
public override string Name {... | ```c#
using System;
using dnlib.DotNet;
namespace Confuser.Core.Project.Patterns {
/// <summary>
/// A function that compare the module of definition.
/// </summary>
public class ModuleFunction : PatternFunction {
internal const string FnName = "module";
/// <inheritdoc />
public override string Name {... |
273ff277-f05c-4118-b3f1-d2a1946ccdfb | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace Stampsy.ImageSource
{
public class FileDestination : IDestination<FileRequest>
{
public string Folder { get; private set; }
public FileDestination (string folder)
{
Folder ... | ```c#
using System;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace Stampsy.ImageSource
{
public class FileDestination : IDestination<FileRequest>
{
public static FileDestination InLibrary (params string [] folders)
{
var folder =... |
79d4b27f-a9e3-4f56-862e-3e27bd1598e4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Simple.Domain.Model
{
public class Organization
{
public Guid Id { get; set; }
public string Name { get; set; }
public string CatchPhrase { get; set; }
public string BSPhrase { get; set; }
// Ref
public DomainUser Owner { get; set; }
//... | ```c#
using System;
using System.Collections.Generic;
using Simple.Domain.Entities;
namespace Simple.Domain.Model
{
public class Organization
{
public Guid Id { get; set; }
public string Name { get; set; }
public string CatchPhrase { get; set; }
public string BSPhrase { get; set; }
// Ref
public User O... |
fd3ace4a-fd5f-46b1-9940-1511210460d2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicCash
{
/// <summary>
/// The customer
/// </summary>
public class Alice : BaseActor
{
}
}
```
Add some helpers and stuff | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicCash
{
/// <summary>
/// The customer
/// </summary>
public class Alice : BaseActor
{
public List<MoneyOrder> MoneyOrders { get; private set; }
... |
93246fd9-dcdf-426d-9eea-c9e0e5d94a13 | {
"language": "C#"
} | ```c#
// Copyright 2015 Palm Stone Games, Inc. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public class ue4czmq : ModuleRules
{
public ue4czmq(TargetInfo Target)
{
// Include paths
//PublicIncludePaths.AddRange(new string[] {});
//PrivateIncl... | ```c#
// Copyright 2015 Palm Stone Games, Inc. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public class ue4czmq : ModuleRules
{
public ue4czmq(TargetInfo Target)
{
// Include paths
//PublicIncludePaths.AddRange(new string[] {});
//PrivateIncl... |
068778a1-ff3d-4698-907c-9f2d86ba3312 | {
"language": "C#"
} | ```c#
@model APFT
@using (Html.BeginForm("Edit", "APFT", FormMethod.Post, new { @class = "form-horizontal" role = "form" }))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(model => model.Id)
@Html.ValidationSummary()
<div class="form-group form-group-lg">
@Html.DisplayNameFor(model => model.Soldi... | ```c#
@model APFT
@using (Html.BeginForm("Edit", "APFT", FormMethod.Post, new { @class = "form-horizontal" role = "form" }))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(model => model.Id)
@Html.ValidationSummary()
<div class="form-group form-group-lg">
@Html.DisplayNameFor(model => model.Soldi... |
8d3d4c25-49f4-4c41-b440-e27a8816f88c | {
"language": "C#"
} | ```c#
#region copyright
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SimpleTests.cs" company="Stephen Reindl">
// Copyright (c) Stephen Reindl. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in t... | ```c#
#region copyright
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SimpleTests.cs" company="Stephen Reindl">
// Copyright (c) Stephen Reindl. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in t... |
3600283a-bd12-4dcd-9e0e-e6c5f15c5b5a | {
"language": "C#"
} | ```c#
namespace MvvmFx.CaliburnMicro
{
using System;
/// <summary>
/// Used to manage logging.
/// </summary>
public static class LogManager
{
private static readonly Logging.ILog NullLogInstance = new Logging.NullLogger();
/// <summary>
/// Creates an <see cref="Loggi... | ```c#
namespace MvvmFx.CaliburnMicro
{
using System;
/// <summary>
/// Used to manage logging.
/// </summary>
public static class LogManager
{
private static readonly Logging.ILog NullLogInstance = new Logging.NullLogger();
#pragma warning disable CS3003 // Type is not CLS-compliant
... |
07efee9e-69b2-44fe-8e4d-b9ba86165712 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsQuery.Implementation
{
public class TrueStringComparer : IComparer<string>, IEqualityComparer<string>
{
public int Compare(string x, string y)
{
int... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsQuery.Implementation
{
public class TrueStringComparer : IComparer<string>, IEqualityComparer<string>
{
public int Compare(string x, string y)
{
int... |
4c8e5d8c-635a-429f-af3f-b9872981fb3a | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Sakuno.Collections
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class EnumerableExtensions
{
public static bool AnyNull<T>(this IEnumerable<T> source) where T : class
{
... | ```c#
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Sakuno.Collections
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class EnumerableExtensions
{
public static bool AnyNull<T>(this IEnumerable<T> source) where T : class
{
... |
f0597702-c6a2-46e6-abe9-32c305ab8981 | {
"language": "C#"
} | ```c#
namespace OpenRealEstate.Services
{
public interface ITransmorgrifier
{
/// <summary>
/// Converts some given data into a listing instance.
/// </summary>
/// <param name="data">some data source, like Xml data or json data.</param>
/// <param name="isClearA... | ```c#
namespace OpenRealEstate.Services
{
public interface ITransmorgrifier
{
/// <summary>
/// Converts some given data into a listing instance.
/// </summary>
/// <param name="data">some data source, like Xml data or json data.</param>
/// <param name="areBadCh... |
d0287261-5633-49c6-822e-f50acfadb58a | {
"language": "C#"
} | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Core2D.Avalonia
{
public class MainWindow : Window
{
public M... | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Core2D.Avalonia
{
public class MainWindow : Window
{
public M... |
05960004-6309-4215-8d98-14769af55664 | {
"language": "C#"
} | ```c#
using LiteNetLib;
using System;
namespace LiteNetLibManager
{
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class SyncFieldAttribute : Attribute
{
/// <summary>
/// Sending method type
/// </summary>
public DeliveryMethod del... | ```c#
using LiteNetLib;
using System;
namespace LiteNetLibManager
{
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class SyncFieldAttribute : Attribute
{
/// <summary>
/// Sending method type
/// </summary>
public DeliveryMethod del... |
33b7cae0-240d-4755-8ab0-fef706041ed4 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using System.IO;
namespace osu.Game.Migrations
{
public partial class StandardizePaths : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
string sanitized = Path.DirectorySeparatorChar.To... | ```c#
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using System.IO;
namespace osu.Game.Migrations
{
public partial class StandardizePaths : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
string windowsStyle = @"\";
string st... |
707d37d0-140a-4648-804f-58366f596518 | {
"language": "C#"
} | ```c#
// Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.
namespace Narvalo.Applicative
{
using System;
using Narvalo;
// Query Expression Pattern for nullables.
public static class Qullable
{
public static TResult? Select<TSour... | ```c#
// Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.
namespace Narvalo.Applicative
{
using System;
using Narvalo;
// Query Expression Pattern for nullables.
public static class Qullable
{
public static TResult? Select<TSour... |
763b16ec-82e6-4e8f-909f-eed13dc6fcef | {
"language": "C#"
} | ```c#
namespace MvcTurbine.ComponentModel {
using System;
/// <summary>
/// Defines common assemblies to filter. These assemblies are:
/// System, mscorlib, Microsoft, WebDev, CppCodeProvider).
/// </summary>
[Serializable]
public class CommonAssemblyFilter : AssemblyFilter {
... | ```c#
namespace MvcTurbine.ComponentModel {
using System;
/// <summary>
/// Defines common assemblies to filter. These assemblies are:
/// System, mscorlib, Microsoft, WebDev, CppCodeProvider).
/// </summary>
[Serializable]
public class CommonAssemblyFilter : AssemblyFilter {
... |
0019965d-c6f5-4c7e-a2ed-6bfc43186005 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using TechSmith.Hyde.Table.Azure;
namespace TechSmith.Hyde.Table.Memory
{
internal class DynamicMemoryQuery : AbstractMemoryQuery<dynamic>
{
public DynamicMemoryQuery( IEnumerable<GenericTableEntity> entities )
: base( entities )
{
}
priv... | ```c#
using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using TechSmith.Hyde.Table.Azure;
namespace TechSmith.Hyde.Table.Memory
{
internal class DynamicMemoryQuery : AbstractMemoryQuery<dynamic>
{
public DynamicMemoryQuery( IEnumerable<GenericTableEntity>... |
5d1bc091-59cc-49c5-9bd4-922a5d2d2321 | {
"language": "C#"
} | ```c#
using Hearthstone_Deck_Tracker;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace OptionsDisplay
{
class HearthWindow : InfoWindow
{
private HearthstoneTextBlock info;
public Hear... | ```c#
using Hearthstone_Deck_Tracker;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace OptionsDisplay
{
class HearthWindow : InfoWindow
{
private HearthstoneTextBlock info;
public Hear... |
207972d2-cf78-4017-94cf-943e7e861900 | {
"language": "C#"
} | ```c#
namespace NetIRC.Messages
{
public class PingMessage : IRCMessage, IServerMessage
{
public string Target { get; }
public PingMessage(ParsedIRCMessage parsedMessage)
{
Target = parsedMessage.Trailing ?? parsedMessage.Parameters[0];
}
}
}
```
Remove unneces... | ```c#
namespace NetIRC.Messages
{
public class PingMessage : IRCMessage, IServerMessage
{
public string Target { get; }
public PingMessage(ParsedIRCMessage parsedMessage)
{
Target = parsedMessage.Trailing;
}
}
}
``` |
24106f05-9aad-4d6b-871e-724e8657f001 | {
"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.Diagnostics;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
us... | ```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 JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Platform... |
899d85cf-fc4c-459b-8094-1b0dc9d49d56 | {
"language": "C#"
} | ```c#
using System;
namespace FalconUDP
{
internal static class FalconHelper
{
internal static unsafe void WriteFalconHeader(byte[] dstBuffer,
int dstIndex,
PacketType type,
SendOptions opts,
ushort seq,
ushort payloadSize)
{
... | ```c#
using System;
namespace FalconUDP
{
internal static class FalconHelper
{
internal static unsafe void WriteFalconHeader(byte[] dstBuffer,
int dstIndex,
PacketType type,
SendOptions opts,
ushort seq,
ushort payloadSize)
{
... |
98d0bda8-648f-48fc-a424-d7a8e1cc1790 | {
"language": "C#"
} | ```c#
using System;
using System.Security.Principal;
using Csla.Serialization;
using System.Collections.Generic;
using Csla.Core.FieldManager;
using System.Runtime.Serialization;
using Csla.DataPortalClient;
using Csla.Silverlight;
using Csla.Core;
namespace Csla.Security
{
public abstract partial class... | ```c#
using System;
using System.Security.Principal;
using Csla.Serialization;
using System.Collections.Generic;
using Csla.Core.FieldManager;
using System.Runtime.Serialization;
using Csla.DataPortalClient;
using Csla.Silverlight;
using Csla.Core;
namespace Csla.Security
{
public partial class Membersh... |
b3da98b0-5234-47a2-8d1e-da456c2be1bd | {
"language": "C#"
} | ```c#
namespace Stripe
{
public static class FilePurpose
{
public const string AdditionalVerification = "additional_verification";
public const string BusinessIcon = "business_icon";
public const string BusinessLogo = "business_logo";
public const string CustomerSignature = "c... | ```c#
namespace Stripe
{
public static class FilePurpose
{
public const string AccountRequirement = "account_requirement";
public const string AdditionalVerification = "additional_verification";
public const string BusinessIcon = "business_icon";
public const string BusinessLo... |
00b2452c-d3ad-4830-adb4-bc10d338a038 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class ChangeOrderInLayer : MonoBehaviour
{
#pragma warning disable 0649
[SerializeField]
private Renderer _renderer;
[SerializeField]
private int orderInLayer;
#pragma warning restore 0649
void Start()
{
if (_ren... | ```c#
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class ChangeOrderInLayer : MonoBehaviour
{
[SerializeField]
private Renderer _renderer;
[SerializeField]
private int orderInLayer;
[SerializeField]
private string sortingLayer = "Default";
[SerializeField]
pr... |
134dcc86-b4b1-439b-9a84-826c113a3af5 | {
"language": "C#"
} | ```c#
using FluentAssertions;
using FluentAssertions.Execution;
namespace Bearded.Utilities.Testing
{
public sealed class MaybeAssertions<T>
{
private readonly Maybe<T> subject;
public MaybeAssertions(Maybe<T> instance) => subject = instance;
[CustomAssertion]
public v... | ```c#
using FluentAssertions;
using FluentAssertions.Execution;
namespace Bearded.Utilities.Testing
{
public sealed class MaybeAssertions<T>
{
private readonly Maybe<T> subject;
public MaybeAssertions(Maybe<T> instance) => subject = instance;
[CustomAssertion]
public v... |
5064f45a-381f-4f1c-8d2b-31ccaa31fc5d | {
"language": "C#"
} | ```c#
using System.Security.Cryptography.X509Certificates;
using NUnit.Framework;
using Procon.Service.Shared;
using Procon.Setup.Models;
namespace Procon.Setup.Test.Models {
[TestFixture]
public class CertificateModelTest {
/// <summary>
/// Tests a certificate will be generated and can be re... | ```c#
using System.Security.Cryptography.X509Certificates;
using NUnit.Framework;
using Procon.Service.Shared;
using Procon.Setup.Models;
namespace Procon.Setup.Test.Models {
[TestFixture]
public class CertificateModelTest {
/// <summary>
/// Tests a certificate will be generated and can be re... |
0a5209a0-00f7-46ca-b0ac-51729ca48db8 | {
"language": "C#"
} | ```c#
namespace BigEgg.Tools.JsonComparer.Parameters
{
using BigEgg.Tools.ConsoleExtension.Parameters;
[Command("split", "Split the big JSON file to multiple small files.")]
public class SplitParameter
{
[StringProperty("input", "i", "The path of JSON file to split.", Required = true)]
... | ```c#
namespace BigEgg.Tools.JsonComparer.Parameters
{
using BigEgg.Tools.ConsoleExtension.Parameters;
[Command("split", "Split the big JSON file to multiple small files.")]
public class SplitParameter
{
[StringProperty("input", "i", "The path of JSON file to split.", Required = true)]
... |
dc8f0a0e-5888-4b94-ba12-87c01e7572c4 | {
"language": "C#"
} | ```c#
using System.IO;
using System.Linq;
using SpotifyRecorder.Core.Abstractions.Entities;
using SpotifyRecorder.Core.Abstractions.Services;
using TagLib;
using TagLib.Id3v2;
using File = TagLib.File;
namespace SpotifyRecorder.Core.Implementations.Services
{
public class ID3TagService : IID3TagService
{
... | ```c#
using System.IO;
using System.Linq;
using SpotifyRecorder.Core.Abstractions.Entities;
using SpotifyRecorder.Core.Abstractions.Services;
using TagLib;
using TagLib.Id3v2;
using File = TagLib.File;
namespace SpotifyRecorder.Core.Implementations.Services
{
public class ID3TagService : IID3TagService
{
... |
f0494cc9-e2f5-4d8e-9be8-348ff362c27b | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Autofac.Core;
namespace Autofac
{
/// <summary>
/// The details of an individual request to resolve a service.
/// </summary>
public class ResolveRequest
{
/// <summary>
/// Initializes a new instance of the <see cref="ResolveRequest"/>... | ```c#
using System.Collections.Generic;
using Autofac.Core;
namespace Autofac
{
/// <summary>
/// The details of an individual request to resolve a service.
/// </summary>
public class ResolveRequest
{
/// <summary>
/// Initializes a new instance of the <see cref="ResolveRequest"/>... |
ca6322fc-5c55-40ba-848e-632475b65178 | {
"language": "C#"
} | ```c#
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using CefSharp.Internals;
namespace CefSharp
{
internal static class InternalWebBrowserExtensions
{
internal static void Se... | ```c#
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using CefSharp.Internals;
namespace CefSharp
{
internal static class InternalWebBrowserExtensions
{
internal static void Se... |
f4ab349d-2d3d-4664-9d66-2b5d8f293dc1 | {
"language": "C#"
} | ```c#
/*
Copyright 2015 Google Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... | ```c#
/*
Copyright 2015 Google Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... |
8045ddd6-25f2-4a1d-9f6f-844fedb7d2d7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
namespace NuGetGallery
{
public class PerFieldAnalyzer : PerFieldAnalyzerWrapper
{
public PerFieldAnalyzer()
: base(new StandardAn... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
namespace NuGetGallery
{
public class PerFieldAnalyzer : PerFieldAnalyzerWrapper
{
public PerFieldAnalyzer()
: base(new StandardAn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.