doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
d474713e-d5df-4e06-bb5a-8dbcae68b02d | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectPlacer : MonoBehaviour {
public CountryLocation reader;
public GameObject prefab;
// Use this for initialization
void Start () {
Debug.Log ("LOOK WE ARE DOING THINGS");
reader.NotANormalWord ();
Debug.L... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectPlacer : MonoBehaviour {
public CountryLocation reader;
public GameObject prefab;
private Dictionary<string, GameObject> markers;
// Use this for initialization
void Start () {
Debug.Log ("LOOK WE ARE DO... |
e4053b55-40c5-4d61-b29c-3fd1a4a3c691 | {
"language": "C#"
} | ```c#
using System;
/// <summary>
/// Summary description for Class1
/// </summary>
public class Bot {
public Bot() {
//
// TODO: Add constructor logic here
//
}
}
```
Add bot class method stubs | ```c#
using System;
/// <summary>
/// Summary description for Class1
/// </summary>
public class Bot {
private const int chromosomeSize = 10;
private Chromosome<double> chromosome;
public Bot() {
chromosome = new Chromosome<double>(chromosomeSize);
}
public Bot(double[] values) {
chromosome = new Chromos... |
72928f94-03aa-4c0a-9cfc-4989aa55e421 | {
"language": "C#"
} | ```c#
using Microsoft.AspNet.Builder;
namespace KWebStartup
{
public class Startup
{
public void Configure(IApplicationBuilder app)
{
app.UseStaticFiles();
}
}
}```
Bring welcome page back to project | ```c#
using Microsoft.AspNet.Builder;
namespace KWebStartup
{
public class Startup
{
public void Configure(IApplicationBuilder app)
{
app.UseStaticFiles();
app.UseWelcomePage();
}
}
}``` |
29e21157-d83f-4703-9163-a589b15a231b | {
"language": "C#"
} | ```c#
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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://w... | ```c#
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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://w... |
93238232-3eb9-4c03-b93a-39f0293c2d6f | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode]
public class TextMeshLimitSize : MonoBehaviour
{
#pragma warning disable 0649 //Serialized Fields
[SerializeField]
private Vector2 maxExtents;
[SerializeField]
private TextMesh textMesh;
[Se... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode]
public class TextMeshLimitSize : MonoBehaviour
{
#pragma warning disable 0649 //Serialized Fields
[SerializeField]
private Vector2 maxExtents;
[SerializeField]
private TextMesh textMesh;
[Se... |
2a85de30-753c-4281-a48f-d7afcb0b92ae | {
"language": "C#"
} | ```c#
// Copyright(c) 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | ```c#
// Copyright(c) 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
629b56e2-7e13-42e5-be78-ad97697ab7ce | {
"language": "C#"
} | ```c#
using System;
using System.Globalization;
using System.Text.RegularExpressions;
namespace RohlikAPI.Helpers
{
public class PriceParser
{
public double ParsePrice(string priceString)
{
var priceStringWithoutSpaces = priceString.Replace(" ", "").Replace(" ","");
... | ```c#
using System;
using System.Globalization;
using System.Text.RegularExpressions;
namespace RohlikAPI.Helpers
{
public class PriceParser
{
public double ParsePrice(string priceString)
{
var priceStringWithoutSpaces = priceString.Replace(" ", "").Replace(" ","");
... |
59470078-bfd3-4c80-8022-6d27be6fdf6c | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Platform.Linux.Native;
namespace osu.Framework.Platform.Linux
{
public class LinuxGameHost : DesktopGameHost
{
inte... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Platform.Linux.Native;
namespace osu.Framework.Platform.Linux
{
public class LinuxGameHost : DesktopGameHost
{
inte... |
0a8aceaf-ef99-463d-816e-d8f2f310a4ae | {
"language": "C#"
} | ```c#
@model CompetitionPlatform.Models.ProjectViewModels.ProjectListIndexViewModel
@{
ViewData["Title"] = "Projects";
}
<section class="section section--lead section--padding">
<div class="container container--extend">
<h1 class="text-center page__title">Lykke<span>Streams</span></h1>
<h3 cl... | ```c#
@model CompetitionPlatform.Models.ProjectViewModels.ProjectListIndexViewModel
@{
ViewData["Title"] = "Projects";
}
<section class="section section--lead section--padding">
<div class="container container--extend">
<h1 class="text-center page__title">Lykke<span>Streams</span></h1>
<h3 cl... |
804d18c6-dea7-49f6-919c-f08437da9c7f | {
"language": "C#"
} | ```c#
using System;
using Microsoft.AspNet.Identity.EntityFramework;
using Project.Data.Configuration;
using System.Data.Entity;
using Project.Domain.Entities;
namespace Project.Data
{
public class ProjectContext : IdentityDbContext<ApplicationUser>
{
public ProjectContext() : base("ProjectContext") {... | ```c#
using Microsoft.AspNet.Identity.EntityFramework;
using Project.Data.Configuration;
using System.Data.Entity;
using Project.Domain.Entities;
namespace Project.Data
{
public class ProjectContext : IdentityDbContext<ApplicationUser>
{
public ProjectContext() : base("ProjectContext") { }
pu... |
562990aa-910d-4fbf-8fff-d19b48687e8c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CarFuel.DataAccess;
using CarFuel.Models;
using CarFuel.Services;
using Microsoft.AspNet.Identity;
namespace CarFuel.Controllers {
public class CarsController : Controller {
private ICarDb db;... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CarFuel.DataAccess;
using CarFuel.Models;
using CarFuel.Services;
using Microsoft.AspNet.Identity;
namespace CarFuel.Controllers {
public class CarsController : Controller {
private ICarDb db;... |
2545c155-23a9-4d56-8599-9130096343c9 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
namespace NuGet.Common
{
public static class AggregateRepositoryHelper
{
public static AggregateRepository CreateAggregateRepositoryFromSources(IPackageRepositoryFactory factory, IPackageSourceProvider sourceProvider, IEnumerable<string... | ```c#
using System.Collections.Generic;
using System.Linq;
namespace NuGet.Common
{
public static class AggregateRepositoryHelper
{
public static AggregateRepository CreateAggregateRepositoryFromSources(IPackageRepositoryFactory factory, IPackageSourceProvider sourceProvider, IEnumerable<string... |
d5102bd6-9de7-410e-8b21-d9996dccd30b | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using System.Web.Mvc;
using CroquetAustralia.Website.App.Infrastructure;
namespace CroquetAustralia.Website.App.tournaments
{
[RoutePrefix("tournaments")]
public class TournamentsController : ApplicationController
{
private readonly WebApi _webApi;... | ```c#
using System;
using System.Threading.Tasks;
using System.Web.Mvc;
using CroquetAustralia.Website.App.Infrastructure;
namespace CroquetAustralia.Website.App.tournaments
{
[RoutePrefix("tournaments")]
public class TournamentsController : ApplicationController
{
private readonly WebApi _webApi;... |
ed0ac2cb-79dd-4b66-a106-fb7572c9f497 | {
"language": "C#"
} | ```c#
using System;
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
[Serializable]
class AuthenticationWindow : BaseWindow
{
private const string Title = "Sign in";
[SerializeField] private AuthenticationView authView;
[MenuItem("GitHub/Authenticate")]
publ... | ```c#
using System;
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
[Serializable]
class AuthenticationWindow : BaseWindow
{
private const string Title = "Sign in";
[SerializeField] private AuthenticationView authView;
[MenuItem("GitHub/Authenticate")]
publ... |
4349370c-291c-4a05-aca9-e7e8f0489234 | {
"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.Windows.Forms;
using CefSharp.Example;
using CefSharp.WinForms.Example.Minimal;
namespace CefSharp.WinForms.Exam... | ```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.Windows.Forms;
using CefSharp.Example;
using CefSharp.WinForms.Example.Minimal;
namespace CefSharp.WinForms.Exam... |
cb2fcca9-27ef-44ea-9775-d21c01cdee4a | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace WebScriptHook.Framework
{
public class Logger
{
public static string FileName
{
get;
internal set;
} = "WebScriptHook.log";
public static LogType LogLevel
{
get;
internal set... | ```c#
using System;
using System.IO;
using System.Diagnostics;
namespace WebScriptHook.Framework
{
public class Logger
{
public static string FileName
{
get;
internal set;
} = "WebScriptHook.log";
public static LogType LogLevel
{
get... |
e5c0eb47-e028-43bb-b97a-43f87d1f5233 | {
"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.Rulesets.Taiko
{
public enum TaikoSkinComponents
{
InputDrum,
RimHit,
DrumRollBody,
DrumRollTick,
... | ```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.Rulesets.Taiko
{
public enum TaikoSkinComponents
{
InputDrum,
CentreHit,
RimHit,
DrumRollBody,
Dr... |
83a89cd0-901e-4ce4-b922-87def1aa79e0 | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using CryptoExchange.Net.Interfaces;
namespace Binance.Net.Objects
{
internal class BinanceStream
{
internal bool TryReconnect { get; set; } = true;
public IWebsocket Socket { get; set; }
public BinanceStreamSubscription StreamResult { get; set; }
... | ```c#
using System.Threading.Tasks;
using CryptoExchange.Net.Interfaces;
namespace Binance.Net.Objects
{
internal class BinanceStream
{
internal bool TryReconnect { get; set; } = true;
public IWebsocket Socket { get; set; }
public BinanceStreamSubscription StreamResult { get; set; }
... |
3c210115-c44a-49f7-984c-6a02050ebf84 | {
"language": "C#"
} | ```c#
using System;
using System.Text;
using SurveyMonkey.Helpers;
namespace SurveyMonkey.ProcessedAnswers
{
public class SingleChoiceAnswer : IProcessedResponse
{
public string Choice { get; set; }
public string OtherText { get; set; }
public string Printable
{
ge... | ```c#
using System;
using System.Text;
using SurveyMonkey.Helpers;
namespace SurveyMonkey.ProcessedAnswers
{
public class SingleChoiceAnswer : IProcessedResponse
{
public string Choice { get; set; }
public string OtherText { get; set; }
public string Printable
{
ge... |
0e95b6e5-a00c-4a7c-9e56-ea91dbc93430 | {
"language": "C#"
} | ```c#
using MultiMiner.Coin.Api;
using Newtonsoft.Json.Linq;
namespace MultiMiner.CoinWarz.Api
{
public static class CoinInformationExtensions
{
public static void PopulateFromJson(this CoinInformation coinInformation, JToken jToken)
{
coinInformation.Symbol = jToken.Value<string>(... | ```c#
using MultiMiner.Coin.Api;
using Newtonsoft.Json.Linq;
namespace MultiMiner.CoinWarz.Api
{
public static class CoinInformationExtensions
{
public static void PopulateFromJson(this CoinInformation coinInformation, JToken jToken)
{
coinInformation.Symbol = jToken.Value<string>(... |
2db0dafd-d3f0-4142-ab32-b09ca80cbfaa | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
namespace EasySnippets
{
/// <summary>
/// Interaction logic ... | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
namespace EasySnippets
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public pa... |
fa99069c-94ce-4169-9668-4ab6a08b119e | {
"language": "C#"
} | ```c#
using UnityEngine;
public class Trials {
public static void Reset() {
Debug.Log("Reset trials");
}
public static void AddSuccess() {
string trials = PlayerPrefs.GetString("Trials");
trials += "S";
while(trials.Length > 100) {
trials = trials.Substring(1... | ```c#
using UnityEngine;
public class Trials {
public static void Reset() {
PlayerPrefs.SetString("Trials", "");
}
public static void AddSuccess() {
string trials = PlayerPrefs.GetString("Trials");
trials += "S";
while(trials.Length > 100) {
trials = trials.S... |
4772722d-38c7-4e13-893c-61a4ce8ee2ef | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.Linq;
using System.DoubleNumerics;
using JetBrains.Annotations;
using SolidworksAddinFramework.OpenGl;
using SolidWorks.Interop.sldworks;
namespace SolidworksAddinFramework.Geometry
{
public class BSpline3D : BSpline<Vector4>
{
public BSpline3D... | ```c#
using System;
using System.Diagnostics;
using System.Linq;
using System.DoubleNumerics;
using JetBrains.Annotations;
using SolidworksAddinFramework.OpenGl;
using SolidWorks.Interop.sldworks;
namespace SolidworksAddinFramework.Geometry
{
public class BSpline3D : BSpline<Vector4>
{
public BSpline3D... |
8f30e501-3e2d-4a9f-b44b-f2df34d7eded | {
"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: Asse... |
5f896f25-d803-432f-b322-7eada95dcd3d | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Traffic Manager Management... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Traffic Manager Management... |
b6f23df1-760e-44e1-83a3-83912b1e656b | {
"language": "C#"
} | ```c#
using System;
using Eto.Drawing;
using System.Collections.Generic;
using MonoTouch.UIKit;
using System.Linq;
namespace Eto.Platform.iOS.Drawing
{
public class FontFamilyHandler : WidgetHandler<object, FontFamily>, IFontFamily
{
public FontFamilyHandler ()
{
}
public FontFamilyHandler (string familyNam... | ```c#
using System;
using Eto.Drawing;
using System.Collections.Generic;
using MonoTouch.UIKit;
using System.Linq;
namespace Eto.Platform.iOS.Drawing
{
public class FontFamilyHandler : WidgetHandler<object, FontFamily>, IFontFamily
{
public FontFamilyHandler ()
{
}
public FontFamilyHandler (string familyNam... |
53276a3a-523f-4cf4-a076-00fb5278b617 | {
"language": "C#"
} | ```c#
using System.ComponentModel.Composition.Hosting;
namespace IocPerformance.Adapters
{
public sealed class MefContainerAdapter : IContainerAdapter
{
private CompositionContainer container;
public void Prepare()
{
var catalog = new AssemblyCatalog(typeof(Program).Assemb... | ```c#
using System.ComponentModel.Composition.Hosting;
namespace IocPerformance.Adapters
{
public sealed class MefContainerAdapter : IContainerAdapter
{
private CompositionContainer container;
public void Prepare()
{
var catalog = new TypeCatalog(typeof(Implementation1), t... |
1ef4f505-428b-4476-b038-1c831fc1fdba | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading;
namespace Bumblebee.Extensions
{
public static class Debugging
{
public static T DebugPrint<T>(this T obj)
{
Console.WriteLine(obj.ToString());
return obj;
}
public static T De... | ```c#
using System;
using System.Collections.Generic;
using System.Threading;
namespace Bumblebee.Extensions
{
public static class Debugging
{
public static T DebugPrint<T>(this T obj)
{
Console.WriteLine(obj.ToString());
return obj;
}
public static T De... |
fda33b31-8e70-4e82-a720-4f3ede8fa360 | {
"language": "C#"
} | ```c#
namespace SoxSharp.Effects
{
public abstract class BaseEffect : IBaseEffect
{
public abstract string Name { get; }
public virtual bool IsValid() { return true; }
public abstract override string ToString();
}
}
```
Revert "Added method to perform validity check for effect parameters" | ```c#
namespace SoxSharp.Effects
{
public abstract class BaseEffect : IBaseEffect
{
public abstract string Name { get; }
public abstract override string ToString();
}
}
``` |
de1fa16c-0b3a-404f-b219-4b801fbb7d0f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using PrepareLanding.Extensions;
using RimWorld;
using RimWorld.Planet;
using UnityEngine;
using Verse;
namespace PrepareLanding.Filters
{
public abstract class TileFilter : ITileFilter
{
protected List<int> _filteredTiles = new ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using PrepareLanding.Extensions;
using RimWorld;
using RimWorld.Planet;
using UnityEngine;
using Verse;
namespace PrepareLanding.Filters
{
public abstract class TileFilter : ITileFilter
{
protected List<int> _filteredTiles = new ... |
6b851552-1590-47c9-88f8-37b05c1c67ee | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("NModbus4")]
[assembly: AssemblyProduct("NModbus4")]
[assembly: AssemblyCompany("Maxwe11")]
[assembly: AssemblyCopyright("Licensed under MIT License.")]
[assembly:... | ```c#
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("NModbus4")]
[assembly: AssemblyProduct("NModbus4")]
[assembly: AssemblyCompany("Maxwe11")]
[assembly: AssemblyCopyright("Licensed under MIT License.")]
[assembly:... |
8011df9d-4537-425b-8785-6263273eb9e3 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitl... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitl... |
b7e389d8-9648-45d4-9883-f0445e6d4d3b | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.... |
20efe3da-fc7f-4ca5-82cd-5d9a031ecc0f | {
"language": "C#"
} | ```c#
using MyDocs.Common.Contract.Service;
using MyDocs.Common.Model.Logic;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Windows.Data.Pdf;
using Windows.Storage;
namespace MyDocs.WindowsStore.Service
{
public class PdfPageExtractorService... | ```c#
using MyDocs.Common.Contract.Service;
using MyDocs.Common.Model.Logic;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Windows.Data.Pdf;
using Windows.Storage;
namespace MyDocs.WindowsStore.Service
{
public class PdfPageExtractorService... |
47334aef-d0e3-4011-a38e-b02609ed9414 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Nest
{
[JsonObject]
public class ClusterRerouteExplanation
{
[JsonProperty("command")]
public string Comand { get; set; }
[JsonProperty("parameters")]
public ClusterRerouteParamet... | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Nest
{
[JsonObject]
public class ClusterRerouteExplanation
{
[JsonProperty("command")]
public string Command { get; set; }
[JsonProperty("parameters")]
public ClusterRerouteParame... |
cd636275-aa21-4e3a-bf9a-d0b1d84ff2a8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace AgateLib.Drivers
{
class AgateSandBoxLoader : MarshalByRefObject
{
public AgateDriverInfo[] ReportDrivers(string file)
{
List<AgateDriverInfo> retval = new List<Ag... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace AgateLib.Drivers
{
class AgateSandBoxLoader : MarshalByRefObject
{
public AgateDriverInfo[] ReportDrivers(string file)
{
List<AgateDriverInfo> retval = new List<Ag... |
24fdb054-f5e0-49fd-a72d-1c5bbca49d7b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.IsolatedStorage;
namespace Cassette
{
class HtmlTemplateModuleContainerBuilder : ModuleContainerBuilder
{
readonly string applicationRoot;
public HtmlTemplateModuleContainer... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.IsolatedStorage;
namespace Cassette
{
public class HtmlTemplateModuleContainerBuilder : ModuleContainerBuilder
{
readonly string applicationRoot;
public HtmlTemplateModuleCo... |
9d32731b-d3d3-4f6b-8130-aa7402011e24 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Assimp;
namespace open3mod
{
public partial class TextureDetailsDialog : F... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Assimp;
namespace open3mod
{
public partial class TextureDetailsDialog : F... |
b19cdf9e-7b88-4474-a834-218822e0b15b | {
"language": "C#"
} | ```c#
using System.Management.Automation;
namespace PoshGit2
{
class PSCurrentWorkingDirectory : ICurrentWorkingDirectory
{
private SessionState _sessionState;
public PSCurrentWorkingDirectory(SessionState sessionState)
{
_sessionState = sessionState;
}
... | ```c#
using System.Management.Automation;
namespace PoshGit2
{
class PSCurrentWorkingDirectory : ICurrentWorkingDirectory
{
private SessionState _sessionState;
public PSCurrentWorkingDirectory(SessionState sessionState)
{
_sessionState = sessionState;
}
... |
5f29c7a8-0dbd-452b-a3e6-3282679ef9e4 | {
"language": "C#"
} | ```c#
namespace SqlStreamStore
{
using System;
using System.Threading.Tasks;
using Shouldly;
using SqlStreamStore.Streams;
using Xunit;
public class messageTests
{
[Fact]
public async Task Can_deserialize()
{
var message = new StreamMessage(
... | ```c#
namespace SqlStreamStore
{
using System;
using System.Threading.Tasks;
using Shouldly;
using SqlStreamStore.Streams;
using Xunit;
public class StreamEventTests
{
[Fact]
public async Task Can_deserialize()
{
var message = new StreamMessage(
... |
9f4f73cc-f336-4fb8-9704-9ffab56676c2 | {
"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.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game... | ```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.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game... |
85d5f968-ea22-4339-ac13-afa14b71c1e1 | {
"language": "C#"
} | ```c#
using System;
using Nancy;
namespace MicroServicesHelloWorld{
public class CurrentDateTimeModule: NancyModule
{
public CurrentDateTimeModule()
{
Get("/", _ => DateTime.UtcNow);
}
}
}```
Test to have json overall anser | ```c#
using System;
using Nancy;
namespace MicroServicesHelloWorld{
public class CurrentDateTimeModule: NancyModule
{
public CurrentDateTimeModule()
{
Get("/", _ => {
var response = (Response)("\""+DateTime.UtcNow.ToString()+"\"");
response.ContentType = "application... |
5d1a7a02-81f4-4f5c-9c85-d5a5f235cec1 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace Wax
{
public class CbxBundleView : JsonBasedObject
{
public string ByteCode { get { return this.GetString("byteCode"); } set { this.SetString("byteCode", value); } }
public ResourceDatabase ResourceDB { get { return this.GetObject("resou... | ```c#
using System.Collections.Generic;
namespace Wax
{
public class CbxBundleView : JsonBasedObject
{
public string ByteCode { get { return this.GetString("byteCode"); } set { this.SetString("byteCode", value); } }
public ResourceDatabase ResourceDB { get { return this.GetObject("resou... |
d10165d5-54b2-4979-b551-11205436ac94 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Portal.CMS.Web
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoute... | ```c#
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Portal.CMS.Web
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoute... |
cb4cb9c8-7d04-4fa6-93cb-b6df8cffaf19 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("SmartFileAPI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("SmartFileAPI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[a... |
17b1e30c-b47f-4556-abcb-8e86a9cdf2e1 | {
"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.Reflection;
using System.Reflection.Metadata;
using System.Threading;
using Debug =... | ```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.Reflection;
using System.Reflection.Metadata;
using System.Threading;
using Debug =... |
8e66fdbd-a4a0-4b52-b923-1a51c68327f7 | {
"language": "C#"
} | ```c#
using System;
using Xwt;
using System.Threading;
using System.Net;
using TrueCraft.Core;
namespace TrueCraft.Launcher
{
class Program
{
public static LauncherWindow Window { get; set; }
[STAThread]
public static void Main(string[] args)
{
if (RuntimeInfo.IsLi... | ```c#
using System;
using Xwt;
using System.Threading;
using System.Net;
using TrueCraft.Core;
namespace TrueCraft.Launcher
{
class Program
{
public static LauncherWindow Window { get; set; }
[STAThread]
public static void Main(string[] args)
{
if (RuntimeInfo.IsLi... |
08cff675-b301-4dd2-b8db-c5309abfc100 | {
"language": "C#"
} | ```c#
using Gtk;
using SlimeSimulation.Controller.WindowComponentController;
namespace SlimeSimulation.View.WindowComponent
{
public class NodeHighlightKey
{
public Widget GetVisualKey()
{
VBox key = new VBox(true, 10);
HBox sourcePart = new HBox(true, 10);
... | ```c#
using Gtk;
using SlimeSimulation.Controller.WindowComponentController;
namespace SlimeSimulation.View.WindowComponent
{
public class NodeHighlightKey
{
public Widget GetVisualKey()
{
VBox key = new VBox(true, 10);
key.Add(new Label("Node colour key"));
... |
92a43bf5-0f95-422d-afff-34f09b83968b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace conekta
{
public class Details
{
public string name { get; set; }
public string phone { get; set; }
public string email { get; set; }
public Customer customer { get; set; }
public List<LineItem> line_items { get; set; }
public BillingAddres... | ```c#
using System;
using System.Collections.Generic;
namespace conekta
{
public class Details
{
public string name { get; set; }
public string phone { get; set; }
public string email { get; set; }
public Customer customer { get; set; }
public List<LineItem> line_items { get; set; }
public BillingAddres... |
0934395a-6679-4e76-8128-527fac7ec3fc | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Utils;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Utils;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.... |
ebe9d953-456c-4c41-9cbc-7e5b9e073d1d | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetSpotlightsRequest : A... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using Newtonsoft.Json;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class G... |
3c655300-ab60-4223-9f50-c8b3a815240d | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using BmpListener;
using BmpListener.Extensions;
namespace BmpListener.Bmp
{
public class BmpHeader
{
public BmpHeader(byte[] data)
{
Version = data.First();
//if (Version != 3)
//{
// throw new Exception... | ```c#
using System;
using System.Linq;
using BmpListener;
using BmpListener.Extensions;
namespace BmpListener.Bmp
{
public class BmpHeader
{
private readonly int bmpVersion = 3;
public BmpHeader(byte[] data)
{
Version = data.First();
if (Version != bmpVersion)
... |
2f135faf-9c17-4462-be6f-9fb6dc7fd0b5 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Threading;
using PactNet.Core;
namespace PactNet.Mocks.MockHttpService.Host
{
internal class RubyHttpHost : IHttpHost
{
private readonly IPactCoreHost _coreHost;
private readonly HttpClient _httpClient;
internal RubyHt... | ```c#
using System;
using System.Net.Http;
using System.Threading;
using PactNet.Core;
namespace PactNet.Mocks.MockHttpService.Host
{
internal class RubyHttpHost : IHttpHost
{
private readonly IPactCoreHost _coreHost;
private readonly HttpClient _httpClient;
internal RubyHt... |
e964dfa4-3219-45db-bd05-ea6c42517fa7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading;
namespace CollabEdit.VersionControl
{
public class RepositoryBranch<TValue, TMeta>
{
private object syncRoot = new Object();
public RepositoryBranch() { }
public RepositoryBranch(string name, Repository<TVa... | ```c#
using System;
using System.Collections.Generic;
using System.Threading;
namespace CollabEdit.VersionControl
{
public class RepositoryBranch<TValue, TMeta>
{
private object syncRoot = new Object();
public RepositoryBranch() { }
public RepositoryBranch(string name, Repository<TVa... |
cb6ec2a2-a0fc-4b64-b461-a0849d1b5afa | {
"language": "C#"
} | ```c#
@model Cash_Flow_Projection.Models.Dashboard
@{
ViewData["Title"] = "Home Page";
}
<table class="table table-striped">
@foreach (var entry in Model.Entries.OrderBy(_ => _.Date))
{
<tr>
<td>@Html.DisplayFor(_ => entry.Date)</td>
<td>@Html.DisplayFor(_ => entry.Descrip... | ```c#
@model Cash_Flow_Projection.Models.Dashboard
@{
ViewData["Title"] = "Home Page";
}
@using (Html.BeginForm("Balance", "Home", FormMethod.Post))
{
@Html.AntiForgeryToken()
<input type="text" id="balance" placeholder="Set Balance" />
<button type="submit">Set</button>
}
<table class="table table-... |
6f711a17-12d2-4d2c-8933-dc31ad6c4785 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System;
using System.Collections;
public class MapifyLevelPopulator {
private MapifyMapIterator mapIterator;
private MapifyTileRepository tileRepository;
private Transform container;
public MapifyLevelPopulator(MapifyMapIterator mapIterator, MapifyTileRepository tileRepository,... | ```c#
using UnityEngine;
using System;
using System.Collections;
public class MapifyLevelPopulator {
private MapifyMapIterator mapIterator;
private MapifyTileRepository tileRepository;
private Transform container;
public MapifyLevelPopulator(MapifyMapIterator mapIterator, MapifyTileRepository tileRepository,... |
0557482a-10df-4b76-bee2-7d14862ea1fa | {
"language": "C#"
} | ```c#
using System.Globalization;
namespace Our.Umbraco.Ditto.Tests.Models
{
using System.ComponentModel;
using Our.Umbraco.Ditto.Tests.TypeConverters;
using global::Umbraco.Core.Models;
public class ComplexModel
{
public int Id { get; set; }
[DittoValueResolver(typeof(NameVaule... | ```c#
using System.Globalization;
namespace Our.Umbraco.Ditto.Tests.Models
{
using System.ComponentModel;
using Our.Umbraco.Ditto.Tests.TypeConverters;
using global::Umbraco.Core.Models;
public class ComplexModel
{
public int Id { get; set; }
[DittoValueResolver(typeof(NameValue... |
34385d03-57c1-41ea-bedb-2a374209f86c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using FifteenBelow.Deployment.Update;
namespace Ensconce
{
internal static class TextRendering
{
private static readonly Lazy<TagDictionary> LazyTags = new Lazy<TagDictionary>(BuildTagDictionary);
public static IDictionary<s... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using FifteenBelow.Deployment.Update;
namespace Ensconce
{
internal static class TextRendering
{
private static readonly Lazy<TagDictionary> LazyTags = new Lazy<TagDictionary>(() => Retry.Do(BuildTagDictionary, TimeSpan.FromSeconds(... |
dacb3097-c167-4c74-a824-52f59250b9c7 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace FplClient.Data
{
public class FplPick
{
[JsonProperty("element")]
public int PlayerId { get; set; }
[JsonProperty("element_type")]
public int ElementType { get; set; }
[JsonProperty("position")]
public FplPlayerPosition P... | ```c#
using Newtonsoft.Json;
namespace FplClient.Data
{
public class FplPick
{
[JsonProperty("element")]
public int PlayerId { get; set; }
[JsonProperty("element_type")]
public int ElementType { get; set; }
[JsonProperty("position")]
public int TeamPosition { ... |
f19cf12c-a02d-4c13-9d38-36b66037019f | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Linq;
using Xunit.Abstractions;
namespace OpenSage.Data.Tests
{
internal static class InstalledFilesTestData
{
private static readonly IInstallationLocator Locator;
static InstalledFilesTestData()
{
Locator = new RegistryIn... | ```c#
using System;
using System.IO;
using System.Linq;
using Xunit.Abstractions;
namespace OpenSage.Data.Tests
{
internal static class InstalledFilesTestData
{
private static readonly IInstallationLocator Locator;
static InstalledFilesTestData()
{
Locator = new RegistryIn... |
3c8bdce9-3025-49e7-af04-68d3944a861c | {
"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... |
06fb4a14-c511-4d01-bca7-33098999fc8d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using MalApi;
namespace MalApi.IntegrationTests
{
[TestFixture]
public class GetAnimeListForUserTest
{
[Test]
public void GetAnimeListForUser()
{
string us... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using MalApi;
using System.Threading.Tasks;
namespace MalApi.IntegrationTests
{
[TestFixture]
public class GetAnimeListForUserTest
{
[Test]
public void GetAnimeListForUser()
... |
17bc1d6e-f927-4fdb-bf53-2c0611c5f4ae | {
"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.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing t... | ```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.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing t... |
e0851e98-06f3-48b8-9d44-d7ace91a6274 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace SPAD.neXt.Interfaces.ServiceContract
{
public sealed class RemoteServiceResponse
{
public bool HasError { get; set; }
public string Er... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace SPAD.neXt.Interfaces.ServiceContract
{
public static class RemoteServiceContract
{
public static readonly Uri ServiceUrl = new Uri("net.pipe:/... |
0ced5da2-d365-45d3-9bfe-fda3d667371a | {
"language": "C#"
} | ```c#
namespace Host.UnitTests.Serialization
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Crest.Host.Serialization;
using FluentAssertions;
using Xunit;
public class MethodsTests
{
private ... | ```c#
namespace Host.UnitTests.Serialization
{
using System.Collections;
using System.Linq;
using Crest.Host.Serialization;
using FluentAssertions;
using Xunit;
public class MethodsTests
{
private readonly Methods methods = new Methods(typeof(FakeSerializerBase));
public s... |
279b298e-c681-4a2c-af87-b9bc03f60fac | {
"language": "C#"
} | ```c#
using Dapper;
using SeleniumDesignPatternsDemo.Models;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.OleDb;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesignPattern.Models
{
public class AccessExcelData
{
public s... | ```c#
using Dapper;
using SeleniumDesignPatternsDemo.Models;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.OleDb;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesignPattern.Models
{
public class AccessExcelData
{
public s... |
26abee1f-e5e2-4b1a-974a-f8c7a155e6bf | {
"language": "C#"
} | ```c#
using System;
using Mono.Cecil;
using Mono.Cecil.Inject;
using Pathfinder.Attribute;
using Pathfinder.Util;
namespace Pathfinder.Internal.Patcher
{
internal static class Executor
{
internal static void Main(AssemblyDefinition gameAssembly)
{
// Retrieve the hook methods
... | ```c#
using System;
using Mono.Cecil;
using Mono.Cecil.Inject;
using Pathfinder.Attribute;
using Pathfinder.Util;
namespace Pathfinder.Internal.Patcher
{
internal static class Executor
{
internal static void Main(AssemblyDefinition gameAssembly)
{
// Retrieve the hook methods
... |
bb5f6a9b-d101-44c8-8932-fa838e8ee1a0 | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
using System.Reflection;
using System.Collections.Generic;
using System.ComponentModel;
namespace Eto.Serialization.Json
{
public class TypeConverterConverter : JsonConverter
{
readonly Dictionary<Type, TypeConverter> converters = new Dictionary<Type, TypeConverter>();
... | ```c#
using System;
using Newtonsoft.Json;
using System.Reflection;
using System.Collections.Generic;
using System.ComponentModel;
namespace Eto.Serialization.Json
{
public class TypeConverterConverter : JsonConverter
{
readonly Dictionary<Type, TypeConverter> converters = new Dictionary<Type, TypeConverter>();
... |
81593923-11f4-485a-90ae-5ed020f3776a | {
"language": "C#"
} | ```c#
using Godot;
using GodotTools.Internals;
using static GodotTools.Internals.Globals;
namespace GodotTools
{
public class HotReloadAssemblyWatcher : Node
{
private Timer watchTimer;
public override void _Notification(int what)
{
if (what == Node.NotificationWmFocusIn)
... | ```c#
using Godot;
using GodotTools.Internals;
using static GodotTools.Internals.Globals;
namespace GodotTools
{
public class HotReloadAssemblyWatcher : Node
{
private Timer watchTimer;
public override void _Notification(int what)
{
if (what == Node.NotificationWmWindowFocu... |
2222030f-0198-4d31-8e0f-68428d2c6ddc | {
"language": "C#"
} | ```c#
using NBi.Core.Query;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Testing.Unit.Core.Query
{
[TestFixture]
public class CommandBuilderTest
{
[Test]
public void Build_TimeoutSpe... | ```c#
using NBi.Core.Query;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Testing.Unit.Core.Query
{
[TestFixture]
public class CommandBuilderTest
{
[Test]
public void Build_TimeoutSpe... |
38c7d9d7-7d10-4f6e-aad4-c55826a0562c | {
"language": "C#"
} | ```c#
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
namespace Sandbox
{
public class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCo... | ```c#
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
namespace Sandbox
{
public class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCo... |
61f3f3d1-b6b5-44af-be80-8aabfea5740a | {
"language": "C#"
} | ```c#
using System;
using Aspose.Slides.Export;
using Aspose.Slides.Charts;
using Aspose.Slides;
/*
This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Slides for .NET API reference
when the project is build. Please check https://docs.nuget.org/consume/nuget-faq for more information.
If y... | ```c#
using System;
using Aspose.Slides.Export;
using Aspose.Slides.Charts;
using Aspose.Slides;
/*
This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Slides for .NET API reference
when the project is build. Please check https://docs.nuget.org/consume/nuget-faq for more information.
If y... |
9037ffc9-e4eb-4107-87b4-0b2f6257c734 | {
"language": "C#"
} | ```c#
using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Api.Types.Requests
{
public class CreateChangeOfPartyRequestRequest : SaveDataRequest
{
public ChangeOfPartyRequestType ChangeOfPartyRequestType { get; set; }
public long NewPartyId { get; set; }
publ... | ```c#
using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Api.Types.Requests
{
public class CreateChangeOfPartyRequestRequest : SaveDataRequest
{
public ChangeOfPartyRequestType ChangeOfPartyRequestType { get; set; }
public long NewPartyId { get; set; }
publ... |
50458cd8-a2e7-47b0-a607-813c1eef74b8 | {
"language": "C#"
} | ```c#
using System;
namespace UpdateManager
{
public class UpdateManagerUpdateable : IUpdateable
{
private UpdateManagerUpdateable() { }
private static UpdateManagerUpdateable _Instance { get; set; }
public static UpdateManagerUpdateable Instance
{
get
... | ```c#
using System;
namespace UpdateManager
{
public class UpdateManagerUpdateable : IUpdateable
{
private UpdateManagerUpdateable() { }
private static UpdateManagerUpdateable _Instance { get; set; }
public static UpdateManagerUpdateable Instance
{
get
... |
574feac5-96e9-4446-ace2-996cea2a2176 | {
"language": "C#"
} | ```c#
using System;
using System.Xml;
using Arkivverket.Arkade.Core;
namespace Arkivverket.Arkade.Tests.Noark5
{
public class NumberOfArchives : BaseTest
{
public const string AnalysisKeyArchives = "Archives";
public NumberOfArchives(IArchiveContentReader archiveReader) : base(TestType.Content... | ```c#
using System;
using System.Xml;
using Arkivverket.Arkade.Core;
namespace Arkivverket.Arkade.Tests.Noark5
{
public class NumberOfArchives : BaseTest
{
public const string AnalysisKeyArchives = "Archives";
public NumberOfArchives(IArchiveContentReader archiveReader) : base(TestType.Content... |
1d70aa71-8d87-4ae1-b175-7715e36e3e68 | {
"language": "C#"
} | ```c#
using LanguageSchoolApp.Data.Model;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LanguageSchoolApp.Data
{
public class MsSqlDbContext : Ident... | ```c#
using LanguageSchoolApp.Data.Model;
using LanguageSchoolApp.Data.Model.Contracts;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LanguageSchoolApp.D... |
b6dc1d20-c0e9-47a5-8e7c-b02768562099 | {
"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... |
5bd99166-060f-4320-a49e-f388d9db70de | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace Engine {
public class BaseEngine : BaseEngineObject {
public BaseEngine() {
}
public virtual void Tick(float deltaTime) {
}
}
}```
Remove + cleanup warnings. Re... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace Engine {
public class BaseEngine : BaseEngineObject {
public BaseEngine() {
}
public virtual void Tick(float deltaTime) {
}
}
}``` |
8619e37b-514d-4bdc-8e21-a35541d80efd | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using AutoMapper;
namespace PicklesDoc.Pickles.ObjectModel
{
public class KeywordResolver : ITypeConverter<string, Keyword>
{
private readonly string language;
public KeywordResolver(string language)
{
this.language = language;
... | ```c#
using System;
using System.Linq;
using AutoMapper;
namespace PicklesDoc.Pickles.ObjectModel
{
public class KeywordResolver : ITypeConverter<string, Keyword>
{
private readonly string language;
public KeywordResolver(string language)
{
this.language = language;
... |
1c0edc1e-4abf-4e63-bef0-86e8bc3d02bd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace MonoTorrent.Common
{
public interface ITorrentFileSource
{
IEnumerable<FileMapping> Files { get; }
bool IgnoreHidden { get; }
string TorrentName { get; }
}
}
```
Remove the 'IgnoreHidden' parameter ... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace MonoTorrent.Common
{
public interface ITorrentFileSource
{
IEnumerable<FileMapping> Files { get; }
string TorrentName { get; }
}
}
``` |
af22dfed-95a4-4cf4-9873-637cc99c3c49 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbC... | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbC... |
f90c7576-8b0d-4415-b385-08afb261c330 | {
"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.Diagnostics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framewo... | ```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 OpenTK;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Screens.Testing;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserIn... |
1da85679-49d0-4fbf-9304-ef4e9537395d | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Threading.Tasks;
using GlobalExceptionHandler.Tests.WebApi.Fixtures;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
using Shouldly;
using Xunit;
namespace GlobalExcepti... | ```c#
using System;
using System.Net.Http;
using System.Threading.Tasks;
using GlobalExceptionHandler.Tests.WebApi.Fixtures;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
using Shouldly;
using Xunit;
namespace GlobalExcepti... |
7bf13d8e-50fc-4ca5-97b3-2df4b400980a | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/home";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
private const bool debuggingS... | ```c#
using System;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/home";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
private const bool debuggingS... |
e905049c-12ea-47e5-b306-27b674a3606c | {
"language": "C#"
} | ```c#
@model ForgotPasswordViewModel
@{
ViewData["Title"] = "Forgot your password?";
}
<h2>@ViewData["Title"].</h2>
<p>
For more information on how to enable reset password please see this <a href="http://go.microsoft.com/fwlink/?LinkID=532713">article</a>.
</p>
@*<form asp-controller="Account" asp-... | ```c#
@model ForgotPasswordViewModel
@{
ViewData["Title"] = "Forgot your password?";
}
<h2>@ViewData["Title"].</h2>
<p>
For more information on how to enable reset password please see this <a href="http://go.microsoft.com/fwlink/?LinkID=532713">article</a>.
</p>
@*
<form asp-controller="Account" asp-... |
bf490576-7a42-487e-88c5-6e1d2b5997db | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace EngineLayer
{
static class ProductTypeToTerminusType
{
public static TerminusType IdentifyTerminusType(List<ProductType> lp)
{
if ((lp.Contains(ProductType.B) || lp.Contains(ProductType.BnoB1ions) || lp.Contains(ProductType.C)) && (... | ```c#
using System.Collections.Generic;
namespace EngineLayer
{
static class ProductTypeToTerminusType
{
public static TerminusType IdentifyTerminusType(List<ProductType> lp)
{
if ((lp.Contains(ProductType.B) || lp.Contains(ProductType.BnoB1ions) || lp.Contains(ProductType.C) || lp... |
fe545212-a778-4975-a8d3-e545ccff61e7 | {
"language": "C#"
} | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
using VasysRomanNumeralsKata;
namespace VasysRomanNumeralsKataTest
{
[TestClass]
public class FromRomanNumeralsTest
{
[TestMethod]
public void WhenStringExtensionIsP... | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
using VasysRomanNumeralsKata;
namespace VasysRomanNumeralsKataTest
{
[TestClass]
public class FromRomanNumeralsTest
{
[TestMethod]
public void WhenStringExtensionIsP... |
b583eed5-c867-426d-aadf-662e249efacb | {
"language": "C#"
} | ```c#
namespace AspNetCore.RouteAnalyzer
{
public class RouteInformation
{
public string HttpMethod { get; set; } = "GET";
public string Area { get; set; } = "";
public string Path { get; set; } = "";
public string Invocation { get; set; } = "";
public override string To... | ```c#
namespace AspNetCore.RouteAnalyzer
{
public class RouteInformation
{
public string HttpMethod { get; set; } = "GET";
public string Area { get; set; } = "";
public string Path { get; set; } = "";
public string Invocation { get; set; } = "";
public override string To... |
ee453cba-5463-4d81-99c5-fb19b4bd0414 | {
"language": "C#"
} | ```c#
namespace NServiceBus
{
using System;
using System.Data.Common;
using System.Data.SqlClient;
public abstract partial class SqlDialect
{
/// <summary>
/// Microsoft SQL Server
/// </summary>
public partial class MsSqlServer : SqlDialect
{
///... | ```c#
namespace NServiceBus
{
using System;
using System.Data.Common;
public abstract partial class SqlDialect
{
/// <summary>
/// Microsoft SQL Server
/// </summary>
public partial class MsSqlServer : SqlDialect
{
/// <summary>
/// Micros... |
1eab0dc9-e6d1-47e6-ba7c-c33f6357d77f | {
"language": "C#"
} | ```c#
using System;
namespace EvilDICOM.Core.Helpers
{
public class EnumHelper
{
public static T StringToEnum<T>(string name)
{
return (T) Enum.Parse(typeof (T), name);
}
}
}```
Use Enum.Parse overload available in PCL | ```c#
using System;
namespace EvilDICOM.Core.Helpers
{
public class EnumHelper
{
public static T StringToEnum<T>(string name)
{
return (T) Enum.Parse(typeof (T), name, false);
}
}
}``` |
3b5d0711-d142-4ebd-8805-fa84e0a81f0e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WhitelistExecuter.Lib;
using WhitelistExecuter.Web.Models;
namespace WhitelistExecuter.Web.Controllers
{
public class HomeController : Controller
{
public ActionResult Ind... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WhitelistExecuter.Lib;
using WhitelistExecuter.Web.Filters;
using WhitelistExecuter.Web.Models;
namespace WhitelistExecuter.Web.Controllers
{
public class HomeController : Controller
... |
651cbd07-1fd9-41a2-b3fa-d8984412371d | {
"language": "C#"
} | ```c#
// Copyright 2015 XLGAMES Inc.
//
// Distributed under the MIT License (See
// accompanying file "LICENSE" or the website
// http://www.opensource.org/licenses/mit-license.php)
using System;
using Sce.Atf.Adaptation;
namespace LevelEditorXLE.Extensions
{
internal static class ExtensionsClass
{
... | ```c#
// Copyright 2015 XLGAMES Inc.
//
// Distributed under the MIT License (See
// accompanying file "LICENSE" or the website
// http://www.opensource.org/licenses/mit-license.php)
using System;
using Sce.Atf.Adaptation;
namespace LevelEditorXLE.Extensions
{
internal static class ExtensionsClass
{
... |
270ca240-5b71-4e79-8bb8-57c217cf0a72 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using System.IO;
namespace CertiPay.PDF.Tests
{
public class PDFServiceTests
{
[Test]
public void ShouldGenerateMultiPagePDF()
{
IPDFService svc = new PDFService();
byte[] output = svc.CreatePdf(new PDFService.Settings
... | ```c#
using NUnit.Framework;
using System.IO;
namespace CertiPay.PDF.Tests
{
public class PDFServiceTests
{
[Test]
public void ShouldGenerateMultiPagePDF()
{
IPDFService svc = new PDFService();
byte[] output = svc.CreatePdf(new PDFService.Settings
... |
e209a8c7-2193-401e-add2-d38542a1129c | {
"language": "C#"
} | ```c#
using System.IO;
using MessagePack;
using MessagePack.Resolvers;
namespace Obvs.Serialization.MessagePack
{
public class MessagePackCSharpMessageSerializer : IMessageSerializer
{
private readonly IFormatterResolver _resolver;
public MessagePackCSharpMessageSerializer()
: thi... | ```c#
using System.IO;
using MessagePack;
using MessagePack.Resolvers;
namespace Obvs.Serialization.MessagePack
{
public class MessagePackCSharpMessageSerializer : IMessageSerializer
{
private readonly IFormatterResolver _resolver;
public MessagePackCSharpMessageSerializer()
: thi... |
52584d27-a176-4438-bd9b-4fe74f047712 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<SkinConfiguration>
{
public LegacySk... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<DefaultSkinConfiguration>
{
public L... |
dfea6fac-aa09-4c21-b962-6495cfc1f213 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using LastPass;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Read LastPass credentials from a file
// The file should contain 2 lines: username and password.
// See credentials.txt.example for a... | ```c#
using System;
using System.IO;
using LastPass;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Read LastPass credentials from a file
// The file should contain 2 lines: username and password.
// See credentials.txt.example for a... |
d14901ad-d3ca-45a3-b7a9-c2c58e19cc79 | {
"language": "C#"
} | ```c#
using System;
using FonctionsUtiles.Fred.Csharp;
namespace ConsoleAppPrimesByHundred
{
internal class Program
{
private static void Main()
{
Action<string> display = Console.WriteLine;
display("Prime numbers by hundred:");
foreach (var kvp in FunctionsPrimes.NumberOfPrimesByHundre... | ```c#
using System;
using FonctionsUtiles.Fred.Csharp;
namespace ConsoleAppPrimesByHundred
{
internal class Program
{
private static void Main()
{
Action<string> display = Console.WriteLine;
display("Prime numbers by hundred:");
foreach (var kvp in FunctionsPrimes.NumberOfPrimesByHundre... |
e49f8657-b297-4250-b634-a0af2007feff | {
"language": "C#"
} | ```c#
// Copyright (c) Gothos
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Tera.Game.Messages
{
public class LoginServerMessage : ParsedMessage
{
public EntityId Id { get; private set; }
public uint PlayerId { get; private set;... | ```c#
// Copyright (c) Gothos
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Tera.Game.Messages
{
public class LoginServerMessage : ParsedMessage
{
public EntityId Id { get; private set; }
public uint PlayerId { get; private set;... |
c7eeab20-f51d-4488-aa4f-cba21626d0e2 | {
"language": "C#"
} | ```c#
using System.Windows;
using DesktopWidgets.Actions;
using DesktopWidgets.Classes;
using DesktopWidgets.Events;
using DesktopWidgets.Helpers;
namespace DesktopWidgets.Windows
{
/// <summary>
/// Interaction logic for EventActionPairEditor.xaml
/// </summary>
public partial class EventActionPa... | ```c#
using System.Windows;
using DesktopWidgets.Actions;
using DesktopWidgets.Classes;
using DesktopWidgets.Events;
using DesktopWidgets.Helpers;
namespace DesktopWidgets.Windows
{
/// <summary>
/// Interaction logic for EventActionPairEditor.xaml
/// </summary>
public partial class EventActionPa... |
12102326-f24e-4c72-98fc-35fec4b975cc | {
"language": "C#"
} | ```c#
using PluginContracts;
using System;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.IO;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN commu... | ```c#
using PluginContracts;
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN communication interface ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.