doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
9cec52d7-0e51-4bd8-9818-6dc674a9046c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using FuzzyCore.Server;
namespace FuzzyCore.Commands
{
public class GetFile
{
ConsoleMessage Message = new Consol... | ```c#
using FuzzyCore.Data;
using FuzzyCore.Server;
using System;
using System.IO;
namespace FuzzyCore.Commands
{
public class GetFile
{
ConsoleMessage Message = new ConsoleMessage();
private String FilePath;
private String FileName;
private JsonCommand mCommand;
public... |
e6e33181-350b-4dd8-9937-d5cb92de95a4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace EchoClient
{
class Program
{
static void Main(string[] args)
{
Task main = MainAsync(args);
main.Wait();
}
static async Task M... | ```c#
using System;
using System.IO;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace EchoClient
{
class Program
{
const int MAX_WRITE_RETRY = 3;
const int WRITE_RETRY_DELAY_SECONDS = 3;
static void Main(string[] args)
{
Task main = MainAsync(args);
main.Wait();
}
static async T... |
17d90b96-0888-484e-a2d4-9a401c23e1b8 | {
"language": "C#"
} | ```c#
using Alensia.Core.Input.Generic;
using UnityEngine.Assertions;
namespace Alensia.Core.Input
{
public class BindingKey<T> : IBindingKey<T> where T : IInput
{
public string Id { get; }
public BindingKey(string id)
{
Assert.IsNotNull(id, "id != null");
Id ... | ```c#
using Alensia.Core.Input.Generic;
using UnityEngine.Assertions;
namespace Alensia.Core.Input
{
public class BindingKey<T> : IBindingKey<T> where T : IInput
{
public string Id { get; }
public BindingKey(string id)
{
Assert.IsNotNull(id, "id != null");
Id ... |
288ee583-9296-49c0-8619-c9861110e181 | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Metadata.ModelConventions;
namespace Microsoft.Fra... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Metadata.Conventions.Internal;
namespace Microsoft... |
e953e7a2-0315-4a06-bbbc-420a16a13246 | {
"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: AssemblyConf... | ```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: AssemblyConf... |
9d744969-04ad-494d-8e1b-4df8a9d7adb6 | {
"language": "C#"
} | ```c#
using System.Text;
using DotNetRu.Utils.Helpers;
using Newtonsoft.Json;
namespace DotNetRu.Clients.UI
{
public class AppConfig
{
public string AppCenterAndroidKey { get; set; }
public string AppCenteriOSKey { get; set; }
public string PushNotificationsChannel { get; ... | ```c#
using System.Text;
using DotNetRu.Utils.Helpers;
using Newtonsoft.Json;
namespace DotNetRu.Clients.UI
{
public class AppConfig
{
public string AppCenterAndroidKey { get; set; }
public string AppCenteriOSKey { get; set; }
public string PushNotificationsChannel { get; ... |
bf1268f6-5b3c-4edc-8135-c7e0d029a5ac | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace XamExample {
public partial class MyPage : ContentPage {
public MyPage() {
InitializeComponent();
var c = 0;
XamEffects.TouchEffect.SetColor(plus, Color.White);
XamEffect... | ```c#
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace XamExample {
public partial class MyPage : ContentPage {
public MyPage() {
InitializeComponent();
var c = 0;
XamEffects.TouchEffect.SetColor(plus, Color.White);
XamEffect... |
740eccc3-7b2b-4d28-961a-e4c988d1fad2 | {
"language": "C#"
} | ```c#
using Mono.TextEditor.Highlighting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xwt.Drawing;
namespace XwtPlus.TextEditor
{
public class TextEditorOptions
{
public Font EditorFont = Font.FromName("Consolas 13");
... | ```c#
using Mono.TextEditor.Highlighting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xwt.Drawing;
namespace XwtPlus.TextEditor
{
public class TextEditorOptions
{
public Font EditorFont = Font.SystemMonospaceFont;
pu... |
5221824a-fccd-4c7f-b8a6-dfe02d802c87 | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="VersionInfo.cs" company="Dani Michel">
// Dani Michel 2013
// </copyright>
// -----------------------------------------------------------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="VersionInfo.cs" company="Dani Michel">
// Dani Michel 2013
// </copyright>
// -----------------------------------------------------------------------------------------... |
82d54dd3-2676-48ab-be55-ccc3760d604c | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
namespace LiteNetLibManager
{
public abstract class BaseAckMessage : ILiteNetLibMessage
{
public uint ackId;
public AckResponseCode responseCode;
public void Deserialize(NetDataReader reader)
... | ```c#
using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
namespace LiteNetLibManager
{
public class BaseAckMessage : ILiteNetLibMessage
{
public uint ackId;
public AckResponseCode responseCode;
public void Deserialize(NetDataReader reader)
{
... |
c4ba2cbd-ef03-442d-9676-199c0f3d12b9 | {
"language": "C#"
} | ```c#
using System;
using System.Net;
using LtiLibrary.Core.Outcomes.v2;
using Newtonsoft.Json;
using Xunit;
namespace LtiLibrary.AspNet.Tests
{
public class LineItemsControllerUnitTests
{
[Fact]
public void GetLineItemBeforePostReturnsNotFound()
{
var controller = new Line... | ```c#
using System;
using System.Net;
using LtiLibrary.Core.Outcomes.v2;
using Newtonsoft.Json;
using Xunit;
namespace LtiLibrary.AspNet.Tests
{
public class LineItemsControllerUnitTests
{
[Fact]
public void GetLineItemBeforePostReturnsNotFound()
{
var controller = new Line... |
45dc2d28-1726-437c-93e2-11fd0b08d906 | {
"language": "C#"
} | ```c#
namespace Slinqy.Test.Functional.Utilities.Polling
{
using System;
using System.Diagnostics;
using System.Threading;
/// <summary>
/// Provides common polling functionality.
/// </summary>
internal static class Poll
{
/// <summary>
/// Polls the specified function... | ```c#
namespace Slinqy.Test.Functional.Utilities.Polling
{
using System;
using System.Diagnostics;
using System.Threading;
/// <summary>
/// Provides common polling functionality.
/// </summary>
internal static class Poll
{
/// <summary>
/// Polls the specified function... |
3705e382-e195-4c32-a349-f03935a3e231 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
namespace NLogger
{
public class CustomLogFactory<T> where T : NLoggerSection
{
private readonly List<ILogWriterRegistration<T>> _logWriterTypes;
public CustomLogFactory()
{
_logWriterTy... | ```c#
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
namespace NLogger
{
public class CustomLogFactory<T> where T : NLoggerSection
{
private readonly List<ILogWriterRegistration<T>> _logWriterTypes;
public CustomLogFactory()
{
_logWriterTy... |
3d2f9dd4-4400-4242-afcf-2b92007104d4 | {
"language": "C#"
} | ```c#
using System;
using MonoDevelop.Ide.Editor;
using MonoDevelop.Ide.Editor.Extension;
namespace JustEnoughVi
{
public abstract class ViMode
{
protected TextEditor Editor { get; set; }
public Mode RequestedMode { get; internal set; }
protected ViMode(TextEditor editor)
{
... | ```c#
using System;
using MonoDevelop.Ide.Editor;
using MonoDevelop.Ide.Editor.Extension;
namespace JustEnoughVi
{
public abstract class ViMode
{
protected TextEditor Editor { get; set; }
public Mode RequestedMode { get; internal set; }
protected ViMode(TextEditor editor)
{
... |
7bccf511-beec-4c13-84a2-77cb7481c4be | {
"language": "C#"
} | ```c#
using System.IO;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.IO
{
public class SystemFiles
{
public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config";
public static string TelemetricsIdentifier => SystemDirectories.Umbraco + "/telemetrics-id.... | ```c#
using System.IO;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.IO
{
public class SystemFiles
{
public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config";
public static string TelemetricsIdentifier => SystemDirectories.Data + "/telemetrics-id.umb... |
eaad9d00-15d6-4add-bc2f-a42c606a6228 | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Mono.Nat
{
public static class SemaphoreSlimExtensions
{
class SemaphoreSlimDisposable : IDisposable
{
SemaphoreSlim Semaphore;
public SemaphoreSlimDisposable (SemaphoreSlim semaphore)
{
Semaphore = semaphore;
}... | ```c#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Mono.Nat
{
static class SemaphoreSlimExtensions
{
class SemaphoreSlimDisposable : IDisposable
{
SemaphoreSlim Semaphore;
public SemaphoreSlimDisposable (SemaphoreSlim semaphore)
{
Semaphore = semaphore;
}
pu... |
bba1ce9f-e103-4518-adb4-ce8fdd3b6caa | {
"language": "C#"
} | ```c#
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the messag... | ```c#
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the messag... |
b5e0123e-ff4e-4563-93fd-0da7e930a025 | {
"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.Collections.Generic;
namespace osu.Game.Online.RealtimeMultiplayer
{
[Serializable]
public class MultiplayerRoom
{
p... | ```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.Collections.Generic;
namespace osu.Game.Online.RealtimeMultiplayer
{
[Serializable]
public class MultiplayerRoom
{
p... |
76099741-99e1-4914-8cf3-fa875d868420 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Mitternacht.Services;
using NLog;
namespace Mitternacht.Modules.Forum.Services {
public class ForumService : IMService {
private readonly IBotCredentials _creds;
private readonly Logger _log;
public GommeHDnetForumAPI.Forum Forum { get; private set; }
... | ```c#
using System;
using System.Threading.Tasks;
using Mitternacht.Services;
using NLog;
namespace Mitternacht.Modules.Forum.Services {
public class ForumService : IMService {
private readonly IBotCredentials _creds;
private readonly Logger _log;
public GommeHDnetForumAPI.Forum Forum { get; private set; }
... |
4c1a7a59-3b5f-44ff-b76f-36bbcd7e411c | {
"language": "C#"
} | ```c#
using System;
using Grpc.Core;
using Hello;
namespace HelloClient
{
class Program
{
public static void Main(string[] args)
{
Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure);
var client = new HelloService.HelloServiceClient(channel);
String user = "Euler";
var re... | ```c#
using System;
using Grpc.Core;
using Hello;
namespace HelloClient
{
class Program
{
public static void Main(string[] args)
{
Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure);
var client = new HelloService.HelloServiceClient(channel);
// ideally you should check for e... |
cb9256fb-a165-4ccf-a6e8-60d7076f1a13 | {
"language": "C#"
} | ```c#
@model IEnumerable<Article>
@{
ViewData["Title"] = "Home Page";
}
<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="/">Home</a></li>
<li role="presentation"><a href="https://kenticocloud.com/" target="... | ```c#
@model IEnumerable<Article>
@{
ViewData["Title"] = "Home Page";
}
<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="/">Home</a></li>
<li role="presentation"><a href="https://kenticocloud.com/" target="... |
e5831c67-d004-472f-8973-56a02f9c7052 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Manatee.Json.Serialization.Internal.AutoRegistration
{
internal class StackSerializationDelegateProvider : SerializationDelegateProviderBase
{
public override bool CanHandle(Type type)
{
retu... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Manatee.Json.Serialization.Internal.AutoRegistration
{
internal class StackSerializationDelegateProvider : SerializationDelegateProviderBase
{
public override bool CanHandle(Type type)
{
retu... |
51e6e09c-a48b-4f8e-82e0-3b955077096a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
namespace HeadRaceTimingSite.Models
{
public class Crew
{
public int CrewId { get; set; }
public string Name { get; set; }
public i... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
namespace HeadRaceTimingSite.Models
{
public class Crew
{
public int CrewId { get; set; }
public string Name { get; set; }
public i... |
b1707cd0-87ee-4489-94e0-234a49e02279 | {
"language": "C#"
} | ```c#
#if NETFX_CORE
namespace HelixToolkit.UWP
#else
namespace HelixToolkit.Wpf.SharpDX
#endif
{
using Model.Scene;
/// <summary>
/// Highlight the border of meshes
/// </summary>
public class PostEffectMeshBorderHighlight : PostEffectMeshOutlineBlur
{
protected override SceneNode OnCr... | ```c#
#if NETFX_CORE
namespace HelixToolkit.UWP
#else
namespace HelixToolkit.Wpf.SharpDX
#endif
{
using Model.Scene;
/// <summary>
/// Highlight the border of meshes
/// </summary>
public class PostEffectMeshBorderHighlight : PostEffectMeshOutlineBlur
{
protected override SceneNode OnCr... |
b7ac3317-367a-4ada-8321-caf8df940743 | {
"language": "C#"
} | ```c#
#region Copyright 2014 Exceptionless
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ht... | ```c#
#region Copyright 2014 Exceptionless
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ht... |
f76f86d9-aa97-4f6b-8814-aecf43b1e2d1 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Battlezeppelins.Models;
namespace Battlezeppelins.Controllers
{
public class GameController : BaseController
{
public ActionResult Metadata()
{
Game g... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Battlezeppelins.Models;
namespace Battlezeppelins.Controllers
{
public class GameController : BaseController
{
public ActionResult Metadata()
{
Game g... |
dcb51fe4-391e-4898-aa12-8d449a23ce80 | {
"language": "C#"
} | ```c#
namespace Ductus.FluentDocker.Model.HostEvents
{
/// <summary>
/// Base evnet emitte by the docker dameon using e.g. docker events.
/// </summary>
/// <remarks>
/// See docker documentation https://docs.docker.com/engine/reference/commandline/events/
/// </remarks>
public class Event
... | ```c#
namespace Ductus.FluentDocker.Model.HostEvents
{
/// <summary>
/// Base evnet emitte by the docker dameon using e.g. docker events.
/// </summary>
/// <remarks>
/// See docker documentation https://docs.docker.com/engine/reference/commandline/events/
/// </remarks>
public class Event
{
/// <su... |
042b0b3f-e4c3-4b5d-af28-5051a03b7cba | {
"language": "C#"
} | ```c#
namespace FakeItEasy.Core
{
using System;
using static FakeItEasy.ObjectMembers;
internal class StrictFakeRule : IFakeObjectCallRule
{
private readonly StrictFakeOptions options;
public StrictFakeRule(StrictFakeOptions options)
{
this.options = opti... | ```c#
namespace FakeItEasy.Core
{
using System;
using static FakeItEasy.ObjectMembers;
internal class StrictFakeRule : IFakeObjectCallRule
{
private readonly StrictFakeOptions options;
public StrictFakeRule(StrictFakeOptions options)
{
this.options = opti... |
0865d887-2cfe-4d2f-873d-e56dcf449d0f | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated... | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated... |
4844e15c-153b-415c-9b83-bad8dae972de | {
"language": "C#"
} | ```c#
using Espera.Network;
using Newtonsoft.Json;
using System;
namespace Espera.Core
{
public class SoundCloudSong : Song
{
public SoundCloudSong()
: base(String.Empty, TimeSpan.Zero)
{ }
[JsonProperty("artwork_url")]
public Uri ArtworkUrl { get; set; }
p... | ```c#
using Espera.Network;
using Newtonsoft.Json;
using System;
namespace Espera.Core
{
public class SoundCloudSong : Song
{
private User user;
public SoundCloudSong()
: base(String.Empty, TimeSpan.Zero)
{ }
[JsonProperty("artwork_url")]
public Uri Artwork... |
9b39dda0-980f-4cb3-8001-046c6b0c96b9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WinUsbInit
{
class DeviceArrivalListener : NativeWindow
{
// Constant value was found in the "windows.h" header file.
private const in... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WinUsbInit
{
class DeviceArrivalListener : NativeWindow
{
// Constant values was found in the "windows.h" header file.
private const i... |
dd329dee-cb10-4768-86b9-4d152d7ff6ea | {
"language": "C#"
} | ```c#
using System;
using Gtk;
namespace LynnaLab
{
[System.ComponentModel.ToolboxItem(true)]
public partial class SpinButtonHexadecimal : Gtk.SpinButton
{
public SpinButtonHexadecimal() : base(0,100,1)
{
this.Numeric = false;
}
protected override int OnOutput(... | ```c#
using System;
using Gtk;
namespace LynnaLab
{
[System.ComponentModel.ToolboxItem(true)]
public partial class SpinButtonHexadecimal : Gtk.SpinButton
{
public SpinButtonHexadecimal() : base(0,100,1)
{
this.Numeric = false;
}
protected override int OnOutput(... |
374b24d8-caf6-4c3e-9c71-a28c7952700d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Graph
{
/// <summary>
/// Represents an undirected edge (link) in a labeled <see cref="IGraph"/>.
/// </summary>
/// <typeparam name="V">
/// The type used to create vertex (node) labels.
/// </typeparam>
/// <typeparam name="... | ```c#
using System;
using System.Collections.Generic;
namespace Graph
{
/// <summary>
/// Represents an undirected edge (link) in a labeled <see cref="IGraph"/>.
/// </summary>
/// <typeparam name="V">
/// The type used to create vertex (node) labels.
/// </typeparam>
/// <typeparam name="... |
0a96a065-bed6-48b9-9b4f-4184efa43402 | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
namespace Toggl.Phoebe.Data
{
public class ForeignKeyJsonConverter : JsonConverter
{
public override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
{
var model = (Model)value;
if (model == null) {
... | ```c#
using System;
using Newtonsoft.Json;
namespace Toggl.Phoebe.Data
{
public class ForeignKeyJsonConverter : JsonConverter
{
public override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
{
var model = (Model)value;
if (model == null) {
... |
b030bce2-26df-43c1-a513-4f5b2f00ae6f | {
"language": "C#"
} | ```c#
using System;
using Android.App;
using Android.Content;
using Android.Support.V4.Content;
namespace Toggl.Joey.Net
{
[BroadcastReceiver (Permission = "com.google.android.c2dm.permission.SEND")]
[IntentFilter (new string[] { "com.google.android.c2dm.intent.RECEIVE" },
Categories = new string[]{ "c... | ```c#
using System;
using Android.App;
using Android.Content;
using Android.Support.V4.Content;
namespace Toggl.Joey.Net
{
[BroadcastReceiver (Permission = "com.google.android.c2dm.permission.SEND")]
[IntentFilter (new string[] { "com.google.android.c2dm.intent.RECEIVE" },
Categories = new string[]{ "c... |
de11a849-b4d4-4c2f-9dd3-158bc1473ef3 | {
"language": "C#"
} | ```c#
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MarkdownDeep;
using SIL.IO;
namespace SIL.Windows.Forms.ReleaseNotes
{
/// <summary>
/// Shows a dialog for release notes; accepts html and markdown
/// </summary>
public partial class ShowReleaseNotesDialog : Form
{
p... | ```c#
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MarkdownDeep;
using SIL.IO;
namespace SIL.Windows.Forms.ReleaseNotes
{
/// <summary>
/// Shows a dialog for release notes; accepts html and markdown
/// </summary>
public partial class ShowReleaseNotesDialog : Form
{
p... |
3f4de645-f8eb-470c-904c-511beac95fd2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace VasysRomanNumeralsKata
{
public class RomanNumeral
{
private int? _baseTenRepresentation = null;
public RomanNumeral(int baseTenNumber)
{
_baseTenRepresentation = baseTenNumber;
}
... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace VasysRomanNumeralsKata
{
public class RomanNumeral
{
private int? _baseTenRepresentation = null;
public RomanNumeral(int baseTenNumber)
{
_baseTenRepresentation = baseTenNumber;
}
... |
ccd58703-2ce4-4d44-90ad-093bbfc1b2a4 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
namespace AssemblyInfo
{
class Program
{
static void Main(string[] args)
{
if (args != null && args.Length > 0)
{
Assembly asm = null;
var name = args[0];
try
{... | ```c#
using System;
using System.Reflection;
namespace AssemblyInfo
{
class Program
{
static void Main(string[] args)
{
if (args != null && args.Length > 0)
{
Assembly asm = null;
var name = args[0];
try
{... |
479b5dea-b067-4242-bddd-aeca8c4962bc | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Validation;
// Adapted from
// https://blogs.msdn.microsoft.com/ericwhite/2010/03/04/validate-open-xml-documents-using-the-open-xml-sdk-2-0/
namespace XlsxValidator
{
class MainClass
{
public static void M... | ```c#
using System;
using System.Linq;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Validation;
// Adapted from
// https://blogs.msdn.microsoft.com/ericwhite/2010/03/04/validate-open-xml-documents-using-the-open-xml-sdk-2-0/
namespace XlsxValidator
{
class MainClass
{
public static void M... |
72bc4185-5fb6-4336-bcf4-f03b4451d229 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Xunit;
using DiceApi.WebApi.Controllers;
namespace DiceApi.WebApi.Tests
{
/// <summary>
/// Test class for <see cref="DieController" />.
/// </summary>
public class DieControllerTest
{
/// <summary>
/// Verifies that Get() returns a BadR... | ```c#
using Microsoft.AspNetCore.Mvc;
using Xunit;
using DiceApi.WebApi.Controllers;
namespace DiceApi.WebApi.Tests
{
/// <summary>
/// Test class for <see cref="DieController" />.
/// </summary>
public class DieControllerTest
{
/// <summary>
/// Verifies that Get() returns a BadR... |
5fcb361a-d528-4cc3-bdb7-cd2ef61b57da | {
"language": "C#"
} | ```c#
using System;
using Serilog;
using Serilog.Events;
using SerilogWeb.Classic;
namespace SerilogWeb.Test
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
ApplicationLifecycleModule.FormDataLoggingLevel = LogEven... | ```c#
using System;
using Serilog;
using Serilog.Events;
using SerilogWeb.Classic;
namespace SerilogWeb.Test
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
// ReSharper disable once PossibleNullReferenceException
... |
76ede54a-4310-4160-a5f3-1e0b82208ef1 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BrightstarDB.InternalTests
{
internal static class TestConfiguration
{
public static string DataLocation = "..\\..\\Data\\";
}
}
```
Fix path to internal test data location | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BrightstarDB.InternalTests
{
internal static class TestConfiguration
{
public static string DataLocation = "..\\..\\..\\Data\\";
}
}
``` |
893d0644-adeb-456a-820e-8de1238305f4 | {
"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;
namespace CefSharp
{
/// <summary>
/// Event arguments to the IsBrowserInitializedChanged event handler.
/// </summary>
p... | ```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;
namespace CefSharp
{
/// <summary>
/// Event arguments to the IsBrowserInitializedChanged event handler.
/// </su... |
ae5dba13-0128-46e0-b4be-cc662531c518 | {
"language": "C#"
} | ```c#
using Evolve.Migration;
using System.Collections.Generic;
using Evolve.Utilities;
using Evolve.Connection;
namespace Evolve.Metadata
{
public abstract class MetadataTable : IEvolveMetadata
{
protected IWrappedConnection _wrappedConnection;
public MetadataTable(string schema, string tabl... | ```c#
using Evolve.Migration;
using System.Collections.Generic;
using Evolve.Utilities;
using Evolve.Connection;
namespace Evolve.Metadata
{
public abstract class MetadataTable : IEvolveMetadata
{
protected IWrappedConnection _wrappedConnection;
public MetadataTable(string schema, string tabl... |
bc206daa-6eb9-49ee-b394-33e51d3b9fcd | {
"language": "C#"
} | ```c#
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Runtime.InteropServices;
using PInvoke;
using Xunit;
using static PInvoke.Kernel32;
public partial class Kern... | ```c#
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using PInvoke;
using Xunit;
using static PInvoke.Kernel32;
p... |
19c371cd-c886-4774-a8dd-805cbc9410df | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using strange.extensions.context.impl;
using strange.extensions.context.api;
public class RootContext : MVCSContext, IRootContext
{
public RootContext(MonoBehaviour view) : base(view)
{
}
public RootContext(MonoBehaviour view, ContextStartupFlags f... | ```c#
using UnityEngine;
using System.Collections;
using strange.extensions.context.impl;
using strange.extensions.context.api;
public class RootContext : MVCSContext, IRootContext
{
public RootContext(MonoBehaviour view) : base(view)
{
}
public RootContext(MonoBehaviour view, ContextStartupFlags f... |
7e2e2b35-edbd-41c2-9df3-044f11a0eae1 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System;
using System.Linq;
using osu.Framework.IO.Stores;
using osu.Game.Beatmaps;
using osu.Game.Extensions;
using osu.Game.Rulesets;
usin... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System;
using System.Linq;
using osu.Framework.IO.Stores;
using osu.Game.Beatmaps;
using osu.Game.Extensions;
using osu.Game.Rulesets;
usin... |
0d5f905e-683f-4ee6-a443-7a25bcd75eaf | {
"language": "C#"
} | ```c#
using System;
using System.Net;
using Arango.fastJSON;
namespace Arango.Client.Protocol
{
internal class Response
{
internal int StatusCode { get; set; }
internal WebHeaderCollection Headers { get; set; }
internal string Body { get; set; }
internal DataType Dat... | ```c#
using System;
using System.Net;
using Arango.fastJSON;
namespace Arango.Client.Protocol
{
internal class Response
{
internal int StatusCode { get; set; }
internal WebHeaderCollection Headers { get; set; }
internal string Body { get; set; }
internal DataType Dat... |
55ee5e50-3d7e-432b-95e1-ea996799ca83 | {
"language": "C#"
} | ```c#
using AutoMapper;
using SnittListan.Models;
using SnittListan.ViewModels;
namespace SnittListan.Infrastructure
{
public class MatchProfile : Profile
{
protected override void Configure()
{
Mapper.CreateMap<Match, MatchViewModel>()
.ForMember(x => x.Date, o => o.MapFrom(y => y.Date.ToShor... | ```c#
using System.Threading;
using AutoMapper;
using SnittListan.Models;
using SnittListan.ViewModels;
namespace SnittListan.Infrastructure
{
public class MatchProfile : Profile
{
protected override void Configure()
{
Mapper.CreateMap<Match, MatchViewModel>()
.ForMember(x => x.Date, o => o.M... |
26b814df-9a13-4057-a8bc-5d7940265b07 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
public static IEnumerable<CodeInstruction> MethodReplacer(this IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to, OpCode? callOp... | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
public static IEnumerable<CodeInstruction> MethodReplacer(this IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to)
{
if (fro... |
7b9b1a5e-8ea7-49a1-b8d0-3c75e2855e38 | {
"language": "C#"
} | ```c#
// Copyright (c) Martin Costello, 2016. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.Website
{
using System;
using Extensions;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.H... | ```c#
// Copyright (c) Martin Costello, 2016. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.Website
{
using System;
using System.Threading.Tasks;
using Extensions;
using Microsoft.AspNetCore... |
b474a6e5-a78a-4b88-ab4e-51173d4721f7 | {
"language": "C#"
} | ```c#
using System.Windows;
namespace MilitaryPlanner.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
//InitializeComponent();
}
}
}
```
Fix for saving window st... | ```c#
using System.Windows;
namespace MilitaryPlanner.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
//InitializeComponent();
}
protected override void OnCl... |
ebe88026-e70b-4bb4-8b1c-6de3fd3d2f96 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ExprOpt = Microsoft.FSharp.Core.FSharpOption<AST.Expression>;
using Expr = AST.Expression;
namespace ParcelTest
{
[TestClass]
class PrecedenceTests
{
[TestMethod]
public void MultiplicationVsAdditionPrecedenceTes... | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ExprOpt = Microsoft.FSharp.Core.FSharpOption<AST.Expression>;
using Expr = AST.Expression;
namespace ParcelTest
{
[TestClass]
public class PrecedenceTests
{
[TestMethod]
public void MultiplicationVsAdditionPreced... |
0d845f54-64a1-4856-aa1f-4c629a7d6b62 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Nest.Resolvers.Converters;
using Newtonsoft.Json;
namespace Nest
{
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
[JsonConverter(typeof(ReadAsTypeConverter<MatchAllQuery>))]
public interfac... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Nest.Resolvers.Converters;
using Newtonsoft.Json;
namespace Nest
{
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
[JsonConverter(typeof(ReadAsTypeConverter<MatchAllQuery>))]
public interfac... |
7b57c7cf-bb07-41d2-990e-703347b17248 | {
"language": "C#"
} | ```c#
using System;
using System.Text;
using ModIso8583.Parse;
using ModIso8583.Util;
using Xunit;
namespace ModIso8583.Test.Parse
{
public class TestEncoding
{
[Fact(Skip = "character encoding issue")]
public void WindowsToUtf8()
{
string data = "05ácido";
Enco... | ```c#
using System;
using System.Text;
using ModIso8583.Parse;
using ModIso8583.Util;
using Xunit;
namespace ModIso8583.Test.Parse
{
public class TestEncoding
{
[Fact]
public void WindowsToUtf8()
{
string data = "05ácido";
Encoding encoding = Encoding.GetEncodin... |
beac2051-674d-4f70-8c98-dc675f161f07 | {
"language": "C#"
} | ```c#
using Abp.AspNetCore.Mvc.Controllers;
using Abp.IdentityFramework;
using Microsoft.AspNetCore.Identity;
namespace Repairis.Controllers
{
public abstract class RepairisControllerBase: AbpController
{
protected RepairisControllerBase()
{
LocalizationSourceName = RepairisConsts.L... | ```c#
using Abp.AspNetCore.Mvc.Controllers;
using Abp.IdentityFramework;
using Abp.Runtime.Validation;
using Microsoft.AspNetCore.Identity;
namespace Repairis.Controllers
{
[DisableValidation]
public abstract class RepairisControllerBase: AbpController
{
protected RepairisControllerBase()
{... |
7604dfd4-8dd0-459e-8099-15e8221fdbf7 | {
"language": "C#"
} | ```c#
using ReactiveUI;
using Windows.UI.Xaml;
namespace Ets.Mobile.Pages.Main
{
public sealed partial class MainPage
{
partial void PartialInitialize()
{
// Ensure to hide the status bar
var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();... | ```c#
using System;
using Windows.UI.Xaml;
using EventsMixin = Windows.UI.Xaml.Controls.EventsMixin;
namespace Ets.Mobile.Pages.Main
{
public sealed partial class MainPage
{
partial void PartialInitialize()
{
// Ensure to hide the status bar
var statusBar = W... |
24ac360d-7dc5-46a4-b0a5-c263e9f6f2c1 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CORS.Controllers
{
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "This is a CORS requ... | ```c#
using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CORS.Controllers
{
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "This is a CORS requ... |
06a32507-4116-46e8-bdef-77c86769342f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Sandbox.Game.World;
using Torch.Managers.PatchManager;
using Torch.Mod;
using VRage.Game;
namespace Torch.Patches
{
[PatchShim]
internal class SessionDownloa... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Sandbox.Game.World;
using Torch.Managers.PatchManager;
using Torch.Mod;
using VRage.Game;
namespace Torch.Patches
{
[PatchShim]
internal static class Session... |
d7dfa0f8-4aba-4d3c-b003-d17358b82b32 | {
"language": "C#"
} | ```c#
namespace Colore.Tests
{
using System;
using NUnit.Framework;
[TestFixture]
public class ColoreExceptionTests
{
[Test]
public void ShouldSetMessage()
{
const string Expected = "Test message.";
Assert.AreEqual(Expected, new ColoreException("Tes... | ```c#
namespace Colore.Tests
{
using System;
using NUnit.Framework;
[TestFixture]
public class ColoreExceptionTests
{
[Test]
public void ShouldSetMessage()
{
const string Expected = "Test message.";
Assert.AreEqual(Expected, new ColoreException("Tes... |
ae8b64c1-254d-4bb7-a918-2581c14f903e | {
"language": "C#"
} | ```c#
@model IEnumerable<Soldier>
<h2>Soldiers @Html.ActionLink("Add New", "New", "Soldiers", null, new { @class = "btn btn-default" })</h2>
<table class="table table-striped">
<thead>
<tr>
<th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Rank)</th>
<th>@Html.DisplayNameFor(_ => _... | ```c#
@model IEnumerable<Soldier>
<h2>Soldiers @Html.ActionLink("Add New", "New", "Soldiers", null, new { @class = "btn btn-default" })</h2>
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Rank)</th>
<th>@Html... |
a14bc825-2d95-42df-8a21-29755c88c3b9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Faker
{
public static class NumberFaker
{
private static Random _random = new Random();
public static int Number()
{
return _random.Next();
}
public static int Number(int maxValue)
{
return _ran... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace Faker
{
public static class NumberFaker
{
private static readonly RNGCryptoServiceProvider Global = new RNGCryptoServiceProvider();
[ThreadStatic]
... |
368ac604-6d37-4fc2-ba91-07ab07d59e06 | {
"language": "C#"
} | ```c#
@model IEnumerable<(GommeHDnetForumAPI.Models.Entities.UserInfo UserInfo, Discord.WebSocket.SocketGuild Guild)>
<h4>Verifizierungen</h4>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th></th>
<th>
@Html.DisplayNameFor(model => model.UserInfo.Username)
</th>
<th>
... | ```c#
@model IEnumerable<(GommeHDnetForumAPI.Models.Entities.UserInfo UserInfo, Discord.WebSocket.SocketGuild Guild)>
<h4>Verifizierungen</h4>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th></th>
<th>
@Html.DisplayNameFor(model => model.UserInfo.Username)
</th>
<th>
... |
1a31bc68-2b69-4b70-bdd2-340e0bbc32b1 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DomainCore;
using DomainCore.Interfaces;
namespace Application.Interfaces
{
/// <summary>
/// Primary application interface
/// </summary>
public interface IInventoryService
{
/* ReadModel */
... | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DomainCore;
namespace Application.Interfaces
{
public interface IInventoryService
{
/* ReadModel */
// Get all
Task<IEnumerable<InventoryItemDto>> InventoryAsync();
// Get one
... |
c867b982-b41f-4980-a619-91ec28a3d476 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Objects.Get.Movies
{
using Basic;
using Newtonsoft.Json;
public class TraktMovieImages
{
[JsonProperty(PropertyName = "fanart")]
public TraktImageSet FanArt { get; set; }
[JsonProperty(PropertyName = "poster")]
public TraktImageSet Poster ... | ```c#
namespace TraktApiSharp.Objects.Get.Movies
{
using Basic;
using Newtonsoft.Json;
/// <summary>A collection of images and image sets for a Trakt movie.</summary>
public class TraktMovieImages
{
/// <summary>Gets or sets the fan art image set.</summary>
[JsonProperty(PropertyNa... |
14d23fc0-4d17-49cf-b689-8d483e3d9900 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using WalletWasabi.Models;
using Xunit;
namespace WalletWasabi.Tests.UnitTests
{
public class SerializableExceptionTests
{
[Fact]
public void UtxoRefereeSerialization()
{
var message = "Foo Bar Buzz";
var innerMessage = "Inner Foo B... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using WalletWasabi.Models;
using Xunit;
namespace WalletWasabi.Tests.UnitTests
{
public class SerializableExceptionTests
{
[Fact]
public void UtxoRefereeSerialization()
{
var message = "Foo Bar Buzz";
var innerMessage = "Inner Foo B... |
969f8c26-1273-4b90-b7ca-4f391212e805 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Kudu.Core.SourceControl;
namespace Kudu.Core.Deployment {
public class DeploymentManager : IDeploymentManager {
private readonly IRepository _repository;
private readonly IDeployerFactory _deployerFactory;
publ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Kudu.Core.SourceControl;
namespace Kudu.Core.Deployment {
public class DeploymentManager : IDeploymentManager {
private readonly IRepositoryManager _repositoryManager;
private readonly IDeployerFactory _deployerFactory;... |
24d0f749-a90a-4284-8871-dbe649f265ba | {
"language": "C#"
} | ```c#
using System.Collections.ObjectModel;
using CoCo.UI.Data;
namespace CoCo.UI.ViewModels
{
public class OptionViewModel : BaseViewModel
{
public OptionViewModel(Option option, IResetValuesProvider resetValuesProvider)
{
// TODO: it will invoke one event at invocation of clear a... | ```c#
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Data;
using CoCo.UI.Data;
namespace CoCo.UI.ViewModels
{
public class OptionViewModel : BaseViewModel
{
private readonly ObservableCollection<LanguageViewModel> _languages = new ObservableCollection<LanguageV... |
443ae580-4c3c-434f-a4f2-a427e93c988f | {
"language": "C#"
} | ```c#
using osu.Framework.Allocation;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using System;
using System.Collections.Generic;
using osuTK;
namespace osu.Framework.Tests.Visual.Sprites
{
public class TestSceneTexturedTriangle : FrameworkTestScene
... | ```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.Shapes;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osuTK;
namespace o... |
f10df392-c125-46f8-bb99-4d7e93b3fd38 | {
"language": "C#"
} | ```c#
public sealed class AppVeyorSettings
{
public bool IsLocal { get; set; }
public bool IsRunningOnAppVeyor { get; set; }
public bool IsPullRequest { get; set; }
public bool IsDevelopBranch { get; set; }
public bool IsMasterBranch { get; set; }
public bool IsTaggedBuild { get; set; }
publ... | ```c#
public sealed class AppVeyorSettings
{
public bool IsLocal { get; set; }
public bool IsRunningOnAppVeyor { get; set; }
public bool IsPullRequest { get; set; }
public bool IsDevelopBranch { get; set; }
public bool IsMasterBranch { get; set; }
public bool IsTaggedBuild { get; set; }
publ... |
73640ac3-5a71-44d5-9351-9a4393f4b3fd | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Resources;
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: AssemblyTitle("BindableApp... | ```c#
using System.Reflection;
using System.Resources;
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: AssemblyTitle("BindableApp... |
ff2c947e-e9a1-4ccf-bd0b-4e38ba0a8254 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ReleaseManager
{
class Program
{
static void Main(string[] args)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ReleaseManager
{
class Program
{
static void Main(string[] args)
{
... |
19eb7d5b-9588-47d8-871c-0377b43c51fb | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Screens;
namespace osu.Game.Graphics.UserInterface
{
/// <summar... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Screens;
namespace osu.Game.Graphics.UserInterface
{
/// <summar... |
7ebe2033-ac59-4683-9b46-608573dcbdd4 | {
"language": "C#"
} | ```c#
using System;
using R7.University.Core.Templates;
namespace R7.University.Core.Tests
{
class Program
{
static void Main (string [] args)
{
Console.WriteLine ("Please enter test number and press [Enter]:");
Console.WriteLine ("1. Workbook to CSV");
Conso... | ```c#
using System;
using R7.University.Core.Templates;
namespace R7.University.Core.Tests
{
class Program
{
static void Main (string [] args)
{
while (true) {
Console.WriteLine ("> Please enter test number and press [Enter]:");
Console.WriteLine ("--... |
8f2fc616-8591-4a1b-944e-3d509d0d3b62 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using ActiproSoftware.Text.Implementation;
namespace NQueryViewerActiproWpf
{
[Export(typeof(ILanguageServiceRegistrar))]
internal sealed class ComposableLanguageServiceRegistrar : ILanguageServiceRegistrar
{
... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using ActiproSoftware.Text.Implementation;
namespace NQueryViewerActiproWpf
{
[Export(typeof(ILanguageServiceRegistrar))]
internal sealed class ComposableLanguageServiceRegistrar : ILanguageServiceRegistrar
{
... |
27465607-20ce-459b-a876-a5cf706a788b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LRU.Net
{
public class LruCache<TKey, TValue>
{
private readonly int _maxObjects;
private OrderedDictionary _data;
... | ```c#
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LRU.Net
{
public class LruCache<TKey, TValue>
{
private readonly int _maxObjects;
private OrderedDictionary _data;
... |
61c7fd0e-033a-430b-9664-819a49b4111f | {
"language": "C#"
} | ```c#
namespace Nubot.Core.Nancy
{
using System.Linq;
using Abstractions;
using global::Nancy;
using global::Nancy.Conventions;
using global::Nancy.TinyIoc;
public class Bootstrapper : DefaultNancyBootstrapper
{
private readonly IRobot _robot;
public Bootstrapper(IRobot rob... | ```c#
namespace Nubot.Core.Nancy
{
using System.Linq;
using Abstractions;
using global::Nancy;
using global::Nancy.Conventions;
using global::Nancy.TinyIoc;
public class Bootstrapper : DefaultNancyBootstrapper
{
private readonly IRobot _robot;
public Bootstrapper(IRobot rob... |
761269d9-84bd-480c-bc49-08efa56da2dc | {
"language": "C#"
} | ```c#
private async Task SendAsync(IAudioClient client, string path)
{
// Create FFmpeg using the previous example
var ffmpeg = CreateStream(path);
var output = ffmpeg.StandardOutput.BaseStream;
var discord = client.CreatePCMStream(AudioApplication.Mixed, 1920);
await output.CopyToAsync(discord);
... | ```c#
private async Task SendAsync(IAudioClient client, string path)
{
// Create FFmpeg using the previous example
var ffmpeg = CreateStream(path);
var output = ffmpeg.StandardOutput.BaseStream;
var discord = client.CreatePCMStream(AudioApplication.Mixed);
await output.CopyToAsync(discord);
awai... |
ef057a45-f19a-4d18-9b52-c3a74049de8f | {
"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.Collections.Generic;
using JetBrains.Annotations;
namespace osu.Game.Skinning
{
/// <summary>
/// Provides access to skinnable ... | ```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.Collections.Generic;
using JetBrains.Annotations;
namespace osu.Game.Skinning
{
/// <summary>
/// Provides access to skinnable ... |
89175a40-0454-42ed-bb51-4b6df1194a1c | {
"language": "C#"
} | ```c#
using System;
using NugetCracker.Persistence;
namespace NugetCracker
{
class Program
{
private static MetaProjectPersistence _metaProjectPersistence;
static void Main(string[] args)
{
Console.WriteLine("NugetCracker 0.1\nSee https://github.com/monoman/NugetCracker\n");
_metaProjectP... | ```c#
using System;
using NugetCracker.Persistence;
namespace NugetCracker
{
class Program
{
private static MetaProjectPersistence _metaProjectPersistence;
static Version Version
{
get {
return new System.Reflection.AssemblyName(System.Reflection.Assembly.GetCallingAssembly().FullName).... |
7feb5b04-a71b-484e-9968-3f78f38061b8 | {
"language": "C#"
} | ```c#
using System.Net.Http;
using Microsoft.Practices.Unity;
using Moq;
using MyGetConnector.Repositories;
namespace MyGetConnector.Tests
{
public static class TestUnityConfig
{
public static IUnityContainer GetMockedContainer()
{
var container = new UnityContainer();
... | ```c#
using System.Net.Http;
using Microsoft.Practices.Unity;
using Moq;
using MyGetConnector.Repositories;
namespace MyGetConnector.Tests
{
public static class TestUnityConfig
{
public static IUnityContainer GetMockedContainer()
{
var container = new UnityContainer();
... |
d85bd0b3-c843-4b11-8d11-7544b12bcb08 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Concurrent;
using RabbitMQ.Client;
namespace Elders.Cronus.Transport.RabbitMQ
{
public class PublisherChannelResolver
{
private readonly ConcurrentDictionary<string, IModel> channelPerBoundedContext;
private readonly ConnectionResolver connectionRes... | ```c#
using System.Collections.Generic;
using RabbitMQ.Client;
namespace Elders.Cronus.Transport.RabbitMQ
{
public class PublisherChannelResolver
{
private readonly Dictionary<string, IModel> channelPerBoundedContext;
private readonly ConnectionResolver connectionResolver;
private stat... |
76cf6395-8d54-41dd-b85f-a20ada9ffb8b | {
"language": "C#"
} | ```c#
using System.Buffers;
using System.Buffers.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using GitVersion.Extensions;
namespace GitVersion.OutputVariables;
public class VersionVariablesJsonNumberConverter : JsonConverter<string>
{
public override bool CanConvert(Type typeToConvert)
... | ```c#
using System.Buffers;
using System.Buffers.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using GitVersion.Extensions;
namespace GitVersion.OutputVariables;
public class VersionVariablesJsonNumberConverter : JsonConverter<string>
{
public override bool CanConvert(Type typeToConvert)
... |
73316cbd-832a-4c5b-961e-74cb62f948ff | {
"language": "C#"
} | ```c#
using System.IO;
using NUnit.Framework;
namespace XeroApi.Tests
{
public class MimeTypesTests
{
[Test]
public void it_can_return_the_mime_type_for_a_filename()
{
string mimeType = MimeTypes.GetMimeType("anyFilename.pdf");
Assert.AreEqual("application/pdf"... | ```c#
using System.IO;
using NUnit.Framework;
namespace XeroApi.Tests
{
public class MimeTypesTests
{
[Test]
public void it_can_return_the_mime_type_for_a_filename()
{
string mimeType = MimeTypes.GetMimeType("anyFilename.png");
Assert.AreEqual("image/png", mime... |
42196484-b389-4396-8eda-e7f1dd715200 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using DataAccessExamples.Core.Data;
using DataAccessExamples.Core.ViewModels;
namespace DataAccessExamples.Core.Services
{
public class LazyOrmDepartmentService : IDepartmentService
{
private readonly EmployeesContext context;
public LazyOrmDe... | ```c#
using System;
using System.Linq;
using DataAccessExamples.Core.Data;
using DataAccessExamples.Core.ViewModels;
namespace DataAccessExamples.Core.Services
{
public class LazyOrmDepartmentService : IDepartmentService
{
private readonly EmployeesContext context;
public LazyOrmDe... |
e4d1eb85-fe5b-4ff6-9dbe-1e5de3e517e1 | {
"language": "C#"
} | ```c#
using System;
using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Styles;
using Mapsui.UI;
using Mapsui.Utilities;
namespace Mapsui.Samples.Common.Maps
{
public class RasterizingLayerSample : ISample
{
public string Name => "Rasterizing Layer";
public string Category => "Special";
... | ```c#
using System;
using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Styles;
using Mapsui.UI;
using Mapsui.Utilities;
namespace Mapsui.Samples.Common.Maps
{
public class RasterizingLayerSample : ISample
{
public string Name => "Rasterizing Layer";
public string Category => "Special";
... |
9c2cef33-1a5a-41b7-a36a-65217353e9e7 | {
"language": "C#"
} | ```c#
using System.Reflection;
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: AssemblyTitle("XeroApi")]
[assembly: AssemblyDescr... | ```c#
using System.Reflection;
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: AssemblyTitle("XeroApi")]
[assembly: AssemblyDescr... |
59cc5522-a1f4-441d-a602-08241c830312 | {
"language": "C#"
} | ```c#
using System.IO;
namespace Leaf.Nodes
{
/// <summary>
/// Base class for all node types.
/// </summary>
public abstract class Node
{
/// <summary>
/// Writes the data of the node to a stream.
/// </summary>
/// <param name="writer">Writer to use for putting da... | ```c#
using System.IO;
namespace Leaf.Nodes
{
/// <summary>
/// Base class for all node types.
/// </summary>
public abstract class Node
{
/// <summary>
/// Writes the data of the node to a stream.
/// </summary>
/// <param name="writer">Writer to use for putting da... |
aab51791-2539-4fc2-a5e1-5a124a7a9e72 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Nether.Data.Identity
{
public static class LoginP... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Nether.Data.Identity
{
public static class LoginP... |
406af0fa-4fc8-4136-9004-7a1ed1ef2d28 | {
"language": "C#"
} | ```c#
using Glimpse;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;
using System;
using System.Reflection;
namespace Glimpse
{
public class GlimpseServices
{
publ... | ```c#
using Glimpse;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;
using System;
using System.Reflection;
namespace Glimpse
{
public class GlimpseServices
{
publ... |
66dc6807-a8e9-4032-af21-a1fed5557ec2 | {
"language": "C#"
} | ```c#
using Rareform.Validation;
using System.Collections.Generic;
using System.IO;
namespace Espera.Core.Management
{
public class LibraryFileWriter : ILibraryWriter
{
private readonly string targetPath;
public LibraryFileWriter(string targetPath)
{
if (targetPath == null... | ```c#
using Rareform.Validation;
using System;
using System.Collections.Generic;
using System.IO;
namespace Espera.Core.Management
{
public class LibraryFileWriter : ILibraryWriter
{
private readonly string targetPath;
public LibraryFileWriter(string targetPath)
{
if (targ... |
2218828f-ae5d-499f-a34a-de013c52bc47 | {
"language": "C#"
} | ```c#
namespace Mitternacht.Common
{
public class TimeConstants
{
public const int WaitForForum = 500;
public const int TeamUpdate = 60 * 1000;
public const int Birthday = 60 * 1000;
}
}
```
Change Teamupdate time interval to 180s. | ```c#
namespace Mitternacht.Common
{
public class TimeConstants
{
public const int WaitForForum = 500;
public const int TeamUpdate = 3 * 60 * 1000;
public const int Birthday = 60 * 1000;
}
}
``` |
a2d44c7d-f99c-47b0-88ac-680b6309d585 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
namespace NuGet {
public static class ExceptionUtility {
public static Exception Unwrap(Exception exception) {
if (exception == null) {
throw new ArgumentNullException("exception");
}
if (exception.... | ```c#
using System;
using System.Reflection;
namespace NuGet {
public static class ExceptionUtility {
public static Exception Unwrap(Exception exception) {
if (exception == null) {
throw new ArgumentNullException("exception");
}
if (exception.... |
d84f18e8-3941-499c-98d4-5209b422ca55 | {
"language": "C#"
} | ```c#
namespace Fixie.Behaviors
{
public interface CaseBehavior
{
void Execute(Case @case, object instance);
}
}```
Add comment to demo teamcity | ```c#
namespace Fixie.Behaviors
{
public interface CaseBehavior
{
void Execute(Case @case, object instance); //comment to demo teamcity
}
}
``` |
f747c9f5-99ed-4cf5-8e50-3ea823c6b08e | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Infopulse.EDemocracy.Model.BusinessEntities
{
public class UserDetailInfo : BaseEntity
{
[JsonIgnore]
public int UserID { get; set; }
[Required]
public string FirstName { get; ... | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Infopulse.EDemocracy.Model.BusinessEntities
{
public class UserDetailInfo : BaseEntity
{
[JsonIgnore]
public int UserID { get; set; }
[Required]
public string FirstName { get; ... |
a8d5f227-09fc-4dab-bfeb-96161824ed17 | {
"language": "C#"
} | ```c#
using System;
using EntityFramework.Mapping;
using Xunit;
using Tracker.SqlServer.CodeFirst;
using Tracker.SqlServer.CodeFirst.Entities;
using Tracker.SqlServer.Entities;
using EntityFramework.Extensions;
using Task = Tracker.SqlServer.Entities.Task;
namespace Tracker.SqlServer.Test
{
/// <summary>
/// ... | ```c#
using System;
using EntityFramework.Mapping;
using Xunit;
using Tracker.SqlServer.CodeFirst;
using Tracker.SqlServer.CodeFirst.Entities;
using Tracker.SqlServer.Entities;
using EntityFramework.Extensions;
using Task = Tracker.SqlServer.Entities.Task;
namespace Tracker.SqlServer.Test
{
/// <summary>
/// ... |
6ca58803-3298-475a-a2de-4272f60c9aaa | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
namespace HoloToolkit.Unity
{
/// <summary>
/// The purpose of this class is to provide a cached reference to the main camera. Call... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
namespace HoloToolkit.Unity
{
/// <summary>
/// The purpose of this class is to provide a cached reference to the main camera. Call... |
03629b1e-da55-4c3d-a111-4c2148bf939e | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(MicrogameCollection))]
public class MicrogameCollectionEditor : Editor
{
public override void OnInspectorGUI()
{
MicrogameCollection collection = (MicrogameCollection)target;
if (GUILayou... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Linq;
[CustomEditor(typeof(MicrogameCollection))]
public class MicrogameCollectionEditor : Editor
{
MicrogameCollection collection;
private List<MicrogameList> microgames;
pr... |
448a4ff1-958b-40e7-abea-174a6f1e8a2d | {
"language": "C#"
} | ```c#
@{
var pages = Pages;
}
<ul class="nav navbar-nav navbar-right">
@foreach (var p in pages)
{
@Html.Partial("_PageNavigation", p)
}
@if (Settings.ShowSharedFoldersInMenus)
{
<li>
@SharedFoldersLink()
</li>
}
</ul>```
Fix bug in default nav for shar... | ```c#
@{
var pages = Pages;
}
<ul class="nav navbar-nav navbar-right">
@foreach (var p in pages)
{
@Html.Partial("_PageNavigation", p)
}
@if (Settings.ShowSharedFoldersInMenus && SharedFoldersLinkIsAvailable())
{
<li>
@SharedFoldersLink()
</li>
}
</ul>``... |
5d60499c-ddbc-43a7-81df-9bb461b7dbab | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
private static IEnumerable<CodeInstruction> Replacer(IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to, OpCode opcode)
{
if... | ```c#
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
public static IEnumerable<CodeInstruction> MethodReplacer(this IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to)
{
if (fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.