doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
15b40560-4772-4dd3-bddc-9c521a3949c2 | {
"language": "C#"
} | ```c#
// Copyright 2016-2017 Datalust Pty Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | ```c#
// Copyright 2016-2017 Datalust Pty Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
13f95c17-d873-4356-b00b-ac82ecbc557e | {
"language": "C#"
} | ```c#
using System;
namespace MiniWebDeploy.Deployer.Features.Discovery
{
public class AssemblyDetails
{
public string Path { get; set; }
public string BinaryPath { get; set; }
public Type InstallerType { get; set; }
public AssemblyDetails(string path, string binaryPath, Type i... | ```c#
using System;
namespace MiniWebDeploy.Deployer.Features.Discovery
{
public class AssemblyDetails
{
public string Path { get; private set; }
public string BinaryPath { get; private set; }
public Type InstallerType { get; private set; }
public AssemblyDetails(string path, s... |
c94d9e35-e2a0-49d9-a630-c4310223a41c | {
"language": "C#"
} | ```c#
namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class BankAccountCreateOptions : BaseOptions
{
/// <summary>
/// REQUIRED. Either a token, like the ones returned by
/// <a href="https://stripe.com/docs/stripe.js">Stripe.js</a>, or a
//... | ```c#
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class BankAccountCreateOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// A set of key/value pairs that you can attach to an object. It can be useful for storin... |
cd15e4b9-62db-481a-83e4-6c1cfbbc3d48 | {
"language": "C#"
} | ```c#
@model SvNaum.Web.Models.NewsInputModel
@{
this.ViewBag.Title = "Add news";
}
<h2>Create news:</h2>
@using(Html.BeginForm("NewsAdd", "Admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.EditorForModel()
<br />
<br />
<input type="submit" value="Save" />
<input type="bu... | ```c#
@model SvNaum.Web.Models.NewsInputModel
@{
this.ViewBag.Title = "Add news";
}
<h2>Create news:</h2>
@using(Html.BeginForm("NewsAdd", "Admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.EditorForModel()
<br />
<br />
<input type="submit" value="Save" />
<input type="bu... |
32dac419-5061-4017-955c-13aa4820f40c | {
"language": "C#"
} | ```c#
namespace ApiTemplate
{
using System.Reflection;
public record AssemblyInformation(string Product, string Description, string Version)
{
public static readonly AssemblyInformation Current = new(typeof(AssemblyInformation).Assembly);
public AssemblyInformation(Assembly assembly)
... | ```c#
namespace ApiTemplate
{
using System.Reflection;
public record class AssemblyInformation(string Product, string Description, string Version)
{
public static readonly AssemblyInformation Current = new(typeof(AssemblyInformation).Assembly);
public AssemblyInformation(Assembly assembly)... |
3baebfb7-99d5-42c5-a3c8-1a6760737500 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Cors;
using Microsoft.AspNet.Cors.Core;
using Microsoft.Framework.ConfigurationModel;
using... | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Cors;
using Microsoft.AspNet.Cors.Core;
using Microsoft.Framework.ConfigurationModel;
using... |
21ecd242-422f-4580-99cd-34c0bcdf049e | {
"language": "C#"
} | ```c#
// Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Testing
{
/// <summary>
/// Helper static methods for argument/state validation. Copied from NodaTime.Util... | ```c#
// Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Testing
{
/// <summary>
/// Helper static methods for argument/state validation. Copied from NodaTime.Util... |
9f24c72c-c274-4215-81ea-62fcc3a6c213 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Telegram.Bot.Types.ReplyMarkups;
namespace Telegram.Bot.Types.InlineQueryResults
{
/// <summary>
/// Base Class for inline results send in response to an <see cref="InlineQuery"/>
/// </summary>
[JsonObject(MemberSerialization.OptI... | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Telegram.Bot.Types.ReplyMarkups;
namespace Telegram.Bot.Types.InlineQueryResults
{
/// <summary>
/// Base Class for inline results send in response to an <see cref="InlineQuery"/>
/// </summary>
[JsonObject(MemberSerialization.OptI... |
5205b375-9597-461a-b581-409cb9cae783 | {
"language": "C#"
} | ```c#
namespace Pigeon
{
using System.Linq;
using System.Net.Mail;
using Pigeon.Adapters;
public class Mailer
{
private readonly IMailService mailService;
public Mailer(IMailService mailService)
{
this.mailService = mailService;
}
public void ... | ```c#
namespace Pigeon
{
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using Pigeon.Adapters;
public class Mailer
{
private readonly IMailService mailService;
public Mailer(IMailService mailService)
{
this.mailServic... |
4a979aaf-0861-468e-ad06-0d813e30f4b9 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// 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.
[as... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
using Android;
using Android.App;
// 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("C... |
7d913947-9bb4-47aa-9a91-cb2fc7b57302 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace cah
{
class Program
{
static void Main(string[] args)
{
}
}
}
```
Connect a NetIRC client to the server | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NetIRC;
namespace cah
{
class Program
{
static void Main(string[] args)
{
Client client = new Client();
client.Connect("frogbox.es", 6667, fal... |
629832fe-4ed8-4876-9e5a-97194d83e5eb | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Microsoft.Markdown.Editor.ContentTypes;
using Microsoft.VisualStudio.R.Package.Packages;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
namespace Microsoft.VisualStudio.R.Packages.Markdow... | ```c#
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Microsoft.Markdown.Editor.ContentTypes;
using Microsoft.VisualStudio.R.Package.Packages;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
namespace Microsoft.VisualStudio.R.Packages.Markdow... |
f30e7db7-a51b-4973-9c54-53c7ab8ee9d2 | {
"language": "C#"
} | ```c#
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// =====================... | ```c#
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// =====================... |
a3cd50ec-4223-44a5-b806-6006446847df | {
"language": "C#"
} | ```c#
using System;
using System.Windows.Forms;
namespace COIME.Common.Control
{
public class NotifyIconUtil
{
/// <summary>
/// Setup NotifyIcon.
/// The icon added to the notification area, and then retry until it succeeds.
/// </summary>
/// <param name="notifyIcon">... | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace COIME.Common.Control
{
public class NotifyIconUtil
{
/*
* for ALT + F4 problem
* see http://d.hatena.ne.jp/hnx8/20131208/1386486457
*/
[DllImport(... |
94bf2f2e-1dd6-4c3f-a162-a1f0c986ddb9 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
namespace Microsoft.CodeAnalysis.Shared.Extensions
{
internal static class LocationExtensions
{
public static ... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
namespace Microsoft.CodeAnalysis.Shared.Extensions
{
internal static class LocationExtensions
{
public static ... |
2c6875a1-2ca6-4999-aab0-e0c7dac0661c | {
"language": "C#"
} | ```c#
// Copyright 2017 Google Inc. 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 required by app... | ```c#
// Copyright 2017 Google Inc. 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 required by app... |
7e2fc8b5-5f21-4989-a34e-ce8924732605 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Foundatio.Parsers.LuceneQueries.Extensions;
using Foundatio.Parsers.LuceneQueries.Nodes;
using Foundatio.Parsers.LuceneQueries.Visitors;
using Nest;
namespace Foundatio.Parsers.ElasticQueries.Visitors {
public class GetSortF... | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Foundatio.Parsers.LuceneQueries.Extensions;
using Foundatio.Parsers.LuceneQueries.Nodes;
using Foundatio.Parsers.LuceneQueries.Visitors;
using Nest;
namespace Foundatio.Parsers.ElasticQueries.Visitors {
public class GetSortF... |
185c4119-4992-4a21-92d7-b800dd633d7b | {
"language": "C#"
} | ```c#
using Orchard.ContentManagement.Handlers;
using Orchard.PublishLater.Models;
using Orchard.PublishLater.Services;
using Orchard.Tasks.Scheduling;
namespace Orchard.PublishLater.Handlers {
public class PublishLaterPartHandler : ContentHandler {
private readonly IPublishLaterService _publishLaterServi... | ```c#
using Orchard.ContentManagement.Handlers;
using Orchard.PublishLater.Models;
using Orchard.PublishLater.Services;
using Orchard.Tasks.Scheduling;
namespace Orchard.PublishLater.Handlers {
public class PublishLaterPartHandler : ContentHandler {
private readonly IPublishLaterService _publishLaterServi... |
f553b4c1-ed97-4afa-8782-8e8849a245a9 | {
"language": "C#"
} | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System;
using System.Linq;
using EOLib.Domain.Character;
namespace EOLib.Domain.Extensions
{
public static class CharacterRenderPropertiesExtensions
... | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System;
using System.Linq;
using EOLib.Domain.Character;
namespace EOLib.Domain.Extensions
{
public static class CharacterRenderPropertiesExtensions
... |
2d3451a9-7510-45e2-9e7a-df9932c70ec4 | {
"language": "C#"
} | ```c#
using System;
using System.Web.Mvc;
using TeacherPouch.Models;
using TeacherPouch.Providers;
using TeacherPouch.Repositories;
namespace TeacherPouch.Web.Controllers
{
public partial class SearchController : RepositoryControllerBase
{
public SearchController(IRepository repository)
{
... | ```c#
using System;
using System.ComponentModel;
using System.Web.Mvc;
using TeacherPouch.Models;
using TeacherPouch.Providers;
using TeacherPouch.Repositories;
namespace TeacherPouch.Web.Controllers
{
public partial class SearchController : RepositoryControllerBase
{
public SearchController(IReposito... |
1fcd5ddc-6fb1-4cb6-8094-012115c94dd5 | {
"language": "C#"
} | ```c#
using System.Linq;
using Glimpse.Web;
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.Web
{
public static class GlimpseAgentWebExtension
{
public static IApplicationBuilder UseGlimpseAgent(this IApplicationBuilder app)
{
v... | ```c#
using System.Linq;
using Glimpse.Web;
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.Web
{
public static class GlimpseAgentWebExtension
{
public static IApplicationBuilder UseGlimpseAgent(this IApplicationBuilder app)
{
v... |
acabd090-0314-4f4f-ba9c-c2dfcc6b8337 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;... | ```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.Audio;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;... |
fd28adf0-0faa-4767-9077-f91fec9fcc2e | {
"language": "C#"
} | ```c#
using System;
using FSWActions.Core;
using FSWActions.Core.Config;
namespace FSWActions.ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
WatchersConfiguration configuration = WatchersConfiguration.LoadConfigFromPath("watchers.xml");
foreach ... | ```c#
using System;
using System.Collections.Generic;
using FSWActions.Core;
using FSWActions.Core.Config;
namespace FSWActions.ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
WatchersConfiguration configuration = WatchersConfiguration.LoadConfigFromPath("wat... |
8b7871fe-4b21-4006-a2cb-d7c845b739a7 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System;
using System.Globalization;
namespace Discord.Net.Converters
{
internal class NullableUInt64Converter : JsonConverter
{
public static readonly NullableUInt64Converter Instance = new NullableUInt64Converter();
public override bool CanConvert(Type obje... | ```c#
using Newtonsoft.Json;
using System;
using System.Globalization;
namespace Discord.Net.Converters
{
internal class NullableUInt64Converter : JsonConverter
{
public static readonly NullableUInt64Converter Instance = new NullableUInt64Converter();
public override bool CanConvert(Type obje... |
a3d52503-fe0a-4ac8-9f4e-5b8d1cc055e2 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Shared.Ext... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Roslyn.Utilities;
namespa... |
7c84efbb-c3d6-4f0a-9858-1d55109ad587 | {
"language": "C#"
} | ```c#
using System;
using Nancy.ErrorHandling;
namespace Nancy.Testing
{
public class PassThroughErrorHandler : IErrorHandler
{
public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
{
var exception = context.Items[NancyEngine.ERROR_EXCEPTION] as Exc... | ```c#
using System;
using Nancy.ErrorHandling;
namespace Nancy.Testing
{
public class PassThroughErrorHandler : IErrorHandler
{
public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
{
if (!context.Items.ContainsKey(NancyEngine.ERROR_EXCEPTION))
... |
77849e60-a022-4e54-a135-a6af13b643a2 | {
"language": "C#"
} | ```c#
using FinancesSharp.Models;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
namespace FinancesSharp.ViewModels
{
public class RulesViewModel
{
public IEnumerable<CategorisationRule> Rules { get; private set; }
public RulesViewModel(FinanceDb db)
{
... | ```c#
using FinancesSharp.Models;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
namespace FinancesSharp.ViewModels
{
public class RulesViewModel
{
public IEnumerable<CategorisationRule> Rules { get; private set; }
public RulesViewModel(FinanceDb db)
{
... |
f8a44daf-c8ba-4ea7-b3ca-f925a1362823 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Logic.Engine;
using Logic.GameObjects;
namespace FeelTheField
{
class ConsoleAplication
{
static void Main()
{
char ch1 = 'X';
... | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Logic.Engine;
using Logic.Enumerations;
using Logic.GameObjects;
namespace FeelTheField
{
class ConsoleAplication
{
static void Main()
{
... |
ec557188-4495-4baa-a6a3-1f8289e7e2c3 | {
"language": "C#"
} | ```c#
using Kata.GildedRose.CSharp.Console;
using NUnit.Framework;
using System.Collections.Generic;
namespace Kata.GildedRose.CSharp.Unit.Tests
{
[TestFixture]
public class WhenTestTheGildedRoseProgram
{
string _actualName = "+5 Dexterity Vest";
int _actualSellin = 10;
int _actual... | ```c#
using Kata.GildedRose.CSharp.Console;
using NUnit.Framework;
using System.Collections.Generic;
namespace Kata.GildedRose.CSharp.Unit.Tests
{
[TestFixture]
public class WhenTestTheGildedRoseProgram
{
string _actualName = "+5 Dexterity Vest";
int _actualSellin = 10;
int _actual... |
3ddf6aad-0aee-4bf1-93c0-f6a9903fcd7d | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTit... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitl... |
df4df057-b8ef-4a81-91ec-ba7e0ce2bf06 | {
"language": "C#"
} | ```c#
namespace InfinniPlatform.DocumentStorage
{
/// <summary>
/// Настройки хранилища документов MongoDB.
/// </summary>
public class MongoDocumentStorageOptions
{
public const string SectionName = "mongodbDocumentStorage";
public static MongoDocumentStorageOptions Default = new ... | ```c#
namespace InfinniPlatform.DocumentStorage
{
/// <summary>
/// Настройки хранилища документов MongoDB.
/// </summary>
public class MongoDocumentStorageOptions
{
public const string SectionName = "mongodbDocumentStorage";
public static MongoDocumentStorageOptions Default = new ... |
e75112d7-1fe7-42df-9863-a903ff62c77f | {
"language": "C#"
} | ```c#
using Mono.Options;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
using WalletWasabi.Gui.CrashReport;
namespace WalletWasabi.Gui.CommandLine
{
internal class CrashReportCommand : Command
{
public CrashReportCommand(CrashReporter crashReporter) : bas... | ```c#
using Mono.Options;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
using WalletWasabi.Gui.CrashReport;
namespace WalletWasabi.Gui.CommandLine
{
internal class CrashReportCommand : Command
{
public CrashReportCommand(CrashReporter crashReporter) : bas... |
4d24ea29-fe27-4dec-a905-9ada09bddd2d | {
"language": "C#"
} | ```c#
using System;
using OpenQA.Selenium;
namespace ExampleApp.Test.Functional.Models.ExampleAppPages
{
/// <summary>
/// Modles the Slinqy Example App Homepage.
/// </summary>
public class HomePage : SlinqyExampleWebPage
{
public const string RelativePath = "/";
/// <summary>
... | ```c#
using System;
using OpenQA.Selenium;
namespace ExampleApp.Test.Functional.Models.ExampleAppPages
{
/// <summary>
/// Models the Slinqy Example App Homepage.
/// </summary>
public class HomePage : SlinqyExampleWebPage
{
public const string RelativePath = "/";
/// <summary>
... |
d6629dcf-7bb7-4abe-b921-cb6392b745ef | {
"language": "C#"
} | ```c#
<div class="l-header-container">
<nav class="skip-to-main-content healthy-skip" role="navigation" aria-label="skip to main content">
<a href="#content" tabindex="1" class="skip-main"> Skip to main content </a>
</nav>
<header id="header" class="grid-container grid-100">
<div class="gr... | ```c#
<div class="l-header-container">
<nav class="skip-to-main-content healthy-skip" aria-label="skip to main content">
<a href="#content" tabindex="1" class="skip-main"> Skip to main content </a>
</nav>
<header id="header" class="grid-container grid-100">
<div class="grid-75 mobile-grid-... |
ccf0f422-c627-425d-8b54-36b78b41c691 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbC... | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbC... |
2d2afa74-ab3b-4804-b368-a11dfe8b9a85 | {
"language": "C#"
} | ```c#
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "GitHub.ViewModels.CreateRepoViewModel.#ResetState()")]
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = ... | ```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 message i... |
bd9a1fdf-b3c9-4800-bb6b-ae69b6417385 | {
"language": "C#"
} | ```c#
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// -----------------------------------------------------------------------
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AudioSwitcher")]
[as... | ```c#
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// -----------------------------------------------------------------------
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AudioSwitcher")]
[as... |
bf70ca60-9c50-4bac-a450-cf369e64211a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TramlineFive.ViewModels.Wrappers;
namespace TramlineFive.ViewModels
{
public class StopChooserViewModel : BaseViewModel
{
public FavouritesViewModel FavouritesViewModel { ge... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TramlineFive.ViewModels.Wrappers;
namespace TramlineFive.ViewModels
{
public class StopChooserViewModel : BaseViewModel
{
public FavouritesViewModel FavouritesViewModel { ge... |
442b07ac-b779-4125-9797-db3d646a87a0 | {
"language": "C#"
} | ```c#
using Core;
using StructureMap;
using System;
using Xunit;
namespace Tests
{
public class BasicConfigationTests
{
[Fact]
public void NamedInstance()
{
ObjectFactory.Initialize(x =>
{
x.For<IService>().Use<Service>().Named("A");
... | ```c#
using Core;
using StructureMap;
using System;
using Xunit;
namespace Tests
{
public class BasicConfigationTests
{
[Fact]
public void NamedInstance()
{
ObjectFactory.Initialize(x =>
{
x.For<IService>().Use<Service>().Named("A");
... |
1c080b54-9202-4b2d-98ae-cf83ecd25926 | {
"language": "C#"
} | ```c#
using System;
namespace ItzWarty.Threading {
public interface IThreadingProxy {
IThread CreateThread(ThreadEntryPoint entryPoint, ThreadCreationOptions options);
ISemaphore CreateSemaphore(int initialCount, int maximumCount);
ICountdownEvent CreateCountdownEvent(int initialCount);
ICa... | ```c#
using System;
namespace ItzWarty.Threading {
public interface IThreadingProxy {
void Sleep(int durationMilliseconds);
void Sleep(TimeSpan duration);
IThread CreateThread(ThreadEntryPoint entryPoint, ThreadCreationOptions options);
ISemaphore CreateSemaphore(int initialCount, int maxim... |
41029747-66b9-456c-abad-5aefd643f65e | {
"language": "C#"
} | ```c#
// Copyright (c) Martin Costello, 2016. All rights reserved.
// Licensed under the MIT license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.Api.Benchmarks
{
using System;
using System.Threading.Tasks;
using BenchmarkDotNet.Running;
/// <summary... | ```c#
// Copyright (c) Martin Costello, 2016. All rights reserved.
// Licensed under the MIT license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.Api.Benchmarks
{
using System;
using System.Threading.Tasks;
using BenchmarkDotNet.Running;
/// <summary... |
287e0dcc-9dfc-448d-9de1-795d052e0806 | {
"language": "C#"
} | ```c#
using dnlib.DotNet;
namespace Confuser.Core.Services {
internal class RuntimeService : IRuntimeService {
private ModuleDef rtModule;
/// <inheritdoc />
public TypeDef GetRuntimeType(string fullName) {
if (rtModule == null) {
rtModule = ModuleDefMD.Load("Confuser.Runtime.dll");
rtModule.Enable... | ```c#
using System;
using System.IO;
using System.Reflection;
using dnlib.DotNet;
namespace Confuser.Core.Services {
internal class RuntimeService : IRuntimeService {
private ModuleDef rtModule;
/// <inheritdoc />
public TypeDef GetRuntimeType(string fullName) {
if (rtModule == null) {
Module module = ... |
d0d804c9-ddf8-44f6-a715-8a27f0df3155 | {
"language": "C#"
} | ```c#
using System;
namespace Advasoft.CmdArgsTool
{
public abstract class OptionsFactoryBase
{
protected IOptionsPolicy _creationPolicy;
private ILogger _logger;
protected OptionsFactoryBase(IOptionsPolicy creationPolicy, ILogger logger)
{
_creationPolicy = creat... | ```c#
using System;
namespace Advasoft.CmdArgsTool
{
public abstract class OptionsFactoryBase
{
private IOptionsPolicy _creationPolicy;
private ILogger _logger;
protected OptionsFactoryBase(IOptionsPolicy creationPolicy, ILogger logger)
{
_creationPolicy = creatio... |
5e004d19-d001-4015-9830-576b2aa986fe | {
"language": "C#"
} | ```c#
using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über folgende
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeord... | ```c#
using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über folgende
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeord... |
8669adbd-717b-46c5-9765-3d7585784db2 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SourceSchemaParser.JsonConverters
{
public class DotaSchemaItemPriceJsonConverter : JsonConverter
{
public override voi... | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SourceSchemaParser.JsonConverters
{
public class DotaSchemaItemPriceJsonConverter : JsonConverter
{
public override voi... |
7897a4d8-cb06-412d-89ed-fc85f4716cae | {
"language": "C#"
} | ```c#
using Hyperledger.Indy.PoolApi;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Threading.Tasks;
namespace Hyperledger.Indy.Test.PoolTests
{
[TestClass]
public class CreatePoolTest : IndyIntegrationTestBase
{
[TestMethod]
public async Task TestCreate... | ```c#
using Hyperledger.Indy.PoolApi;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Threading.Tasks;
namespace Hyperledger.Indy.Test.PoolTests
{
[TestClass]
public class CreatePoolTest : IndyIntegrationTestBase
{
[TestMethod]
public async Task TestCreate... |
3b94e7ed-719c-4f86-82fc-c8345309fbbd | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Judgements;... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Rulesets.Osu.Ob... |
112e3351-5f6f-4e5a-8b1e-a1944b485fac | {
"language": "C#"
} | ```c#
using System;
using FezGame.Mod;
namespace FezGame {
public class Program {
public static void orig_Main(string[] args) {
}
public static void Main(string[] args) {
try {
FEZMod.PreInitialize(args);
} catch (Exception e) {
ModLogger.Log("FEZMod", ... | ```c#
using System;
using FezGame.Mod;
namespace FezGame {
public class Program {
public static void orig_Main(string[] args) {
}
public static void Main(string[] args) {
try {
FEZMod.PreInitialize(args);
} catch (Exception e) {
ModLogger.Log("FEZMod", ... |
b4275f9c-1eae-4ce8-b95d-2389e4a65fb4 | {
"language": "C#"
} | ```c#
namespace Engine
{
public class Rule
{
public string Matcher;
public string ValuesDisturbtion;
}
}```
Change rule to use delegates, string will move to implemenation detail | ```c#
using Engine.Rules.Matcher;
using Engine.Rules.ValueDistribution;
namespace Engine
{
public class Rule
{
public Matcher Matcher;
public ValueDistributor ValuesDisturbtion;
}
}``` |
935f3f23-affe-40cd-a291-ce9f41e6fb57 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SCPI
{
public class RAW : ICommand
{
public string Description => "Send a raw SCPI command to instrument";
public string Command(params string[] parameters)
{
if (paramete... | ```c#
namespace SCPI
{
public class RAW : ICommand
{
public string Description => "Send a raw SCPI command to instrument";
public string Command(params string[] parameters)
{
if (parameters.Length != 0)
{
if (parameters.Length > 1)
... |
b7f5461f-42aa-4078-b894-5ef18a523d0b | {
"language": "C#"
} | ```c#
#if NETCOREAPP
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Routing;
namespace SFA.DAS.ProviderUrlHelper.Core
{
public static class ProviderUrlHelperExtensions
{
public static string ProviderCommitmentsLink(this UrlHelperBase helper, string path)
{
var link... | ```c#
#if NETCOREAPP
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
namespace SFA.DAS.ProviderUrlHelper.Core
{
public static class ProviderUrlHelperExtensions
{
public static string ProviderCommitmentsLink(this IUrlHelper helper, string path)
{
var linkGenerator =... |
b379c6fb-9047-49bc-9a76-ad5280e23162 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityCNTK;
using CNTK;
using System;
namespace UnityCNTK{
public class StreamingModel<T, V> : Model
where T:IConvertible
where V:IConvertible
{
public new T input;
public new V output;
// Evaluation ca... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityCNTK;
using CNTK;
using System;
namespace UnityCNTK{
/// <summary>
/// Streaming model streams a datasource to a model every set period
/// </summary>
public class StreamingModel: Model
{
public new... |
e7a43a90-6e08-4cc4-ab04-b7202b0fd391 | {
"language": "C#"
} | ```c#
public class ClientNetworkWaitingGui : AbstractNetworkWaitingGui
{
private ClientNetworkEntityWaiting network;
private GuiButtonRendererControl[] buttons = new GuiButtonRendererControl[0];
public ClientNetworkWaitingGui(NetworkEntityWaiting networkEntity)
{
network = (ClientNetworkEntityWaiting) networkEnt... | ```c#
public class ClientNetworkWaitingGui : AbstractNetworkWaitingGui
{
private ClientNetworkEntityWaiting network;
private GuiButtonRendererControl[] buttons = new GuiButtonRendererControl[0];
public ClientNetworkWaitingGui(NetworkEntityWaiting networkEntity)
{
network = (ClientNetworkEntityWaiting) networkEnt... |
d217ff50-9fb1-496c-a125-5d5d422d1a3f | {
"language": "C#"
} | ```c#
namespace SnapMD.VirtualCare.ApiModels.Scheduling
{
/// <summary>
/// Appointment optimization code.
/// </summary>
public enum AppointmentOptimizationCode : short
{
/// <summary>
/// Single booking.
/// </summary>
SingleBooking,
/// <summary>
... | ```c#
namespace SnapMD.VirtualCare.ApiModels.Scheduling
{
/// <summary>
/// Appointment optimization code.
/// </summary>
public enum AppointmentOptimizationCode : int
{
/// <summary>
/// Single booking.
/// </summary>
SingleBooking,
/// <summary>
//... |
9093beb9-aa4f-4ee0-ab86-1689d70712e8 | {
"language": "C#"
} | ```c#
using System;
namespace Lidgren.Network
{
internal sealed class NetUnreliableSequencedReceiver : NetReceiverChannelBase
{
private int m_lastReceivedSequenceNumber;
public NetUnreliableSequencedReceiver(NetConnection connection)
: base(connection)
{
}
internal override void ReceiveM... | ```c#
using System;
namespace Lidgren.Network
{
internal sealed class NetUnreliableSequencedReceiver : NetReceiverChannelBase
{
private int m_lastReceivedSequenceNumber = -1;
public NetUnreliableSequencedReceiver(NetConnection connection)
: base(connection)
{
}
internal override void Rec... |
3aa437d1-f487-4e48-abe5-71b65e241512 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
namespace HandlebarsDotNet.Test
{
[TestFixture]
public class ExceptionTests
{
[Test]
[ExpectedException("HandlebarsDotNet.HandlebarsCompilerException", ExpectedMessage = "Reached end of template before block expression 'if' was closed")]
public void Tes... | ```c#
using NUnit.Framework;
namespace HandlebarsDotNet.Test
{
[TestFixture]
public class ExceptionTests
{
[Test]
public void TestNonClosingBlockExpressionException()
{
Assert.Throws<HandlebarsCompilerException>(() =>
{
Handlebars.Compile("{{... |
0888e825-11dd-47f4-9bb0-e8bd718fe858 | {
"language": "C#"
} | ```c#
using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace PU_Stub.Controllers
{
public class SnodController : ApiController
{
private static readonly IDictionary<string, string> TestPerson... | ```c#
using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace PU_Stub.Controllers
{
public class SnodController : ApiController
{
private static readonly IDictionary<string, string> TestPerson... |
3c0cf716-377f-41fd-95b4-2cc0360acfb1 | {
"language": "C#"
} | ```c#
#region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2017 FUJIWARA, Yusuke
//
// 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.apac... | ```c#
#region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2017 FUJIWARA, Yusuke
//
// 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.apac... |
2601b26e-ef00-410b-b7e9-606f9067721c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NFleet.Data
{
public class DepotDataSet : IResponseData, IVersioned
{
public static string MIMEType = "application/vnd.jyu.nfleet.depotset";
public static string MIMEVersion = "2.2";
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NFleet.Data
{
public class DepotDataSet : IResponseData, IVersioned
{
public static string MIMEType = "application/vnd.jyu.nfleet.depotset";
public static string MIMEVersion = "2.2";
... |
f1e5cbe1-cd41-423b-8834-4510aa5108a5 | {
"language": "C#"
} | ```c#
//----------------------------------------------------------------------------
// <copyright file="RemotePlayerMarker.cs" company="Delft University of Technology">
// Copyright 2015, Delft University of Technology
//
// This software is licensed under the terms of the MIT License.
// A copy of t... | ```c#
//----------------------------------------------------------------------------
// <copyright file="RemotePlayerMarker.cs" company="Delft University of Technology">
// Copyright 2015, Delft University of Technology
//
// This software is licensed under the terms of the MIT License.
// A copy of t... |
9e3cd31c-c75c-40a0-99be-06cbce83da71 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.Xna.Framework;
using MonoGame.Extended.Timers;
using XmasHell.BulletML;
namespace XmasHell.Entities.Bosses.XmasTree
{
class XmasTreeBehaviour1 : AbstractBossBehaviour
{
public XmasTreeBehaviour1(Boss boss) : base(boss)
{
InitialBehaviourLife = Gam... | ```c#
using System;
using Microsoft.Xna.Framework;
using MonoGame.Extended.Timers;
using XmasHell.BulletML;
namespace XmasHell.Entities.Bosses.XmasTree
{
class XmasTreeBehaviour1 : AbstractBossBehaviour
{
public XmasTreeBehaviour1(Boss boss) : base(boss)
{
InitialBehaviourLife = Gam... |
9ae04701-7a63-47c7-b76d-4d695cfa7ebf | {
"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 Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using osu.Framework.Android;
namespace osu.Android
{
[Activity(Theme = "@a... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using osu.Framework.Android;
namespace osu.Android
{
[Activity(Theme = "@a... |
451d7d83-0bc0-4bc4-9c8c-099f8f7f9e7d | {
"language": "C#"
} | ```c#
using SimpleInventory.Examples.Common;
namespace SimpleInventory.Examples.InventoryLetters
{
public class LeatherBackpack : InventoryLetterBag<Item>
{
}
}```
Implement constructor for Leather Backpack (Lettered) | ```c#
using SimpleInventory.Examples.Common;
namespace SimpleInventory.Examples.InventoryLetters
{
public class LeatherBackpack : InventoryLetterBag<Item>
{
/// <inheritdoc />
public LeatherBackpack() : base("Leather Backpack (Lettered)", Volumes.Litres(25), Weights.Kilograms(1))
{ }
... |
aad35346-8312-4beb-ae04-4d2018753f2d | {
"language": "C#"
} | ```c#
@using StockportWebapp.Enums
@using StockportWebapp.Models
@model Profile
@{
ViewData["Title"] = Model.Title;
var articleTitle = Model.Breadcrumbs.LastOrDefault() != null ? Model.Breadcrumbs.LastOrDefault().Title + " - " : string.Empty;
ViewData["og:title"] = articleTitle + Model.Title;
Layout =... | ```c#
@using StockportWebapp.Enums
@using StockportWebapp.Models
@model Profile
@{
ViewData["Title"] = Model.Title;
var articleTitle = Model.Breadcrumbs.LastOrDefault() != null ? Model.Breadcrumbs.LastOrDefault().Title + " - " : string.Empty;
ViewData["og:title"] = articleTitle + Model.Title;
Layout =... |
4267ce09-e7e0-424b-a6b2-10935847a55b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Magecrawl.Utilities;
namespace Magecrawl.GameEngine.Actors
{
internal class BruiserMonster : Monster
{
public BruiserMonster(string name, Point p, int maxHP, int vision, DiceRoll damage, double defense, double evade, double ctIncrease... | ```c#
using System;
using System.Collections.Generic;
using Magecrawl.Utilities;
namespace Magecrawl.GameEngine.Actors
{
internal class BruiserMonster : Monster
{
public BruiserMonster(string name, Point p, int maxHP, int vision, DiceRoll damage, double defense, double evade, double ctIncrease... |
9d2b2b17-ec3d-4202-9055-9743d7a0614b | {
"language": "C#"
} | ```c#
//using Microsoft.Framework.Configuration;
//using Microsoft.WindowsAzure.Storage;
//using Microsoft.WindowsAzure.Storage.Table;
//using System.Threading.Tasks;
//using LogLevel = Microsoft.Framework.Logging.LogLevel;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
using System... | ```c#
//using Microsoft.Framework.Configuration;
//using Microsoft.WindowsAzure.Storage;
//using Microsoft.WindowsAzure.Storage.Table;
//using System.Threading.Tasks;
//using LogLevel = Microsoft.Framework.Logging.LogLevel;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
using System... |
09fe6f08-366f-4e7c-aed0-b100feda8edd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using System.Reflection;
namespace IntelliTect.Coalesce.TypeDefinition.Wrappers
{
internal class ReflectionParameterWrapper : ParameterWrapper
{
public ReflectionParamet... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using System.Reflection;
namespace IntelliTect.Coalesce.TypeDefinition.Wrappers
{
internal class ReflectionParameterWrapper : ParameterWrapper
{
public ReflectionParamet... |
3e1a1f81-3ca5-46f8-b0c7-ee3bea1ed67a | {
"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;
using System.Collections.Generic;
using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNet.Mvc.ApiExplorer
{
/// <summary>
... | ```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;
using System.Collections.Generic;
using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNet.Mvc.ApiExplorer
{
/// <summary>
... |
c78573bb-8f53-48b1-892a-a1ebe1afdd98 | {
"language": "C#"
} | ```c#
using System.Windows;
using UserControl = System.Windows.Controls.UserControl;
namespace anime_downloader.Views.Components
{
/// <summary>
/// Interaction logic for FindViewModel.xaml
/// </summary>
public partial class Find : UserControl
{
public Find()
{
Initial... | ```c#
using System.Windows;
using UserControl = System.Windows.Controls.UserControl;
namespace anime_downloader.Views.Components
{
/// <summary>
/// Interaction logic for FindViewModel.xaml
/// </summary>
public partial class Find : UserControl
{
public Find()
{
Initial... |
5ccecbd5-ae64-4f59-b153-76af027d9ba3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public class NetworkHelper
{
// in milliseconds
private const int Timeou... | ```c#
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public class NetworkHelper
{
// in milliseconds
private const int Timeou... |
2b6c5452-3d89-4b24-acf6-cdfb120d7237 | {
"language": "C#"
} | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Security.Principal;
using Xunit;
public class WindowsPrincipalTests
{
[Fact]
public stat... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.ComponentModel;
using System.Security.Principal;
using Xunit;
public class Windows... |
7619d6db-f32e-49d0-9ef4-45beede9f80c | {
"language": "C#"
} | ```c#
using Android.Widget;
using Cirrious.MvvmCross.ViewModels;
using System;
using System.Windows.Input;
namespace MvvmCrossSpikes.Droid.Bindings
{
public class ButtonCommandBinding : MvxTargetBinding<Button, MvxCommand>
{
private ICommand _command;
public ButtonCommandBinding(Button target)... | ```c#
using Android.Widget;
using Cirrious.MvvmCross.ViewModels;
using System;
using System.Windows.Input;
namespace MvvmCrossSpikes.Droid.Bindings
{
public class ButtonCommandBinding : MvxTargetBinding<Button, ICommand>
{
private ICommand _command;
public ButtonCommandBinding(Button target)
... |
bcdcdf2e-99ba-4785-8336-69e9c5af243e | {
"language": "C#"
} | ```c#
/*This tutorial is going to guide you to write a diagnostic analyzer that enforces the placement of a single space between the if keyword of an if statement and the
open parenthesis of the condition.
For more information, please reference the ReadMe.
Before you begin, go to Tools->Extensions and Updates->Onlin... | ```c#
/*This tutorial is going to guide you to write a diagnostic analyzer that enforces the placement of a single space between the if keyword of an if statement and the
open parenthesis of the condition.
For more information, please reference the ReadMe.
Before you begin, go to Tools->Extensions and Updates->Onlin... |
82b7b3af-196c-418e-b65e-21c69f7dfbaa | {
"language": "C#"
} | ```c#
using Utf8Json;
namespace Nest
{
internal class RelationNameFormatter : IJsonFormatter<RelationName>
{
public RelationName Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver)
{
if (reader.GetCurrentJsonToken() == JsonToken.String)
{
RelationName relationName = reader.Rea... | ```c#
using Utf8Json;
namespace Nest
{
internal class RelationNameFormatter : IJsonFormatter<RelationName>, IObjectPropertyNameFormatter<RelationName>
{
public RelationName Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver)
{
if (reader.GetCurrentJsonToken() == JsonToken.String)
... |
cb1bbcad-370d-4817-b3a5-860742958243 | {
"language": "C#"
} | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using Xunit;
namespace System.IO.Tests
{
public static class DirectoryNotF... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using Xunit;
namespace System.IO.Tests
{
public static class DirectoryNotF... |
7f4685fe-9d6a-474d-a2d3-9ce67d1544dc | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Route GenerateRoute(string path, string controller, string action, string[] httpMethods)
{
return new Route(path,
new RouteValueDictio... | ```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... |
01d13349-e632-4701-98f3-e4f21a9565e1 | {
"language": "C#"
} | ```c#
using System;
using Demo.Endpoints.FileSystem;
using Demo.Endpoints.Sharepoint;
using Verdeler;
namespace Demo
{
internal class Program
{
private static void Main(string[] args)
{
//Configure the distributor
var distributor = new Distributor<DistributableFile, Ven... | ```c#
using System;
using Demo.Endpoints.FileSystem;
using Demo.Endpoints.Sharepoint;
using Verdeler;
namespace Demo
{
internal class Program
{
private static void Main(string[] args)
{
//Configure the distributor
var distributor = new Distributor<DistributableFile, Ven... |
1231fde6-c9a2-43e9-8ad0-f52c53b96542 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using SFA.DAS.CommitmentsV2.Api.Types.Responses;
using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners;
namespace SFA.DAS.CommitmentsV2.Api.Controllers
{
[ApiController]
[Route("api/learners")]
public... | ```c#
using System;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SFA.DAS.CommitmentsV2.Api.Types.Responses;
using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners;
namespace SFA.DAS.CommitmentsV2.Api.Controllers
{
[ApiController]
[Route("api... |
d59f95bc-1d87-40b0-a412-fa0ceb25da28 | {
"language": "C#"
} | ```c#
using System;
namespace SFA.DAS.CommitmentsV2.Types.Dtos
{
public class DraftApprenticeshipDto
{
public long Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public DateTime? DateOfBirth ... | ```c#
using System;
namespace SFA.DAS.CommitmentsV2.Types.Dtos
{
public class DraftApprenticeshipDto
{
public long Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public DateTime? DateOfBirth ... |
6e56906b-8121-4409-a202-1c0fea43a980 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Jello.Errors;
using Jello.Nodes;
namespace Jello
{
public class ParseResult
{
public bool Success { get; private set; }
public IEnumerable<IError> Errors { get; private set; }
private INode _root;
public ParseResult(INode node)
... | ```c#
using System.Collections.Generic;
using Jello.DataSources;
using Jello.Errors;
using Jello.Nodes;
namespace Jello
{
public class ParseResult
{
public bool Success { get; private set; }
public IEnumerable<IError> Errors { get; private set; }
private INode _root;
public ... |
9607011e-fb65-4d6b-9529-62e2c3edafc6 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Data.Entity;
using System.Web.Http;
using Microsoft.WindowsAzure.Mobile.Service;
using ZUMOAPPNAMEService.DataObjects;
using ZUMOAPPNAMEService.Models;
namespace ZUMOAPPNAMEService
{
public static class WebApiConfig
{
public static void Register()
... | ```c#
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Web.Http;
using Microsoft.WindowsAzure.Mobile.Service;
using ZUMOAPPNAMEService.DataObjects;
using ZUMOAPPNAMEService.Models;
namespace ZUMOAPPNAMEService
{
public static class WebApiConfig
{
public static voi... |
fdeb25fe-4c4b-4ac8-8583-d5009836f688 | {
"language": "C#"
} | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using EndlessClient.ControlSets;
using EndlessClient.HUD.Controls;
using EOLib.Domain.Notifiers;
namespace EndlessClient.Rendering.NPC
{
public class NPCAnimat... | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using EndlessClient.ControlSets;
using EndlessClient.HUD.Controls;
using EOLib.Domain.Notifiers;
namespace EndlessClient.Rendering.NPC
{
public class NPCAnimat... |
4d4f2711-538f-4ca9-bc0f-2cba34d57192 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
namespace DerConverter
{
internal static class QueueExtensions
{
public static IEnumerable<T> Dequeue<T>(this Queue<T> queue, int count)
{
for (int i = 0; i < count; i++) yield return queue.Dequeue();
}
pub... | ```c#
using System.Collections.Generic;
using System.Linq;
namespace DerConverter
{
internal static class QueueExtensions
{
public static IEnumerable<T> Dequeue<T>(this Queue<T> queue, long count)
{
for (long i = 0; i < count; i++) yield return queue.Dequeue();
}
p... |
f2874f05-bc5b-4a36-9d88-a0c86b12c86d | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using ZendeskApi_v2;
namespace Tests
{
[TestFixture]
public class LocaleTests
{
private ZendeskApi api = new ZendeskApi(Settings.Site, Settings.Email, Settings.Password);
[Test]
public void CanGetLocales()
{
var all = api.Locales.Get... | ```c#
using NUnit.Framework;
using ZendeskApi_v2;
namespace Tests
{
[TestFixture]
public class LocaleTests
{
private ZendeskApi api = new ZendeskApi(Settings.Site, Settings.Email, Settings.Password);
[Test]
public void CanGetLocales()
{
var all = api.Locales.Get... |
5dd03ca5-0213-4359-b955-998e32f9cd0e | {
"language": "C#"
} | ```c#
namespace Nett
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Util;
internal static class UserTypeMetaData
{
private static readonly Dictionary<Type, MetaDataInfo> MetaData = new Dictionary<Type, MetaDataInfo>();
p... | ```c#
namespace Nett
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Util;
internal static class UserTypeMetaData
{
private static readonly ConcurrentDictionary<Type, MetaDataInfo> MetaData... |
c56cfdf2-6938-4101-8910-9f8b9a36f722 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
{
// TODO: Come up with some options
public class SocketTransportOptions
{
}
}
```
Add copyright header to TransportSocketOptions.cs. | ```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;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
{
// TODO... |
5c30d4d2-6401-4bbb-bfb2-4038bb9fcf13 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.IO;
namespace osu.Game.Tournament.Sc... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.IO;
namespace osu.Game.Tournament.Sc... |
c2d5c8c5-8ab2-436c-9817-e711c60b434f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using CSharpViaTest.Collections.Annotations;
using Xunit;
namespace CSharpViaTest.Collections._20_YieldPractices
{
[Medium]
public class TakeUntilCatchingAnException
{
readonly int indexThatWillThrow = new Random().Next(2, 10... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using CSharpViaTest.Collections.Annotations;
using Xunit;
namespace CSharpViaTest.Collections._20_YieldPractices
{
[Medium]
public class TakeUntilCatchingAnException
{
readonly int indexThatWillThrow = new Random().Next(2, 10... |
921294d2-2818-4ee9-b02d-d0eea3f8cbbe | {
"language": "C#"
} | ```c#
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-xlarge">Coming soon</h1>
<p>This service isn't available yet.</p>
</div>
</div>
@section breadcrumb {
<div class="breadcrumbs">
<ol>
<li><a href="@Url.Action("Index","Home")">Back to hom... | ```c#
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-xlarge">Under development</h1>
<p>This service is currently being developed and you don't yet have access.</p>
</div>
</div>
@section breadcrumb {
<div class="breadcrumbs">
<ol>
<li><a h... |
d5bb6310-2fe1-45ac-a5db-1f4eb58b0ef4 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using NUnit.Framework;
using Shouldly;
namespace Nimbus.UnitTests.MulticastRequestResponseTests
{
[TestFixture]
internal class WhenTakingTwoResponses : GivenAWrapperWithTwoResponses
{
private readonly TimeSpan _timeout = TimeSpan.FromSeconds(1);
priva... | ```c#
using System;
using System.Linq;
using NUnit.Framework;
using Shouldly;
namespace Nimbus.UnitTests.MulticastRequestResponseTests
{
[TestFixture]
internal class WhenTakingTwoResponses : GivenAWrapperWithTwoResponses
{
private readonly TimeSpan _timeout = TimeSpan.FromSeconds(1.5);
pri... |
1d600829-59b0-45f0-9432-4e21248f3226 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace WootzJs.Mvc
{
public class ControllerActionInvoker : IActionInvoker
{
public Task<ActionResult> InvokeAction(ControllerContext context, MethodInfo action)
{
var parameters = acti... | ```c#
using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace WootzJs.Mvc
{
public class ControllerActionInvoker : IActionInvoker
{
public Task<ActionResult> InvokeAction(ControllerContext context, MethodInfo action)
{
var parameters = acti... |
e50c478f-3f35-45a1-ba69-415a0e10a0ea | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
namespace osu.Framework.Graphics
{
public class ProxyDrawable : Drawable
{
public ProxyDrawable(Drawable original)
{
... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
namespace osu.Framework.Graphics
{
public class ProxyDrawable : Drawable
{
public ProxyDrawable(Drawable original)
{
... |
2cbe015c-31cc-4079-aa74-b5b3bd61e370 | {
"language": "C#"
} | ```c#
using Lykke.EmailSenderProducer.Interfaces;
namespace CompetitionPlatform.Data.AzureRepositories.Settings
{
public class BaseSettings
{
public AzureSettings Azure { get; set; }
public AuthenticationSettings Authentication { get; set; }
public NotificationsSettings Notifications {... | ```c#
using System.Collections.Generic;
using Lykke.EmailSenderProducer.Interfaces;
namespace CompetitionPlatform.Data.AzureRepositories.Settings
{
public class BaseSettings
{
public AzureSettings Azure { get; set; }
public AuthenticationSettings Authentication { get; set; }
public Not... |
f9c0e6cc-c1f8-4870-bb57-ec5a715e4454 | {
"language": "C#"
} | ```c#
using Mapsui.Geometries;
using Mapsui.GeometryLayer;
using Mapsui.Layers;
using Mapsui.Providers;
using NUnit.Framework;
namespace Mapsui.Tests.Layers
{
[TestFixture]
public class WritableLayerTests
{
[Test]
public void DoNotCrashOnNullOrEmptyGeometries()
{
// arr... | ```c#
using Mapsui.Geometries;
using Mapsui.GeometryLayer;
using Mapsui.Layers;
using NUnit.Framework;
namespace Mapsui.Tests.Layers
{
[TestFixture]
public class WritableLayerTests
{
[Test]
public void DoNotCrashOnNullOrEmptyGeometries()
{
// arrange
var wri... |
cfd47c05-6178-4d74-af7a-681e6250fc9f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mios.Swiftype {
public class QuerySpecification {
public string Q { get; set; }
public int Page { get; set; }
public int? PerPage { get; set; }
public IDictionary<str... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mios.Swiftype {
public class QuerySpecification {
public string Q { get; set; }
public int Page { get; set; }
public int? PerPage { get; set; }
public string[] Docume... |
51ee49f5-387c-4af9-a569-9f1d0dcc4165 | {
"language": "C#"
} | ```c#
using Mycroft.App;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mycroft.Cmd.App
{
class AppCommand : Command
{
/// <summary>
/// Parses JSON into App command objects
/// </summary>
/// <param... | ```c#
using Mycroft.App;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mycroft.Cmd.App
{
class AppCommand : Command
{
/// <summary>
/// Parses JSON into App command objects
/// </summary>
/// <param... |
6d95e969-3d97-4866-9c53-b95788fb8aeb | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace WebSocketManager
{
public class WebSocketManagerMiddleware
{
private readonly RequestDelegate _next;
private WebSocketManager _webSocketManager { get; set; }
private WebSocketMessageHandler _webSocketMessageH... | ```c#
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace WebSocketManager
{
public class WebSocketManagerMiddleware
{
private readonly RequestDelegate _next;
private WebSocketManager _webSocketManager { get; set; }
private WebSocketMessageHandler _webSocketMessageH... |
2af009cd-db5a-4354-92dc-d73ebd818a0c | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Graphics.Animations
{
/// <summary>
/// An animation / playback sequence.
/// </summary>
public interface IAnimation
{
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Graphics.Animations
{
/// <summary>
/// An animation / playback sequence.
/// </summary>
public interface IAnimation
{
... |
0e620679-dd70-464c-ad9f-41c2322ab042 | {
"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.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"F")]
... | ```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.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"F")]
... |
f41dc66d-54eb-40f2-a65a-93ac6450c640 | {
"language": "C#"
} | ```c#
using GTPWrapper;
using GTPWrapper.DataTypes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GTPWrapperTest {
public class Program {
static void Main(string[] args) {
Engine engine = new Engine();
... | ```c#
using GTPWrapper;
using GTPWrapper.DataTypes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GTPWrapperTest {
public class Program {
static void Main(string[] args) {
Engine engine = new Engine();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.