doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
a5b8bbd9-ad10-4e8a-8707-6240b81c0a38
{ "language": "C#" }
```c# using System; using Xamarin.Forms; using AI.XamarinSDK.Abstractions; namespace XamarinTest { public class App : Application { public App () { var mainNav = new NavigationPage (new XamarinTestMasterView ()); MainPage = mainNav; } protected override void OnStart () { ApplicationInsights.Setu...
```c# using System; using Xamarin.Forms; using AI.XamarinSDK.Abstractions; namespace XamarinTest { public class App : Application { public App () { var mainNav = new NavigationPage (new XamarinTestMasterView ()); MainPage = mainNav; } protected override void OnStart () { ApplicationInsights.Setu...
30713712-1abb-43ad-a971-e6d8c1d25768
{ "language": "C#" }
```c# using System.Linq; using BitChangeSetManager.DataAccess; using BitChangeSetManager.Dto; using BitChangeSetManager.Model; using Foundation.Api.ApiControllers; using AutoMapper; using AutoMapper.QueryableExtensions; namespace BitChangeSetManager.Api { public class ChangeSetsController : DefaultDtoSetControlle...
```c# using System.Linq; using BitChangeSetManager.DataAccess; using BitChangeSetManager.Dto; using BitChangeSetManager.Model; using Foundation.Api.ApiControllers; namespace BitChangeSetManager.Api { public class ChangeSetsController : DefaultDtoSetController<ChangeSet, ChangeSetDto> { private readonl...
53063b93-785e-4b72-948d-db061369141a
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Net.Http; using System.Text; namespace Skarp.HubSpotClient { [Serializable] public class HubSpotException : Exception { private HttpResponseMessage response; public string RawJsonResponse { get; set; } public HubSp...
```c# using System; using System.Collections.Generic; using System.Net.Http; using System.Text; namespace Skarp.HubSpotClient { [Serializable] public class HubSpotException : Exception { public HttpResponseMessage Response { get; } public string RawJsonResponse { get; } public Hu...
70d3dad9-d1e0-484e-b60c-82ff1d60c0d4
{ "language": "C#" }
```c# using System; namespace BmpListener.Bgp { internal class PathAttributeLargeCommunities : PathAttribute { public PathAttributeLargeCommunities(ArraySegment<byte> data) : base(ref data) { } } }``` Add large BGP communities support
```c# using System; namespace BmpListener.Bgp { internal class PathAttributeLargeCommunities : PathAttribute { private int asn; private int data1; private int data2; public PathAttributeLargeCommunities(ArraySegment<byte> data) : base(ref data) { DecodeFrom...
5f895932-69ba-4eb6-99ec-ac749887ff70
{ "language": "C#" }
```c# using CSharpTo2600.Framework; using static CSharpTo2600.Framework.TIARegisters; namespace CSharpTo2600.FunctionalitySamples { [Atari2600Game] static class SingleChangeBkColor { [SpecialMethod(MethodType.Initialize)] [System.Obsolete(CSharpTo2600.Framework.Assembly.Symbols.AUDC0, true...
```c# using CSharpTo2600.Framework; using static CSharpTo2600.Framework.TIARegisters; namespace CSharpTo2600.FunctionalitySamples { [Atari2600Game] static class SingleChangeBkColor { [SpecialMethod(MethodType.Initialize)] static void Initialize() { BackgroundColor = 0x5...
0dd64f54-fc7b-455a-ae08-bc1f97145f4b
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using BlogTemplate._1.Models; namespace BlogTemplate._1.Services { public class SlugGenerator { private BlogDataS...
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using BlogTemplate._1.Models; namespace BlogTemplate._1.Services { public class SlugGenerator { private BlogDataS...
bfe7e0c4-623e-4761-afd8-0f3393bf9a61
{ "language": "C#" }
```c# using System.Windows.Forms; using CefSharp; using TweetDuck.Utils; namespace TweetDuck.Browser.Handling { class KeyboardHandlerBase : IKeyboardHandler { protected virtual bool HandleRawKey(IWebBrowser browserControl, Keys key, CefEventFlags modifiers) { if (modifiers == (CefEventFlags.ControlDown | CefEve...
```c# using System.Windows.Forms; using CefSharp; using TweetDuck.Utils; namespace TweetDuck.Browser.Handling { class KeyboardHandlerBase : IKeyboardHandler { protected virtual bool HandleRawKey(IWebBrowser browserControl, Keys key, CefEventFlags modifiers) { if (modifiers == (CefEventFlags.ControlDown | CefEve...
dacf1b29-228f-4096-9912-f2649f9f042c
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Data.Entity; using System.Linq; using Moq; namespace Mox { public static class DbSetMockingExtensions { public static DbSet<T> MockWithList<T>(this DbSet<T> dbSet, IList<T> data) where T : class { var queryable = data.AsQueryable...
```c# using System.Collections.Generic; using System.Data.Entity; using System.Linq; using Moq; namespace Mox { public static class DbSetMockingExtensions { public static DbSet<T> MockWithList<T>(this DbSet<T> dbSet, IList<T> data) where T : class { var queryable = data....
e7dc6311-5067-4cef-b6e3-2855ae72e1de
{ "language": "C#" }
```c# using Content.Server.GameObjects.Components.GUI; using Content.Shared.GameObjects.Components; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components { [RegisterComponent] public class Plac...
```c# using Content.Server.GameObjects.Components.GUI; using Content.Shared.GameObjects.Components; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components { [RegisterComponent] public class Pla...
b1025e0b-b30b-4d4e-983e-7055aab45731
{ "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 osu.Game.Database; using osu.Game.Users; using osu.Game.Utils; using Realms; namespace osu.Game.Models { public class RealmUser : EmbeddedO...
```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 osu.Game.Database; using osu.Game.Users; using osu.Game.Utils; using Realms; namespace osu.Game.Models { public class RealmUser : EmbeddedO...
acd98b38-5b0a-44bf-95a5-ed643e00713e
{ "language": "C#" }
```c# using System; #if __UNIFIED__ using Foundation; using UIKit; #else using MonoTouch.Foundation; using MonoTouch.UIKit; #endif namespace Plugin.Messaging { internal class PhoneCallTask : IPhoneCallTask { public PhoneCallTask() { } #region IPhoneCallTask Members pub...
```c# using System; #if __UNIFIED__ using Foundation; using UIKit; #else using MonoTouch.Foundation; using MonoTouch.UIKit; #endif namespace Plugin.Messaging { internal class PhoneCallTask : IPhoneCallTask { public PhoneCallTask() { } #region IPhoneCallTask Members pub...
a40a88f3-7728-419b-aa56-fdfd3142b7ee
{ "language": "C#" }
```c# using System.Runtime.Serialization; namespace Orationi.CommunicationCore.Model { /// <summary> /// Provide information about slave configuration. /// </summary> [DataContract] public class SlaveConfiguration { /// <summary> /// Versions of slave-assigned modules. /// </summary> [DataMember] publ...
```c# using System; using System.Runtime.Serialization; namespace Orationi.CommunicationCore.Model { /// <summary> /// Provide information about slave configuration. /// </summary> [DataContract] public class SlaveConfiguration { /// <summary> /// Global slave Id. /// <...
3f52cda8-7dba-4328-8c76-f8cc55da729b
{ "language": "C#" }
```c# using AutoMapper.Configuration; using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; namespace AutoMapper.Internal { public class FeatureCollectionBase<TValue> : IEnumerable<KeyValuePair<Type, TValue>> { private IDictionary<Type, TValue>...
```c# using AutoMapper.Configuration; using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; namespace AutoMapper.Internal { public class FeatureCollectionBase<TValue> : IEnumerable<KeyValuePair<Type, TValue>> { private IDictionary<Type, TValue>...
1184bad8-767f-4590-8417-44e64cd38d96
{ "language": "C#" }
```c# using System; using System.Linq; using System.Security.Cryptography; using System.Text; namespace JabbR.Infrastructure { public static class StringExtensions { public static string ToMD5(this string value) { if (String.IsNullOrEmpty(value)) { retur...
```c# using System; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; namespace JabbR.Infrastructure { public static class StringExtensions { public static string ToMD5(this string value) { if (String.IsNullOrEmpty(value...
ea9b18fd-96a7-440a-a7e9-765281d358d0
{ "language": "C#" }
```c# using System.Web.Mvc; using NUnit.Framework.Constraints; namespace MvcRouteTester.Test.Areas.SomeArea { public class SomeAreaAreaRegistration : AreaRegistration { public override string AreaName { get { return "SomeArea"; } } public override void RegisterArea(AreaRegistrationContext cont...
```c# using System.Web.Mvc; namespace MvcRouteTester.Test.Areas.SomeArea { public class SomeAreaAreaRegistration : AreaRegistration { public override string AreaName { get { return "SomeArea"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute(...
3b91f924-e622-4e6b-90b9-d4be3e26864a
{ "language": "C#" }
```c# <h1>Legal Notice &amp; Privacy</h1> <p>Dangl.<strong>Docu</strong> hosts all documentation and help pages for products and services offered by Dangl<strong>IT</strong> as well as for multiple open source projects.</p> <p> This website is operated and hosted by <a href="https://www.dangl-it.com/legal-notice...
```c# <h1>Legal Notice &amp; Privacy</h1> <p>Dangl.<strong>Docu</strong> hosts all documentation and help pages for products and services offered by Dangl<strong>IT</strong> as well as for multiple open source projects.</p> <p> This website is operated and hosted by <a href="https://www.dangl-it.com/legal-notice...
f1bd3cd6-6af9-404f-bbfd-43bcb2505334
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using System.Net; using UnityEngine; using UnityEngine.Networking; public class Autopilot : NetworkBehaviour { public string serverUrl; public float smoothing; private SerializableTransform targetTransform; private void Start () { if (isLocal...
```c# using System.Collections; using System.Collections.Generic; using System.Net; using UnityEngine; using UnityEngine.Networking; public class Autopilot : NetworkBehaviour { public string serverUrl; public float smoothing; private SerializableTransform targetTransform; private void Start () { if (isLocal...
5ba437ca-c639-46da-b688-7071e9a41009
{ "language": "C#" }
```c# // Copyright (c) 2016 The btcsuite developers // Copyright (c) 2016 The Decred developers // Licensed under the ISC license. See LICENSE file in the project root for full license information. using Paymetheus.Framework; using System; using System.Windows; using System.Windows.Input; namespace Paymetheus.ViewM...
```c# // Copyright (c) 2016 The btcsuite developers // Copyright (c) 2016 The Decred developers // Licensed under the ISC license. See LICENSE file in the project root for full license information. using Grpc.Core; using Paymetheus.Framework; using System; using System.Threading.Tasks; using System.Windows; using Sy...
7e81184d-e4a7-469c-a43d-c891e0092cf1
{ "language": "C#" }
```c# using System.Web.Mvc; using RestfulRouting.Sample.Infrastructure; using RestfulRouting.Sample.Models; namespace RestfulRouting.Sample.Controllers { public class BlogsController : Controller { public ActionResult Index() { return View(SampleData.Blogs()); } pu...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; using RestfulRouting.Sample.Infrastructure; using RestfulRouting.Sample.Models; namespace RestfulRouting.Sample.Controllers { public class BlogsController : Controller { protected ActionResult RespondTo(Acti...
8be2780b-2980-48c4-8823-592ee9e4a813
{ "language": "C#" }
```c# using System.Configuration; using System.Linq; using System.Web.Mvc; namespace MAB.PCAPredictCapturePlus.TestHarness.Controllers { public class HomeController : Controller { private CapturePlusClient _client = new CapturePlusClient( apiVersion: "2.10", key: ConfigurationM...
```c# using System.Configuration; using System.Linq; using System.Web.Mvc; namespace MAB.PCAPredictCapturePlus.TestHarness.Controllers { public class HomeController : Controller { private CapturePlusClient _client = new CapturePlusClient( apiVersion: "2.10", key: ConfigurationM...
8ee786df-11a2-42cf-b7f5-a6c0a73cc122
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Game_Algo { class Tile { /// <summary> /// 0 - Floor /// 1 - Wall /// </summary> public int TypeId { get; set; } public Tile(int MapCellId) { ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Game_Algo { class Tile { /// <summary> /// 0 - Floor /// 1 - Wall /// </summary> public int TypeId { get; set; } public Tile(int MapCellId) { ...
49cbfd20-8809-4653-8459-9fb3830b4a1c
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace QuantConnect.ToolBox { /// <summary> /// Provides time stamped writing to the console /// </summary> public static class Log { /// <summary> /// Write...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace QuantConnect.ToolBox { /// <summary> /// Provides time stamped writing to the console /// </summary> public static class Log { /// <summary> /// Defin...
994df0ed-3a0f-49f9-9044-03d08637eb7b
{ "language": "C#" }
```c# // The MIT License (MIT) // // Copyright (c) 2015 Rasmus Mikkelsen // https://github.com/rasmus/EventFlow // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, inc...
```c# // The MIT License (MIT) // // Copyright (c) 2015 Rasmus Mikkelsen // https://github.com/rasmus/EventFlow // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, inc...
2321884c-8a1c-4734-b4ba-f287cf5bd155
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using Foundation; using UIKit; namespace ExcelFormsTest.iOS { // The UIApplicationDelegate for the application. This class is responsible for launching the // User Interface of the application, as well as listening (and optionally resp...
```c# using System; using System.Collections.Generic; using System.Linq; using Foundation; using UIKit; namespace ExcelFormsTest.iOS { // The UIApplicationDelegate for the application. This class is responsible for launching the // User Interface of the application, as well as listening (and optionally resp...
80bae0b5-91ee-47e5-afdb-f6eea9af371c
{ "language": "C#" }
```c# using System; using System.ComponentModel.DataAnnotations; using System.Configuration; using System.Linq; using System.Text; namespace HermaFx.SimpleConfig { internal class CompositeConfigurationValidator : ConfigurationValidatorBase { private readonly ValidationAttribute[] _validationAttributes...
```c# using System; using System.ComponentModel.DataAnnotations; using System.Configuration; using System.Linq; using System.Text; namespace HermaFx.SimpleConfig { internal class CompositeConfigurationValidator : ConfigurationValidatorBase { private readonly ValidationAttribute[] _validationAttributes...
49e4ba50-55f8-41b3-aa0c-b38b5df934e9
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace Schedutalk.Logic.KTHPlaces { [DataContract] public class RoomDataContract { [DataMember(Name = "floorUid")] public string ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace Schedutalk.Logic.KTHPlaces { [DataContract] public class RoomDataContract { [DataMember(Name = "floorUid")] public string ...
844f632a-8b72-4169-9001-d9ca2a200d6c
{ "language": "C#" }
```c# using ChromeCast.Desktop.AudioStreamer.Application; namespace ChromeCast.Desktop.AudioStreamer.Discover { public class DiscoveredDevice { private const string GroupIdentifier = "\"md=Google Cast Group\""; public string Name { get; set; } public string IPAddress { get; set; } ...
```c# using ChromeCast.Desktop.AudioStreamer.Application; using System.Xml.Serialization; namespace ChromeCast.Desktop.AudioStreamer.Discover { public class DiscoveredDevice { private const string GroupIdentifier = "\"md=Google Cast Group\""; public string Name { get; set; } public st...
ac253546-48ec-4dfc-83a6-4784dc27d842
{ "language": "C#" }
```c# using StructuredXmlEditor.View; using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Diagnostics; using System.IO; using System.Linq; using System.Threading.Tasks; using System.Windows; namespace StructuredXmlEditor { /// <summary> /// Interaction l...
```c# using StructuredXmlEditor.View; using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Diagnostics; using System.IO; using System.Linq; using System.Threading.Tasks; using System.Windows; namespace StructuredXmlEditor { /// <summary> /// Interaction l...
0a67b263-9b1c-4781-bd9a-f012aea6d2bb
{ "language": "C#" }
```c# <script type="text/javascript">searchHighlight()</script> <?cs if:len(links.alternate) ?> <div id="altlinks"> <h3>Download in other formats:</h3> <ul><?cs each:link = links.alternate ?> <li<?cs if:name(link) == len(links.alternate) - #1 ?> class="last"<?cs /if ?>> <a href="<?cs var:link.href ?>"<?cs if:li...
```c# <script type="text/javascript">searchHighlight()</script> <?cs if:len(links.alternate) ?> <div id="altlinks"> <h3>Download in other formats:</h3> <ul><?cs each:link = links.alternate ?> <li<?cs if:name(link) == len(links.alternate) - #1 ?> class="last"<?cs /if ?>> <a href="<?cs var:link.href ?>"<?cs if:li...
eb64428d-dde2-49b4-bd54-f36a0c0737d2
{ "language": "C#" }
```c# using System; using System.Collections.Specialized; using System.IO; using System.Web; using Newtonsoft.Json; namespace WebServer { public class RequestInformation { public NameValueCollection Headers { get; private set; } public string BodyContent { get; private set; } public...
```c# using System; using System.Collections.Specialized; using System.IO; using System.Web; using Newtonsoft.Json; namespace WebServer { public class RequestInformation { public string Verb { get; private set; } public string Url { get; private set; } public NameValueCollection Hea...
fc9fc469-a26c-459c-b77a-d990d3efefd6
{ "language": "C#" }
```c# using System.Collections.Generic; namespace DotVVM.Framework.Diagnostics.Models { public class HttpHeaderItem { public string Key { get; set; } public string Value { get; set; } public static HttpHeaderItem FromKeyValuePair(KeyValuePair<string, string[]> pair) { ...
```c# using System.Collections.Generic; namespace DotVVM.Framework.Diagnostics.Models { public class HttpHeaderItem { public string Key { get; set; } public string Value { get; set; } public static HttpHeaderItem FromKeyValuePair(KeyValuePair<string, string[]> pair) { ...
8f95450b-2807-4ebe-b1dd-c28591e858b4
{ "language": "C#" }
```c#  @if (Request.IsAuthenticated) { <div class="btn-group"> <a class="btn btn-inverse" href="#"><i class="icon-user icon-white"></i> @User.Identity.Name</a> <a class="btn btn-inverse dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> <ul class="dropdown-menu...
```c#  @if (Request.IsAuthenticated) { <li> <div class="btn-group"> <a class="btn btn-inverse" href="#"><i class="icon-user icon-white"></i> @User.Identity.Name</a> <a class="btn btn-inverse dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> ...
3556a7bd-e0a3-42a1-a129-61cf1e46208d
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace Glimpse.Agent.AspNet.Mvc { internal class ActionSelectedMessage : IMessage { public Guid Id { get; } = Guid.NewGuid(); public DateTime Time { get; } = DateTime.Now; public string ActionId { get; set; } public st...
```c# using System; using System.Collections.Generic; namespace Glimpse.Agent.AspNet.Mvc { internal class ActionSelectedMessage : IMessage { public Guid Id { get; } = Guid.NewGuid(); public DateTime Time { get; } = DateTime.Now; public string ActionId { get; set; } public st...
c756af22-f954-48cb-80b3-1a0409e7977f
{ "language": "C#" }
```c# using Moq; using NUnit.Framework; using PhotoLife.Data.Contracts; using PhotoLife.Models; namespace PhotoLife.Services.Tests.UserServiceTests { [TestFixture] public class GetById_Should { [TestCase("some id")] [TestCase("other id")] public void _CallRepository_GetByIdMethod(s...
```c# using Moq; using NUnit.Framework; using PhotoLife.Data.Contracts; using PhotoLife.Models; namespace PhotoLife.Services.Tests.UserServiceTests { [TestFixture] public class GetById_Should { [TestCase("some id")] [TestCase("other id")] public void _CallRepository_GetByIdMethod(s...
2737fcc0-faf3-48b4-8311-ade1cab17e31
{ "language": "C#" }
```c# // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Threading; using osu.Game.Graphics.Backgrounds; namespace osu.Game.Screens.Back...
```c# // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.MathUtils; using osu.Framework.Threading; using osu.Game.Graphics.Backgrounds; n...
bc732eea-85e0-43b9-a492-374e0165582e
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.IO; using System.Linq; using System.Windows; using System.Windows.Data; using System.Windows.Media.Imaging; using SylphyHorn.Services; namespace SylphyHorn.UI.Controls { public class UnlockImag...
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.IO; using System.Linq; using System.Windows; using System.Windows.Data; using System.Windows.Media.Imaging; using SylphyHorn.Services; namespace SylphyHorn.UI.Controls { public class UnlockImag...
d3fe9fdb-9df0-4563-89c4-2229fe87d1ca
{ "language": "C#" }
```c# using System.Text.RegularExpressions; namespace Sep.Git.Tfs { public static class GitTfsConstants { public static readonly Regex Sha1 = new Regex("[a-f\\d]{40}", RegexOptions.IgnoreCase); public static readonly Regex Sha1Short = new Regex("[a-f\\d]{4,40}", RegexOptions.IgnoreCase); ...
```c# using System.Text.RegularExpressions; namespace Sep.Git.Tfs { public static class GitTfsConstants { public static readonly Regex Sha1 = new Regex("[a-f\\d]{40}", RegexOptions.IgnoreCase); public static readonly Regex Sha1Short = new Regex("[a-f\\d]{4,40}", RegexOptions.IgnoreCase); ...
a696ac0f-3c3d-4d15-820b-0630b43083cd
{ "language": "C#" }
```c# using PKISharp.WACS.Services; namespace PKISharp.WACS.Plugins.ValidationPlugins.Dns { class Manual : DnsValidation<ManualOptions, Manual> { private IInputService _input; public Manual(ILogService log, IInputService input, ManualOptions options, string identifier) : base(log, options, i...
```c# using PKISharp.WACS.Services; namespace PKISharp.WACS.Plugins.ValidationPlugins.Dns { class Manual : DnsValidation<ManualOptions, Manual> { private IInputService _input; public Manual(ILogService log, IInputService input, ManualOptions options, string identifier) : base(log, options, i...
3be18c9c-14c8-4977-995a-26cd9f210458
{ "language": "C#" }
```c# using System; using NUnit.Framework; namespace MongoDB.Driver.Connections { [TestFixture] public class TestConnectionFactory { [TearDown] public void TearDown (){ ConnectionFactory.Shutdown (); } [Test] public void TestGetConnection...
```c# using System; using NUnit.Framework; namespace MongoDB.Driver.Connections { [TestFixture] public class TestConnectionFactory { [TearDown] public void TearDown (){ ConnectionFactory.Shutdown (); } [Test] public void TestGetConnection...
0353d56e-e001-41d5-af23-1a555e7a5f7c
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Net.Mail; using System.Text; using System.Threading.Tasks; using OneWayMirror.Core; namespace OneWayMirror { internal sealed class ReportingConsoleHost : ConsoleHost { private readonly string _reportEmailAddress; ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Net.Mail; using System.Text; using System.Threading.Tasks; using OneWayMirror.Core; namespace OneWayMirror { internal sealed class ReportingConsoleHost : ConsoleHost { private readonly string _reportEmailAddress; ...
a8c4d170-4d9c-421b-81f7-bd781089b2c8
{ "language": "C#" }
```c# using System; using System.Diagnostics; using System.Threading.Tasks; using System.Windows.Input; namespace Fotografix { public sealed class DelegateCommand : ICommand { private readonly Func<bool> canExecute; private readonly Func<Task> execute; private bool executing; ...
```c# using System; using System.Diagnostics; using System.Threading.Tasks; using System.Windows.Input; namespace Fotografix { public sealed class DelegateCommand : ICommand { private readonly Func<bool> canExecute; private readonly Func<Task> execute; private bool executing; ...
20ec26fc-2312-45de-bb49-178163e435f1
{ "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.UserInterface; using osu.Game.Online; namespace osu.Game.Overlays {...
```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.UserInterface; using osu.Game.Online; namespace osu.Game.Overlays {...
0f8aa504-ba18-4b3a-a342-ed429a229759
{ "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 osu.Framework.Extensions.TypeExtensions; namespace osu.Framework.Localisation { /// <summary> /// Indicates that the members of an enum...
```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 osu.Framework.Extensions; using osu.Framework.Extensions.TypeExtensions; namespace osu.Framework.Localisation { /// <summary> /// Indic...
aa8b36e6-bd05-434c-a26c-6a302f7e5b16
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; using Hadouken.Common; using Hadouken.Hosting; namespace Hadouken.Hosts.WindowsSe...
```c# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; using Hadouken.Common; using Hadouken.Hosting; using System.Threading; namespace...
5a7053b3-1f65-4993-bf1e-f72aa7e2a074
{ "language": "C#" }
```c# using JetBrains.Annotations; using Orchard.ContentManagement; using Orchard.ContentManagement.Drivers; using Orchard.Core.Common.Fields; namespace Orchard.Core.Common.Drivers { [UsedImplicitly] public class TextFieldDriver : ContentFieldDriver<TextField> { public IOrchardServices Service...
```c# using JetBrains.Annotations; using Orchard.ContentManagement; using Orchard.ContentManagement.Drivers; using Orchard.Core.Common.Fields; using Orchard.Core.Common.Settings; namespace Orchard.Core.Common.Drivers { [UsedImplicitly] public class TextFieldDriver : ContentFieldDriver<TextField> { ...
1f9424ab-26de-4c21-8fec-1e174128c29d
{ "language": "C#" }
```c# // Copyright (c) The Perspex Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using System.Reflection; [assembly: AssemblyTitle("Perspex.Styling.UnitTests")] ``` Fix intermittent Style unit test failures.
```c# // Copyright (c) The Perspex Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using System.Reflection; using Xunit; [assembly: AssemblyTitle("Perspex.Styling.UnitTests")] // Don't run tests in parallel. [assembly: Collection...
569bdf4e-306a-442c-9e2b-efc7773dbfde
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Sandbox.ModAPI; using VRage.Game.Components; namespace Torch.Mod { [MySessionComponentDescriptor(MyUpdateOrder.AfterSimulation)] public class TorchModCore : MySessionComponentBase ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Sandbox.ModAPI; using VRage.Game.Components; namespace Torch.Mod { [MySessionComponentDescriptor(MyUpdateOrder.AfterSimulation)] public class TorchModCore : MySessionComponentBase ...
39dd5df2-b2f2-4594-8575-3ee66623d5da
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Utils; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osuTK;...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Utils; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osuTK;...
8e7a81ac-ab7c-4d42-9107-ed176d4b555d
{ "language": "C#" }
```c# using System; using System.Runtime.InteropServices; using System.Resources; using System.IO; namespace Win32 { public static class Winmm { public static void PlayMessageNotify() { if (_soundData == null) { using (UnmanagedMemoryStream ...
```c# using System; using System.Runtime.InteropServices; using System.Resources; using System.IO; namespace Win32 { public static class Winmm { public static void PlayMessageNotify() { if (_soundData == null) { using (UnmanagedMemoryStream ...
1fe12fea-3081-486c-977b-9ab5acc3b737
{ "language": "C#" }
```c# using System; namespace Arkivverket.Arkade.Metadata { public static class MetsTranslationHelper { public static bool IsValidSystemType(string systemType) { // TODO: Use Enum ExternalModels.Mets.type (not ExternalModels.Info.type) when/if supported in built in mets schema ...
```c# using System; using Arkivverket.Arkade.Core; namespace Arkivverket.Arkade.Metadata { public static class MetsTranslationHelper { public static bool IsValidSystemType(string systemType) { return Enum.IsDefined(typeof(ArchiveType), systemType); } public static ...
2a08091f-7de7-4237-9f9d-a4f96adfef5a
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ServiceModel; using PS.Mothership.Core.Common.Dto; namespace PS.Mothership.Core.Common.Contracts { [ServiceContract(Name = "DiallerService")] public interface IDiallerService { [OperationContract] ValidUserInfoDt...
```c# using System; using System.Collections.Generic; using System.ServiceModel; using PS.Mothership.Core.Common.Dto; namespace PS.Mothership.Core.Common.Contracts { [ServiceContract(Name = "DiallerService")] public interface IDiallerService { [OperationContract] ValidUserInfoDt...
d4380ca9-8768-4c34-8797-dd4a9cb4c9dd
{ "language": "C#" }
```c# using Elders.Cronus.Workflow; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using System.IO; using System.Threading.Tasks; namespace Elders.Cronus.MessageProcessing { /// <summary> /// Work-flow which gets an object from the passed context and calls a method 'Handle...
```c# using Elders.Cronus.Workflow; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using System.IO; using System.Threading.Tasks; namespace Elders.Cronus.MessageProcessing { /// <summary> /// Work-flow which gets an object from the passed context and calls a method 'Handle...
594388e7-ca9d-4c5f-a805-94d59ad28d00
{ "language": "C#" }
```c# @model IEnumerable<GiveCRM.Models.Donation> @{ Layout = null; } <table> <tr> <th>Date</th><th>Amount</th> </tr> @foreach (var donation in Model) { <tr> <td>@donation.Date.ToLongDateString()</td> <td>@donation.Amount</td> </tr> } </table>``` Fix a niggle from the wiki: display...
```c# @using System.Globalization @model IEnumerable<GiveCRM.Models.Donation> @{ Layout = null; } <table> <tr> <th>Date</th><th>Amount</th> </tr> @foreach (var donation in Model) { <tr> <td>@donation.Date.ToLongDateString()</td> <td>@donation.Amount.ToString("C2", NumberFormatInfo.Curren...
71b62d44-1c0c-4e45-a6c5-621b79f85aed
{ "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.Collections.Generic; using System.Runtime.Serialization.Formatters.Tests; using Xunit; namespace...
```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.Collections.Generic; using System.Runtime.Serialization.Formatters.Tests; using Xunit; namespace...
942f2aad-03c5-4098-afe5-5bc47e6e5981
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Newtonsoft.Json; namespace Contentful.Core.Models { /// <summary> /// Represents a single asset of a <see cref="Space"/>. /// </summary> public class Asset : IContentfulResource { /...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Newtonsoft.Json; namespace Contentful.Core.Models { /// <summary> /// Represents a single asset of a <see cref="Space"/>. /// </summary> public class Asset : IContentfulResource { /...
c84f2f4f-7565-4b57-9cec-c54fb303f2d4
{ "language": "C#" }
```c# namespace CypherTwo.Core { using System; using System.Linq; using System.Threading.Tasks; public class NeoClient : INeoClient { private readonly ISendRestCommandsToNeo neoApi; public NeoClient(string baseUrl) : this(new ApiClientFactory(baseUrl, new JsonHttpClientWrapper())) ...
```c# namespace CypherTwo.Core { using System; using System.Linq; using System.Threading.Tasks; public class NeoClient : INeoClient { private readonly ISendRestCommandsToNeo neoApi; public NeoClient(string baseUrl) : this(new ApiClientFactory(baseUrl, new JsonHttpClientWrapper())) ...
6b1efa97-a787-4da5-9db5-4e2439479b7a
{ "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); } } } ``` Comment out the code in Hangman that uses Table
```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); } } } ```
b008280a-3e7f-4756-91a8-cb30b3b335d7
{ "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.Threading.Tasks; namespace osu.Game.Online.RealtimeMultiplayer { /// <summary> /// An interface defining a spectator client instance. /// ...
```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.Threading.Tasks; namespace osu.Game.Online.RealtimeMultiplayer { /// <summary> /// An interface defining a spectator client instance. /// ...
52e2a779-9b09-4e03-bf2d-bccf9b800f9a
{ "language": "C#" }
```c# using System; using System.Threading; using Microsoft.SPOT; namespace AgentIntervals { public delegate void HeartBeatEventHandler(object sender, EventArgs e); public class HeartBeat { private Timer _timer; private int _period; public event HeartBeatEventHand...
```c# using System; using System.Threading; using Microsoft.SPOT; namespace AgentIntervals { public delegate void HeartBeatEventHandler(object sender, EventArgs e); public class HeartBeat { private Timer _timer; private int _period; public event HeartBeatEventHand...
893554b8-f420-4938-8dca-ed9cb166d18c
{ "language": "C#" }
```c# using System; using System.Linq; namespace FibCSharp { class Program { static void Main(string[] args) { var max = 50; Enumerable.Range(0, int.MaxValue) .Select(Fib) .TakeWhile(x => x <= 50) .ToList() ...
```c# using System; using System.Linq; namespace FibCSharp { class Program { static void Main(string[] args) { var max = 50; Enumerable.Range(0, int.MaxValue) .Select(Fib) .TakeWhile(x => x <= max) .ToList() ...
6c0c0a78-004b-4c38-9274-0f8c1035cd65
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace IvionSoft { public class History<T> { int length; HashSet<T> hashes; Queue<T> queue; object _locker; public History(int length) { if (length < 1) throw new ArgumentExcep...
```c# using System; using System.Collections.Generic; namespace IvionSoft { public class History<T> { public int Length { get; private set; } HashSet<T> hashes; Queue<T> queue; object _locker = new object(); public History(int length) : this(length, null) {} ...
ff2d959f-b8bc-45ec-a33f-0a45d4c26f1f
{ "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.Game.Graphics; using osu.Game.Graphics.Sprites; using ...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using o...
ed81a2c3-e7dd-4c55-80c9-7e7d0162bc00
{ "language": "C#" }
```c# namespace PegSharp.External { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class BlockChain { private List<BlockData> blocks = new List<BlockData>(); private List<BlockData> others = new List<BlockData>(); ...
```c# namespace PegSharp.External { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class BlockChain { private List<BlockData> blocks = new List<BlockData>(); private List<BlockData> others = new List<BlockData>(); ...
31611199-684c-4bae-a62d-d1ec2959f8d8
{ "language": "C#" }
```c# using System; namespace BitCommitment { /// <summary> /// A class to perform bit commitment. It does not care what the input is; it's just a /// facility for exchanging bit commitment messages. /// </summary> public class BitCommitmentEngine { #region properties public ...
```c# using System; namespace BitCommitment { /// <summary> /// A class to perform bit commitment. It does not care what the input is; it's just a /// facility for exchanging bit commitment messages. Based on Bruce Schneier's one-way /// function method for committing bits /// </summary> pub...
14be6c52-798b-45da-bf72-f269fa04c98d
{ "language": "C#" }
```c# /* * Created by SharpDevelop. * User: Lars Magnus * Date: 12.06.2014 * Time: 20:54 * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ using System; using System.Text; using Nancy; using SubmittedData; namespace Modules { /// <summary> /// Description of WebService. /...
```c# /* * Created by SharpDevelop. * User: Lars Magnus * Date: 12.06.2014 * Time: 20:54 * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ using System; using System.Text; using Nancy; using SubmittedData; namespace Modules { /// <summary> /// Description of WebService. /...
9c16baac-d4e0-4d26-9e68-140026880139
{ "language": "C#" }
```c# using System.ComponentModel; using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; namespace DesktopWidgets.Classes { [ExpandableObject] [DisplayName("Intro Settings")] public class IntroData { [DisplayName("Duration")] public int Duration { get; set; } = -1; [DisplayName("Re...
```c# using System.ComponentModel; using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; namespace DesktopWidgets.Classes { [ExpandableObject] [DisplayName("Intro Settings")] public class IntroData { [DisplayName("Duration")] public int Duration { get; set; } = -1; [DisplayName("Re...
51043eff-0972-4844-8cf8-7aa5d01799d2
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Web; using Microsoft.AspNet.SignalR; namespace SignalRDemo.Hubs { public class Chat : Hub { public void SayHello() { while (true) { Clients.All....
```c# using System; using System.Collections.Generic; using System.Linq; using System.Timers; using System.Web; using Microsoft.AspNet.SignalR; using Timer = System.Timers.Timer; namespace SignalRDemo.Hubs { public class Chat : Hub { static string messageToSend = DateTime.Now.ToString(); Timer...
2d407fd1-27a5-4b2e-8a4f-451b2030fefa
{ "language": "C#" }
```c# using BatteryCommander.Web.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers.API { public class EmbedsController : ApiController { public Embed...
```c# using BatteryCommander.Web.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers.API { public class EmbedsController : ApiController { public Embed...
d5e682a0-0e41-4c04-be66-c0f79675d4eb
{ "language": "C#" }
```c# using Roguelike.UI; using System; namespace Roguelike.Entities.Components { public class FighterComponent : Component { public int MaximumHealth { get; set; } public int CurrentHealth { get; set; } public int Power { get; set; } public int Defense { get; set; } p...
```c# using Roguelike.UI; using System; namespace Roguelike.Entities.Components { public class FighterComponent : Component { public const float CriticalHitChance = 0.05f; public int MaximumHealth { get; set; } public int CurrentHealth { get; set; } public int Power { get; set...
7d2483d1-32ed-4c52-8430-e4cec2ec4fba
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CodeFirstMigrations { public class Address { public Int32 Id { get; set; } public Int32 HouseNumber { get; set; } public String Street { get; set; } ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CodeFirstMigrations { public class Address { public Int32 Id { get; set; } public Int32 HouseNumber { get; set; } public String Street { get; set; } ...
f4cb04e6-1acc-42ed-9efb-d3560bbbda58
{ "language": "C#" }
```c# using BSParser.Data; using CsvHelper; using System.IO; using System.Text; namespace BSParser.Writers { public class StrictCSVWriter : Writer { private string _fileName; public StrictCSVWriter(string fileName) { _fileName = fileName; } public override...
```c# using BSParser.Data; using CsvHelper; using System.IO; using System.Linq; using System.Text; namespace BSParser.Writers { public class StrictCSVWriter : Writer { private string _fileName; public StrictCSVWriter(string fileName) { _fileName = fileName; } ...
bbc2875a-437c-41fa-beeb-d466cc333f30
{ "language": "C#" }
```c# using CompatApiClient.Utils; using DSharpPlus.Entities; using IrdLibraryClient; using IrdLibraryClient.POCOs; namespace CompatBot.Utils.ResultFormatters { public static class IrdSearchResultFormattercs { public static DiscordEmbedBuilder AsEmbed(this SearchResult searchResult) { ...
```c# using CompatApiClient.Utils; using DSharpPlus.Entities; using IrdLibraryClient; using IrdLibraryClient.POCOs; namespace CompatBot.Utils.ResultFormatters { public static class IrdSearchResultFormattercs { public static DiscordEmbedBuilder AsEmbed(this SearchResult searchResult) { ...
c859e7a4-9fd9-438b-8ee9-8dc59dc95fee
{ "language": "C#" }
```c# using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Livraria; namespace LivrariaTest { [TestClass] public class AutorTest { [TestMethod] public void TestProperties() { Autor autor = new Autor(); autor.CodAutor = 999...
```c# using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Livraria; using System.Collections.Generic; namespace LivrariaTest { [TestClass] public class AutorTest { [TestMethod] public void TestProperties() { Autor autor = new Autor(); ...
3d405aba-efd3-4be6-9935-115424278de1
{ "language": "C#" }
```c# using System; class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); foreach (var arg in args) { Console.Write("Hello "); Console.Write(arg); Console.WriteLine("!"); } Console.WriteLine("Press ENTER to exit ..."); Console.ReadLine(); } } ``` Make coding styl...
```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; internal class Program { private static void Main(string[] args) { Console.WriteLine("Hello World!"); foreach (var arg in a...
7cb9b003-4562-408c-85be-66be8e5d128d
{ "language": "C#" }
```c# // Copyright 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
```c# // Copyright 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
9ea49385-00c6-4bf9-a08f-d6741a180d1f
{ "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 using ManagedBass; using System; using System.Collections.Concurrent; namespace osu.Framework.Audio.Sample { internal class SampleBass : S...
```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 using ManagedBass; using System; using System.Collections.Concurrent; namespace osu.Framework.Audio.Sample { internal class SampleBass : S...
62df9761-a065-4598-a10f-b4fad135b5db
{ "language": "C#" }
```c# using Microsoft.AspNetCore.SignalR; using SO115App.Models.Servizi.CQRS.Commands.GestioneUtenti.CancellazioneUtente; using SO115App.Models.Servizi.Infrastruttura.GestioneUtenti.GetUtenti; using SO115App.Models.Servizi.Infrastruttura.Notification.GestioneUtenti; using System; using System.Threading.Tasks; namespa...
```c# using Microsoft.AspNetCore.SignalR; using SO115App.Models.Servizi.CQRS.Commands.GestioneUtenti.CancellazioneUtente; using SO115App.Models.Servizi.Infrastruttura.GestioneUtenti.GetUtenti; using SO115App.Models.Servizi.Infrastruttura.Notification.GestioneUtenti; using System; using System.Threading.Tasks; namespa...
e2fc3210-3aaa-42a7-9922-eac30dffe507
{ "language": "C#" }
```c# // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved. // The Apache v2. See License.txt in the project root for license information. using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.RazorPages;...
```c# // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved. // The Apache v2. See License.txt in the project root for license information. using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.RazorPages;...
85dd64dd-5f20-4fa4-aafa-71827a6db8ce
{ "language": "C#" }
```c# namespace BatteryCommander.Web { using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Core; public class Program { public static LoggingLevelSwitch LogLevel { get; } = new LoggingLevelSwi...
```c# namespace BatteryCommander.Web { using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Core; public class Program { public static LoggingLevelSwitch LogLevel { get; } = new LoggingLevelSwi...
ec823bbb-ff1d-4c59-aba6-45f7572be59b
{ "language": "C#" }
```c# using System; using System.Data; using System.Text.Json; using Dapper; namespace Dommel.Json { internal class JsonObjectTypeHandler : SqlMapper.ITypeHandler { private static readonly JsonSerializerOptions JsonOptions = new JsonSerializerOptions { AllowTrailingCommas = true, ...
```c# using System; using System.Data; using System.Text.Json; using System.Text.Json.Serialization; using Dapper; namespace Dommel.Json { internal class JsonObjectTypeHandler : SqlMapper.ITypeHandler { private static readonly JsonSerializerOptions JsonOptions = new() { AllowTraili...
fc597278-a0cc-4826-9455-9e4699a371bd
{ "language": "C#" }
```c# using System.Text; namespace TweetDck.Plugins{ static class PluginScriptGenerator{ public static string GenerateConfig(PluginConfig config){ return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"",config.DisabledPlugins)+"\"];" : string.Empty; } ...
```c# using System.Text; namespace TweetDck.Plugins{ static class PluginScriptGenerator{ public static string GenerateConfig(PluginConfig config){ return config.AnyDisabled ? "window.TD_PLUGINS.disabled = [\""+string.Join("\",\"",config.DisabledPlugins)+"\"];" : string.Empty; } ...
e84f1b20-195f-4cbf-a6d9-a97bacec38c2
{ "language": "C#" }
```c# using FreecraftCore.Serializer.KnownTypes; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FreecraftCore.Serializer.Tests { [TestFixture] public class StringTests { [Test] public static void Test_String_S...
```c# using FreecraftCore.Serializer.KnownTypes; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FreecraftCore.Serializer.Tests { [TestFixture] public class StringTests { [Test] public static void Test_String_S...
b16f9374-b7ec-48e1-bf61-963d985c46e6
{ "language": "C#" }
```c# using System; using System.Composition.Hosting; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.Loader; namespace AudioWorks.Extensions { abstract class ExtensionContainerBase { static readonly DirectoryInfo _extensionRoot = new DirectoryInfo(Path.Combine( ...
```c# using System; using System.Composition.Hosting; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.Loader; namespace AudioWorks.Extensions { abstract class ExtensionContainerBase { static readonly DirectoryInfo _extensionRoot =...
963e2501-33c1-4326-8270-1a9a68af6941
{ "language": "C#" }
```c# @model JoinRpg.DataModel.MarkdownString @{ var requiredMsg = new MvcHtmlString(""); var validation = false; foreach (var attr in @Html.GetUnobtrusiveValidationAttributes(@ViewData.TemplateInfo.HtmlFieldPrefix, @ViewData.ModelMetadata)) { if (attr.Key == "data-val-required") { requ...
```c# @model JoinRpg.DataModel.MarkdownString @{ var requiredMsg = new MvcHtmlString(""); var validation = false; foreach (var attr in @Html.GetUnobtrusiveValidationAttributes(@ViewData.TemplateInfo.HtmlFieldPrefix, @ViewData.ModelMetadata)) { if (attr.Key == "data-val-required") { requ...
7c3fefad-115e-4a18-ab39-501fdd7d8b9e
{ "language": "C#" }
```c# using Microsoft.Analytics.Interfaces; using Microsoft.Analytics.Types.Sql; using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Linq; // TweetAnalysis Assembly // Show the use of a U-SQL user-defined function (UDF) // // Register this assembly at master.TweetAnalysis ...
```c# using Microsoft.Analytics.Interfaces; using Microsoft.Analytics.Types.Sql; using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Linq; // TweetAnalysis Assembly // Show the use of a U-SQL user-defined function (UDF) // // Register this assembly at master.TweetAnalysis ...
30e9a226-cdc9-45fd-89e4-0465d2ca9074
{ "language": "C#" }
```c# using Microsoft.Build.Framework; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; namespace Microsoft.NET.Build.Tasks { public class CheckForImplicitPackageReferenceOverrides : TaskBase { const string MetadataKeyForItemsToRemove = ...
```c# using Microsoft.Build.Framework; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; namespace Microsoft.NET.Build.Tasks { public class CheckForImplicitPackageReferenceOverrides : TaskBase { const string MetadataKeyForItemsToRemove = ...
4e916f7b-3362-4b81-bbc6-56e47294b115
{ "language": "C#" }
```c# using OpenTK; using OpenTK.Graphics; using StorybrewCommon.Mapset; using StorybrewCommon.Scripting; using StorybrewCommon.Storyboarding; using StorybrewCommon.Storyboarding.Util; using StorybrewCommon.Subtitles; using StorybrewCommon.Util; using System; using System.Collections.Generic; using System.Linq; names...
```c# using OpenTK; using OpenTK.Graphics; using StorybrewCommon.Mapset; using StorybrewCommon.Scripting; using StorybrewCommon.Storyboarding; using StorybrewCommon.Storyboarding.Util; using StorybrewCommon.Subtitles; using StorybrewCommon.Util; using System; using System.Collections.Generic; using System.Linq; names...
04ff6444-8b07-4a3a-8b81-918133e136b5
{ "language": "C#" }
```c# namespace Ooui { public class Iframe : Element { public string Source { get => GetStringAttribute ("src", null); set => SetAttributeProperty ("src", value); } public Iframe () : base ("iframe") { } } } ``` Fix closi...
```c# namespace Ooui { public class Iframe : Element { public string Source { get => GetStringAttribute ("src", null); set => SetAttributeProperty ("src", value); } public Iframe () : base ("iframe") { } protected ove...
584fe194-544c-4a8b-b6a7-ef556b0b2926
{ "language": "C#" }
```c# using UnityEngine; namespace Weapons.Projectiles.Behaviours { /// <summary> /// Identical to ProjectileDecal.cs, but creates a decal upon despawning instead of on hitting something. /// </summary> public class ProjectileDecalOnDespawn : MonoBehaviour, IOnDespawn { [SerializeField] private GameObject deca...
```c# using UnityEngine; namespace Weapons.Projectiles.Behaviours { /// <summary> /// Identical to ProjectileDecal.cs, but creates a decal upon despawning instead of on hitting something. /// </summary> public class ProjectileDecalOnDespawn : MonoBehaviour, IOnDespawn { [SerializeField] private GameObject deca...
9221dccc-e875-4367-9831-057ddc0b4f86
{ "language": "C#" }
```c# @using Hops.Models; @model ListModel<HopModel> @{ Layout = "~/Views/Shared/_Layout.cshtml"; } @{ ViewBag.Title = "Search results - Hops"; } @if (!string.IsNullOrEmpty(Model.Pagination.SearchTerm)) { <h3>Search results for "@Model.Pagination.SearchTerm":</h3> } @Html.Partial("~/Views/Hop/List", Mo...
```c# @using Hops.Models; @model ListModel<HopModel> @{ Layout = "~/Views/Shared/_Layout.cshtml"; } @{ ViewBag.Title = "Search results - Hops"; } @if (!string.IsNullOrEmpty(Model.Pagination.SearchTerm)) { <h3>Search results for "@Model.Pagination.SearchTerm":</h3> } @Html.Partial("~/Views/Hop/List.csht...
7e9b8839-a690-4d2c-8980-074f79f5629d
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTit...
```c# using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTit...
1552aa73-45b5-407f-ab15-d0a8e6e817a4
{ "language": "C#" }
```c# using System; using System.Text; using Microsoft.AspNetCore.Mvc; namespace Markdig.WebApp { public class ApiController : Controller { // GET api/to_html?text=xxx&extensions=advanced [Route("api/to_html")] [HttpGet()] public object Get([FromQuery] string text, [FromQuery] ...
```c# using System; using System.Text; using Microsoft.AspNetCore.Mvc; namespace Markdig.WebApp { public class ApiController : Controller { [HttpGet()] [Route("")] public string Empty() { return string.Empty; } // GET api/to_html?text=xxx&extensions=...
72ffb710-d341-40d7-afc5-4fcba63f4898
{ "language": "C#" }
```c# using System; namespace Python.Runtime.Codecs { [Obsolete] public sealed class EnumPyIntCodec : IPyObjectEncoder, IPyObjectDecoder { public static EnumPyIntCodec Instance { get; } = new EnumPyIntCodec(); public bool CanDecode(PyType objectType, Type targetType) { ...
```c# using System; namespace Python.Runtime.Codecs { [Obsolete] public sealed class EnumPyIntCodec : IPyObjectEncoder, IPyObjectDecoder { public static EnumPyIntCodec Instance { get; } = new EnumPyIntCodec(); public bool CanDecode(PyType objectType, Type targetType) { ...
5ecb0c15-cb49-4ded-9738-0e2d3a9ab021
{ "language": "C#" }
```c# /* Copyright © Iain McDonald 2010-2020 This file is part of Decider. */ using System; using System.Collections.Generic; using System.Linq; namespace Decider.Example.LeagueGeneration { public class Program { static void Main(string[] args) { var leagueGeneration = new LeagueGeneration((ar...
```c# /* Copyright © Iain McDonald 2010-2020 This file is part of Decider. */ using System; using System.Collections.Generic; using System.Linq; namespace Decider.Example.LeagueGeneration { public class Program { static void Main(string[] args) { var leagueGeneration = new LeagueGeneration((ar...
0698db79-41eb-461c-bd9f-a51c702d591a
{ "language": "C#" }
```c# using System; using System.Diagnostics; namespace Nett { [DebuggerDisplay("{FromType} -> {ToType}")] internal sealed class TomlConverter<TFrom, TTo> : TomlConverterBase<TFrom, TTo> { private readonly Func<TFrom, TTo> convert; public TomlConverter(Func<TFrom, TTo> convert) { ...
```c# using System; namespace Nett { internal sealed class TomlConverter<TFrom, TTo> : TomlConverterBase<TFrom, TTo> { private readonly Func<TFrom, TTo> convert; public TomlConverter(Func<TFrom, TTo> convert) { if (convert == null) { throw new ArgumentNullException(nameof(...
0eff61b5-007d-4dc4-9f8e-da5006f32df4
{ "language": "C#" }
```c# namespace TAUtil.Tdf { using System.Collections.Generic; public class TdfNodeAdapter : ITdfNodeAdapter { private readonly Stack<TdfNode> nodeStack = new Stack<TdfNode>(); public TdfNodeAdapter() { this.RootNode = new TdfNode(); this.nodeSta...
```c# namespace TAUtil.Tdf { using System.Collections.Generic; public class TdfNodeAdapter : ITdfNodeAdapter { private readonly Stack<TdfNode> nodeStack = new Stack<TdfNode>(); public TdfNodeAdapter() { this.RootNode = new TdfNode(); this.nodeSta...
9fc15493-e56a-44d7-bc43-3b7779c30d10
{ "language": "C#" }
```c# @model ChatApp.Controllers.ChatMessagesViewModel @addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" @using ChatApp.Models <!DOCTYPE html> <html> <head> <title>ChatApp</title> </head> <body> <table> @foreach (Message msg in Model.OldMessages) { <tr> <td clas...
```c# @model ChatApp.Controllers.ChatMessagesViewModel @addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" @using ChatApp.Models <!DOCTYPE html> <html> <head> <title>ChatApp</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://www.w3schools.com...
f83379fb-0e21-41b8-a195-530a9ff261e7
{ "language": "C#" }
```c# using System; using System.Reflection; using System.Reflection.Emit; using System.Resources; using System.Runtime.InteropServices; [assembly: AssemblyCopyright(XsdDocMetadata.Copyright)] [assembly: AssemblyCompany("Immo Landwerth")] [assembly: AssemblyProduct("XML Schema Documenter")] [assembly: CLSCo...
```c# using System; using System.Reflection; using System.Reflection.Emit; using System.Resources; using System.Runtime.InteropServices; [assembly: AssemblyCopyright(XsdDocMetadata.Copyright)] [assembly: AssemblyCompany("Immo Landwerth")] [assembly: AssemblyProduct("XML Schema Documenter")] [assembly: CLSCo...
9c625c5c-54dc-4cb5-9d38-414bbbac503c
{ "language": "C#" }
```c# using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyCompany("Yevgeniy Shunevych")] [assembly: AssemblyProduct("Atata Framework")] [assembly: AssemblyCopyright("© Yevgeniy Shunevych 2018")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: AssemblyVers...
```c# using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyCompany("Yevgeniy Shunevych")] [assembly: AssemblyProduct("Atata Framework")] [assembly: AssemblyCopyright("© Yevgeniy Shunevych 2019")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: AssemblyVers...
1580902a-532c-4238-b82f-7defbee7bc53
{ "language": "C#" }
```c# using SimpleStack.Orm.Expressions; namespace SimpleStack.Orm.PostgreSQL { /// <summary>A postgre SQL expression visitor.</summary> /// <typeparam name="T">Generic type parameter.</typeparam> public class PostgreSQLExpressionVisitor<T>:SqlExpressionVisitor<T> { public PostgreSQLExpressionVisitor(ID...
```c# using System.Linq.Expressions; using SimpleStack.Orm.Expressions; namespace SimpleStack.Orm.PostgreSQL { /// <summary>A postgre SQL expression visitor.</summary> /// <typeparam name="T">Generic type parameter.</typeparam> public class PostgreSQLExpressionVisitor<T>:SqlExpressionVisitor<T> { public...