doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
05c0a939-57f3-467c-8c88-2704135bd742 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using CSharpViaTest.Collections.Annotations;
using CSharpViaTest.Collections.Helpers;
using Xunit;
namespace CSharpViaTest.Collections._30_MapReducePractices
{
[SuperEasy]
public class CountNumberOfWordsInMultipleTextFil... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using CSharpViaTest.Collections.Annotations;
using CSharpViaTest.Collections.Helpers;
using Xunit;
namespace CSharpViaTest.Collections._30_MapReducePractices
{
[Medium]
public class CountNumberOfWordsInMultipleTextFiles
... |
121be94b-6440-4f32-907a-9023ac48e848 | {
"language": "C#"
} | ```c#
using System;
namespace IvionWebSoft
{
public abstract class WebResource
{
public Uri Location { get; private set; }
public bool Success { get; private set; }
public Exception Exception { get; private set; }
public WebResource(Uri uri)
{
if (uri == n... | ```c#
using System;
using System.Net;
namespace IvionWebSoft
{
public abstract class WebResource
{
public Uri Location { get; private set; }
public bool Success { get; private set; }
public Exception Exception { get; private set; }
public WebResource(Uri uri)
{
... |
832e5da9-348c-432b-9a2e-181c8c19e52a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web;
namespace SettingsAPISample.Models
{
public class ARMListEntry<T> where T : INamedObject
{
public static ARMListEntry<T> Create(IEnumerable<T> objects, HttpRequestMessage request)
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web;
namespace SettingsAPISample.Models
{
public class ARMListEntry<T> where T : INamedObject
{
public static ARMListEntry<T> Create(IEnumerable<T> objects, HttpRequestMessage request)
... |
7e33bd45-11a3-4a18-8777-351687a78fff | {
"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... |
34e8daed-7651-4d56-b374-519dbbd2a4a2 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Scr... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Scr... |
5c300e2b-093f-4b25-9a55-18479efd3788 | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="HttpVerb.cs" company="Bremus Solutions">
// Copyright (c) Bremus Solutions. All rights reserved.
// </copyright>
// <author>Timm Bremus</author>
// <license>
// Licensed to the Apache Software Foundation(ASF) u... | ```c#
//-----------------------------------------------------------------------
// <copyright file="HttpVerb.cs" company="Bremus Solutions">
// Copyright (c) Bremus Solutions. All rights reserved.
// </copyright>
// <author>Timm Bremus</author>
// <license>
// Licensed to the Apache Software Foundation(ASF) u... |
8f702885-436e-423f-986b-ad6066ee4446 | {
"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.
//
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class Scope
{
/// <summary>
/// Gets or sets the name o... | ```c#
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class Scope
{
/// <summary>
/// Gets or sets the name o... |
ac44a7c8-dd31-40be-b160-e6564ba19590 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace NetIRC.Messages
{
public class NoticeMessage : IRCMessage, IServerMessage, IClientMessage
{
public string From { get; }
public string Target { get; }
public string Message { get; }
public NoticeMessage(ParsedIRCMessage parsedMe... | ```c#
using System.Collections.Generic;
namespace NetIRC.Messages
{
public class NoticeMessage : IRCMessage, IServerMessage, IClientMessage
{
public string From { get; }
public string Target { get; }
public string Message { get; }
public NoticeMessage(ParsedIRCMessage parsedMe... |
836f8933-ab20-47ba-9013-4a4cc68cca6d | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using ATP.AnimationPathTools;
[ExecuteInEditMode]
public class AnimationPathCurvesDebug : MonoBehaviour {
private AnimationPathAnimator animator;
[Header("Rotation curves")]
public AnimationCurve curveX;
public AnimationCurve curveY;
public Anima... | ```c#
using UnityEngine;
using System.Collections;
using ATP.AnimationPathTools;
[ExecuteInEditMode]
public class AnimationPathCurvesDebug : MonoBehaviour {
private AnimationPathAnimator animator;
private AnimationPath animationPath;
[Header("Animation Path")]
public AnimationCurve pathCurveX;
p... |
ef3e0c17-4dd8-4279-958a-1f8ddf78d8e5 | {
"language": "C#"
} | ```c#
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System.Reflection;
using System.Runtime.CompilerServices;
//[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyTitle ("NDesk.DBus")]
[assembly: AssemblyDescription ("D-Bu... | ```c#
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System.Reflection;
using System.Runtime.CompilerServices;
//[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyTitle ("NDesk.DBus")]
[assembly: AssemblyDescription ("D-Bu... |
4d24c754-cbdb-4da0-8d86-dae9a37d89b2 | {
"language": "C#"
} | ```c#
using Orchard.Localization;
using Orchard.UI.Navigation;
using OShop.Permissions;
namespace OShop.PayPal.Navigation {
public class AdminMenu : INavigationProvider {
public Localizer T { get; set; }
public AdminMenu() {
T = NullLocalizer.Instance;
}
public string... | ```c#
using Orchard.Localization;
using Orchard.UI.Navigation;
using OShop.Permissions;
namespace OShop.PayPal.Navigation {
public class AdminMenu : INavigationProvider {
public Localizer T { get; set; }
public AdminMenu() {
T = NullLocalizer.Instance;
}
public string... |
ea230a09-6992-46c1-beac-c5160a950448 | {
"language": "C#"
} | ```c#
using ImageSharp;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
namespace CollAction.ValidationAttributes
{
public class MaxImageDimensionsAttribute : ValidationAttribute
{
private... | ```c#
using ImageSharp;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
namespace CollAction.ValidationAttributes
{
public class MaxImageDimensionsAttribute : ValidationAttribute
{
private... |
6b9c6760-7f03-4682-8c72-742eb4d803ab | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace UKahoot {
class MainClass {
public static string[] Hosts = {
"tokenserver.ukahoot.it"
};
public static int Port = 5556;
public static TokenServer ts;
public static void Main(string[] args) {
ts = new TokenServer(Hosts,... | ```c#
using System;
using System.Threading;
using System.Threading.Tasks;
namespace UKahoot {
class MainClass {
public static string[] Hosts = {
"tokenserver.ukahoot.it",
"http://tokenserver.ukahoot.it",
"https://tokenserver.ukahoot.it",
"http://www.tokenserver.ukahoot.it",
"https://www.tokenserver.u... |
139a3ab4-529b-4f3b-81fc-b26d33626b82 | {
"language": "C#"
} | ```c#
using ICities;
namespace FogOptions
{
public class LoadingExtension : LoadingExtensionBase
{
public override void OnLevelLoaded(LoadMode mode)
{
base.OnLevelLoaded(mode);
if (mode == LoadMode.LoadMap || mode == LoadMode.NewMap)
{
return... | ```c#
using ICities;
namespace FogOptions
{
public class LoadingExtension : LoadingExtensionBase
{
public override void OnLevelLoaded(LoadMode mode)
{
base.OnLevelLoaded(mode);
FogController.Initialize();
}
public override void OnLevelUnloading()
... |
2eb61000-4c02-45ab-998c-5d49e97ceda4 | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... |
b4ab0854-74c0-4586-b1ba-6c0b297c3edf | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace RandomWalkConsole
{
class Program
{
static void Main(string[] args)
{
var unfinished = Enumerable.Range(0, 1000)
.Select(_ => Walk2())
... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using static System.Console;
using static System.Math;
namespace RandomWalkConsole
{
class Program
{
const int Trials = 1 * 1000;
const int MaxSteps = 100 * 1000 * 1000;
cons... |
b4b63ccf-6754-4cbe-9226-ff4048912840 | {
"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;
namespace osu.Game.Modes.Objects.Types
{
[Flags]
public enum HitObjectType
{
Circle = 1 << 0,
Slider = 1 << ... | ```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;
namespace osu.Game.Modes.Objects.Types
{
[Flags]
public enum HitObjectType
{
Circle = 1 << 0,
Slider = 1 << ... |
e2cb1e67-98e9-4425-917b-d3b2251d25db | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using FluentMigrator.Infrastructure;
namespace FluentMigrator.Tests.Unit
{
using System.Collections.ObjectModel;
using System.Linq;
using FluentMigrator.Expressions;
using Moq;
[TestFixture]
public class AutoReversingMigrationTests
{
private Mock<IMigra... | ```c#
using NUnit.Framework;
using FluentMigrator.Infrastructure;
namespace FluentMigrator.Tests.Unit
{
using System.Collections.ObjectModel;
using System.Linq;
using FluentMigrator.Expressions;
using Moq;
[TestFixture]
public class AutoReversingMigrationTests
{
private Mock<IMigra... |
1692b3aa-bf19-4d57-bdbd-3edb6c970ce6 | {
"language": "C#"
} | ```c#
using LibPixelPet;
using System;
namespace PixelPet.CLI.Commands {
internal class PadPalettesCmd : CliCommand {
public PadPalettesCmd()
: base("Pad-Palettes",
new Parameter(true, new ParameterValue("width", "0"))
) { }
public override void Run(Workbench workbench, ILogger logger) {
int width ... | ```c#
using LibPixelPet;
using System;
namespace PixelPet.CLI.Commands {
internal class PadPalettesCmd : CliCommand {
public PadPalettesCmd()
: base("Pad-Palettes",
new Parameter(true, new ParameterValue("width", "0"))
) { }
public override void Run(Workbench workbench, ILogger logger) {
int width ... |
db7d8ebd-8be7-44e9-9417-b780d4cb6bc4 | {
"language": "C#"
} | ```c#
/////////////////////////////////////////////////////////////////
// Created by : Caesar Moussalli //
// TimeStamp : 31-1-2016 //
// Content : Associate Repositories to the Unit of Work //
// Notes : Send DB context to repositories t... | ```c#
/////////////////////////////////////////////////////////////////
// Created by : Caesar Moussalli //
// TimeStamp : 31-1-2016 //
// Content : Associate Repositories to the Unit of Work //
// Notes : Send DB context to repositories t... |
d44abd47-071b-40f6-9e1b-293437b70ca5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace WalletWasabi.Helpers
{
public static class PasswordConsole
{
/// <summary>
/// Gets the console password.
/// </summary>
public static string ReadPassword()
{
var sb = new StringBuilder();
while (true)
{
Console... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace WalletWasabi.Helpers
{
public static class PasswordConsole
{
/// <summary>
/// Gets the console password.
/// </summary>
public static string ReadPassword()
{
try
{
var sb = new StringBuilder();
while (true)
... |
15624550-ed52-47ae-83ee-97566ba11d5c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management.Automation;
using Extensions.String;
namespace Microsoft.PowerShell.Commands.Utility
{
[Cmdlet("Write", "Host")]
public sealed class WriteHostCommand : ConsoleColorCmdlet
{
[Paramete... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management.Automation;
using Extensions.String;
using System.Collections;
namespace Microsoft.PowerShell.Commands.Utility
{
[Cmdlet("Write", "Host")]
public sealed class WriteHostCommand : ConsoleColorCmdl... |
56e97f61-0c15-4219-b92f-c24f303e9f71 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Movies.Common
{
using Base.Get;
using Enums;
using Objects.Basic;
using Objects.Get.Movies.Common;
using System.Collections.Generic;
internal class TraktMoviesMostCollectedRequest : TraktGetRequest<TraktPaginationListResult<TraktMostCollected... | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Movies.Common
{
using Base;
using Base.Get;
using Enums;
using Objects.Basic;
using Objects.Get.Movies.Common;
using System.Collections.Generic;
internal class TraktMoviesMostCollectedRequest : TraktGetRequest<TraktPaginationListResult<Tr... |
6bbec5c0-2dbb-4f18-b140-6abb982ef754 | {
"language": "C#"
} | ```c#
using System;
using OpenMetaverse;
namespace OpenMetaverse.TestClient
{
public class WearCommand : Command
{
public WearCommand(TestClient testClient)
{
Client = testClient;
Name = "wear";
Description = "Wear an outfit folder from inventory. Usage: wear... | ```c#
using System;
using System.Collections.Generic;
using OpenMetaverse;
namespace OpenMetaverse.TestClient
{
public class WearCommand : Command
{
public WearCommand(TestClient testClient)
{
Client = testClient;
Name = "wear";
Description = "Wear an outfit ... |
9e20783f-5cd3-438c-94c0-eb34ae269460 | {
"language": "C#"
} | ```c#
@model string[]
@Html.DropDownList("[]", new SelectListItem[0])
<script type="text/javascript">
$(function () {
$.ajax({
url: '@Url.Action("Rooms", "Select")',
method: 'post',
success: function(data) {
$("#@Html.IdForModel()__")
... | ```c#
@model string[]
@Html.DropDownList("[]", new SelectListItem[0], new { multiple="multiple" })
<script type="text/javascript">
$(function () {
$.ajax({
url: '@Url.Action("Rooms", "Select")',
method: 'post',
success: function(data) {
$("#@Html.IdForMo... |
b5389ee9-dbe7-4097-b248-6c64cf445686 | {
"language": "C#"
} | ```c#
using System;
namespace Glimpse
{
public class BaseMessage : IMessage
{
public BaseMessage()
{
Id = new Guid();
Time = new DateTime();
}
public Guid Id { get; }
public DateTime Time { get; }
}
}```
Add correct guid/date generation fo... | ```c#
using System;
namespace Glimpse
{
public class BaseMessage : IMessage
{
public BaseMessage()
{
Id = Guid.NewGuid();
Time = DateTime.Now;
}
public Guid Id { get; }
public DateTime Time { get; }
}
}``` |
a9b8bb83-a56c-46a3-a2af-b4dab05afc5e | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
namespace Glimpse.Agent
{
public class RemoteHttpMessagePublisher : IMessagePublisher, IDisposable
{
private readonly HttpClient _httpClient;
private readonly HttpClientHandler _httpHandler;
public RemoteHttpMessagePublisher()
{
... | ```c#
using System;
using System.Net.Http;
namespace Glimpse.Agent
{
public class RemoteHttpMessagePublisher : IMessagePublisher, IDisposable
{
private readonly HttpClient _httpClient;
private readonly HttpClientHandler _httpHandler;
public RemoteHttpMessagePublisher()
{
... |
42afff0e-f02f-4c5c-8474-a26c982f3c9b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Windows.Devices.Geolocation;
using AirQualityInfo.DataClient.Models;
using AirQualityInfo.DataClient.Services;
namespace AirQualityInfo.WP.Services
{
// http://msdn... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Windows.Devices.Geolocation;
using AirQualityInfo.DataClient.Models;
using AirQualityInfo.DataClient.Services;
namespace AirQualityInfo.WP.Services
{
// http://msdn... |
9b1f73de-18c7-436f-b870-84a5e7120c78 | {
"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.Collections.Generic;
using System.Linq;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using ... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System.Collections.Generic;
using System.Linq;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using ... |
d629d510-30e4-4e3a-94f1-8b1c2cd40925 | {
"language": "C#"
} | ```c#
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless... | ```c#
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless... |
589213fa-3253-41e7-afe3-506160e97a60 | {
"language": "C#"
} | ```c#
using System;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
// Table table = new Table(2, 3);
// string output = table.Draw();
// Console.WriteLine(output);
}
}
}
```
Create an instance of Game | ```c#
using System;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
Game game = new Game();
Console.WriteLine("Made a new Game object");
// Table table = new Table(2, 3);
// string output = table.Draw();
// Console.WriteLine(output);
}
}
}... |
279ca403-7a3e-42b5-bade-1094c788c0e6 | {
"language": "C#"
} | ```c#
using System.Reflection;
namespace EvilDICOM.Core.Helpers
{
public static class Constants
{
public static string EVIL_DICOM_IMP_UID = "1.2.598.0.1.2851334.2.1865.1";
public static string EVIL_DICOM_IMP_VERSION = Assembly.GetCallingAssembly().GetName().Version.ToString();
//APPLIC... | ```c#
using System.Reflection;
namespace EvilDICOM.Core.Helpers
{
public static class Constants
{
public static string EVIL_DICOM_IMP_UID = "1.2.598.0.1.2851334.2.1865.1";
public static string EVIL_DICOM_IMP_VERSION = new AssemblyName(Assembly.GetCallingAssembly().FullName).Version.ToString()... |
2cd6d8aa-9574-4918-b395-f7b47bff0313 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Cursor;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Osu.UI;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Osu.... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Cursor;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Osu.UI;
using osu.Game.Rulesets.UI;
using OpenTK;
namespace osu.Gam... |
1fd68b65-e520-45b6-aa28-4393768f4bbd | {
"language": "C#"
} | ```c#
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace DanTup.TestAdapters.Xml
{
public class XmlExternalTestExecutor : ExternalTestExecutor
{
static readonly string extensionFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public override string ExtensionFo... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
namespace DanTup.TestAdapters.Xml
{
public class XmlExternalTestExecutor : ExternalTestExecutor
{
static readonly string extensionFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public overr... |
062f09b4-1d78-4dd2-9f27-384d9693869b | {
"language": "C#"
} | ```c#
using Discord;
using Discord.Commands;
using NadekoBot.Extensions;
using Newtonsoft.Json;
using System.Net.Http;
using System.Threading.Tasks;
using NadekoBot.Common;
using NadekoBot.Common.Attributes;
namespace NadekoBot.Modules.Searches
{
public partial class Searches
{
[Group]
public ... | ```c#
using Discord;
using Discord.Commands;
using NadekoBot.Extensions;
using Newtonsoft.Json;
using System.Net.Http;
using System.Threading.Tasks;
using NadekoBot.Common;
using NadekoBot.Common.Attributes;
namespace NadekoBot.Modules.Searches
{
public partial class Searches
{
[Group]
public ... |
6cfbd2ca-5959-413a-bd62-94df14101f4b | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 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.... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
[assembly: AssemblyTitle("Eto.Platform.Wpf")]
[assembly: AssemblyDescription("")]
[assembly: ThemeInfo (
ResourceDictionaryLocation.SourceAssembly,
ResourceDictionaryLocation.SourceA... |
56649316-0023-4d35-9e6b-6940e6b6f5b4 | {
"language": "C#"
} | ```c#
using System.Linq;
using Orchard.ContentManagement;
using Orchard.ContentManagement.MetaData;
using Orchard.Localization;
using Orchard.UI.Navigation;
namespace Orchard.Core.Contents {
public class AdminMenu : INavigationProvider {
private readonly IContentDefinitionManager _contentDefinitio... | ```c#
using System.Linq;
using Orchard.ContentManagement;
using Orchard.ContentManagement.MetaData;
using Orchard.Localization;
using Orchard.UI.Navigation;
namespace Orchard.Core.Contents {
public class AdminMenu : INavigationProvider {
private readonly IContentDefinitionManager _contentDefinitio... |
7a824c46-cd9e-4e2a-9c2d-90e29771d742 | {
"language": "C#"
} | ```c#
using SFA.DAS.EAS.Domain.Interfaces;
using SFA.DAS.TokenService.Api.Client;
namespace SFA.DAS.EAS.Domain.Configuration
{
public class TokenServiceApiClientConfiguration : ITokenServiceApiClientConfiguration, IConfiguration
{
public string ApiBaseUrl { get; set; }
public string ClientId { ... | ```c#
using System.Security.Cryptography.X509Certificates;
using Microsoft.Azure;
using SFA.DAS.EAS.Domain.Interfaces;
using SFA.DAS.TokenService.Api.Client;
namespace SFA.DAS.EAS.Domain.Configuration
{
public class TokenServiceApiClientConfiguration : ITokenServiceApiClientConfiguration, IConfiguration
{
... |
0bc0aead-2682-47c3-b505-92c79371bc81 | {
"language": "C#"
} | ```c#
using BatteryCommander.Web.Models;
using BatteryCommander.Web.Models.Reports;
using BatteryCommander.Web.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = ... | ```c#
using BatteryCommander.Web.Models;
using BatteryCommander.Web.Models.Reports;
using BatteryCommander.Web.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = ... |
3fac4b3f-086d-44e5-9ee6-b697555ed5db | {
"language": "C#"
} | ```c#
using MyDocs.Common.Contract.Service;
using MyDocs.Common.Model.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.Storage.Pickers;
namespace MyDocs.WindowsStore.Service
{
public class FileOpenPickerService :... | ```c#
using MyDocs.Common.Contract.Service;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.Storage.Pickers;
namespace MyDocs.WindowsStore.Service
{
public class FileOpenPickerService : IFileOpenPicke... |
c5d93ca4-3eaf-4800-a912-3c2f317231d7 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
namespace Elasticsearch.Net.Aws
{
/// <summary>
/// Encapsulates
/// </summary>
public class AwsSettings
{
/// <summary>
/// Gets or sets the region. e.g. us-east-1. Required.
/// </summary>
public string Region { get; set; }
... | ```c#
using System;
using System.Linq;
namespace Elasticsearch.Net.Aws
{
/// <summary>
/// Encapsulates
/// </summary>
public class AwsSettings
{
/// <summary>
/// Gets or sets the region. e.g. us-east-1. Required.
/// </summary>
public string Region { get; set; }
... |
71c328b4-d29b-4db2-86f7-9f4394edd266 | {
"language": "C#"
} | ```c#
using System;
using System.Reactive;
using ReactiveUI;
using GitHub.Models;
namespace GitHub.InlineReviews.ViewModels
{
public class TooltipCommentViewModel : ICommentViewModel
{
internal TooltipCommentViewModel(IAccount user, string body, DateTimeOffset updatedAt)
{
User = u... | ```c#
using System;
using System.Reactive;
using ReactiveUI;
using GitHub.Models;
namespace GitHub.InlineReviews.ViewModels
{
public class TooltipCommentViewModel : ICommentViewModel
{
internal TooltipCommentViewModel(IAccount user, string body, DateTimeOffset updatedAt)
{
User = u... |
6277a76e-8261-4edd-92d6-d4d2d6421c49 | {
"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.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace System.Net.Utilities.Tests
{
internal static class TestSettings
{
... | ```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.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace System.Net.Utilities.Tests
{
internal static class TestSettings
{
... |
d6c0f59f-2330-4f2b-915a-18e9e3a68f34 | {
"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.Framework.Input.Handlers;
using osu.Framework.Input.StateChanges.Events;
using osu.Framework.Platform;
using osuTK;
na... | ```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.Framework.Input.Handlers;
using osu.Framework.Input.StateChanges.Events;
using osu.Framework.Platform;
using osuTK;
na... |
bc529ee6-9408-4d29-aa86-93abb047f0d6 | {
"language": "C#"
} | ```c#
using System;
namespace AsmResolver.PE.Debug
{
/// <summary>
/// Provides an implementation of a debug data entry that was stored in a PE file.
/// </summary>
public class SerializedDebugDataEntry : DebugDataEntry
{
private readonly IDebugDataReader _dataReader;
private readon... | ```c#
using System;
namespace AsmResolver.PE.Debug
{
/// <summary>
/// Provides an implementation of a debug data entry that was stored in a PE file.
/// </summary>
public class SerializedDebugDataEntry : DebugDataEntry
{
private readonly IDebugDataReader _dataReader;
private readon... |
fd27b1a9-ae46-49db-9ae7-00edc7796958 | {
"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... |
62fd51a7-cbd7-4f23-99aa-c65aaa5d77ed | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
// TODO: Automate this
[assembly: AssemblyInformationalVersion ("1.1.0")]
namespace Tomboy {
public class Defines {
public const string VERSION = "1.1.0";
public static readonly string DATADIR = System.IO.Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Locati... | ```c#
using System;
using System.Reflection;
// TODO: Automate this
[assembly: AssemblyInformationalVersion ("1.1.0")]
[assembly: AssemblyProduct("Tomboy")]
[assembly: AssemblyTitle("Tomboy Notes")]
namespace Tomboy {
public class Defines {
public const string VERSION = "1.1.0";
public static readonly string DA... |
310fb1f4-566f-4e19-a864-db067c62d598 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using NSpec;
namespace SampleSpecs.Bug
{
class grandparents_run_first : nspec
{
List<int> ints = null;
void describe_NSpec() //describe RSpec do
{
before = () => ints = new List<int>()... | ```c#
using System.Collections.Generic;
using NSpec;
namespace SampleSpecs.Bug
{
class grandparents_run_first : nspec
{
List<int> ints = null;
void describe_NSpec() //describe RSpec do
{
before = () => ints = new Lis... |
bd71c69e-3cc2-4ad3-ad53-9b62755d74ba | {
"language": "C#"
} | ```c#
using System.Xml;
using FluentNHibernate;
using FluentNHibernate.Mapping;
namespace FluentNHibernate.QuickStart.Domain.Mapping
{
public class CatMap : ClassMap<Cat>, IMapGenerator
{
public CatMap()
{
//set up our generator as UUID.HEX
Id(x => x.Id)
... | ```c#
using System.Xml;
using FluentNHibernate;
using FluentNHibernate.Mapping;
namespace FluentNHibernate.QuickStart.Domain.Mapping
{
public class CatMap : ClassMap<Cat>, IMapGenerator
{
public CatMap()
{
//set up our generator as UUID.HEX
Id(x => x.Id)
... |
42c8727e-181a-47c0-896b-76aeb27dc05a | {
"language": "C#"
} | ```c#
using System.IO;
using System;
namespace Bari.Core.Generic
{
public class LocalFileSystemDirectoryWatcher: IFileSystemDirectoryWatcher
{
private readonly FileSystemWatcher watcher;
private readonly string path;
public event EventHandler<FileSystemChangedEventArgs> Change... | ```c#
using System.IO;
using System;
namespace Bari.Core.Generic
{
public class LocalFileSystemDirectoryWatcher: IFileSystemDirectoryWatcher
{
private readonly FileSystemWatcher watcher;
private readonly string path;
public event EventHandler<FileSystemChangedEventArgs> Change... |
5b94c487-cf35-4cb9-ad71-34545da61610 | {
"language": "C#"
} | ```c#
using System.Linq;
using FluentAssertions;
using Xunit;
namespace Okanshi.Test
{
public class CounterTest
{
private readonly Counter counter;
public CounterTest()
{
counter = new Counter(MonitorConfig.Build("Test"));
}
[Fact]
public void Initi... | ```c#
using System.Linq;
using FluentAssertions;
using Xunit;
namespace Okanshi.Test
{
public class CounterTest
{
private readonly Counter counter;
public CounterTest()
{
counter = new Counter(MonitorConfig.Build("Test"));
}
[Fact]
public void Initi... |
ffc1c186-e1b1-47ce-a696-aec0fda4959d | {
"language": "C#"
} | ```c#
using System.IO;
using System.Security.Cryptography;
using Mono.Security;
using Mono.Security.Cryptography;
namespace Xpdm.PurpleOnion
{
class Program
{
private static void Main()
{
long count = 0;
while (true)
{
RSA pki = RSA.Create();
ASN1 asn = RSAExtensions.ToAsn1Key(pki);
byte[] h... | ```c#
using System;
using System.IO;
using System.Security.Cryptography;
using Mono.Security;
using Mono.Security.Cryptography;
namespace Xpdm.PurpleOnion
{
class Program
{
private static void Main()
{
long count = 0;
while (true)
{
RSA pki = RSA.Create();
ASN1 asn = RSAExtensions.ToAsn1Key(pki)... |
a17bd022-feea-4e7e-8b5e-cd0a2c9c393a | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens... |
a8a1adf1-5125-4f15-ba79-2a3609ac1c5a | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using System.Linq;
using System.Web.Mvc;
using StackExchange.Opserver.Data.Dashboard;
using StackExchange.Opserver.Helpers;
using StackExchange.Opserver.Models;
using StackExchange.Opserver.Views.Dashboard;
namespace StackExchange.Opserver.Controllers
{
public partial class Dash... | ```c#
using System.ComponentModel;
using System.Linq;
using System.Web.Mvc;
using StackExchange.Opserver.Data.Dashboard;
using StackExchange.Opserver.Helpers;
using StackExchange.Opserver.Models;
using StackExchange.Opserver.Views.Dashboard;
namespace StackExchange.Opserver.Controllers
{
public partial class Dash... |
817e6f08-2b42-44d0-983d-a6ec493e6fc2 | {
"language": "C#"
} | ```c#
using System.Data.SqlClient;
using System.Management.Automation;
namespace PSql
{
[Cmdlet(VerbsCommunications.Disconnect, "Sql")]
public class DisconnectSqlCommand : Cmdlet
{
// -Connection
[Alias("c", "cn")]
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromRemaini... | ```c#
using System.Data.SqlClient;
using System.Management.Automation;
namespace PSql
{
[Cmdlet(VerbsCommunications.Disconnect, "Sql")]
public class DisconnectSqlCommand : Cmdlet
{
// -Connection
[Alias("c", "cn")]
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromRemaini... |
3c0ffb98-86f3-43ce-94bb-f213f080cbf7 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.AspNetCore.Hosting;
using TwentyTwenty.Mvc;
using TwentyTwenty.Mvc.ErrorHandling;
using TwentyTwenty.Mvc.HealthCheck;
using TwentyTwenty.Mvc.ReadOnlyMode;
namespace Microsoft.AspNetCore.Builder
{
public static class ErrorHandling
{
public static void UseErrorHandling... | ```c#
using System;
using Microsoft.AspNetCore.Hosting;
using TwentyTwenty.Mvc;
using TwentyTwenty.Mvc.ErrorHandling;
using TwentyTwenty.Mvc.HealthCheck;
using TwentyTwenty.Mvc.ReadOnlyMode;
using TwentyTwenty.Mvc.Version;
namespace Microsoft.AspNetCore.Builder
{
public static class ErrorHandling
{
pub... |
e595b20c-c0a3-494a-bfc0-9e1f2e3f08e9 | {
"language": "C#"
} | ```c#
using System.Runtime.CompilerServices;
using System.Reflection;
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Management")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Utility")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Security")]
[assembly:InternalsVisibleTo("Microsoft.P... | ```c#
using System.Runtime.CompilerServices;
using System.Reflection;
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Management")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Utility")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Security")]
[assembly:InternalsVisibleTo("Microsoft.P... |
d8f2b46c-92f0-4e0e-9830-b77d8d14ffa6 | {
"language": "C#"
} | ```c#
using System;
namespace Stranne.VasttrafikNET.Extensions
{
internal static class DateTimeOffsetExtension
{
private const string TimeZoneName = "W. Europe Standard Time";
public static TimeSpan GetVasttrafikTimeOffset(this DateTimeOffset dateTimeOffset)
{
re... | ```c#
using System;
using System.Runtime.InteropServices;
namespace Stranne.VasttrafikNET.Extensions
{
internal static class DateTimeOffsetExtension
{
public static TimeSpan GetVasttrafikTimeOffset(this DateTimeOffset dateTimeOffset)
{
return TimeZoneInfo.FindSystemTimeZon... |
1a9d6955-f89a-4926-b1f3-065bad65cb9c | {
"language": "C#"
} | ```c#
using System;
using Android.Content;
using Android.Telephony;
using Uri = Android.Net.Uri;
namespace Plugin.Messaging
{
internal class PhoneCallTask : IPhoneCallTask
{
public PhoneCallTask()
{
}
#region IPhoneCallTask Members
public bool CanMakePhoneCall
... | ```c#
using System;
using Android.Content;
using Android.Telephony;
using Uri = Android.Net.Uri;
namespace Plugin.Messaging
{
internal class PhoneCallTask : IPhoneCallTask
{
public PhoneCallTask()
{
}
#region IPhoneCallTask Members
public bool CanMakePhoneCall
... |
752b99dd-e6aa-430f-8392-aad1a655a2cd | {
"language": "C#"
} | ```c#
using CK.AspNet.Auth;
using CK.Auth;
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.AspNetCore.Http
{
/// <summary>
/// Exposes <see cref="WebFrontAuthenticate"/> extension method on <see cref="HttpContext"/>.
/// </summary>
static public class CKAspNetAuth... | ```c#
using CK.AspNet.Auth;
using CK.Auth;
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.AspNetCore.Http
{
/// <summary>
/// Exposes <see cref="WebFrontAuthenticate"/> extension method on <see cref="HttpContext"/>.
/// </summary>
static public class CKAspNetAuth... |
88a1430c-ecd4-4ae7-bd64-ff2556668663 | {
"language": "C#"
} | ```c#
using System.ComponentModel.DataAnnotations;
namespace BoozeHoundCloud.Models.Core
{
public class Account
{
//-------------------------------------------------------------------------
public const int NameMaxLength = 64;
//-----------------------------------------------------------------------... | ```c#
using System.ComponentModel.DataAnnotations;
namespace BoozeHoundCloud.Models.Core
{
public class Account
{
//-------------------------------------------------------------------------
public const int NameMaxLength = 64;
//-----------------------------------------------------------------------... |
a1fd309b-31c7-4747-a20e-dfb54491ce3d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using JabbR.Infrastructure;
using JabbR.Services;
namespace JabbR.Middleware
{
using AppFunc = Func<IDictionary<string, object>, Task>;
public class AuthorizationHandler
{
private rea... | ```c#
using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using JabbR.Infrastructure;
using JabbR.Services;
namespace JabbR.Middleware
{
using AppFunc = Func<IDictionary<string, object>, Task>;
public class AuthorizationHandler
{
private rea... |
a546e577-ab24-4888-b191-b06d95d44b7c | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FistForceApply : MonoBehaviour {
public static float forceAmount = 10000000f;
public forceField forceField;
public GameObject movingParentObj;
public Vector3 oldPosition;
void Start(){
oldPosition = (movingParent... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FistForceApply : MonoBehaviour {
public static float forceAmount = 10000000f;
void OnCollisionEnter(Collision col)
{
if (col.gameObject.tag == "Fish") {
Debug.Log ("COLLIDED - "+col.gameObject.name);
col.rigi... |
c8b2c988-0c8d-432d-8339-7e2b2a9e3c9f | {
"language": "C#"
} | ```c#
using BearLib;
using Roguelike.Entities;
using Roguelike.World;
using System.Collections.Generic;
namespace Roguelike.Render
{
public abstract class Renderer : IRenderer
{
public const int MapLayer = 0;
public const int EntityLayer = 5;
public abstract void RenderEntities(IEnume... | ```c#
using BearLib;
using Roguelike.Entities;
using Roguelike.World;
using System.Collections.Generic;
namespace Roguelike.Render
{
public abstract class Renderer : IRenderer
{
public const int MapLayer = 0;
public const int EntityLayer = 10;
public abstract void RenderEntities(IEnum... |
fd60e95a-2d25-4e68-b555-b296b2e3bd49 | {
"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 System;
namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Extension methods for adding directory browser servi... | ```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 System;
namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Extension methods for adding directory browser servi... |
0ec6a7cf-9be8-4b85-ae87-00466389885b | {
"language": "C#"
} | ```c#
using System;
namespace SharpDX
{
/// <summary>
/// Base class for a <see cref="IDisposable"/> class.
/// </summary>
public abstract class DisposeBase : IDisposable
{
/// <summary>
/// Releases unmanaged resources and performs other cleanup operations before the
/// <s... | ```c#
using System;
namespace SharpDX
{
/// <summary>
/// Base class for a <see cref="IDisposable"/> class.
/// </summary>
public abstract class DisposeBase : IDisposable
{
protected bool IsDisposed;
/// <summary>
/// Releases unmanaged resources and performs other cleanup ... |
d45c598a-3cb2-4693-87e3-c72a8535eab0 | {
"language": "C#"
} | ```c#
@using System.Globalization
@using Microsoft.Extensions.Configuration
@using MartinCostello.LondonTravel.Site
@using MartinCostello.LondonTravel.Site.Extensions
@using MartinCostello.LondonTravel.Site.Models
@using MartinCostello.LondonTravel.Site.Options
@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers"
@a... | ```c#
@using System.Globalization
@using Microsoft.Extensions.Configuration
@using MartinCostello.LondonTravel.Site
@using MartinCostello.LondonTravel.Site.Extensions
@using MartinCostello.LondonTravel.Site.Identity
@using MartinCostello.LondonTravel.Site.Models
@using MartinCostello.LondonTravel.Site.Options
@addTagH... |
cf62d86e-cda6-40c7-8fab-b8c1b9c67897 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.Composition.Hosting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MuffinFramework.Tests
{
[TestClass]
public class MuffinClientTests
{
[TestMethod]
public void DoubleStartTest()
{
// arrange
In... | ```c#
using System;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MuffinFramework.Tests
{
[TestClass]
public class MuffinClientTests
{
[TestMethod]
public... |
4b1467a3-71d7-4051-a9d2-c234da6c697c | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace NFleet.Data
{
public class VehicleDataSet : IResponseData, IVersioned
{
public static string MIMEType = "application/vnd.jyu.nfleet.vehicleset";
public static string MIMEVersion = "2.0";
int IVersioned.VersionNumber { get; set; }
... | ```c#
using System.Collections.Generic;
namespace NFleet.Data
{
public class VehicleDataSet : IResponseData, IVersioned
{
public static string MIMEType = "application/vnd.jyu.nfleet.vehicleset";
public static string MIMEVersion = "2.2";
int IVersioned.VersionNumber { get; set; }
... |
9e026833-c33a-40e3-97bf-249757e5c935 | {
"language": "C#"
} | ```c#
#region
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Owin.Hosting;
using Owin;
using Saturn72.Core;
using Saturn72.Core.Configuration;
using Saturn72.Core.Extensibility;
using Saturn72.Extensions;
#endregion
namespace Saturn72.Module.Owin
{
... | ```c#
#region
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Owin.Hosting;
using Owin;
using Saturn72.Core;
using Saturn72.Core.Configuration;
using Saturn72.Core.Extensibility;
using Saturn72.Extensions;
#endregion
namespace Saturn72.Module.Owin
{
... |
95edf32a-a275-4871-bcf3-91316d699691 | {
"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.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace... | ```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.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace... |
681589ae-3e92-4436-8974-42665a2cbc9b | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
namespace osu.Ga... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
namespace osu.Game.T... |
7ea011e5-ab2f-4124-9be1-2240ee06c1ac | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Documents;
using System.Windows.Media.Media3D;
using Common.Logging;
using NCmdLiner.SolutionCreator.Library.Common;
namespace NCmdLiner.SolutionCreator.Library.Services
{
public class FolderResolver : IFolderResolver... | ```c#
using System.IO;
using System.Linq;
using Common.Logging;
namespace NCmdLiner.SolutionCreator.Library.Services
{
public class FolderResolver : IFolderResolver
{
private readonly ITextResolver _textResolver;
private readonly IFileResolver _fileResolver;
private readonly ILog _logg... |
fc52ac9c-27e6-4353-83aa-916299cec2ed | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeploymentCockpit.Interfaces;
namespace DeploymentCockpit.Data
{
public class UnitOfWorkFactory : IUnitOfWorkFactory
{
public IUnitOfWork Create()
{
retur... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeploymentCockpit.Interfaces;
namespace DeploymentCockpit.Data
{
public class UnitOfWorkFactory : IUnitOfWorkFactory
{
public IUnitOfWork Create()
{
var c... |
d0b2d4f2-c3eb-4ce4-a01f-681d127b1697 | {
"language": "C#"
} | ```c#
using System;
using Memoria.Prime.Ini;
namespace Memoria
{
public sealed partial class Configuration
{
private sealed class GraphicsSection : IniSection
{
public readonly IniValue<Int32> BattleFPS;
public readonly IniValue<Int32> MovieFPS;
public readon... | ```c#
using System;
using Memoria.Prime.Ini;
namespace Memoria
{
public sealed partial class Configuration
{
private sealed class GraphicsSection : IniSection
{
public readonly IniValue<Int32> BattleFPS;
public readonly IniValue<Int32> MovieFPS;
public readon... |
9463fb7c-255a-46e2-a2e4-37eec47e4fcc | {
"language": "C#"
} | ```c#
using Digirati.IIIF.Model.JsonLD;
using Digirati.IIIF.Serialisation;
using Newtonsoft.Json;
namespace Digirati.IIIF.Model.Types.ImageApi
{
// Also known as an "info.json"
public class ImageService : JSONLDBase, IImageService, IHasService
{
// Allow additional context
//public overrid... | ```c#
using Digirati.IIIF.Model.JsonLD;
using Digirati.IIIF.Serialisation;
using Newtonsoft.Json;
namespace Digirati.IIIF.Model.Types.ImageApi
{
// Also known as an "info.json"
public class ImageService : JSONLDBase, IImageService, IHasService
{
// Allow additional context
//public overrid... |
b1e09639-e863-4beb-bc4a-e18ca2321c44 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading;
namespace HotChocolatey.Administrative
{
public class AdministrativeCommanderProvider
{
private Process administrativeProcess;
public AdministrativeCommander Create(Action<string> o... | ```c#
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading;
namespace HotChocolatey.Administrative
{
public class AdministrativeCommanderProvider
{
private Process administrativeProcess;
public AdministrativeCommander Create(Action<string> o... |
4a9b59ae-a780-4175-a1f4-8ed2000f8dae | {
"language": "C#"
} | ```c#
// -----------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Zack Loveless">
// Copyright (c) Zack Loveless. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------------
using Syste... | ```c#
// -----------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Zack Loveless">
// Copyright (c) Zack Loveless. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------------
using Syste... |
498a606f-c7fb-4ff8-ad6a-bcc4969f4f6a | {
"language": "C#"
} | ```c#
using System;
using System.Reactive.Disposables;
using SolidWorks.Interop.sldworks;
namespace SolidworksAddinFramework
{
public static class ModelViewManagerExtensions
{
public static IDisposable CreateSectionView(this IModelViewManager modelViewManager, Action<SectionViewData> config)
{
... | ```c#
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using SolidWorks.Interop.sldworks;
namespace SolidworksAddinFramework
{
public static class ModelViewManagerExtensions
{
private static readonly ISubject<SectionViewData> _CreateSectionVie... |
85a65a5a-394f-4462-b7af-1015cca1e9b1 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
namespace OdeToFood.Controllers
{
public class CuisineController : Controller
{
//
// GET: /Cuisine/
// Without HTTP verbs, invoking search is ambiguous. (Note that the
// MVC framework finds the request ambiguous even though R#
// reports ... | ```c#
using System.Web.Mvc;
namespace OdeToFood.Controllers
{
public class CuisineController : Controller
{
//
// GET: /Cuisine/
// Using HTTP verbs allows the framework to resolve the ambiguity.
[HttpPost]
public ActionResult Search(string name = "french")
{
... |
4f0b3ea3-224f-4b75-a07e-b86d45d0d9c4 | {
"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;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapRequest : APIRequest<AP... | ```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;
using osu.Game.Online.API.Requests.Responses;
#nullable enable
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapReque... |
55a5eeb3-2a59-4917-988b-fbb4faf7b5df | {
"language": "C#"
} | ```c#
using System;
namespace ValveResourceFormat
{
public enum BlockType
{
#pragma warning disable 1591
RERL = 1,
REDI,
NTRO,
DATA,
VBIB,
VXVS,
SNAP,
#pragma warning restore 1591
}
}
```
Add new block types to the enum | ```c#
using System;
namespace ValveResourceFormat
{
public enum BlockType
{
#pragma warning disable 1591
RERL = 1,
REDI,
NTRO,
DATA,
VBIB,
VXVS,
SNAP,
CTRL,
MDAT,
MBUF,
ANIM,
ASEQ,
AGRP,
PHYS,
#pragm... |
30ca87ce-2a9e-445b-884f-74a456aba15f | {
"language": "C#"
} | ```c#
namespace DesktopWidgets.Widgets.LatencyMonitor
{
public static class Metadata
{
public const string FriendlyName = "Latency Monitor";
}
}```
Rename "Latency Monitor" widget to "Network Monitor" | ```c#
namespace DesktopWidgets.Widgets.LatencyMonitor
{
public static class Metadata
{
public const string FriendlyName = "Network Monitor";
}
}``` |
e9cb55f2-9e72-4762-9d3b-b0dc5bc1d019 | {
"language": "C#"
} | ```c#
using System;
using System.Xml;
using Magecrawl.GameEngine.Effects.EffectResults;
namespace Magecrawl.GameEngine.Effects
{
internal class ShortTermEffect : StatusEffect
{
public ShortTermEffect()
{
CTLeft = 0;
m_effectResult = null;
}
... | ```c#
using System;
using System.Xml;
using Magecrawl.GameEngine.Effects.EffectResults;
namespace Magecrawl.GameEngine.Effects
{
internal class ShortTermEffect : StatusEffect
{
public ShortTermEffect()
{
CTLeft = 0;
m_effectResult = null;
}
... |
3da9e5db-6cbc-4a02-9f49-e3c7cf15b76f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CompetitionPlatform.Models
{
public class AuthenticateModel
{
public string FullName { get; set; }
public string Password { get; set; }
}
public class CompetitionPlatformUs... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CompetitionPlatform.Models
{
public class AuthenticateModel
{
public string FullName { get; set; }
public string Password { get; set; }
}
public class CompetitionPlatformUs... |
011a19cb-5882-4438-8926-912fcb95eab8 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using Newtonsoft.Json;
namespace VimeoDotNet.Tests.Settings
{
internal class SettingsLoader
{
private const string SETTINGS_FILE = "vimeoSettings.json";
public static VimeoApiTestSettings LoadSettings()
{
if (!File.Exists(SETTINGS_FILE... | ```c#
using System;
using System.IO;
using Newtonsoft.Json;
namespace VimeoDotNet.Tests.Settings
{
internal class SettingsLoader
{
private const string SETTINGS_FILE = "vimeoSettings.json";
public static VimeoApiTestSettings LoadSettings()
{
if (!File.Exists(SETTINGS_FILE... |
c8531f3c-b5a7-45a1-9676-9c1c058b718b | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Octet.cs" company="Steven Liekens">
// The MIT License (MIT)
// </copyright>
// <summary>
//
// </summary>
// ----------------------------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Octet.cs" company="Steven Liekens">
// The MIT License (MIT)
// </copyright>
// <summary>
//
// </summary>
// ----------------------------------------------------------... |
309c0615-3e54-4772-b1d4-f221212cdcb5 | {
"language": "C#"
} | ```c#
using LiveSplit.Options;
using System;
using System.Linq;
namespace LiveSplit.Model.Comparisons
{
public class LastCompletedRunComparisonGenerator : IComparisonGenerator
{
public IRun Run { get; set; }
public const string ComparisonName = "Last Completed Run";
public const string... | ```c#
using LiveSplit.Options;
using System;
using System.Linq;
namespace LiveSplit.Model.Comparisons
{
public class LastCompletedRunComparisonGenerator : IComparisonGenerator
{
public IRun Run { get; set; }
public const string ComparisonName = "Last Completed Run";
public const string... |
08dc668d-644c-4940-bba3-5ec04a557316 | {
"language": "C#"
} | ```c#
using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2018";
public const ... | ```c#
using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2018";
public const ... |
1f6276f6-84bf-4270-8a62-1dc3224d021f | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using Orchard.DevTools.Models;
using Orchard.Localization;
using Orchard.Mvc.ViewModels;
using Orchard.Themes;
using Orchard.UI.Notify;
namespace Orchard.DevTools.Controllers {
[Themed]
public class HomeController : Controller {
private readonly INotifier _notifier... | ```c#
using System.Web.Mvc;
using Orchard.DevTools.Models;
using Orchard.Localization;
using Orchard.Mvc.ViewModels;
using Orchard.Themes;
using Orchard.UI.Notify;
using Orchard.UI.Admin;
namespace Orchard.DevTools.Controllers {
[Themed]
[Admin]
public class HomeController : Controller {
... |
deb18a54-10cc-4574-93ba-4d98d85a6da2 | {
"language": "C#"
} | ```c#
using System.Windows;
namespace CefSharp.MinimalExample.Wpf
{
public partial class App : Application
{
public App()
{
//Perform dependency check to make sure all relevant resources are in our output directory.
Cef.Initialize(new CefSettings(), shutdownOnProcessExi... | ```c#
using System.Windows;
namespace CefSharp.MinimalExample.Wpf
{
public partial class App : Application
{
public App()
{
//Perform dependency check to make sure all relevant resources are in our output directory.
var settings = new CefSettings();
settings... |
e1e0e668-225d-494e-bf10-4c5a0e660f07 | {
"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 Xunit;
namespace System.Data.SqlClient.Tests
{
public class SqlConnectionBasicTests
{
... | ```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 Xunit;
namespace System.Data.SqlClient.Tests
{
public class SqlConnectionBasicTests
{
... |
e6196bc5-f73a-4f42-8ae2-a5cdbbcc2ee0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Input;
namespace MouseRx2Wpf
{
public class EventsExtension<TElement> where TElement : UIElement
{
public TElement Target { get; }
public IObservable<... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Input;
namespace MouseRx2Wpf
{
public class EventsExtension<TElement> where TElement : UIElement
{
public TElement Target { get; }
public IObservable... |
01234252-eb2d-4a1f-a0f7-a7363f9f6453 | {
"language": "C#"
} | ```c#
namespace DotNetRu.Clients.UI.Pages
{
using System;
using DotNetRu.Clients.Portable.Interfaces;
using DotNetRu.Clients.Portable.Model;
using Xamarin.Forms;
public abstract class BasePage : ContentPage, IProvidePageInfo
{
private DateTime appeared;
public abstract AppPa... | ```c#
using System.Diagnostics;
namespace DotNetRu.Clients.UI.Pages
{
using System;
using DotNetRu.Clients.Portable.Interfaces;
using DotNetRu.Clients.Portable.Model;
using Xamarin.Forms;
public abstract class BasePage : ContentPage, IProvidePageInfo
{
private Stopwatch appeared;
... |
650c3167-6259-41b6-99d0-e0df1be930c4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Storage;
using Audiotica.Core.Extensions;
using Audiotica.Core.Windows.Helpers;
using Audiotica.Database.Services.Interfaces;
using Audiotica.Windows.Services.Interfaces;
using Autofac;
namespace Audiotica.Windows.AppEngine.Bootstr... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Storage;
using Audiotica.Core.Extensions;
using Audiotica.Core.Windows.Helpers;
using Audiotica.Database.Services.Interfaces;
using Audiotica.Windows.Services.Interfaces;
using Autofac;
namespace Audiotica.Windows.AppEngine.Bootstr... |
a9f02e92-cb10-4639-a0ae-2b22eba550b2 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Game.Screens.Menu;
using osu.Game.Users;
namespace osu.Game.Tests.Visual.Menus
{
public class TestSceneDisclaimer : S... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Game.Screens.Menu;
using osu.Game.Users;
namespace osu.Game.Tests.Visual.Menus
{
public class TestSceneDisclaimer : S... |
74938bc0-53a6-4666-b27e-e46aa1f2f5e5 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Mapper()
{
_routeHandler = new MvcRouteHandler();
}
protected Route GenerateRoute(string path, string controller, string action, stri... | ```c#
using System.Web.Mvc;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Mapper()
{
_routeHandler = new MvcRouteHandler();
}
protected Route GenerateRoute(string path, string controller, string action, stri... |
e1c82dc9-f041-4512-89a1-eeec752e8d96 | {
"language": "C#"
} | ```c#
using Should;
using Xunit;
namespace Cassette.Less
{
public class LessCompiler_Compile
{
[Fact]
public void Compile_converts_LESS_into_CSS()
{
var compiler = new LessCompiler(_ => @"@color: #4d926f; #header { color: @color; }");
var css = compil... | ```c#
using Should;
using Xunit;
namespace Cassette.Less
{
public class LessCompiler_Compile
{
[Fact]
public void Compile_converts_LESS_into_CSS()
{
var compiler = new LessCompiler(_ => @"@color: #4d926f; #header { color: @color; }");
var css = compil... |
ae8fad9d-8a3a-4abc-a669-4985164e68ed | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Core.Transformation.Transformer.Native
{
class UtcToLocal : INativeTransformation
{
public string TimeZoneLabel { get; }
public UtcToLocal(string timeZoneLab... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Core.Transformation.Transformer.Native
{
class UtcToLocal : INativeTransformation
{
public string TimeZoneLabel { get; }
public UtcToLocal(string timeZoneLab... |
6e18fd2e-f064-4dc8-97aa-96e1df923af8 | {
"language": "C#"
} | ```c#
using Microsoft.Win32;
namespace EarTrumpet.Services
{
public static class UserSystemPreferencesService
{
public static bool IsTransparencyEnabled
{
get
{
using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registr... | ```c#
using Microsoft.Win32;
namespace EarTrumpet.Services
{
public static class UserSystemPreferencesService
{
public static bool IsTransparencyEnabled
{
get
{
using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.