doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
025fb14f-2355-41e7-8528-b5f06f33ed6b
{ "language": "C#" }
```c# #region License /* Copyright [2011] [Jeffrey Cameron] 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 re...
```c# #region License /* Copyright [2011] [Jeffrey Cameron] 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 re...
6863c591-2f00-4098-a735-f24a7b7d8bde
{ "language": "C#" }
```c# using System; namespace Test { class Program { static void Main(string[] args) { new GrammarParser(null); } } } ``` Clean up warnings where preparing AntlrGeneratedFiles test project
```c# using System; [assembly: CLSCompliant(true)] namespace Test { class Program { static void Main(string[] args) { new GrammarParser(null); } } } ```
add3d7f2-0a41-40b6-91e1-0add707bfea4
{ "language": "C#" }
```c# #region Copyright (c) 2016 Atif Aziz. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
```c# #region Copyright (c) 2016 Atif Aziz. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
856f15a0-490c-4af7-b13d-83bafe38ef0a
{ "language": "C#" }
```c# <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CefSharp.Own.Example.Wpf</title> </head> <body> <header> <h1>@Model.Text</h1> </header> <section> <h2>Backlog</h2> <ul class="bugs" id="backlog"> <li>a bug</li> </ul> </sectio...
```c# <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CefSharp.Own.Example.Wpf</title> </head> <body> <header> <h1>@Model.Text</h1> </header> <section> <h2>CefSharp + OWIN + Nancy + Razor</h2> <ul> <li>No network requests are made, just in m...
b2fb2a2a-6633-436d-a451-344f6e495346
{ "language": "C#" }
```c# using DataDragon; using LolHandbook.ViewModels; using System; using System.Collections.Generic; using Windows.ApplicationModel.DataTransfer; using Windows.Storage.Streams; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; namespace LolHandbook.Pages { public sealed par...
```c# using DataDragon; using LolHandbook.ViewModels; using System; using System.Collections.Generic; using Windows.ApplicationModel.DataTransfer; using Windows.Storage.Streams; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; namespace LolHandbook.Pages { public sealed par...
c7a09aaa-28e0-4833-a5e7-643d6e19c000
{ "language": "C#" }
```c# using NUnit.Framework; using System; using System.IO; using Time_Table_Arranging_Program; using Time_Table_Arranging_Program.Class; namespace NUnit.Tests2 { [TestFixture] public class Test_StartDateEndDateFinder { string input = Helper.RawStringOfTestFile("SampleData-FAM-2017-2ndSem.html"); ...
```c# using NUnit.Framework; using System; using System.IO; using Time_Table_Arranging_Program; using Time_Table_Arranging_Program.Class; namespace NUnit.Tests2 { [TestFixture] public class Test_StartDateEndDateFinder { string input = Helper.RawStringOfTestFile("SampleData-FAM-2017-2ndSem.html"); ...
16dfd4e4-1d26-42bb-9325-f5f43b775411
{ "language": "C#" }
```c# using Bit.Core.Contracts; using Newtonsoft.Json; namespace Bit.Owin.Implementations { public class DefaultJsonContentFormatter : IContentFormatter { private static IContentFormatter _current; public static IContentFormatter Current { get { ...
```c# using Bit.Core.Contracts; using Newtonsoft.Json; namespace Bit.Owin.Implementations { public class DefaultJsonContentFormatter : IContentFormatter { private static IContentFormatter _current; public static IContentFormatter Current { get { ...
4f8657b0-0b72-48ec-a32e-1895cefc0712
{ "language": "C#" }
```c# using Microsoft.ApplicationInsights.DataContracts; using Microsoft.ApplicationInsights.Wcf.Tests.Channels; using Microsoft.ApplicationInsights.Wcf.Tests.Service; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Linq; namespace Microsoft.ApplicationInsights.Wcf.Tests.Integration { ...
```c# using Microsoft.ApplicationInsights.DataContracts; using Microsoft.ApplicationInsights.Wcf.Tests.Channels; using Microsoft.ApplicationInsights.Wcf.Tests.Service; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Linq; namespace Microsoft.ApplicationInsights.Wcf.Tests.Integration { ...
0ea37ad6-2df0-477b-b624-682760d98c4a
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; namespace Assent.Reporters.DiffPrograms { public class VsCodeDiffProgram : DiffProgramBase { static VsCodeDiffProgram() { var paths = new List<string>(); if (DiffReporter.IsWindows) { ...
```c# using System; using System.Collections.Generic; using System.Linq; namespace Assent.Reporters.DiffPrograms { public class VsCodeDiffProgram : DiffProgramBase { static VsCodeDiffProgram() { var paths = new List<string>(); if (DiffReporter.IsWindows) { ...
f90d7e64-5804-4858-b415-c48a1667f720
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using Mono.Cecil; public partial class ModuleWeaver { Dictionary<string, TypeDefinition> definitions = new Dictionary<string, TypeDefinition>(); public TypeDefinition Resolve(TypeReference reference) { TypeDefinition definition; if (de...
```c# using System; using System.Collections.Generic; using Mono.Cecil; public partial class ModuleWeaver { Dictionary<string, TypeDefinition> definitions = new Dictionary<string, TypeDefinition>(); public TypeDefinition Resolve(TypeReference reference) { TypeDefinition definition; if (de...
1559cd4f-c0fd-4ecb-821b-f034f0876315
{ "language": "C#" }
```c# using System; using System.ComponentModel.DataAnnotations; namespace HelloCoreClrApp.Data.Entities { public class Greeting { [Key] public Guid GreetingId { get; set; } [Required] [MaxLength(20)] public string Name { get; set; } [Required] public D...
```c# using System; using System.ComponentModel.DataAnnotations; namespace HelloCoreClrApp.Data.Entities { public class Greeting { [Key] public Guid GreetingId { get; set; } [Required] [MaxLength(30)] public string Name { get; set; } [Required] public D...
a6e6aed7-d790-46bf-8327-fe0de4b071e4
{ "language": "C#" }
```c# // Program for rotating arrays using different Algorithms using System; using System.Linq; public class RotateArray { public static void Main() { // Reads ints from the Console and converts them to an array of ints Console.WriteLine("Please enter array of integers (integers separated by space...
```c# // Program for rotating arrays using different Algorithms using System; using System.Linq; public class RotateArray { public static void Main() { // Reads ints from the Console and converts them to an array of ints Console.WriteLine("Please enter array of integers (integers separated b...
b5f78ec8-8687-4265-bcb7-264ec6128b8a
{ "language": "C#" }
```c# using System; using BudgetAnalyser.Engine.BankAccount; using Rees.UserInteraction.Contracts; namespace BudgetAnalyser.Engine.Statement { public class PersistentFiltersV1 : IPersistent { public Account Account { get; set; } public DateTime? BeginDate { get; set; } public DateTime?...
```c# using System; using Rees.UserInteraction.Contracts; namespace BudgetAnalyser.Engine.Statement { public class PersistentFiltersV1 : IPersistent { public DateTime? BeginDate { get; set; } public DateTime? EndDate { get; set; } public int LoadSequence => 50; } }```
f311bb12-9b6f-4eb2-82dd-4e66bec631b0
{ "language": "C#" }
```c# using System; using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp.Core { internal class ObjectSafeWrapper : IDisposable { private readonly GitObjectSafeHandle objectPtr; public ObjectSafeWrapper(ObjectId id, RepositorySafeHandle handle, bool allowNullObjectId = false) { ...
```c# using System; using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp.Core { internal class ObjectSafeWrapper : IDisposable { private readonly GitObjectSafeHandle objectPtr; public ObjectSafeWrapper(ObjectId id, RepositorySafeHandle handle, bool allowNullObjectId = false) { ...
d4fda098-0c32-44e9-aa1f-2c8268289b7d
{ "language": "C#" }
```c# using Sakuno.UserInterface.ObjectOperations; using System; using System.Windows.Data; using System.Windows.Markup; namespace Sakuno.UserInterface.Commands { public class InvokeMethodExtension : MarkupExtension { string r_Method; object r_Parameter; public InvokeMethodExtension(...
```c# using Sakuno.UserInterface.ObjectOperations; using System; using System.Windows.Data; using System.Windows.Markup; namespace Sakuno.UserInterface.Commands { public class InvokeMethodExtension : MarkupExtension { string r_Method; object r_Parameter; public object Target { get; s...
801e73b4-d9bc-48dc-9230-4cbb6b46bf49
{ "language": "C#" }
```c# using System; using System.Threading; using System.Web; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Security; using System.Web.Routing; using WebMatrix.WebData; using Zk.Models; namespace Zk { public class MvcApplication : HttpApplication { public static void Register...
```c# using System.Web; using System.Web.Helpers; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using WebMatrix.WebData; namespace Zk { public class MvcApplication : HttpApplication { public static void RegisterRoutes(RouteCollection routes) { rou...
4de44048-0ee9-4ce9-bae4-7a564e8b57ba
{ "language": "C#" }
```c# using System.Collections.Generic; using Promact.Trappist.DomainModel.Models.Question; using System.Linq; using Promact.Trappist.DomainModel.DbContext; namespace Promact.Trappist.Repository.Questions { public class QuestionRepository : IQuestionRespository { private readonly TrappistDbContext _db...
```c# using System.Collections.Generic; using Promact.Trappist.DomainModel.Models.Question; using System.Linq; using Promact.Trappist.DomainModel.DbContext; namespace Promact.Trappist.Repository.Questions { public class QuestionRepository : IQuestionRespository { private readonly TrappistDbContext _db...
06e10125-10d0-48e7-8546-7e5eb508afe8
{ "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...
33f659e0-fd28-4784-8114-398dee3d1ca1
{ "language": "C#" }
```c# @{ ViewBag.Title = "Purchase Order Tracker"; } <div class="page-header"> <h1>@ViewBag.Title</h1> </div> <div class="btn-group"> @Html.ActionLink("Add New", "Create", "PurchaseOrders", null, new { @class = "btn btn-default" }) </div> <!-- AirTable Embed Script for List --> <iframe class="airtable-e...
```c# @{ ViewBag.Title = "Purchase Order Tracker"; } <div class="page-header"> <h1>@ViewBag.Title</h1> </div> <div class="btn-group"> @Html.ActionLink("Add New", "Create", "PurchaseOrders", null, new { @class = "btn btn-default" }) </div> <!-- AirTable Embed Script for List --> <iframe class="airtable-e...
84917b67-7688-4721-a819-47eb3332f74e
{ "language": "C#" }
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; namespace osu.Framework.Testing { public static class ...
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; namespace osu.Framework.Testing { public static class ...
c4e9dcc8-7053-4a81-8b03-d9149a0b6e26
{ "language": "C#" }
```c# using CefSharp.Internals; using System.Collections.Generic; using System.ServiceModel; namespace CefSharp.BrowserSubprocess { public class CefRenderProcess : CefSubProcess, IRenderProcess { private DuplexChannelFactory<IBrowserProcess> channelFactory; private CefBrowserBase browser; ...
```c# using CefSharp.Internals; using System.Collections.Generic; using System.ServiceModel; namespace CefSharp.BrowserSubprocess { public class CefRenderProcess : CefSubProcess, IRenderProcess { private DuplexChannelFactory<IBrowserProcess> channelFactory; private CefBrowserBase browser; ...
bb8e260e-6c32-48d3-9154-eee19c017155
{ "language": "C#" }
```c# @model ICollection<CountryFood.Web.ViewModels.ProductViewModel> <h3>Products</h3> @foreach (var product in Model) { <div class="panel panel-body"> <div> <a href="">@product.Name</a> </div> <div> <span>Votes: </span> @(int.Parse(product.PositiveVotes) + int.Pars...
```c# @model ICollection<CountryFood.Web.ViewModels.ProductViewModel> <h3>Products</h3> @foreach (var product in Model) { <div class="panel panel-body"> <div> <a href="">@product.Name</a> </div> <div> <span>Votes: </span> @(int.Parse(product.PositiveVotes) + int.Pars...
d51ac883-8157-4c4c-8802-c108505f83b8
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IdentityModel.Tokens; using System.Security.Claims; namespace SnapMD.VirtualCare.LeopardonSso { public abstract class AbstractJwt { protected readonly JwtSecurityTokenHandler SecurityTokenHandler = new JwtSecurityTokenHandler(); ...
```c# using System; using System.Collections.Generic; using System.IdentityModel.Tokens; using System.Security.Claims; namespace SnapMD.VirtualCare.LeopardonSso { public abstract class AbstractJwt { protected readonly JwtSecurityTokenHandler SecurityTokenHandler = new JwtSecurityTokenHandler(); ...
8f838902-1d73-4ba9-b4f5-286522943c9b
{ "language": "C#" }
```c# using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; using DHT.Server.Database; using DHT.Server.Endpoints; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http.Json; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace DHT.Server.Se...
```c# using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; using DHT.Server.Database; using DHT.Server.Endpoints; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http.Json; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace DHT.Server.Se...
abf6e239-336a-4215-a9a9-0814a96699d2
{ "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.Configuration.Tracking; using osu.Game.Configuration; using osu.Game.Rulesets.Configuration; using osu.Game.Rulesets.Mania.UI; namespace osu....
```c# // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Configuration.Tracking; using osu.Game.Configuration; using osu.Game.Rulesets.Configuration; using osu.Game.Rulesets.Mania.UI; namespace osu....
afb32b69-5120-4b79-9c50-59f57f1e80b4
{ "language": "C#" }
```c# using UnityEngine; using System.Collections; public class CameraAspectAdjuster : MonoBehaviour { public Camera mainCamera; public float targetAspectRatio; // Use this for initialization void Awake () { float windowAspectRatio = (float)Screen.width / (float)Screen.height; float scale = windowAspectRati...
```c# using UnityEngine; using System.Collections; public class CameraAspectAdjuster : MonoBehaviour { public Camera mainCamera; public float targetAspectRatio; private float latestWindowAspectRatio; void Awake () { latestWindowAspectRatio = targetAspectRatio; AdjustIfNeeded (); } void Update () { Ad...
312ae810-b2d5-4a2b-9ffa-d1c95f0ee046
{ "language": "C#" }
```c# using System.Collections.Generic; namespace YouTrackSharp.Tests.Infrastructure { public class Connections { public static string ServerUrl => "https://ytsharp.myjetbrains.com/youtrack/"; public static Connection UnauthorizedConnection => new BearerTokenC...
```c# using System.Collections.Generic; using System.Net.Http; using System.Security.Authentication; namespace YouTrackSharp.Tests.Infrastructure { public class Connections { public static string ServerUrl => "https://ytsharp.myjetbrains.com/youtrack/"; public static Conn...
c026f6e2-4bc0-402a-87ea-2f9320900c76
{ "language": "C#" }
```c# using System; using Android.Graphics.Drawables; using System.IO; using FFImageLoading.Work; using Android.Content; using Android.Content.Res; using System.Threading.Tasks; namespace FFImageLoading { public class ApplicationBundleStreamResolver : IStreamResolver { private Context Context { get { retu...
```c# using System; using Android.Graphics.Drawables; using System.IO; using FFImageLoading.Work; using Android.Content; using Android.Content.Res; using System.Threading.Tasks; namespace FFImageLoading { public class ApplicationBundleStreamResolver : IStreamResolver { private Context Context { get { retu...
2233476d-3405-46cb-817b-752682f6a9e2
{ "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...
1e80b61e-3c12-4414-8ff9-2df5eb52c1cb
{ "language": "C#" }
```c# using System; using Agiil.ObjectMaps; using Autofac; namespace Agiil.Bootstrap.ObjectMaps { public class AutomapperResolversModule : Module { protected override void Load(ContainerBuilder builder) { builder.RegisterType<IdentityValueResolver>(); builder.RegisterGeneric(typeof(GetEntityBy...
```c# using System; using System.Collections.Generic; using System.Linq; using Agiil.ObjectMaps.Resolvers; using Autofac; namespace Agiil.Bootstrap.ObjectMaps { public class AutomapperResolversModule : Module { protected override void Load(ContainerBuilder builder) { var types = GetCandidateTypes();...
cf5dec58-d94e-477a-9556-5cfe0cb3f21f
{ "language": "C#" }
```c# namespace FluentAssertions.Specs.Execution { using System.Collections.Generic; using FluentAssertions.Execution; internal class IgnoringFailuresAssertionStrategy : IAssertionStrategy { public IEnumerable<string> FailureMessages => new string[0]; public void HandleFailure(string m...
```c# using System.Collections.Generic; using FluentAssertions.Execution; namespace FluentAssertions.Specs.Execution { internal class IgnoringFailuresAssertionStrategy : IAssertionStrategy { public IEnumerable<string> FailureMessages => new string[0]; public void HandleFailure(string message) ...
635cced1-22e0-4db1-80d2-dafc287acb38
{ "language": "C#" }
```c# using log4net; using spectator.Configuration; using spectator.Metrics; using spectator.Sources; using StatsdClient; using Topshelf; namespace spectator { public class Program { private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);...
```c# using log4net; using spectator.Configuration; using spectator.Metrics; using spectator.Sources; using StatsdClient; using Topshelf; namespace spectator { public class Program { private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);...
518c5126-073d-4126-875f-41dbf24a5512
{ "language": "C#" }
```c# using AVKit; namespace MediaManager.Platforms.Ios.Video { public class PlayerViewController : AVPlayerViewController { protected MediaManagerImplementation MediaManager => CrossMediaManager.Apple; public override void ViewWillDisappear(bool animated) { base.ViewWillD...
```c# using AVKit; namespace MediaManager.Platforms.Ios.Video { public class PlayerViewController : AVPlayerViewController { protected MediaManagerImplementation MediaManager => CrossMediaManager.Apple; public override void ViewWillDisappear(bool animated) { base.ViewWillD...
b4fecbb6-22a6-4dcf-bb95-5c95358e6e83
{ "language": "C#" }
```c# using WebSocketSharp; using WebSocketSharp.Server; namespace WebSocketServerTool { class ServiceBehavior : WebSocketBehavior { protected override void OnMessage(MessageEventArgs e) { base.Send(e.RawData); } protected override void OnClose(CloseEve...
```c# using WebSocketSharp; using WebSocketSharp.Server; namespace WebSocketServerTool { class ServiceBehavior : WebSocketBehavior { protected override void OnMessage(MessageEventArgs e) { if (e.IsBinary) base.Send(e.RawData); else ...
04630c65-d07a-43bf-aee9-f8b47ecb11ef
{ "language": "C#" }
```c# using Duplicati.Library.Modules.Builtin; using Duplicati.Library.Modules.Builtin.ResultSerialization; using NUnit.Framework; namespace Duplicati.UnitTest { [TestFixture] public class ResultFormatSerializerProviderTest { [Test] public void TestGetSerializerGivenDuplicatiReturnsDuplica...
```c# using Duplicati.Library.Modules.Builtin; using Duplicati.Library.Modules.Builtin.ResultSerialization; using NUnit.Framework; namespace Duplicati.UnitTest { [TestFixture] public class ResultFormatSerializerProviderTest { [Test] [Category("Serialization")] public void TestGetSe...
e9561b13-2856-4121-a814-9a2fed78c027
{ "language": "C#" }
```c# using AVKit; namespace MediaManager.Platforms.Ios.Video { public class PlayerViewController : AVPlayerViewController { public override void ViewWillDisappear(bool animated) { base.ViewWillDisappear(animated); Player = null; } } } ``` Detach VideoView...
```c# using AVKit; namespace MediaManager.Platforms.Ios.Video { public class PlayerViewController : AVPlayerViewController { protected MediaManagerImplementation MediaManager => CrossMediaManager.Apple; public override void ViewWillDisappear(bool animated) { base.ViewWillD...
5411bc4c-6af6-4c2f-a6a8-b6199899ea18
{ "language": "C#" }
```c# #region License // Copyright (c) Jeremy Skinner (http://www.jeremyskinner.co.uk) // // 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/LIC...
```c# #region License // Copyright (c) Jeremy Skinner (http://www.jeremyskinner.co.uk) // // 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/LIC...
dc660048-0f55-4f78-86dc-577c6ff5339e
{ "language": "C#" }
```c# using System; using Microsoft; using System.Linq; using Microsoft.Boogie; using System.Diagnostics; namespace symbooglix { public class driver { public static int Main(String[] args) { if (args.Length == 0) { Console.WriteLine ("Pass boogie file as first arg!"...
```c# using System; using Microsoft; using System.Linq; using Microsoft.Boogie; using System.Diagnostics; using System.Collections.Generic; namespace symbooglix { public class driver { public static int Main(String[] args) { if (args.Length == 0) { Console.WriteLine...
41e8e398-bc32-42b7-be2a-ebc2a7c6c0b8
{ "language": "C#" }
```c# using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Dapper.FastCrud; using Smooth.IoC.Cqrs.Query; using Smooth.IoC.Cqrs.Requests; namespace Rik.Codecamp.Entities { public class Brave : IRequest, IQuery { [Key, DatabaseGeneratedDefa...
```c# using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Dapper.FastCrud; using Newtonsoft.Json; using Smooth.IoC.Cqrs.Query; using Smooth.IoC.Cqrs.Requests; namespace Rik.Codecamp.Entities { public class Brave : IRequest, IQuery { [Key...
4b87b820-c88b-45b4-a2e1-f13c2fbf74dd
{ "language": "C#" }
```c# @{ ViewBag.Title = "Home Page"; } <h2>Demo Start Page</h2> ``` Add link to PDF Download to make it more discoverable
```c# @{ ViewBag.Title = "Home Page"; } <h2>Demo Start Page</h2> @Html.ActionLink("Download PDF","ContributorsList")```
a4ab194e-7768-4626-badb-be4b4bae803f
{ "language": "C#" }
```c# using System; using System.IO; using Microsoft.Ajax.Utilities; namespace AjaxMinAST { class Program { static void Main(string[] args) { var input = File.ReadAllText("input.js"); Console.WriteLine("--- Raw ---"); Console.WriteLine(input); Console.WriteLine("\r\n"); Console.WriteL...
```c# using System; using System.IO; using Microsoft.Ajax.Utilities; namespace AjaxMinAST { class Program { static void Main(string[] args) { var input = File.ReadAllText("input.js"); Console.WriteLine("--- Raw ---"); Console.WriteLine(input); Console.WriteLine("\r\n"); Console.WriteL...
b2fb0d9d-d050-4e9f-ba2e-e7f4b25299d1
{ "language": "C#" }
```c# using System.Web.Mvc; using System.Web.Routing; [assembly: WebActivatorEx.PostApplicationStartMethod(typeof(IronBank.App_Start.RouteConfig), "RegisterRoutes")] namespace IronBank.App_Start { public class RouteConfig { public static void RegisterRoutes() { RouteTab...
```c# using System.Web.Mvc; using System.Web.Routing; [assembly: WebActivatorEx.PostApplicationStartMethod(typeof(IronBank.App_Start.RouteConfig), "RegisterRoutes")] namespace IronBank.App_Start { public class RouteConfig { public static void RegisterRoutes() { RouteTab...
4824e458-30f1-4646-8188-6c90d00a42f2
{ "language": "C#" }
```c# @using Orchard.ContentManagement; @using Orchard.Core.Common.Models; @using Orchard.Security; @{ CommonPart commonPart = Model.ContentPart; DateTime? modifiedUtc = commonPart.As<CommonPart>() == null ? null : commonPart.As<CommonPart>().ModifiedUtc; // owner isn't really who last modified this,...
```c# @using Orchard.ContentManagement; @using Orchard.Core.Common.Models; @using Orchard.Security; @{ CommonPart commonPart = Model.ContentPart; DateTime? modifiedUtc = commonPart.As<CommonPart>() == null ? null : commonPart.As<CommonPart>().ModifiedUtc; // owner isn't really who last modified this,...
8a08cf7f-6043-4153-bafb-455e8a2a5632
{ "language": "C#" }
```c# // // ReadRegisters.cs // // Author: // Benito Palacios Sánchez <benito356@gmail.com> // // Copyright (c) 2015 Benito Palacios Sánchez // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Softwar...
```c# // // ReadRegisters.cs // // Author: // Benito Palacios Sánchez <benito356@gmail.com> // // Copyright (c) 2015 Benito Palacios Sánchez // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Softwar...
99914233-3d3d-411c-994f-abd9746ee36a
{ "language": "C#" }
```c# using System.Threading.Tasks; using Microsoft.Azure.WebJobs; using Microsoft.Extensions.Logging; using NServiceBus; using SFA.DAS.EmployerFinance.Messages.Commands; namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs { public class ImportLevyDeclarationsJob { private readonly IMessageSession _m...
```c# using System.Threading.Tasks; using Microsoft.Azure.WebJobs; using Microsoft.Extensions.Logging; using NServiceBus; using SFA.DAS.EmployerFinance.Messages.Commands; namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs { public class ImportLevyDeclarationsJob { private readonly IMessageSession _m...
54e5abef-8c83-44ce-932d-fd06c360a58e
{ "language": "C#" }
```c# using UnityEngine; public class NoteObject : MonoBehaviour { public NotePosition notePosition; public int noteType; NotesEditorModel model; RectTransform rectTransform; void Awake() { model = NotesEditorModel.Instance; rectTransform = GetComponent<RectTransform>(); ...
```c# using UnityEngine; public class NoteObject : MonoBehaviour { public NotePosition notePosition; public int noteType; NotesEditorModel model; RectTransform rectTransform; void Awake() { model = NotesEditorModel.Instance; rectTransform = GetComponent<RectTransform>(); ...
8c79fab4-66ba-4b2c-869a-c0768fc2c3db
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using Microsoft.Extensions.DiagnosticAdapter.Internal; namespace Glimpse.Agent.Internal.Inspectors.Mvc.Proxies { public class ProxyAdapter { private static readonly ProxyTypeCache _cache = new ProxyTypeCache(); public ProxyAdapter() ...
```c# using System; using System.Collections.Generic; using Microsoft.Extensions.DiagnosticAdapter.Internal; namespace Glimpse.Agent.Internal.Inspectors.Mvc.Proxies { public class ProxyAdapter { private static readonly ProxyTypeCache _cache = new ProxyTypeCache(); public ProxyAdapter() ...
a9adf466-1891-46fc-a4bb-97d8e35b6f50
{ "language": "C#" }
```c# //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.34003 // // 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.18051 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-ge...
728cc1df-38a9-4203-b152-7a41207467a1
{ "language": "C#" }
```c# using System; using System.ServiceModel; namespace MultiMiner.Remoting.Server { public class RemotingServer { private bool serviceStarted = false; private ServiceHost myServiceHost = null; public void Startup() { Uri baseAddress = new Uri("net.tcp://l...
```c# using System; using System.Net; using System.ServiceModel; namespace MultiMiner.Remoting.Server { public class RemotingServer { private bool serviceStarted = false; private ServiceHost myServiceHost = null; public void Startup() { //use Dns.GetHostNam...
c20c893b-964d-48ca-b7b8-1c3142edc740
{ "language": "C#" }
```c# using Autofac; using Newtonsoft.Json; using System; using System.Collections.Concurrent; using TeaCommerce.Api.Dependency; using TeaCommerce.Api.Infrastructure.Caching; using umbraco.interfaces; using Umbraco.Core.Cache; namespace TeaCommerce.Umbraco.Application.Caching { public abstract class TeaCommerceCa...
```c# using Autofac; using Newtonsoft.Json; using System; using System.Collections.Concurrent; using TeaCommerce.Api.Dependency; using TeaCommerce.Api.Infrastructure.Caching; using umbraco.interfaces; using Umbraco.Core.Cache; namespace TeaCommerce.Umbraco.Application.Caching { public abstract class TeaCommerceCa...
63821265-a3be-4b95-9a2a-3aa1e2dd5681
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Tigwi.UI.Controllers { public class HomeController : Controller { public ActionResult Index() { throw new NotImplementedException("HomeController.Index"); ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Tigwi.UI.Controllers { public class HomeController : Controller { public ActionResult Index() { this.ViewBag.CurrentUser = "Zak"; return this.View(...
4f3aba00-ac46-4739-84f2-a94c2f6a0fcd
{ "language": "C#" }
```c# using System.Net; using Criteo.Profiling.Tracing.Annotation; namespace Criteo.Profiling.Tracing { /// <summary> /// Factory for annotations /// </summary> public static class Annotations { public static IAnnotation ClientRecv() { return new ClientRecv(); ...
```c# using System.Net; using Criteo.Profiling.Tracing.Annotation; namespace Criteo.Profiling.Tracing { /// <summary> /// Factory for annotations /// </summary> public static class Annotations { private static readonly IAnnotation AnnClientReceive = new ClientRecv(); private stati...
e8579ff5-fb37-4ee9-a020-98b78265a39a
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.UI.WebControls; using System.Reflection; using System.Web.UI; namespace CodeTorch.Web.MasterPages { public class BaseMasterPage : System.Web.UI.MasterPage { protected Label currentYear; ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.UI.WebControls; using System.Reflection; using System.Web.UI; namespace CodeTorch.Web.MasterPages { public class BaseMasterPage : System.Web.UI.MasterPage { protected Label currentYear; ...
fd760ec0-f618-4a39-aa11-15093a1154a8
{ "language": "C#" }
```c# using UnityEditor; using UnityEditor.SceneManagement; namespace YesAndEditor { // Static class packed to the brim with helpful Unity editor utilities. public static class YesAndEditorUtil { // Forcefully mark open loaded scenes dirty and save them. [MenuItem ("File/Force Save")] public static void For...
```c# using UnityEditor; using UnityEditor.SceneManagement; using UnityEngine; using System.Linq; namespace YesAndEditor { // Static class packed to the brim with helpful Unity editor utilities. public static class YesAndEditorUtil { // Forcefully mark open loaded scenes dirty and save them. [MenuItem ("File/...
e4b245c0-c99b-482e-beaf-7f0921047b76
{ "language": "C#" }
```c# using System; using System.Threading.Tasks; using Windows.ApplicationModel.Activation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; namespace FridgeShoppingList.Views { public sealed partial class Splash : UserControl { public Task SplashInProgress { get; pr...
```c# using System; using System.Threading.Tasks; using Windows.ApplicationModel.Activation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; namespace FridgeShoppingList.Views { public sealed partial class Splash : UserControl { public Task SplashInProgress { get; pr...
705b7ec0-e1e8-40e9-8f0f-1ec3f35999bd
{ "language": "C#" }
```c# // ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- // This file reused from: https://code.msdn.microsoft.com/Field-Engineer-501df99d using Auto...
```c# // ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- // This file reused from: https://code.msdn.microsoft.com/Field-Engineer-501df99d using Auto...
1dc5c4d5-b05f-4801-8270-6ef21237a646
{ "language": "C#" }
```c# using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Glimpse.Web; using System; namespace Glimpse.Host.Web.AspNet { public class GlimpseMiddleware { private readonly RequestDelegate _innerNext; private readonly MasterRequestRuntime _runtime; private readonly ISetti...
```c# using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Glimpse.Web; using System; namespace Glimpse.Host.Web.AspNet { public class GlimpseMiddleware { private readonly RequestDelegate _innerNext; private readonly MasterRequestRuntime _runtime; private readonly ISetti...
a5c74c4c-fbd6-4227-835a-281428601637
{ "language": "C#" }
```c# @{ var DiscordUser = UserHelper.GetDiscordUser(User); } @if(DiscordUser == null) { <a class="nav-link text-dark" asp-area="" asp-controller="Login" asp-action="Index">Login</a> } else { @DiscordUser } ``` Fix showing username when logged in.
```c# @{ var DiscordUser = UserHelper.GetDiscordUser(User); } @if(DiscordUser == null) { <a class="nav-link text-dark" asp-area="" asp-controller="Login" asp-action="Index">Login</a> } else { @DiscordUser.User } ```
200aac4e-ea1f-4c31-826c-570b7add68d1
{ "language": "C#" }
```c# using System; namespace StructuredLogViewer { public struct ProjectImport : IEquatable<ProjectImport> { public ProjectImport(string importedProject, int line, int column) { ProjectPath = importedProject; Line = line; Column = column; ...
```c# using System; namespace StructuredLogViewer { public struct ProjectImport : IEquatable<ProjectImport> { public ProjectImport(string importedProject, int line, int column) { ProjectPath = importedProject; Line = line; Column = column; ...
1b1bdb7b-99b8-4b00-9403-2fc1f934022c
{ "language": "C#" }
```c# using slang.Compiler.Clr.Compilation.Core.Builders; using slang.Compiler.Clr.Compilation.CSharp; using Xunit; namespace Clr.Tests.Compilation.CSharp { public class CSharpAssemblyGeneratorTests { [Fact] public void Given_a_defined_module_When_compiled_Then_a_CLR_class_is_created() ...
```c# using System.Reflection; using FluentAssertions; using slang.Compiler.Clr.Compilation.Core.Builders; using slang.Compiler.Clr.Compilation.CSharp; using Xunit; namespace Clr.Tests.Compilation.CSharp { public class CSharpAssemblyGeneratorTests { [Fact] public void Given_a_defined_module_Wh...
a2baa2f9-adc2-48f0-875b-8887c6cf35e9
{ "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.Allocation; using osu.Framework.Bindables; using osu.Game.Graphics; using osu.Game.Online.Multiplayer; using osu.Game.Screens.Mult...
```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.Allocation; using osu.Framework.Bindables; using osu.Game.Graphics; using osu.Game.Online.Multiplayer; using osu.Game.Screens.Mult...
12cd07d2-12ff-4bb9-8e7d-4f02143d54d1
{ "language": "C#" }
```c# using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; namespace FineBot.Workers.DI { public class WorkerInstaller : IWindsorInstaller { public void Install(IWindsorContainer container, IConfigurationStore store) { cont...
```c# using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; namespace FineBot.Workers.DI { public class WorkerInstaller : IWindsorInstaller { public void Install(IWindsorContainer container, IConfigurationStore store) { cont...
99408c9f-3d71-4809-a55d-8c59abe4384d
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Jebur27.Security.Interfaces { public interface ISecurityManager { } } ``` Update Security Manager to include Parameters
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Jebur27.Security.Interfaces { public interface ISecurityManager { string UserName { get; set; } int UserSecurityLevel { get; set; } } } ```
49733a65-6321-49c1-9a4a-662e558f8be1
{ "language": "C#" }
```c# // Copyright (c) Martin Costello, 2015. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. namespace MartinCostello.ProjectEuler.Puzzles { using System; using System.Globalization; using System.Linq; using System....
```c# // Copyright (c) Martin Costello, 2015. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. namespace MartinCostello.ProjectEuler.Puzzles { using System; using System.Globalization; using System.Linq; using System....
8f8cc0d1-5637-4017-90e4-ff2d1a303efe
{ "language": "C#" }
```c# // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; using osu.Game.Graphics; using osu.Game.Overlays.Settings.Sections.Audio; namespace osu.Game.Overlays.Settings.Sections { ...
```c# // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; using osu.Game.Graphics; using osu.Game.Overlays.Settings.Sections.Audio; namespace osu.Game.Overlays.Settings.Sections { ...
708167f2-ccc5-4f66-b629-5002ad7c4474
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; using System.Composition; using Microsoft.CodeAnalysis.Editor.Wpf; using Microsoft.VisualStudio.Imaging; using Micr...
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; using Microsoft.CodeAnalysis.Editor.Wpf; using Microsoft.VisualStudio.Imaging; using Microsoft.VisualStudio.Imaging...
b8ea013c-bd5a-4fb1-972a-829a79e36267
{ "language": "C#" }
```c# using NSpec; using NSpec.Domain; using NSpec.Domain.Formatters; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace AdHocConsoleRunner { class Program { static void Main(string[] args) { var assemblies = new Assembly[] ...
```c# using NSpec; using NSpec.Domain; using NSpec.Domain.Formatters; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace AdHocConsoleRunner { class Program { static void Main(string[] args) { var assemblies = new Assembly[] ...
89163f4a-0295-4a87-95ab-c1191fe4ae16
{ "language": "C#" }
```c# // Copyright Matthias Koch 2017. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Linq; #if NETCORE using System.IO; #endif namespace Nuke.Core { public static partial class EnvironmentInfo { public static string NewLine...
```c# // Copyright Matthias Koch 2017. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Collections; using System.Collections.Generic; using System.Linq; #if NETCORE using System.IO; #endif namespace Nuke.Core { public static partial clas...
fd36ce16-6374-4846-8d04-1f33d80a565e
{ "language": "C#" }
```c# using System; using Shapes.Class; namespace Shapes { using Interfaces; class Program { static void Main() { IShape circle = new Circle(4); Console.WriteLine(circle.CalculateArea()); circle.CalculatePerimeter(); IShape triangle = new Tri...
```c# using System; using Shapes.Class; namespace Shapes { using Interfaces; class Program { static void Main() { IShape circle = new Circle(4); Console.WriteLine("circle area: " + circle.CalculateArea()); Console.WriteLine("circle perimeter: " + circle....
65d89c24-020c-4f71-9d06-3643da00909b
{ "language": "C#" }
```c# using BatteryCommander.Web.Models; using BatteryCommander.Web.Services; using FluentEmail.Core; using FluentEmail.Core.Models; using FluentScheduler; using System.Collections.Generic; using System.IO; namespace BatteryCommander.Web.Jobs { public class PERSTATReportJob : IJob { private static ILi...
```c# using BatteryCommander.Web.Models; using BatteryCommander.Web.Services; using FluentEmail.Core; using FluentEmail.Core.Models; using FluentScheduler; using System.Collections.Generic; using System.IO; namespace BatteryCommander.Web.Jobs { public class PERSTATReportJob : IJob { private static ILi...
bf9074db-598a-4c3a-ab9d-2fdf6f72b0ff
{ "language": "C#" }
```c# #region License // // Copyright (c) 2013, Kooboo team // // Licensed under the BSD License // See the file LICENSE.txt for details. // #endregion using System; using System.Collections.Generic; using System.Linq; namespace Kooboo { /// <summary> /// /// </summary> public static class Applica...
```c# #region License // // Copyright (c) 2013, Kooboo team // // Licensed under the BSD License // See the file LICENSE.txt for details. // #endregion using System; using System.Collections.Generic; using System.Linq; namespace Kooboo { /// <summary> /// /// </summary> [Obsolete] public stati...
ad3a5705-3cce-4703-a9e3-06c09b394f82
{ "language": "C#" }
```c# @model BatteryCommander.Web.Commands.UpdateSUTARequest @using (Html.BeginForm("Edit", "SUTA", new { Model.Id }, FormMethod.Post, true, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken() @Html.ValidationSummary() <div class="form-group form-group-lg"> @Htm...
```c# @model BatteryCommander.Web.Commands.UpdateSUTARequest @using (Html.BeginForm("Edit", "SUTA", new { Model.Id }, FormMethod.Post, true, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken() @Html.ValidationSummary() <div class="form-group form-group-lg"> @Htm...
4ef80e1f-e887-4235-abc4-ddd3b7ff2d95
{ "language": "C#" }
```c# using System; using System.ComponentModel.DataAnnotations; using static BatteryCommander.Web.Models.Soldier; namespace BatteryCommander.Web.Models.Reports { public class Stat { public int Assigned { get; set; } public int Passed { get; set; } public int Failed { get; set; } ...
```c# using System; using System.ComponentModel.DataAnnotations; using static BatteryCommander.Web.Models.Soldier; namespace BatteryCommander.Web.Models.Reports { public class Stat { public int Assigned { get; set; } public int Passed { get; set; } public int Failed { get; set; } ...
d1fd6849-ce98-46c8-8404-e8fdaff0a5e8
{ "language": "C#" }
```c# using UnityEngine; public class OnActivateRefresh : MonoBehaviour { private ServerUI _serverUi; private void Start() { _serverUi = FindObjectOfType<ServerUI>(); } private void OnEnable() { _serverUi.GetServerList(); } }``` Fix the server list update
```c# using UnityEngine; public class OnActivateRefresh : MonoBehaviour { private ServerUI _serverUi; private void Start() { _serverUi = FindObjectOfType<ServerUI>(); _serverUi.GetServerList(); } private void OnEnable() { if(_serverUi)_serverUi.GetServerList(); } }...
ef3450ae-f8a2-4a9d-b6ad-c34834e94395
{ "language": "C#" }
```c# using UnityEditor; namespace BitStrap { public class ScriptableObjectContextMenu { [MenuItem("CONTEXT/ScriptableObject/Select in Project View")] public static void SelectScriptabelObject(MenuCommand menuCommand) { EditorGUIUtility.PingObject(menuCommand.context); } } }``` Add context menu to sele...
```c# using UnityEditor; using UnityEngine; namespace BitStrap { public class ScriptableObjectContextMenu { [MenuItem("CONTEXT/ScriptableObject/Select Script", false, 10)] public static void SelectScriptabelObjectScript(MenuCommand menuCommand) { var serializedObject = new SerializedObject(menuCommand.cont...
5387a469-c72a-402d-b3b0-7e0a1e852361
{ "language": "C#" }
```c# using System; using JsonApiDotNetCore.Resources; namespace JsonApiDotNetCoreTests.IntegrationTests { /// <summary> /// Lists the various extensibility points on <see cref="IResourceDefinition{TResource,TId}" />. /// </summary> [Flags] public enum ResourceDefinitionExtensibilityPoints { ...
```c# using System; using JsonApiDotNetCore.Resources; namespace JsonApiDotNetCoreTests.IntegrationTests { /// <summary> /// Lists the various extensibility points on <see cref="IResourceDefinition{TResource,TId}" />. /// </summary> [Flags] public enum ResourceDefinitionExtensibilityPoints { ...
4cb98456-489f-4219-b966-98153e0c4ab0
{ "language": "C#" }
```c# /* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * 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...
```c# /* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * 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...
051055f8-c752-46d5-b0ee-c1f9ca7775a8
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Collections.Immutable; namespace Bearded.Utilities.Graphs { class AdjacencyListDirectedGraph<T> : IDirectedGraph<T> where T : IEquatable<T> { private readonly ImmutableList<T> elements; private readonly ImmutableDictionary<T, I...
```c# using System; using System.Collections.Generic; using System.Collections.Immutable; namespace Bearded.Utilities.Graphs { class AdjacencyListDirectedGraph<T> : IDirectedGraph<T> where T : IEquatable<T> { private readonly ImmutableList<T> elements; private readonly ImmutableDictionary<T, I...
85f6ef96-28bc-429b-b6ce-84990d3aeb71
{ "language": "C#" }
```c# namespace SharpArch.NHibernate.NHibernateValidator { using System.ComponentModel.DataAnnotations; using SharpArch.Domain; using SharpArch.Domain.DomainModel; using SharpArch.Domain.PersistenceSupport; /// <summary> /// Provides a class level validator for determining if the entity h...
```c# namespace SharpArch.NHibernate.NHibernateValidator { using System.ComponentModel.DataAnnotations; using SharpArch.Domain; using SharpArch.Domain.DomainModel; using SharpArch.Domain.PersistenceSupport; /// <summary> /// Provides a class level validator for determining if the entity h...
f6ae80e5-ab40-4302-a15b-7f867a29ab79
{ "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.Bindables; using osu.Game.Graphics; using osuTK.Graphics; namespace osu.Game.Beatmaps.ControlPoints { public class DifficultyControlPoint :...
```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.Bindables; using osu.Game.Graphics; using osuTK.Graphics; namespace osu.Game.Beatmaps.ControlPoints { public class DifficultyControlPoint :...
9dbd82d0-2c82-4bcb-af0f-78d1759ad812
{ "language": "C#" }
```c# namespace Mos6510.Instructions { public enum AddressingMode { Implied, Immediate, Absolute, AbsoluteX, AbsoluteY, Zeropage, ZeropageX, ZeropageY, IndirectX, IndirectY } } ``` Add the accumulator addressing mode.
```c# namespace Mos6510.Instructions { public enum AddressingMode { Absolute, AbsoluteX, AbsoluteY, Accumulator, Immediate, Implied, IndirectX, IndirectY, Zeropage, ZeropageX, ZeropageY, } } ```
008e4f5e-ff73-46f7-9e64-18c05aafa9a5
{ "language": "C#" }
```c# using System.Collections.Generic; namespace RetailStore { public class RetailStore { private readonly Screen m_Screen; private readonly Dictionary<string, string> m_Products; public RetailStore(Screen screen, Dictionary<string, string> products) { m_Screen = ...
```c# using System.Collections.Generic; namespace RetailStore { public class RetailStore { private readonly Screen m_Screen; private readonly Dictionary<string, string> m_Products; public RetailStore(Screen screen, Dictionary<string, string> products) { m_Screen = ...
4d9fce47-77cb-41b3-8385-47979510bfc4
{ "language": "C#" }
```c# @model alert_roster.web.Models.Message @{ ViewBag.Title = "Create New Message"; } <h2>@ViewBag.Title</h2> @using (Html.BeginForm("New", "Home", FormMethod.Post)) { @Html.AntiForgeryToken() <div class="form-horizontal"> <h4>Message</h4> <hr /> @Html.ValidationSummary(true) ...
```c# @model alert_roster.web.Models.Message @{ ViewBag.Title = "Create New Message"; } <h2>@ViewBag.Title</h2> <div> @Html.ActionLink("Back to List", "Index") </div> @using (Html.BeginForm("New", "Home", FormMethod.Post)) { @Html.AntiForgeryToken() <div class="form-horizontal"> <h4>Messa...
65cd8907-c2e4-4d17-b477-c738b762202a
{ "language": "C#" }
```c# using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace Northwind.Model.Mapping { public class OrderDetailMap : EntityTypeConfiguration<OrderDetail> { public OrderDetailMap() { // Primary Key HasKey(t => new { t.Or...
```c# using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace Northwind.Model.Mapping { public class OrderDetailMap : EntityTypeConfiguration<OrderDetail> { public OrderDetailMap() { // Primary Key HasKey(t => new { t.Or...
71a64260-41a7-4bd7-a78d-01ad994b5b92
{ "language": "C#" }
```c# using Machine.Specifications; namespace Stripe.Tests { [Behaviors] public class account_behaviors { protected static StripeAccountSharedOptions CreateOrUpdateOptions; protected static StripeAccount StripeAccount; //It should_have_the_correct_email_address = () => // ...
```c# using Machine.Specifications; namespace Stripe.Tests { [Behaviors] public class account_behaviors { protected static StripeAccountSharedOptions CreateOrUpdateOptions; protected static StripeAccount StripeAccount; //It should_have_the_correct_email_address = () => // ...
6c248e24-643b-4db5-82c3-d6ae31f8ba3a
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Threading; using System.Web; using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using Newtonsoft.Json; using VotingApplication.Data.Context; using VotingApp...
```c# using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Threading; using System.Web; using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using Newtonsoft.Json; using VotingApplication.Data.Context; using VotingApp...
cb90a153-8730-4315-8daf-b80a7dfea74e
{ "language": "C#" }
```c# namespace RedBlueGames.ToolsExamples { using UnityEngine; using System.Collections; using System.Collections.Generic; public class PrimitiveCreatorSaveData : ScriptableObject { public List<PrimitiveCreator.Config> ConfigPresets; public bool HasConfigForIndex(int index) ...
```c# namespace RedBlueGames.ToolsExamples { using UnityEngine; using System.Collections; using System.Collections.Generic; public class PrimitiveCreatorSaveData : ScriptableObject { public List<PrimitiveCreator.Config> ConfigPresets; private void OnEnable() { ...
fec727c5-ea77-4916-b750-3c822a9b1700
{ "language": "C#" }
```c# using Microsoft.Extensions.Logging; using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.Serialization; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Strings; namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.ColorPickerEyeDropper, "Eye Droppe...
```c# using Microsoft.Extensions.Logging; using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.Serialization; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Strings; namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.ColorPickerEyeDropper, EditorType....
3bcaa18f-e88a-4713-ac52-043676fcf1e1
{ "language": "C#" }
```c# using System; using System.IO; using System.IO.Compression; using System.Reflection; namespace TestUtilities { public static class DatacardUtility { public static string WriteDatacard(string name) { var directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); ...
```c# using System; using System.IO; using System.IO.Compression; using System.Reflection; namespace TestUtilities { public static class DatacardUtility { public static string WriteDatacard(string name) { var directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); ...
e5fe6905-a322-4dc2-a67c-355f9a7991a7
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Security; using System.Security.Claims; using System.Security.Principal; using System.Web; namespace Bonobo.Git.Server { public static class UserExtensions { public static string GetClaim(this IPrincipal user, string...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Security; using System.Security.Claims; using System.Security.Principal; using System.Web; namespace Bonobo.Git.Server { public static class UserExtensions { public static string GetClaim(this IPrincipal user, string...
e59cef31-6eb9-4ae1-b664-5cacc05e6515
{ "language": "C#" }
```c# namespace Inspiring.Mvvm.Views { using System.Windows; using System.Windows.Media; using Inspiring.Mvvm.Common; using Inspiring.Mvvm.Screens; public class WindowService : IWindowService { public static readonly Event<InitializeWindowEventArgs> InitializeWindowEvent = new Event<Initia...
```c# namespace Inspiring.Mvvm.Views { using System.Windows; using System.Windows.Media; using Inspiring.Mvvm.Common; using Inspiring.Mvvm.Screens; public class WindowService : IWindowService { public static readonly Event<InitializeWindowEventArgs> InitializeWindowEvent = new Event<Initia...
7c3ce3c1-808b-44ec-93b8-1d32878ee52a
{ "language": "C#" }
```c# using System; using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Hosting.Server.Features; using Microsoft.Extensions.Hosting; namespace Duracellko.PlanningPoker.Web { public class HttpClientSet...
```c# using System; using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Hosting.Server.Features; using Microsoft.Extensions.Hosting; namespace Duracellko.PlanningPoker.Web { public class HttpClientSet...
0f9b1711-253a-4432-ad35-36704b0fe6e3
{ "language": "C#" }
```c# using System; using System.Web.Http; using DataBooster.DbWebApi; namespace MyDbWebApi { public static class WebApiConfig { public static void Register(HttpConfiguration config) { config.Routes.MapHttpRoute( name: "DbWebApi", routeTemplate: "{sp}", defaults: new { controller = "...
```c# using System; using System.Web.Http; using DataBooster.DbWebApi; namespace MyDbWebApi { public static class WebApiConfig { public static void Register(HttpConfiguration config) { config.Routes.MapHttpRoute( name: "DbWebApi", routeTemplate: "{sp}/{ext}", defaults: new { controll...
99eb1dd4-eba3-43ae-9a3b-54f6e3e760b8
{ "language": "C#" }
```c# // <auto-generated/> using System.Reflection; [assembly: AssemblyTitleAttribute("Elders.Cronus")] [assembly: AssemblyDescriptionAttribute("Elders.Cronus")] [assembly: AssemblyProductAttribute("Elders.Cronus")] [assembly: AssemblyVersionAttribute("1.2.7")] [assembly: AssemblyInformationalVersionAttribute("1.2.7"...
```c# // <auto-generated/> using System.Reflection; [assembly: AssemblyTitleAttribute("Elders.Cronus")] [assembly: AssemblyDescriptionAttribute("Elders.Cronus")] [assembly: AssemblyProductAttribute("Elders.Cronus")] [assembly: AssemblyVersionAttribute("1.2.8")] [assembly: AssemblyInformationalVersionAttribute("1.2.8"...
b89415df-9c74-4eec-8303-c92a1e849ae8
{ "language": "C#" }
```c# using System.Collections.Generic; using System.Linq; using Microsoft.Practices.EnterpriseLibrary.SemanticLogging; using MongoDB.Bson; namespace TIMEmSYSTEM.SemanticLogging.Mongo { internal static class EventEntryExtensions { internal static BsonDocument AsBsonDocument(this EventEntry eventEntry)...
```c# using System.Collections.Generic; using System.Linq; using Microsoft.Practices.EnterpriseLibrary.SemanticLogging; using MongoDB.Bson; namespace TIMEmSYSTEM.SemanticLogging.Mongo { internal static class EventEntryExtensions { internal static BsonDocument AsBsonDocument(this EventEntry eventEntry)...
6927da94-9633-4837-8462-d83326143f49
{ "language": "C#" }
```c# using CommandLine; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IdunnSql.Console { [Verb("execute", HelpText = "Execute the permission checks defined in a file")] public class ExecuteOptions { [Option('s', "sour...
```c# using CommandLine; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IdunnSql.Console { [Verb("execute", HelpText = "Execute the permission checks defined in a file")] public class ExecuteOptions { [Option('s', "sour...
b1c04b14-8128-478b-b812-1b4090862645
{ "language": "C#" }
```c# using System; using System.IO; using NuGet; namespace NugetPackageTrimmer { class Program { static void Main(string[] args) { var repoUrl = args.Length > 2 ? args[1] : "https://packages.nuget.org/api/v2"; Console.WriteLine($"Checking if packages in [{args[0]}] exist in {repoUrl} and deleting any th...
```c# using System; using System.Globalization; using System.IO; using NuGet; namespace NugetPackageTrimmer { class Program { static void Main(string[] args) { var repoUrl = args.Length > 3 ? args[2] : "https://packages.nuget.org/api/v2"; Console.WriteLine($"Checking if packages in [{args[0]}] exist in {...
f510ee08-5ad5-4ef2-85fc-5e46e087b79c
{ "language": "C#" }
```c# using Oxide.Core; using UnityEngine; namespace Oxide.Unity { /// <summary> /// The main MonoBehaviour which calls OxideMod.OnFrame /// </summary> public class UnityScript : MonoBehaviour { public static GameObject Instance { get; private set; } public static void Create() ...
```c# using Oxide.Core; using UnityEngine; namespace Oxide.Unity { /// <summary> /// The main MonoBehaviour which calls OxideMod.OnFrame /// </summary> public class UnityScript : MonoBehaviour { public static GameObject Instance { get; private set; } public static void Create() ...
17bf6c4e-9e65-41e9-bb80-ae8d7e25eabd
{ "language": "C#" }
```c# using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections.Generic; namespace BatteryCommander.Web.Migrations { public partial class CanLogin : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn<b...
```c# using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections.Generic; namespace BatteryCommander.Web.Migrations { public partial class CanLogin : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn<b...
3bb9b83c-ca8c-49f3-be89-ca3be58eed0d
{ "language": "C#" }
```c# using System.Reflection; [assembly: AssemblyVersion("3.1.0.0")] [assembly: AssemblyFileVersion("3.1.0.0")] //// [assembly: AssemblyInformationalVersion("3.1.0.0 Release")]``` Set assembly version to 5.0.0.0
```c# using System.Reflection; [assembly: AssemblyVersion("5.0.0.0")] [assembly: AssemblyFileVersion("5.0.0.0")] //// [assembly: AssemblyInformationalVersion("3.1.0.0 Release")]```