doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
3a37905f-9d59-4450-aab5-9c69dc14898f | {
"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.
#nullable disable
using System.Diagnostics;
using System.Globalization;
namespace Microsoft.CodeAnalysis.La... | ```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.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
namespace Microsof... |
19a09408-ddf0-4327-bb7f-27df188a2260 | {
"language": "C#"
} | ```c#
using System;
namespace Cosmos.TestRunner.Core
{
public static class DefaultEngineConfiguration
{
public static void Apply(Engine engine)
{
if (engine == null)
{
throw new ArgumentNullException("engine");
}
engine.AddKerne... | ```c#
using System;
namespace Cosmos.TestRunner.Core
{
public static class DefaultEngineConfiguration
{
public static void Apply(Engine engine)
{
if (engine == null)
{
throw new ArgumentNullException("engine");
}
engine.AddKerne... |
129aa95c-0a7b-4dfe-96da-a46c1ed64cce | {
"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 System.Diagnostics.Contracts;
using System.Text;
namespace System.Globalization
{
public partial class TextInfo
{
//////////////////////////... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics.Contracts;
using System.Text;
namespace System.Globalization
{
public partial class TextInfo
{
//////////////////////////... |
dc31d9da-a1e0-4679-beb4-52d9e4420050 | {
"language": "C#"
} | ```c#
namespace Serilog.Tests.Support
{
public abstract class DummyAbstractClass
{
}
public class DummyConcreteClassWithDefaultConstructor
{
// ReSharper disable once UnusedParameter.Local
public DummyConcreteClassWithDefaultConstructor(string param = "")
{
}
}
... | ```c#
namespace Serilog.Tests.Support
{
public abstract class DummyAbstractClass
{
}
public class DummyConcreteClassWithDefaultConstructor : DummyAbstractClass
{
// ReSharper disable once UnusedParameter.Local
public DummyConcreteClassWithDefaultConstructor(string param = "")
... |
a8275319-aa08-456e-ba8e-2dd688942974 | {
"language": "C#"
} | ```c#
namespace CloudantDotNet.Models
{
public class ToDoItem
{
public string id { get; set; }
public string rev { get; set; }
public string text { get; set; }
}
public class VREntryItem
{
public string id { get; set; }
public string rev { get; set; }
... | ```c#
namespace CloudantDotNet.Models
{
public class ToDoItem
{
public string id { get; set; }
public string rev { get; set; }
public string text { get; set; }
}
public class VREntryItem
{
public string id { get; set; }
public string rev { get; set; }
... |
6b774dd3-05cc-41a1-87fe-0113507c6e9b | {
"language": "C#"
} | ```c#
using System;
using StructureMap;
namespace Reactive.Config.StructureMap
{
public static class ContainerExtensions
{
public static void ReactiveConfig(this ConfigurationExpression config, Action<IReactiveConfigRegistry> action)
{
config.For<IKeyPathProvider>().Use<NamespaceKe... | ```c#
using System;
using StructureMap;
namespace Reactive.Config.StructureMap
{
public static class ContainerExtensions
{
public static void ReactiveConfig(this ConfigurationExpression config, Action<IReactiveConfigRegistry> action)
{
config.Scan(s =>
{
... |
abd4560a-3b78-432d-975b-c78da21ddcda | {
"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.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Cod... | ```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.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Cod... |
f20dfb5a-4b7a-4b17-85d1-30815c102c59 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using FluentMigrator.Infrastructure;
namespace FluentMigrator.Tests.Unit
{
using System.Collections.ObjectModel;
using System.Linq;
using FluentMigrator.Expressions;
using Moq;
[TestFixture]
public class AutoReversingMigrationTests
{
private Mock<IMigra... | ```c#
using NUnit.Framework;
using FluentMigrator.Infrastructure;
namespace FluentMigrator.Tests.Unit
{
using System.Collections.ObjectModel;
using System.Linq;
using FluentMigrator.Expressions;
using Moq;
[TestFixture]
public class AutoReversingMigrationTests
{
private Mock<IMigra... |
ed918f2a-8b41-4b9a-a9e1-718340474453 | {
"language": "C#"
} | ```c#
using Autofac;
using BookSleeve;
using Compilify.Web.Services;
namespace Compilify.Web.Infrastructure.DependencyInjection
{
public class RedisModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.Register(x => RedisConnectionGateway.Curre... | ```c#
using Autofac;
using BookSleeve;
using Compilify.Web.Services;
namespace Compilify.Web.Infrastructure.DependencyInjection
{
public class RedisModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.Register(x => RedisConnectionGateway.Curre... |
e4a09410-e741-4476-bbdd-3449185c2421 | {
"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;
namespace Xunit
{
[Flags]
public enum TargetFrameworkMonikers
{
Net45 = 0x... | ```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;
namespace Xunit
{
[Flags]
public enum TargetFrameworkMonikers
{
Net45 = 0x... |
2e29a775-a6dd-4b38-8ee4-e470f487f7b8 | {
"language": "C#"
} | ```c#
// Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.AdventOfCode.Puzzles
{
using Xunit;
/// <summary>
/// A class containing methods for helping to test... | ```c#
// Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.AdventOfCode.Puzzles
{
using Xunit;
/// <summary>
/// A class containing methods for helping to test ... |
39bec621-1d1c-4186-be5a-67efa0fe5382 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AIController : MonoBehaviour
{
public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding
public Transform target; ... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AIController : MonoBehaviour
{
public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding
public Transform target; ... |
8092acdf-721d-4a49-86cf-d00c4dd09d82 | {
"language": "C#"
} | ```c#
namespace Tanka.Web.Infrastructure
{
using System;
using System.Linq;
using global::Nancy;
using global::Nancy.Responses;
public static class AppHarborCompatibilityExtensions
{
public static void RequiresHttpsOrXProto(this INancyModule module, bool redirect = true)
{
... | ```c#
namespace Tanka.Web.Infrastructure
{
using System;
using System.Linq;
using global::Nancy;
using global::Nancy.Responses;
public static class AppHarborCompatibilityExtensions
{
public static void RequiresHttpsOrXProto(this INancyModule module, bool redirect = true)
{
... |
f583dcac-0a00-4861-8896-d5c705511cb7 | {
"language": "C#"
} | ```c#
// Copyright (c) Timm Krause. All rights reserved. See LICENSE file in the project root for license information.
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AspNet.Identity.OracleProvider")]
[assembly: AssemblyDescription("ASP.... | ```c#
// Copyright (c) Timm Krause. All rights reserved. See LICENSE file in the project root for license information.
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AspNet.Identity.OracleProvider")]
[assembly: AssemblyDescription("ASP.... |
e02c00c8-4aba-4f34-8c6d-86f6a9edf6fc | {
"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... |
3bb8035d-f7ee-4df5-a8bd-e93c9c6335ad | {
"language": "C#"
} | ```c#
using System.Collections;
using PatchKit.Api;
using UnityEngine;
namespace PatchKit.Unity.UI
{
public abstract class UIApiComponent : MonoBehaviour
{
private Coroutine _loadCoroutine;
private bool _isDirty;
private ApiConnection _apiConnection;
public bool LoadOnAwake ... | ```c#
using System.Collections;
using PatchKit.Api;
using UnityEngine;
namespace PatchKit.Unity.UI
{
public abstract class UIApiComponent : MonoBehaviour
{
private Coroutine _loadCoroutine;
private bool _isDirty;
private ApiConnection _apiConnection;
public bool LoadOnStart ... |
c28f7e34-9565-436b-8539-5230ab5cd55a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
namespace Knapcode.TorSharp.Tools.Tor
{
public class TorConfigurationDictionary : IConfigurationDictionary
{
private readonly string _torDirectoryPath;
public TorConfigurationDictionary(string t... | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
namespace Knapcode.TorSharp.Tools.Tor
{
public class TorConfigurationDictionary : IConfigurationDictionary
{
private readonly string _torDirectoryPath;
public TorConfigurationDictionary(string t... |
f51373bd-b422-4384-94a1-001aecc67aa3 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
namespace Telegram.Bot.Helpers
{
/// <summary>
/// Extension Methods
/// </summary>
internal static class Extensions
{
static string En... | ```c#
using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
namespace Telegram.Bot.Helpers
{
/// <summary>
/// Extension Methods
/// </summary>
internal static class Extensions
{
static string En... |
13d3b78c-1e10-47c3-804b-6cc7b517b62e | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Junle Li">
// Copyright (c) Junle Li. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System.Reflection;
using System.R... | ```c#
//-----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Junle Li">
// Copyright (c) Junle Li. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System.Reflection;
using System.R... |
577cd928-255f-4428-8650-a88ee902fcb6 | {
"language": "C#"
} | ```c#
@using System.Web.Mvc.Html
@inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic>
@if (Model.value != null)
{
string value = Model.value.ToString();
var id = Guid.NewGuid().ToString() + "_map";
var js_id = id.Replace('-', '_');
<div class="map gridmaps" id="@id" style="width:100%;"></div>
<sc... | ```c#
@inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic>
@if (Model.value != null)
{
string value = Model.value.ToString();
var id = string.Format("{0}_map", Guid.NewGuid());
<div class="map gridmaps" id="@id" style="width:100%;"></div>
<script type="text/javascript">
function initializeMap() ... |
2106a7f1-7b61-4a77-900d-648b4117904a | {
"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.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using Xunit;
#if AVALONIA_SKIA
namespace Avalon... | ```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.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using Xunit;
#if AVALONIA_SKIA
namespace Avalon... |
f8b4a9dc-96b3-4105-8f48-08aa8bbd0828 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel;
using System.IO;
using System.Net;
namespace TweetLib.Core.Utils{
public static class WebUtils{
private static bool HasMicrosoftBeenBroughtTo2008Yet;
private static void EnsureTLS12(){
if (!HasMicrosoftBeenBroughtTo2008Yet){
... | ```c#
using System;
using System.ComponentModel;
using System.IO;
using System.Net;
namespace TweetLib.Core.Utils{
public static class WebUtils{
private static bool HasMicrosoftBeenBroughtTo2008Yet;
private static void EnsureTLS12(){
if (!HasMicrosoftBeenBroughtTo2008Yet){
... |
8225a8c1-669b-4654-9f87-7c0ecd495bfd | {
"language": "C#"
} | ```c#
@model IEnumerable<Benchmarks.AspNet.Models.Fortune>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fortunes</title>
</head>
<body>
<table>
<tr>
<th>id</th>
<th>message</th>
</tr>
@foreach (var fortune in Model)
{
<tr>
<td>@fortune.ID</td>
<td>@fortune.Message</td>
</tr>
}
<... | ```c#
@model IEnumerable<Benchmarks.AspNet.Models.Fortune>
<!DOCTYPE html>
<html>
<head>
<title>Fortunes</title>
</head>
<body>
<table>
<tr>
<th>id</th>
<th>message</th>
</tr>
@foreach (var fortune in Model)
{
<tr>
<td>@fortune.ID</td>
<td>@fortune.Message</td>
</tr>
}
</table>
</body>
</html>
``... |
b0eed6a6-5592-4fd4-8615-03346298a238 | {
"language": "C#"
} | ```c#
using MQTTnet.Client.Connecting;
using MQTTnet.Exceptions;
namespace MQTTnet.Adapter
{
public class MqttConnectingFailedException : MqttCommunicationException
{
public MqttConnectingFailedException(MqttClientAuthenticateResult resultCode)
: base($"Connecting with MQTT server failed (... | ```c#
using MQTTnet.Client.Connecting;
using MQTTnet.Exceptions;
namespace MQTTnet.Adapter
{
public class MqttConnectingFailedException : MqttCommunicationException
{
public MqttConnectingFailedException(MqttClientAuthenticateResult result)
: base($"Connecting with MQTT server failed ({res... |
9f6e4de9-a7fe-43c9-aff5-8a0cee6c3a49 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using BlogApp.Common.Contracts.Accessors;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using StackExchange.Redis;
namespace BlogApp.Accessors
{
public sealed class BlogCacheAccessor : ICacheAccessor
{
#region Constructor and private... | ```c#
using System;
using System.Threading.Tasks;
using BlogApp.Common.Contracts.Accessors;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using StackExchange.Redis;
namespace BlogApp.Accessors
{
public sealed class BlogCacheAccessor : ICacheAccessor
{
#region Constructor and private... |
db5ca793-4d0a-4346-9030-0a7b85528a07 | {
"language": "C#"
} | ```c#
#if LESSTHAN_NET471 || LESSTHAN_NETCOREAPP20 || LESSTHAN_NETSTANDARD21
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.ComponentModel;
namespace System.Runtime.CompilerServices
{
/// <summary>
/// Res... | ```c#
#if LESSTHAN_NET471 || LESSTHAN_NETCOREAPP20 || LESSTHAN_NETSTANDARD21
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.ComponentModel;
namespace System.Runtime.CompilerServices
{
/// <summary>
/// Res... |
3eacc5f5-b930-4bc0-bd36-a6bdce447473 | {
"language": "C#"
} | ```c#
using Nethereum.Hex.HexConvertors.Extensions;
using Nethereum.Model;
using Nethereum.RPC.Eth.DTOs;
namespace Nethereum.RPC.ModelFactories
{
public class BlockHeaderRPCFactory
{
public static BlockHeader FromRPC(Block rpcBlock)
{
var blockHeader = new BlockHeader();
... | ```c#
using Nethereum.Hex.HexConvertors.Extensions;
using Nethereum.Model;
using Nethereum.RPC.Eth.DTOs;
namespace Nethereum.RPC.ModelFactories
{
public class BlockHeaderRPCFactory
{
public static BlockHeader FromRPC(Block rpcBlock, bool mixHasAndhNonceInSealFields = false)
{
var b... |
dc53148e-78f3-432a-bd77-d895ccb56805 | {
"language": "C#"
} | ```c#
namespace AgileObjects.ReadableExpressions.UnitTests
{
using System;
using System.Linq.Expressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class WhenTranslatingBlockExpressions
{
[TestMethod]
public void ShouldTranslateANoVariableNoReturnVa... | ```c#
namespace AgileObjects.ReadableExpressions.UnitTests
{
using System;
using System.Linq.Expressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class WhenTranslatingBlockExpressions
{
[TestMethod]
public void ShouldTranslateANoVariableBlockWithN... |
67da3460-2d03-4d32-aa76-f5bb5b6971e0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Windows;
using GitHub.Exports;
using GitHub.Services;
using GitHub.ViewModels;
namespace GitHub.Factories
{
/// <summary>
/// Factory for creating views and view models.
/// </sum... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Windows;
using GitHub.Exports;
using GitHub.Services;
using GitHub.ViewModels;
namespace GitHub.Factories
{
/// <summary>
/// Factory for creating views and view models.
/// </sum... |
fce72683-b627-4331-a98f-a86eec368bb0 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
namespace o... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
namespace o... |
fe3e773e-199e-460d-bb01-0354b047ead4 | {
"language": "C#"
} | ```c#
using CommandLine;
namespace Arkivverket.Arkade.CLI
{
public abstract class ArchiveProcessingOptions : OutputOptions
{
[Option('t', "type", HelpText = "Optional. Archive type, valid values: noark3, noark5 or fagsystem")]
public string ArchiveType { get; set; }
[Option('a', "archi... | ```c#
using CommandLine;
namespace Arkivverket.Arkade.CLI
{
public abstract class ArchiveProcessingOptions : OutputOptions
{
[Option('t', "type", HelpText = "Optional. Archive type, valid values: noark3, noark4, noark5 or fagsystem")]
public string ArchiveType { get; set; }
[Option('a'... |
8124560e-ace0-4f55-b8bc-749d90850348 | {
"language": "C#"
} | ```c#
using Umbraco.Core;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
[PropertyEditor(Constants.PropertyEditors.EmailAddressAlias, "Email address", "email", Icon="icon-message")]
public class EmailAddressPropertyEditor : PropertyEditor
{
protected override Pr... | ```c#
using Umbraco.Core;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
[PropertyEditor(Constants.PropertyEditors.EmailAddressAlias, "Email address", "email", IsParameterEditor = true, Icon ="icon-message")]
public class EmailAddressPropertyEditor : PropertyEditor
{
... |
8ddeb8dd-d5b2-4245-9401-b29d13b4b2f7 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Text;
using AsmResolver.DotNet.Bundles;
using AsmResolver.PE.DotNet.Metadata.Strings;
using AsmResolver.PE.DotNet.Metadata.Tables;
using AsmResolver.PE.DotNet.Metadata.Tables.Rows;
using Xunit;
namespace AsmResolver.DotNet.Tests.Bundles
{
public class BundleFileTest
{
... | ```c#
using System.Linq;
using System.Text;
using AsmResolver.DotNet.Bundles;
using AsmResolver.PE.DotNet.Metadata.Strings;
using AsmResolver.PE.DotNet.Metadata.Tables;
using AsmResolver.PE.DotNet.Metadata.Tables.Rows;
using Xunit;
namespace AsmResolver.DotNet.Tests.Bundles
{
public class BundleFileTest
{
... |
aead413e-add9-4196-ac2d-e45ff8caf1c6 | {
"language": "C#"
} | ```c#
@using CkanDotNet.Web.Models.Helpers
<p>As part of an initiative to improve the accessibility, transparency, and
accountability of the Town of Castle Rock, this catalog provides open access to City-managed data.
</p>
@if (SettingsHelper.GetUserVoiceEnabled()) {
<p>We invite you to actively participate in ... | ```c#
@using CkanDotNet.Web.Models.Helpers
<p>As part of an initiative to improve the accessibility, transparency, and
accountability of the Town of Castle Rock, this catalog provides open access to town-managed data.
</p>
@if (SettingsHelper.GetUserVoiceEnabled()) {
<p>We invite you to actively participate in ... |
23b684b1-9f8d-4e98-86d8-9f58c7087dc3 | {
"language": "C#"
} | ```c#
using System.IO;
using System.Reflection;
namespace Tiver.Fowl.Drivers.Configuration
{
public class DriversConfiguration
{
/// <summary>
/// Location for binaries to be saved
/// Defaults to assembly location
/// </summary>
public string DownloadLocation { get; se... | ```c#
using System.IO;
using System.Reflection;
namespace Tiver.Fowl.Drivers.Configuration
{
public class DriversConfiguration
{
/// <summary>
/// Location for binaries to be saved
/// Defaults to assembly location
/// </summary>
public string DownloadLocation { get; se... |
6a42b390-6cd2-4c70-8785-91fb08d7cb39 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Arkivverket.Arkade.Util;
namespace Arkivverket.Arkade.Core.Addml.Definitions
{
public class Separator
{
private static readonly Dictionary<string, string> SpecialSeparators = new Dictionary<string, string>
{
{"CRLF... | ```c#
using System;
using System.Collections.Generic;
using Arkivverket.Arkade.Util;
namespace Arkivverket.Arkade.Core.Addml.Definitions
{
public class Separator
{
private static readonly Dictionary<string, string> SpecialSeparators = new Dictionary<string, string>
{
{"CRLF... |
6bdc5d8a-5711-4bae-92c7-33a1b890343d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace CotcSdk {
/** @cond private */
[Serializable]
public class CotcSettings : ScriptableObject {
public const string AssetPath = "Assets/Resources/CotcSettings.asset";
public static CotcSettings Instance {
get ... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace CotcSdk {
/** @cond private */
[Serializable]
public class CotcSettings : ScriptableObject {
public const string AssetPath = "Assets/Resources/CotcSettings.asset";
public static CotcSettings Instance {
get ... |
28dab0c0-d008-465f-8c7b-e45885508ff9 | {
"language": "C#"
} | ```c#
/*
* Copyright (c) 2018 Håkan Edling
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*
* https://github.com/piranhacms/piranha.core
*
*/
using Microsoft.Extensions.DependencyInjection;
using Piranha;
using Piranha.Local;
public... | ```c#
/*
* Copyright (c) 2018 Håkan Edling
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*
* https://github.com/piranhacms/piranha.core
*
*/
using Microsoft.Extensions.DependencyInjection;
using Piranha;
using Piranha.Lo... |
a3bd1c8e-f7d2-4ca4-ad72-ae4b83711370 | {
"language": "C#"
} | ```c#
using Ganss.XSS;
namespace CollAction.Helpers
{
public static class InputSanitizer
{
public static string Sanitize(string input)
{
var saniziter = new HtmlSanitizer(
allowedTags: new[] { "p", "br", "strong", "em", "i", "u", "a", "ol", "ul", "li" },
... | ```c#
using Ganss.XSS;
namespace CollAction.Helpers
{
public static class InputSanitizer
{
public static string Sanitize(string input)
{
var saniziter = new HtmlSanitizer(
allowedTags: new[] { "p", "br", "strong", "em", "i", "u", "a", "ol", "ul", "li" },
... |
04fb9965-8605-4150-9bf2-ab860d2b76e0 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using Microsoft.VisualStudio.ExtensionsExplorer;
namespace NuGet.Dialog.Providers {
internal class PackagesSearchNode : PackagesTreeNodeBase {
private string _searchText;
private readonly PackagesTreeNodeBase _baseNode;
public PackagesTre... | ```c#
using System;
using System.Linq;
using Microsoft.VisualStudio.ExtensionsExplorer;
namespace NuGet.Dialog.Providers {
internal class PackagesSearchNode : PackagesTreeNodeBase {
private string _searchText;
private readonly PackagesTreeNodeBase _baseNode;
public PackagesTre... |
f0f852f0-f879-4ec2-afe6-19bd5fd7e050 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace OpenOrderFramework.Controllers
{
public class JsonNetResult : JsonResult
{
public override void ExecuteResult(Controlle... | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace OpenOrderFramework.Controllers
{
public class JsonNetResult : JsonResult
{
public override void ExecuteResult(Controlle... |
83ff93f7-59f2-4c91-877e-851485bae95d | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using FluentAssertions;
using Xunit;
using Auth0.Tests.Shared;
namespace Auth0.ManagementApi.IntegrationTests
{
public class StatsTests : TestBase
{
[Fact(Skip = "Inactivity causes these to fail")]
public async Task Test_stats_sequence()
... | ```c#
using System;
using System.Threading.Tasks;
using FluentAssertions;
using Xunit;
using Auth0.Tests.Shared;
using System.Linq;
namespace Auth0.ManagementApi.IntegrationTests
{
public class StatsTests : TestBase
{
[Fact]
public async Task Daily_Stats_Returns_Values()
{
... |
ac8ba619-aaa7-4715-87c5-0a1327607cec | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gibe.DittoProcessors.Processors
{
public class ParentAttribute : TestableDittoProcessorAttribute
{
private readonly uint _parentDepth;
public ParentAttribute(uint parentDepth = 1)... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gibe.DittoProcessors.Processors
{
public class ParentAttribute : TestableDittoProcessorAttribute
{
public override object ProcessValue()
{
return Context.Content.Parent;
}
}
... |
433badd8-14d4-44b3-9a73-4bb49934d38e | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace PublicApiGenerator
{
partial class AttributeFilter
{
private static readonly HashSet<string> RequiredAttributeNames = new HashSet<string>
{
"System.Diagnostics.CodeAnalysis.AllowNullAttribute",
"System.Diagnostics.CodeAna... | ```c#
using System.Collections.Generic;
namespace PublicApiGenerator
{
partial class AttributeFilter
{
private static readonly HashSet<string> RequiredAttributeNames = new HashSet<string>
{
"System.Diagnostics.CodeAnalysis.AllowNullAttribute",
"System.Diagnostics.CodeAna... |
9560967b-75d9-4f4f-985f-287881ef6bbf | {
"language": "C#"
} | ```c#
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Noesis.Javascript.Tests
{
[TestClass]
public class JavascriptFunctionTests
{
private JavascriptContext _context;
[TestInitialize]
public void SetUp()
{
_context = new Ja... | ```c#
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Noesis.Javascript.Tests
{
[TestClass]
public class JavascriptFunctionTests
{
private JavascriptContext _context;
[TestInitialize]
public... |
c31e2995-3d98-4663-b354-11b447e75fb5 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online
{
public class ProductionEndpointConfiguration : EndpointConfiguration
{
public ProductionEndpointConfiguration()
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online
{
public class ProductionEndpointConfiguration : EndpointConfiguration
{
public ProductionEndpointConfiguration()
... |
9b169097-e242-4790-8c56-470dfeb9b7b5 | {
"language": "C#"
} | ```c#
#region License
//
// Copyright (c) 2007-2009, Sean Chambers <schambers80@gmail.com>
//
// 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... | ```c#
#region License
//
// Copyright (c) 2007-2009, Sean Chambers <schambers80@gmail.com>
//
// 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... |
16c4f9f8-f19a-43b3-bfb9-528f2e91abac | {
"language": "C#"
} | ```c#
namespace Cassette.Views
{
#if NET35
public interface IHtmlString
{
string ToHtmlString();
}
public class HtmlString : IHtmlString
{
string _htmlString;
public HtmlString(string htmlString)
{
this._htmlString = htmlString;
}
publi... | ```c#
#if NET35
namespace Cassette.Views
{
public interface IHtmlString
{
string ToHtmlString();
}
public class HtmlString : IHtmlString
{
string _htmlString;
public HtmlString(string htmlString)
{
this._htmlString = htmlString;
}
publi... |
d8ebcbbc-a5a1-45be-9786-1156c60858f9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace SO115App.API.Oracle.Controllers
{
public class MezziController : ApiController
{
// GET: api/Mezzi
public IEnumerable<string> Get()
{
... | ```c#
using SO115App.Persistence.Oracle.Classi;
using SO115App.Persistence.Oracle.Servizi.Mezzi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace SO115App.API.Oracle.Controllers
{
public class MezziController : ApiControll... |
700233c0-fa66-4864-985c-2cf08664caef | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using ExtraLinq;
using FluentAssertions;
using NUnit.Framework;
namespace ExtraLINQ.Tests
{
[TestFixture]
public class ToDictionaryTests
{
[ExpectedException(typeof(ArgumentNullException))]
[Test]
... | ```c#
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using ExtraLinq;
using FluentAssertions;
using NUnit.Framework;
namespace ExtraLINQ.Tests
{
[TestFixture]
public class ToDictionaryTests
{
[ExpectedException(typeof(ArgumentNullException))]
[Test]
... |
16dd3970-de5b-4944-8163-6f4b8eeb1e56 | {
"language": "C#"
} | ```c#
using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.ComponentModelHost;
using GitHub.VisualStudio;
using GitHub.InlineReviews.Services;
namespace GitHub.InlineReviews
{
[PackageRegistration(UseManage... | ```c#
using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.ComponentModelHost;
using GitHub.VisualStudio;
using GitHub.InlineReviews.Services;
namespace GitHub.InlineReviews
{
[PackageRegistration(UseManagedResourcesOnly = true)]
[Guid(Guids.Pull... |
597ddd7f-953e-432e-ba14-b6788282c888 | {
"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.Tracking;
using osu.Game.Configuration;
using osu.Game.Rulesets.Configuration;
using osu.Game.Rulesets.Mania.UI;
namespace osu.G... | ```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.Tracking;
using osu.Game.Configuration;
using osu.Game.Rulesets.Configuration;
using osu.Game.Rulesets.Mania.UI;
namespace osu.G... |
51587c6b-51d1-4246-8dc4-237028274173 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SuikaShakeSparkleSpawner : MonoBehaviour
{
[SerializeField]
private float spanwStartTime = .05f;
[SerializeField]
private float spawnFrequency = .25f;
[SerializeField]
private GameObject sparklePr... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SuikaShakeSparkleSpawner : MonoBehaviour
{
[SerializeField]
private float spanwStartTime = .05f;
[SerializeField]
private float spawnFrequency = .25f;
[SerializeField]
private GameObject sparklePr... |
49bc8749-1ee7-499c-ba1c-5839089bccfc | {
"language": "C#"
} | ```c#
using System;
using Kayak;
using Kayak.Framework;
namespace csharp_github_api.IntegrationTests
{
public abstract class IntegrationTestBase : IDisposable
{
protected readonly KayakServer WebServer = new KayakServer();
protected string BaseUrl = "http://localhost:8080";
protected ... | ```c#
using System;
using System.Linq;
using System.Text;
using Kayak;
using Kayak.Framework;
namespace csharp_github_api.IntegrationTests
{
public abstract class IntegrationTestBase : IDisposable
{
protected readonly KayakServer WebServer = new KayakServer();
protected string BaseUrl = "http:... |
7a191bdc-a1e6-499c-ba66-28f28d604b0d | {
"language": "C#"
} | ```c#
using System;
using System.Configuration;
using System.IO;
using System.Net;
using System.ServiceProcess;
using System.Timers;
using NLog;
namespace ZBuildLightsUpdater
{
public partial class ZBuildLightsUpdaterService : ServiceBase
{
private static readonly Logger Log = LogManager.GetCurrentCla... | ```c#
using System;
using System.Configuration;
using System.Net;
using System.ServiceProcess;
using System.Timers;
using NLog;
namespace ZBuildLightsUpdater
{
public partial class ZBuildLightsUpdaterService : ServiceBase
{
private static readonly Logger Log = LogManager.GetCurrentClassLogger();
... |
2336c4b0-ab51-49c2-8c07-2c22c2dae006 | {
"language": "C#"
} | ```c#
using System.Linq;
using Microsoft.Bot.Connector;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Bot.Builder.Tests
{
[TestClass]
public class ActivityExTests
{
[TestMethod]
public void HasContent_Test()
{
IMessageActivity activity = Dialog... | ```c#
using System.Collections.Generic;
using System.Linq;
using Microsoft.Bot.Connector;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
namespace Microsoft.Bot.Builder.Tests
{
[TestClass]
public class ActivityExTests
{
[TestMethod]
public void HasContent_Test()... |
ccd050fa-7c4b-450e-a960-ea78be0d8daf | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using MonadLib;
namespace ReaderHaskellDocsExample1
{
using Bindings = IDictionary<string, int>;
internal class Program
{
private static void Main()
{
var sampleBindings = new Dictionary<string, int>
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using MonadLib;
namespace ReaderHaskellDocsExample1
{
using Bindings = IDictionary<string, int>;
internal class Program
{
private static void Main()
{
var sampleBindings = new Dictionary<string, int>
... |
92a0544c-9854-4fcf-9295-cb47bfc3fa04 | {
"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... |
eb01f5bb-6122-453c-97fa-199476b36a78 | {
"language": "C#"
} | ```c#
namespace NuGet.Common
{
public class CommandLineRepositoryFactory : PackageRepositoryFactory
{
public static readonly string UserAgent = "NuGet Command Line";
private readonly IConsole _console;
public CommandLineRepositoryFactory(IConsole console)
{
... | ```c#
using System.Windows;
namespace NuGet.Common
{
public class CommandLineRepositoryFactory : PackageRepositoryFactory, IWeakEventListener
{
public static readonly string UserAgent = "NuGet Command Line";
private readonly IConsole _console;
public CommandLineRepository... |
22a2869a-c383-4f77-80d8-2306630f6eff | {
"language": "C#"
} | ```c#
namespace DependencyInjection.Console
{
internal class OddEvenPatternGenerator : IPatternGenerator
{
public Pattern Generate(int width, int height)
{
var generate = new Pattern(width, height);
var squares = generate.Squares;
for (var i = 0; i < squares... | ```c#
namespace DependencyInjection.Console
{
internal class OddEvenPatternGenerator : IPatternGenerator
{
public Pattern Generate(int width, int height)
{
var generate = new Pattern(width, height);
var squares = generate.Squares;
for (var i = 0; i < squares... |
ab37294d-b8a6-42a1-8c49-a7b03560a22f | {
"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.Game.Configuration;
namespace osu.Game.Screens.Play.PlayerSettings
{
public class Inpu... | ```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.Game.Configuration;
using osu.Game.Localisation;
namespace osu.Game.Screens.Play.PlayerSet... |
45748070-230a-43e7-b8b4-66e6ab145ef0 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
namespace SFA.DAS.Reservations.Api.Types
{
public class ReservationAllocationStatusResult
{
public bool AutoReservations { get; set; }
}
}```
Update automatic reservations flag to match what has been implemented | ```c#
namespace SFA.DAS.Reservations.Api.Types
{
public class ReservationAllocationStatusResult
{
public bool CanAutoCreateReservations { get; set; }
}
}``` |
e68a30ed-fafd-489c-99b5-d26905db7d52 | {
"language": "C#"
} | ```c#
using System;
using System.Net;
using System.Net.Http;
namespace Kudu.Client
{
public static class HttpResponseMessageExtensions
{
/// <summary>
/// Determines if the HttpResponse is successful, throws otherwise.
/// </summary>
public static HttpResponseMessage EnsureSucc... | ```c#
using System;
using System.Net;
using System.Net.Http;
namespace Kudu.Client
{
public static class HttpResponseMessageExtensions
{
/// <summary>
/// Determines if the HttpResponse is successful, throws otherwise.
/// </summary>
public static HttpResponseMessage EnsureSucc... |
100c4e3b-8a4f-4359-b239-eb42d4757d17 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics.Contracts;
namespace Cogito
{
public static class ExceptionExtensions
{
/// <summary>
/// Traces the exception to the default trace source as an error.
/// </summary>
/// <param name="self"></param>
public static void Trace... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
namespace Cogito
{
public static class ExceptionExtensions
{
/// <summary>
/// Traces the exception to the default trace source as an error.
/// </summary>
/// <param name="self"></param... |
0812a298-88a7-4c6a-9fbf-5044ed17830c | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... |
ff99202b-7297-4b90-aa34-8289ebbcfe7e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Equality {
public struct StructEqualityComparer<T> : IEqualityComparer<T> where T : struct {
public static StructEqualityComparer<T> Default = new StructEqualityComparer<T>();
public Boolean Equals(T x, T y) => Struct.Equals(ref x, ref y);
public ... | ```c#
using System;
using System.Collections.Generic;
namespace Equality {
public struct StructEqualityComparer<T> : IEqualityComparer<T> where T : struct {
public static StructEqualityComparer<T> Default = new StructEqualityComparer<T>();
public Boolean Equals(T x, T y) => Struct.Equals(ref x, ref y);
public ... |
4ed59627-0326-4c79-9f4b-5a6d4f3234fa | {
"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.IO;
using osu.Framework.IO.Network;
namespace osu.Game.Online.API
{
public abstract class APIDownloadRequest : APIRequest
{
private s... | ```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.IO;
using osu.Framework.IO.Network;
namespace osu.Game.Online.API
{
public abstract class APIDownloadRequest : APIRequest
{
private s... |
45d0fae1-4b18-447a-bdd4-f9b5431885f8 | {
"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.Threading;
using NUnit.Framework;
using osu.Framework.Audio;
namespace osu.Framework.Tests.Audio
{
[TestFixture]
public class AudioCollection... | ```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.Threading;
using NUnit.Framework;
using osu.Framework.Audio;
namespace osu.Framework.Tests.Audio
{
[TestFixture]
public class AudioCollection... |
b2c9efd2-b63a-47b0-b82d-5c0b8a3bea3c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Additio.Configuration
{
public class Node
{
public const string IncludeFolderPath = @"App_Config\Include";
public string FilePath { get; set; }
public string RelativePath => FilePath.Remove(0, FilePath.IndexOf(IncludeFol... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Additio.Configuration
{
[DebuggerDisplay("{RelativePath}")]
public class Node
{
private string Root { get; }
public Node(string root)
{
if (!root.EndsWith("\\"))
r... |
7111199b-9470-429a-9cd3-645997630a0b | {
"language": "C#"
} | ```c#
using System;
using System.IO.Ports;
using MYCroes.ATCommands;
using MYCroes.ATCommands.Forwarding;
namespace SupportManager.Control
{
public class ATHelper : IDisposable
{
private readonly SerialPort serialPort;
public ATHelper(string port)
{
serialPort = new SerialP... | ```c#
using System;
using System.IO.Ports;
using MYCroes.ATCommands;
using MYCroes.ATCommands.Forwarding;
namespace SupportManager.Control
{
public class ATHelper : IDisposable
{
private readonly SerialPort serialPort;
public ATHelper(string portConnectionString)
{
serialPo... |
96fc73aa-0725-4fc8-ab18-e81acdcf108a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace EndlessAges.LauncherService.Controllers
{
/// <summary>
/// Emulated controller ContentManager.aspx from the Endless Ages backend.
/// </summary>
[Rout... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace EndlessAges.LauncherService.Controllers
{
/// <summary>
/// Emulated controller ContentManager.aspx from the Endless Ages backend.
/// </summary>
[Rout... |
f9a89d1c-8d7c-432b-b0d9-8129a5210a14 | {
"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 Markdig.Extensions.Yaml;
using Markdig.Syntax;
using Markdig.Syntax.Inlines;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Containers.... | ```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 Markdig.Extensions.Yaml;
using Markdig.Syntax;
using Markdig.Syntax.Inlines;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Containers.... |
e4c6a076-fe3e-4da5-9f68-4bcf25cbc572 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using System.Web.Mvc;
using System.Web.Routing;
using Zk.Helpers;
namespace Zk.Tests
{
[TestFixture]
public class UrlHelperExtensionTest
{
[Test]
public void UrlHelper_CreatePartialViewName()
{
// ARRANGE
var httpContext = MvcM... | ```c#
using NUnit.Framework;
using System.Web.Mvc;
using System.Web.Routing;
using Zk.Helpers;
namespace Zk.Tests
{
[Ignore]
[TestFixture]
public class UrlHelperExtensionTest
{
[Test]
public void UrlHelper_CreatePartialViewName()
{
// ARRANGE
var httpC... |
7d6394ad-b9df-40a8-abef-b4e1e774cfe9 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Web.Http;
using System.Web.Http.OData;
using NuGet.Lucene.Web.Models;
using NuGet.Lucene.Web.Util;
namespace NuGet.Lucene.Web.Controllers
{
/// <summary>
/// OData provider for Lucene based NuGet package repository.
/// </summary>
public class PackagesODataControl... | ```c#
using System.Linq;
using System.Web.Http;
using System.Web.Http.OData;
using NuGet.Lucene.Web.Models;
using NuGet.Lucene.Web.Util;
namespace NuGet.Lucene.Web.Controllers
{
/// <summary>
/// OData provider for Lucene based NuGet package repository.
/// </summary>
public class PackagesODataControl... |
f98d7fd7-b3d8-425b-af6e-3ebbb74b46d0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
namespace MalApi.IntegrationTests
{
public class GetRecentOnlineUsersTest
{
public void GetRecentOnlineUsers()
{
using (MyAnimeListApi api = new MyAnimeListApi())
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
namespace MalApi.IntegrationTests
{
public class GetRecentOnlineUsersTest
{
[Fact]
public void GetRecentOnlineUsers()
{
using (MyAnimeListApi api = new MyAnimeListApi())... |
2b351513-e94a-4661-a848-538cf39defa4 | {
"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.Diagnostics;
using System.Collections.Generic;
namespace Internal.StackGenerator.D... | ```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.Diagnostics;
using System.Collections.Generic;
namespace Internal.StackGenerator.D... |
136afe36-0da4-4747-bd35-e751aa6f1f09 | {
"language": "C#"
} | ```c#
using MultiMiner.CoinApi.Data;
using MultiMiner.Xgminer.Data;
using Newtonsoft.Json.Linq;
using System.Linq;
namespace MultiMiner.WhatMine.Extensions
{
public static class CoinInformationExtensions
{
public static void PopulateFromJson(this CoinInformation coinInformation, JToken jToken)
... | ```c#
using MultiMiner.CoinApi.Data;
using MultiMiner.Xgminer.Data;
using Newtonsoft.Json.Linq;
using System;
using System.Linq;
namespace MultiMiner.WhatMine.Extensions
{
public static class CoinInformationExtensions
{
public static void PopulateFromJson(this CoinInformation coinInformation, JToken j... |
de9b2ff3-068c-49f7-a2e6-bb1a072de263 | {
"language": "C#"
} | ```c#
using System.Windows.Forms;
using TweetDuck.Core.Controls;
using TweetDuck.Plugins;
using TweetDuck.Resources;
namespace TweetDuck.Core.Notification.Example{
sealed class FormNotificationExample : FormNotificationMain{
public override bool RequiresResize => true;
protected override bool CanD... | ```c#
using System.Windows.Forms;
using TweetDuck.Core.Controls;
using TweetDuck.Plugins;
using TweetDuck.Resources;
namespace TweetDuck.Core.Notification.Example{
sealed class FormNotificationExample : FormNotificationMain{
public override bool RequiresResize => true;
protected override bool CanD... |
4c1694b7-a160-4c3f-820a-8953687c5e9b | {
"language": "C#"
} | ```c#
using System;
using EPiServer.Framework.Localization;
using EPiServer.ServiceLocation;
using EPiServer.Web;
namespace AlloyDemoKit.Business.Channels
{
/// <summary>
/// Base class for all resolution definitions
/// </summary>
public abstract class DisplayResolutionBase : IDisplayResolution
{
... | ```c#
using EPiServer.Framework.Localization;
using EPiServer.ServiceLocation;
using EPiServer.Web;
namespace AlloyDemoKit.Business.Channels
{
/// <summary>
/// Base class for all resolution definitions
/// </summary>
public abstract class DisplayResolutionBase : IDisplayResolution
{
privat... |
80f59c9d-126c-4955-9746-fe70bf57459a | {
"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.Collections.Generic;
using Xunit;
namespace System.Collections.Tests
{
public class Interna... | ```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.Collections.Generic;
using Xunit;
namespace System.Collections.Tests
{
public class Interna... |
ad2ac233-5a50-4c21-93c6-79358810a19a | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Modules
{
using Enums;
using Objects.Basic;
using Requests;
using Requests.WithoutOAuth.Search;
using System.Threading.Tasks;
public class TraktSearchModule : TraktBaseModule
{
public TraktSearchModule(TraktClient client) : base(client) { }
pu... | ```c#
namespace TraktApiSharp.Modules
{
using Enums;
using Objects.Basic;
using Requests;
using Requests.WithoutOAuth.Search;
using System;
using System.Threading.Tasks;
public class TraktSearchModule : TraktBaseModule
{
public TraktSearchModule(TraktClient client) : base(clien... |
269cd2ba-0c78-408d-af1c-33927253141e | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
namespace osu.Game.Storyboards
{
public class CommandLoop : CommandTimelineGroup
{
public double LoopS... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
namespace osu.Game.Storyboards
{
public class CommandLoop : CommandTimelineGroup
{
public double LoopS... |
b5ea402c-5cac-4594-9bf5-31408a0429d0 | {
"language": "C#"
} | ```c#
using Windows.UI.Xaml;
namespace TestAppUWP.Samples.InterControlAnimation
{
public sealed partial class InterControlAnimation
{
private static Control2 _control2;
private static Control1 _control1;
public InterControlAnimation()
{
InitializeComponent();
... | ```c#
using Windows.UI.Xaml;
namespace TestAppUWP.Samples.InterControlAnimation
{
public sealed partial class InterControlAnimation
{
private static Control2 _control2;
private static Control1 _control1;
public InterControlAnimation()
{
InitializeComponent();
... |
cf136472-1061-4141-94ff-b9dd74a986f2 | {
"language": "C#"
} | ```c#
using TicTacToe.Core.Enums;
namespace TicTacToe.Web.ViewModels
{
public class TurnResultViewModel
{
public string Status { get; set; }
public string ErrorText { get; set; }
public bool IsGameDone { get; set; }
public PlayerCode Winner { get; set; }
public byte Opp... | ```c#
using TicTacToe.Core.Enums;
namespace TicTacToe.Web.ViewModels
{
public class TurnResultViewModel
{
public string status { get; set; }
public string errorText { get; set; }
public bool isGameDone { get; set; }
public PlayerCode winner { get; set; }
public int oppo... |
ae98d039-60ff-4e3f-8c0c-8268986d910b | {
"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;
namespace osu.Game.Rulesets.Taiko.Skinning
{
public class LegacyHitExplosion : Composite... | ```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.Containers;
namespace osu.Game.Rulesets.Taiko.Skinning
{
public clas... |
4c3dbad1-f25d-4d5e-8540-b8bb1782f1bf | {
"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 Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Te... | ```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 Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text... |
2c822c59-ead5-479f-b93a-82eaedd91b2b | {
"language": "C#"
} | ```c#
namespace MusicXml.Domain
{
public class Note
{
internal Note()
{
Type = string.Empty;
Duration = -1;
Voice = -1;
Staff = -1;
IsChordTone = false;
}
public string Type { get; internal set; }
public int Voice { get; internal set; }
public int Duration { get; internal set; }
pub... | ```c#
namespace MusicXml.Domain
{
public class Note
{
internal Note()
{
Type = string.Empty;
Duration = -1;
Voice = -1;
Staff = -1;
IsChordTone = false;
Lyric = new Lyric();
Pitch = new Pitch();
}
public string Type { get; internal set; }
public int Voice { get; internal set; }
p... |
ae5808e5-f4fd-4376-865d-32877164d53d | {
"language": "C#"
} | ```c#
using Oxide.Core.Libraries;
namespace Oxide.Game.Rust.Libraries
{
public class Server : Library
{
#region Chat and Commands
/// <summary>
/// Broadcasts a chat message to all players
/// </summary>
/// <param name="message"></param>
/// <param name="userI... | ```c#
using Oxide.Core.Libraries;
namespace Oxide.Game.Rust.Libraries
{
public class Server : Library
{
#region Chat and Commands
/// <summary>
/// Broadcasts a chat message to all players
/// </summary>
/// <param name="message"></param>
/// <param name="userI... |
1b076b02-e470-4c4e-936c-a8e6bbfb1000 | {
"language": "C#"
} | ```c#
@model CompetitionPlatform.Models.ProjectViewModels.AddResultViewModel
@*<form asp-controller="ProjectDetails" asp-action="SaveResult" enctype="multipart/form-data">
<div class="form-group col-md-10">
<input asp-for="@Model.ProjectId" type="hidden"/>
<input asp-for="@Model.Partici... | ```c#
@model CompetitionPlatform.Models.ProjectViewModels.AddResultViewModel
<br />
<br />
<br />
<section class="section section--competition_edit">
<div class="container">
<div class="content__left">
<form asp-controller="ProjectDetails" asp-action="SaveResult" enctype="multipart/form-data" c... |
ca7e5a81-1b54-4206-80d1-29177a824e56 | {
"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.Diagnostics.CodeAnalysis;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// Extensions that apply to all objects.
//... | ```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.Diagnostics.CodeAnalysis;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// Extensions that apply to all objects.
//... |
36cbdb3a-9a99-43a7-b875-8857d3a0deeb | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.CommonServiceLocator")]
[assembly: AssemblyDescription("Autofac Adapter for the Microsoft CommonServiceLocator")]
```
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the ... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Autofac.Extras.CommonServiceLocator")]
``` |
765c74fb-9774-4757-a80e-c865402565d3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace GitVersion.Helpers
{
internal class OperationWithExponentialBackoff<T> where T : Exception
{
private IThreadSleep ThreadSleep;
private Action Operation;
private int MaxRetries;
public OperationWithExponentialBacko... | ```c#
using System;
using System.Collections.Generic;
namespace GitVersion.Helpers
{
internal class OperationWithExponentialBackoff<T> where T : Exception
{
private IThreadSleep ThreadSleep;
private Action Operation;
private int MaxRetries;
public OperationWithExponentialBacko... |
485a7d66-f0dd-45bb-890a-2cf764d4db94 | {
"language": "C#"
} | ```c#
@model IEnumerable<Models.Person>
@{
ViewBag.Title = "_FilterResults";
}
<style>
table, tr, th, td {
padding: 7px;
border: 1px solid grey;
}
</style>
<table>
<tr>
<th>Volunteer Name</th>
<th>Email</th>
<th>Phone</th>
<th>Cluster</... | ```c#
@model IEnumerable<Models.Person>
@{
ViewBag.Title = "_FilterResults";
}
<style>
table, tr, th, td {
padding: 7px;
border: 1px solid grey;
}
</style>
<table>
<tr>
<th>Volunteer Name</th>
<th>Email</th>
<th>Phone</th>
<th>Clust... |
d27e0ac9-3a87-4ae8-ab89-795af371c525 | {
"language": "C#"
} | ```c#
namespace Microsoft.Framework.DependencyInjection.Test
{
using Microsoft.ApplicationInsights.AspNetCore;
using Microsoft.ApplicationInsights.Extensibility;
using Xunit;
public static class ApplicationInsightsJavaScriptTest
{
[Fact]
public static void SnippetWillBeEmptyWhenIns... | ```c#
namespace Microsoft.Framework.DependencyInjection.Test
{
using Microsoft.ApplicationInsights.AspNetCore;
using Microsoft.ApplicationInsights.Extensibility;
using Xunit;
public static class ApplicationInsightsJavaScriptTest
{
[Fact]
public static void SnippetWillBeEmptyWhenIns... |
9fb00eff-c082-4bb5-a65b-f629e8ccb4d4 | {
"language": "C#"
} | ```c#
namespace Vaskelista.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class RoomHouseholdRelation : DbMigration
{
public override void Up()
{
AddColumn("dbo.Rooms", "HouseHold_HouseholdId", c => c.Int(nullable: false));
... | ```c#
namespace Vaskelista.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class RoomHouseholdRelation : DbMigration
{
public override void Up()
{
Sql("TRUNCATE TABLE dbo.Rooms");
AddColumn("dbo.Rooms", "HouseHold_HouseholdId", ... |
ec75fd4a-9662-4c9a-9862-2b24147a2f8a | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
namespace Alice
{
public class BenchResult
{
public BenchResult(string name, List<long> ticks)
{
Name = name;
_ticks = ticks;
Mean = _ticks.Sum() / _ticks.Count;
Median = _ti... | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
namespace Alice
{
public class BenchResult
{
public BenchResult(string name, List<long> ticks)
{
Name = name;
_ticks = ticks;
_ticks.Sort();
Mean = _ticks.Sum() / _ticks.Coun... |
ee1fda23-2fbb-4362-a473-5ce531e0ff41 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace elbgb_core
{
public abstract class ClockedComponent
{
protected GameBoy _gb;
protected ulong _lastUpdate;
public ClockedComponent(GameBoy gameBoy)
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace elbgb_core
{
public abstract class ClockedComponent
{
protected GameBoy _gb;
private SystemClock _clock;
protected ulong _lastUpdate;
public Cloc... |
fc277241-dcc3-4044-a7b2-0502b1c67f01 | {
"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: AssemblyTitl... |
4964f2fc-955c-4aa8-ae83-37b8e08ef151 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
public class MattBobke : IAmACommunityMember, IFilterMyBlogPosts
{
public string FirstName => "Matt";
public string LastName => "Bobke";
publi... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class MattBobke : IAmACommunityMember, IFilterMyBlogPosts
{
public string FirstName => "Matt";
public stri... |
11b605e1-fc0e-4b43-82a9-68df861475e8 | {
"language": "C#"
} | ```c#
@{
ViewBag.PageID = "page-change-email-address";
ViewBag.Title = "Change your email address";
}
@if (!Model.Valid)
{
<div class="error-summary" role="group" tabindex="-1">
<h1 class="heading-medium error-summary-heading" id="error-summary-heading"> Errors to fix </h1>
<p>Che... | ```c#
@model SFA.DAS.EmployerUsers.Web.Models.ChangeEmailViewModel
@{
ViewBag.PageID = "page-change-email-address";
ViewBag.Title = "Change your email address";
}
@if (!Model.Valid)
{
<div class="error-summary" role="group" tabindex="-1">
<h1 class="heading-medium error-summary-headin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.