doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
9d299331-8bf8-4650-80fd-43655bb6dbbe | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.ProjectJsonMigration
{
internal class ConstantPackageVersions
{
public const string AspNetToolsV... | ```c#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.ProjectJsonMigration
{
internal class ConstantPackageVersions
{
public const string AspNetToolsV... |
577dce08-7ff9-4546-a208-e7ab39eadecb | {
"language": "C#"
} | ```c#
using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;
namespace SampleApp
{
partial class ExampleTableViewController : UITableViewController
{
public ExampleTableViewController (IntPtr handle) : base (handle)
{
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
... | ```c#
using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;
namespace SampleApp
{
partial class ExampleTableViewController : UITableViewController
{
public ExampleTableViewController (IntPtr handle) : base (handle)
{
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
... |
9a8be5d8-8ade-42c0-9584-39993aae49ec | {
"language": "C#"
} | ```c#
using System;
using System.Resources;
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 wi... | ```c#
using System;
using System.Resources;
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 wi... |
28242400-45a3-4946-b61b-8c1de42e7eb9 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
namespace Kekiri.IoC.Autofac
{
public class AutofacFluentScenario : IoCFluentScenario
{
public AutofacFluentScenario() : base(new AutofacContainer())
{
}
}
public class AutofacFluentScenario<TContext> : IoCFluentScenario<TContext> where TContext : ... | ```c#
namespace Kekiri.IoC.Autofac
{
public class AutofacFluentScenario : IoCFluentScenario
{
public AutofacFluentScenario() : base(new AutofacContainer())
{
}
}
public class AutofacFluentScenario<TContext> : IoCFluentScenario<TContext> where TContext : new()
{
publ... |
9c20f0e7-bb59-480a-bb59-efb7d37a0d15 | {
"language": "C#"
} | ```c#
using Nancy;
using Nancy.ModelBinding;
using Schedules.API.Models;
using Simpler;
using Schedules.API.Tasks.Reminders;
namespace Schedules.API.Modules
{
public class RemindersModule : NancyModule
{
public RemindersModule ()
{
Post["/reminders/sms"] = _ => {
var createSMSReminder = Crea... | ```c#
using Nancy;
using Nancy.ModelBinding;
using Schedules.API.Models;
using Simpler;
using Schedules.API.Tasks.Reminders;
namespace Schedules.API.Modules
{
public class RemindersModule : NancyModule
{
public RemindersModule ()
{
Post["/reminders/sms"] = _ => {
var createSMSReminder = Crea... |
2f43477b-3c19-4f8a-94d9-0e342ee44608 | {
"language": "C#"
} | ```c#
// Copyright (c) 2014 Sebastien Rombauts (sebastien.rombauts@gmail.com)
//
// Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
// or copy at http://opensource.org/licenses/MIT)
using UnrealBuildTool;
public class GitSourceControl : ModuleRules
{
public GitSourceControl(TargetInfo Targ... | ```c#
// Copyright (c) 2014 Sebastien Rombauts (sebastien.rombauts@gmail.com)
//
// Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
// or copy at http://opensource.org/licenses/MIT)
using UnrealBuildTool;
public class GitSourceControl : ModuleRules
{
public GitSourceControl(TargetInfo Targ... |
e392d427-8cc3-4f75-8c5e-1ba1a0de2f70 | {
"language": "C#"
} | ```c#
@page
@model SupportManager.Web.Pages.User.ApiKeys.ListModel
@{
Layout = "/Features/Shared/_Layout.cshtml";
ViewData["Title"] = "API Keys";
}
<h2>API Keys</h2>
@if (!Model.Data.ApiKeys.Any())
{
<div class="jumbotron">
<p>
No API keys created yet.
</p>
<p>
... | ```c#
@page
@model SupportManager.Web.Pages.User.ApiKeys.ListModel
@{
Layout = "/Features/Shared/_Layout.cshtml";
ViewData["Title"] = "API Keys";
}
<h2>API Keys</h2>
@if (!Model.Data.ApiKeys.Any())
{
<div class="jumbotron">
<p>
No API keys created yet.
</p>
<p>
... |
a6828ed0-6d84-4b2f-b3be-3b5b8127e542 | {
"language": "C#"
} | ```c#
namespace Fixie.Assertions
{
using System;
using System.Collections.Generic;
public class AssertException : Exception
{
public static string FilterStackTraceAssemblyPrefix = "Fixie.Assertions.";
public AssertException(string message)
: base(message)
{
... | ```c#
namespace Fixie.Assertions
{
using System;
using System.Collections.Generic;
public class AssertException : Exception
{
public static string FilterStackTraceAssemblyPrefix = "Fixie.Assertions.";
public AssertException(string message)
: base(message)
{
... |
c2872d02-ab41-4cd8-822a-6260e55ce24a | {
"language": "C#"
} | ```c#
@model SiteOptions
<hr />
<footer>
<p>
© @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year |
<a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information">
Site Status & Uptime
</a>
| Built fr... | ```c#
@model SiteOptions
<hr />
<footer>
<p>
© @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year |
<a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information">
Site Status & Uptime
</a>
| Built fr... |
ffa4c4a6-2a48-4443-9ef2-ca91a8b8424e | {
"language": "C#"
} | ```c#
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace HackyNewsWeb
{
public class Global : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
}
... | ```c#
using System.Net;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace HackyNewsWeb
{
public class Global : HttpApplication
{
protected void Application_Start()
{
// to account for SSL error
ServicePointManager.SecurityProtocol = System.Net.... |
e070175e-7cbe-4187-9280-eccf5477c481 | {
"language": "C#"
} | ```c#
using System;
namespace LeanGoldfish
{
public class IsCharacter : ParsingUnit
{
private char character;
public IsCharacter(char character)
{
this.character = character;
}
internal override ParsingResult TryParse(string text, int position)
{
... | ```c#
using System;
namespace LeanGoldfish
{
public class IsCharacter : ParsingUnit
{
private char character;
public IsCharacter(char character)
{
this.character = character;
}
internal override ParsingResult TryParse(string text, int position)
{
... |
7d3e277e-1b7f-418f-b024-017bfacb041c | {
"language": "C#"
} | ```c#
using System;
namespace Hangman {
public class Row {
public Cell[] Cells;
public Row(Cell[] cells) {
Cells = cells;
}
public string Draw(int width) {
// return new String(' ', width - Text.Length) + Text;
return "I have many cells!";
}
}
}
```
Join up hardcoded lines ... | ```c#
using System;
namespace Hangman {
public class Row {
public Cell[] Cells;
public Row(Cell[] cells) {
Cells = cells;
}
public string Draw(int width) {
// return new String(' ', width - Text.Length) + Text;
return String.Join("\n", Lines());
}
public string[] Lines() ... |
404b95cd-ef91-41e6-83b5-1f59ca71d234 | {
"language": "C#"
} | ```c#
using SharpLLVM;
namespace SharpLang.CompilerServices
{
class DefaultABI : IABI
{
private readonly ContextRef context;
private readonly TargetDataRef targetData;
private readonly int intPtrSize;
public DefaultABI(ContextRef context, TargetDataRef targetData)
{
... | ```c#
using SharpLLVM;
namespace SharpLang.CompilerServices
{
class DefaultABI : IABI
{
private readonly ContextRef context;
private readonly TargetDataRef targetData;
private readonly int intPtrSize;
public DefaultABI(ContextRef context, TargetDataRef targetData)
{
... |
205c10ea-04c9-4eb2-b394-81a8bef8fb84 | {
"language": "C#"
} | ```c#
using Data.Mappings;
using Domain.Entities;
using System.Data.Entity;
namespace Data
{
public class DriversEdContext : DbContext
{
public DriversEdContext()
{
// Database.SetInitializer<DriversEdContext>(null);
}
public DbSet<Driver> Drivers { get; set; }
public Db... | ```c#
using Data.Mappings;
using Domain.Entities;
using System.Data.Entity;
namespace Data
{
public class DriversEdContext : DbContext
{
public DriversEdContext()
{
Database.SetInitializer<DriversEdContext>(null);
}
public DbSet<Driver> Drivers { get; set; }
public DbSet... |
1b3878b3-03c2-463d-8883-74cb8f1bccc1 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Mammoth")]
[assembly: AssemblyDescription("Convert Word documents from docx to simple HTML"... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Mammoth")]
[assembly: AssemblyDescription("Convert Word documents from docx to simple HTML"... |
8f2a8745-af84-4f2d-a8ad-0bfd9de77b0b | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Raven.Bundles.Contrib.IndexedAttachments")]
[assembly: AssemblyDescription("Plugin for RavenDB that extracts text from attachments so they can be indexed.")]
[assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.1.0")]
```
Set Indexe... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Raven.Bundles.Contrib.IndexedAttachments")]
[assembly: AssemblyDescription("Plugin for RavenDB that extracts text from attachments so they can be indexed.")]
[assembly: AssemblyVersion("2.0.2.0")]
[assembly: AssemblyFileVersion("2.0.2.0")]
``` |
1dc7a9d4-b340-4726-81bf-96faaf4e8d56 | {
"language": "C#"
} | ```c#
using StreamCompanionTypes.DataTypes;
using StreamCompanionTypes.Enums;
using StreamCompanionTypes.Interfaces;
using StreamCompanionTypes.Interfaces.Sources;
namespace PlaysReplacements
{
public class PlaysReplacements : IPlugin, ITokensSource
{
private int Plays, Retrys;
private Tokens.... | ```c#
using StreamCompanionTypes.DataTypes;
using StreamCompanionTypes.Enums;
using StreamCompanionTypes.Interfaces;
using StreamCompanionTypes.Interfaces.Sources;
namespace PlaysReplacements
{
public class PlaysReplacements : IPlugin, ITokensSource
{
private int Plays, Retries;
private Tokens... |
497ec4bc-396d-48a2-ab03-90f9c514221a | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
namespace NuGetConsole.Implementation.PowerConsole {
/// <summary>
/// Represents a host with extra info.
/// </summary>
class HostInfo : ObjectWithFactory<PowerConsoleWindow> {
Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; }
... | ```c#
using System;
using System.Diagnostics;
namespace NuGetConsole.Implementation.PowerConsole {
/// <summary>
/// Represents a host with extra info.
/// </summary>
class HostInfo : ObjectWithFactory<PowerConsoleWindow> {
Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; }
... |
83bac60f-4f9c-4c0a-b8da-e77a6eb5801b | {
"language": "C#"
} | ```c#
using System;
namespace it.unifi.dsi.stlab.networkreasoner.gas.system.terranova
{
public class VersioningInfo
{
public String VersionNumber {
get {
return "v1.0.1";
}
}
public String EngineIdentifier {
get {
return "Network Reasoner, stlab.dsi.unifi.it";
}
}
}
}
```
Advance ve... | ```c#
using System;
namespace it.unifi.dsi.stlab.networkreasoner.gas.system.terranova
{
public class VersioningInfo
{
/// <summary>
/// Gets the version number.
///
/// Here are the stack of versions with a brief description:
///
/// v1.1.0: introduce pressure regulator gadget for edges.
///
/// v... |
5b8c54fc-0d9d-4fc9-b868-b1b24b9de3e9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using UrlShortenerApi.Data;
using UrlShortenerApi.Models;
namespace UrlShortenerApi.Repositories
{
public class UrlRepository : IUrlRepository
{
ApplicationDbContext _context;
public UrlRepository(ApplicationDbContext con... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using UrlShortenerApi.Data;
using UrlShortenerApi.Models;
namespace UrlShortenerApi.Repositories
{
public class UrlRepository : IUrlRepository
{
ApplicationDbContext _context;
public UrlRepository(ApplicationDbContext con... |
bfacb81a-4d36-4626-98ea-fb48de611cb3 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Modules
{
using Objects.Basic;
using Objects.Get.Recommendations;
using Requests;
using Requests.WithOAuth.Recommendations;
using System.Threading.Tasks;
public class TraktRecommendationsModule : TraktBaseModule
{
public TraktRecommendationsModule(Trak... | ```c#
namespace TraktApiSharp.Modules
{
using Objects.Basic;
using Objects.Get.Recommendations;
using Requests;
using Requests.WithOAuth.Recommendations;
using System;
using System.Threading.Tasks;
public class TraktRecommendationsModule : TraktBaseModule
{
public TraktRecommen... |
3e2c7b37-0349-40d1-9865-d82fe776a3c2 | {
"language": "C#"
} | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
usin... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
usin... |
54a50e9d-9198-4174-a5e7-29b447dcd112 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("EVE-O Preview")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Preview")]
[assembly: AssemblyCopyright("")... | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("EVE-O Preview")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Preview")]
[assembly: AssemblyCopyright("")... |
95a5fae4-9c28-4bb9-ad6a-58f10cb0cf7f | {
"language": "C#"
} | ```c#
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
using Amazon.AWSSupport;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace SupportActions;
/// <summary>
/// Hello AWS Support example.
/// </summary>
publi... | ```c#
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
namespace SupportActions;
// snippet-start:[Support.dotnetv3.HelloSupport]
using Amazon.AWSSupport;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
public static c... |
0cda6c4d-b231-4ff2-bc8c-e6f0a4daf6b1 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using WebSharpJs.NodeJS;
//namespace <%- wsClassName %>
//{
public class Startup
{
static WebSharpJs.NodeJS.Console console;
/// <summary>
/// Default entry into managed code.
/// </summary>
/// <param name="input"></... | ```c#
using System;
using System.Threading.Tasks;
using WebSharpJs.NodeJS;
//namespace <%- wsClassName %>
//{
public class Startup
{
static WebSharpJs.NodeJS.Console console;
/// <summary>
/// Default entry into managed code.
/// </summary>
/// <param name="input"></... |
dbab61e8-8068-47d2-a930-7c102a6292f2 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Net;
using BmpListener.Bgp;
namespace BmpListener.Bmp
{
public class PeerUpNotification : BmpMessage
{
public PeerUpNotification(BmpHeader bmpHeader, ArraySegment<byte> data)
: base(bmpHeader, ref data)
{
ParseBody(dat... | ```c#
using System;
using System.Linq;
using System.Net;
using BmpListener.Bgp;
namespace BmpListener.Bmp
{
public class PeerUpNotification : BmpMessage
{
public PeerUpNotification(BmpHeader bmpHeader, ArraySegment<byte> data)
: base(bmpHeader, ref data)
{
ParseBody(dat... |
6f73488c-f740-4cf5-a6d9-30f53f3ffe65 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Net.NetworkInformation;
using System.Net.Sockets;
namespace Healthcheck
{
internal class Program
{
private static void Main(string[] args)
{
var client = new HttpClient();
var port = Environment.Ge... | ```c#
using System;
using System.Net.Http;
using System.Net.NetworkInformation;
using System.Net.Sockets;
namespace Healthcheck
{
internal class Program
{
private static void Main(string[] args)
{
var client = new HttpClient();
var port = Environment.GetEnvironmentVari... |
bdb93e90-6301-4017-a76c-656759af32b9 | {
"language": "C#"
} | ```c#
using System;
using System.Web.Mvc;
namespace AspNetBrowserLocale.Core
{
public static class HtmlHelpers
{
public static MvcHtmlString InitializeLocaleDateTime(this HtmlHelper htmlHelper)
{
return MvcHtmlString.Create(
@"<script>
var elements = document.querySelectorAll('... | ```c#
using System;
using System.Web.Mvc;
namespace AspNetBrowserLocale.Core
{
public static class HtmlHelpers
{
private const string NullValueDisplay = "—";
public static MvcHtmlString InitializeLocaleDateTime(this HtmlHelper htmlHelper)
{
return MvcHtmlString.Creat... |
a69ec71b-7c42-4895-a38c-c755190bf477 | {
"language": "C#"
} | ```c#
namespace Bakery.Text
{
using System;
public static class StringRemoveExtensions
{
public static String Remove(this String @string, String @remove)
{
return @string.Replace(@remove, String.Empty);
}
}
}
```
Remove unnecessary "@" prefix from method argument variable name. | ```c#
namespace Bakery.Text
{
using System;
public static class StringRemoveExtensions
{
public static String Remove(this String @string, String remove)
{
if (remove == null)
throw new ArgumentNullException(nameof(remove));
return @string.Replace(remove, String.Empty);
}
}
}
``` |
3b0ab0e5-0d0e-4ac6-9ace-40b6fee3c895 | {
"language": "C#"
} | ```c#
using Main;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DemoTrader
{
public class StdTraders : Trader {
public StdTraders()
: base() {
}
public override string Name {
get { retu... | ```c#
using Main;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DemoTrader
{
public class StdTraders : Trader {
public StdTraders()
: base() {
}
public override string Name {
get { retu... |
371db516-dd39-4cfc-8afb-bfcc0765d1b9 | {
"language": "C#"
} | ```c#
using System;
using Skylight.Miscellaneous;
namespace Skylight
{
public class InputCodeForRoom
{
private readonly Out _out;
public InputCodeForRoom(Out @out)
{
_out = @out;
}
/// <summary>
/// Inputs the edit key.
/// </summary>
... | ```c#
using System;
using Skylight.Miscellaneous;
namespace Skylight
{
public class InputCodeForRoom
{
private readonly Out _out;
public InputCodeForRoom(Out @out)
{
_out = @out;
}
/// <summary>
/// Inputs the edit key.
/// </summary>
... |
5c910ec2-4332-4314-97dd-9470f39f78c1 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace SikuliSharp
{
public static class Sikuli
{
public static ISikuliSession CreateSession()
{
return new SikuliSession(CreateRuntime());
}
public static SikuliRuntime CreateRuntime()
{
return new SikuliRuntime(
new AsyncDuplexStreamsHandlerFactory(),
... | ```c#
using System;
using System.IO;
namespace SikuliSharp
{
public static class Sikuli
{
public static ISikuliSession CreateSession()
{
return new SikuliSession(CreateRuntime());
}
public static SikuliRuntime CreateRuntime()
{
return new SikuliRuntime(
new AsyncDuplexStreamsHandlerFactory(),
... |
e2b16551-9bee-4393-8bee-55db1ce93fd8 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
namespace Elliptic.Tests
{
[Explicit]
[TestFixture]
public class Curve25519TimingTests
{
[Test]
public void Curve25519_GetPublicKey()
{
var millis = new List<... | ```c#
using NUnit.Framework;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
namespace Elliptic.Tests
{
[Explicit]
[TestFixture]
public class Curve25519TimingTests
{
[Test]
public void Curve25519_GetPublicKey()
{
var millis = new List<... |
585d1634-7ed9-4d43-b485-2a9cda5a42b0 | {
"language": "C#"
} | ```c#
/*
* John Hall <john.hall@xjtag.com>
* Copyright (c) Midas Yellow Ltd. All rights reserved.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CvsGitConverter
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 1)
... | ```c#
/*
* John Hall <john.hall@xjtag.com>
* Copyright (c) Midas Yellow Ltd. All rights reserved.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CvsGitConverter
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 1)
... |
a37198f5-1e93-4859-860d-cd6b1409d9c4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Net;
using RestSharp;
using Dapper;
using DapperExtensions;
using WPMGMT.BESScraper.Model;
namespace WPMGMT.BESScraper
{
class Program
{
static void Main(string[] args)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Net;
using RestSharp;
using Dapper;
using DapperExtensions;
using WPMGMT.BESScraper.Model;
namespace WPMGMT.BESScraper
{
class Program
{
static void Main(string[] args)
{
... |
d8671171-6b91-4463-a911-0722b2df1a92 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.ServiceProcess;
namespace PolymeliaDeployAgent
{
using PolymeliaDeploy;
using PolymeliaDeploy.Controller;
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void M... | ```c#
using System;
using System.Linq;
using System.ServiceProcess;
namespace PolymeliaDeployAgent
{
using PolymeliaDeploy;
using PolymeliaDeploy.Controller;
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void M... |
60fa2bb4-f8a4-4b63-97f2-63573d88febd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SassSharp.Ast
{
public class FluentAstBuilder
{
private IList<Node> nodes;
public FluentAstBuilder()
{
nodes = new List<Node>();
}
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SassSharp.Ast
{
public class FluentAstBuilder
{
private IList<Node> nodes;
public FluentAstBuilder()
{
nodes = new List<Node>();
}
... |
3d91476e-fb77-4a23-956a-0af1b3f4b130 | {
"language": "C#"
} | ```c#
#if DESKTOP
using System;
using System.Collections.ObjectModel;
namespace Eto.Forms
{
public interface IMenuItem : IMenu
{
}
public enum MenuItemType
{
Check,
Image,
Radio,
Separator,
}
public abstract class MenuItem : BaseAction
{
protected MenuItem (Generator g, Type type, bool initialize =... | ```c#
#if DESKTOP
using System;
using System.Collections.ObjectModel;
namespace Eto.Forms
{
public interface IMenuItem : IMenu
{
}
public abstract class MenuItem : BaseAction
{
protected MenuItem (Generator g, Type type, bool initialize = true)
: base(g, type, initialize)
{
}
}
public class MenuItem... |
728f1b52-7dd8-4f82-b8f3-e35177acf769 | {
"language": "C#"
} | ```c#
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Threading;
using System.Threading.Tasks;
using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
using OmniSharp.Extensions.DebugAdapter.Prot... | ```c#
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Threading;
using System.Threading.Tasks;
using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
using OmniSharp.Extensions.DebugAdapter.Prot... |
ac89ecb9-e172-43b1-9df0-031f767a5c5c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Core.CrossDomainImagesWeb
{
public partial class Default : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Core.CrossDomainImagesWeb
{
public partial class Default : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
... |
4f1eaea9-15af-40b9-be8a-ed0d5728ec08 | {
"language": "C#"
} | ```c#
using System;
namespace Villermen.RuneScapeCacheTools.Extensions
{
public static class PathExtensions
{
public static char[] InvalidCharacters = { '/', ':', '"', '*', '?', '>', '<', '|' };
/// <summary>
/// Parses the given directory and unifies its format, to be applied to ... | ```c#
using System;
namespace Villermen.RuneScapeCacheTools.Extensions
{
public static class PathExtensions
{
public static char[] InvalidCharacters = { '/', ':', '"', '*', '?', '>', '<', '|', '\0' };
/// <summary>
/// Parses the given directory and unifies its format, to be appli... |
65868351-0f01-487c-9c34-757b37847c17 | {
"language": "C#"
} | ```c#
using System;
using Ninject;
using Ninject.Extensions.Logging;
using Ninject.Extensions.Logging.NLog4;
using OpenAOE.Engine;
namespace OpenAOE
{
class Program
{
static void Main(string[] args)
{
var context = new StandardKernel(
new NinjectSettings()
... | ```c#
using System;
using System.Collections.Generic;
using Ninject;
using Ninject.Extensions.Logging;
using Ninject.Extensions.Logging.NLog4;
using OpenAOE.Engine;
using OpenAOE.Engine.Entity;
namespace OpenAOE
{
class Program
{
static void Main(string[] args)
{
var context = new ... |
2a7eda74-6a68-4f5d-9c56-ce13da464c4c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
namespace Tellurium.MvcPages.WebPages
{
public class WebTableRow : WebElementCollection<PageFragment>
{
private readonly IWebElement webElement;
private Dictionary<string, int> columnsMap;... | ```c#
using System;
using System.Collections.Generic;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
namespace Tellurium.MvcPages.WebPages
{
public class WebTableRow : WebElementCollection<PageFragment>
{
private readonly IWebElement webElement;
private Dictionary<string, int> columnsMap;... |
eada1d0d-6ba4-48cf-82a0-30ccb9eda01b | {
"language": "C#"
} | ```c#
namespace SpiderCrab.Agent
{
using Ninject;
using Ninject.Web.Common.OwinHost;
using Ninject.Web.WebApi.OwinHost;
using Owin;
using Properties;
using System.Reflection;
using System.Web.Http;
public class Startup
{
public void Configuration(IAppBuilder app... | ```c#
namespace SpiderCrab.Agent
{
using Newtonsoft.Json.Serialization;
using Ninject;
using Ninject.Web.Common.OwinHost;
using Ninject.Web.WebApi.OwinHost;
using Owin;
using Properties;
using System;
using System.Net;
using System.Reflection;
using System.Web.Http;
... |
49aa20db-a3a1-49d3-9b7b-a165b1cc5a2a | {
"language": "C#"
} | ```c#
using Certify.Locales;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace Certify.UI.Utils
{
public class UpdateCheckUtils
{
public async Task<Models.UpdateCheck> UpdateWithDownload()
{
Mouse.OverrideCursor = Cursors.Wait;
va... | ```c#
using Certify.Locales;
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace Certify.UI.Utils
{
public class UpdateCheckUtils
{
public async Task<Models.UpdateCheck> UpdateWithDownload()
{
Mouse.OverrideCursor = Cursors.Wait;
... |
0c69afeb-adb7-4a0a-99e3-f183465bfc9a | {
"language": "C#"
} | ```c#
using System;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.StaticFiles;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Logging;
using Newtonsoft.Json;
namespace DocNuget {
public class Startup {
public void ConfigureServices(IServiceColl... | ```c#
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.StaticFiles;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Logging;
using Newtonsoft.Json;
namespace DocNuget {
public class Startup {
public void ConfigureServices(IServiceCollection servic... |
87dafa9d-19d3-4835-88a7-31c50c0de10a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Voxels.SkiaSharp;
namespace Voxels.CommandLine {
class Program {
static void Main(string[] args) {
var filename = args.Length == 1 ? args[0] : "monu9.vox"; //... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Voxels.SkiaSharp;
namespace Voxels.CommandLine {
class Program {
static void Main(string[] args) {
var filename = args.Length == 1 ? args[0] : "3x3x3.vox";
... |
6d7ce798-ebf1-4f37-9936-79a67c140c97 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Dbus
{
public class ReceivedMessage : IDisposable
{
private readonly MessageHeader messageHeader;
public ReceivedMessage(
MessageHeader messageHeader,
Decoder decoder
)
... | ```c#
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Dbus
{
public class ReceivedMessage : IDisposable
{
private readonly MessageHeader messageHeader;
public ReceivedMessage(
MessageHeader messageHeader,
Decoder decoder
)
... |
587b4878-db19-410e-a9ae-a5651c1628b2 | {
"language": "C#"
} | ```c#
using System;
using Tamir.SharpSsh;
namespace MCloud {
public class ScriptDeployment : SSHDeployment {
public ScriptDeployment (string local_path) : this (local_path, String.Concat ("/root/", local_path))
{
}
public ScriptDeployment (string local_path, string remote_path)
{
LocalScriptPath = ... | ```c#
using System;
using Tamir.SharpSsh;
namespace MCloud {
public class ScriptDeployment : PutFileDeployment {
public ScriptDeployment (string local) : base (local)
{
}
public ScriptDeployment (string local, string remote_dir) : base (local, remote_dir)
{
}
protected override void RunImpl (Node... |
d2725353-d812-419b-b61a-7a38352a0e8f | {
"language": "C#"
} | ```c#
using UnityEngine;
[CreateAssetMenu (menuName = "AI/Decisions/TargetReached")]
public class Decision_OnTargetReached : Decision {
public bool overrideDistanceToReach;
public float distanceToReach;
public override bool Decide(StateController controller) {
return isTargetReached(controller);
}
private ... | ```c#
using UnityEngine;
[CreateAssetMenu (menuName = "AI/Decisions/TargetReached")]
public class Decision_OnTargetReached : Decision {
public bool overrideDistanceToReach;
public float distanceToReach;
public override bool Decide(StateController controller) {
return isTargetReached(controller);
}
private ... |
eee3c499-0841-4553-bed7-709bdceceea6 | {
"language": "C#"
} | ```c#
using System.Linq;
using Thinktecture.IdentityServer.Core.Services.Contrib;
using Xunit;
namespace Unittests
{
public class AvailableTranslations
{
[Theory]
[InlineData("Default")]
[InlineData("pirate")]
[InlineData("nb-NO")]
[InlineData("tr-TR")]
[InlineDa... | ```c#
using System.Linq;
using Thinktecture.IdentityServer.Core.Services.Contrib;
using Xunit;
namespace Unittests
{
public class AvailableTranslations
{
[Theory]
[InlineData("Default")]
[InlineData("pirate")]
[InlineData("nb-NO")]
[InlineData("tr-TR")]
[InlineDa... |
6fedd9c0-ea59-4d84-a11e-a6836991421e | {
"language": "C#"
} | ```c#
using ExRam.Gremlinq.Core.Serialization;
using ExRam.Gremlinq.Providers;
using LanguageExt;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace ExRam.Gremlinq.Core
{
public static class GremlinQueryExecutionPipelineBuilder
{
public static IGremlinQueryExecutionPipelineBuilderWithSeriali... | ```c#
using ExRam.Gremlinq.Core.Serialization;
using ExRam.Gremlinq.Providers;
using LanguageExt;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace ExRam.Gremlinq.Core
{
public static class GremlinQueryExecutionPipelineBuilder
{
public static IGremlinQueryExecutionPipelineBuilderWithSeriali... |
7c396914-e491-4ac4-b8cd-450e067cf704 | {
"language": "C#"
} | ```c#
using System.IO;
namespace TestUtility
{
public static class StringExtensions
{
/// <summary>
/// Given a file or directory path, return a path where all directory separators
/// are replaced with a forward slash (/) character.
/// </summary>
public static string ... | ```c#
using System.IO;
namespace TestUtility
{
public static class StringExtensions
{
/// <summary>
/// Given a file or directory path, return a path where all directory separators
/// are replaced with a forward slash (/) character.
/// </summary>
public static string ... |
e6583708-25d2-4ae5-ab97-d1043db36ac0 | {
"language": "C#"
} | ```c#
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
namespace StyleCop.Analyzers.Test.CSharp7.SpacingRules
{
using Test.SpacingRules;
public class SA1024CSharp7UnitTests : SA10... | ```c#
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
namespace StyleCop.Analyzers.Test.CSharp7.SpacingRules
{
using System;
using System.Linq;
using System.Reflection;
us... |
0e04a65d-1b09-4b91-8e61-6a04917137c3 | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyCompany("Kentor")]
[assembly: AssemblyCopyright("Copyright Kentor and contributors 2015")]
// Kentor.AuthServices uses semantic versioning in three parts
//
// Major Version
// Minor Version
// Patch Number
//
// An odd patch number is a development ... | ```c#
using System.Reflection;
[assembly: AssemblyCompany("Kentor")]
[assembly: AssemblyCopyright("Copyright Kentor and contributors 2015")]
// Kentor.PU-Adapter uses semantic versioning in three parts
//
// Major Version
// Minor Version
// Patch Number
//
// An odd patch number is a development ve... |
2abc127b-3394-4374-b4e2-92e5a6e3a6de | {
"language": "C#"
} | ```c#
// Copyright 2019 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.OutputSinks;
namespace Nuke.Common.CI.AppVeyor
{
[Used... | ```c#
// Copyright 2019 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.OutputSinks;
namespace Nuke.Common.CI.AppVeyor
{
[Used... |
579d7563-fff5-478b-9342-c8de0d1510d8 | {
"language": "C#"
} | ```c#
using MonoMac.Foundation;
using MonoMac.AppKit;
using Cirrious.CrossCore;
using Cirrious.MvvmCross.Mac.Platform;
using Cirrious.MvvmCross.Mac.Views.Presenters;
using Cirrious.MvvmCross.ViewModels;
using System.Drawing;
namespace Pina.Mac
{
public partial class AppDelegate : MvxApplicationDelegate
{
MainWindo... | ```c#
using MonoMac.Foundation;
using MonoMac.AppKit;
using Cirrious.CrossCore;
using Cirrious.MvvmCross.Mac.Platform;
using Cirrious.MvvmCross.Mac.Views.Presenters;
using Cirrious.MvvmCross.ViewModels;
using System.Drawing;
namespace Pina.Mac
{
public partial class AppDelegate : MvxApplicationDelegate
{
MainWindo... |
1190eb60-29ec-4e5e-8914-9337eb91b7de | {
"language": "C#"
} | ```c#
namespace VkApiGenerator.Console
{
class Program
{
static void Main(string[] args)
{
var methods = new[]
{
"notes.get",
"notes.getById",
"notes.getFriendsNotes",
"notes.add",
"notes.edi... | ```c#
using System.Net;
using VkApiGenerator.Model;
namespace VkApiGenerator.Console
{
class Program
{
static void Main(string[] args)
{
var methods = new[]
{
"notes.get",
"notes.getById",
"notes.getFriendsNotes",
... |
24e75b82-2c8e-49ae-bba6-bde7dd453039 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using ActionEngine;
public static class VeryAwesomeAEX {
public static ActionBase Create (IAEScriptContext ctx) {
var simpleAEX = ctx.GetAEScript("$simple");
var cube = ctx.GetTransform("$cube");
var sphere = ctx.GetTransform("$sphere");
return
AE.Sequ... | ```c#
using ActionEngine;
using System.Collections;
using UnityEngine;
public static class VeryAwesomeAEX {
public static ActionBase Create (IAEScriptContext ctx) {
var simpleAEX = ctx.GetAEScript("$simple");
var cube = ctx.GetTransform("$cube");
var sphere = ctx.GetTransform("$sphere");
return
AE.Seque... |
7a31a61a-db4b-44da-995e-b669b9a6eea8 | {
"language": "C#"
} | ```c#
namespace slang.Lexing.Rules.Core
{
public abstract class Rule
{
public static Rule operator | (Rule left, Rule right)
{
return new Or (left, right);
}
public static Rule operator + (Rule left, Rule right)
{
return new And (left, right);
... | ```c#
using slang.Lexing.Tokens;
using System;
namespace slang.Lexing.Rules.Core
{
public abstract class Rule
{
public Func<Token> TokenCreator { get; set; }
public static Rule operator | (Rule left, Rule right)
{
return new Or (left, right);
}
public stati... |
584253a2-02d2-4a1e-bd1d-5f864949bdf3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace TodoList.Web
{
public class Startup
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using System.IO;
namespace TodoList.Web
{
public class Star... |
b8500910-ab1c-4ce8-a8cf-5b8d54305216 | {
"language": "C#"
} | ```c#
namespace Espera.Network
{
public enum NetworkPlaybackState
{
None,
Playing,
Paused,
Stopped,
Finished
}
}```
Mark the playback states with integer values | ```c#
namespace Espera.Network
{
public enum NetworkPlaybackState
{
None = 0,
Playing = 1,
Paused = 2,
Stopped = 3,
Finished = 4
}
}``` |
6025a265-ecce-4d90-92a3-581fb5f26d18 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using System;
using System.Collections.Generic;
namespace NHibernate.Test.NHSpecificTest.NH1119
{
[TestFixture]
public class Fixture : BugTestCase
{
public override string BugNumber
{
get { return "NH1119"; }
}
[Test]
public void SelectMinFromEmptyTable()
... | ```c#
using System;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH1119
{
[TestFixture]
public class Fixture : BugTestCase
{
public override string BugNumber
{
get { return "NH1119"; }
}
[Test]
public void SelectMinFromEmptyTable()
{
using (ISession s = OpenSess... |
c466bbbd-7afd-41fa-a03f-7124d92392f7 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using static Hellang.Middleware.ProblemDetails.ProblemDetailsOptionsSetup;
using MvcProblemDetails = Microsoft.AspNetCore.Mvc.ProblemDetails;
using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory;
nam... | ```c#
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using static Hellang.Middleware.ProblemDetails.ProblemDetailsOptionsSetup;
using MvcProblemDetails = Microsoft.AspNetCore.Mvc.ProblemDetails;
using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory;
nam... |
9ec6a5b6-e230-4733-b096-04039a91fcee | {
"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 UIKit;
namespace osu.Framework.Tests.iOS
{
public class Application
{
// This is the main entry point of the application.
public sta... | ```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 UIKit;
namespace osu.Framework.Tests.iOS
{
public class Application
{
// This is the main entry point of the application.
public sta... |
8353aed5-b4c8-4a72-9d23-e5c56213b1b3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
public class ConfigFileFinder
{
public static List<string> FindWeaverConfigs(string solutionDirectoryPath, string projectDirectory)
{
var files = new List<string>();
var solutionConfigFilePath = Path.Combine(solutionDirecto... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
public class ConfigFileFinder
{
public static List<string> FindWeaverConfigs(string solutionDirectoryPath, string projectDirectory)
{
var files = new List<string>();
var solutionConfigFilePath = Path.Combine(solutionDirecto... |
4e6a0a35-855c-4599-b99c-adde6bb5c0c3 | {
"language": "C#"
} | ```c#
namespace Linterhub.Cli.Strategy
{
using Runtime;
using Engine;
using Linterhub.Engine.Exceptions;
public class LinterVersionStrategy : IStrategy
{
public object Run(RunContext context, LinterFactory factory, LogManager log)
{
if (string.IsNullOrEmpty(context.Linte... | ```c#
namespace Linterhub.Cli.Strategy
{
using Runtime;
using Engine;
using Linterhub.Engine.Exceptions;
using Newtonsoft.Json;
using System.Dynamic;
public class LinterVersionStrategy : IStrategy
{
public object Run(RunContext context, LinterFactory factory, LogManager log)
... |
615c06bd-f7d4-48b8-8c31-4f795e5992fc | {
"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... |
901ec0a8-108f-4330-b7f6-a1a9460e6904 | {
"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 System;
using osu.Framework.Platform;
using osu.Framework.Testing;
namespace osu.Game.Tests.Visual
{
public abstract class OsuTestCase : TestC... | ```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 System;
using osu.Framework.Platform;
using osu.Framework.Testing;
namespace osu.Game.Tests.Visual
{
public abstract class OsuTestCase : TestC... |
85425f9c-4f78-499d-b3f3-4019a21318b7 | {
"language": "C#"
} | ```c#
using System;
namespace LunaClient.Extensions
{
public static class CelestialBodyExtension
{
public static double SiderealDayLength(this CelestialBody body)
{
//Taken from CelestialBody.Start()
if (body == null) return 0;
var siderealOrbitalPeriod = ... | ```c#
using System;
namespace LunaClient.Extensions
{
public static class CelestialBodyExtension
{
public static double SiderealDayLength(this CelestialBody body)
{
//Taken from CelestialBody.Start()
//body.solarRotationPeriod will be false if it's the sun!
... |
a67f656b-6c71-40cb-9666-244eb3fe48e6 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Web;
using VORBS.Utils.interfaces;
namespace VORBS.Utils
{
public class StubbedEmailClient : ISmtpClient
{
private NLog.Logger _logger;
public Stubb... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Web;
using VORBS.Utils.interfaces;
namespace VORBS.Utils
{
public class StubbedEmailClient : ISmtpClient
{
private NLog.Logger _logger;
public Stubb... |
7e929279-9334-4f89-b795-4709b3d8de53 | {
"language": "C#"
} | ```c#
@using CkanDotNet.Web.Models.Helpers
<!-- AddThis Button BEGIN -->
<div class="share-buttons">
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthi... | ```c#
@using CkanDotNet.Web.Models.Helpers
<!-- AddThis Button BEGIN -->
<div class="share-buttons">
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthi... |
6c1fd74d-8ab1-4afe-8fb0-c9b8dffd7795 | {
"language": "C#"
} | ```c#
/* © 2019 Ivan Pointer
MIT License: https://github.com/ivanpointer/NuLog/blob/master/LICENSE
Source on GitHub: https://github.com/ivanpointer/NuLog */
using NuLog.Configuration;
using NuLog.LogEvents;
using System;
namespace NuLog.CLI.Benchmarking {
/// <summary>
/// A dummy target for performance tes... | ```c#
/* © 2019 Ivan Pointer
MIT License: https://github.com/ivanpointer/NuLog/blob/master/LICENSE
Source on GitHub: https://github.com/ivanpointer/NuLog */
using NuLog.Configuration;
using NuLog.LogEvents;
using System;
namespace NuLog.CLI.Benchmarking {
/// <summary>
/// A dummy target for performance tes... |
bc096f42-cd9f-4597-9c4a-e6410ef3f2b6 | {
"language": "C#"
} | ```c#
#region Usings
using System;
using System.Collections.Generic;
using System.Windows.Input;
using ReactiveUI.Legacy;
using UI.WPF.Launcher.Common.Classes;
#endregion
namespace UI.WPF.Modules.Installation.ViewModels.Installation
{
public class InstallationViewModel : ReactiveObjectBase
{
private... | ```c#
#region Usings
using System;
using System.Collections.Generic;
using System.Windows.Input;
using ReactiveUI;
using UI.WPF.Launcher.Common.Classes;
#endregion
namespace UI.WPF.Modules.Installation.ViewModels.Installation
{
public class InstallationViewModel : ReactiveObjectBase
{
private Instal... |
75fb53dc-d114-4e34-a72c-0fd6fc2f936d | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using Alensia.Core.Common;
using UnityEngine;
namespace Alensia.Core.UI.Cursor
{
public class CursorSet : ScriptableObject, IDirectory<CursorDefinition>, IEditorSettings
{
protected IDictionary<string, CursorDefinition> CursorMap
{
... | ```c#
using System.Collections.Generic;
using System.Linq;
using Alensia.Core.Common;
using UnityEngine;
namespace Alensia.Core.UI.Cursor
{
public class CursorSet : ScriptableObject, INamed, IDirectory<CursorDefinition>, IEditorSettings
{
public string Name => name;
protected IDictionary<strin... |
bd757816-17c8-4f4f-9e31-4b41ec3f5e89 | {
"language": "C#"
} | ```c#
using System;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace GUI.Utils
{
internal class ConsoleTab
{
internal class MyLogger : TextWriter
{
private TextBox control;
public MyLogger(TextBox control)
{
... | ```c#
using System;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace GUI.Utils
{
internal class ConsoleTab
{
internal class MyLogger : TextWriter
{
private TextBox control;
public MyLogger(TextBox control)
{
... |
d06bf80d-32b6-4c34-9ce5-8401d1a97e4e | {
"language": "C#"
} | ```c#
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
#pragma warning disable 4014
namespace ControlCatalog.Pages
{
public class DialogsPage : UserControl
{
public DialogsPage()
{
this.InitializeComponent();
this.FindControl<Button>("OpenFile").Click += delegate
... | ```c#
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
#pragma warning disable 4014
namespace ControlCatalog.Pages
{
public class DialogsPage : UserControl
{
public DialogsPage()
{
this.InitializeComponent();
this.FindControl<Button>("OpenFile").Click += delegate
... |
6752b366-dace-430f-bd39-e2c54086325a | {
"language": "C#"
} | ```c#
namespace ShoutLib
{
internal class Constants
{
public const string ProjectId = "YOUR-PROJECT-ID";
public const string ServiceAccountEmail = "YOUR-SERVICE-ACCOUNT@developer.gserviceaccount.com";
public const string ServiceAccountP12KeyPath = @"C:\PATH\TO\YOUR\FILE.p12";
... | ```c#
// Copyright 2015 Google Inc. 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 require... |
91695cb9-956b-4d7e-a97e-e10623d8c2db | {
"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.Localisation;
using osu.Game.Online.API.Requests;
using osu.Game.Overlays.Profile.Sections.Beatmaps;
using osu.Game.Resources.Localisation.Web;... | ```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.Localisation;
using osu.Game.Online.API.Requests;
using osu.Game.Overlays.Profile.Sections.Beatmaps;
using osu.Game.Resources.Localisation.Web;... |
6ebcdccd-85fd-4b24-933e-dfbb7970c39d | {
"language": "C#"
} | ```c#
using CertiPay.Common.Logging;
using System;
using System.Threading.Tasks;
using Twilio;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Send an SMS message to the given recipient.
/// </summary>
/// <remarks>
/// Implementation may be sent into background processing.
/// </r... | ```c#
using CertiPay.Common.Logging;
using System;
using System.Threading.Tasks;
using Twilio;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Send an SMS message to the given recipient.
/// </summary>
/// <remarks>
/// Implementation may be sent into background processing.
/// </r... |
539efb72-9370-48ac-937b-6e2d272066ab | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IPOCS_Programmer.ObjectTypes
{
public class GenericInput : BasicObject
{
public override byte objectTypeId { get { return 11; } }
public byte inputPin { get; set... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IPOCS_Programmer.ObjectTypes
{
public class GenericInput : BasicObject
{
public override byte objectTypeId { get { return 11; } }
public byte inputPin { get; set... |
a162c045-b151-41f0-9dd5-7b4b572ff7a8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using System.IO;
namespace ParkingSpace.Facts.Sample {
public class SampleFileFacts {
public static IEnumerable<object[]> getFilesFromCurrentFolder() {
var di = new Dire... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using System.IO;
namespace ParkingSpace.Facts.Sample {
public class SampleFileFacts {
public static IEnumerable<object[]> getFilesFromCurrentFolder() {
var di = new Dire... |
2b1f6844-bae9-4c35-8bcb-b549f0c2d5a5 | {
"language": "C#"
} | ```c#
using ReactiveMarrow;
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
namespace Espera.Core
{
internal static class ReactiveHelpers
{
/// <summary>
/// Takes the left observable and combines it with the latest value of the right observable.
/// This m... | ```c#
using ReactiveMarrow;
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
namespace Espera.Core
{
internal static class ReactiveHelpers
{
/// <summary>
/// Takes the left observable and combines it with the latest value of the right observable.
/// This m... |
4531ff80-4d3b-4606-85ba-09f4be53ce4f | {
"language": "C#"
} | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestUsefullFunctions
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Assert.IsTrue(true);
}
}
}```
Add license to new unit test class file | ```c#
/*
The MIT License(MIT)
Copyright(c) 2015 Freddy Juhel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merg... |
1b5f2ffb-c130-4119-ace0-23df40169fe4 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Linq;
using Mitternacht.Common.Collections;
using Newtonsoft.Json;
using NLog;
namespace Mitternacht.Resources
{
public class CommandStrings
{
private static readonly Logger Log;
private const string CmdStringPath = @"./_strings/commandstrings.... | ```c#
using System;
using System.IO;
using System.Linq;
using Mitternacht.Common.Collections;
using Newtonsoft.Json;
using NLog;
namespace Mitternacht.Resources
{
public class CommandStrings
{
private static readonly Logger Log;
private const string CmdStringPath = @"./_strings/com... |
e0cbd213-9ffb-40c9-85a5-61bb8c0c33d6 | {
"language": "C#"
} | ```c#
using Serenity.ComponentModel;
using Serenity.Data;
using System;
using System.ComponentModel;
using System.Reflection;
namespace Serenity.PropertyGrid
{
public partial class LocalizablePropertyProcessor : PropertyProcessor
{
private ILocalizationRowHandler localizationRowHandler;
... | ```c#
using Serenity.ComponentModel;
using Serenity.Data;
using System;
using System.ComponentModel;
using System.Reflection;
namespace Serenity.PropertyGrid
{
public partial class LocalizablePropertyProcessor : PropertyProcessor
{
private ILocalizationRowHandler localizationRowHandler;
... |
f0574478-1dde-4ab5-bbcb-afba56283884 | {
"language": "C#"
} | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RohlikAPI;
namespace RohlikAPITests
{
[TestClass]
public class PersistentSessionHttpClientTests
{
[TestMethod]
public void GetTest()
{
const string testCookieName = "testCookieName";
const strin... | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RohlikAPI;
namespace RohlikAPITests
{
[TestClass]
public class PersistentSessionHttpClientTests
{
[TestMethod]
public void HTTPGet_PersistsCookies()
{
const string testCookieName = "testCookieName";
... |
c503d144-9b1c-41d4-be7f-7086bccfaf24 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
namespace MQTTnet.Extensions
{
public static class UserPropertyExtension
{
public static string GetUserProperty(this MqttApplicationMessage message, string propertyName, StringComparison comparisonType = StringComparison.OrdinalIgnoreCase)
{
re... | ```c#
using System;
using System.Linq;
namespace MQTTnet.Extensions
{
public static class UserPropertyExtension
{
public static string GetUserProperty(this MqttApplicationMessage message, string propertyName, StringComparison comparisonType = StringComparison.OrdinalIgnoreCase)
{
if... |
feb8a4c5-d3dc-4319-9fc9-edde0d7846c8 | {
"language": "C#"
} | ```c#
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
using System;
using System.Linq;
using Microsoft.WindowsAzure.MobileServices.Test.Function... | ```c#
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
using System;
using System.Linq;
using Microsoft.WindowsAzure.MobileServices.Test.Function... |
6061ec6f-e35f-47db-8e90-a59aa12fe798 | {
"language": "C#"
} | ```c#
// Copyright (c) 2013 Blue Onion Software - All rights reserved
using System.Windows.Documents;
using System.Windows.Input;
using tweetz5.Model;
namespace tweetz5.Controls
{
public partial class Timeline
{
public TimelineController Controller { get; private set; }
public Ti... | ```c#
// Copyright (c) 2013 Blue Onion Software - All rights reserved
using System.Windows;
using System.Windows.Input;
using tweetz5.Model;
namespace tweetz5.Controls
{
public partial class Timeline
{
public TimelineController Controller { get; private set; }
public Timeline()
... |
81d5be72-109d-47ff-a7b4-97e485621e44 | {
"language": "C#"
} | ```c#
@using AnlabMvc.Controllers
@model AnlabMvc.Controllers.AdminAnalysisController.AnalysisDeleteModel
@{
ViewBag.Title = "Delete Analysis Method";
}
<div>
<hr />
<h3>Are you sure you want to delete this?</h3>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => mo... | ```c#
@using AnlabMvc.Controllers
@model AnlabMvc.Controllers.AdminAnalysisController.AnalysisDeleteModel
@{
ViewBag.Title = "Delete Analysis Method";
}
<div class="col">
<hr />
<h3>Are you sure you want to delete this?</h3>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor... |
5fc9b4af-9f46-4702-a1db-34f3c6d57a90 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType : byte
{
// TODO: We might implement some other calculation me... | ```c#
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType : byte
{
/// <summary>
/// Deduction is taken as a per... |
29b1dc85-819b-45f4-b9a6-bb2d59bedce8 | {
"language": "C#"
} | ```c#
using Discord.Commands;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace Modix.Utilities
{
public class LimitToChannelsAttribute : PreconditionAttribute
{
public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IDependencyMa... | ```c#
using Discord.Commands;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace Modix.Utilities
{
public class LimitToChannelsAttribute : PreconditionAttribute
{
public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IDependencyMa... |
c404ce8a-6793-40fb-af69-3a1850c14893 | {
"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... |
9eb4ab3b-b980-4d72-8e3a-82a7ca228782 | {
"language": "C#"
} | ```c#
namespace MQTTnet.Packets
{
public class MqttConnectPacket : MqttBasePacket
{
public string ProtocolName { get; set; }
public byte? ProtocolLevel { get; set; }
public string ClientId { get; set; }
public string Username { get; set; }
public string Password { ge... | ```c#
namespace MQTTnet.Packets
{
public class MqttConnectPacket : MqttBasePacket
{
public string ProtocolName { get; set; }
public byte? ProtocolLevel { get; set; }
public string ClientId { get; set; }
public string Username { get; set; }
public string Password { ge... |
b3b7cb3f-e563-4888-9046-2d85297f5375 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
namespace MultiMiner.Win.Extensions
{
static class StringExtensions
{
private readonly static Dictionary<string, string> hostDomainNames = new Dictionary<string, string>();
public static string DomainFromHost(this string h... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
namespace MultiMiner.Win.Extensions
{
static class StringExtensions
{
private readonly static Dictionary<string, string> hostDomainNames = new Dictionary<string, string>();
public static string DomainFromHost(this string h... |
98f43c92-d688-4897-8bba-380f0b5e5451 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;
namespace ServiceStack.OrmLite
{
public static class Sql
{
//public static bool In<T>(T value, IList<Object> list)
//{
// foreach (Object obj in list)
// {
// if (obj == null || value ==... | ```c#
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;
namespace ServiceStack.OrmLite
{
public static class Sql
{
public static bool In<T>(T value, params object[] list)
{
if(value == null)
return false;
foreach (var obj in list)
{
if (obj ==... |
571ed9a4-7c30-427b-a19d-a1fb5e31d3e3 | {
"language": "C#"
} | ```c#
using Anotar.NLog;
using Ninject;
using Ninject.Extensions.Factory;
using SOVND.Lib;
using System;
using System.Text;
using SOVND.Lib.Handlers;
using SOVND.Lib.Models;
using SOVND.Server.Settings;
using System.Threading;
using System.Linq;
using SOVND.Server.Handlers;
namespace SOVND.Server
{
class Program
... | ```c#
using Anotar.NLog;
using Ninject;
using Ninject.Extensions.Factory;
using SOVND.Lib;
using System;
using System.Text;
using SOVND.Lib.Handlers;
using SOVND.Lib.Models;
using SOVND.Server.Settings;
using System.Threading;
using System.Linq;
using SOVND.Server.Handlers;
using System.IO;
using SOVND.Lib.Utils;
nam... |
80afaf38-5d6b-4213-8e2e-4943146d6731 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using osu.Game.Configuration;
using osu.Game.Database;
namespace osu.Game.Skinning
{
public class SkinInfo : I... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using osu.Game.Configuration;
using osu.Game.Database;
namespace osu.Game.Skinning
{
public class SkinInfo : I... |
cbf99154-0c4e-41f1-a108-f6edd84aaed1 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.Practices.ServiceLocation;
using Moq;
using NUnit.Framework;
using Uncas.BuildPipeline.Commands;
using Uncas.BuildPipeline.Repositories;
using Uncas.BuildPipeline.Utilities;
namespace Uncas.BuildPipeline.Tests.Unit
{
[TestFixture]
public class CommandBusTests
{
... | ```c#
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity;
using Moq;
using NUnit.Framework;
using Ploeh.AutoFixture;
using Uncas.BuildPipeline.Commands;
namespace Uncas.BuildPipeline.Tests.Unit
{
[TestFixture]
public class CommandBusTests : WithFixture<CommandBus>
{
[Test]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.