doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
cbd322b0-58cc-44e4-9b4a-e21619ceb06b | {
"language": "C#"
} | ```c#
using Umbraco.Core;
using Umbraco.Core.Components;
namespace Umbraco.Web.Routing
{
/// <summary>
/// Implements an Application Event Handler for managing redirect urls tracking.
/// </summary>
/// <remarks>
/// <para>when content is renamed or moved, we want to create a permanent 301 redirec... | ```c#
using Umbraco.Core;
using Umbraco.Core.Components;
namespace Umbraco.Web.Routing
{
/// <summary>
/// Implements an Application Event Handler for managing redirect urls tracking.
/// </summary>
/// <remarks>
/// <para>when content is renamed or moved, we want to create a permanent 301 redirec... |
1bdc12e0-095e-4490-a735-670178af8751 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Drawing;
using PdfSharp.Pdf.Advanced;
// ReSharper disable once CheckNamespace
namespace PdfSharp.Pdf
{
/// <summary>
/// Extension methods for the PdfSharp library PdfItem object.
/// </summary>
public static class PdfPageExtensions
{
/... | ```c#
using System;
using System.Collections.Generic;
using System.Drawing;
using PdfSharp.Pdf.Advanced;
// ReSharper disable once CheckNamespace
namespace PdfSharp.Pdf
{
/// <summary>
/// Extension methods for the PdfSharp library PdfItem object.
/// </summary>
public static class PdfPageExtensions
{
/... |
5bdc4a43-2217-4953-88d8-187818011c24 | {
"language": "C#"
} | ```c#
@model Portal.CMS.Web.Areas.Admin.ViewModels.Dashboard.QuickAccessViewModel
<div class="page-admin-wrapper admin-wrapper">
@foreach (var category in Model.Categories)
{
<a href="@category.Link" class="button @category.CssClass @(category.LaunchModal ? "launch-modal" : "")" data-toggle="popover" ... | ```c#
@model Portal.CMS.Web.Areas.Admin.ViewModels.Dashboard.QuickAccessViewModel
<div class="page-admin-wrapper admin-wrapper animated zoomInUp">
@foreach (var category in Model.Categories)
{
<a href="@category.Link" class="button @category.CssClass @(category.LaunchModal ? "launch-modal" : "")" data... |
3468c2ed-4454-431b-bb75-860994f55bb1 | {
"language": "C#"
} | ```c#
using System;
using MyTrips.DataObjects;
using MyTrips.DataStore.Abstractions;
using System.Threading.Tasks;
using MyTrips.Utils;
using System.Collections.Generic;
namespace MyTrips.DataStore.Azure.Stores
{
public class TripStore : BaseStore<Trip>, ITripStore
{
IPhotoStore photoStore;
pu... | ```c#
using System;
using MyTrips.DataObjects;
using MyTrips.DataStore.Abstractions;
using System.Threading.Tasks;
using MyTrips.Utils;
using System.Collections.Generic;
using System.Linq;
namespace MyTrips.DataStore.Azure.Stores
{
public class TripStore : BaseStore<Trip>, ITripStore
{
IPhotoStore pho... |
b4353bac-52ed-4658-8b32-2abe1361160e | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
namespace NuGet.VisualStudio {
public static class AggregatePackageSource {
public static readonly PackageSource Instance = new PackageSource("(Aggregate source)", Resources.VsResources.AggregateSourceName);
public static bool IsAg... | ```c#
using System.Collections.Generic;
using System.Linq;
namespace NuGet.VisualStudio {
public static class AggregatePackageSource {
public static readonly PackageSource Instance = new PackageSource("(Aggregate source)", Resources.VsResources.AggregateSourceName);
public static bool IsAg... |
5fa58cad-3058-45fa-a53d-d918f2fba82b | {
"language": "C#"
} | ```c#
using static System.Console;
using System.Linq;
using CIV.Ccs;
using CIV.Hml;
namespace CIV
{
class Program
{
static void Main(string[] args)
{
var text = System.IO.File.ReadAllText(args[0]);
var processes = CcsFacade.ParseAll(text);
var hmlText = "[[ack]][[ack]... | ```c#
using static System.Console;
using CIV.Ccs;
using CIV.Interfaces;
namespace CIV
{
class Program
{
static void Main(string[] args)
{
var text = System.IO.File.ReadAllText(args[0]);
var processes = CcsFacade.ParseAll(text);
var trace = CcsFacade.RandomTrace(proce... |
216a6407-7ab9-4cc1-9328-1812ceb87bde | {
"language": "C#"
} | ```c#
using EOBot.Interpreter.Extensions;
using System.Collections.Generic;
using System.Linq;
namespace EOBot.Interpreter.States
{
public class StatementEvaluator : IScriptEvaluator
{
private readonly IEnumerable<IScriptEvaluator> _evaluators;
public StatementEvaluator(IEnumerable<IScriptEva... | ```c#
using EOBot.Interpreter.Extensions;
using System.Collections.Generic;
using System.Linq;
namespace EOBot.Interpreter.States
{
public class StatementEvaluator : IScriptEvaluator
{
private readonly IEnumerable<IScriptEvaluator> _evaluators;
public StatementEvaluator(IEnumerable<IScriptEva... |
affd9dc6-f3a5-468b-9704-192f0850e8e8 | {
"language": "C#"
} | ```c#
namespace Sharpy.Core {
/// <summary>
/// <para>Represent a generator which can generate any amount of elements by invoking method <see cref="Generate" />.</para>
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IGenerator<out T> {
/// <summary>
/// ... | ```c#
namespace Sharpy.Core {
/// <summary>
/// <para>Represent a generator which can generate any amount of elements by invoking method <see cref="Generate" />.</para>
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IGenerator<out T> {
/// <summary>
/// ... |
e2304e43-fb02-45b6-a20b-8edde68ef146 | {
"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.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
namespace osu.Game.Scre... | ```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.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
namespace osu.Game.Scre... |
a3a18567-9dca-4446-8cb0-5d319c34b725 | {
"language": "C#"
} | ```c#
using System.Configuration;
namespace SchemaZen.test {
public class ConfigHelper {
public static string TestDB {
get { return ConfigurationManager.AppSettings["testdb"]; }
}
public static string TestSchemaDir {
get { return ConfigurationManager.AppSettings["test_schema_dir"]; }
}
public stati... | ```c#
using System;
using System.Configuration;
namespace SchemaZen.test {
public class ConfigHelper {
public static string TestDB {
get { return GetSetting("testdb"); }
}
public static string TestSchemaDir {
get { return GetSetting("test_schema_dir"); }
}
public static string SqlDbDiffPath {
ge... |
19735692-650d-4a36-8f21-b7f41563635a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using MiX.Integrate.Shared.Entities.Communications;
namespace MiX.Integrate.Shared.Entities.Messages
{
public class SendJobMessageCarrier
{
public SendJobMessageCarrier() { }
public short VehicleId { get; set; }
public string Descriptio... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using MiX.Integrate.Shared.Entities.Communications;
namespace MiX.Integrate.Shared.Entities.Messages
{
public class SendJobMessageCarrier
{
public SendJobMessageCarrier() { }
public short VehicleId { get; set; }
public string Descriptio... |
25ad385e-edad-4b9c-aa8c-4d6eba9f782e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SpotiPeek.App
{
class TrackModel
{
public string SongTitle;
public string ArtistName;
public string AlbumTitle;
public string AlbumYear;
}
}
`... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SpotiPeek.App
{
class TrackModel
{
public string SongTitle;
public string ArtistName;
public string AlbumTitle;
}
}
``` |
f7dd0f55-3ee3-4212-9282-992ea8bfcfb0 | {
"language": "C#"
} | ```c#
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
namespace osu.Game.GameModes.Play
{
public enum PlayMode
{
[Description(@"osu!")]
Osu = 0,
... | ```c#
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
namespace osu.Game.GameModes.Play
{
public enum PlayMode
{
[Description(@"osu!")]
Osu = 0,
... |
09f2bdd3-8af0-4e90-90e5-beadf133df30 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Giles.Core.Runners;
using Giles.Core.Utility;
using NUnit.Core;
using NUnit.Core.Filters;
namespace Giles.Runner.NUnit
{
public class NUnitRunner : IFrameworkRunner
{
IEnumerable<string>... | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Giles.Core.Runners;
using NUnit.Core;
using NUnit.Core.Filters;
namespace Giles.Runner.NUnit
{
public class NUnitRunner : IFrameworkRunner
{
IEnumerable<string> filters;
public SessionResults... |
aa5d6d1b-aa27-41e4-a25c-3a4702c26dbf | {
"language": "C#"
} | ```c#
using System.Text;
using dot10.IO;
namespace dot10.dotNET {
/// <summary>
/// Represents the #Strings stream
/// </summary>
public class StringsStream : DotNetStream {
/// <inheritdoc/>
public StringsStream(IImageStream imageStream, StreamHeader streamHeader)
: base(imageStream, streamHeader) {
}
... | ```c#
using System.Text;
using dot10.IO;
namespace dot10.dotNET {
/// <summary>
/// Represents the #Strings stream
/// </summary>
public class StringsStream : DotNetStream {
/// <inheritdoc/>
public StringsStream(IImageStream imageStream, StreamHeader streamHeader)
: base(imageStream, streamHeader) {
}
... |
8fa7e633-59e7-4a39-8c78-635d1abb7684 | {
"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.Multiplayer
{
public enum RoomCategory
{
Normal,
Spotlight
}
}
```
Add realtime to room categories | ```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.Multiplayer
{
public enum RoomCategory
{
Normal,
Spotlight,
Realtime,
}
}
``` |
01d167cf-abd5-403d-90f6-a2bdf2a3a506 | {
"language": "C#"
} | ```c#
using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return (float)Wid... | ```c#
using System;
namespace Satrabel.OpenContent.Components.TemplateHelpers
{
public class Ratio
{
private readonly float _ratio;
public int Width { get; private set; }
public int Height { get; private set; }
public float AsFloat
{
get { return (float)Wid... |
65c5b04b-3928-4471-a6c4-6d2a7c545d21 | {
"language": "C#"
} | ```c#
using System;
namespace Stratis.Bitcoin.Features.Wallet
{
/// <summary>
/// An indicator on how fast a transaction will be accepted in a block
/// </summary>
public enum FeeType
{
/// <summary>
/// Slow.
/// </summary>
Low = 0,
/// <summary>
/... | ```c#
using System;
namespace Stratis.Bitcoin.Features.Wallet
{
/// <summary>
/// An indicator of how fast a transaction will be accepted in a block.
/// </summary>
public enum FeeType
{
/// <summary>
/// Slow.
/// </summary>
Low = 0,
/// <summary>
... |
a17aa93c-e4c1-45d3-a100-3653152bb43d | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Infusion.EngineScripts
{
public sealed class ScriptEngine
{
private readonly IScriptEngine[] engines;
private string scriptRootPath;
public ScriptEngine(params IScriptEngine[] engines)
{
... | ```c#
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Infusion.EngineScripts
{
public sealed class ScriptEngine
{
private readonly IScriptEngine[] engines;
private string scriptRootPath;
public ScriptEngine(params IScriptEngine[] engines)... |
cfeb894f-bee4-4402-b026-4a709a22b786 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace LazyLibrary.Storage.Memory
{
internal class MemoryRepository<T> : IRepository<T> where T : IStorable
{
private List<T> repository = new List<T>();
public T GetById(int id)
{
... | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace LazyLibrary.Storage.Memory
{
internal class MemoryRepository<T> : IRepository<T> where T : IStorable
{
private List<T> repository = new List<T>();
public T GetById(int id)
{
... |
9e25b5fa-bbc2-4f3d-85d1-0f7fc054bb6f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Threading;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Diagnostics;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.Storage;
using Microsoft.Experime... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Threading;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Diagnostics;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.Storage;
using Microsoft.Experime... |
50a83e82-c7f3-4418-97fa-52da78aa18b0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Oberon0.Compiler.Definitions;
using Oberon0.Compiler.Solver;
namespace Oberon0.Compiler.Expressions.Arithmetic
{
[Export(typeof(ICalculatable))]
... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Oberon0.Compiler.Definitions;
using Oberon0.Compiler.Solver;
namespace Oberon0.Compiler.Expressions.Arithmetic
{
[Export(typeof(ICalculatable))]
... |
559e70a1-949b-482c-8505-35ef41f657cb | {
"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 BenchmarkDotNet.Attributes;
using osu.Framework.Bindables;
namespace osu.Framework.Benchmarks
{
public class BenchmarkBindableInstantiation... | ```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 BenchmarkDotNet.Attributes;
using osu.Framework.Bindables;
namespace osu.Framework.Benchmarks
{
[MemoryDiagnoser]
public class Benchmar... |
eb806250-9743-4bf9-a402-ea8cfe2fc034 | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Linq;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
usin... | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Linq;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
usin... |
1a4f50e1-65a5-4523-bb44-7836ca8f68a1 | {
"language": "C#"
} | ```c#
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
public class PublishWindow : EditorWindow
{
private const string PublishTitle = "Publish this repository to GitHub";
private string repoName = "";
private string repoDescription = "";
private bool togglePrivat... | ```c#
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
public class PublishWindow : EditorWindow
{
private const string PublishTitle = "Publish this repository to GitHub";
private string repoName = "";
private string repoDescription = "";
private int selectedOrg =... |
98976a9e-1a15-4bf1-894e-bef0416bce48 | {
"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.Allocation;
using osu.Framework.Testing;
using osu.Game.Tournament.Components;
using osu.Game.Tourname... | ```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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Tournament.Compo... |
c3e1a66e-de34-4537-9e64-632584641392 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text;
using Calamari.Deployment;
using Calamari.Integration.FileSystem;
using Octostache;
namespace Calamari.Integration.Substitutions
{
public class FileSubstituter : IFileSubstituter
{
readonly ICalamariFileSystem fileSystem;
public FileSubs... | ```c#
using System;
using System.IO;
using System.Text;
using Calamari.Deployment;
using Calamari.Integration.FileSystem;
using Octostache;
namespace Calamari.Integration.Substitutions
{
public class FileSubstituter : IFileSubstituter
{
readonly ICalamariFileSystem fileSystem;
public FileSubs... |
162bdd90-e751-403d-889d-69368c53808c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using NQuery.Binding;
namespace NQuery.Optimization
{
internal static class Condition
{
public static BoundExpression And(BoundExpression left, BoundExpression right)
{
if (left == null)
retur... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using NQuery.Binding;
namespace NQuery.Optimization
{
internal static class Condition
{
public static BoundExpression And(BoundExpression left, BoundExpression right)
{
if (left == null)
retur... |
67c07207-7834-414b-826d-24772af11dc0 | {
"language": "C#"
} | ```c#
using Cirrious.CrossCore.Core;
using System;
using System.Threading.Tasks;
namespace codestuffers.MvvmCrossPlugins.UserInteraction
{
/// <summary>
/// Helper class that executes a task with a progress bar
/// </summary>
public class ProgressHelper
{
private readonly IMvxMainThreadDis... | ```c#
using Cirrious.CrossCore.Core;
using System;
using System.Threading.Tasks;
namespace codestuffers.MvvmCrossPlugins.UserInteraction
{
/// <summary>
/// Helper class that executes a task with a progress bar
/// </summary>
public class ProgressHelper
{
private readonly IMvxMainThreadDis... |
e8a7f601-2a4b-49ac-8cd8-b9d4c521591a | {
"language": "C#"
} | ```c#
#region
using System.Windows;
using SteamAccountSwitcher.Properties;
#endregion
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for Options.xaml
/// </summary>
public partial class Options : Window
{
public Options()
{
InitializeComponen... | ```c#
#region
using System.Windows;
using SteamAccountSwitcher.Properties;
#endregion
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for Options.xaml
/// </summary>
public partial class Options : Window
{
public Options()
{
InitializeComponen... |
a67b92a8-2752-46dc-87dd-22f096e780cb | {
"language": "C#"
} | ```c#
using GeneratorAPI;
using NUnit.Framework;
using NUnit.Framework.Internal;
namespace Tests.GeneratorAPI {
[TestFixture]
internal class GeneratorTests {
[SetUp]
public void Initiate() {
_generator = new Generator<Randomizer>(new Randomizer(Seed));
}
[TearDown]... | ```c#
using System;
using GeneratorAPI;
using NUnit.Framework;
using NUnit.Framework.Internal;
namespace Tests.GeneratorAPI {
[TestFixture]
internal class GeneratorTests {
[SetUp]
public void Initiate() {
_generator = new Generator<Randomizer>(new Randomizer(Seed));
}
... |
6c2ad6a4-606f-4b45-b14c-31cf40e534a9 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using Glimpse.Server.Internal;
using Glimpse.Internal.Extensions;
using Microsoft.AspNet.Http;
using Microsoft.Extensions.OptionsModel;
namespace Glimpse.Server.Configuration
{
public class DefaultMetadataProvider : IMetadataProvider
{
private... | ```c#
using System.Collections.Generic;
using System.Linq;
using Glimpse.Server.Internal;
using Glimpse.Internal.Extensions;
using Microsoft.AspNet.Http;
using Microsoft.Extensions.OptionsModel;
namespace Glimpse.Server.Configuration
{
public class DefaultMetadataProvider : IMetadataProvider
{
private... |
14f649e4-6eb8-4e25-9dc4-fea05a1d3023 | {
"language": "C#"
} | ```c#
using Xunit;
using Unity.SolrNetCloudIntegration;
using Unity;
namespace SolrNet.Cloud.Tests
{
public class UnityTests
{
private IUnityContainer Setup() {
return new SolrNetContainerConfiguration().ConfigureContainer(
new FakeProvider(),
new UnityConta... | ```c#
using Xunit;
using Unity.SolrNetCloudIntegration;
using Unity;
namespace SolrNet.Cloud.Tests
{
public class UnityTests
{
private IUnityContainer Setup() {
return new SolrNetContainerConfiguration().ConfigureContainer(
new FakeProvider(),
new UnityConta... |
4ddbd714-1dba-481c-807d-b96c54e93312 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using VersionOne.SDK.APIClient;
namespace VersionOne.ServerConnector {
// TODO extract interface and inject into VersionOneProcessor
internal class EntityFactory {
private readonly IMetaModel metaModel;
private readonly I... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using VersionOne.SDK.APIClient;
namespace VersionOne.ServerConnector {
// TODO extract interface and inject into VersionOneProcessor
internal class EntityFactory {
private readonly IServices services;
private readonly IEn... |
02808cf0-a3b4-4f39-b4fb-69ad9ec2b62f | {
"language": "C#"
} | ```c#
// <copyright file="AssemblyInfoCommon.cs" company="natsnudasoft">
// Copyright (c) Adrian John Dunstan. 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
//
// ... | ```c#
// <copyright file="AssemblyInfoCommon.cs" company="natsnudasoft">
// Copyright (c) Adrian John Dunstan. 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
//
// ... |
1990ec0b-0f70-4c56-9aa5-1ac98386a7c0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
namespace Battlezeppelins.Models
{
public class ZeppelinType
{
public static readonly ZeppelinType MOTHER = new ZeppelinType("Mother", 5);
public static readonly Zeppeli... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
namespace Battlezeppelins.Models
{
public class ZeppelinType
{
public static readonly ZeppelinType MOTHER = new ZeppelinType("Mother", 5);
public static readonly Zeppeli... |
58127b71-33f2-435d-bfae-6e1f6f79c478 | {
"language": "C#"
} | ```c#
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Windows.Forms;
using CefSharp.Inte... | ```c#
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using CefSharp.Internals;
namespace CefSharp... |
3d91e3fd-3eb2-4d8b-a7df-b237ce879143 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Luval.Common
{
public class ConsoleArguments
{
private List<string> _args;
public ConsoleArguments(IEnumerable<string> args)
{
_args = new Li... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Luval.Common
{
public class ConsoleArguments
{
private List<string> _args;
public ConsoleArguments(IEnumerable<string> args)
{
_args = new Li... |
6e4110ab-07e9-441e-aef0-4c5202b6e75b | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace MultiMiner.Utility
{
public static class ApplicationPaths
{
public static string AppDataPath()
{
string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
return Path.Combine(rootPath, "MultiMi... | ```c#
using System;
using System.IO;
namespace MultiMiner.Utility
{
public static class ApplicationPaths
{
public static string AppDataPath()
{
//if running in "portable" mode
if (IsRunningInPortableMode())
{
//store files in the working dire... |
92c8c164-dfe8-42bb-8263-005a6d99d7a0 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using Wox.Plugin.Program.Programs;
namespace Wox.Plugin.Program
{
public class Settings
{
public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>();
public List<DisabledProgramSource> DisabledProgramSources { ge... | ```c#
using System.Collections.Generic;
using System.IO;
using Wox.Plugin.Program.Programs;
namespace Wox.Plugin.Program
{
public class Settings
{
public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>();
public List<DisabledProgramSource> DisabledProgramSources { ge... |
16769d5c-90e1-42b1-a1f4-8e81f7094610 | {
"language": "C#"
} | ```c#
namespace TAUtil.Gaf.Structures
{
using System.IO;
internal struct GafFrameData
{
public ushort Width;
public ushort Height;
public ushort XPos;
public ushort YPos;
public byte TransparencyIndex;
public bool Compressed;
public ushor... | ```c#
namespace TAUtil.Gaf.Structures
{
using System.IO;
internal struct GafFrameData
{
public ushort Width;
public ushort Height;
public short XPos;
public short YPos;
public byte TransparencyIndex;
public bool Compressed;
public ushort ... |
73d02bb4-28f3-4fb9-bc69-18f77e8fa010 | {
"language": "C#"
} | ```c#
namespace TAUtil.Gdi.Bitmap
{
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using TAUtil.Gdi.Palette;
/// <summary>
/// Serializes a 32-bit Bitmap instance into raw 8-bit indexed color data.
/// The mapping from color to index is done according to the... | ```c#
namespace TAUtil.Gdi.Bitmap
{
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using TAUtil.Gdi.Palette;
/// <summary>
/// Serializes a 32-bit Bitmap instance into raw 8-bit indexed color data.
/// The mapping from color to index is done according to the... |
fb88885c-b517-4fb9-a04b-b5f466281fc4 | {
"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.Game.Screens.Play.PlayerSettings;
using osu.Game.Tests.Visual.Ranking;
namespace osu.Game.Tests.Visu... | ```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.Graphics;
using osu.Framework.Testing;
using osu.Game.Overlays.Settings;
using osu.Game.Scoring;
using... |
ca109caa-dd12-4275-a489-1feafd41ff8d | {
"language": "C#"
} | ```c#
using System.Diagnostics;
using System.Windows.Input;
using DesktopWidgets.Classes;
using DesktopWidgets.Helpers;
using DesktopWidgets.ViewModelBase;
using GalaSoft.MvvmLight.Command;
namespace DesktopWidgets.Widgets.Search
{
public class ViewModel : WidgetViewModelBase
{
private string _searchT... | ```c#
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using DesktopWidgets.Classes;
using DesktopWidgets.Helpers;
using DesktopWidgets.ViewModelBase;
using GalaSoft.MvvmLight.Command;
namespace DesktopWidgets.Widgets.Search
{
public class ViewModel : WidgetViewModelBase
{
p... |
524dd8c6-c1d8-4ebd-a0de-4312d2fdcab8 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel;
using Newtonsoft.Json;
using Sendgrid.Webhooks.Converters;
namespace Sendgrid.Webhooks.Service
{
public class WebhookCategoryConverter : GenericListCreationJsonConverter<String>
{
}
}```
Use string instead of String | ```c#
using System;
using System.ComponentModel;
using Newtonsoft.Json;
using Sendgrid.Webhooks.Converters;
namespace Sendgrid.Webhooks.Service
{
public class WebhookCategoryConverter : GenericListCreationJsonConverter<string>
{
}
}
``` |
d2863407-f495-4377-8983-be054d41fabc | {
"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.Platform;
using osu.Framework.Platform.Linux;
using osu.Framework.Platform.MacOS;
using osu.Framework.Platform.Windows;
using System;
namespac... | ```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.Platform;
using osu.Framework.Platform.Linux;
using osu.Framework.Platform.MacOS;
using osu.Framework.Platform.Windows;
using System;
namespac... |
95d35c5e-1dd7-423f-8205-b94994bc6912 | {
"language": "C#"
} | ```c#
using CertiPay.PDF;
using Nancy;
using Nancy.TinyIoc;
using System;
using System.Configuration;
namespace CertiPay.Services.PDF
{
public class Bootstrapper : DefaultNancyBootstrapper
{
private static String ABCPdfLicense
{
get { return ConfigurationManager.AppSettings["ABCPDF... | ```c#
using CertiPay.PDF;
using Nancy;
using Nancy.TinyIoc;
using System;
using System.Configuration;
namespace CertiPay.Services.PDF
{
public class Bootstrapper : DefaultNancyBootstrapper
{
private static String ABCPdfLicense
{
get
{
// Check the enviro... |
7348bdc3-064b-4833-9509-44d85042cede | {
"language": "C#"
} | ```c#
// This file was auto-generated based on version 1.0.0 of the canonical data.
using Xunit;
public class PrimeFactorsTest
{
[Fact]
public void No_factors()
{
Assert.Empty(PrimeFactors.Factors(1));
}
[Fact]
public void Prime_number()
{
Assert.Equal(new[] { 2 }, PrimeFa... | ```c#
// This file was auto-generated based on version 1.0.0 of the canonical data.
using Xunit;
public class PrimeFactorsTest
{
[Fact]
public void No_factors()
{
Assert.Empty(PrimeFactors.Factors(1));
}
[Fact(Skip = "Remove to run test")]
public void Prime_number()
{
Asse... |
dc944b7b-ffca-4e85-94fb-2b2fc4f9b305 | {
"language": "C#"
} | ```c#
using HolzShots.Net.Custom;
using Xunit;
namespace HolzShots.Core.Tests.Net.Custom
{
public class CustomUploaderLoaderTests
{
[Theory]
[FileStringContentData("Files/DirectUpload.net.hsjson")]
[FileStringContentData("Files/FotosHochladen.hsjson")]
public void ValidateTest(s... | ```c#
using HolzShots.Net.Custom;
using Xunit;
namespace HolzShots.Core.Tests.Net.Custom
{
public class CustomUploaderLoaderTests
{
[Theory]
[FileStringContentData("Files/DirectUpload.net.hsjson")]
[FileStringContentData("Files/FotosHochladen.hsjson")]
public void ValidateTest(s... |
09b760e8-f1ae-42bc-8259-c3827c4ce54c | {
"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;
using osu.Framework.Utils;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.Tests
{
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Diagnostics;
using osu.Framework.Threading;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Rulese... |
6f936b04-18be-435c-b1f1-e4c4b7752ca2 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Sockets;
using System.Net;
using System.Threading;
namespace NDeproxy
{
public static class SocketHelper
{
static readonly Logger log = new Logger("SocketHelper");
public static Socket Server(int port, int listenQueue=5)
{
var s = new So... | ```c#
using System;
using System.Net.Sockets;
using System.Net;
using System.Threading;
namespace NDeproxy
{
public static class SocketHelper
{
static readonly Logger log = new Logger("SocketHelper");
public static Socket Server(int port, int listenQueue=5)
{
var s = new So... |
6aa99be1-5b15-40cc-89a5-cf5454c4c95b | {
"language": "C#"
} | ```c#
// Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.
using System.Collections.Generic;
namespace Lunet.Core
{
/// <summary>
/// Manages the meta information associated to a s... | ```c#
// Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.
using System.Collections.Generic;
using System.IO;
using System.Reflection;
namespace Lunet.Core
{
/// <summary>
/// Mana... |
f4b6f691-c948-4bc4-b423-344e26386674 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading.Tasks;
using Owin;
namespace Connect.Owin.Examples.Hello
{
// OWIN application delegate
using AppFunc = Func<IDictionary<string, object>, Task>;
public class Startup
{
public void Configuration(IApp... | ```c#
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading.Tasks;
using Owin;
namespace Connect.Owin.Examples.Hello
{
// OWIN application delegate
using AppFunc = Func<IDictionary<string, object>, Task>;
public class Startup
{
public void Configuration(IApp... |
47ddd437-e217-48ee-8ab5-56d1dc0a925c | {
"language": "C#"
} | ```c#
using System;
using System.Data;
using Dapper.FastCrud;
namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Data
{
public class UnitOfWork : DbTransaction, IUnitOfWork
{
public SqlDialect SqlDialect { get; set; }
private readonly Guid _guid = Guid.NewGuid();
public UnitOfW... | ```c#
using System;
using System.Data;
using Dapper.FastCrud;
namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Data
{
public class UnitOfWork : DbTransaction, IUnitOfWork
{
public SqlDialect SqlDialect { get; set; }
private readonly Guid _guid = Guid.NewGuid();
public UnitOfW... |
045dfa80-971c-4c43-9a55-dbe9b0074ef6 | {
"language": "C#"
} | ```c#
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System.ServiceModel;
namespace CefSharp.Internals
{
[ServiceContract(CallbackContract = typeof(IRenderProcess), SessionMode = Ses... | ```c#
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System.Collections.Generic;
using System.ServiceModel;
namespace CefSharp.Internals
{
[ServiceContract(CallbackContract = typeof(... |
fa5fb606-5021-4b4a-9f8b-e7a26e92977c | {
"language": "C#"
} | ```c#
using System;
using engine.core;
namespace engine.rules
{
public class PercentageDiscount : Rule
{
private readonly string m_ApplicableItemName;
private readonly double m_Percentage;
public PercentageDiscount(string applicableItemName, int percentage)
{
m_App... | ```c#
using System;
using engine.core;
namespace engine.rules
{
public class PercentageDiscount : Rule
{
private readonly string m_ApplicableItemName;
private readonly double m_Percentage;
public PercentageDiscount(string applicableItemName, int percentage)
{
m_App... |
76227fef-4936-4dbe-bba0-96184c395de3 | {
"language": "C#"
} | ```c#
using WampSharp.Binding;
using WampSharp.V2.Binding;
using WampSharp.V2.Client;
using WampSharp.WebSocket4Net;
namespace WampSharp.V2
{
public class DefaultWampChannelFactory : WampChannelFactory
{
public IWampChannel CreateChannel<TMessage>(string address,
... | ```c#
using WampSharp.Binding;
using WampSharp.V2.Binding;
using WampSharp.V2.Client;
using WampSharp.WebSocket4Net;
namespace WampSharp.V2
{
public class DefaultWampChannelFactory : WampChannelFactory
{
private readonly MessagePackObjectBinding mMsgpackBinding = new MessagePackObjectBinding();
... |
5eb1ac23-0b0b-43c2-b87b-bf1ace98b335 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Lurchsoft.FileData;
using Lurchsoft.ParallelWorkshop.Ex10WaitHalfWay;
using NUnit.Framework;
namespace Lurchsoft.ParallelWorkshopTests.Ex10WaitHalfWay
{
[TestFixture]
public class LimitedModeCharacterCounterTests
... | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Lurchsoft.FileData;
using Lurchsoft.ParallelWorkshop.Ex10WaitHalfWay;
using NUnit.Framework;
namespace Lurchsoft.ParallelWorkshopTests.Ex10WaitHalfWay
{
[TestFixture]
public class LimitedModeCharacterCounterTests
... |
c13817a5-b1d3-4740-b8ab-c5539d924d69 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Timers;
using StatoBot.Core;
namespace StatoBot.Analytics
{
public class AnalyzerBot : TwitchBot
{
public ChatAnalyzer Analyzer;
public AnalyzerBot(Credentials credentials, string channel) : base(credentials, channel)
{
Ana... | ```c#
using System;
using System.IO;
using System.Timers;
using System.Threading.Tasks;
using StatoBot.Core;
namespace StatoBot.Analytics
{
public class AnalyzerBot : TwitchBot
{
public ChatAnalyzer Analyzer;
public AnalyzerBot(Credentials credentials, string channel) : base(credentials, chan... |
bb19ef39-bbb4-4bec-99ec-8e7234e7ef4c | {
"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.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrollin... | ```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.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrollin... |
9c59fd10-5107-4342-90bb-bbc1f275eec8 | {
"language": "C#"
} | ```c#
using System.Web.Http;
using WTM.Core.Services;
using WTM.Crawler;
using WTM.Crawler.Services;
using WTM.Domain;
namespace WTM.Api.Controllers
{
public class UserController : ApiController
{
private readonly IUserService userService;
public UserController()
{
var web... | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
using WTM.Core.Services;
using WTM.Crawler;
using WTM.Crawler.Services;
using WTM.Domain;
namespace WTM.Api.Controllers
{
public class UserController : ApiController
{
private readonly IUserService userService;
... |
a97e77a1-c4b8-4656-8f00-35e06f7e79a7 | {
"language": "C#"
} | ```c#
namespace Parsley;
public static class ReadOnlySpanExtensions
{
public static ReadOnlySpan<char> Peek(this ref ReadOnlySpan<char> input, int length)
=> length >= input.Length
? input.Slice(0)
: input.Slice(0, length);
public static void Advance(this ref ReadOnlySpan<char>... | ```c#
namespace Parsley;
public static class ReadOnlySpanExtensions
{
public static ReadOnlySpan<char> Peek(this ref ReadOnlySpan<char> input, int length)
=> length >= input.Length
? input.Slice(0)
: input.Slice(0, length);
public static void Advance(this ref ReadOnlySpan<char>... |
7ec06cbd-7423-4664-9b98-149391093c58 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Http;
namespace Glimpse.Agent.Web
{
public class DefaultRequestIgnorerManager : IRequestIgnorerManager
{
public DefaultRequestIgnorerManager(IExtensionProvider<IRequestIgnorer> requestIgnorerProvider, IHttp... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.JsonPatch.Helpers;
namespace Glimpse.Agent.Web
{
public class DefaultRequestIgnorerManager : IRequestIgnorerManager
{
public DefaultRequestIgnorerManager(IExtensionProvider<IReq... |
26fa7942-aa9f-4357-8c8f-81a3a4ca28e3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Splat;
namespace Akavache
{
internal interface IWantsToRegisterStuff
{
void Register(IMutableDependencyResolver resolverToUse);
}
public sta... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Splat;
namespace Akavache
{
internal interface IWantsToRegisterStuff
{
void Register(IMutableDependencyResolver resolverToUse);
}
public sta... |
c79ad90a-338b-48d0-a08e-335944ae24c5 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel;
namespace Krs.Ats.IBNet
{
/// <summary>
/// Contract Security Types
/// </summary>
[Serializable()]
public enum SecurityType
{
/// <summary>
/// Stock
/// </summary>
[Description("STK")] Stock,
... | ```c#
using System;
using System.ComponentModel;
namespace Krs.Ats.IBNet
{
/// <summary>
/// Contract Security Types
/// </summary>
[Serializable()]
public enum SecurityType
{
/// <summary>
/// Stock
/// </summary>
[Description("STK")] Stock,
... |
4563c76e-6469-4b9f-a2e1-f5527ab14cc5 | {
"language": "C#"
} | ```c#
using Content.Shared.Maths;
namespace Content.Shared.Utility
{
public static class TemperatureHelpers
{
public static float CelsiusToKelvin(float celsius)
{
return celsius + PhysicalConstants.ZERO_CELCIUS;
}
public static float KelvinToCelsius(float kelvin)
... | ```c#
using Content.Shared.Maths;
namespace Content.Shared.Utility
{
public static class TemperatureHelpers
{
public static float CelsiusToKelvin(float celsius)
{
return celsius + PhysicalConstants.ZERO_CELCIUS;
}
public static float CelsiusToFahrenheit(float celsi... |
533c8610-9853-4333-bd85-b9bb336349e4 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using SecretSplitting;
namespace ElectronicCash.Tests
{
[TestFixture]
class SecretSplittingTests
{
private static readonly byte[] Message = Helpers.GetBytes("Supersecretmessage");
private static readonly byte[] RandBytes = Helpers.GetRandomBytes(Helpers.GetStri... | ```c#
using NUnit.Framework;
using SecretSplitting;
namespace ElectronicCash.Tests
{
[TestFixture]
class SecretSplittingTests
{
private static readonly byte[] Message = Helpers.GetBytes("Supersecretmessage");
private static readonly byte[] RandBytes = Helpers.GetRandomBytes(Helpers.GetStri... |
d5ce23b4-0b9c-490f-b9d0-47db5db4df82 | {
"language": "C#"
} | ```c#
#region
using System;
using System.Drawing;
using System.Windows.Forms;
using Tabster.Data;
using Tabster.Data.Processing;
#endregion
namespace RtfFile
{
internal class RtfFileExporter : ITablatureFileExporter
{
private Font _font;
private RichTextBox _rtb;
#r... | ```c#
#region
using System;
using System.Drawing;
using System.Windows.Forms;
using Tabster.Data;
using Tabster.Data.Processing;
#endregion
namespace RtfFile
{
internal class RtfFileExporter : ITablatureFileExporter
{
private RichTextBox _rtb;
#region Implementation of ITabl... |
bc7d5c7f-c4b8-4bc3-9257-b20084af5cbc | {
"language": "C#"
} | ```c#
using System;
namespace BuildingBlocks.CopyManagement
{
public class SmartClientApplicationIdentity : IApplicationIdentity
{
private static readonly Lazy<IApplicationIdentity> _current;
static SmartClientApplicationIdentity()
{
_current = new Lazy<IApplicati... | ```c#
using System;
namespace BuildingBlocks.CopyManagement
{
public class SmartClientApplicationIdentity : IApplicationIdentity
{
private static readonly Lazy<IApplicationIdentity> _current;
static SmartClientApplicationIdentity()
{
_current = new Lazy<IApplicati... |
fd2c3b74-ae18-4cc3-8513-b712961dfcd9 | {
"language": "C#"
} | ```c#
using System;
using ChamberLib.Content;
using System.IO;
namespace ChamberLib.OpenTK
{
public class GlslShaderImporter
{
public GlslShaderImporter(ShaderStageImporter next=null)
{
this.next = next;
}
readonly ShaderStageImporter next;
public ShaderCo... | ```c#
using System;
using ChamberLib.Content;
using System.IO;
namespace ChamberLib.OpenTK
{
public class GlslShaderImporter
{
public GlslShaderImporter(ShaderStageImporter next=null)
{
this.next = next;
}
readonly ShaderStageImporter next;
public ShaderCo... |
739bd9b9-c111-47fd-96f4-57db645b2e0f | {
"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.Tournament.Components;
using osu.Game.Tournament.Screens.Schedule;
namespace osu.Game.... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.S... |
f09518c0-8c09-47f8-96fb-c018da3a529a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Cms.Core.Configuration;
namespace uSync.Core
{
/// <summary>
/// a centralized way of telling if the current version of umbraco has
/// certain features or not.
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Cms.Core.Configuration;
namespace uSync.Core
{
/// <summary>
/// a centralized way of telling if the current version of umbraco has
/// certain features or not.
... |
896f0132-6b68-4f72-ba52-3d0faef9e0e8 | {
"language": "C#"
} | ```c#
@using System.Security.Principal
@if (User.IsSignedIn())
{
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
{
@Html.AntiForgeryToken()
<ul class="nav navbar-nav navbar-right">
<li>
@Html.ActionLi... | ```c#
@using System.Security.Claims
@if (User.IsSignedIn())
{
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
{
@Html.AntiForgeryToken()
<ul class="nav navbar-nav navbar-right">
<li>
@Html.ActionLink(... |
61b4fc0a-9e87-4064-986d-adb7992223d1 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Azuria.ErrorHandling;
using Azuria.Requests.Builder;
namespace Azuria.Middleware
{
/// <summary>
/// Adds some static headers to the request. They indicate things like application, version and api key u... | ```c#
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Azuria.ErrorHandling;
using Azuria.Requests.Builder;
namespace Azuria.Middleware
{
/// <summary>
/// Adds some static headers to the request. They indicate things like application, version and api key u... |
21ca9d76-d150-472a-b09e-9f6666ef29cc | {
"language": "C#"
} | ```c#
using System;
using System.Globalization;
using ContainerInstaller;
using SIM.Pipelines.Processors;
namespace SIM.Pipelines.Install.Containers
{
public enum Topology
{
Xm1,
Xp0,
Xp1
}
public static class StringExtentions
{
public static Topology ToTopology(this string tpl)
{
... | ```c#
using System;
using System.Globalization;
using ContainerInstaller;
using SIM.Pipelines.Processors;
namespace SIM.Pipelines.Install.Containers
{
public enum Topology
{
Xm1,
Xp0,
Xp1
}
public class InstallContainerArgs : ProcessorArgs
{
public InstallContainerArgs(EnvModel model, stri... |
b32dfcc8-7eed-448b-93ab-a3480f6537d3 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EDDiscovery.EliteDangerous.JournalEvents
{
public class JournalFileHeader : JournalEntry
{
public JournalFileHeader(JObject evt ) : base(evt, JournalTypeEnum.FileHeader)
... | ```c#
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EDDiscovery.EliteDangerous.JournalEvents
{
public class JournalFileHeader : JournalEntry
{
public JournalFileHeader(JObject evt ) : base(evt, JournalTypeEnum.FileHeader)
... |
4fb0e129-eac2-48b4-9ffb-95384e5697f1 | {
"language": "C#"
} | ```c#
using Ets.Mobile.ViewModel.Pages.Account;
using ReactiveUI;
using System;
using System.Reactive.Linq;
using Windows.UI.Xaml;
namespace Ets.Mobile.Pages.Account
{
public partial class LoginPage : IViewFor<LoginViewModel>
{
#region IViewFor<T>
public LoginViewModel ViewModel
... | ```c#
using Ets.Mobile.ViewModel.Pages.Account;
using ReactiveUI;
using System;
using System.Reactive.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
namespace Ets.Mobile.Pages.Account
{
public partial class LoginPage : IViewFor<LoginViewModel>
... |
a34cd053-bf24-418c-a8b6-0d62a9f5fc50 | {
"language": "C#"
} | ```c#
using AllReady.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Http.Features.Authentication;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
using Microsoft... | ```c#
using AllReady.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Http.Features.Authentication;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
using Microsoft... |
df0cf315-b89f-4bf6-b594-30457a67e2bb | {
"language": "C#"
} | ```c#
using System;
using Microsoft.AspNetCore.Http;
namespace Hellang.Middleware.SpaFallback
{
public class SpaFallbackOptions
{
public Func<HttpContext, PathString> FallbackPathFactory { get; set; } = _ => "/index.html";
public bool AllowFileExtensions { get; set; } = false;
public... | ```c#
using System;
using Microsoft.AspNetCore.Http;
namespace Hellang.Middleware.SpaFallback
{
public class SpaFallbackOptions
{
private static readonly Func<HttpContext, PathString> DefaultFallbackPathFactory = _ => "/index.html";
public Func<HttpContext, PathString> FallbackPathFactory { g... |
d2aee105-e631-4f86-8ae8-8450c86e9ec2 | {
"language": "C#"
} | ```c#
using System;
using NHibernate.Cfg;
using NUnit.Framework;
namespace NHibernate.Test.CfgTest
{
/// <summary>
/// Summary description for ConfigurationFixture.
/// </summary>
[TestFixture]
public class ConfigurationFixture
{
[SetUp]
public void SetUp()
{
System.IO.File.Copy("..\\..\\hibernate.cf... | ```c#
using System;
using NHibernate.Cfg;
using NUnit.Framework;
namespace NHibernate.Test.CfgTest
{
/// <summary>
/// Summary description for ConfigurationFixture.
/// </summary>
[TestFixture]
public class ConfigurationFixture
{
[SetUp]
public void SetUp()
{
System.IO.File.Copy("..\\..\\hibernate... |
68ddb02d-7ddf-4dfe-9323-293311c3f56c | {
"language": "C#"
} | ```c#
@model List<Post>
<section class="home-latest-posts">
<h3 class="header-surround-bar"><span>Latest Posts</span></h3>
<div class="row width-100">
@foreach (var post in Model.Take(4))
{
<div class="large-3 columns end">
@Html.Partial("_HomePostCard", post)
</div>
}
</div>
<d... | ```c#
@model List<Post>
<section class="home-latest-posts">
<h3 class="header-surround-bar"><span>Latest Posts</span></h3>
<div class="row width-100">
@foreach (var post in Model.Take(4))
{
<div class="large-3 medium-6 columns end">
@Html.Partial("_HomePostCard", post)
</div>
}
</... |
a45b8f9a-ff89-4f49-bd7a-d6e74874542f | {
"language": "C#"
} | ```c#
namespace GitTools.IssueTrackers.Jira
{
public static class StringExtensions
{
public static string AddJiraFilter(this string value, string additionalValue, string joinText = "AND")
{
if (!string.IsNullOrWhiteSpace(value))
{
value += string.Format("... | ```c#
namespace GitTools.IssueTrackers.Jira
{
internal static class StringExtensions
{
public static string AddJiraFilter(this string value, string additionalValue, string joinText = "AND")
{
if (!string.IsNullOrWhiteSpace(value))
{
value += string.Format... |
6f00f896-867f-45de-90e3-345c85eb33a7 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.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 osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.S... |
58d07988-e081-47ba-a83d-9f055b99c5d4 | {
"language": "C#"
} | ```c#
using System;
using Xunit;
using Zuehlke.Eacm.Web.Backend.CQRS;
namespace Zuehlke.Eacm.Web.Backend.Tests.DomainModel
{
public class EventAggregatorExtensionsFixture
{
[Fact]
public void PublishEvent_()
{
// arrange
// act
// as... | ```c#
using System;
using Xunit;
using Zuehlke.Eacm.Web.Backend.CQRS;
using Zuehlke.Eacm.Web.Backend.Utils.PubSubEvents;
namespace Zuehlke.Eacm.Web.Backend.Tests.DomainModel
{
public class EventAggregatorExtensionsFixture
{
[Fact]
public void PublishEvent_EventAggregatorIsNull_ThrowsE... |
f54b468d-be20-452c-ab7e-186066a1f37f | {
"language": "C#"
} | ```c#
using Aurora.Profiles.Generic.GSI.Nodes;
using Aurora.Profiles.TModLoader.GSI.Nodes;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aurora.Profiles.TModLoader.GSI {
public class GameState_TModLoader : G... | ```c#
using Aurora.Profiles.Generic.GSI.Nodes;
using Aurora.Profiles.TModLoader.GSI.Nodes;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aurora.Profiles.TModLoader.GSI {
public class GameState_TModLoader : G... |
90a3acd5-62ca-401d-b0da-81acae89a31c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;
namespace TechProFantasySoccer
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
/*var settings = new ... | ```c#
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;
namespace TechProFantasySoccer
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new Fr... |
fa7e9d3b-4557-4f88-b4ef-1682a009ab40 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class SimpleLinkedList<T> : IEnumerable<T>
{
public SimpleLinkedList(T value) :
this(new[] { value })
{
}
public SimpleLinkedList(IEnumerable<T> values)
{
var array = values.T... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class SimpleLinkedList<T> : IEnumerable<T>
{
public SimpleLinkedList(T value) :
this(new[] { value })
{
}
public SimpleLinkedList(IEnumerable<T> values)
{
var array = values.T... |
f932779b-4bdc-45b4-aaee-095a079b3698 | {
"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 MessagePack;
using Newtonsoft.Json;
namespace osu.Game.Online.Rooms
{
/// <summary>
/// The local availability information about a cert... | ```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 MessagePack;
using Newtonsoft.Json;
namespace osu.Game.Online.Rooms
{
/// <summary>
/// The local availability information about a cert... |
805cfa96-3ee0-488c-9055-c4b5cd78b586 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace EpubSharp.Tests
{
[TestClass]
public class EpubWriterTests
{
[TestMethod]
public void SaveTest()
{... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace EpubSharp.Tests
{
[TestClass]
public class EpubWriterTests
{
[TestMethod]
public void SaveTest()
{... |
06d284d2-bf81-4409-93b6-bd175e56acc6 | {
"language": "C#"
} | ```c#
using CefSharp.Internals;
using System.Collections.Generic;
using System.ServiceModel;
namespace CefSharp.BrowserSubprocess
{
public class CefRenderProcess : CefSubProcess, IRenderProcess
{
private DuplexChannelFactory<IBrowserProcess> channelFactory;
private CefBrowserBase browser;
... | ```c#
using CefSharp.Internals;
using System.Collections.Generic;
using System.ServiceModel;
namespace CefSharp.BrowserSubprocess
{
public class CefRenderProcess : CefSubProcess, IRenderProcess
{
private DuplexChannelFactory<IBrowserProcess> channelFactory;
private CefBrowserBase browser;
... |
d75abff9-c280-454a-9480-942fd0c4879e | {
"language": "C#"
} | ```c#
using System;
using App.Services;
using App.Services.Contracts;
using App.ViewModels;
using App.ViewModels.Contracts;
using Microsoft.Practices.Unity;
namespace App.Infrastructure
{
// ReSharper disable once InconsistentNaming
public sealed class UWPBootstrapper : CaliburnBootstrapper
{
publ... | ```c#
using System;
using App.Services;
using App.Services.Contracts;
using App.ViewModels;
using App.ViewModels.Contracts;
using Microsoft.Practices.Unity;
namespace App.Infrastructure
{
// ReSharper disable once InconsistentNaming
public sealed class UWPBootstrapper : CaliburnBootstrapper
{
publ... |
a0cd3aad-4101-4acc-839d-e1881ef2ba9c | {
"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.
#if NET5_0
using BenchmarkDotNet.Attributes;
using Microsoft.Extensions.DependencyInjection;
using OpenTabletDriver;
using osu.Framework.Input.Handlers.Tablet;
nam... | ```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.
#if NET5_0
using BenchmarkDotNet.Attributes;
using osu.Framework.Input.Handlers.Tablet;
namespace osu.Framework.Benchmarks
{
public class BenchmarkTabletDriver... |
2bccd40d-55cd-45e9-9766-a142adbd5a1a | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Beatm... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Beatm... |
c2310590-def0-4723-93a6-dc99f16a3fa4 | {
"language": "C#"
} | ```c#
using FluentAssertions;
using NUnit.Framework;
namespace Nerdle.AutoConfig.Tests.Integration
{
[TestFixture]
public class UsingDefaultConfigFilePath
{
[Test]
#if NETCOREAPP
[Ignore("Buggy interaction between the test runner and System.Configuration.ConfigurationManager, see https://g... | ```c#
using FluentAssertions;
using NUnit.Framework;
namespace Nerdle.AutoConfig.Tests.Integration
{
[TestFixture]
public class UsingDefaultConfigFilePath
#if NETCOREAPP
: System.IDisposable
{
private readonly string _configFilePath;
// In order to workaround flaky interaction bet... |
c0e5f1b7-9e62-440f-9fb0-1e61623c6b63 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Antlr4;
using Antlr4.Runtime;
namespace Rubberduck.Math
{
public static class Calculator
{
public static int Evaluate(string expression)
{
var lexer = new... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Antlr4;
using Antlr4.Runtime;
namespace Rubberduck.Math
{
public static class Calculator
{
public static int Evaluate(string expression)
{
var lexer = new... |
e20f5f0f-9727-4cd3-8ed7-4cbb9f8b5aad | {
"language": "C#"
} | ```c#
using System.IO;
using UnityEditor;
using UnityEngine;
namespace DTCommandPalette {
public abstract class GameObjectCommand : ICommand {
// PRAGMA MARK - ICommand
public string DisplayTitle {
get {
return _obj.name;
}
}
public string Di... | ```c#
using System.IO;
using UnityEditor;
using UnityEngine;
namespace DTCommandPalette {
public abstract class GameObjectCommand : ICommand {
// PRAGMA MARK - ICommand
public string DisplayTitle {
get {
if (!IsValid()) {
return "";
}
... |
8679fe52-09fe-42b5-802c-48494a3fcd96 | {
"language": "C#"
} | ```c#
using System;
namespace Pixie
{
/// <summary>
/// A base class for markup nodes: composable elements that can
/// be rendered.
/// </summary>
public abstract class MarkupNode
{
/// <summary>
/// Gets a fallback version of this node for when the renderer
/// doesn't... | ```c#
using System;
using Pixie.Markup;
namespace Pixie
{
/// <summary>
/// A base class for markup nodes: composable elements that can
/// be rendered.
/// </summary>
public abstract class MarkupNode
{
/// <summary>
/// Gets a fallback version of this node for when the renderer... |
d33cc389-3ddb-4d9a-968d-083eb57f083f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Avalonia.Data;
namespace Avalonia
{
internal static class ClassBindingManager
{
private static readonly Dictionary<string, AvaloniaProperty> s_RegisteredProperties =
new Dictionary<string, AvaloniaProperty>();
publ... | ```c#
using System;
using System.Collections.Generic;
using Avalonia.Data;
namespace Avalonia
{
internal static class ClassBindingManager
{
private static readonly Dictionary<string, AvaloniaProperty> s_RegisteredProperties =
new Dictionary<string, AvaloniaProperty>();
publ... |
5bd37150-5a1e-4819-a340-9f13515eab0a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Snowflake.Plugin.Scraping.TheGamesDb;
using Snowflake.Scraping;
using Snowflake.Scraping.Extensibility;
using Xunit;
namespace Snowflake.Scraping.Tests
{
public class ScraperIntegrationT... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Snowflake.Plugin.Scraping.TheGamesDb;
using Snowflake.Scraping;
using Snowflake.Scraping.Extensibility;
using Xunit;
namespace Snowflake.Scraping.Tests
{
public class ScraperIntegrationT... |
64a9cb34-4833-42e3-89ad-55a2ae197275 | {
"language": "C#"
} | ```c#
namespace alert_roster.web.Migrations
{
using alert_roster.web.Models;
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<alert_roster.web.Models.AlertRosterDbContext>
{
... | ```c#
namespace alert_roster.web.Migrations
{
using alert_roster.web.Models;
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<alert_roster.web.Models.AlertRosterDbContext>
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.