doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
6d753d06-030c-4a82-8254-2d60ebd7c13e | {
"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.Game.Rulesets.Beatmaps;
using osu.Game.Rulesets.Mania.Objects;
using System;
using System.Collections.Generic;
using osu.Game.Beatmaps;
using os... | ```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.Game.Rulesets.Beatmaps;
using osu.Game.Rulesets.Mania.Objects;
using System;
using System.Collections.Generic;
using osu.Game.Beatmaps;
using os... |
9f934ca6-acc0-4046-b052-840a91bd2b1f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
namespace HouseCannith_Frontend
{
public class Program
{
public static void Main(string[] args)
{... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
namespace HouseCannith_Frontend
{
public class Program
{
public static void Main(string[] args)
{... |
766d25ed-8087-44e4-840f-24283e17b7a8 | {
"language": "C#"
} | ```c#
using System;
namespace XeroApi.Model
{
public class Payment : EndpointModelBase
{
[ItemId]
public Guid? PaymentID { get; set; }
public DateTime Date { get; set; }
public decimal Amount { get; set; }
public string Reference { get; set; }
... | ```c#
using System;
namespace XeroApi.Model
{
public class Payment : EndpointModelBase
{
[ItemId]
public Guid? PaymentID { get; set; }
public DateTime Date { get; set; }
public decimal Amount { get; set; }
public string Reference { get; set; }
... |
587c2898-c8b7-4e89-a3ba-39cace31c2c0 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace LibSassGen
{
public partial class CodeGenerator
{
private const string DefaultIncludeDir = @"../../../../../libsass/include";
private const string DefaultOutputFilePath = @"../../../../SharpScss/LibSass.Generated.cs";
private const int In... | ```c#
using System;
using System.IO;
namespace LibSassGen
{
public partial class CodeGenerator
{
private const string DefaultIncludeDir = @"../../../../libsass/include";
private const string DefaultOutputFilePath = @"../../../SharpScss/LibSass.Generated.cs";
private const int IndentMul... |
dcf6180f-8396-426b-8c66-7689829b5acc | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Security.Cryptography;
using Mono.Security;
using Mono.Security.Cryptography;
namespace Xpdm.PurpleOnion
{
class Program
{
private static void Main()
{
long count = 0;
while (true)
{
RSA pki = RSA.Create();
ASN1 asn = RSAExtensions.ToAsn1Key(pki)... | ```c#
using System;
using System.IO;
using System.Security.Cryptography;
using Mono.Security;
using Mono.Security.Cryptography;
namespace Xpdm.PurpleOnion
{
static class Program
{
private static void Main()
{
long count = 0;
while (true)
{
RSA pki = RSA.Create();
ASN1 asn = RSAExtensions.ToAsn1K... |
dc0bc607-3463-4113-8589-c978961412c5 | {
"language": "C#"
} | ```c#
using System;
using System.Resources;
using System.Windows.Data;
namespace GoldenAnvil.Utility.Windows
{
public sealed class EnumToDisplayStringConverter : IValueConverter
{
public static readonly EnumToDisplayStringConverter Instance = new EnumToDisplayStringConverter();
public object Convert(object val... | ```c#
using System;
using System.Resources;
using System.Windows.Data;
namespace GoldenAnvil.Utility.Windows
{
public sealed class EnumToDisplayStringConverter : IValueConverter
{
public static readonly EnumToDisplayStringConverter Instance = new EnumToDisplayStringConverter();
public object Convert(object val... |
4f653d10-62df-4472-a4dc-702d749024cc | {
"language": "C#"
} | ```c#
using System;
using System.Data;
namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Data
{
public interface IDbFactory
{
/// <summary>
/// Creates an instance of your ISession expanded interface
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns>ISess... | ```c#
using System;
using System.Data;
namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Data
{
public interface IDbFactory
{
/// <summary>
/// Creates an instance of your ISession expanded interface
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns>ISess... |
4d70d069-90ad-4960-9576-2b8d629a5148 | {
"language": "C#"
} | ```c#
using CefSharp;
using CefSharp.Wpf;
using Playnite.Common;
using Playnite.Settings;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Playnite
{
public class CefTools
{
public static bool ... | ```c#
using CefSharp;
using CefSharp.Wpf;
using Playnite.Common;
using Playnite.Settings;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Playnite
{
public class CefTools
{
public static bool ... |
54dc41bb-eb64-4354-9306-a0c81488a3f3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace TirkxDownloader.Framework
{
public sealed class Pair<TFirst, TSecond> : IEquatable<Pair<TFirst, TSecond>>
{
private readonly TFirst first;
private readonly TSecond second;
public Pair(TFirst first, TSecond second)
... | ```c#
using System;
using System.Collections.Generic;
namespace TirkxDownloader.Framework
{
public sealed class Pair<TFirst, TSecond> : IEquatable<Pair<TFirst, TSecond>>
{
private readonly TFirst first;
private readonly TSecond second;
public Pair(TFirst first, TSecond second)
... |
651b06cd-c492-40cd-9a45-bb157466855f | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using NUnit.Framework;
namespace SharpBrake.Tests
{
public class AirbrakeValidator
{
public static void ValidateSchema(string xml)
{
var schema = GetXmlSchema();
XmlReade... | ```c#
using System;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using NUnit.Framework;
namespace SharpBrake.Tests
{
public class AirbrakeValidator
{
public static void ValidateSchema(string xml)
{
var schema = GetXmlSchema();
XmlReade... |
dcef4011-a982-485a-b58a-4d7fd1e5e222 | {
"language": "C#"
} | ```c#
using Alexa.NET.Management.Vendors;
using Refit;
namespace Alexa.NET.Management
{
[Headers("Authorization: Bearer")]
public interface IVendorApi
{
[Get("/vendors")]
Vendor[] Get();
}
}
```
Update vendor api to ensure task returned | ```c#
using System.Threading.Tasks;
using Alexa.NET.Management.Vendors;
using Refit;
namespace Alexa.NET.Management
{
[Headers("Authorization: Bearer")]
public interface IVendorApi
{
[Get("/vendors")]
Task<Vendor[]> Get();
}
}
``` |
ecd06029-fc00-4ef5-894b-402349203141 | {
"language": "C#"
} | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using EndlessClient.GameExecution;
using EOLib.DependencyInjection;
using Microsoft.Practices.Unity;
using Microsoft.Xna.Framework;
namespace EndlessClient
{
p... | ```c#
// Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using EndlessClient.GameExecution;
using EOLib.DependencyInjection;
using Microsoft.Practices.Unity;
using Microsoft.Xna.Framework;
namespace EndlessClient
{
p... |
ce962815-ffa8-4ac1-bacd-69a33de519c7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Prism.API;
namespace Prism.Mods.Hooks
{
class ModDefHooks : IHookManager
{
IEnumerable<Action>
onAllModsLoaded,
onUnload ,
preUpdate ,
postUpdate ;
pub... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Prism.API;
namespace Prism.Mods.Hooks
{
class ModDefHooks : IHookManager
{
IEnumerable<Action>
onAllModsLoaded,
onUnload ,
preUpdate ,
postUpdate ;
pub... |
24c8e058-9e60-49cc-ae15-ed97f495e7fe | {
"language": "C#"
} | ```c#
using System;
namespace Umbraco.Web.PublishedCache
{
public class UmbracoContextPublishedSnapshotAccessor : IPublishedSnapshotAccessor
{
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
public UmbracoContextPublishedSnapshotAccessor(IUmbracoContextAccessor umbracoContex... | ```c#
using System;
namespace Umbraco.Web.PublishedCache
{
public class UmbracoContextPublishedSnapshotAccessor : IPublishedSnapshotAccessor
{
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
public UmbracoContextPublishedSnapshotAccessor(IUmbracoContextAccessor umbracoContex... |
c989e0e1-ce38-46c0-95b5-287cb4f967de | {
"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.Runtime.InteropServices;
namespace MICore
{
internal class NativeMethods
{
// TODO: It would be better to route these... | ```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.Runtime.InteropServices;
namespace MICore
{
internal class NativeMethods
{
private const string Libc = "libc";
... |
e8720922-e6fd-4fbd-98a2-b14facb23190 | {
"language": "C#"
} | ```c#
using System;
using System.Text;
namespace Python.Runtime
{
using static Runtime;
[Obsolete("Only to be used from within Python")]
static class Loader
{
public unsafe static int Initialize(IntPtr data, int size)
{
try
{
var dllPath = Encodi... | ```c#
using System;
using System.Text;
namespace Python.Runtime
{
using static Runtime;
[Obsolete("Only to be used from within Python")]
static class Loader
{
public unsafe static int Initialize(IntPtr data, int size)
{
try
{
var dllPath = Encodi... |
7b43a904-37f9-4334-8569-c1e76a9770ab | {
"language": "C#"
} | ```c#
using System;
using GitHubSharp.Models;
using System.Collections.Generic;
namespace GitHubSharp.Controllers
{
public class CommitsController : Controller
{
public RepositoryController RepositoryController { get; private set; }
public CommitController this[string key]
{
... | ```c#
using System;
using GitHubSharp.Models;
using System.Collections.Generic;
namespace GitHubSharp.Controllers
{
public class CommitsController : Controller
{
public string FilePath { get; set; }
public RepositoryController RepositoryController { get; private set; }
public CommitCo... |
917c8ff0-c01b-4668-aa4d-73bebc79fc6f | {
"language": "C#"
} | ```c#
namespace ATP.AnimationPathTools {
public class TargetAnimationPath : AnimationPath {
}
}
```
Set default target path gizmo curve color | ```c#
using UnityEngine;
namespace ATP.AnimationPathTools {
public class TargetAnimationPath : AnimationPath {
/// <summary>
/// Color of the gizmo curve.
/// </summary>
private Color gizmoCurveColor = Color.magenta;
}
}
``` |
c1dfd013-e36b-4d6d-96bd-7dca248e5883 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TourOfCSharp6
{
public class Point
{
public double X { get; set; }
public double Y { get; set; }
public double Distance
{
get
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TourOfCSharp6
{
public class Point
{
public double X { get; set; }
public double Y { get; set; }
public double Distance => Math.Sqrt(X * X + Y * Y);
}... |
6677c7e3-2279-4b65-b6ca-8907ae9f05d9 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[ assembly : ComVisible( false ) ]
[ assembly : AssemblyProduct( "ShipStationAccess" ) ]
[ assembly : AssemblyCompany( "Agile Harbor, LLC" ) ]
[ assembly : AssemblyCopyright( "Copyright (C) Agile Harbor, LLC" ) ]
[ assembly : As... | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[ assembly : ComVisible( false ) ]
[ assembly : AssemblyProduct( "ShipStationAccess" ) ]
[ assembly : AssemblyCompany( "Agile Harbor, LLC" ) ]
[ assembly : AssemblyCopyright( "Copyright (C) Agile Harbor, LLC" ) ]
[ assembly : As... |
7d201328-cfca-4bc5-8849-7aa49989521d | {
"language": "C#"
} | ```c#
namespace CertiPay.Common.Testing
{
using ApprovalTests;
using Newtonsoft.Json;
using Ploeh.AutoFixture;
public static class TestExtensions
{
private static readonly Fixture _fixture = new Fixture { };
/// <summary>
/// Runs ApprovalTests's VerifyJson against a JSON.... | ```c#
namespace CertiPay.Common.Testing
{
using ApprovalTests;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Ploeh.AutoFixture;
public static class TestExtensions
{
private static readonly Fixture _fixture = new Fixture { };
private static readonly JsonSeriali... |
4b1b0c04-d96c-46e3-af8a-674c71f5b4f8 | {
"language": "C#"
} | ```c#
using System;
namespace GrovePi.Sensors
{
public abstract class Sensor<TSensorType> where TSensorType : class
{
protected readonly IGrovePi Device;
protected readonly Pin Pin;
internal Sensor(IGrovePi device, Pin pin, PinMode pinMode)
{
if (device == null) th... | ```c#
using System;
namespace GrovePi.Sensors
{
public abstract class Sensor<TSensorType> where TSensorType : class
{
protected readonly IGrovePi Device;
protected readonly Pin Pin;
internal Sensor(IGrovePi device, Pin pin, PinMode pinMode)
{
if (device == null) th... |
5e2d1bd3-4d0d-4afb-9cbc-46d9c5d3c4bb | {
"language": "C#"
} | ```c#
using System.Collections;
class IENumDemo
{
/// <summary>
/// Create a cosinus table enumerator with 0..360 deg values
/// </summary>
private IEnumerator costable = new Func<List<float>>(() =>
{
List<float> nn = new List<float>();
for (int v = 0; v < 360; v++)
... | ```c#
using System.Collections;
class IENumDemo
{
/// <summary>
/// Create a cosinus table enumerator with 0..360 deg values
/// </summary>
private IEnumerator costable = new Func<List<float>>(() =>
{
List<float> nn = new List<float>();
for (int v = 0; v < 360; v++)
... |
0d8f34c2-3f7d-4a5b-9afc-bcd94f562dc8 | {
"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.Bindables;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Os... | ```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.Bindables;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Os... |
e874bbef-6820-49a6-a5ef-977fe57b18d6 | {
"language": "C#"
} | ```c#
using System;
using Rant.Localization;
namespace Rant.Vocabulary
{
/// <summary>
/// Thrown when Rant encounters an error while loading a dictionary table.
/// </summary>
public sealed class RantTableLoadException : Exception
{
internal RantTableLoadException(string origin, int line, int col, string mes... | ```c#
using System;
using Rant.Localization;
namespace Rant.Vocabulary
{
/// <summary>
/// Thrown when Rant encounters an error while loading a dictionary table.
/// </summary>
public sealed class RantTableLoadException : Exception
{
internal RantTableLoadException(string origin, int line, int col, string mes... |
25ee4f9b-0c84-4ac6-b71a-2ebfe0b64164 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace BetterLoadSaveGame
{
class SaveWatcher : IDisposable
{
private FileSystemWatcher _watcher;
public event FileSystemEventHandler OnSave;
public SaveWatcher()
{... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace BetterLoadSaveGame
{
class SaveWatcher : IDisposable
{
private FileSystemWatcher _watcher;
public event FileSystemEventHandler OnSave;
public SaveWatcher()
{... |
8fbf7405-2a54-4d0b-813b-4970ad262bee | {
"language": "C#"
} | ```c#
using System;
namespace NuGet
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "https://go.microsoft.com/fwlink/?LinkID=230477";
public static readonly string V1FeedUrl = "https://go.microsoft.com/fwlink/?LinkID=206669";
public stati... | ```c#
using System;
namespace NuGet
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "https://go.microsoft.com/fwlink/?LinkID=230477";
public static readonly string V1FeedUrl = "https://go.microsoft.com/fwlink/?LinkID=206669";
public stati... |
92780c44-40c0-4d2e-855a-fa91e66af6b7 | {
"language": "C#"
} | ```c#
using System;
namespace JustSaying.Models
{
public abstract class Message
{
protected Message()
{
TimeStamp = DateTime.UtcNow;
Id = Guid.NewGuid();
}
public Guid Id { get; set; }
public DateTime TimeStamp { get; private set; }
publi... | ```c#
using System;
namespace JustSaying.Models
{
public abstract class Message
{
protected Message()
{
TimeStamp = DateTime.UtcNow;
Id = Guid.NewGuid();
}
public Guid Id { get; set; }
public DateTime TimeStamp { get; set; }
public string... |
4cca71a7-3cc9-437c-bb3c-3e9142d831f3 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Web.Http;
using Autofac;
using Autofac.Integration.WebApi;
namespace ReSharperTnT
{
public class Bootstrapper
{
public static void Init()
{
var bootstrapper = new Bootstrapper();
var container = bootstrapper.CreateContainer();... | ```c#
using System.Web.Http;
using Autofac;
using Autofac.Integration.WebApi;
namespace ReSharperTnT
{
public class Bootstrapper
{
static Bootstrapper()
{
Init();
}
public static void Init()
{
var bootstrapper = new Bootstrapper();
v... |
2fef0830-1ac3-499c-9b5a-f0053e42edf8 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace SyncTrayzor.Utils
{
public class AtomicFileStream : FileStream
{
private const string DefaultTempFileSuffix = ".tmp";
private readonly string path;
private readonly string tempPath;
public At... | ```c#
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace SyncTrayzor.Utils
{
public class AtomicFileStream : FileStream
{
private const string DefaultTempFileSuffix = ".tmp";
private readonly string path;
private readonly string tempPath;
public At... |
dd6e3463-f458-4782-a271-d5fc09046167 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Reflection;
namespace ApiCheck.Loader
{
public sealed class AssemblyLoader : IDisposable
{
public AssemblyLoader()
{
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += CurrentDomainOnReflectionOnlyAssemblyResolve;
}
public void Dispose(... | ```c#
using System;
using System.IO;
using System.Reflection;
namespace ApiCheck.Loader
{
public sealed class AssemblyLoader : IDisposable
{
public AssemblyLoader()
{
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += CurrentDomainOnReflectionOnlyAssemblyResolve;
}
public void Dispose(... |
531316ce-9db4-46ad-9f3f-2f8de787475c | {
"language": "C#"
} | ```c#
using Android.Content;
using Android.Views;
using Android.Widget;
namespace Calculator.Droid
{
public class ButtonAdapter : BaseAdapter
{
Context context;
string[] buttons = new string[] {
"<-", "C", "±", "/",
"7", "8", "9", "*",
"4", "5", "6", "-",
"1", "2", "3", "+",
"0", ".", null, "="... | ```c#
using Android.Content;
using Android.Views;
using Android.Widget;
namespace Calculator.Droid
{
public class ButtonAdapter : BaseAdapter
{
Context context;
string[] buttons = new string[] {
"←", "C", "±", "/",
"7", "8", "9", "*",
"4", "5", "6", "-",
"1", "2", "3", "+",
"0", ".", null, "="
... |
2c4b052e-296e-42f3-b065-28e9e9e88b27 | {
"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.
// Tests GC.TotalMemory
using System;
public class Test {
public static int Main() {
GC.Collec... | ```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.
// Tests GC.TotalMemory
using System;
public class Test {
public static int Main() {
GC.Collec... |
bc3d6f15-81fb-4109-aa87-414a5d5bef19 | {
"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... |
d75da500-730e-43ec-a65d-2e740fd0e56f | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.WebHooks;
using Newtonsoft.Json.Linq;
namespace GenericReceivers.WebHooks
{
public class GenericJsonWebHookHandler : WebHookHandler
{
public GenericJsonWebHookHandler()
{
this.Receiver = "genericjson";
... | ```c#
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.WebHooks;
using Newtonsoft.Json.Linq;
namespace GenericReceivers.WebHooks
{
public class GenericJsonWebHookHandler : WebHookHandler
{
public GenericJsonWebHookHandler()
{
this.Receiver = "genericjson";
... |
bb32d5fb-dc05-41e9-8f0b-6726e368efc4 | {
"language": "C#"
} | ```c#
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE0071:Simplify interpolation", Justification = "IDE0071 considerably decreases the performance of string construction")]
```
Revert "remove a suppression no longer needed" | ```c#
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE0071:Simplify interpolation", Justification = "IDE0071 considerably decreases the performance of string construction")]
[assembly: SuppressMessage("Style", "IDE0071WithoutSuggestion")]
``` |
9a52deb8-a584-46eb-affe-58245238aa35 | {
"language": "C#"
} | ```c#
using System;
namespace NPSharp.NP
{
internal class NpFileException : Exception
{
internal NpFileException(int error)
: base(error == 1 ? @"File not found on NP server" : @"Internal error on NP server")
{
}
internal NpFileException()
: base(@"Coul... | ```c#
using System;
namespace NPSharp.NP
{
public class NpFileException : Exception
{
internal NpFileException(int error)
: base(error == 1 ? @"File not found on NP server" : @"Internal error on NP server")
{
}
internal NpFileException()
: base(@"Could ... |
68f433de-4674-46c5-b213-2af79ab56723 | {
"language": "C#"
} | ```c#
using CareerHub.Client.API.Meta;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CareerHub.Client.API {
public class APIInfo {
public APIInfo() {
this.SupportedComponents = new List<string>();
}
... | ```c#
using CareerHub.Client.API.Meta;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CareerHub.Client.API {
public class APIInfo {
public APIInfo() {
this.SupportedComponents = new List<string>();
}
... |
98e065e3-7681-4308-9154-2dbaa6fbb390 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Bravo.Models {
public class Album {
[Required]
public int AlbumId { get; set; }
[Required, MaxLength(255), Display(Name = "Title")]
public string AlbumName { get; set; }
[Required]
public int GenreId { get; s... | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Bravo.Models {
public class Album {
[Required]
public int AlbumId { get; set; }
[Required, MaxLength(255), Display(Name = "Title")]
public string AlbumName { get; set; }
[Required]
public int GenreId { get; s... |
656a78b5-1399-4ba9-ae98-3b617249832e | {
"language": "C#"
} | ```c#
using System;
using MessageBird.Objects;
using MessageBird.Resources;
using MessageBird.Net;
namespace MessageBird
{
public class Client
{
private IRestClient restClient;
private Client(IRestClient restClient)
{
this.restClient = restClient;
}
public ... | ```c#
using System;
using MessageBird.Objects;
using MessageBird.Resources;
using MessageBird.Net;
namespace MessageBird
{
public class Client
{
private IRestClient restClient;
private Client(IRestClient restClient)
{
this.restClient = restClient;
}
public ... |
029673eb-aa3f-49e6-b822-552fb38363c2 | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.DataAnnotations;
using Derby.Infrastructure;
namespace Derby.Models
{
public class Competition
{
public int Id { get; set; }
public int PackId { get; set; }
public string Title { get; set; }
public string Location { get; set; }
... | ```c#
using System;
using System.ComponentModel.DataAnnotations;
using Derby.Infrastructure;
namespace Derby.Models
{
public class Competition
{
public int Id { get; set; }
public int PackId { get; set; }
public string Title { get; set; }
public string Location { get; set; }
... |
ce225ef6-1f35-4ea9-95e9-981d89187e23 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using BabelMark;
using Newtonsoft.Json;
namespace EncryptApp
{
class Program
{
static int Main(string[] args)
{
if (args.Len... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using BabelMark;
using Newtonsoft.Json;
namespace EncryptApp
{
class Program
{
static int Main(string[] args)
{
if (args.Len... |
c62d3173-070d-4d8c-8f23-1ea69f1eeae2 | {
"language": "C#"
} | ```c#
using System;
using OpenQA.Selenium.PhantomJS;
using OpenQA.Selenium.Remote;
namespace ExpressiveAnnotations.MvcWebSample.UITests
{
public class DriverFixture : IDisposable
{
public DriverFixture() // called before every test class
{
var service = PhantomJSDriverService.Creat... | ```c#
using System;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.PhantomJS;
using OpenQA.Selenium.Remote;
namespace ExpressiveAnnotations.MvcWebSample.UITests
{
public class DriverFixture : IDisposable
{
public DriverFixture() // called before every test class
{
//var servi... |
0a5e514e-b2e8-4d7a-9a85-8005bf001304 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OneWireConsoleScanner
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("OneWire scanner");
var ports = OneWire.OneWir... | ```c#
using System;
using System.Collections.Generic;
namespace OneWireConsoleScanner
{
internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine("OneWire scanner");
var ports = OneWire.OneWire.GetPortNames();
if (ports.Length == ... |
8c40b25e-067b-4fc6-8103-3a1b3846a20c | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Azimuth.DataAccess.Infrastructure;
namespace Azimuth.DataAccess.Entities
{
public class User : BaseEntity
{
public virtual Name Name { get; set; }
public virtual string ScreenName { get; set; }
public v... | ```c#
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Azimuth.DataAccess.Infrastructure;
namespace Azimuth.DataAccess.Entities
{
public class User : BaseEntity
{
public virtual Name Name { get; set; }
public virtual string ScreenName { get; set; }
... |
36dcf91c-12bc-4fd6-b36c-ae4a6456dcb1 | {
"language": "C#"
} | ```c#
namespace Bakery.Security
{
using System;
using System.Text;
using Text;
public class BasicAuthenticationParser
: IBasicAuthenticationParser
{
private readonly IBase64Parser base64Parser;
private readonly Encoding encoding;
public BasicAuthenticationParser(IBase64Parser base64Parser, E... | ```c#
namespace Bakery.Security
{
using System;
using System.Text;
using Text;
public class BasicAuthenticationParser
: IBasicAuthenticationParser
{
private readonly IBase64Parser base64Parser;
private readonly Encoding encoding;
public BasicAuthenticationParser(IBase64Parser base64Parser, E... |
c8a3fd08-6489-465e-870d-7b15d726b5a4 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using WalletWasabi.Helpers;
using WalletWasabi.Crypto.Groups;
namespace System.Linq
{
public static class Extensions
{
public static GroupElement Sum(this IEnumerable<GroupElement> groupElements) =>
groupElements.Aggregate(GroupElement.Infinity, (ge, acc) => ge + acc);
... | ```c#
using System.Collections.Generic;
using WalletWasabi.Helpers;
using WalletWasabi.Crypto.Groups;
using WalletWasabi.Crypto.ZeroKnowledge.LinearRelation;
using WalletWasabi.Crypto;
namespace System.Linq
{
public static class Extensions
{
public static GroupElement Sum(this IEnumerable<GroupElement> groupElemen... |
730d6327-1a2c-4c1c-a473-e4dc4a161601 | {
"language": "C#"
} | ```c#
using UnityEngine;
namespace HoloToolkit.Unity
{
public static class CameraCache
{
private static Camera cachedCamera;
/// <summary>
/// Returns a cached reference to the main camera and uses Camera.main if it hasn't been cached yet.
/// </summary>
public static ... | ```c#
using UnityEngine;
namespace HoloToolkit.Unity
{
public static class CameraCache
{
private static Camera cachedCamera;
/// <summary>
/// Returns a cached reference to the main camera and uses Camera.main if it hasn't been cached yet.
/// </summary>
public static ... |
8831efa8-97b9-423c-9ec0-df2c10972be0 | {
"language": "C#"
} | ```c#
using System;
namespace CertiPay.Common.Notifications
{
public class AndroidNotification : Notification
{
public static string QueueName { get; } = "AndroidNotifications";
// Message => Content
/// <summary>
/// The subject line of the email
/// </summary>
... | ```c#
using System;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Describes a notification sent to an Android device via Google Cloud Messaging
/// </summary>
public class AndroidNotification : Notification
{
public static string QueueName { get; } = "AndroidNotifications";
... |
b5a6c866-0830-4c17-988e-b792c583a27a | {
"language": "C#"
} | ```c#
using System;
using Aspose.Email.Storage.Olm;
using Aspose.Email.Mapi;
namespace Aspose.Email.Examples.CSharp.Email.Outlook.OLM
{
class LoadAndReadOLMFile
{
public static void Run()
{
// The path to the File directory.
string dataDir = RunExamples.GetDataDir_Outlo... | ```c#
using System;
using Aspose.Email.Storage.Olm;
using Aspose.Email.Mapi;
namespace Aspose.Email.Examples.CSharp.Email.Outlook.OLM
{
class LoadAndReadOLMFile
{
public static void Run()
{
// The path to the File directory.
string dataDir = RunExamples.GetDataDir_Outlo... |
074c3869-9c73-4138-bc43-e20048ccc8d3 | {
"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: AssemblyTitl... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitl... |
0226d603-0029-4c38-9e63-2e981f382d9f | {
"language": "C#"
} | ```c#
using NUnit.Framework;
namespace ZeroLog.Tests
{
[TestFixture]
public class UninitializedLogManagerTests
{
[TearDown]
public void Teardown()
{
LogManager.Shutdown();
}
[Test]
public void should_log_without_initialize()
{
... | ```c#
using System;
using NFluent;
using NUnit.Framework;
using ZeroLog.Configuration;
namespace ZeroLog.Tests
{
[TestFixture, NonParallelizable]
public class UninitializedLogManagerTests
{
private TestAppender _testAppender;
[SetUp]
public void SetUpFixture()
{
... |
201c4d93-acd3-499e-990e-0ca57d314a1b | {
"language": "C#"
} | ```c#
using System;
namespace Renci.SshClient
{
public class ConnectionInfo
{
public string Host { get; set; }
public int Port { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public PrivateKeyFile KeyFile { get; se... | ```c#
using System;
namespace Renci.SshClient
{
public class ConnectionInfo
{
public string Host { get; set; }
public int Port { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public PrivateKeyFile KeyFile { get; se... |
fdd4301a-016e-450e-8a68-12ccf8ccea3e | {
"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.Pooling;
using osu.Framework.Timing;
using osuTK;
namespace osu.Game.Rulesets.Catch.UI
{
/// <summar... | ```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.Pooling;
using osu.Framework.Timing;
using osuTK;
namespace osu.Game.Rulesets.Catch.UI
{
/// <summar... |
54306772-2f86-4b49-95d6-8f0e55eb1c42 | {
"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.Platform;
using osu.Game.Beatmaps;
using osu.Game.IO;
namespace osu.Game.Database
{
public class LegacyBeatmapImporter : LegacyModelImporte... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.IO;
names... |
d7e4588c-53b7-4e96-bbad-8747dc02fa8f | {
"language": "C#"
} | ```c#
using Xunit;
using Xunit.Abstractions;
namespace Templates.Test
{
public class WebApiTemplateTest : TemplateTestBase
{
public WebApiTemplateTest(ITestOutputHelper output) : base(output)
{
}
[Theory]
[InlineData(null)]
[InlineData("net461")]
public... | ```c#
using Xunit;
using Xunit.Abstractions;
namespace Templates.Test
{
public class WebApiTemplateTest : TemplateTestBase
{
public WebApiTemplateTest(ITestOutputHelper output) : base(output)
{
}
[Theory]
[InlineData(null)]
[InlineData("net461")]
public... |
2afee1a5-6a09-4298-b581-9191169f25d6 | {
"language": "C#"
} | ```c#
using Nancy;
namespace Plating
{
public class Bootstrapper : DefaultNancyBootstrapper
{
public Bootstrapper()
{
Cassette.Nancy.CassetteNancyStartup.OptimizeOutput = true;
}
}
}```
Enable error traces for Razor. | ```c#
using Nancy;
namespace Plating
{
public class Bootstrapper : DefaultNancyBootstrapper
{
public Bootstrapper()
{
StaticConfiguration.DisableErrorTraces = false;
Cassette.Nancy.CassetteNancyStartup.OptimizeOutput = true;
}
}
}``` |
fae56a8c-1818-481d-b60b-9d98bdec3a21 | {
"language": "C#"
} | ```c#
namespace CompetitionPlatform.Helpers
{
public static class StreamsRoles
{
public const string Admin = "ADMIN";
}
public static class ResultVoteTypes
{
public const string Admin = "ADMIN";
public const string Author = "AUTHOR";
}
public static class OrderingC... | ```c#
namespace CompetitionPlatform.Helpers
{
public static class StreamsRoles
{
public const string Admin = "ADMIN";
}
public static class ResultVoteTypes
{
public const string Admin = "ADMIN";
public const string Author = "AUTHOR";
}
public static class OrderingT... |
a03d6a1d-f248-42a2-b71a-dbdd831472f0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Snowflake.Ajax
{
/// <summary>
/// A metadata attribute to indicate parameter methods
/// Does not affect execution.
/// </summary>
[AttributeUsage(AttributeTargets.M... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Snowflake.Ajax
{
/// <summary>
/// A metadata attribute to indicate parameter methods
/// Does not affect execution.
/// </summary>
[AttributeUsage(AttributeTargets.M... |
df54e1de-cab6-4b40-832d-3f8426007bb7 | {
"language": "C#"
} | ```c#
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code ... | ```c#
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code ... |
177448dd-70c8-4b81-81a7-eb50e842b51a | {
"language": "C#"
} | ```c#
namespace dotless.Core.Parser.Functions
{
using System.Linq;
using Infrastructure;
using Infrastructure.Nodes;
using Tree;
using Utils;
public class RgbaFunction : Function
{
protected override Node Evaluate(Env env)
{
if (Arguments.Count == 2)
... | ```c#
namespace dotless.Core.Parser.Functions
{
using System.Linq;
using Infrastructure;
using Infrastructure.Nodes;
using Tree;
using Utils;
public class RgbaFunction : Function
{
protected override Node Evaluate(Env env)
{
if (Arguments.Count == 2)
... |
d9dcaef0-ae81-4379-a46c-612bfd14dd6b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace unBand
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace unBand
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
... |
d0db3c1f-afac-468d-9eac-0315282cf3d5 | {
"language": "C#"
} | ```c#
using System.IO;
using System.Net.Http;
using MyCouch.Extensions;
using MyCouch.Serialization;
namespace MyCouch.Responses.Factories
{
public class DocumentResponseFactory : ResponseFactoryBase
{
public DocumentResponseFactory(SerializationConfiguration serializationConfiguration)
: ... | ```c#
using System.IO;
using System.Net.Http;
using System.Text;
using MyCouch.Extensions;
using MyCouch.Serialization;
namespace MyCouch.Responses.Factories
{
public class DocumentResponseFactory : ResponseFactoryBase
{
public DocumentResponseFactory(SerializationConfiguration serializationConfigurat... |
167ff654-2267-4690-8d4a-97a18fd003b9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RepoZ.Api.Common;
using RepoZ.Api.Common.Git;
using RepoZ.Api.Git;
namespace RepoZ.Api.Win.Git
{
public class WindowsRepositoryCache : FileRepositoryCache
{
public Windo... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RepoZ.Api.Common;
using RepoZ.Api.Common.Git;
using RepoZ.Api.Git;
namespace RepoZ.Api.Win.Git
{
public class WindowsRepositoryCache : FileRepositoryCache
{
public Windo... |
2066d02a-f5a3-44b9-ab36-382c73f23dfb | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using FreeImageAPI;
using ImageMagick;
using DS = DevILSharp;
namespace Pfim.Benchmarks
{
public class DdsBenchmark
{
[Params("dx... | ```c#
using System.IO;
using BenchmarkDotNet.Attributes;
using FreeImageAPI;
using ImageMagick;
using DS = DevILSharp;
namespace Pfim.Benchmarks
{
public class DdsBenchmark
{
[Params("dxt1-simple.dds", "dxt3-simple.dds", "dxt5-simple.dds", "32-bit-uncompressed.dds")]
public string Payload { ge... |
a38a28fd-9823-4af2-8c03-2a6e21f5ac8e | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace Yaclops
{
/// <summary>
/// Settings that alter the default behavior of the parser, but do not depend on the command type.
/// </summary>
public class GlobalParserSettings
{
/// <summary>
/// Constructor
/// </summary>
... | ```c#
using System.Collections.Generic;
namespace Yaclops
{
/// <summary>
/// Settings that alter the default behavior of the parser, but do not depend on the command type.
/// </summary>
public class GlobalParserSettings
{
/// <summary>
/// Constructor
/// </summary>
... |
735c2e0e-5617-4f34-b49c-5669aa94fec9 | {
"language": "C#"
} | ```c#
using Glimpse.Host.Web.Owin;
using Owin;
namespace Glimpse.Owin.Sample
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.Use<GlimpseMiddleware>();
app.UseWelcomePage();
app.UseErrorPage();
}
}
}```
Update startup o... | ```c#
using Glimpse.Host.Web.Owin;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
using Owin;
using System.Collections.Generic;
namespace Glimpse.Owin.Sample
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
... |
f9e8eb9f-3b05-42d3-81ac-e453ce1169a2 | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... |
b1cb7de3-48b1-46e0-938a-9ccfdd1db2d8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace IntegrationEngine.Core.Configuration
{
public class IntegrationPointConfigurations
{
public IList<MailConfiguration> Mail { get; set; }
public IList<RabbitMQConfiguration> RabbitMQ { get; set; }
public IList<ElasticsearchC... | ```c#
using System;
using System.Collections.Generic;
namespace IntegrationEngine.Core.Configuration
{
public class IntegrationPointConfigurations
{
public List<MailConfiguration> Mail { get; set; }
public List<RabbitMQConfiguration> RabbitMQ { get; set; }
public List<ElasticsearchConf... |
2e30a178-9000-457b-b341-f9e7964e777f | {
"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.Tests.Visual
{
/// <summary>
/// Test case which adjusts the beatmap's rate to match any speed adjustments in visual tests.
/// </sum... | ```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.Tests.Visual
{
/// <summary>
/// Test case which adjusts the beatmap's rate to match any speed adjustments in visual tests.
/// </sum... |
fb51525d-5f14-439e-af2f-238456a07893 | {
"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;
namespace Wangkanai.Detection.Models
{
[Flags]
public enum Engine
{
Unknown = 0, // Unknown engine
WebKit = 1,... | ```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;
namespace Wangkanai.Detection.Models
{
[Flags]
public enum Engine
{
Unknown = 0, // Unknown engine
WebKit = 1,... |
89d2b2b1-081c-4427-a2eb-ce1671a8b7fa | {
"language": "C#"
} | ```c#
@model IEnumerable<APFT>
<div class="page-header">
<h1>APFT @Html.ActionLink("Add New", "New", "APFT", null, new { @class = "btn btn-default" })</h1>
</div>
<table class="table table-striped" id="dt">
<thead>
<tr>
<th>Soldier</th>
<th>Date</th>
<th>Score</th>... | ```c#
@model IEnumerable<APFT>
<div class="page-header">
<h1>APFT @Html.ActionLink("Add New", "New", "APFT", null, new { @class = "btn btn-default" })</h1>
</div>
<table class="table table-striped" id="dt">
<thead>
<tr>
<th>Soldier</th>
<th>Date</th>
<th>Score</th>... |
b84d9121-a61f-44d7-af2c-b7169ca1b885 | {
"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.Rulesets.Catch.Skinning
{
public enum CatchSkinColour
{
/// <summary>
/// The colour to be used for the catcher while on ... | ```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.Rulesets.Catch.Skinning
{
public enum CatchSkinColour
{
/// <summary>
/// The colour to be used for the catcher while in ... |
e21ce9f8-418f-4f81-9e77-920324eb8512 | {
"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.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays
{
public abstract... | ```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.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Gam... |
f1960641-4b57-4daa-b2b6-9fbba39042a2 | {
"language": "C#"
} | ```c#
using UnityEditor;
using UnityEngine;
namespace PlayFab.Internal
{
public static class PlayFabEdExPackager
{
private static readonly string[] SdkAssets = {
"Assets/PlayFabEditorExtensions"
};
[MenuItem("PlayFab/Build PlayFab EdEx UnityPackage")]
public static void Bui... | ```c#
using UnityEditor;
using UnityEngine;
namespace PlayFab.Internal
{
public static class PlayFabEdExPackager
{
private static readonly string[] SdkAssets = {
"Assets/PlayFabEditorExtensions"
};
[MenuItem("PlayFab/Testing/Build PlayFab EdEx UnityPackage")]
public static ... |
affb486c-e50f-4f6e-bdc3-12fbbdf183c7 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2016")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVers... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2016")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVers... |
1ef000dd-6860-4612-8feb-7c3611800919 | {
"language": "C#"
} | ```c#
#define Debug
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Bit.ViewModel
{
public class BitExceptionHandler
{
public static BitExceptionHandler Current { get; set; } = new BitExceptionHandler();
public virtual void OnExceptionReceived(Exception ex... | ```c#
#define Debug
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Bit.ViewModel
{
public class BitExceptionHandler
{
public static BitExceptionHandler Current { get; set; } = new BitExceptionHandler();
public virtual void OnExceptionReceived(Exception ex... |
382e1218-f8f9-4a8f-b33e-553f7691aed8 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Http;
using NJsonSchema;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace Porthor.ResourceRequestValidators.ContentValidators
{
/// <summary>
/// Request validator for json content.
/// </summary>
public class JsonValida... | ```c#
using Microsoft.AspNetCore.Http;
using NJsonSchema;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace Porthor.ResourceRequestValidators.ContentValidators
{
/// <summary>
/// Request validator for json content.
/// </summary>
publ... |
f4743512-5908-424e-8b7a-48392ca40b11 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Im... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Im... |
6e4da705-2210-4e40-ac49-14c8889d1151 | {
"language": "C#"
} | ```c#
namespace Nerdbank.GitVersioning.CloudBuildServices
{
using System;
using System.IO;
/// <summary>
///
/// </summary>
/// <remarks>
/// The VSTS-specific properties referenced here are documented here:
/// https://msdn.microsoft.com/en-us/Library/vs/alm/Build/scripts/variables
... | ```c#
namespace Nerdbank.GitVersioning.CloudBuildServices
{
using System;
using System.IO;
/// <summary>
///
/// </summary>
/// <remarks>
/// The VSTS-specific properties referenced here are documented here:
/// https://msdn.microsoft.com/en-us/Library/vs/alm/Build/scripts/variables
... |
2828717e-7061-42c7-bdfd-eb91c56cc61d | {
"language": "C#"
} | ```c#
using System.Windows;
using Caliburn.Micro;
using OctopusPuppet.Gui.ViewModels;
namespace OctopusPuppet.Gui
{
public class AppBootstrapper : BootstrapperBase
{
public AppBootstrapper()
{
Initialize();
}
protected override void OnStartup(object sender, Startup... | ```c#
using System.Collections.Generic;
using System.Windows;
using Caliburn.Micro;
using OctopusPuppet.Gui.ViewModels;
namespace OctopusPuppet.Gui
{
public class AppBootstrapper : BootstrapperBase
{
public AppBootstrapper()
{
Initialize();
}
protected override voi... |
752e6997-d843-4454-bd3f-0cc124952e5a | {
"language": "C#"
} | ```c#
using System;
using System.Windows.Forms;
using System.Xml.Serialization;
namespace DeRange.Config
{
[Serializable]
[XmlRoot(ElementName = "KeyboardShortcut")]
public class KeyboardShortcut
{
public bool ShiftModifier { get; set; }
public bool CtrlModifier { get; set; ... | ```c#
using System;
using System.Windows.Forms;
using System.Xml.Serialization;
namespace DeRange.Config
{
[Serializable]
[XmlRoot(ElementName = "KeyboardShortcut")]
public class KeyboardShortcut
{
public bool ShiftModifier { get; set; }
public bool CtrlModifier { get; set; ... |
b737c1ec-9153-41f5-8bd3-4edd0dcd3859 | {
"language": "C#"
} | ```c#
using System;
namespace DevTyr.Gullap
{
public static class Guard
{
public static void NotNull (object obj, string argumentName)
{
if (obj == null)
throw new ArgumentNullException(argumentName);
}
public static void NotNullOrEmpty (object obj, string argumentName)
{
NotNull (... | ```c#
using System;
namespace DevTyr.Gullap
{
public static class Guard
{
public static void NotNull (object obj, string argumentName)
{
if (obj == null)
throw new ArgumentNullException(argumentName);
}
public static void NotNullOrEmpty (string obj, string argumentName)
{
NotNull (... |
c2a789e2-633a-4d4f-bbba-43f6220839c4 | {
"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.Rulesets.Osu.Skinning.Default
{
public class DefaultSmoke : Smoke
{
public DefaultSmoke()
{
Radius = 2;
... | ```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.Textures;
namespace osu.Game.Rulesets.Osu.Skinning.Default
{
public class DefaultSmoke : Smoke
... |
c8df4dfd-9d4b-4c1e-8a46-173b9983fd5f | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
public static IEnumerable<CodeInstruction> MethodReplacer(this IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to)
{
foreach (var instruc... | ```c#
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
public static IEnumerable<CodeInstruction> MethodReplacer(this IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to)
{
foreach (var instruct... |
b9189a2b-d7b3-4ed7-88ec-2dbf1675f904 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class CountDown : MonoBehaviour {
public float maxTime = 600; //Because it is in seconds;
private float curTime;
private string prettyTime;
// Use this for initialization
void Start () {
curTime = maxTime;
}
// Update is called once per frame
void ... | ```c#
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class CountDown : MonoBehaviour {
public float maxTime = 600; //Because it is in seconds;
private float curTime;
private string prettyTime;
private Text text;
// Use this for initialization
void Start () {
curTime = maxTime;
tex... |
1efb2273-fa0f-4e1d-bc80-75e4495f0ca8 | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("File")]
public class FilePath
{
public FilePath(string path)
{
Path = path;
}
public FilePath()
{... | ```c#
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("File")]
public class FilePath
{
public FilePath(string path)
{
Path = path;
}
public FilePath()
{... |
01f40f46-83b7-4c3a-aa4d-20d42dfa8c45 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class MakeItRain : MonoBehaviour
{
private int numObjects = 20;
private float minX = -4f;
private float maxX = 4f;
private GameObject rain;
private GameObject rainClone;
// Use this for initialization
void Start()
{
/... | ```c#
using UnityEngine;
using System.Collections;
public class MakeItRain : MonoBehaviour
{
private int numObjects = 20;
private float minX = -4f;
private float maxX = 4f;
private GameObject rain;
private GameObject rainClone;
int count = 0;
// Use this for initialization
void Star... |
28b91805-7974-4b4c-9b03-b666a911a286 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
namespace PGSolutions.Utilities.Monads.StaticContracts {
using static Contract;
public struct MaybeAssume<T> {
///<summary>Create a new Maybe{T}.</summary>
private MaybeAssume(T value) : this() {
... | ```c#
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
namespace PGSolutions.Utilities.Monads.StaticContracts {
using static Contract;
public struct Maybe<T> {
///<summary>Create a new Maybe{T}.</summary>
private Maybe(T value) : this() {
En... |
7750646d-7df0-4d4b-bae8-c72402d28857 | {
"language": "C#"
} | ```c#
using System.Configuration;
using Amazon.ServiceBus.DistributedMessages.Serializers;
using ProjectExtensions.Azure.ServiceBus;
using ProjectExtensions.Azure.ServiceBus.Autofac.Container;
namespace PubSubUsingConfiguration {
static internal class Bootstrapper {
public static void Initialize() {
... | ```c#
using System.Configuration;
using Amazon.ServiceBus.DistributedMessages.Serializers;
using ProjectExtensions.Azure.ServiceBus;
using ProjectExtensions.Azure.ServiceBus.Autofac.Container;
namespace PubSubUsingConfiguration {
static internal class Bootstrapper {
public static void Initialize() {
... |
68e2bf82-e0a5-4b0b-8f3c-00773ebe2ef3 | {
"language": "C#"
} | ```c#
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ======================... | ```c#
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ======================... |
e73d4bf8-d404-45c3-8286-51826b70cd9d | {
"language": "C#"
} | ```c#
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Menu : MonoBehaviour
{
public Canvas MainCanvas;
static public int money = 1000;
public void LoadOn()
{
//DontDestroyOnLoad(money);
Application.LoadLevel(1);
}
}
```
Adjust screen resolution to samsung g... | ```c#
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Menu : MonoBehaviour
{
public Canvas MainCanvas;
static public int money = 1000;
public void LoadOn()
{
Screen.SetResolution(1080, 1920, true);
//DontDestroyOnLoad(money);
Application.LoadLevel(1);
}
}
``` |
22a966b5-dbad-4537-aabf-541984ac9bf7 | {
"language": "C#"
} | ```c#
using System;
namespace TDDUnit {
class Assert {
public static void Equal(object expected, object actual) {
if (!expected.Equals(actual)) {
string message = string.Format("Expected: '{0}'; Actual: '{1}'", expected, actual);
Console.WriteLine(message);
throw new TestRunExcepti... | ```c#
using System;
namespace TDDUnit {
class Assert {
private static void Fail(object expected, object actual) {
string message = string.Format("Expected: '{0}'; Actual: '{1}'", expected, actual);
Console.WriteLine(message);
throw new TestRunException(message);
}
public static void E... |
00299689-4535-4c75-85d5-327fda8cbacf | {
"language": "C#"
} | ```c#
using System;
using Microsoft.Practices.Unity;
namespace Topshelf.Unity.Sample
{
class Program
{
static void Main(string[] args)
{
// Create your container
var container = new UnityContainer();
container.RegisterType<ISampleDependency, SampleDependenc... | ```c#
using System;
using Microsoft.Practices.Unity;
namespace Topshelf.Unity.Sample
{
class Program
{
static void Main(string[] args)
{
// Create your container
var container = new UnityContainer();
container.RegisterType<ISampleDependency, SampleDependenc... |
cdac5396-d167-4646-bcd1-1092020f23f5 | {
"language": "C#"
} | ```c#
using System;
public partial class Settings : System.Web.UI.Page
{
//---------------------------------------------------------------------------
protected void Page_Load( object sender, EventArgs e )
{
// Don't allow people to skip the login page.
if( Session[ SettingsLogin.SES_SETTINGS_LOGGED_IN... | ```c#
using System;
public partial class Settings : System.Web.UI.Page
{
//---------------------------------------------------------------------------
protected void Page_Load( object sender, EventArgs e )
{
// Don't allow people to skip the login page.
if( Session[ SettingsLogin.SES_SETTINGS_LOGGED_IN... |
f0363849-a95d-4fe5-b403-b6e115d0f53d | {
"language": "C#"
} | ```c#
/*******************************************************************************
* Copyright (C) 2015 AgGateway and ADAPT Contributors
* Copyright (C) 2015 Deere and Company
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public Licens... | ```c#
/*******************************************************************************
* Copyright (C) 2015 AgGateway and ADAPT Contributors
* Copyright (C) 2015 Deere and Company
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public Licens... |
cffe28f4-4d31-4005-b4c1-d9e7b9435086 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
namespace AGS.Engine.Desktop
{
public class DesktopFileSystem : IFileSystem
{
#region IFileSystem implementation
public string StorageFolder => Directory.GetCurrentDirectory(); //todo: find a suitable save location on desktop
... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
namespace AGS.Engine.Desktop
{
public class DesktopFileSystem : IFileSystem
{
#region IFileSystem implementation
public string StorageFolder => Directory.GetCurrentDirectory(); //todo: find a suitable ... |
c99368d1-f0d9-40f5-b602-00d56dfa49a7 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyConfiguration("")]
// If you change this version, make sure to change Build\build.proj according... | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyConfiguration("")]
// If you change this version, make sure to change Build\build.proj according... |
91dddb83-9f24-4858-854f-7a2fdb2779fa | {
"language": "C#"
} | ```c#
using LibGit2Sharp.Handlers;
namespace LibGit2Sharp
{
/// <summary>
/// Collection of parameters controlling Fetch behavior.
/// </summary>
public sealed class FetchOptions
{
/// <summary>
/// Specifies the tag-following behavior of the fetch operation.
/// <para>
... | ```c#
using LibGit2Sharp.Handlers;
namespace LibGit2Sharp
{
/// <summary>
/// Collection of parameters controlling Fetch behavior.
/// </summary>
public sealed class FetchOptions
{
/// <summary>
/// Specifies the tag-following behavior of the fetch operation.
/// <para>
... |
224f16bd-86ba-4764-a892-c2fa96ed0f03 | {
"language": "C#"
} | ```c#
using System.Resources;
using System.Reflection;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Configgy")]
[assembly: AssemblyDescription("Confi... | ```c#
using System.Resources;
using System.Reflection;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Configgy")]
[assembly: AssemblyDescription("Confi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.