doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
0a216561-4342-4b14-b6d0-271e3bdabb1a | {
"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.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Localisation;
namespa... | ```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.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Localisation;
namespa... |
dc1b3ddb-df60-41f9-99c6-7fc8d6e6e371 | {
"language": "C#"
} | ```c#
using System;
using Autofac.Builder;
using Hangfire.Annotations;
namespace Hangfire
{
/// <summary>
/// Adds registration syntax to the <see cref="Autofac.ContainerBuilder"/> type.
/// </summary>
public static class RegistrationExtensions
{
/// <summary>
/// Share one instanc... | ```c#
using System;
using System.Linq;
using Autofac.Builder;
using Hangfire.Annotations;
namespace Hangfire
{
/// <summary>
/// Adds registration syntax to the <see cref="Autofac.ContainerBuilder"/> type.
/// </summary>
public static class RegistrationExtensions
{
/// <summary>
//... |
184671ef-19cd-468c-81d4-a54130608893 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace website_performance.Entities
{
public class Robots
{
private readonly List<Uri> _sitemaps = new List<Uri>();
public Robots(string url)
{
if (Uri.TryCreate(url, UriKind.Absolute, out var robotsUrl))
... | ```c#
using System;
using System.Collections.Generic;
using website_performance.Infrastructure;
namespace website_performance.Entities
{
public class Robots
{
private readonly IHttpMessageHandlerFactory _httpMessageHandlerFactory;
private readonly List<Uri> _sitemaps = new List<Uri>();
... |
d5dc3a19-1821-48a5-8c12-b7da81b46965 | {
"language": "C#"
} | ```c#
using Microsoft.Extensions.Options;
using SendGrid.Helpers.Mail;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Services
{
public interface IEmailService
{
Task Send(SendGridMessage message);
}
public class EmailService : IEmailService
{
public static readonly ... | ```c#
using Microsoft.Extensions.Options;
using SendGrid.Helpers.Mail;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Services
{
public interface IEmailService
{
Task Send(SendGridMessage message);
}
public class EmailService : IEmailService
{
public static readonly ... |
2b03b51d-10dd-412f-8df0-3cb92846886f | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
using Newtonsoft.Json;
/// <summary>
/// A collection of ids for various web services for a Trakt season.
/// </summary>
public class TraktSeasonIds
{
/// <summary>
/// The Trakt numeric id for the season.
/// </... | ```c#
namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
using Newtonsoft.Json;
/// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt season.</summary>
public class TraktSeasonIds
{
/// <summary>Gets or sets the Trakt numeric id.</summary>
[Jso... |
6e384b7e-8292-4a24-ab27-95a39cc84055 | {
"language": "C#"
} | ```c#
using SnakeApp.Models;
using System;
namespace SnakeApp.Controllers
{
public class GameController
{
public void StartNewGame()
{
PrepareConsole();
var game = new Game(80, 25, 5, 100);
game.StartAsync();
ConsoleKeyInfo userInput = new ConsoleKeyInfo();
do
{
userInput = Console.ReadK... | ```c#
using SnakeApp.Models;
using System;
namespace SnakeApp.Controllers
{
public class GameController
{
private byte MAX_WIDTH = 80;
private byte MAX_HEIGHT = 25;
public void StartNewGame()
{
PrepareConsole();
var game = new Game(Math.Min((byte)(Console.WindowWidth - 1), MAX_WIDTH), Math.Min((byte... |
214101c3-66f1-4b60-a44b-0c056f154063 | {
"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
namespace osu.Game.Screens.Select
{
public class MatchSongSelect : SongSelect
{
protected override bool OnSelectionFinalised()
{
... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Screens.Select
{
public class MatchSongSelect : SongSelect
{
protected override bool OnSelectionFinalised()
{
... |
3fdc58b2-e810-4c9c-835d-17f0d947b07c | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetTest : DotNetTool
{
protected override string Command
{
... | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetTest : DotNetTool
{
protected override string Command
{
... |
41758fb9-e851-4523-934a-bb1a7a5809a9 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System;
using Microsoft.Owin.Infrastructure;
using Microsoft.Owin.Security.Infrastructure;
namespace Microsoft.Owin.Security.OAuth
{
public class OAuthAuthorizationServe... | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System;
using Microsoft.Owin.Infrastructure;
using Microsoft.Owin.Security.Infrastructure;
namespace Microsoft.Owin.Security.OAuth
{
public class OAuthAuthorizationServe... |
a6e5cf37-072e-42c5-8ac1-0d6030593643 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using AvsAnLib.Internals;
using WikipediaAvsAnTrieExtractor;
using Xunit;
namespace WikipediaAvsAnTrieExtractorTest {
public class TriePrefixIncrementorTest {
[Fact]
public void BasicIncrementWorks() {
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using AvsAnLib.Internals;
using WikipediaAvsAnTrieExtractor;
using Xunit;
namespace WikipediaAvsAnTrieExtractorTest {
public class TriePrefixIncrementorTest {
[Fact]
public void BasicIncrementWorks() {
... |
6fda32b0-31ea-472b-8019-b2827769b720 | {
"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
namespace EndlessClient.HUD
{
public interface IHudButtonController
{
void ClickInventory();
void ClickViewMapToggle();
void Click... | ```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
namespace EndlessClient.HUD
{
public interface IHudButtonController
{
void ClickInventory();
void ClickViewMapToggle();
void Click... |
981bbb16-90bf-425a-be25-b6707e8bdb93 | {
"language": "C#"
} | ```c#
namespace Grobid.NET
{
public enum FontSizeStatus
{
HIGHERFONT,
SAMEFONTSIZE,
LOWFONT,
}
}```
Fix misnamed LOWFONT enumeration to LOWERFONT | ```c#
namespace Grobid.NET
{
public enum FontSizeStatus
{
HIGHERFONT,
SAMEFONTSIZE,
LOWERFONT,
}
}``` |
36b25cb4-de14-4a53-aaf8-63479e3c2247 | {
"language": "C#"
} | ```c#
using DspAdpcm.Adpcm.Formats.Internal;
using DspAdpcm.Adpcm.Formats.Structures;
namespace DspAdpcm.Adpcm.Formats.Configuration
{
/// <summary>
/// Contains the options used to build the BRSTM file.
/// </summary>
public class BrstmConfiguration : B_stmConfiguration
{
/// <summary>
... | ```c#
using DspAdpcm.Adpcm.Formats.Internal;
using DspAdpcm.Adpcm.Formats.Structures;
namespace DspAdpcm.Adpcm.Formats.Configuration
{
/// <summary>
/// Contains the options used to build the BRSTM file.
/// </summary>
public class BrstmConfiguration : B_stmConfiguration
{
/// <summary>
... |
8886c9f9-50fd-45da-a27f-a825b888c8aa | {
"language": "C#"
} | ```c#
using MonoHaven.UI.Widgets;
namespace MonoHaven.UI.Remote
{
public class ServerImage : ServerWidget
{
public static ServerWidget Create(ushort id, ServerWidget parent, object[] args)
{
var resName = (string)args[0];
var widget = new Image(parent.Widget);
widget.Drawable = App.Resources.GetImage(... | ```c#
using MonoHaven.UI.Widgets;
namespace MonoHaven.UI.Remote
{
public class ServerImage : ServerWidget
{
public static ServerWidget Create(ushort id, ServerWidget parent, object[] args)
{
var resName = (string)args[0];
var widget = new Image(parent.Widget);
widget.Drawable = App.Resources.GetImage(... |
09ed18d2-fec9-4881-a29b-f080fa365055 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using osu.Framework.Extensions.ListExtensions;
namespace osu.Framework.Graphics.Containers
{
/// <summary>
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
namespace osu.Framework.Graphics.Containers
{
/// <summary>
/// A basic implementation of <see cref="ITextP... |
ef3f4960-1f36-4e6f-9051-ae8bc8552be0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading;
namespace Toggl.Phoebe.Tests
{
public class MainThreadSynchronizationContext : SynchronizationContext
{
private readonly Thread thread;
private readonly object syncRoot = new Object ();
private readonly Queue... | ```c#
using System;
using System.Collections.Generic;
using System.Threading;
namespace Toggl.Phoebe.Tests
{
public class MainThreadSynchronizationContext : SynchronizationContext
{
private readonly Thread thread;
private readonly object syncRoot = new Object ();
private readonly Queue... |
c3f36ecb-4fe0-4977-85c1-517d0ee3fe16 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace Assets.Scripts
{
public static class GameObjectUtilities
{
public static void SetEnabled(this GameObject obj, bool enabled)
{
// Disable rendering of this compon... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace Assets.Scripts
{
public static class GameObjectUtilities
{
public static void SetEnabled(this GameObject obj, bool enabled)
{
// Disable rendering of this compon... |
63a26fbb-58ea-4b9b-9019-fa876dfcb801 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
namespace Modix.Modules
{
[Name("Info"), Summary("General helper module")]
public sealed class InfoModule : ModuleBase
{
private CommandService commandService;
public InfoModul... | ```c#
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
namespace Modix.Modules
{
[Name("Info"), Summary("General helper module")]
public sealed class InfoModule : ModuleBase
{
private CommandService commandService;
public InfoModul... |
6a70c7ab-a6e8-4d08-9932-5d052033a97f | {
"language": "C#"
} | ```c#
using System;
using System.Xml.Linq;
namespace Linq2Azure.SqlDatabases
{
public class Database
{
internal Database(XElement xml, DatabaseServer databaseServer)
{
xml.HydrateObject(XmlNamespaces.WindowsAzure, this);
DatabaseServer = databaseServer;
}
... | ```c#
using System;
using System.Xml.Linq;
namespace Linq2Azure.SqlDatabases
{
public class Database
{
internal Database(XElement xml, DatabaseServer databaseServer)
{
xml.HydrateObject(XmlNamespaces.WindowsAzure, this);
DatabaseServer = databaseServer;
}
... |
fd1f1492-3655-4d47-8f3e-87fd2f5ee2b3 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
namespace BoardGamesApi.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
public class TempController : Controller
{
private readonly IConfiguration _configuration;
... | ```c#
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
namespace BoardGamesApi.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
public class TempController : Controller
{
private readonly IConfiguration _configuration;
... |
f35f5a28-7d02-457f-8696-de33f5244864 | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "Typing Classifier";
}
<div class="jumbotron">
This will be our awesome typing classifier
</div>
<div class="row">
Typing classifier goes here.
@Html.ActionLink("Go to results", "Results", "Home");
</div>```
Add textarea, keyboard listener and timer. | ```c#
@{
ViewBag.Title = "Typing Classifier";
}
@section scripts
{
<script type="text/javascript">
'use strict'
var timer = getTimer();
$(function() {
var capturing = false;
document.addEventListener('keydown', function(event) {
if(!capturing) {
capturing = ... |
e34bc7d8-514b-47f0-9cc3-9ddf04fe8aaa | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Web.Mvc;
using Hangfire.Highlighter.Jobs;
using Hangfire.Highlighter.Models;
namespace Hangfire.Highlighter.Controllers
{
public class HomeController : Controller
{
private readonly HighlighterDbContext _db = new HighlighterDbContext();
publ... | ```c#
using System;
using System.Linq;
using System.Web.Mvc;
using Hangfire.Highlighter.Jobs;
using Hangfire.Highlighter.Models;
namespace Hangfire.Highlighter.Controllers
{
public class HomeController : Controller
{
private readonly HighlighterDbContext _db = new HighlighterDbContext();
publ... |
0edfc0b6-e8d0-481a-b9ef-e691435ada80 | {
"language": "C#"
} | ```c#
@using System.Threading.Tasks
<header>
<div class="https_chart col-md-offset-1 col-md-3" data-width="250"></div>
<div class="description col-md-7">
<h1>Secure HTTP (HTTPS)</h1>
<h2>
Last updated <strong class="last-modified"></strong>
</h2>
<p>
Th... | ```c#
@using System.Threading.Tasks
<header>
<div class="https_chart col-md-offset-1 col-md-4" data-width="250"></div>
<div class="description col-md-6">
<h1>Secure HTTP (HTTPS)</h1>
<h2>
Last updated <strong class="last-modified"></strong>
</h2>
<p>
Th... |
559543e7-c0e8-4732-8f74-f1e052961582 | {
"language": "C#"
} | ```c#
using ProjectCDA.Model;
using ProjectCDA.Model.Constants;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace ProjectCDA.DAL
{
public class DataService : IDataService
{
public IEnumerable<FacingPages> GetData()
{
ObservableCollection<FacingPages>... | ```c#
using ProjectCDA.Model;
using ProjectCDA.Model.Constants;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace ProjectCDA.DAL
{
public class DataService : IDataService
{
public IEnumerable<FacingPages> GetData()
{
return GetMockData();
}
... |
8328cc6c-1a08-4557-bf19-f154278b3741 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
var game = new Game("HANG THE MAN");
while (true) {
string titleText = File.ReadAllText("title.txt");
Cell[] title = {
new Cell(titleText, Cell.CentreAl... | ```c#
using System;
using System.IO;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
var game = new Game("HANG THE MAN");
while (true) {
string titleText = File.ReadAllText("title.txt");
Cell[] title = {
new Cell(titleText, Cell.CentreAl... |
dc609786-48b3-4b57-aac8-9e8f4602776d | {
"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 Microsoft.CodeAnalysis.InheritanceMargin;
using Microsoft.VisualStudio.Imaging;
using Microsoft.VisualS... | ```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 Microsoft.CodeAnalysis.InheritanceMargin;
using Microsoft.VisualStudio.Imaging;
using Microsoft.VisualS... |
7cbdbe4f-4fcd-4710-bbfe-53a35fb30244 | {
"language": "C#"
} | ```c#
using System;
namespace Avalonia.Media.Fonts
{
public readonly struct FontKey : IEquatable<FontKey>
{
public readonly string FamilyName;
public readonly FontStyle Style;
public readonly FontWeight Weight;
public FontKey(string familyName, FontWeight weight, FontStyle styl... | ```c#
using System;
namespace Avalonia.Media.Fonts
{
public readonly struct FontKey : IEquatable<FontKey>
{
public FontKey(string familyName, FontWeight weight, FontStyle style)
{
FamilyName = familyName;
Style = style;
Weight = weight;
}
pub... |
a59e072d-d58e-4677-99b1-0cbf9aa923f9 | {
"language": "C#"
} | ```c#
using System;
namespace ZBuildLights.Core.Models
{
public class EditProject
{
public Guid? ProjectId { get; set; }
public string Name { get; set; }
public EditProjectCruiseProject[] CruiseProjects { get; set; }
}
public class EditProjectCruiseProject
{
public... | ```c#
using System;
namespace ZBuildLights.Core.Models
{
public class EditProject
{
public Guid? ProjectId { get; set; }
public string Name { get; set; }
public EditProjectCruiseProject[] CruiseProjects { get; set; }
public EditProjectCruiseProject[] SafeProjects
{
... |
f52e0f79-2244-49c3-b0af-81aa701640ac | {
"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.Bindables
{
/// <summary>
/// An interface that represents a leased bindable.
/// </summary>
public interface ILeasedBindabl... | ```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.Bindables
{
/// <summary>
/// An interface that represents a leased bindable.
/// </summary>
public interface ILeasedBindabl... |
596c9472-afef-40a5-8681-c5c763572aa7 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using ZobShop.Models;
namespace ZobShop.Tests.Models.UserTests
{
[TestFixture]
public class PropertyTests
{
[TestCase("street")]
[TestCase("highway")]
[TestCase("boulevard")]
public void TestAddressProperty_ShouldWorkCorrectly(string address)
... | ```c#
using NUnit.Framework;
using ZobShop.Models;
namespace ZobShop.Tests.Models.UserTests
{
[TestFixture]
public class PropertyTests
{
[TestCase("street")]
[TestCase("highway")]
[TestCase("boulevard")]
public void TestAddressProperty_ShouldWorkCorrectly(string address)
... |
1f1fc35d-5c6d-4988-ac1d-9a62f7c8a0ce | {
"language": "C#"
} | ```c#
using SharpDX.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CoreTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAT... | ```c#
using SharpDX.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CoreTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAT... |
1552545e-aa8e-4da0-8e61-06bfa4842ba1 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online.RealtimeMultiplayer
{
public class MultiplayerClientState
{
public MultiplayerClientState(in long roomId)
{
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online.RealtimeMultiplayer
{
public class MultiplayerClientState
{
public long CurrentRoomID { get; set; }
public Multip... |
8cbc308f-c722-45f1-97c0-4d29db21923a | {
"language": "C#"
} | ```c#
using System.IO;
using Microsoft.Extensions.Configuration;
using System.Linq;
namespace MyNatsClient.IntegrationTests
{
public static class TestSettings
{
public static IConfigurationRoot Config { get; set; }
static TestSettings()
{
var builder = new ConfigurationBui... | ```c#
using System;
using System.IO;
using Microsoft.Extensions.Configuration;
using System.Linq;
namespace MyNatsClient.IntegrationTests
{
public static class TestSettings
{
public static IConfigurationRoot Config { get; set; }
static TestSettings()
{
var builder = new Co... |
93954ec0-be63-4a33-a398-5d92cd369357 | {
"language": "C#"
} | ```c#
#if DESKTOP
using System;
namespace Eto.Forms
{
public partial interface IActionItem
{
MenuItem Generate(Generator generator);
}
public abstract partial class ActionItemBase
{
public abstract MenuItem Generate(Generator generator);
}
public partial class ActionItemSeparator : ActionItemBase
{
p... | ```c#
#if DESKTOP
using System;
namespace Eto.Forms
{
public partial interface IActionItem
{
MenuItem Generate(Generator generator);
}
public abstract partial class ActionItemBase
{
public abstract MenuItem Generate(Generator generator);
}
public partial class ActionItemSeparator : ActionItemBase
{
p... |
5dc19dad-e7c3-4468-be64-985cfb3990f5 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... |
840ef591-940b-4f63-8c02-a1c55c22029d | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
namespace Microsoft.Azure.WebJobs.Script.Description
{
public static class CSharpConstants
{
public const string PrivateAssembliesFolderName = "b... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
namespace Microsoft.Azure.WebJobs.Script.Description
{
public static class CSharpConstants
{
public const string PrivateAssembliesFolderName = "b... |
f3644a1e-7c31-4236-90d0-c5c4d7e5ab3a | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Microsoft.ServiceFabric.Data;
namespace ServiceFabric.Mocks
{
/// <summary>
/// A sequence of operations performed as a single logical unit of work.
/// </summary>
public class MockTransaction : ITransaction
{
public long CommitSequenceNumber => ... | ```c#
using System.Threading.Tasks;
using Microsoft.ServiceFabric.Data;
namespace ServiceFabric.Mocks
{
/// <summary>
/// A sequence of operations performed as a single logical unit of work.
/// </summary>
public class MockTransaction : ITransaction
{
public long CommitSequenceNumber => ... |
a8ed5bb5-d75c-42d7-8377-4ffa2c3786a1 | {
"language": "C#"
} | ```c#
namespace BatteryCommander.Common.Migrations
{
using System.Data.Entity.Migrations;
internal sealed class Configuration : DbMigrationsConfiguration<BatteryCommander.Common.DataContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = true;
}
protect... | ```c#
namespace BatteryCommander.Common.Migrations
{
using BatteryCommander.Common.Models;
using System.Data.Entity.Migrations;
internal sealed class Configuration : DbMigrationsConfiguration<BatteryCommander.Common.DataContext>
{
public Configuration()
{
AutomaticMigrations... |
8a126faa-8b43-49eb-8075-434b7ee03b0e | {
"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.Diagnostics.Contracts;
using Xunit;
namespace System.Diagnostics.Contracts.Tests
{
public class BasicContractsTest
{
[... | ```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.Diagnostics.Contracts;
using Xunit;
namespace System.Diagnostics.Contracts.Tests
{
public class BasicContractsTest
{
[... |
2b7993e1-dfcc-4a9d-9d1e-35befa565b0d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace SyncTool.Cli.Installation
{
public class PathVariableInstallerStep : IInstallerStep
{
public void OnInitialInstall(Version version)
{
var value = Environment.GetEnvironmentVariable("PATH", Environmen... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace SyncTool.Cli.Installation
{
public class PathVariableInstallerStep : IInstallerStep
{
public void OnInitialInstall(Version version)
{
var value = Environment.GetEnvironmentVariable("PATH", Environmen... |
a86327ed-76c3-4d23-a064-aecf27aa26ad | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using Dependinator.ModelViewing.Private.DataHandling.Dtos;
using Dependinator.ModelViewing.Private.DataHandling.Private.Parsing;
namespace Dependinator.ModelViewing.Private.DataHandling.Private
{
internal class DataFilePaths : IDataFilePaths
{
... | ```c#
using System.Collections.Generic;
using System.IO;
using Dependinator.ModelViewing.Private.DataHandling.Dtos;
using Dependinator.ModelViewing.Private.DataHandling.Private.Parsing;
namespace Dependinator.ModelViewing.Private.DataHandling.Private
{
internal class DataFilePaths : IDataFilePaths
{
... |
59459679-5877-4e47-8be7-63116072c125 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Beatmaps.Legacy
{
internal enum LegacyStoryLayer
{
Background = 0,
Fail = 1,
Pass = 2,
Foreground = 3,
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Beatmaps.Legacy
{
internal enum LegacyStoryLayer
{
Background = 0,
Fail = 1,
Pass = 2,
Foreground = 3,
... |
d0f9a63f-76c9-49f3-b3de-a9ed6a092ddd | {
"language": "C#"
} | ```c#
using Glimpse.Agent;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System;
using System.Collections.Generic;
using Glimpse.Agent.Web;
using Glimpse.Agent.Web.Options;
using Microsoft.Framework.OptionsModel;
namespace Glimpse
{
public class GlimpseAgentWeb... | ```c#
using Glimpse.Agent;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System;
using System.Collections.Generic;
using Glimpse.Agent.Web;
using Glimpse.Agent.Web.Options;
using Microsoft.Framework.OptionsModel;
namespace Glimpse
{
public class GlimpseAgentWeb... |
8d93e37e-58fc-4685-8b4c-0ad258a76160 | {
"language": "C#"
} | ```c#
using System.Reflection;
namespace Loyc.Compatibility
{
#if NetStandard20 || DotNet45
/// <summary>Defines ITuple in .NET Standard 2.0. System.Runtime.CompilerServices.ITuple
/// was added to .NET Core 2.0 and .NET Framework 4.7.1, but it wasn't added to .NET
/// Standard 2.0. ITuple was added to .NET Stan... | ```c#
using System.Reflection;
namespace Loyc.Compatibility
{
#if NetStandard20 || DotNet45
/// <summary>Defines ITuple in .NET Standard 2.0. System.Runtime.CompilerServices.ITuple
/// was added to .NET Core 2.0 and .NET Framework 4.7.1, but it wasn't added to .NET
/// Standard 2.0. ITuple was added to .NET Stand... |
b1427158-840d-421f-8546-1a86b8ce7a83 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
using Aggregator.Core.Interfaces;
using Aggregator.Core.Monitoring;
namespace Aggregator.Core
{
/// <summary>
/// Invokes Powershell scripting engine
/// </summary>
public class PsScriptEngine : ScriptEngine
{
... | ```c#
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
using Aggregator.Core.Interfaces;
using Aggregator.Core.Monitoring;
namespace Aggregator.Core
{
/// <summary>
/// Invokes Powershell scripting engine
/// </summary>
public class PsScriptEngine : ScriptEngine
{
... |
d59aa191-bca1-45da-974d-191072843afb | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text;
using DelimitedDataParser;
namespace WindowsEncoding
{
internal class Program
{
private static void Main()
{
// When using DelimitedDataParser in a .NET Core app,
// be sure to include the NuGet package System.Text... | ```c#
using System;
using System.IO;
using System.Text;
using DelimitedDataParser;
namespace WindowsEncoding
{
internal class Program
{
private static void Main()
{
// If code page based character encodings are required when using
// DelimitedDataParser in a .NET Core a... |
845ca5f3-1420-47da-b38b-bbfd31413ca5 | {
"language": "C#"
} | ```c#
using System;
public enum Colors
{
Red = 1,
Alpha,
Green = 13,
Blue
}
public static class Program
{
public static void Main(string[] Args)
{
Console.WriteLine((int)Colors.Red);
Console.WriteLine((int)Colors.Alpha);
Console.WriteLine((int)Colors.Green);
Con... | ```c#
using System;
public enum Colors
{
Red = 1,
Alpha,
Green = 13,
Blue
}
public enum LongColors : long
{
Red = 1,
Alpha,
Green = 13,
Blue
}
public static class Program
{
public static void Main(string[] Args)
{
Console.WriteLine((int)Colors.Red);
Console.Wri... |
f5e983f3-99bd-4275-b0ca-c6fc27ce282b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nutritia
{
public class MySqlPlatService : IPlatService
{
// TODO : Fonctionne pas
private MySqlConnexion connexion;
public Plat Retri... | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nutritia
{
public class MySqlPlatService : IPlatService
{
// TODO : Fonctionne pas
private MySqlConnexion connexion;
public Plat Retri... |
28bbb225-bda1-49e7-b5b8-559eeb1b1fab | {
"language": "C#"
} | ```c#
namespace BlockchainSharp.Core
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class BlockChain
{
public long number;
public BlockChain(Block block)
{
if (!block.IsGenesis)
t... | ```c#
namespace BlockchainSharp.Core
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class BlockChain
{
private IList<Block> blocks = new List<Block>();
public BlockChain(Block block)
{
if (!block.... |
9f3c31fd-6b70-4fe6-98dd-2ac70ee81da4 | {
"language": "C#"
} | ```c#
using Assets.Scripts.Data.Interfaces;
using System.Collections.Generic;
using Assets.Scripts.Data.Model.Objects;
using Assets.Scripts.Data.Model.Telemetrics;
using Assets.Scripts.Data.Providers.Fmk;
using UnityEngine;
namespace Assets.Scripts.Data.Providers
{
/// <summary>
/// The author is working in F... | ```c#
using Assets.Scripts.Data.Interfaces;
using System.Collections.Generic;
using Assets.Scripts.Data.Model.Objects;
using Assets.Scripts.Data.Model.Telemetrics;
using Assets.Scripts.Data.Providers.Fmk;
using UnityEngine;
namespace Assets.Scripts.Data.Providers
{
/// <summary>
/// The author is working in F... |
5f7f4369-a2b9-4648-809b-9cf5b3b93880 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
namespace osu.Game.Screens.Play
{
[Cached]
public interface ILocalUserPlayInfo
{
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
namespace osu.Game.Screens.Play
{
[Cached]
public interface ILocalUserPlayInfo
{
... |
bc182ae5-00ce-4daa-a2fe-824b9017817f | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class YoumuSlash3DEnvironmentController : MonoBehaviour
{
[SerializeField]
private GameObject stairObject;
[SerializeField]
private Vector2 stairOffset;
[SerializeField]
private Transform cameraParent;... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class YoumuSlash3DEnvironmentController : MonoBehaviour
{
[SerializeField]
private Transform stairParent;
[SerializeField]
private GameObject stairObject;
[SerializeField]
private Vector2 stairOffset;
... |
7116ebbd-33a7-4567-bf91-05902b016fff | {
"language": "C#"
} | ```c#
using SierraLib.Translation;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Articulate
{
public sealed class FileBasedTranslation : S... | ```c#
using SierraLib.Translation;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Articulate
{
public sealed class FileBasedTranslation : S... |
b8350c93-1f87-4f6b-b7cb-615ee3c6d4d4 | {
"language": "C#"
} | ```c#
namespace Content.Shared.GameObjects
{
public static class ContentNetIDs
{
public const uint HANDS = 0;
}
}
```
Make NetID use 1000+ range | ```c#
namespace Content.Shared.GameObjects
{
public static class ContentNetIDs
{
public const uint HANDS = 1000;
}
}
``` |
dcca18e0-3122-4abb-a875-c7d446f6bd05 | {
"language": "C#"
} | ```c#
using RollbarSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace LandmineWeb.App_Start
{
public class RollbarExceptionFilter : IExceptionFilter
{
public void OnException(ExceptionContext filterContext)
{
... | ```c#
using RollbarSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace LandmineWeb.App_Start
{
public class RollbarExceptionFilter : IExceptionFilter
{
public void OnException(ExceptionContext filterContext)
{
... |
58fd8ce1-07ca-481b-a99d-d09d309b2b9a | {
"language": "C#"
} | ```c#
using Machine.Specifications;
namespace Stripe.Tests
{
public class when_creating_a_charge_with_a_stripe_account
{
private static StripeAccount _stripeAccount;
private static StripeCharge _stripeCharge;
Establish context = () =>
{
// create a new custom accoun... | ```c#
using Machine.Specifications;
namespace Stripe.Tests
{
public class when_creating_a_charge_with_a_stripe_account
{
private static StripeAccount _stripeAccount;
private static StripeCharge _stripeCharge;
Establish context = () =>
{
// create a new custom accoun... |
f4974eea-e374-4e97-9f2b-2a4a82841a3b | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Deployment.Common.ActionModel;
using Microsoft.Deployment.Common.Actions;
using Microsoft.Deployment.Common.Helpers;
namespace Microsoft.Deployment.Ac... | ```c#
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Deployment.Common.ActionModel;
using Microsoft.Deployment.Common.Actions;
using Microsoft.Deployment.Common.Helpers;
namespace Microsoft.Deployment.Ac... |
6b2efa38-6872-4318-abf8-575c2e125694 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Documents;
using System.Linq;
using System.Threading.Tasks;
using TheCollection.Business.Tea;
using TheCollection.Web.Constants;
using TheCollection.Web.Extensions;
using TheCollection.Web.Models;
using TheCollection.Web.Services;
namespace TheCollection.Web... | ```c#
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Documents;
using System.Linq;
using System.Threading.Tasks;
using TheCollection.Business.Tea;
using TheCollection.Web.Constants;
using TheCollection.Web.Extensions;
using TheCollection.Web.Models;
using TheCollection.Web.Services;
namespace TheCollection.Web... |
0540deca-0b3c-4240-ac4a-63196c26de97 | {
"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;
using System.Collections.Generic;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.CodeAnalysis.Options
{
internal stat... | ```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;
using System.Collections.Generic;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.CodeAnalysis.Options
{
internal stat... |
d12d4518-65e8-4bb2-9f82-59b92c5fb8f0 | {
"language": "C#"
} | ```c#
using CommandLineParser;
using Saucy.Actions;
using Saucy.Providers.GitHub;
namespace Saucy
{
public class Program
{
public static int Main(string[] args)
{
var settings = new SaucySettings();
ILogger logger = new VerboseLogger();
var restoreVerb = new SaucyCommand... | ```c#
using CommandLineParser;
using Saucy.Actions;
using Saucy.Providers.GitHub;
namespace Saucy
{
using System;
public class Program
{
public static int Main(string[] args)
{
var consoleWriter = new ConsoleWriter();
try
{
var settings = new SaucySettings... |
10fb1755-b2e4-49aa-b499-d922b226ca26 | {
"language": "C#"
} | ```c#
using System;
namespace Watts
{
internal class Program
{
private static int Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("Usage: Watts.exe <\"Path/To/Config.json\">");
return 1;
}
var watt... | ```c#
using System;
using System.Diagnostics;
using System.IO;
namespace Watts
{
internal class Program
{
private static int Main(string[] args)
{
var watts = new WebApiToTypeScript.WebApiToTypeScript();
if (args.Length == 0)
{
var path = Pat... |
e3bc5259-64d9-4e42-ae4d-9ff8391f4aae | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;
using WinMasto.Tools.Extensions;
namespace WinMasto.Tools.Converters
{
public class StripHtmlConverter : IValueConverter
{
public object Convert(object ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;
using WinMasto.Tools.Extensions;
namespace WinMasto.Tools.Converters
{
public class StripHtmlConverter : IValueConverter
{
public obje... |
6f469e4d-1c4c-40db-be8b-12fd609f0577 | {
"language": "C#"
} | ```c#
namespace Bakery.Security
{
using System;
using System.Text;
using Text;
public class BasicAuthenticationPrinter
: IBasicAuthenticationPrinter
{
private readonly IBase64Printer base64Printer;
private readonly Encoding encoding;
public BasicAuthenticationPrinter(IBase64Printer base64Pri... | ```c#
namespace Bakery.Security
{
using System;
using System.Text;
using Text;
public class BasicAuthenticationPrinter
: IBasicAuthenticationPrinter
{
private readonly IBase64Printer base64Printer;
private readonly Encoding encoding;
public BasicAuthenticationPrinter(IBase64Printer base64Pri... |
475a67aa-2434-4bfa-a0c6-53c85eb281ad | {
"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.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml.Linq;
using Vipr.Core;
namespace Vipr
{
inte... | ```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.Collections.Generic;
using System.IO;
namespace Vipr
{
internal class Program
{
private static void Main(string[] args)
{
... |
7e52f0f5-0649-4f0a-ab80-721534f4d5dc | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace MabWeb
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace MabWeb
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
... |
99d2010a-452e-4612-a06b-f9e29fedf69a | {
"language": "C#"
} | ```c#
/*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
namespace ShiftDrive {
/// <summary>
/// A simple static container, for holding game assets like textures and meshes.
/// </summar... | ```c#
/*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
namespace ShiftDrive {
/// <summary>
/// A simple static container, for holding game assets like textures and meshes.
/// </summar... |
c188c055-6c2e-45b3-bbf3-80fd678fa70d | {
"language": "C#"
} | ```c#
using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfaces;
using osu_StreamCompanion.Code.Windows;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window
{
public class WindowDataGetter :IModule,IMapDataGetter,IMainWindowUpdater
{
private MainWindowUpdate... | ```c#
using System;
using CollectionManager.DataTypes;
using CollectionManager.Enums;
using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfaces;
using osu_StreamCompanion.Code.Windows;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window
{
public class WindowDataGetter :... |
75428a18-0b2d-4c04-85bf-94e5dcca3b6b | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"F")]
... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"D")]
... |
cf13ff60-8330-4b28-bbad-114db634cb99 | {
"language": "C#"
} | ```c#
using System.Text.RegularExpressions;
using ChatExchangeDotNet;
namespace Hatman.Commands
{
class Should : ICommand
{
private readonly Regex ptn = new Regex(@"(?i)^((sh|[cw])ould|can|will|is)", Extensions.RegOpts);
private readonly string[] phrases = new[]
{
"No.",
... | ```c#
using System.Text.RegularExpressions;
using ChatExchangeDotNet;
namespace Hatman.Commands
{
class Should : ICommand
{
private readonly Regex ptn = new Regex(@"(?i)^((sh|[cw])ould|can|are|will|is)", Extensions.RegOpts);
private readonly string[] phrases = new[]
{
"No."... |
fb2c057e-cbc5-45a8-a9d7-78ed27722f3d | {
"language": "C#"
} | ```c#
@{
ViewBag.Title = "Home Page";
}
<div class="jumbotron">
<h1>ASP.NET</h1>
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
<p><a href="http://asp.net" class="btn btn-primary btn-large">Learn more »</a></p... | ```c#
@{
ViewBag.Title = "Home Page";
}
``` |
45b82104-eeff-410a-a971-2ac89808f9c3 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Graphics.Sprites
{
class OsuSpriteText : SpriteText
{
public const float FONT_S... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.MathUtils;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Ga... |
9c40dff5-7642-492d-9099-e1d450bfb5ec | {
"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.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
namespace osu.Game.Users... | ```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.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
namespace osu.Game.Users... |
68c4e95d-43c8-43fb-afbd-84a080be6420 | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json.Linq;
namespace Chronological
{
public class DataType
{
public string TimeSeriesInsightsType { get; }
internal DataType(string dataType)
{
TimeSeriesInsightsType = dataType;
}
internal JProperty ToJProperty()
... | ```c#
using System;
using Newtonsoft.Json.Linq;
namespace Chronological
{
public class DataType
{
public string TimeSeriesInsightsType { get; }
internal DataType(string dataType)
{
TimeSeriesInsightsType = dataType;
}
internal JProperty ToJProperty()
... |
4a0a9217-0171-47d3-b7d6-5cb34e548a62 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace Mono.Debugging.Client
{
[Serializable]
public class SourceLink
{
// Keep the / character to use as a path separator to help group related symbols
static readonly HashSet<char> invalids = new Ha... | ```c#
using System;
using System.IO;
namespace Mono.Debugging.Client
{
[Serializable]
public class SourceLink
{
public string Uri { get; }
public string RelativeFilePath { get; }
public SourceLink (string uri, string relativeFilePath)
{
RelativeFilePath = relativeFilePath;
Uri = uri;
}
public s... |
a1ec656f-d0cb-4ec1-9d25-0e4c5ffedfc5 | {
"language": "C#"
} | ```c#
using CsvHelper.Configuration;
using MyAccounts.Business.AccountOperations.Contracts;
namespace MyAccounts.Business.AccountOperations.Fortis
{
public sealed class FortisOperationExportCsvMap : ClassMap<FortisOperation>
{
public FortisOperationExportCsvMap()
{
Map(m => m.Refere... | ```c#
using CsvHelper.Configuration;
using MyAccounts.Business.AccountOperations.Contracts;
namespace MyAccounts.Business.AccountOperations.Fortis
{
public sealed class FortisOperationExportCsvMap : ClassMap<FortisOperation>
{
public FortisOperationExportCsvMap()
{
Map(m => m.Refere... |
300f2aac-69fb-4977-9d39-d89338134af4 | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
public class ForegroundMatchData
{
[DisplayName("Title")]
public string Title { get; set; }
[DisplayName("Title Match Mode")]
public St... | ```c#
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
public class ForegroundMatchData
{
[DisplayName("Title")]
public string Title { get; set; }
[DisplayName("Title Match Mode")]
public St... |
16cee547-7bd0-42e7-bcd3-9484cdfa0801 | {
"language": "C#"
} | ```c#
// MvxJsonConverter.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using System;
using System.Collections.Gene... | ```c#
// MvxJsonConverter.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using System;
using System.Collecti... |
092e0f58-9bf2-467b-97aa-6e797fd2475d | {
"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);
}
}
}... |
d50e1fa4-fa62-465d-a5f3-7a7b809205f4 | {
"language": "C#"
} | ```c#
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
using Umbraco.Web.Scheduling;
namespace Umbraco.Web.Telemetry
{
public class TelemetryComponent : IComponent
{
private IProfilingLogger _logger;
private IRuntimeState _runtime;
private BackgroundTaskRun... | ```c#
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
using Umbraco.Web.Scheduling;
namespace Umbraco.Web.Telemetry
{
public class TelemetryComponent : IComponent
{
private IProfilingLogger _logger;
private IRuntimeState _runtime;
private BackgroundTaskRun... |
fb9325b2-61d6-4ad1-95ee-0d0c99d144c4 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using Newtonsoft.Json;
namespace TrackableData.Json
{
public class TrackableContainerTrackerJsonConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return typeof(IContainerTracker).IsAssignableFrom(objectType);... | ```c#
using System;
using System.Reflection;
using Newtonsoft.Json;
namespace TrackableData.Json
{
public class TrackableContainerTrackerJsonConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return typeof(IContainerTracker).IsAssignableFrom(objectType);... |
6f828f0d-3862-41c4-8b3d-b2676d88ccaf | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ApiResponse.cs" company="Dan Barua">
// (C) Dan Barua and contributors. Licensed under the Mozilla Public License.
// </copyright>
// -------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ApiResponse.cs" company="Dan Barua">
// (C) Dan Barua and contributors. Licensed under the Mozilla Public License.
// </copyright>
// -------------------------------------... |
bb71f5f4-d04c-47a4-a723-08661d58163c | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Text.RegularExpressions;
using JabbR.ContentProviders.Core;
namespace JabbR.ContentProviders
{
public class VimeoContentProvider : EmbedContentProvider
{
private static readonly Regex _vimeoIdRegex = new Regex(@"(\d+)");
protected override ... | ```c#
using System.Collections.Generic;
using System.Text.RegularExpressions;
using JabbR.ContentProviders.Core;
namespace JabbR.ContentProviders
{
public class VimeoContentProvider : EmbedContentProvider
{
private static readonly Regex _vimeoIdRegex = new Regex(@"(\d+)");
protected override ... |
a417f33e-0145-4c89-a67a-dc7b5d039666 | {
"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.Testing;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
namespace osu.Game.Tournament.Tests
{
public class TournamentTestBro... | ```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.Testing;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
namespace osu.Game.Tournament.Tests
{
public class TournamentTestBro... |
673a8c0e-eea4-4e8d-8c13-cf7676741ee9 | {
"language": "C#"
} | ```c#
using Chalmers.ILL.Models;
using Examine;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Chalmers.ILL.Extensions;
using Chalmers.ILL.OrderItems;
namespace Chalmers.ILL.Providers
{
public class ProviderService : IProviderService
{
... | ```c#
using Chalmers.ILL.Models;
using Examine;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Chalmers.ILL.Extensions;
using Chalmers.ILL.OrderItems;
namespace Chalmers.ILL.Providers
{
public class ProviderService : IProviderService
{
... |
ecae1110-e53b-46c1-9936-0151f7ab4902 | {
"language": "C#"
} | ```c#
using LiteNetLib.Utils;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
namespace LiteNetLibHighLevel
{
public class NetFieldStruct<T> : LiteNetLibNetField<T>
where T : struct
{
public override void Deserialize... | ```c#
using LiteNetLib.Utils;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
namespace LiteNetLibHighLevel
{
public class NetFieldStruct<T> : LiteNetLibNetField<T>
where T : struct
{
public override void Deserialize... |
08d8a85b-ca5b-4be0-9ffa-275738b13dcb | {
"language": "C#"
} | ```c#
@model IEnumerable<MMLibrarySystem.Models.BorrowRecord>
@{
ViewBag.Title = "Borrowed Books";
}
<table id="bookList">
<tr>
<td>
Book Number
</td>
<td>
Title
</td>
<td>
Borrowed By
</td>
<td>
Borrowed ... | ```c#
@model IEnumerable<MMLibrarySystem.Models.BorrowRecord>
@{
ViewBag.Title = "Borrowed Books";
}
<table id="bookList">
<tr>
<td>
Book Number
</td>
<td>
Title
</td>
<td>
Borrowed By
</td>
<td>
Borrowed ... |
de1cc612-557f-4ec2-ab21-106bd9c9c8b2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.Drawing;
namespace SimpleCollectionView
{
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.Drawing;
namespace SimpleCollectionView
{
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
... |
ed71dfd6-da70-4721-94ec-91a422f6ce38 | {
"language": "C#"
} | ```c#
using System.Threading;
using Xunit;
namespace RockLib.Messaging.NamedPipes.Tests
{
public class NamedPipesTests
{
[Fact]
public void NamedPipeMessagesAreSentAndReceived()
{
var waitHandle = new AutoResetEvent(false);
using (var receiver = new NamedPipeRec... | ```c#
using System.Threading;
using Xunit;
namespace RockLib.Messaging.NamedPipes.Tests
{
public class NamedPipesTests
{
[Fact]
public void NamedPipeMessagesAreSentAndReceived()
{
var waitHandle = new AutoResetEvent(false);
using (var receiver = new NamedPipeRec... |
cc0950f4-2231-443e-96f9-793aca8f9e7d | {
"language": "C#"
} | ```c#
@model IEnumerable<alert_roster.web.Models.User>
@{
ViewBag.Title = "View Subscriptions";
}
<h2>@ViewBag.Title</h2>
<p>
@Html.ActionLink("Create New", "Subscribe")
</p>
@if (TempData["Message"] != null)
{
<div class="alert alert-info">@TempData["Message"]</div>
}
<table class="table">
<tr>
... | ```c#
@model IEnumerable<alert_roster.web.Models.User>
@{
ViewBag.Title = "View Subscriptions";
}
<h2>@ViewBag.Title</h2>
<p>
@Html.ActionLink("Create New", "Subscribe")
</p>
@if (TempData["Message"] != null)
{
<div class="alert alert-info">@TempData["Message"]</div>
}
<table class="table">
<tr>
... |
e368c733-f697-44a4-9beb-4058acde19a2 | {
"language": "C#"
} | ```c#
using ClosedXML.Excel;
using NUnit.Framework;
using System;
using System.Data;
namespace ClosedXML_Tests.Excel
{
public class NumberFormatTests
{
[Test]
public void PreserveCellFormat()
{
using (var wb = new XLWorkbook())
{
var ws = wb.AddWo... | ```c#
using ClosedXML.Excel;
using NUnit.Framework;
using System;
using System.Data;
namespace ClosedXML_Tests.Excel
{
public class NumberFormatTests
{
[Test]
public void PreserveCellFormat()
{
using (var wb = new XLWorkbook())
{
var ws = wb.AddWo... |
0f941fc3-36c2-4d82-b0e6-60f7368e1a7e | {
"language": "C#"
} | ```c#
using System.Xml.Serialization;
namespace EarTrumpet.Actions.DataModel.Serialization
{
public class AppRef
{
public static readonly string EveryAppId = "EarTrumpet.EveryApp";
public static readonly string ForegroundAppId = "EarTrumpet.ForegroundApp";
public string Id { get; set;... | ```c#
namespace EarTrumpet.Actions.DataModel.Serialization
{
public class AppRef
{
public static readonly string EveryAppId = "EarTrumpet.EveryApp";
public static readonly string ForegroundAppId = "EarTrumpet.ForegroundApp";
public string Id { get; set; }
public override int G... |
60c900d5-041f-446a-a9cd-12c50d7da708 | {
"language": "C#"
} | ```c#
using System.Web.Routing;
using ConsolR.Hosting.Web;
using SignalR;
namespace ConsolR.Hosting
{
[assembly: WebActivator.PostApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")]
public static class Bootstrapper
{
public static void PreApplicationStart()
{
var routes = R... | ```c#
using System.Web.Routing;
using ConsolR.Hosting.Web;
using SignalR;
[assembly: WebActivator.PostApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")]
namespace ConsolR.Hosting
{
public static class Bootstrapper
{
public static void PreApplicationStart()
{
var routes = Ro... |
a4446aaf-f447-42d2-839b-0715109f14f4 | {
"language": "C#"
} | ```c#
@using System.Linq;
@using AutoRest.Core.ClientModel
@using AutoRest.Core.Utilities
@using AutoRest.Java.Azure.TemplateModels
@inherits AutoRest.Core.Template<AutoRest.Java.Azure.TemplateModels.AzureServiceClientTemplateModel>
/**
* The interface defining all the services for @Model.Name to be
* used by Retrof... | ```c#
@using System.Linq;
@using AutoRest.Core.ClientModel
@using AutoRest.Core.Utilities
@using AutoRest.Java.Azure.TemplateModels
@inherits AutoRest.Core.Template<AutoRest.Java.Azure.TemplateModels.AzureServiceClientTemplateModel>
/**
* The interface defining all the services for @Model.Name to be
* used by Retrof... |
2ca682bd-0170-4727-bb8f-d1c7da50392f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Nerdle.AutoConfig.Strategy;
using NUnit.Framework;
namespace Nerdle.AutoConfig.Tests.Unit.Strategy.StrategyManagerTests
{
[TestFixture]
class When_creating_a_strategy
{
StrategyManager _sut;
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Nerdle.AutoConfig.Strategy;
using NUnit.Framework;
namespace Nerdle.AutoConfig.Tests.Unit.Strategy.StrategyManagerTests
{
[TestFixture]
class When_creating_a_strategy
{
StrategyManager _sut;
... |
629f9590-3d19-4b0c-a44c-c37af0f97fd8 | {
"language": "C#"
} | ```c#
using System.Dynamic;
using System.IO;
using System.Management.Automation;
using System.Reflection;
namespace ConfigPS
{
public class Global : DynamicObject
{
readonly PowerShell ps;
public Global()
{
var fileName = Path.GetFileName(Assembly.GetCallingAs... | ```c#
using System.Dynamic;
using System.IO;
using System.Management.Automation;
using System.Reflection;
namespace ConfigPS
{
public class Global : DynamicObject
{
readonly PowerShell ps;
public Global(string configFileName = null)
{
if (configFileName == n... |
7dc24f76-8928-41a6-b773-ba40fd82ad56 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RailPhase.Demo
{
class Program
{
static void Main(string[] args)
{
// Create a simple web app and serve content on to URLs.
var app = new ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RailPhase.Demo
{
class Program
{
static void Main(string[] args)
{
// Create a simple web app and serve content on to URLs.
var app = new ... |
9f522956-a6da-4fc3-abd9-1c61f3121639 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/BindingTest.html";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
private const boo... | ```c#
using System;
using System.Diagnostics;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/BindingTest.html";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.... |
f1f35fb7-0dd7-4919-878f-31fa6fd30f4e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace compiler.middleend.ir
{
//TODO: redisign this class and its supporting classes
public class BasicBlock
{
public string Name { get; }
public List<Instruction> Instructions{ get; set; }
public Anchor AnchorBlock { get; set; }
public B... | ```c#
using System;
using System.Collections.Generic;
namespace compiler.middleend.ir
{
//TODO: redisign this class and its supporting classes
public class BasicBlock
{
public string Name { get; }
public List<Instruction> Instructions{ get; set; }
public Anchor AnchorBlock { get; set; }
public B... |
9d6d9900-9f15-4c26-b2e5-7f07c8b988e6 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StackExchange.DataExplorer.Helpers;
using System.Text;
namespace StackExchange.DataExplorer.Models {
public partial class Query {
public string BodyWithoutComments {
get {
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StackExchange.DataExplorer.Helpers;
using System.Text;
namespace StackExchange.DataExplorer.Models {
public partial class Query {
public string BodyWithoutComments {
get {
... |
a423ab50-db30-43b9-979e-ce156a230652 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public struct CategoryItem
{
public string name;
public SoundItem[] soundItems;
}
```
Add possibility to add custom AudioObject prefab. | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public struct CategoryItem
{
public string name;
public SoundItem[] soundItems;
public GameObject audioObjectPrefab;
}
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.