doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
17737e41-b22a-4893-9fcb-f18e50d58091 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using System.Web.Routing;
namespace Navigation.Mvc
{
public class RouteConfig
{
public static void AddStateRoutes()
{
if (StateInfoConfig.Dialogs == null)
return;
string controller, action;
Route route;
using (RouteTable.Routes.GetWriteLock())
{
... | ```c#
using System.Web.Mvc;
using System.Web.Routing;
namespace Navigation.Mvc
{
public class RouteConfig
{
public static void AddStateRoutes()
{
if (StateInfoConfig.Dialogs == null)
return;
string controller, action;
Route route;
using (RouteTable.Routes.GetWriteLock())
{
... |
a5ad9aef-714d-4c24-bd90-a20a3511b58d | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyCompany("Picoe Software Solutions Inc.")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("(c) 2010-2014 by Curtis Wensley, 2012-2014 by Vivek Jhaveri and contributors")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: Assembl... | ```c#
using System.Reflection;
[assembly: AssemblyCompany("Picoe Software Solutions Inc.")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("(c) 2010-2014 by Curtis Wensley, 2012-2014 by Vivek Jhaveri and contributors")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: Assembl... |
f99009d0-79e5-499a-8632-d0449235ecd3 | {
"language": "C#"
} | ```c#
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
namespace PersonalWebApp.Middleware {
public class StripWhitespaceMiddleware {
private readonly RequestDelegate _next;
public Stri... | ```c#
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
namespace PersonalWebApp.Middleware {
public class StripWhitespaceMiddleware {
private readonly RequestDelegate _next;
public Stri... |
62638e87-fb41-4b82-97d1-1e5a2176444c | {
"language": "C#"
} | ```c#
using System.Web;
using System.Web.Mvc;
namespace SvNaum.Web
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
//filters.Add(new HandleErrorAttribute());
}
}
}
```
Include missing views AddNews and EditNews i... | ```c#
using System.Web;
using System.Web.Mvc;
namespace SvNaum.Web
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}
``` |
08b0e08b-146f-429b-bd84-5296f4dfa1fe | {
"language": "C#"
} | ```c#
namespace C42A
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Serialization;
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summar... | ```c#
namespace C42A
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Serialization;
using C42A.CAB42;
internal static class Program
{
/// <summary>
/// The main entry point for the applicati... |
ddc6ce11-3840-4a0b-a8a3-04a3aee0d088 | {
"language": "C#"
} | ```c#
using System;
using compiler.frontend;
namespace Program
{
class Program
{
//TODO: adjust main to use the parser when it is complete
static void Main(string[] args)
{
using (Lexer l = new Lexer(@"../../testdata/big.txt"))
{
Token t;
... | ```c#
using System;
using compiler.frontend;
namespace Program
{
class Program
{
//TODO: adjust main to use the parser when it is complete
static void Main(string[] args)
{
// using (Lexer l = new Lexer(@"../../testdata/big.txt"))
// {
// Token t;
/... |
78a71f4e-4a76-4138-b0a2-25aca94cd963 | {
"language": "C#"
} | ```c#
namespace System.Net.Http
{
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
static class HttpHelper
{
public static string ValidatePath(string path)
{
if (path == null) throw new ArgumentNullException(nameof(path));
... | ```c#
namespace System.Net.Http
{
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
static class HttpHelper
{
public static string ValidatePath(string path)
{
if (path == null) throw new ArgumentN... |
2284ac0f-fb57-4bb4-9cd9-686ca3537617 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using Orchard.ContentManagement.Drivers;
using Orchard.ContentManagement.MetaData;
using Orchard.ContentManagement.MetaData.Builders;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using Orchard.Environment.Extensions;
nam... | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using Orchard.ContentManagement.Drivers;
using Orchard.ContentManagement.MetaData;
using Orchard.ContentManagement.MetaData.Builders;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using Orchard.Environment.Extensions;
nam... |
1f7056c1-5ef1-47c8-9ea0-7f928f432514 | {
"language": "C#"
} | ```c#
// Copyright 2009 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System.Reflection;
namespace NodaTime.Benchmarks.Framework
{
/// <summary>
/// The results of running a single test.
//... | ```c#
// Copyright 2009 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System.Reflection;
namespace NodaTime.Benchmarks.Framework
{
/// <summary>
/// The results of running a single test.
//... |
edabe05f-eabf-47ea-82ba-cbddc3d6cfc5 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace Nest
{
[JsonConverter(typeof(ReadAsTypeJsonConverter<TtlField>))]
public interface ITtlField : IFieldMapping
{
[JsonProperty("enabled")]
bool? Enabled { get; set; }
[JsonProperty("default")]
Time Default { get; set; }
}
public class TtlField : ITtlField
{
publi... | ```c#
using Newtonsoft.Json;
namespace Nest
{
[JsonConverter(typeof(ReadAsTypeJsonConverter<TtlField>))]
public interface ITtlField : IFieldMapping
{
[JsonProperty("enabled")]
bool? Enabled { get; set; }
[JsonProperty("default")]
Time Default { get; set; }
}
public class TtlField : ITtlField
{
publi... |
01eac545-90e3-4e0f-8d2b-8348a937994b | {
"language": "C#"
} | ```c#
using Xunit;
namespace PlayerRank.UnitTests
{
public class PlayerTests
{
[Fact]
public void CanIncreasePlayersScore()
{
var player = new PlayerScore("Foo");
player.AddPoints(new Points(100));
Assert.Equal(new Points(100), player.Points);
... | ```c#
using Xunit;
namespace PlayerRank.UnitTests
{
public class PlayerTests
{
[Fact]
public void CanIncreasePlayersScore()
{
var player = new PlayerScore("Foo");
player.AddPoints(new Points(100));
Assert.Equal(new Points(100), player.Points);
... |
e45a93fb-9896-4c3a-b959-5e7e6c448549 | {
"language": "C#"
} | ```c#
using System;
using System.Reactive.Linq;
using static LanguageExt.Prelude;
using static LanguageExt.Process;
namespace LanguageExt
{
internal class ActorDispatchNotExist : IActorDispatch
{
public readonly ProcessId ProcessId;
public ActorDispatchNotExist(ProcessId pid)
{
... | ```c#
using System;
using System.Reactive.Linq;
using static LanguageExt.Prelude;
using static LanguageExt.Process;
namespace LanguageExt
{
internal class ActorDispatchNotExist : IActorDispatch
{
public readonly ProcessId ProcessId;
public ActorDispatchNotExist(ProcessId pid)
{
... |
b11e8f6e-8efd-452d-9165-50e03fcd2ead | {
"language": "C#"
} | ```c#
using System.Configuration;
namespace Signatory
{
public static class Settings
{
public static string Authority = ConfigurationManager.AppSettings["Authority"];
public static string GitHubKey = ConfigurationManager.AppSettings["GitHubKey"];
public static string GitHubSecret = Con... | ```c#
using System.Configuration;
namespace Signatory
{
public static class Settings
{
public static readonly string Authority = ConfigurationManager.AppSettings["Authority"];
public static readonly string GitHubKey = ConfigurationManager.AppSettings["GitHubKey"];
public static readonl... |
498a7d18-8e55-4f75-bac0-71351b86400f | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using System;
using System.Collections;
using Symbooglix;
using Microsoft.Boogie;
using Microsoft.Basetypes;
namespace ExprBuilderTests
{
[TestFixture()]
public class ConstantFoldingExprBuilderTests : SimpleExprBuilderTestBase
{
protected Tuple<SimpleExprBuilder, Const... | ```c#
using NUnit.Framework;
using System;
using System.Collections;
using Symbooglix;
using Microsoft.Boogie;
using Microsoft.Basetypes;
namespace ExprBuilderTests
{
public class ConstantFoldingExprBuilderTests : SimpleExprBuilderTestBase
{
protected Tuple<SimpleExprBuilder, ConstantFoldingExprBuilde... |
3cb5ea89-697c-4762-b4f9-4addac3b32d2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Contract.Models
{
public class FfmpegJobModel
{
public FfmpegJobModel()
{
Tasks = new List<FfmpegTaskModel>();
}
public Guid JobCorrelationId { get; set; }
public Transcoding... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Contract.Models
{
public class FfmpegJobModel
{
public FfmpegJobModel()
{
Tasks = new List<FfmpegTaskModel>();
}
public Guid JobCorrelationId { get; set; }
public Transcoding... |
3771ea06-037f-4e90-970f-dc9f07ab1eca | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using VRGIN.Core;
using VRGIN.Helpers;
namespace HoneySelectVR
{
internal class HoneyInterpreter : GameInterpreter
{
public HScene Scene;
private IList<IActor> _Actors = ... | ```c#
using Manager;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using VRGIN.Core;
using VRGIN.Helpers;
using System.Linq;
namespace HoneySelectVR
{
internal class HoneyInterpreter : GameInterpreter
{
public HScene Scene;
... |
b414cae8-0bf8-484c-9739-16a6df3c41e0 | {
"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... |
bf801e0f-6e67-4af5-ba6b-8b89a9616ece | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Queries;
namespace MyTrips.UITests
{
[TestFixture(Platform.iOS)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
... | ```c#
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Queries;
namespace MyTrips.UITests
{
[TestFixture(Platform.iOS)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
... |
bb1f885b-cefe-4e5e-aeb5-f1f8aa917c05 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Arkivverket.Arkade.Core
{
public class ArchiveMetadata
{
public string ArchiveDescription { get; set; }
public string AgreementNumber { get; set; }
public List<MetadataEntityInformationUnit> ArchiveCreators { get; } = new ... | ```c#
using System;
using System.Collections.Generic;
namespace Arkivverket.Arkade.Core
{
public class ArchiveMetadata
{
public string ArchiveDescription { get; set; }
public string AgreementNumber { get; set; }
public List<MetadataEntityInformationUnit> ArchiveCreators { get; set; }
... |
3f80ce30-8ab1-40a6-8bf0-f18f8392724c | {
"language": "C#"
} | ```c#
using System;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
namespace AppHarbor
{
public class AppHarborInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(Comp... | ```c#
using System;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Castle.MicroKernel.Resolvers.SpecializedResolvers;
namespace AppHarbor
{
public class AppHarborInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, ... |
5190fc7f-cd9f-4c5a-a4f7-686e731d37fb | {
"language": "C#"
} | ```c#
using System;
using Conreign.Cluster;
using Microsoft.WindowsAzure.ServiceRuntime;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.Host;
namespace Conreign.Host.Azure
{
public class SiloRole : RoleEntryPoint
{
private AzureSilo _silo;
public override void Run()
{
... | ```c#
using System;
using Conreign.Cluster;
using Microsoft.WindowsAzure.ServiceRuntime;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.Host;
namespace Conreign.Host.Azure
{
public class SiloRole : RoleEntryPoint
{
private AzureSilo _silo;
public override void Run()
{
... |
04c4e46a-2b27-404e-a11f-e18c44c80099 | {
"language": "C#"
} | ```c#
#region License
/*********************************************************************************
* CompactSettingWriter.cs
*
* Copyright (c) 2004-2018 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License... | ```c#
#region License
/*********************************************************************************
* CompactSettingWriter.cs
*
* Copyright (c) 2004-2018 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License... |
1bef9388-b0be-4570-a190-992b5a2cb7f2 | {
"language": "C#"
} | ```c#
//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="SonarSource SA and Microsoft Corporation">
// (c) SonarSource SA and Microsoft Corporation. All rights reserved.
// </copyright>
//----------------------------------------------------------------... | ```c#
//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="SonarSource SA and Microsoft Corporation">
// (c) SonarSource SA and Microsoft Corporation. All rights reserved.
// </copyright>
//----------------------------------------------------------------... |
c4193874-8388-49f3-9db7-7237f2c60320 | {
"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... |
8b7181f4-03d8-4e99-a55a-03cc72149d04 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AxeSoftware.Quest;
namespace EditorControllerTests
{
[TestClass]
public class TemplateTests
{
[TestMethod]
public void TestTemp... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AxeSoftware.Quest;
namespace EditorControllerTests
{
[TestClass]
public class TemplateTests
{
[TestMethod]
public void TestTemp... |
3a87fce8-b746-439a-8909-be6803f7f0ba | {
"language": "C#"
} | ```c#
using System.IO;
using System.Threading.Tasks;
namespace TestCaseAutomator.TeamFoundation
{
/// <summary>
/// Represents a TFS source controlled file.
/// </summary>
public class TfsFile : TfsSourceControlledItem
{
/// <summary>
/// Initializes a new <see cref="TfsFile"/>.
/// </summary>
/// <param ... | ```c#
using System.IO;
using System.Threading.Tasks;
namespace TestCaseAutomator.TeamFoundation
{
/// <summary>
/// Represents a TFS source controlled file.
/// </summary>
public class TfsFile : TfsSourceControlledItem
{
/// <summary>
/// Initializes a new <see cref="TfsFile"/>.
/// </summary>
/// <param ... |
a40613be-8edf-4105-8f4b-1cc62d858f7c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
namespace MakerFarm.Models
{
public class MakerfarmDBContext : DbContext
{
public MakerfarmDBContext() : base("DefaultConnection")
{
//Database.SetInitializer<Makerf... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
namespace MakerFarm.Models
{
public class MakerfarmDBContext : DbContext
{
public MakerfarmDBContext() : base("DefaultConnection")
{
Database.SetInitializer<Makerfar... |
7bc50ada-4454-453d-8ad0-55f6961a9476 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.G... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.C... |
61950a3a-5dd2-43f2-9ddb-8e6dff8b13f6 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace borkedLabs.CrestScribe
{
public class ScribeQueryWorker
{
private BlockingCollection<SsoCharacter> _queryQueu... | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace borkedLabs.CrestScribe
{
public class ScribeQueryWorker
{
private BlockingCollection<SsoCharacter> _queryQueu... |
dca1bc36-2206-47b2-8140-cad0abec91a9 | {
"language": "C#"
} | ```c#
using CefSharp;
using TweetDuck.Core.Controls;
using TweetDuck.Core.Utils;
namespace TweetDuck.Core.Handling.General{
sealed class LifeSpanHandler : ILifeSpanHandler{
public static bool HandleLinkClick(IWebBrowser browserControl, WindowOpenDisposition targetDisposition, string targetUrl){
... | ```c#
using CefSharp;
using TweetDuck.Core.Controls;
using TweetDuck.Core.Utils;
namespace TweetDuck.Core.Handling.General{
sealed class LifeSpanHandler : ILifeSpanHandler{
private static bool IsPopupAllowed(string url){
return url.StartsWith("https://twitter.com/teams/authorize?");
}
... |
804d0f02-cd25-434d-bb44-f8aa24557d2f | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
public class Bob
{
public string Hey(string input)
{
if (IsSilence(input))
{
return "Fine. Be that way!";
}
else if (IsShouting(input))
{
return "Whoa, chill out!";
}
else if (IsQuestion(input... | ```c#
using System.Linq;
public class Bob
{
public string Hey(string input)
{
if (IsSilence(input))
{
return "Fine. Be that way!";
}
else if (IsShouting(input))
{
return "Whoa, chill out!";
}
else if (IsQuestion(input))
{
... |
28970643-6d68-4e8a-87c6-557097a162b6 | {
"language": "C#"
} | ```c#
using Microsoft.SharePoint.Administration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SPMin
{
public class SPMinLoggingService : SPDiagnosticsServiceBase
{
private static string AreaName = "Mavention";
private static SPMinLoggingServic... | ```c#
using Microsoft.SharePoint.Administration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SPMin
{
public class SPMinLoggingService : SPDiagnosticsServiceBase
{
private static string AreaName = "SPMin";
private static SPMinLoggingService _i... |
c4e91a58-add4-4afe-a4bc-d6a67125904f | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GlobalAssemblyInfo.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// -------------------------------------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GlobalAssemblyInfo.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// -------------------------------------------------------------------... |
dc641564-f204-466a-9885-26f60091a4b1 | {
"language": "C#"
} | ```c#
using System.Collections;
using UnityEngine;
namespace TrailAdvanced.PointSource {
public class ObjectPointSource : AbstractPointSource {
public Transform objectToFollow;
protected override void Update() {
base.Update();
points.AddToBack(objectToFollow.position);
}
}
}```
Add points to front an... | ```c#
using System.Collections;
using UnityEngine;
namespace TrailAdvanced.PointSource {
public class ObjectPointSource : AbstractPointSource {
public Transform objectToFollow;
private Vector3 _lastPosition;
protected override void Start() {
base.Start();
_lastPosition = objectToFollow.position;
}
... |
13d2ae0b-4eb3-48cf-8d9c-47a4c3e7dbd2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SourceBrowser.Search.ViewModels
{
public struct TokenViewModel
{
public string Id { get; }
public string Path { get; }
public string Username { get; }
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SourceBrowser.Search.ViewModels
{
public struct TokenViewModel
{
public string Id { get; }
public string Path { get; }
public string Username { get; }
... |
05d77a68-9c80-4795-a93b-80a8264602eb | {
"language": "C#"
} | ```c#
using System;
using BenchmarkDotNet.Running;
namespace LanguageExt.Benchmarks
{
class Program
{
static void Main(string[] args)
{
var summary1 = BenchmarkRunner.Run<HashMapAddBenchmark>();
Console.Write(summary1);
var summary2 = BenchmarkRunner.Run<Ha... | ```c#
using BenchmarkDotNet.Running;
namespace LanguageExt.Benchmarks
{
class Program
{
static void Main(string[] args) =>
BenchmarkSwitcher
.FromAssembly(typeof(Program).Assembly)
.Run(args);
}
}
``` |
214cb70e-0f8a-4ff9-8411-c2bebe35ff83 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace Dictator
{
public class Rule
{
public string FieldPath { get; set; }
public Constraint Constraint { get; set; }
public List<object> Parameters { get; set; }
public bool IsViolated { get; set; }
public string Message { ge... | ```c#
using System.Collections.Generic;
namespace Dictator
{
public class Rule
{
string _message = null;
public string FieldPath { get; set; }
public Constraint Constraint { get; set; }
public List<object> Parameters { get; set; }
public bool IsViolated { get; ... |
5818b3ca-5c50-49fb-9e97-90a767fa8329 | {
"language": "C#"
} | ```c#
using System.Collections.Concurrent;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Abc.NCrafts.Quizz.Performance.Questions._021
{
public class Answer2
{
public static void Run()
{
var queue = new ConcurrentStack<int>();
// beg... | ```c#
using System.Collections.Concurrent;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Abc.NCrafts.Quizz.Performance.Questions._021
{
public class Answer2
{
public static void Run()
{
var stack = new ConcurrentStack<int>();
// beg... |
de0f7085-fbcf-4276-b0ec-2dbc2fa5f8fb | {
"language": "C#"
} | ```c#
namespace Nancy.AttributeRouting
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;
/// <inheritdoc/>
public class AttributeRoutingRegistration : IRegistrations
{
static Attribut... | ```c#
namespace Nancy.AttributeRouting
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;
/// <inheritdoc/>
public class AttributeRoutingRegistration : IRegistrations
{
static Attribut... |
2af35c4f-5845-44cd-bff3-776914cfd95c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[RequireComponent(typeof(SpriteRenderer))]
public class SpriteShadow : MonoBehaviour
{
public Sprite ShadowSprite;
public float ShadowDist = 0.1f;
public bool UseParentSpr = true;
public Transform MyTr { get; private se... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[RequireComponent(typeof(SpriteRenderer))]
public class SpriteShadow : MonoBehaviour
{
public Sprite ShadowSprite;
public float ShadowDist = 0.1f;
public bool UseParentSpr = true;
public Transform MyTr { get; private se... |
de7805cd-58ea-49b7-99c4-c97370dd8ffa | {
"language": "C#"
} | ```c#
namespace Codestellation.Pulsar.Cron
{
public struct IntegerIndex
{
public const int NotFound = -1;
private readonly int[] _indexArray;
public IntegerIndex(SimpleCronField field)
{
_indexArray = new int[field.Settings.MaxValue + 1];
for (int i = 0... | ```c#
namespace Codestellation.Pulsar.Cron
{
public struct IntegerIndex
{
public const sbyte NotFound = -1;
private readonly sbyte[] _indexArray;
public IntegerIndex(SimpleCronField field)
{
_indexArray = new sbyte[field.Settings.MaxValue + 1];
for (int... |
023dfbc8-fc64-419f-8e9c-81e88db61093 | {
"language": "C#"
} | ```c#
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
public class SubscriptionItemUpdateOptions : SubscriptionItemSharedOptions
{
/// <summary>
/// A set of key/value pairs that you can attach to a subscription object. It can be useful for storing additional... | ```c#
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
public class SubscriptionItemUpdateOptions : SubscriptionItemSharedOptions
{
/// <summary>
/// A set of key/value pairs that you can attach to a subscription object. It can be useful for storing additional... |
8817e6a2-6aa5-4018-801e-fb26d634fd1b | {
"language": "C#"
} | ```c#
namespace formulate.meta
{
/// <summary>
/// Constants relating to Formulate itself (i.e., does not
/// include constants used by Formulate).
/// </summary>
public class Constants
{
/// <summary>
/// This is the version of Formulate. It is used on
/// assemblies ... | ```c#
namespace formulate.meta
{
/// <summary>
/// Constants relating to Formulate itself (i.e., does not
/// include constants used by Formulate).
/// </summary>
public class Constants
{
/// <summary>
/// This is the version of Formulate. It is used on
/// assemblies ... |
da04bf9f-f677-4944-9d9c-0146d8be23f2 | {
"language": "C#"
} | ```c#
@using StackExchange.Opserver.Models
@using StackExchange.Profiling
@{
Layout = null;
}
@helper RenderTab(TopTab tab)
{
if (tab.IsEnabled)
{
// Optimism!
using (MiniProfiler.Current.Step("Render Tab: " + tab.Name))
{
var status = tab.GetMonitorStatus?.Invoke() ?? M... | ```c#
@using StackExchange.Opserver.Models
@using StackExchange.Profiling
@{
Layout = null;
}
@helper RenderTab(TopTab tab)
{
if (tab.IsEnabled)
{
// Optimism!
using (MiniProfiler.Current.Step("Render Tab: " + tab.Name))
{
var status = tab.GetMonitorStatus?.Invoke() ?? M... |
7b3364a0-5cbb-417b-93a4-a2418220c0d8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace MuffinFramework
{
public abstract class LayerBase<TArgs> : ILayerBase<TArgs>
{
private readonly object _lockObj = new object();
private readonly List<ILayerBase<TArgs>> _parts = new List<ILayerBase<TArgs>>();
private TArg... | ```c#
using System;
using System.Collections.Generic;
namespace MuffinFramework
{
public abstract class LayerBase<TArgs> : ILayerBase<TArgs>
{
private readonly object _lockObj = new object();
private readonly List<ILayerBase<TArgs>> _parts = new List<ILayerBase<TArgs>>();
private TArg... |
f536acd1-0f43-4304-b935-6dd3f66a1106 | {
"language": "C#"
} | ```c#
using CrossPlatformTintedImage;
using CrossPlatformTintedImage.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly:ExportRendererAttribute(typeof(TintedImage), typeof(TintedImageRenderer))]
namespace CrossPlatformTintedImage.iOS
{
public class TintedImageRenderer : ImageRenderer
{
... | ```c#
using CrossPlatformTintedImage;
using CrossPlatformTintedImage.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly:ExportRendererAttribute(typeof(TintedImage), typeof(TintedImageRenderer))]
namespace CrossPlatformTintedImage.iOS
{
public class TintedImageRenderer : ImageRenderer
{
... |
de965815-220f-4c7c-83c3-555356ae2831 | {
"language": "C#"
} | ```c#
namespace QtWebKit {
using Qyoto;
using System;
using System.Runtime.InteropServices;
public class InitQtWebKit {
[DllImport("libqtwebkit-sharp", CharSet=CharSet.Ansi)]
static extern void Init_qtwebkit();
public static void InitSmoke() {
Init_qtwebkit();
}
}
}
```
Remove the 'lib' prefix fo... | ```c#
namespace QtWebKit {
using Qyoto;
using System;
using System.Runtime.InteropServices;
public class InitQtWebKit {
[DllImport("qtwebkit-sharp", CharSet=CharSet.Ansi)]
static extern void Init_qtwebkit();
public static void InitSmoke() {
Init_qtwebkit();
}
}
}
``` |
866d9fe0-a902-4349-a9fe-9a0832087419 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Rulesets.Taiko.Skinning
{
public class LegacyHitExplosion : Composite... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Rulesets.Taiko.Skinning
{
public class LegacyHitExplosion : Composite... |
bfd8c2b9-54f4-46f7-87d3-204c5311937e | {
"language": "C#"
} | ```c#
using EarTrumpet.Extensions;
using System;
using System.Windows;
using System.Windows.Controls;
namespace EarTrumpet.UI.Behaviors
{
public class TextBoxEx
{
// ClearText: Clear TextBox or the parent ComboBox.
public static bool GetClearText(DependencyObject obj) => (bool)obj.GetValue(Cle... | ```c#
using EarTrumpet.Extensions;
using System;
using System.Windows;
using System.Windows.Controls;
namespace EarTrumpet.UI.Behaviors
{
public class TextBoxEx
{
// ClearText: Clear TextBox or the parent ComboBox.
public static bool GetClearText(DependencyObject obj) => (bool)obj.GetValue(Cle... |
9a12ddde-e5a8-450d-8933-96bf62ecd824 | {
"language": "C#"
} | ```c#
using Microsoft.Extensions.DependencyInjection;
namespace MicroNetCore.Rest.Models.ViewModels.Extensions
{
public static class ConfigurationExtensions
{
public static IServiceCollection AddViewModels(this IServiceCollection services)
{
services.AddSingleton<IViewModelTypeProv... | ```c#
using Microsoft.Extensions.DependencyInjection;
namespace MicroNetCore.Rest.Models.ViewModels.Extensions
{
public static class ConfigurationExtensions
{
public static IServiceCollection AddViewModels(this IServiceCollection services)
{
services.AddSingleton<IViewModelTypeProv... |
4faf54b3-f4bb-4ed6-b808-1453c7e33d4d | {
"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.Development;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Framework.Lists;
namespace osu.Framework.Lo... | ```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.Linq;
using osu.Framework.Development;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Framework.Lists;
namespa... |
fda47bdc-c412-46dc-95b7-f84bc6054855 | {
"language": "C#"
} | ```c#
using System.Web.Routing;
using SignalR;
[assembly: WebActivator.PostApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")]
namespace ConsolR.Hosting
{
public static class Bootstrapper
{
public static void PreApplicationStart()
{
var routes = RouteTable.Routes;
routes... | ```c#
using System.Web.Routing;
using SignalR;
[assembly: WebActivator.PreApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")]
namespace ConsolR.Hosting
{
public static class Bootstrapper
{
public static void PreApplicationStart()
{
var routes = RouteTable.Routes;
routes.... |
0830d051-f76a-4f82-98f5-70c192a97883 | {
"language": "C#"
} | ```c#
namespace SurveyMonkey.RequestSettings
{
public class CreateCollectorSettings
{
public enum TypeOption
{
Weblink,
Email
}
public TypeOption Type { get; set; }
public string Name { get; set; }
}
}```
Implement all properties for collect... | ```c#
using System;
using SurveyMonkey.Containers;
namespace SurveyMonkey.RequestSettings
{
public class CreateCollectorSettings
{
public Collector.CollectorType Type { get; set; }
public string Name { get; set; }
public string ThankYouMessage { get; set; }
public string Disqua... |
3430c6bd-e496-4fff-8bea-37a730134749 | {
"language": "C#"
} | ```c#
using System;
//Problem 15.* Age after 10 Years
//Write a program to read your birthday from the console and print how old you are now and how old you will be after 10 years.
class AgeAfter10Years
{
public static int yearsNow;
static void Main(string[] args)
{
Console.Write("Enter birtday ... | ```c#
using System;
//Problem 15.* Age after 10 Years
//Write a program to read your birthday from the console and print how old you are now and how old you will be after 10 years.
class AgeAfter10Years
{
public static int yearsNow;
static void Main(string[] args)
{
Console.Write("Enter birtday ... |
2ee11c98-1254-42a8-8d39-a134a179eed3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;
namespace TTMouseclickSimulator.Core.ToontownRewritten.Environment
{
/// <summary>
/// Environment interface for T... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;
namespace TTMouseclickSimulator.Core.ToontownRewritten.Environment
{
/// <summary>
/// Environment interface for T... |
539d34ca-ef1f-4f38-a99e-895e9823a087 | {
"language": "C#"
} | ```c#
using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2017";
public const ... | ```c#
using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2017";
public const ... |
a0b496af-e104-4e95-bcc6-88fee0cda4e3 | {
"language": "C#"
} | ```c#
using System.IO;
using System.Reflection;
using System.Xml.Serialization;
namespace IncrementalCompiler
{
public class Settings
{
public DebugSymbolFileType DebugSymbolFile;
public PrebuiltOutputReuseType PrebuiltOutputReuse;
public static Settings Default = new Settings
... | ```c#
using System;
using System.IO;
using System.Reflection;
using System.Xml.Linq;
namespace IncrementalCompiler
{
public class Settings
{
public DebugSymbolFileType DebugSymbolFile;
public PrebuiltOutputReuseType PrebuiltOutputReuse;
public static Settings Default = new Settings
... |
8042ff77-a94b-48d1-b635-bf5581e57599 | {
"language": "C#"
} | ```c#
using Glimpse.Web;
using Microsoft.Framework.Logging;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Web
{
public class AgentProfiler : IRequestProfiler
{
private readonly string _requestIdKey = "RequestId";
private readonly IAgentBroker _messageBus;
public ... | ```c#
using Glimpse.Web;
using Microsoft.Framework.Logging;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Web
{
public class AgentProfiler : IRequestProfiler
{
private readonly string _requestIdKey = "RequestId";
private readonly IAgentBroker _messageBus;
public ... |
7d63fa73-6dfd-42e1-b243-48ad7913a5dd | {
"language": "C#"
} | ```c#
namespace Nancy.Demo.Hosting.Self
{
using System;
using System.Diagnostics;
using Nancy.Hosting.Self;
class Program
{
static void Main()
{
using (var nancyHost = new NancyHost(new Uri("http://localhost:8888/nancy/"), new Uri("http://127.0.0.1:8888/nanc... | ```c#
namespace Nancy.Demo.Hosting.Self
{
using System;
using System.Diagnostics;
using Nancy.Hosting.Self;
class Program
{
static void Main()
{
using (var nancyHost = new NancyHost(new Uri("http://localhost:8888/nancy/"), new Uri("http://127.0.0.1:8898/nanc... |
f0ecacf0-5f4f-4533-87cb-2315137846c3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PerfIt
{
[EventSource(Name = "PerIt!Instrumentation", Guid = "{010380F8-40A7-45C3-B87B-FD4C6CC8700A}")]
public class InstrumentationEventSource ... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PerfIt
{
[EventSource(Name = "PerfIt-Instrumentation")]
public class InstrumentationEventSource : EventSource
{
public static readon... |
8b0e56f6-628f-4343-a91a-10ae955f1658 | {
"language": "C#"
} | ```c#
@model Tipage.Web.Models.ViewModels.ShiftListViewModel
@{
ViewData["Title"] = "Shifts";
}
<h2>Shifts</h2>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.TotalTips) @Html.DisplayFor(model => model.TotalTips)</h3>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.AverageHourlyWage) @Html.Di... | ```c#
@model Tipage.Web.Models.ViewModels.ShiftListViewModel
@{
ViewData["Title"] = "Shifts";
}
<h2>Shifts</h2>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.TotalTips) @Html.DisplayFor(model => model.TotalTips)</h3>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.AverageHourlyWage) @Html.Di... |
ed6b654c-1d3a-4a99-bdd7-fa18464685dc | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
namespace Shippo {
[JsonObject (MemberSerialization.OptIn)]
public class Batch : ShippoId {
[JsonProperty (PropertyName = "object_status")]
public string ObjectStatus { get; set; }
[JsonProperty (PropertyName = "object_created")]
publi... | ```c#
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Shippo {
[JsonObject (MemberSerialization.OptIn)]
public class Batch : ShippoId {
[JsonProperty (PropertyName = "object_status")]
public string ObjectStatus { get; set; }
[JsonProperty (PropertyName ... |
6b11783a-2d45-4af9-bbd0-bdeb71843b4b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Eff.Core
{
public struct ExceptionLog
{
public string CallerMemberName;
public string CallerFilePath;
public int CallerLineNumber;
public Exceptio... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Eff.Core
{
public class ExceptionLog
{
public string CallerMemberName { get; set; }
public string CallerFilePath { get; set; }
public int CallerLineNumber... |
ba8d4df4-ae63-4bc4-a664-69e90fa39290 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Threading.Tasks;
using osu.Framework.Allocation;
namespace osu.Framework.Graphics.Containers
{
/// <summary>
... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Threading.Tasks;
using osu.Framework.Allocation;
namespace osu.Framework.Graphics.Containers
{
/// <summary>
... |
d22c9dab-c88d-456a-b0e1-b38727f67512 | {
"language": "C#"
} | ```c#
using System;
using System.Drawing;
namespace TriDevs.TriCraftClassic
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
Window window = new Window(1280, 720);
window.Run(60.0);
}
}
}
```
Remove STAThread from main function | ```c#
using System;
using System.Drawing;
namespace TriDevs.TriCraftClassic
{
class Program
{
public static void Main(string[] args)
{
Window window = new Window(1280, 720);
window.Run(60.0);
}
}
}
``` |
6cba7c3f-3396-4485-8ddf-7c2a8c11dbf5 | {
"language": "C#"
} | ```c#
using KenticoInspector.Core.Models;
using KenticoInspector.Core.Services.Interfaces;
using System;
using System.Collections.Generic;
namespace KenticoInspector.Core
{
public abstract class AbstractReport<T> : IReport, IWithMetadata<T> where T : new()
{
protected readonly IReportMetadataService r... | ```c#
using KenticoInspector.Core.Models;
using KenticoInspector.Core.Services.Interfaces;
using System;
using System.Collections.Generic;
namespace KenticoInspector.Core
{
public abstract class AbstractReport<T> : IReport, IWithMetadata<T> where T : new()
{
private ReportMetadata<T> metadata;
... |
b4179464-dfb5-4a68-8e92-78f1a7cca16c | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
namespace osu.Game.Rulesets.Mod... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
namespace osu.Game.Rulesets.Mod... |
b357f489-ca41-4b17-a4a2-9f34af2769f6 | {
"language": "C#"
} | ```c#
using System;
public static class IntegerExtensions
{
public static TimeSpan Days(this Int32 integer)
{
return TimeSpan.FromDays(integer);
}
public static TimeSpan Hours(this Int32 integer)
{
return TimeSpan.FromHours(integer);
}
public static TimeSpan Milliseconds(this Int32 integer)... | ```c#
using System;
public static class IntegerExtensions
{
private static readonly DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public static TimeSpan Days(this Int32 integer)
{
return TimeSpan.FromDays(integer);
}
public static TimeSpan Hours(this Int32 integer)
{... |
379c9957-ba57-45cd-8fa7-e1cd1d6682a0 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"F")]
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"D")]
F,
[Description(@"D")]
... |
be6b886a-bcda-4936-9e9b-d36d738c20aa | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]```
Correct version, managed by build script | ```c#
using System.Reflection;
[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyInformationalVersion("0.0.0.*")]``` |
343a0851-c6c3-40a3-a1d7-00dd028bcceb | {
"language": "C#"
} | ```c#
using System;
using System.Text;
using NHibernate.Util;
namespace NHibernate.Sql {
/// <summary>
/// An SQL <c>DELETE</c> statement
/// </summary>
public class Delete {
private string tableName;
private string[] primaryKeyColumnNames;
private string versionColumnName;
private string where;
public... | ```c#
using System;
using System.Text;
using NHibernate.Util;
namespace NHibernate.Sql {
/// <summary>
/// An SQL <c>DELETE</c> statement
/// </summary>
public class Delete {
private string tableName;
private string[] primaryKeyColumnNames;
private string versionColumnName;
private string where;
public... |
b0c908df-0c7a-483b-b3c8-167057690988 | {
"language": "C#"
} | ```c#
@using Newtonsoft.Json;
@{
string dataFile = Server.MapPath("~/App_Data/data.json");
string json = File.ReadAllText(dataFile);
var data = (IEnumerable<dynamic>)JsonConvert.DeserializeObject(json);
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>... | ```c#
@using Newtonsoft.Json;
@{
string dataFile = Server.MapPath("~/App_Data/data.json");
string json = File.ReadAllText(dataFile);
var data = (IEnumerable<dynamic>)JsonConvert.DeserializeObject(json);
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>... |
7412ed43-1965-4420-ae73-780f840e7af2 | {
"language": "C#"
} | ```c#
@using Umbraco.Web.UI.NetCore
@using Umbraco.Extensions
@using Umbraco.Web.PublishedModels
@using Umbraco.Cms.Core.Models.PublishedContent
@using Microsoft.AspNetCore.Html
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
```
Add the same to the _viewimports file for the dotnet new template | ```c#
@using Umbraco.Web.UI.NetCore
@using Umbraco.Extensions
@using Umbraco.Web.PublishedModels
@using Umbraco.Cms.Core.Models.PublishedContent
@using Microsoft.AspNetCore.Html
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Smidge
@inject Smidge.SmidgeHelper SmidgeHelper``` |
9c057ae9-c123-46bb-8fba-8de8c482c05c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dolstagis.Web.Lifecycle
{
public class LoginHandler : ILoginHandler
{
public object GetLogin(IHttpContext context)
{
return new RedirectRe... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dolstagis.Web.Lifecycle
{
public class LoginHandler : ILoginHandler
{
public string LoginUrl { get; set; }
public LoginHandler()
{
... |
6f2c8a54-feb6-4c77-9b3b-b0170ba6b72b | {
"language": "C#"
} | ```c#
using hase.DevLib.Contract.FileSystemQuery;
using hase.DevLib.Service.FileSystemQuery;
using ProtoBuf;
using System;
using System.IO.Pipes;
namespace hase.DevLib.Service
{
public class ServiceDispatcher
{
private static readonly string pipeName = nameof(FileSystemQueryService);
private N... | ```c#
using hase.DevLib.Contract.FileSystemQuery;
using hase.DevLib.Service.FileSystemQuery;
using ProtoBuf;
using System;
using System.IO.Pipes;
namespace hase.DevLib.Service
{
public class ServiceDispatcher
{
private static readonly string pipeName = nameof(FileSystemQueryService);
private N... |
a3af0f61-b414-496c-9005-9dbc56ca23d2 | {
"language": "C#"
} | ```c#
using MacroGuards;
using MacroSemver;
using MacroSln;
namespace Verbot
{
/// <summary>
/// A location where the current version can be recorded
/// </summary>
///
public class VersionLocation
{
public VersionLocation(VisualStudioProject project)
{
Guard.NotN... | ```c#
using MacroGuards;
using MacroSemver;
using MacroSln;
namespace Verbot
{
/// <summary>
/// A location where the current version can be recorded
/// </summary>
///
public class VersionLocation
{
public VersionLocation(VisualStudioProject project)
{
Guard.NotNu... |
f4d420cf-6efb-45a5-9017-5bd25590794c | {
"language": "C#"
} | ```c#
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Resources;
using System.Text;
namespace AzureFunctions.ResxConvertor
{
public class ResxConvertor
{
public void SaveResxAsTypeScriptFile(string[] resxFiles, string outputTSFilePAth)
{
var sb = ne... | ```c#
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.IO;
using System.Resources;
using System.Text;
namespace AzureFunctions.ResxConvertor
{
public class ResxConvertor
{
public void SaveResxAsTypeScriptFile(string[] resxFiles, string outputTSFilePAth)
{
... |
5f4cdd2f-d5cd-4f4e-97e2-a5b52439c7f1 | {
"language": "C#"
} | ```c#
@model EditWebhookViewModel
@using BTCPayServer.Client.Models;
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Test Webhook", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<form method="post">
<h4 ... | ```c#
@model EditWebhookViewModel
@using BTCPayServer.Client.Models;
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Send a test event to a webhook endpoint", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<form meth... |
5d711e19-6d69-4954-811a-52bf0d06e84a | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Buzzbox_Common;
using Buzzbox_Common.Encoders;
namespace Buzzbox_Stream
{
class StreamEncode
{
public bool LoopForever;
public bool ShuffleFields;
private MtgEncodeFormatEncoder _encoder;
... | ```c#
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Buzzbox_Common;
using Buzzbox_Common.Encoders;
namespace Buzzbox_Stream
{
class StreamEncode
{
public bool LoopForever;
public bool ShuffleFields;
private MtgEncodeFor... |
a4e89ff5-5c80-4311-9bbe-801e956b398e | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Mapping;
using UCDArch.Core.DomainModel;
namespace Commencement.Core.Domain
{
public class Attachment : DomainObject
{
public Attachment()
{
PublicGuid = Guid.NewGuid();
}
... | ```c#
using System;
using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Mapping;
using UCDArch.Core.DomainModel;
namespace Commencement.Core.Domain
{
public class Attachment : DomainObject
{
public Attachment()
{
PublicGuid = Guid.NewGuid();
}
... |
f711fa62-dc96-4267-915d-29be31242282 | {
"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.Game.Graphics.Sprites;
using System;
using osu.Framework.Allocation;
using osu.Game.Graphics;
namespace osu.Game.Screens.E... | ```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.Game.Graphics.Sprites;
using System;
using osu.Framework.Allocation;
using osu.Game.Graphics;
namespace osu.Game.Screens.E... |
42569069-3383-4065-bb62-1d7c60364c74 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using Microsoft.EntityFrameworkCore.Storage;
namespace osu.Game.Database
{
public class DatabaseWriteUsage : IDisposable
{
public r... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using Microsoft.EntityFrameworkCore.Storage;
namespace osu.Game.Database
{
public class DatabaseWriteUsage : IDisposable
{
public r... |
660cbf46-a2a6-4ec4-b536-51cd676dbb89 | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
using RestSharp;
namespace Rollbar {
public class RollbarPayload {
public RollbarPayload(string accessToken, RollbarData data) {
if (string.IsNullOrWhiteSpace(accessToken)) {
throw new ArgumentNullException("accessToken");
... | ```c#
using System;
using Newtonsoft.Json;
namespace Rollbar {
public class RollbarPayload {
public RollbarPayload(string accessToken, RollbarData data) {
if (string.IsNullOrWhiteSpace(accessToken)) {
throw new ArgumentNullException("accessToken");
}
if ... |
7f731d9f-e844-4b46-b5d6-b17af88557b8 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.Text;
using ReClassNET.Util;
namespace ReClassNET.MemorySearcher.Comparer
{
public class StringMemoryComparer : IMemoryComparer
{
public SearchCompareType CompareType => SearchCompareType.Equal;
public bool CaseSensitive { get; }
public Encoding Encod... | ```c#
using System;
using System.Diagnostics;
using System.Text;
using ReClassNET.Util;
namespace ReClassNET.MemorySearcher.Comparer
{
public class StringMemoryComparer : IMemoryComparer
{
public SearchCompareType CompareType => SearchCompareType.Equal;
public bool CaseSensitive { get; }
public Encoding Encod... |
a80aba14-cc40-4025-9865-6d35616e9275 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
public class UsageController : MonoBehaviour
{
private Rigidbody2D rb2d;
private UsableObjectCS collidingWith = null;
private bool startedUsing = false;
private bool stoppedUsing = false;
// Use this for initial... | ```c#
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
public class UsageController : MonoBehaviour
{
private Rigidbody2D rb2d;
private UsableObjectCS collidingWith = null;
private bool isUsing = false;
private bool startedUsing = false;
private bool stoppedUsing = f... |
4fc7524b-b2f1-479b-bec8-4397fdeefbfc | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Http.Features;
namespace Microsoft.AspNet.Http.Extensions
{
public static class ResponseExtensions
... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Http.Features;
namespace Microsoft.AspNet.Http
{
public static class ResponseExtensions
{
p... |
3825e5d4-a3f0-43bf-8c93-7037721e0f46 | {
"language": "C#"
} | ```c#
#region using
using Irony.Compiler;
using System.Collections;
using ScriptNET.Runtime;
using System;
#endregion
namespace ScriptNET.Ast
{
/// <summary>
/// ForEachStatement
/// </summary>
internal class ScriptForEachStatement : ScriptStatement
{
private Token name;
private ScriptExpr expr;
... | ```c#
#region using
using Irony.Compiler;
using System.Collections;
using ScriptNET.Runtime;
using System;
#endregion
namespace ScriptNET.Ast
{
/// <summary>
/// ForEachStatement
/// </summary>
internal class ScriptForEachStatement : ScriptStatement
{
private Token name;
private ScriptExpr expr;
... |
41744ace-f229-42bd-b3bd-ce2f06b3959a | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Linq;
namespace DotVVM.Compiler
{
public static class Program
{
private static void PrintHelp(TextWriter? writer = null)
{
var executableName = Path.GetFileNameWithoutExtension(Environment.GetCommandLineArgs()[0]);
writer... | ```c#
using System;
using System.IO;
using System.Linq;
namespace DotVVM.Compiler
{
public static class Program
{
private static void PrintHelp(TextWriter? writer = null)
{
var executableName = Path.GetFileNameWithoutExtension(Environment.GetCommandLineArgs()[0]);
writer... |
471fd016-d403-4402-9827-d6e49e5f1671 | {
"language": "C#"
} | ```c#
using NuGet.OutputWindowConsole;
using NuGetConsole;
namespace NuGet.Dialog.PackageManagerUI {
internal class SmartOutputConsoleProvider : IOutputConsoleProvider {
private readonly IOutputConsoleProvider _baseProvider;
private bool _isFirstTime = true;
public SmartOutputCo... | ```c#
using NuGet.OutputWindowConsole;
using NuGetConsole;
namespace NuGet.Dialog.PackageManagerUI {
internal class SmartOutputConsoleProvider : IOutputConsoleProvider {
private readonly IOutputConsoleProvider _baseProvider;
private bool _isFirstTime = true;
public SmartOutputCo... |
f963d42a-b0e8-490a-af40-f00bcbd4bd9d | {
"language": "C#"
} | ```c#
@section Title {Homepage}
@section Description{Chess Variants Training is a website where you can improve at chess variants.}
Homepage of Chess Variants Training.
```
Put actual content on home page | ```c#
@section Title {Homepage}
@section Description{Chess Variants Training is a website where you can improve at chess variants.}
<h1>Chess Variants Training</h1>
<p>Welcome to Chess Variants Training! Here you can improve at chess variants. We support these variants: Antichess, Atomic chess, King of the Hill, Three... |
28250ebf-0db5-4740-8e1e-92eff3926437 | {
"language": "C#"
} | ```c#
@model PackageListViewModel
@{
ViewBag.Title = String.IsNullOrWhiteSpace(Model.SearchTerm) ? "Packages" : "Packages matching " + Model.SearchTerm;
ViewBag.Tab = "Packages";
}
<div class="search">
@if (!String.IsNullOrEmpty(Model.SearchTerm))
{
<h1>Search for <i>@Model.SearchTerm</i> retu... | ```c#
@model PackageListViewModel
@{
ViewBag.Title = String.IsNullOrWhiteSpace(Model.SearchTerm) ? "Packages" : "Packages matching " + Model.SearchTerm;
ViewBag.SortText = String.IsNullOrWhiteSpace(Model.SearchTerm) ? "recent installs" : "relevance";
ViewBag.Tab = "Packages";
}
<div class="search">
@i... |
74b65375-d102-4400-8070-ea34507d25df | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Text;
using TeamCitySharp;
using TeamCitySharp.Locators;
namespace DTMF.Logic
{
public class TeamCity
{
public static bool IsRunning(StringBuilder sb, string appName)
{
//skip if not configured
if (System.Configuration.Configuration... | ```c#
using System.Linq;
using System.Text;
using TeamCitySharp;
using TeamCitySharp.Locators;
namespace DTMF.Logic
{
public class TeamCity
{
public static bool IsRunning(StringBuilder sb, string appName)
{
//remove prefix and suffixes from app names so same app can go to multiple ... |
e31f55c5-4912-473b-b667-a992112b9a80 | {
"language": "C#"
} | ```c#
using System;
using Flame.Compiler;
using LLVMSharp;
using static LLVMSharp.LLVM;
namespace Flame.LLVM.Codegen
{
/// <summary>
/// A code block implementation that returns a value from a method.
/// </summary>
public sealed class ReturnBlock : CodeBlock
{
public ReturnBlock(
... | ```c#
using System;
using Flame.Compiler;
using LLVMSharp;
using static LLVMSharp.LLVM;
namespace Flame.LLVM.Codegen
{
/// <summary>
/// A code block implementation that returns a value from a method.
/// </summary>
public sealed class ReturnBlock : CodeBlock
{
public ReturnBlock(
... |
95c5f5cb-f907-4886-8e7f-6e3184a3ba82 | {
"language": "C#"
} | ```c#
using System;
namespace ShadowsOfShadows.Items
{
public abstract class Item
{
protected String Name { get; set; }
protected String StatsString { get; set; }
public Item(String name, String stats)
{
Name = name;
StatsString = stats;
}
public ... | ```c#
using System;
namespace ShadowsOfShadows.Items
{
public abstract class Item
{
protected string Name { get; set; }
protected string StatsString { get; set; }
public Item(string name, string stats)
{
Name = name;
StatsString = stats;
... |
7c08468b-d6a0-4726-abad-76332f478821 | {
"language": "C#"
} | ```c#
#region Using
using System;
#endregion
namespace PortableExtensions
{
/// <summary>
/// Class containing some extension methods for <see cref="DateTime" />.
/// </summary>
public static partial class DateTimeEx
{
/// <summary>
/// Calculates the difference between t... | ```c#
#region Using
using System;
#endregion
namespace PortableExtensions
{
/// <summary>
/// Class containing some extension methods for <see cref="DateTime" />.
/// </summary>
public static partial class DateTimeEx
{
/// <summary>
/// Calculates the difference between t... |
166761d7-d083-433a-8a21-8c375918fdfe | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ChamberLib
{
public static class Collection
{
public static void AddRange<T>(ICollection<T> collection, IEnumerable<T> items)
{
foreach (T item in items)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ChamberLib
{
public static class Collection
{
public static void AddRange<T>(ICollection<T> collection, IEnumerable<T> items)
{
foreach (T item in items)
{
... |
019519f6-3a53-41d7-b8ab-451054fa0858 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Concurrent;
using System.Linq;
using KafkaNet.Model;
using KafkaNet.Protocol;
namespace KafkaNet
{
public class DefaultPartitionSelector : IPartitionSelector
{
private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDicti... | ```c#
using System;
using System.Collections.Concurrent;
using System.Linq;
using KafkaNet.Model;
using KafkaNet.Protocol;
namespace KafkaNet
{
public class DefaultPartitionSelector : IPartitionSelector
{
private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDicti... |
550cac2d-6fb0-4444-afd0-f7f505498b62 | {
"language": "C#"
} | ```c#
using System;
using ServiceStack;
using ServiceStack.Logging;
namespace DiscourseAutoApprove.ServiceInterface
{
public interface IServiceStackAccountClient
{
UserServiceResponse GetUserSubscription(string emailAddress);
}
public class ServiceStackAccountClient : IServiceStackAccountClie... | ```c#
using System;
using ServiceStack;
using ServiceStack.Logging;
namespace DiscourseAutoApprove.ServiceInterface
{
public interface IServiceStackAccountClient
{
UserServiceResponse GetUserSubscription(string emailAddress);
}
public class ServiceStackAccountClient : IServiceStackAccountClie... |
25c35b35-a6ec-4d00-9d51-a683b9c47012 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Angora;
namespace Producer
{
class Program
{
const int numberOfMessages = 1_000_000;
static async Task Main()
{
var factory = new ConnectionFactory
{
HostN... | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Angora;
namespace Producer
{
class Program
{
const int numberOfMessages = 1_000_000;
static async Task Main()
{
var factory = new ConnectionFactory
{
HostN... |
cbdd5660-67bc-44e5-9541-af3a55c04bf4 | {
"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;
namespace osu.Game.Rulesets.Edit
{
[Flags]
public enum SnapType
{
NearbyObjects = 0,
Grids = 1,
All = NearbyObjec... | ```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;
namespace osu.Game.Rulesets.Edit
{
[Flags]
public enum SnapType
{
None = 0,
NearbyObjects = 1 << 0,
Grids = 1 << ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.