doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
64f90b89-2703-4568-9eee-79b472567269 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Verdeler
{
public class Distributor<TDistributable> : IDistributor<TDistributable> where TDistributable : IDistributable
{
private readonly List<IEndpointRepository> _endpointRepositories
= new List<IEndpoin... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Verdeler
{
public class Distributor<TDistributable> : IDistributor<TDistributable> where TDistributable : IDistributable
{
private readonly List<IEndpointRepository> _endpointRepositories
= new List<IEndpoin... |
eee9a5bb-0ce7-4ee9-aa71-0653d032ca4f | {
"language": "C#"
} | ```c#
using NetSh;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WifiProfiles
{
class Program
{
static void Main(string[] args)
{
var profiles = NetShWrapper.GetWifiProfiles();
bool sawBadWi... | ```c#
using NetSh;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WifiProfiles
{
class Program
{
static void Main(string[] args)
{
var profiles = NetShWrapper.GetWifiProfiles();
bool sawBadWi... |
ef4df0d2-2632-40c3-8016-2d1706394208 | {
"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: AssemblyTitl... | ```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: AssemblyTitl... |
12db5b29-ba73-44fe-83cb-3ffda7594a1e | {
"language": "C#"
} | ```c#
using System.Web.Http;
using Bit.WebApi.ActionFilters;
using Bit.WebApi.Contracts;
namespace Bit.WebApi.Implementations
{
public class GlobalHostAuthenticationFilterProvider : IWebApiConfigurationCustomizer
{
public virtual void CustomizeWebApiConfiguration(HttpConfiguration webApiConfiguration)... | ```c#
using System.Web.Http;
using Bit.WebApi.ActionFilters;
using Bit.WebApi.Contracts;
namespace Bit.WebApi.Implementations
{
public class GlobalHostAuthenticationFilterProvider : IWebApiConfigurationCustomizer
{
public virtual void CustomizeWebApiConfiguration(HttpConfiguration webApiConfiguration)... |
223f390b-19fb-45aa-837d-fcc60084e902 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;
namespace Grobid.Test
{
[UseReporter(typeof(DiffReporter))]
public class GrobidTest
{
st... | ```c#
using System;
using System.IO;
using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;
namespace Grobid.Test
{
[UseReporter(typeof(DiffReporter))]
public class GrobidTest
{
st... |
bb792339-b409-4e37-bddf-d4c3a04d9d7e | {
"language": "C#"
} | ```c#
using Microsoft.Win32;
using System.IO;
namespace StorybrewEditor.Util
{
public static class OsuHelper
{
public static string GetOsuPath()
{
using (var registryKey = Registry.ClassesRoot.OpenSubKey("osu\\DefaultIcon"))
{
if (registryKey == null)
... | ```c#
using Microsoft.Win32;
using System;
using System.IO;
namespace StorybrewEditor.Util
{
public static class OsuHelper
{
public static string GetOsuPath()
{
using (var registryKey = Registry.ClassesRoot.OpenSubKey("osu\\DefaultIcon"))
{
if (registryK... |
4af72cf9-ed0b-4229-ad2a-a51271c2bdf7 | {
"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: AssemblyTitl... | ```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: AssemblyTitl... |
23e47a5a-6969-4f43-812b-df4723bf04f7 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class RandomColor : MonoBehaviour {
void Start () {
// var c = new Color(Random.value, Random.value, Random.value, 1f);
var c = new Color(0, 0, 1f, 1f);
GetComponent<Renderer>().material.color = c;
}
}
```
Change color to read to test sub-module. | ```c#
using UnityEngine;
using System.Collections;
public class RandomColor : MonoBehaviour {
void Start () {
// var c = new Color(Random.value, Random.value, Random.value, 1f);
var c = new Color(1f, 0, 0f, 1f);
GetComponent<Renderer>().material.color = c;
}
}
``` |
6657fc77-1908-474b-b4fe-9e4eb3c1f154 | {
"language": "C#"
} | ```c#
using Glimpse.Agent;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Framework.OptionsModel;
using Glimpse.Server.Web;
using Glimpse.Web;
using Microsoft.Extensions.OptionsModel;
namespace Glimpse
{
public class GlimpseServerWebServices
{
public static IServiceCollection GetDefau... | ```c#
using Glimpse.Agent;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Framework.OptionsModel;
using Glimpse.Server.Web;
using Glimpse.Web;
using Microsoft.Extensions.OptionsModel;
namespace Glimpse
{
public class GlimpseServerWebServices
{
public static IServiceCollection GetDefau... |
75f61950-d543-4f6a-8062-78d7fed81bb5 | {
"language": "C#"
} | ```c#
@model BlogSystem.Web.ViewModels.Comment.CommentViewModel
<h3>Leave a Comment</h3>
@if (User.Identity.IsAuthenticated)
{
using (Ajax.BeginForm("Create", "Comments", new { id = ViewData["id"].ToString() }, new AjaxOptions { HttpMethod = "Post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "commen... | ```c#
@model BlogSystem.Web.ViewModels.Comment.CommentViewModel
<h3>Leave a Comment</h3>
@if (User.Identity.IsAuthenticated)
{
using (Ajax.BeginForm("Create", "Comments", new { id = ViewData["id"].ToString() }, new AjaxOptions { HttpMethod = "Post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "commen... |
c81982cc-ce0a-47fb-9672-cb74e7a39c34 | {
"language": "C#"
} | ```c#
using System;
using System.Text;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Shared;
namespace Titanium.Web.Proxy.Extensions
{
internal static class HttpWebResponseExtensions
{
/// <summary>
/// Gets the character encoding of response from response headers
/// </summa... | ```c#
using System;
using System.Text;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Shared;
namespace Titanium.Web.Proxy.Extensions
{
internal static class HttpWebResponseExtensions
{
/// <summary>
/// Gets the character encoding of response from response headers
/// </summa... |
ba5553c3-5c6a-4725-81f9-e8b37302d7ad | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Chain
{
public interface IChain
{
IList<ILink> Links { get; }
void ConnectAllLinks();
void LoopLinks(int amountOfLoops);
void RunLinks();
}
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Chain
{
public interface IChain
{
IList<ILink> Links { get; }
void ConnectAllLinks();
void LoopLinks(int amountOfLoops);
void RunLinks();
... |
2dd0ee6c-41be-485a-9344-91aa2706899d | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.Data.Entity.Metadata;
namespace Microsoft.Framework.CodeGeneration.EntityFramework.Test.TestModels
{
public... | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.Data.Entity.Metadata;
namespace Microsoft.Framework.CodeGeneration.EntityFramework.Test.TestModels
{
public... |
9c920021-0719-479f-b2ab-371452d6540e | {
"language": "C#"
} | ```c#
using ChessDotNet;
using ChessVariantsTraining.Models.Variant960;
namespace ChessVariantsTraining.MemoryRepositories.Variant960
{
public interface IGameRepoForSocketHandlers
{
Game Get(string id);
void RegisterMove(Game subject, Move move);
void RegisterGameOutcome(Game subject... | ```c#
using ChessDotNet;
using ChessVariantsTraining.Models.Variant960;
namespace ChessVariantsTraining.MemoryRepositories.Variant960
{
public interface IGameRepoForSocketHandlers
{
Game Get(string id);
void RegisterMove(Game subject, Move move);
void RegisterGameOutcome(Game subject... |
fbdef7d3-17c4-4487-83b9-ef8e8837638f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSocket.SocketServiceCore.Command;
using System.Diagnostics;
namespace RemoteProcessService.Command
{
public class LIST : ICommand<RemotePrcessSession>
{
#region ICommand<RemotePrcessSessio... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSocket.SocketServiceCore.Command;
using System.Diagnostics;
namespace RemoteProcessService.Command
{
public class LIST : ICommand<RemotePrcessSession>
{
#region ICommand<RemotePrcessSessio... |
552417e6-f4fd-44bd-be71-234d92da411c | {
"language": "C#"
} | ```c#
@using Mvc.JQuery.Datatables
@model DataTableVm
<table id="@Model.Id" class="display" >
<thead>
<tr>
@foreach (var column in Model.Columns)
{
<th>@column</th>
}
</tr>
<tr>
@foreach (var column in Model.Columns)
... | ```c#
@using Mvc.JQuery.Datatables
@model DataTableVm
<table id="@Model.Id" class="display" >
<thead>
<tr>
@foreach (var column in Model.Columns)
{
<th>@column</th>
}
</tr>
@if (Model.ColumnFilter)
{
<tr>
... |
863cafe2-81ce-47f6-bfca-dc6eae54a92d | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Screens.Select.Leaderboards;
using osu.Framework.Gra... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Screens.Select.Leaderboards;
using osu.Framework.Gra... |
0369d95e-3734-4e68-b334-fa9a43f4d320 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.Extensions.DependencyModel;
namespace Serilog.Settings.Configuration.Assemblies
{
abstract class AssemblyFinder
{
public abstract IReadOnlyList<AssemblyName> FindAssembliesContainingName(string nameToFind);
... | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.Extensions.DependencyModel;
namespace Serilog.Settings.Configuration.Assemblies
{
abstract class AssemblyFinder
{
public abstract IReadOnlyList<AssemblyName> FindAssembliesContainingName(string nameToFind);
... |
8ac85135-3cf4-447f-9e80-ee641c5fa405 | {
"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.Graphics;
using osu.Framework.Platform;
using osu.Framework.Testing;
namespace osu.Framework.Tests.Platform
{
[TestF... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Input;
using osu.Framework.Testing;
namespace osu.Framework.Tests.Platform
{
[TestFixture]
public class UserInpu... |
4b02d7df-1cf5-4873-95b0-2bf2a4e8828c | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Objects.Drawables;
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Framework.Graphic... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Taiko.UI
{
/// <summa... |
b4fb4dcd-93e7-49c2-8642-ad1e54df8252 | {
"language": "C#"
} | ```c#
using OpenKh.Kh2;
using OpenKh.Kh2.Messages;
using System.Collections.Generic;
using System.Linq;
namespace OpenKh.Engine
{
public class Kh2MessageProvider : IMessageProvider
{
private List<Msg.Entry> _messages;
public IMessageEncoder Encoder { get; set; } = Encoders.InternationalSystem... | ```c#
using OpenKh.Kh2;
using OpenKh.Kh2.Messages;
using System.Collections.Generic;
using System.Linq;
namespace OpenKh.Engine
{
public class Kh2MessageProvider : IMessageProvider
{
private Dictionary<int, byte[]> _messages = new Dictionary<int, byte[]>();
public IMessageEncoder Encoder { ge... |
f9cd9e12-220c-4e44-ba19-0dc80b247445 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Input.Bindings;
using osu.Game.Rulesets;
using SQLite.Net.Attributes;
using SQLiteNetExtensions.Attributes;
namespace osu.Game.Input.B... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Input.Bindings;
using osu.Game.Rulesets;
using SQLite.Net.Attributes;
using SQLiteNetExtensions.Attributes;
namespace osu.Game.Input.B... |
e1f93df7-9103-4ab3-a057-071769e87694 | {
"language": "C#"
} | ```c#
using CppSharp;
using CppSharp.Generators;
namespace MonoEmbeddinator4000
{
public enum CompilationTarget
{
SharedLibrary,
StaticLibrary,
Application
}
public class Options
{
public Options()
{
Project = new Project();
... | ```c#
using CppSharp;
using CppSharp.Generators;
namespace MonoEmbeddinator4000
{
public enum CompilationTarget
{
SharedLibrary,
StaticLibrary,
Application
}
public class Options : DriverOptions
{
public Options()
{
Project = new... |
d1198ca7-7cbd-4179-8820-8b2b62fdbf04 | {
"language": "C#"
} | ```c#
using Norm.Configuration;
using Norm.BSON;
using System.Collections.Generic;
using System.Linq;
namespace Norm.Responses
{
/// <summary>
/// Represents a message with an Ok status
/// </summary>
public class BaseStatusMessage : IExpando
{
private Dictionary<string, object> _properties... | ```c#
using Norm.Configuration;
using Norm.BSON;
using System.Collections.Generic;
using System.Linq;
namespace Norm.Responses
{
/// <summary>
/// Represents a message with an Ok status
/// </summary>
public class BaseStatusMessage : IExpando
{
private Dictionary<string, object> _properties... |
a820d7ea-ca90-4d55-8874-32c3e73ac058 | {
"language": "C#"
} | ```c#
using LanguageExt.Effects.Traits;
namespace LanguageExt.Sys.Traits
{
/// <summary>
/// Convenience trait - captures the BCL IO behaviour
/// </summary>
/// <typeparam name="RT">Runtime</typeparam>
public interface HasSys<RT> :
HasCancel<RT>,
HasConsole<RT>,
HasEncod... | ```c#
using LanguageExt.Effects.Traits;
namespace LanguageExt.Sys.Traits
{
/// <summary>
/// Convenience trait - captures the BCL IO behaviour
/// </summary>
/// <typeparam name="RT">Runtime</typeparam>
public interface HasSys<RT> :
HasCancel<RT>,
HasConsole<RT>,
HasEncod... |
1aaaeae2-d075-4945-ad8e-71b09c98b11d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
namespace CreateXMLFile
{
internal static class Program
{
private static void Main()
{
const string fileName = "quotes.txt";
Dictionary<string, string> dicoQuotes = new Dictionary<string, string>();
List<string> quote... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
namespace CreateXMLFile
{
internal static class Program
{
private static void Main()
{
const string fileName = "quotes.txt";
Dictionary<string, string> dicoQuotes = new Dictionary<string, string>();
List<string> quote... |
c2f727bc-c5a0-4b69-8e82-ced66d2f49bf | {
"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 System;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Fluent
{
publi... | ```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 System;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Fluent
{
publi... |
7dbc3029-d105-4cad-9277-1b1f9c6d1b39 | {
"language": "C#"
} | ```c#
using Octokit.Internal;
namespace Octokit
{
public interface IGitHubClient
{
IConnection Connection { get; }
IAuthorizationsClient Authorization { get; }
IIssuesClient Issue { get; }
IMiscellaneousClient Miscellaneous { get; }
IOrganizationsClient Organization { ... | ```c#
using Octokit.Internal;
namespace Octokit
{
public interface IGitHubClient
{
IConnection Connection { get; }
IAuthorizationsClient Authorization { get; }
IIssuesClient Issue { get; }
IMiscellaneousClient Miscellaneous { get; }
IOrganizationsClient Organization { ... |
ab578bfd-d491-432c-91ae-6ae34ce649fa | {
"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.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
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.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using ... |
5d42e31b-24b5-4e6c-9c41-e6a4d20529e7 | {
"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
namespace osu.Game.Online.RealtimeMultiplayer
{
/// <summary>
/// The current overall state of a realtime multiplayer room.
/// </summ... | ```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
namespace osu.Game.Online.RealtimeMultiplayer
{
/// <summary>
/// The current overall state of a realtime multiplayer room.
/// </summ... |
3d794f07-f209-4c59-a34c-7d8651d40a71 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Insula.Common;
namespace DeploymentCockpit.Common
{
public static class VariableHelper
{
public const string ProductVersionVariable = "ProductVersion";
public const s... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Insula.Common;
namespace DeploymentCockpit.Common
{
public static class VariableHelper
{
public const string ProductVersionVariable = "ProductVersion";
public const s... |
af2d44c6-1546-40e5-b62f-aa0e207d0a9d | {
"language": "C#"
} | ```c#
using System;
using UIKit;
namespace PureLayout.Net
{
public partial class UIViewPureLayout
{
public static NSLayoutConstraint[] AutoPinEdgesToSuperviewEdgesExcludingEdge(this UIView view, ALEdge excludingEdge)
{
return view.AutoPinEdgesToSuperviewEdgesExcludingEdge(ALHelpers... | ```c#
using System;
using UIKit;
namespace PureLayout.Net
{
public partial class UIViewPureLayout
{
public static NSLayoutConstraint[] AutoPinEdgesToSuperviewEdgesExcludingEdge(this UIView view, ALEdge excludingEdge)
{
return view.AutoPinEdgesToSuperviewEdgesExcludingEdge(ALHelpers... |
70521e5b-8c58-44d4-8205-fd8eecabf7d0 | {
"language": "C#"
} | ```c#
/// <summary>
/// Credit card type.
/// </summary>
namespace CreditCardProcessing
{
using System.ComponentModel;
/// <summary>
/// Credit card type.
/// </summary>
public enum CreditCardType
{
/// <summary>
/// Unknown issuers.
/// </summary>
[Description("Unknown Issuer")]
Unknown,
... | ```c#
//-----------------------------------------------------------------------
// <copyright file="CreditCardType.cs" company="Colagioia Industries">
// Provided under the terms of the AGPL v3.
// </copyright>
//-----------------------------------------------------------------------
/// <summary>
/// Credit card ... |
c34536db-8e39-4f90-9662-c9c9760ab4fd | {
"language": "C#"
} | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Composition;
using Microsoft.CodeAnalysis.Host... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Composition;
using Microsoft.CodeAnalysis.Host... |
8d4c17e1-3988-4f9a-b1a9-15dc73f8fb42 | {
"language": "C#"
} | ```c#
using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using Raven.Client;
using Raven.Client.Embedded;
namespace CGO.Web.NinjectModules
{
public class RavenModule : NinjectModule
{
public override void Load()
{
Kernel.Bind<IDocumentStore>().ToMethod(_ => Initialise... | ```c#
using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using Raven.Client;
using Raven.Client.Embedded;
namespace CGO.Web.NinjectModules
{
public class RavenModule : NinjectModule
{
public override void Load()
{
Kernel.Bind<IDocumentStore>().ToMethod(_ => Initialise... |
c5fb4d9f-85f2-407c-b370-f4e8542ee9e0 | {
"language": "C#"
} | ```c#
@model string
@section Title{
Message
}
<h2>@ViewBag.StatusMessage</h2>
```
Fix "change password message" view | ```c#
@model string
@section Title{
Message
}
<h2>@Model</h2>
``` |
1384e425-21f3-4042-9ea5-045bc82f6323 | {
"language": "C#"
} | ```c#
#region Copyright
// Copyright 2016 SnapMD, 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... | ```c#
#region Copyright
// Copyright 2016 SnapMD, 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... |
1779e666-e0e1-4531-adea-7aa5343f4cc2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Dialect;
namespace FluentNHibernate.Framework
{
public interface ISessionSource
{
ISession CreateSession();
void... | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
namespace FluentNHibernate.Framework
{
public interface ISessionSource
{
ISession CreateSession();
void BuildSchema();
Pe... |
e471c92d-595f-4b42-a97f-80c38c245512 | {
"language": "C#"
} | ```c#
#region Copyright (c) 2016 Atif Aziz. 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... | ```c#
#region Copyright (c) 2016 Atif Aziz. 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... |
d7075947-8862-49d5-8f2d-a2c0b7eb0ab8 | {
"language": "C#"
} | ```c#
using System.Runtime.InteropServices;
namespace Evolve.Test.Utilities
{
public class PostgreSqlDockerContainer : IDockerContainer
{
private DockerContainer _container;
public string Id => _container.Id;
public string ExposedPort => "5432";
public string HostPort => Runti... | ```c#
using System.Runtime.InteropServices;
namespace Evolve.Test.Utilities
{
public class PostgreSqlDockerContainer : IDockerContainer
{
private DockerContainer _container;
public string Id => _container.Id;
public string ExposedPort => "5432";
public string HostPort => Runti... |
c842172f-2179-4e88-9011-2d8f14109b03 | {
"language": "C#"
} | ```c#
using System;
namespace EarTrumpet.Extensions
{
public enum OSVersions : int
{
RS3 = 16299,
RS4 = 17134,
}
public static class OperatingSystemExtensions
{
public static bool IsAtLeast(this OperatingSystem os, OSVersions version)
{
return os.Versio... | ```c#
using System;
namespace EarTrumpet.Extensions
{
public enum OSVersions : int
{
RS3 = 16299,
RS4 = 17134,
RS5_Prerelease = 17723,
}
public static class OperatingSystemExtensions
{
public static bool IsAtLeast(this OperatingSystem os, OSVersions version)
... |
13cba825-1e2f-4c78-b2e0-08c7a09149bf | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Sep.Git.Tfs.Core.TfsInterop;
using Xunit;
namespace Sep.Git.Tfs.Test.Core.TfsInterop
{
public class BranchExtensionsTest
{
[Fact]
public void AllChildrenAlwaysReturnsAnEnumerable()
{
IEnumerable<BranchTree> result ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Rhino.Mocks;
using Sep.Git.Tfs.Core.TfsInterop;
using Xunit;
namespace Sep.Git.Tfs.Test.Core.TfsInterop
{
public class BranchExtensionsTest
{
[Fact]
public void AllChildrenAlwaysReturnsAnEnumerable()
{
... |
a95cc2e0-68b9-4722-a0e7-e16bbc72bb2d | {
"language": "C#"
} | ```c#
using Bugfree.Spo.Cqrs.Core.Utilities;
using Microsoft.Online.SharePoint.TenantAdministration;
using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Bugfree.Spo.Cqrs.Core.Queries
{
public class GetTenantSiteCollections : Query
{
public ... | ```c#
using Bugfree.Spo.Cqrs.Core.Utilities;
using Microsoft.Online.SharePoint.TenantAdministration;
using Microsoft.SharePoint.Client;
using System.Collections.Generic;
using System.Linq;
namespace Bugfree.Spo.Cqrs.Core.Queries
{
public class GetTenantSiteCollections : Query
{
public GetTenantSiteC... |
77c5dc34-a0ed-4a9e-9bde-dbe462f9f9b0 | {
"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.Graphics;
using osuTK;
namespace osu.Framework.Tests.Primitives
{
[TestFixture]
public class Vector2ExtensionsTe... | ```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 NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives;
using osuTK;
namespace osu.Framework.Tests.Primitives
{... |
04c5ac70-72dc-43d6-8219-995a9e254006 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using System;
[RequireComponent (typeof(CanvasGroup))]
public class Loader : MonoBehaviour
{
[Tooltip ("Time in seconds to fade in/out the loader.")]
public float fadeSpeed = 1f;
private CanvasGroup canvasGroup;
public void Show ()
{
Debug.Log ("[Loader] Sho... | ```c#
using UnityEngine;
using System.Collections;
using System;
[RequireComponent (typeof(CanvasGroup))]
public class Loader : MonoBehaviour
{
[Tooltip ("Time in seconds to fade in/out the loader.")]
public float fadeSpeed = 1f;
private CanvasGroup canvasGroup;
private IEnumerator currentFade;
public void Sho... |
294cc12c-6c92-4059-a9d6-ee8f43fa663a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LanguageExt;
using static LanguageExt.Prelude;
namespace SolidworksAddinFramework
{
public static class BoolExtensions
{
public static Option<T> IfTrue<T>(this bool v, Func<T... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LanguageExt;
using static LanguageExt.Prelude;
namespace SolidworksAddinFramework
{
public static class BoolExtensions
{
public static Option<T> IfTrue<T>(this bool v, Func<T... |
a2831026-c98d-4ec7-861b-9923b599e8dc | {
"language": "C#"
} | ```c#
using Rees.TangyFruitMapper.UnitTest.TestData;
using Xunit;
using Xunit.Abstractions;
namespace Rees.TangyFruitMapper.UnitTest
{
public class Scenario4_PropertiesWithBackingFieldAndUnderscorePrefix : MappingGeneratorScenarios<DtoType4, ModelType4_UnderscoreBackingField>
{
public Scenario4_Proper... | ```c#
using Rees.TangyFruitMapper.UnitTest.TestData;
using Xunit;
using Xunit.Abstractions;
namespace Rees.TangyFruitMapper.UnitTest
{
public class Scenario4_PropertiesWithBackingFieldAndUnderscorePrefix : MappingGeneratorScenarios<DtoType4, ModelType4_UnderscoreBackingField>
{
public Scenario4_Proper... |
95d8ebcb-cd19-4b2e-b23c-439243c0a4e7 | {
"language": "C#"
} | ```c#
@model Samaritans.Models.EventViewModel
@{
ViewBag.Title = Model.Name;
}
<h2>@Model.Name</h2>
```
Add view for displaying event details | ```c#
@model Samaritans.Models.EventViewModel
@{
ViewBag.Title = Model.Name;
}
<article class="event">
<form>
<h2>@M<input type="type" name="name" value="odel.Name</h2>
<div>@Model.EventTime</div>
<div>@Model.Attendance</div>
<p>@Model.Purpose</p>
<h3>Bring:</h3>
@for (var i = 0; i < Model.Resources.... |
a192e3f4-1852-45c8-9135-454afbd3e84d | {
"language": "C#"
} | ```c#
using System;
using Glimpse.Agent.Web.Options;
using Microsoft.Framework.OptionsModel;
namespace Glimpse.Agent.Web
{
public class GlimpseAgentWebOptionsSetup : ConfigureOptions<GlimpseAgentWebOptions>
{
public GlimpseAgentWebOptionsSetup() : base(ConfigureGlimpseAgentWebOptions)
{
... | ```c#
using System;
using Glimpse.Agent.Web.Options;
using Microsoft.Framework.OptionsModel;
namespace Glimpse.Agent.Web
{
public class GlimpseAgentWebOptionsSetup : ConfigureOptions<GlimpseAgentWebOptions>
{
public GlimpseAgentWebOptionsSetup() : base(ConfigureGlimpseAgentWebOptions)
{
... |
77b19a59-5937-406f-8f64-7399eae5e133 | {
"language": "C#"
} | ```c#
using System;
using MySql.Data.MySqlClient;
namespace SideBySide
{
public class DatabaseFixture : IDisposable
{
public DatabaseFixture()
{
var csb = AppConfig.CreateConnectionStringBuilder();
var connectionString = csb.ConnectionString;
var database = csb.Database;
csb.Database = "";
using ... | ```c#
using System;
#if NETCOREAPP1_1_2
using System.Reflection;
#endif
using System.Threading;
using MySql.Data.MySqlClient;
namespace SideBySide
{
public class DatabaseFixture : IDisposable
{
public DatabaseFixture()
{
// increase the number of worker threads to reduce number of spurious failures from threa... |
bddc7f5d-8d24-407b-9182-73d122f76385 | {
"language": "C#"
} | ```c#
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.FeaturesTestFramework.Daemon;
using JetBrains.ReSharper.Psi;
namespace JetBrains.ReSharper.Plugins.Unity.Tests.CSharp.Daemon.Stages.Analysis
{
public class CSharpHighlightingTestBase<T> : CShar... | ```c#
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.FeaturesTestFramework.Daemon;
using JetBrains.ReSharper.Psi;
namespace JetBrains.ReSharper.Plugins.Unity.Tests.CSharp.Daemon.Stages.Analysis
{
public abstract class CSharpHighlightingTestBase<T... |
9e47d880-699c-4537-8a64-aa7098fad562 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using TTreeDataModel;
namespace TTreeParser.Tests
{
public static class TUtils
{
/// <summary>
/// Find a class in the list, return null if we can't find it.
/// </summary>
/// <param name="classes"></param>
... | ```c#
using System.Collections.Generic;
using System.Linq;
using TTreeDataModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TTreeParser.Tests
{
public static class TUtils
{
/// <summary>
/// Find a class in the list, return null if we can't find it.
/// </... |
b1e80693-5062-470b-b16a-ee697d86bc40 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Reflection;
using Newtonsoft.Json;
namespace Rackspace.CloudOffice
{
internal static class BodyEncoder
{
public static string Encode(object data, string contentType)
{
switch (co... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Reflection;
using Newtonsoft.Json;
namespace Rackspace.CloudOffice
{
internal static class BodyEncoder
{
public static string Encode(object data, string contentType)
{
if (data =... |
218d664f-0aa7-411c-893d-ab0df41f2fa2 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authentication;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Wukong.Models;
namespace Wukong.Controllers
{
[Route("oa... | ```c#
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authentication;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Wukong.Models;
namespace Wukong.Controlle... |
9fee71eb-17b0-43ab-bbab-a1d53dba1ad7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace EchoNestNET
{
[JsonObject]
public class Genre
{
[JsonProperty(PropertyName = "name")]
public string name { get; set; }
[JsonPro... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace EchoNestNET
{
[JsonObject]
public class Genre
{
[JsonProperty(PropertyName = "name")]
public string name { get; set; }
[JsonPro... |
b5955e56-fdb5-436e-a558-9a70a7189a17 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using MediatR;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccount;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccountTransactions;
u... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using MediatR;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccount;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccountTransactions;
u... |
9be25b46-dd22-49e6-b43a-c721fbfa66ad | {
"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.Bindables;
using osuTK;
namespace osu.Framework.Input.Handlers.Tablet
{
/// <summary>
/// An interface to access OpenTabletDriverHandle... | ```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.Bindables;
using osuTK;
namespace osu.Framework.Input.Handlers.Tablet
{
/// <summary>
/// An interface to access OpenTabletDriverHandle... |
476c8f3b-51d9-4a02-a705-baaf0c3a5ff9 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Reflection;
using GraphQL.Types;
namespace GraphQL.Resolvers
{
public class MethodModelBinderResolver<T> : IFieldResolver
{
private readonly IDependencyResolver _dependencyResolver;
private readonly MethodInfo _methodInfo;
private rea... | ```c#
using System;
using System.Linq;
using System.Reflection;
using GraphQL.Types;
namespace GraphQL.Resolvers
{
public class MethodModelBinderResolver<T> : IFieldResolver
{
private readonly IDependencyResolver _dependencyResolver;
private readonly MethodInfo _methodInfo;
private rea... |
80e80c73-86ac-426d-90cd-5f67dc4c1d6e | {
"language": "C#"
} | ```c#
using MultiMiner.Utility.Serialization;
using System.Linq;
namespace MultiMiner.Win.Extensions
{
public static class ApplicationConfigurationExtensions
{
public static Remoting.Data.Transfer.Configuration.Application ToTransferObject(this Data.Configuration.Application modelObject)
{
... | ```c#
using MultiMiner.Utility.Serialization;
using System.Linq;
namespace MultiMiner.Win.Extensions
{
public static class ApplicationConfigurationExtensions
{
public static Remoting.Data.Transfer.Configuration.Application ToTransferObject(this Data.Configuration.Application modelObject)
{
... |
62a27efd-5526-4bd3-947b-0eadd5f50aeb | {
"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... |
29925d5f-5dbc-4385-a8c7-fd03cd907884 | {
"language": "C#"
} | ```c#
using BugsnagUnity.Payload;
namespace BugsnagUnity
{
public interface ISessionTracker
{
void StartSession();
Session CurrentSession { get; }
}
class SessionTracker : ISessionTracker
{
private IClient Client { get; }
private Session _currentSession;
public Session CurrentSession... | ```c#
using BugsnagUnity.Payload;
namespace BugsnagUnity
{
public interface ISessionTracker
{
void StartSession();
Session CurrentSession { get; }
}
class SessionTracker : ISessionTracker
{
private IClient Client { get; }
private Session _currentSession;
public Session CurrentSession... |
6b7aa33f-75e6-4552-bae6-74be871b55f6 | {
"language": "C#"
} | ```c#
namespace ACE.Network.GameEvent
{
public class GameEventCharacterTitle : GameEventPacket
{
public override GameEventOpcode Opcode { get { return GameEventOpcode.CharacterTitle; } }
public GameEventCharacterTitle(Session session) : base(session) { }
protected override void WriteE... | ```c#
namespace ACE.Network.GameEvent
{
public class GameEventCharacterTitle : GameEventPacket
{
public override GameEventOpcode Opcode { get { return GameEventOpcode.CharacterTitle; } }
public GameEventCharacterTitle(Session session) : base(session) { }
protected override void WriteE... |
48422d0d-3012-448b-9fa4-9bb4667e142a | {
"language": "C#"
} | ```c#
using System;
using System.Web.Http;
using Agiil.Bootstrap.DiConfiguration;
using Autofac;
namespace Agiil.Web.App_Start
{
public static class ContainerFactoryProviderExtensions
{
public static IContainer GetContainer(this ContainerFactoryProvider provider, HttpConfiguration config)
{
if(provi... | ```c#
using System;
using System.Web.Http;
using Agiil.Bootstrap.DiConfiguration;
using Autofac;
namespace Agiil.Web.App_Start
{
public static class ContainerFactoryProviderExtensions
{
public static IContainer GetContainer(this ContainerFactoryProvider provider, HttpConfiguration config)
{
if(provi... |
33e51f36-df03-4ac5-83a2-71f98f878366 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using AgateLib.Extensions.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace AgateLib.UnitTests.Extensions
{
[TestClass]
public class ListExtensions
{
[TestMethod]
public void SortPrimitives()
{
List<int> li = new List... | ```c#
using System.Collections.Generic;
using AgateLib.Extensions.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace AgateLib.UnitTests.Extensions
{
[TestClass]
public class ListExtensions
{
[TestMethod]
public void SortPrimitives()
{
List<int> li = new List... |
e315c85a-cf44-48c6-a99b-802c48641a58 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using HelloCoreClrApp.Data;
using HelloCoreClrApp.WebApi.Messages;
using Serilog;
namespace HelloCoreClrApp.WebApi.Actions
{
public class SayHelloWorldAction : ISayHelloWorldAction
{
private static readonly ILogger Log = Serilog.Log.ForContext<SayHelloW... | ```c#
using System.Threading.Tasks;
using HelloCoreClrApp.Data;
using HelloCoreClrApp.WebApi.Messages;
using Serilog;
namespace HelloCoreClrApp.WebApi.Actions
{
public class SayHelloWorldAction : ISayHelloWorldAction
{
private static readonly ILogger Log = Serilog.Log.ForContext<SayHelloWorldAction>();... |
5b516fb5-3da2-484d-9424-3c9d81397eb8 | {
"language": "C#"
} | ```c#
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
... | ```c#
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
... |
45dd4f5d-8320-442b-92a0-f32838e32791 | {
"language": "C#"
} | ```c#
@functions {
private string GetCssClass(string actionName, string controllerName)
{
var currentControllerName = ViewContext.RouteData.Values["controller"].ToString();
var isCurrentController = currentControllerName == controllerName;
if (currentControllerName == "Home")
{... | ```c#
@functions {
private string GetCssClass(string actionName, string controllerName)
{
var currentControllerName = ViewContext.RouteData.Values["controller"].ToString();
var isCurrentController = currentControllerName == controllerName;
if (currentControllerName == "Home")
{... |
b1172701-b700-4057-8c31-6bae12f3ece7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Represents an email notification sent a user, employee, or administrator
/// </summary>
public class EmailNotification : Notification
{
public static String QueueName { get { r... | ```c#
using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Represents an email notification sent a user, employee, or administrator
/// </summary>
public class EmailNotification : Notification
{
public static String QueueName { get { r... |
0d887d57-851b-4cc6-90c5-d267fbbb1d80 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Nimrod
{
public static class AssemblyLocator
{
static ConcurrentDictionary<string, Assembly> ass... | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Nimrod
{
public static class AssemblyLocator
{
static ConcurrentDicti... |
c6c5be1b-6b76-440a-a864-a0d701a81e46 | {
"language": "C#"
} | ```c#
using System.Net;
using System.Configuration;
private static TraceWriter logger;
private static string[] LoadTopics()
{
string TopicsAndExperts = ConfigurationManager.AppSettings["EXPERTS_LIST"].ToString();
logger.Info($"Got TopicsAndExperts: {TopicsAndExperts}");
// split each topic and exp... | ```c#
using System.Net;
using System.Configuration;
private static TraceWriter logger;
/// Extract the topics from the and topics and experts list so there is one master list
/// and topics and experts stay in sync.
private static string[] LoadTopics()
{
string TopicsAndExperts = ConfigurationManager.AppSett... |
74f20ae2-862a-431f-81b4-41fc37843232 | {
"language": "C#"
} | ```c#
using System;
using Xunit;
namespace PagedList.Tests
{
public class PageMetadataTests
{
[Fact]
public void PageNumberIsZero_ArgumentOutOfRangeExceptionIsThrown()
{
Assert.True(false);
// Assert.Throws<ArgumentOutOfRangeException>(() => new PageMetadata(10, ... | ```c#
using System;
using Xunit;
namespace PagedList.Tests
{
public class PageMetadataTests
{
[Fact]
public void PageNumberIsZero_ArgumentOutOfRangeExceptionIsThrown()
{
Assert.Throws<ArgumentOutOfRangeException>(() => new PageMetadata(10, 0, 1));
}
[Fact]
... |
aacac112-170f-44da-99f7-f6a8ec2bf00c | {
"language": "C#"
} | ```c#
// Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.
namespace Narvalo
{
using System;
using Xunit;
public static class HashCodeHelpersFacts
{
[Fact]
public static void Combine2_DoesNotThrow_WhenOverflowed()
... | ```c#
// Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.
namespace Narvalo
{
using System;
using Xunit;
public static class HashCodeHelpersFacts
{
[Fact]
public static void Combine2_DoesNotThrow_WhenMinOverflowed()
... |
d34a8b76-d329-439a-8882-bee059fe81eb | {
"language": "C#"
} | ```c#
// Server.cs
// <copyright file="Server.cs"> This code is protected under the MIT License. </copyright>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Networking
{
/// <summary>
/// A class that acts as a server for a networked game of tron.
/// </sum... | ```c#
// Server.cs
// <copyright file="Server.cs"> This code is protected under the MIT License. </copyright>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace Networking
{
/// <summary>
/// A class that acts as a server... |
b70ecf93-233c-456f-aeda-4bcb856c6b2b | {
"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.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Database;
using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Visual.Nav... | ```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.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Overlays.Notifications;
using osu.Game.Tests.Resources;
namespace osu.Game.Te... |
ca7859d0-b00f-4435-b458-e24ecf7d0d08 | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TestReadModelDatabase.cs">
// Copyright (c) 2015. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license informati... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TestReadModelDatabase.cs">
// Copyright (c) 2015. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license informati... |
e1c48abf-3247-4d95-9415-cb0d2b6e20a9 | {
"language": "C#"
} | ```c#
using EOLib.IO.Map;
namespace EOLib.Domain.Map
{
public class Sign : ISign
{
public string Title { get; private set; }
public string Message { get; private set; }
public Sign(SignMapEntity sign)
{
Title = sign.Title;
Message = sign.Message;
... | ```c#
using EOLib.IO.Map;
using System.Linq;
namespace EOLib.Domain.Map
{
public class Sign : ISign
{
public string Title { get; private set; }
public string Message { get; private set; }
public Sign(SignMapEntity sign)
{
Title = Filter(sign.Title);
Me... |
84f31bb1-ff0a-451a-a620-ff166a2df7c5 | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "Home Page";
ViewBag.ngApp = "MusicStore.Store";
Layout = "/Views/Shared/_Layout.cshtml";
}
@section NavBarItems {
<li app-genre-menu></li>
@*@Html.InlineData("GenreMenuList", "GenresApi")*@
}
<div ng-view></div>
@*@Html.InlineData("MostPopular", "AlbumsApi")*@
@section Scrip... | ```c#
@{
ViewBag.Title = "Home Page";
ViewBag.ngApp = "MusicStore.Store";
Layout = "/Views/Shared/_Layout.cshtml";
}
@section NavBarItems {
<li app-genre-menu></li>
@*@Html.InlineData("GenreMenuList", "GenresApi")*@
}
<div ng-view></div>
@*@Html.InlineData("MostPopular", "AlbumsApi")*@
@section Scrip... |
cf602ac1-cf08-4fdb-8886-3e331ff33f98 | {
"language": "C#"
} | ```c#
using System.Linq;
using Should;
namespace Parsley
{
public class GrammarRuleTests : Grammar
{
public void CanDefineMutuallyRecursiveRules()
{
var tokens = new CharLexer().Tokenize("(A)");
var expression = new GrammarRule<string>();
var alpha = new Gra... | ```c#
using System.Linq;
using Should;
namespace Parsley
{
public class GrammarRuleTests : Grammar
{
public void CanDefineMutuallyRecursiveRules()
{
var tokens = new CharLexer().Tokenize("(A)");
var expression = new GrammarRule<string>();
var alpha = new Gra... |
05673380-4af4-4906-93ce-db69dc296514 | {
"language": "C#"
} | ```c#
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.ViewFeatures;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.Mvc
{
public class AnyRolesAttribute : ActionFilterAttribu... | ```c#
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.ViewFeatures;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.Mvc
{
public class AnyRolesAttribute : ActionFilterAttribu... |
33c4d3f7-4140-49ac-8b39-f4329d742815 | {
"language": "C#"
} | ```c#
@{
Layout = "_Layout";
ViewData["Title"] = "Guild";
}
<div class="row">
<nav class="col-md-3 col-xl-2">
<ul class="nav">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="GuildList" asp-action="Index">Übersicht</a>
</li>
<li class="nav-item">
<a class="nav-lin... | ```c#
@{
Layout = "_Layout";
ViewData["Title"] = "Guild";
}
<div class="row">
<nav class="col-md-3 col-xl-2">
<ul class="nav">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Guild" asp-controller="Stats" asp-action="Index">Statistiken</a>
</li>
<li class="nav-item">
<a class="nav-... |
317e0678-1533-449d-a446-74079f644f71 | {
"language": "C#"
} | ```c#
namespace Line.Messaging
{
/// <summary>
/// Rich menu response object.
/// https://developers.line.me/en/docs/messaging-api/reference/#rich-menu-response-object
/// </summary>
public class ResponseRichMenu : RichMenu
{
/// <summary>
/// Rich menu ID
/// </summary>... | ```c#
namespace Line.Messaging
{
/// <summary>
/// Rich menu response object.
/// https://developers.line.me/en/docs/messaging-api/reference/#rich-menu-response-object
/// </summary>
public class ResponseRichMenu : RichMenu
{
/// <summary>
/// Rich menu ID
/// </summary>... |
cb9ea811-2286-4fde-886b-1e41d3602246 | {
"language": "C#"
} | ```c#
using NQuery.Language.Symbols;
namespace NQuery.Language.VSEditor
{
public sealed class QuickInfoModel
{
private readonly SemanticModel _semanticModel;
private readonly TextSpan _span;
private readonly NQueryGlyph _glyph;
private readonly SymbolMarkup _markup;
pub... | ```c#
using NQuery.Language.Symbols;
namespace NQuery.Language.VSEditor
{
public sealed class QuickInfoModel
{
private readonly SemanticModel _semanticModel;
private readonly TextSpan _span;
private readonly NQueryGlyph _glyph;
private readonly SymbolMarkup _markup;
pub... |
23adba7d-d632-44d4-8930-c357ad6c0618 | {
"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... |
5d849635-65d7-468d-8866-cbb73572f987 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Xwt")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly:... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Xwt")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly:... |
76649bf5-a032-4ed5-9e51-b7a72d39f8a6 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using GitHub.Extensions;
using GitHub.Models;
using GitHub.Services;
using Microsoft.VisualStudio.TeamFoundation.Git.Extensibility;
namespace GitHub.VisualStudio.Base
{
[Export(typeof(IVSGitExt))]
... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using GitHub.Extensions;
using GitHub.Models;
using GitHub.Services;
using Microsoft.VisualStudio.TeamFoundation.Git.Extensibility;
namespace GitHub.VisualStudio.Base
{
[Export(typeof(IVSGitExt))]
... |
9a8ff06d-320c-46db-a3ae-df814b9be4b7 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System.Linq;
using osu.Framework.Input;
using OpenTK.Input;
using osu.Framework.Allocation;
namespace osu.Framework.Graphics.Containers
... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System.Linq;
using osu.Framework.Input;
using OpenTK.Input;
using osu.Framework.Allocation;
namespace osu.Framework.Graphics.Containers
... |
4c2f8a51-a6f7-4d21-b96c-aae072481d46 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VVVV.DX11.Internals.Effects.Pins;
using VVVV.PluginInterfaces.V2;
using SlimDX.Direct3D11;
using VVVV.PluginInterfaces.V1;
using VVVV.Hosting.Pins;
using VVVV.DX11.Lib.Effects.Pins;
using FeralTic.DX11;
namespace VVVV.DX... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VVVV.DX11.Internals.Effects.Pins;
using VVVV.PluginInterfaces.V2;
using SlimDX.Direct3D11;
using VVVV.PluginInterfaces.V1;
using VVVV.Hosting.Pins;
using VVVV.DX11.Lib.Effects.Pins;
using FeralTic.DX11;
namespace VVVV.DX... |
7b5f251b-7491-4195-91ce-66b94d9fe02a | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
using PortableWordPressApi;
using PortableWordPressApi.Resources;
namespace ApiConsole
{
class Program
{
static void Main(string[] args)
{
Task.WaitAll(AsyncMain());
Console.WriteLine("Press any key to close."... | ```c#
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
using PortableWordPressApi;
using PortableWordPressApi.Resources;
namespace ApiConsole
{
class Program
{
static void Main(string[] args)
{
Task.WaitAll(AsyncMain());
Console.W... |
57ebf577-f954-4ad5-b64a-2d6e5c6342a5 | {
"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.Containers;
namespace osu.Framework.Allocation
{
/// <summary>
/// Denotes a component which performs long-runni... | ```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.Containers;
namespace osu.Framework.Allocation
{
/// <summary>
/// Denotes a component which performs long-runni... |
6c2f5142-5d8b-4d97-8ac2-a8a9ed3d81f0 | {
"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.Configuration;
using osu.Framework.Platform;
namespace osu.Game.Tournament.Configuration
{
public class TournamentStorageManager : IniConfi... | ```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.Configuration;
using osu.Framework.Platform;
namespace osu.Game.Tournament.Configuration
{
public class TournamentStorageManager : IniConfi... |
a12aac08-5bf9-48de-b0ea-85b35b99c853 | {
"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 Internal.TypeSystem
{
// Implements canonicalization for arrays
partial class ArrayType
... | ```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 Internal.TypeSystem
{
// Implements canonicalization for arrays
partial class ArrayType
... |
41a2c7f8-2d8c-4b54-a4b6-85cef08691fc | {
"language": "C#"
} | ```c#
using System.Configuration;
namespace NStatsD
{
public class StatsDConfigurationSection : ConfigurationSection
{
[ConfigurationProperty("enabled", DefaultValue = "true", IsRequired = false)]
public bool Enabled
{
get { return (bool) this["enabled"]; }
set ... | ```c#
using System.Configuration;
namespace NStatsD
{
public class StatsDConfigurationSection : ConfigurationSection
{
[ConfigurationProperty("enabled", DefaultValue = "true", IsRequired = false)]
public bool Enabled
{
get { return (bool) this["enabled"]; }
set ... |
3f760c21-9a6b-4e95-9c7f-c1a978d2ea5c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Magecrawl.GameEngine.Actors;
using Magecrawl.Utilities;
namespace Magecrawl.GameEngine.Affects
{
internal class Haste : AffectBase
{
private double m_modifier;
public Haste() : base(... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Magecrawl.GameEngine.Actors;
using Magecrawl.Utilities;
namespace Magecrawl.GameEngine.Affects
{
internal class Haste : AffectBase
{
private double m_modifier;
public Haste() : base(... |
75f7b192-972d-435c-9d35-9db98ba67631 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Sage.Platform;
using Sage.Platform.Orm.Attributes;
using Sage.Platform.Orm.Interfaces;
namespace OpenSlx.Lib.Utility
{
/// <summary>
/// Miscellaneous utilities dealing with S... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Sage.Platform;
using Sage.Platform.Orm.Attributes;
using Sage.Platform.Orm.Interfaces;
using Sage.Platform.Orm.Services;
namespace OpenSlx.Lib.Utility
{
/// <summary>
/// Mis... |
331377ec-ef93-4368-9e4d-2298c997c2b7 | {
"language": "C#"
} | ```c#
using System;
using System.Net;
using System.Text;
using System.Threading;
using xServer.Settings;
namespace xServer.Core.Misc
{
public static class NoIpUpdater
{
private static bool _running;
public static void Start()
{
if (_running) return;
Thread upda... | ```c#
using System;
using System.Net;
using System.Text;
using System.Threading;
using xServer.Settings;
namespace xServer.Core.Misc
{
public static class NoIpUpdater
{
private static bool _running;
public static void Start()
{
if (_running) return;
Thread upda... |
6c3f9f38-050f-483f-975b-47a2e23ce2a7 | {
"language": "C#"
} | ```c#
using revashare_svc_webapi.Logic;
using revashare_svc_webapi.Logic.Models;
using revashare_svc_webapi.Logic.RevaShareServiceReference;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace revashare_svc_webapi.Tests
{
publ... | ```c#
using revashare_svc_webapi.Logic;
using revashare_svc_webapi.Logic.Models;
using revashare_svc_webapi.Logic.RevaShareServiceReference;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace revashare_svc_webapi.Tests
{
publ... |
6ac663f0-a2b8-4d6c-9a47-7c3ebae347b9 | {
"language": "C#"
} | ```c#
using AspNetCore.Security.CAS;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace CookieSample
{
public... | ```c#
using AspNetCore.Security.CAS;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace CookieSample
{
public... |
b105ac21-2331-464c-b5d7-be6ddd72789c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using RedditSharp.Things;
namespace RedditSharp.PowerShell.Cmdlets.Posts
{
/// <summary>
/// <para ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using RedditSharp.Things;
namespace RedditSharp.PowerShell.Cmdlets.Posts
{
/// <summary>
/// <para ... |
58cb188a-2ed7-4c2f-8eba-603a9b16423c | {
"language": "C#"
} | ```c#
using Bam.Core;
namespace boost
{
abstract class GenericBoostModule :
C.StaticLibrary
{
protected GenericBoostModule(
string name)
{
this.Name = name;
}
private string Name
{
get;
set;
}
prote... | ```c#
using Bam.Core;
namespace boost
{
abstract class GenericBoostModule :
C.StaticLibrary
{
protected GenericBoostModule(
string name)
{
this.Name = name;
}
private string Name
{
get;
set;
}
prote... |
76df8805-6dac-4201-8e8c-a5eb3a69643d | {
"language": "C#"
} | ```c#
/*
* ******************************************************************************
* Copyright 2014-2017 Spectra Logic Corporation. 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. A copy of the Lic... | ```c#
/*
* ******************************************************************************
* Copyright 2014-2017 Spectra Logic Corporation. 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. A copy of the Lic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.