doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
dbbdec51-7c18-4f55-9aec-246a847e8857 | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Stockfighter.Helpers;
namespace Stockfighter
{
public class Venue
{
public string Symbol { get; private set; }
public Venue(string symbol)
{
Symbol = symbol;
}
public async Task<bool> IsUp()
{
u... | ```c#
using System.Threading.Tasks;
using Stockfighter.Helpers;
namespace Stockfighter
{
public class Venue
{
public string Symbol { get; private set; }
public Venue(string symbol)
{
Symbol = symbol;
}
public async Task<bool> IsUp()
{
u... |
ac62c53f-52ee-44a7-acef-fa30b48da801 | {
"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 System.Collections.Generic;
using System.IO;
namespace RepoTasks.ProjectModel
{
internal class ProjectInfo
{
... | ```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 System.Collections.Generic;
using System.IO;
namespace RepoTasks.ProjectModel
{
internal class ProjectInfo
{
... |
53599e70-8ad1-4e27-9a38-986e2f258773 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Geocoding.Google;
using Xunit;
namespace Geocoding.Tests
{
[Collection("Settings")]
public class GoogleAsyncGeocoderTest : AsyncGeocoderTest
{
readonly SettingsFixture settings;
GoogleGeocoder geoCoder;
public GoogleAsyncGeocoderTest... | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Geocoding.Google;
using Xunit;
namespace Geocoding.Tests
{
[Collection("Settings")]
public class GoogleAsyncGeocoderTest : AsyncGeocoderTest
{
GoogleGeocoder geoCoder;
protected override IGeocoder CreateAsyncGeocoder()
{
string ap... |
86a50dea-e383-49ae-b473-445155721663 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI;
using Common.Logging;
namespace NuGet.Lucene.Web
{
public static class UnhandledExceptionLogger
{
internal static readonly ILog Log = LogManager.GetLogger(typeof(UnhandledExceptionLogger));
public static ... | ```c#
using System;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI;
using Common.Logging;
namespace NuGet.Lucene.Web
{
public static class UnhandledExceptionLogger
{
internal static readonly ILog Log = LogManager.GetLogger(typeof(UnhandledExceptionLogger));
public static ... |
af8a335d-81c6-4b14-b192-35433eb33783 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System;
using System.Globalization;
using System.IO;
using System.Text;
namespace Glimpse
{
public class DefaultMessageConverter : IMessageConverter
{
private readonly JsonSerializer _jsonSerializer;
public DefaultMessageConverter(JsonSerializer jsonSerializ... | ```c#
using Newtonsoft.Json;
using System;
using System.Globalization;
using System.IO;
using System.Text;
namespace Glimpse
{
public class DefaultMessageConverter : IMessageConverter
{
private readonly JsonSerializer _jsonSerializer;
private readonly IServiceProvider _serviceProvider;
... |
0d9a9b4f-4720-4815-89b3-bdf50b7d082d | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using System.Diagnostics;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Process File")]
public class ProcessFile : FilePath
{
public ProcessFile(string path) : base(path)
{
... | ```c#
using System.ComponentModel;
using System.Diagnostics;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("Process File")]
public class ProcessFile : FilePath
{
public ProcessFile(string path) : base(path)
{
... |
3df48246-a82c-4028-a31b-3d24d42857d3 | {
"language": "C#"
} | ```c#
using System;
using UnityEngine;
namespace com.adjust.sdk.imei
{
public class AdjustImei : MonoBehaviour
{
private const string errorMsgEditor = "[AdjustImei]: Adjust IMEI plugin can not be used in Editor.";
private const string errorMsgPlatform = "[AdjustImei]: Adjust IMEI plugin can onl... | ```c#
using System;
using UnityEngine;
namespace com.adjust.sdk.imei
{
public class AdjustImei : MonoBehaviour
{
private const string errorMsgEditor = "[AdjustImei]: Adjust IMEI plugin can not be used in Editor.";
private const string errorMsgPlatform = "[AdjustImei]: Adjust IMEI plugin can onl... |
9f3b945c-7e53-4d96-85ec-a37bcbc37ac9 | {
"language": "C#"
} | ```c#
using UnityEngine;
namespace Devdayo
{
[DisallowMultipleComponent]
public class TriggerEnter2D : FsmEvent<Collider2D>
{
void OnTrigger2DEnter(Collider2D other)
{
Notify(other);
}
}
[DisallowMultipleComponent]
public class TriggerStay2D : FsmEvent<Coll... | ```c#
using UnityEngine;
namespace Devdayo
{
[DisallowMultipleComponent]
public class TriggerEnter2D : FsmEvent<Collider2D>
{
void OnTriggerEnter2D(Collider2D other)
{
Notify(other);
}
}
[DisallowMultipleComponent]
public class TriggerStay2D : FsmEvent<Coll... |
6711f238-37d9-41dc-928d-45eae12625f9 | {
"language": "C#"
} | ```c#
namespace XSharp.Tokens
{
public class Variable : Identifier
{
public Variable() {
mFirstChars = ".";
}
protected override bool CheckChar(int aLocalPos, char aChar)
{
// The name of the variable must start with a alphabet
if ... | ```c#
namespace XSharp.Tokens
{
public class Variable : Identifier
{
public Variable() {
mFirstChars = ".";
}
protected override bool CheckChar(int aLocalPos, char aChar)
{
// The name of the variable must start with a alphabet
if ... |
96102ed6-b318-4490-ab6d-e1c6104a6cbb | {
"language": "C#"
} | ```c#
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System.Collections.Specialized;
namespace CefSharp
{
public interface IRequest
{
string Url { get; set; }
str... | ```c#
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Collections.Specialized;
namespace CefSharp
{
public interface IRequest : IDisposable
{
string U... |
7f9f5cd8-23aa-4cf7-b677-ec4af61ba266 | {
"language": "C#"
} | ```c#
using System;
using System.Net;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SFA.DAS.CommitmentsV2.Api.Types.Responses;
using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners;
namespace SFA.DAS.CommitmentsV2.Api.Controllers
{
[ApiControlle... | ```c#
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SFA.DAS.CommitmentsV2.Api.Types.Responses;
using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners;
using System;
using System.Net;
using System.Threading.Tasks;
namespace SFA.DAS.Commitm... |
eab0672d-ae39-44e9-a93d-d3cbb491614c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Andromeda
{
public static class CredentialManager
{
public static string GetUser()
{
return "null";
}
public static string GetPass()... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.DirectoryServices.AccountManagement;
namespace Andromeda
{
public static class CredentialManager
{
public static string UserName { get; set; }
public static string GetDomain()
{
... |
a04a9989-ce9f-4c43-90d6-769ecf3ab96e | {
"language": "C#"
} | ```c#
namespace ForwarderConsole
{
using System;
using System.Text;
public static class Print
{
public static void Error(string error)
{
InternalPrint("--- ERROR --", error, ConsoleColor.Red);
}
public static void Request(byte[] bytes)
{
... | ```c#
namespace ForwarderConsole
{
using System;
using System.Text;
public static class Print
{
public static void Error(string error)
{
InternalPrint("--- ERROR --", error, ConsoleColor.Red);
}
public static void Request(byte[] bytes)
{
... |
8b4a7c39-651e-4848-8829-be5b22ad0585 | {
"language": "C#"
} | ```c#
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World, I was created by my father, Bigsby, in an unidentified evironment!");
Console.WriteLine("Bigsby Gates was here!");
... | ```c#
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World, I was created by my father, Bigsby, in an unidentified evironment!");
Console.WriteLine("Bigsby Gates was here!");
... |
f753bc63-6df7-4844-9aeb-465352637d5c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CloudNotes.DesktopClient
{
public static class Directories
{
private const string CloudNotesDataFolder... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CloudNotes.DesktopClient
{
public static class Directories
{
private const string CloudNotesDataFolder... |
904dbbfc-ad75-4f4d-83c7-2dc7f70f0fca | {
"language": "C#"
} | ```c#
using CefSharp.Wpf;
using System.Windows.Controls;
namespace Cactbot
{
public partial class BrowserControl : UserControl
{
public BrowserControl()
{
DataContext = this;
InitializeComponent();
CreationHandlers = delegate {};
}
public de... | ```c#
using CefSharp.Wpf;
using System.Windows.Controls;
namespace Cactbot
{
public partial class BrowserControl : UserControl
{
public BrowserControl()
{
DataContext = this;
InitializeComponent();
CreationHandlers = delegate {};
}
public de... |
944f94ca-5ca4-4af7-ab9b-8fa9aee0ad4e | {
"language": "C#"
} | ```c#
using System;
namespace Business.Core
{
public partial class Individual
{
public IDatabase Database { get; private set; }
public Individual(IDatabase database, UInt64? id = null) {
Database = database;
if(id != null)
Load((UInt64)id);
}
private void Load(UInt64 id) {
// Overwrite this ob... | ```c#
using System;
namespace Business.Core
{
public partial class Individual
{
public IDatabase Database { get; private set; }
public Individual(IDatabase database, UInt64? id = null) {
Database = database;
if(id != null)
Load((UInt64)id);
}
private void Load(UInt64 id) {
// Overwrite this ob... |
ef45764e-23b8-41e4-9350-9d17c5f7ccc4 | {
"language": "C#"
} | ```c#
// ViewUserControl.cs
// Copyright (c) Nikhil Kothari, 2008. All Rights Reserved.
// http://www.nikhilk.net
//
// Silverlight.FX is an application framework for building RIAs with Silverlight.
// This project is licensed under the BSD license. See the accompanying License.txt
// file for more information.
// For... | ```c#
// ViewUserControl.cs
// Copyright (c) Nikhil Kothari, 2008. All Rights Reserved.
// http://www.nikhilk.net
//
// Silverlight.FX is an application framework for building RIAs with Silverlight.
// This project is licensed under the BSD license. See the accompanying License.txt
// file for more information.
// For... |
15e4e626-ec09-44f6-8548-1cdd94606061 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
namespace Nowin
{
public class IpIsLocalChecker : IIpIsLocalChecker
{
readonly Dictionary<IPAddress, bool> _dict;
public IpIsLocalChecker()
{
var host = Dns.GetHostEntry(D... | ```c#
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
namespace Nowin
{
public class IpIsLocalChecker : IIpIsLocalChecker
{
readonly Dictionary<IPAddress, bool> _dict;
public IpIsLocalChecker()
{
var host = Dns.GetHostEntry(D... |
15074547-cde6-4e1c-8566-c4ab33d86a48 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Web.Http.Controllers;
using System.Web.Http.ModelBinding;
using WebAPI.Domain.InputOptions;
namespace WebAPI.API.ModelBindings
{
public class SearchOptionsModelBinding : IModelBinder
{
public bool BindModel(HttpActionContext actionContext, ModelB... | ```c#
using System;
using System.Net.Http;
using System.Web.Http.Controllers;
using System.Web.Http.ModelBinding;
using WebAPI.Domain.InputOptions;
namespace WebAPI.API.ModelBindings
{
public class SearchOptionsModelBinding : IModelBinder
{
public bool BindModel(HttpActionContext actionContext, ModelB... |
e50bdfde-d8aa-4856-a9c4-09f8f0f57bbc | {
"language": "C#"
} | ```c#
using System.IO;
using BenchmarkDotNet.Attributes;
using FreeImageAPI;
using ImageMagick;
using DS = DevILSharp;
namespace Pfim.Benchmarks
{
public class TargaBenchmark
{
[Params("true-32-rle-large.tga", "true-24-large.tga", "true-24.tga", "true-32-rle.tga", "rgb24_top_left")]
public str... | ```c#
using System.IO;
using BenchmarkDotNet.Attributes;
using FreeImageAPI;
using ImageMagick;
using DS = DevILSharp;
namespace Pfim.Benchmarks
{
public class TargaBenchmark
{
[Params("true-32-rle-large.tga", "true-24-large.tga", "true-24.tga", "true-32-rle.tga", "rgb24_top_left.tga")]
public... |
009e12d3-4d2f-4874-9b86-08823b1bbf7d | {
"language": "C#"
} | ```c#
@page "/about"
@inject Navigator Navigator
<h1>Money</h1>
<h4>Neptuo</h4>
<p class="gray">
v@(typeof(About).Assembly.GetName().Version.ToString(3))
</p>
<p>
<a target="_blank" href="@Navigator.UrlMoneyProject()">Documentation</a>
</p>
<p>
<a target="_blank" href="@Navigator.UrlMoneyProjectIssueNew()... | ```c#
@page "/about"
@inject Navigator Navigator
<Title Main="Money" Sub="Nepuo" />
<p class="gray">
v@(typeof(About).Assembly.GetName().Version.ToString(3))
</p>
<p>
<a target="_blank" href="@Navigator.UrlMoneyProject()">Documentation</a>
</p>
<p>
<a target="_blank" href="@Navigator.UrlMoneyProjectIssue... |
49fde1f5-6c79-4ceb-aa09-91aba6379927 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Owin;
namespace JabbR.Middleware
{
using AppFunc = Func<IDictionary<string, object>, Task>;
public class RequireHttpsHandler
{
private readonly AppFunc _next;
public Requir... | ```c#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Owin;
namespace JabbR.Middleware
{
using AppFunc = Func<IDictionary<string, object>, Task>;
public class RequireHttpsHandler
{
private readonly AppFunc _next;
public Requir... |
23826334-f7b0-464a-931b-5958f5a3154c | {
"language": "C#"
} | ```c#
using Mapsui.Utilities;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mapsui.Extensions
{
public static class ViewportExtensions
{
/// <summary>
/// True if Width and Height are not zero
/// </summary>
public static bool HasSize(this IReadOn... | ```c#
using Mapsui.Utilities;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mapsui.Extensions
{
public static class ViewportExtensions
{
/// <summary>
/// True if Width and Height are not zero
/// </summary>
public static bool HasSize(this IReadOn... |
aca5aa98-a444-465b-a404-aa4e480329a1 | {
"language": "C#"
} | ```c#
using Discord;
using System;
namespace MitternachtWeb.Models {
[Flags]
public enum BotLevelPermission {
None = 0b_0000,
ReadBotConfig = 0b_0001,
WriteBotConfig = 0b_0011,
ReadAllGuildConfigs = 0b_0100,
WriteAllGuildConfigs = 0b_1100,
All = 0b_1111,
}... | ```c#
using Discord;
using System;
namespace MitternachtWeb.Models {
[Flags]
public enum BotLevelPermission {
None = 0b_0000,
ReadBotConfig = 0b_0001,
WriteBotConfig = 0b_0011,
ReadAllGuildConfigs = 0b_0100,
WriteAllGuildConfigs = 0b_1100,
All = 0b_1111,
}... |
6edeb4a2-485b-4db3-9b7f-156dc35738e8 | {
"language": "C#"
} | ```c#
// Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing t... | ```c#
// Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing t... |
9930612e-93c8-48d4-890c-913eb382727b | {
"language": "C#"
} | ```c#
using CommonUtil.Disk;
namespace Common
{
public static class SourceDirectoryFinder
{
private static string crayonSourceDirectoryCached = null;
public static string CrayonSourceDirectory
{
// Presumably running from source. Walk up to the root directory and f... | ```c#
using CommonUtil.Disk;
namespace Common
{
public static class SourceDirectoryFinder
{
private static string crayonSourceDirectoryCached = null;
public static string CrayonSourceDirectory
{
// Presumably running from source. Walk up to the root directory and f... |
0d01a8b6-d4d5-4162-8568-86e0627be116 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Stratis.Bitcoin.Miner;
using Stratis.Bitcoin.RPC.ModelBinders;
using Stratis.Bitcoin.Wallet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Stratis.Bitcoin.RPC
{
... | ```c#
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Stratis.Bitcoin.Miner;
using Stratis.Bitcoin.RPC.ModelBinders;
using Stratis.Bitcoin.Wallet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Stratis.Bitcoin.RPC
{
... |
6d9d0979-f0c0-40eb-9fe4-a7920a957859 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.AspNet.SignalR;
using Microsoft.Owin;
using Microsoft.Owin.Cors;
using Owin;
[assembly: OwinStartup(typeof(SignInCheckIn.Startup))]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]
namespace SignInCheckIn
{
public class Startup
{
... | ```c#
using System;
using Microsoft.AspNet.SignalR;
using Microsoft.Owin;
using Microsoft.Owin.Cors;
using Owin;
[assembly: OwinStartup(typeof(SignInCheckIn.Startup))]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]
namespace SignInCheckIn
{
public class Startup
{
... |
eb49e0e4-1c92-4ee5-b27a-78917948709d | {
"language": "C#"
} | ```c#
using FluentScheduler;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Logging;
using System;
namespace BatteryCommander.Web.Jobs
{
internal static class JobHandler
{
public static void UseJobScheduler(this IApplicationBuilder app, ILoggerFactory loggerFactory)
{
... | ```c#
using FluentScheduler;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Logging;
using System;
namespace BatteryCommander.Web.Jobs
{
internal static class JobHandler
{
public static void UseJobScheduler(this IApplicationBuilder app, ILoggerFactory loggerFactory)
{
... |
ec46f231-2083-402e-a15b-fc749eb6c404 | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GlobalAssemblyInfo.cs" company="Helix Toolkit">
// Copyright (c) 2014 Helix Toolkit contributors
// </copyright>
// -------------------------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GlobalAssemblyInfo.cs" company="Helix Toolkit">
// Copyright (c) 2014 Helix Toolkit contributors
// </copyright>
// -------------------------------------------------------... |
ac01eda9-2651-466c-be8e-08a6b1af5d65 | {
"language": "C#"
} | ```c#
@using Dangl.WebDocumentation
@using Dangl.WebDocumentation.Models
@using Dangl.WebDocumentation.ViewModels.Account
@using Dangl.WebDocumentation.ViewModels.Manage
@using Microsoft.AspNet.Identity
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
@inject Microsoft.ApplicationInsights.Extensibility.TelemetryConf... | ```c#
@using Dangl.WebDocumentation
@using Dangl.WebDocumentation.Models
@using Dangl.WebDocumentation.ViewModels.Account
@using Dangl.WebDocumentation.ViewModels.Manage
@using Microsoft.AspNetCore.Identity
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
``` |
f83b633b-ef22-4ef5-8379-ec624c853f1e | {
"language": "C#"
} | ```c#
namespace Glimpse.Agent.Internal.Inspectors.Mvc.Proxies
{
public interface IViewComponentContext
{
IViewComponentDescriptor ViewComponentDescriptor { get; }
object[] Arguments { get; }
}
}
```
Update ViewComponentContext to respond to changed type | ```c#
using System.Collections.Generic;
namespace Glimpse.Agent.Internal.Inspectors.Mvc.Proxies
{
public interface IViewComponentContext
{
IViewComponentDescriptor ViewComponentDescriptor { get; }
IDictionary<string, object> Arguments { get; }
}
}
``` |
ecb32828-c9b5-4015-8e18-3b6ad88b1993 | {
"language": "C#"
} | ```c#
@model Dashboard.Models.JobSummary
@{
ViewBag.Title = $"{Model.Name} Summary";
var summaryValues = string.Join(
";",
Model.JobDaySummaryList.Select(x => $"{x.Date.ToLocalTime().ToString("yyyy-MM-dd")},{x.Succeeded},{x.Failed},{x.Aborted}"));
var durationDates = string.Join(
... | ```c#
@model Dashboard.Models.JobSummary
@{
ViewBag.Title = $"{Model.Name} Summary";
var jobs = Model.JobDaySummaryList.OrderBy(x => x.Date);
var summaryValues = string.Join(
";",
jobs.Select(x => $"{x.Date.ToLocalTime().ToString("yyyy-MM-dd")},{x.Succeeded},{x.Failed},{x.Aborted}"));
... |
ace80e58-50a4-4639-8c45-707252f33eb4 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Net;
using System.Windows.Forms;
using Bloom.Api;
using Bloom.Book;
using Bloom.MiscUI;
using Bloom.Publish;
using Bloom.Utils;
using SIL.IO;
namespace Bloom.web.controllers
{
public class ProgressDialogApi
{
private static Action _cancelHandler;
public static v... | ```c#
using System;
using System.IO;
using System.Net;
using System.Windows.Forms;
using Bloom.Api;
using Bloom.Book;
using Bloom.MiscUI;
using Bloom.Publish;
using Bloom.Utils;
using SIL.IO;
namespace Bloom.web.controllers
{
public class ProgressDialogApi
{
private static Action _cancelHandler;
public static v... |
8ad3b7b5-0be8-4a20-ab5a-9d2fb2581347 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.SPOT;
namespace IntervalTimer
{
public class IntervalTimer
{
public TimeSpan ShortDuration { get; set; }
public TimeSpan LongDuration { get; set; }
public IntervalTimer(TimeSpan shortDuration, TimeSpan longDuration)
{
... | ```c#
using System;
using Microsoft.SPOT;
namespace IntervalTimer
{
public delegate void IntervalEventHandler(object sender, EventArgs e);
public class IntervalTimer
{
public TimeSpan ShortDuration { get; set; }
public TimeSpan LongDuration { get; set; }
public Interv... |
aebdc3a0-e64e-45ba-a683-67f982517fe7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Im... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Im... |
f69a95f3-8441-42ac-8962-3da158dd7f5d | {
"language": "C#"
} | ```c#
/// <summary>
/// Action to take if the message text contains an invalid character
/// Valid characters are defined in the GSM 03.38 character set
/// </summary>
public enum InvalidCharacterAction
{
/// <summary>
/// Use the default setting from your account
/// </summary>
AccountDefault = 0,
... | ```c#
/// <summary>
/// Action to take if the message text contains an invalid character
/// Valid characters are defined in the GSM 03.38 character set
/// </summary>
public enum InvalidCharacterAction
{
/// <summary>
/// Use the default setting from your account
/// </summary>
AccountDefault = 0,
... |
3f62d83d-0902-45ab-ae83-9a6b69d72520 | {
"language": "C#"
} | ```c#
using System.Reflection;
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: AssemblyTitle("TrayLeds")]
[assembly: AssemblyDescr... | ```c#
using System.Reflection;
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: AssemblyTitle("TrayLeds")]
[assembly: AssemblyDescr... |
1ac55e8c-861b-485f-9bb5-36b93d62934d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DangerousPanel_Server
{
class Program
{
static void Main(string[] args)
{
}
}
}
```
Set title for console window. | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DangerousPanel_Server
{
class Program
{
static void Log(string text, ConsoleColor color)
{
ConsoleColor oldColor = Console.ForegroundColor;
... |
e2edb7cd-9f27-409d-b6fc-c8e3001bd695 | {
"language": "C#"
} | ```c#
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.StaticFiles;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Logging;
namespace DocNuget {
public class Startup {
public void ConfigureServices(IServiceCollection services) {
servi... | ```c#
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.StaticFiles;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Logging;
namespace DocNuget {
public class Startup {
public void ConfigureServices(IServiceCollection services) {
servi... |
882d64de-b737-49cb-852d-f4a40df84466 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace FbxSharp
{
public class Scene : Document
{
public Scene(string name="")
{
RootNode = new Node();
Nodes.Add(RootNode);
}
public List<Node> Nodes = new List<Node>();
public Node RootN... | ```c#
using System;
using System.Collections.Generic;
namespace FbxSharp
{
public class Scene : Document
{
public Scene(string name="")
{
RootNode = new Node();
Nodes.Add(RootNode);
}
public List<Node> Nodes = new List<Node>();
public Node RootN... |
8084656e-834e-43eb-b1d2-2b5c3b967251 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
#if NET_45
using System.Collections.ObjectModel;
#endif
namespace Octokit
{
/// <summary>
/// Extra information returned as part of each api response.
/// </summary>
public class ApiInfo
{
public ApiInfo(IDictionary<string, Uri> links,
... | ```c#
using System;
using System.Collections.Generic;
#if NET_45
using System.Collections.ObjectModel;
#endif
namespace Octokit
{
/// <summary>
/// Extra information returned as part of each api response.
/// </summary>
public class ApiInfo
{
public ApiInfo(IDictionary<string, Uri> links,
... |
a8db6bb2-91a8-462a-be50-ecb52eb02852 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
namespace Octokit
{
internal static class CollectionExtensions
{
public static TValue SafeGet<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key)
{
Ensure.ArgumentNotNull(dictionary, "di... | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
namespace Octokit
{
internal static class CollectionExtensions
{
public static TValue SafeGet<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key)
{
Ensure.ArgumentNotNull(dictionary, "di... |
0386b05f-30da-4690-8533-81af7fdf55f8 | {
"language": "C#"
} | ```c#
using System.Reflection;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Basics Algorithms")]
[assembly: AssemblyCulture("")]
```
Make internals ... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Basics Algorithms")]
[assembly: As... |
ef798c8c-fdd7-4cab-afaa-d2764512a89d | {
"language": "C#"
} | ```c#
using Autofac;
using Bit.ViewModel.Contracts;
using Simple.OData.Client;
using System;
using System.Net.Http;
namespace Prism.Ioc
{
public static class ContainerBuilderExtensions
{
public static ContainerBuilder RegisterODataClient(this ContainerBuilder containerBuilder)
{
if... | ```c#
using Autofac;
using Bit.ViewModel.Contracts;
using Simple.OData.Client;
using System;
using System.Net.Http;
namespace Prism.Ioc
{
public static class ContainerBuilderExtensions
{
public static ContainerBuilder RegisterODataClient(this ContainerBuilder containerBuilder)
{
if... |
2bced0fd-9aea-4701-bce6-89c99679a987 | {
"language": "C#"
} | ```c#
namespace WebServer
{
public class Default404Servlet : HTMLServlet
{
protected override void OnService()
{
Write(
DocType("html"),
Tag("html", lang => "en", another => "blah")(
Tag("head")(
Tag("title... | ```c#
namespace WebServer
{
public class Default404Servlet : HTMLServlet
{
protected override void OnService()
{
Response.StatusCode = 404;
Write(
DocType("html"),
Tag("html", lang => "en", another => "blah")(
Tag("he... |
b4e15ce0-a7b2-4010-8e38-3e7544932ade | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using AgGateway.ADAPT.ApplicationDataModel;
using AgGateway.ADAPT.PluginManager;
namespace AgGateway.ADAPT.Visualizer
{
public class DataProvider
{
private PluginFactory _pluginFactory;
public void Initialize(string pluginsPath)
{
_p... | ```c#
using System.Collections.Generic;
using AgGateway.ADAPT.ApplicationDataModel;
using AgGateway.ADAPT.PluginManager;
namespace AgGateway.ADAPT.Visualizer
{
public class DataProvider
{
private PluginFactory _pluginFactory;
public void Initialize(string pluginsPath)
{
_p... |
dc64c6b1-8f70-452d-8df1-e4b30f4f5855 | {
"language": "C#"
} | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Core2D.Avalonia
{
public class MainWindow : Window
{
public M... | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Core2D.Avalonia
{
public class MainWindow : Window
{
public M... |
bdd4c89f-51dc-485b-a350-060572198c33 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Web;
using Nancy;
using Nancy.ErrorHandling;
namespace NancyBenchmark
{
public class Global : HttpApplication
{
protected void Application_Start()
{
}
}
}```
Set improved ThreadPool values for nancy | ```c#
using System;
using System.Collections.Generic;
using System.Web;
using Nancy;
using Nancy.ErrorHandling;
using System.Threading;
namespace NancyBenchmark
{
public class Global : HttpApplication
{
protected void Application_Start()
{
var threads = 40 * Environment.ProcessorCo... |
ff819bbf-e33c-4b78-a945-63feddc115c5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Globalization;
using System.Text;
using Microsoft.WindowsAzure.Storage.Table;
using log4net.Core;
namespace log4net.Appender
{
internal sealed class AzureLoggingEventEntity : TableEntity
{
public AzureLoggingEventEntity(LoggingEvent e)
... | ```c#
using System;
using System.Collections;
using System.Globalization;
using System.Text;
using Microsoft.WindowsAzure.Storage.Table;
using log4net.Core;
namespace log4net.Appender
{
internal sealed class AzureLoggingEventEntity : TableEntity
{
public AzureLoggingEventEntity(LoggingEvent e)
... |
1461581f-79ef-4fb9-ad97-332726d6904f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Assent.Reporters.DiffPrograms
{
public class VsCodeDiffProgram : DiffProgramBase
{
static VsCodeDiffProgram()
{
var paths = new List<string>();
if (DiffReporter.IsWindows)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace Assent.Reporters.DiffPrograms
{
public class VsCodeDiffProgram : DiffProgramBase
{
static VsCodeDiffProgram()
{
var paths = new List<string>();
if (DiffReporter.IsWindows)
{
... |
09f1a98f-8e6b-4ec7-b111-36d093f4102d | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Text;
namespace ReimuPlugins.Common
{
public static class StringExtensions
{
public static string ToCStr(this string str)
{
return str.Contains('\0') ? str : str + '\0';
}
public static string Convert(this string str, Encoding ... | ```c#
using System.Linq;
using System.Text;
namespace ReimuPlugins.Common
{
public static class StringExtensions
{
public static string ToCStr(this string str)
{
return str.Contains('\0') ? str : str + '\0';
}
public static string Convert(this string str, Encoding ... |
57628b73-6ef8-4100-9c98-39606d3cc9d9 | {
"language": "C#"
} | ```c#
using System;
namespace Equifax
{
/// <summary>
/// Creates globally secure Equifax-style GUIDs.
/// </summary>
public static class Guid
{
/// <summary>
/// Creates a new Equifax secure GUID using the current UTC time.
/// UTC ensures global consistency and uniqueness... | ```c#
using System;
namespace Equifax
{
/// <summary>
/// Creates globally secure Equifax-style GUIDs.
/// </summary>
public static class Guid
{
/// <summary>
/// Creates a new Equifax secure GUID using the current UTC time.
/// UTC ensures global consistency and uniqueness... |
4e35d1eb-d9b9-4d7f-b67b-f8da81ab4642 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.Threading;
namespace Avalonia.Rendering
{
public class SleepLoopRenderTimer : IRenderTimer
{
public event Action<TimeSpan> Tick;
public SleepLoopRenderTimer(int fps)
{
var timeBetweenTicks = TimeSpan.FromSeconds(1d ... | ```c#
using System;
using System.Diagnostics;
using System.Threading;
namespace Avalonia.Rendering
{
public class SleepLoopRenderTimer : IRenderTimer
{
private Action<TimeSpan> _tick;
private int _count;
private readonly object _lock = new object();
private bool _running;
... |
b6df70bc-9f7b-476d-969a-c9dfd22c2124 | {
"language": "C#"
} | ```c#
#if TFS2015u2
using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.TeamFoundation.Framework.Server;
using Microsoft.VisualStudio.Services.Location;
using Microsoft.VisualStudio.Services.Location.Server;
namespace Aggregator.Core.Extensions
{
public static class LocationServiceExtensions
... | ```c#
#if TFS2015u2
using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.TeamFoundation.Framework.Server;
using Microsoft.VisualStudio.Services.Location;
using Microsoft.VisualStudio.Services.Location.Server;
namespace Aggregator.Core.Extensions
{
public static class LocationServiceExtensions
... |
6ae60e27-e915-487c-8ff7-947431fa7663 | {
"language": "C#"
} | ```c#
using System.Data;
using NHibernate.SqlCommand;
using NHibernate.SqlTypes;
namespace NHibernate.Dialect
{
public class Oracle9iDialect : Oracle8iDialect
{
public override string CurrentTimestampSelectString
{
get { return "select systimestamp from dual"; }
}
public override string Curr... | ```c#
using System.Data;
using NHibernate.SqlCommand;
using NHibernate.SqlTypes;
namespace NHibernate.Dialect
{
public class Oracle9iDialect : Oracle8iDialect
{
public override string CurrentTimestampSelectString
{
get { return "select systimestamp from dual"; }
}
public override string Curr... |
375969aa-a5a8-4598-ad64-ec2a06421373 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class NurseryResource : CellFeature {
public override int Amount
{
set
{
// add _amount - value to the player's resource store
_amount = value;
Debug.Log("child thingy");
}
}
// Use thi... | ```c#
using UnityEngine;
using System.Collections;
public class NurseryResource : CellFeature {
public override int Amount
{
set
{
_amount = value;
FindObjectOfType<Resources>().addPlacementResource(_amount - value);
}
}
// Use this for initialization
vo... |
4e7a9a48-b5f9-44a4-9968-93c6048200ca | {
"language": "C#"
} | ```c#
<environment names="Development">
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
</environment>
<environment names="Staging,Production">
<script src="https://ajax.aspnetcdn.com/ajax/jquery.v... | ```c#
<environment names="Development">
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
</environment>
<environment names="Staging,Production">
<script src="https://ajax.aspnetcdn.com/ajax/jquery.v... |
6739c82f-77bc-441a-a2fb-7d48466b3345 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TfsHelperLib
{
public class TfsChangeset
{
public int ChangesetId { get; set; }
public string Owner { get; set; }
public DateTime Creation... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TfsHelperLib
{
public class TfsChangeset : IComparable
{
public int ChangesetId { get; set; }
public string Owner { get; s... |
64f91fd1-cd3d-4779-ac52-065700ae676f | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using NoAdsHere.Common;
using NoAdsHere.Common.Preconditions;
namespace NoAdsHere.Commands.Master
{
public class MasterModule : ModuleBase
{
[Command("Reset Guild")]
[RequirePermission(AccessLevel.Master)]
public... | ```c#
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using NoAdsHere.Common;
using NoAdsHere.Common.Preconditions;
namespace NoAdsHere.Commands.Master
{
public class MasterModule : ModuleBase
{
[Command("Reset Guild")]
[RequirePermission(AccessLevel.Master)]
public... |
3c6bbb0c-3699-49ec-97a8-31ec7c6c19e2 | {
"language": "C#"
} | ```c#
@model IEnumerable<Zk.Models.Crop>
@{
ViewBag.Title = "Gewassen";
}
<div id="top"></div>
<div id="yearCalendar">
<h1>Dit zijn de gewassen in onze database:</h1>
<table class="table table-striped">
<tr>
<th>Naam</th><th>Ras</th><th>Categorie</th><th>Opp. per 1</th>
<th>Opp. per zak</th><th>P... | ```c#
@model IEnumerable<Oogstplanner.Models.Crop>
@{
ViewBag.Title = "Gewassen";
}
<div id="top"></div>
<div id="yearCalendar">
<h1>Dit zijn de gewassen in onze database:</h1>
<table class="table table-striped">
<tr>
<th>Naam</th><th>Ras</th><th>Categorie</th><th>Opp. per 1</th>
<th>Opp. per zak... |
80d6844f-5389-4486-865c-e70bcdab0878 | {
"language": "C#"
} | ```c#
using System;
using System.Numerics;
namespace DynamixelServo.Quadruped
{
public class BasicQuadrupedGaitEngine : QuadrupedGaitEngine
{
private const int Speed = 12;
private int _currentIndex;
private readonly Vector3[] _positions =
{
new Vector3(-5, 5, 3),
... | ```c#
using System;
using System.Numerics;
namespace DynamixelServo.Quadruped
{
public class BasicQuadrupedGaitEngine : QuadrupedGaitEngine
{
private const int Speed = 12;
private float NextStepLength => Speed * 0.001f * TimeSincelastTick;
private int _currentIndex;
private r... |
b6dfce3f-da66-47f0-92fe-0d0c08ca30c3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using AutoMapper;
using ISTS.Domain.Studios;
namespace ISTS.Application.Studios
{
public class StudioService : IStudioService
{
private readonly IStudioRepository _studioRepository;
private readonly IMapper _mapper;
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using AutoMapper;
using ISTS.Domain.Studios;
namespace ISTS.Application.Studios
{
public class StudioService : IStudioService
{
private readonly IStudioRepository _studioRepository;
private readonly IMapper _mapper;
... |
908f2b5f-cf6f-4180-8357-b2d2f6f1a759 | {
"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.Audio;
using osu.Framework.IO.Stores;
using osuTK.Graphics;
namespace osu.Game.Skinning
{
public class DefaultLegacySkin : LegacySkin
{... | ```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.Audio;
using osu.Framework.IO.Stores;
using osuTK.Graphics;
namespace osu.Game.Skinning
{
public class DefaultLegacySkin : LegacySkin
{... |
e9ba9fec-1fcd-4fda-b353-023f8f8abf8e | {
"language": "C#"
} | ```c#
//
// Urho's Object C# sugar
//
// Authors:
// Miguel de Icaza (miguel@xamarin.com)
//
// Copyrigh 2015 Xamarin INc
//
using System;
using System.Runtime.InteropServices;
namespace Urho {
public partial class UrhoObject : RefCounted {
// Invoked by the subscribe methods
[UnmanagedFunctionPointer(Calli... | ```c#
//
// Urho's Object C# sugar
//
// Authors:
// Miguel de Icaza (miguel@xamarin.com)
//
// Copyrigh 2015 Xamarin INc
//
using System;
using System.Runtime.InteropServices;
namespace Urho {
public partial class UrhoObject : RefCounted {
// Invoked by the subscribe methods
static void ObjectCallback (Int... |
de15b45c-8280-4bbf-896a-da00376367d4 | {
"language": "C#"
} | ```c#
// Copyright 2005-2015 Giacomo Stelluti Scala & Contributors. All rights reserved. See License.md in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
#if PLATFORM_DOTNET
using System.Reflection;
#endif
namespace CommandLine.Core
{
seale... | ```c#
// Copyright 2005-2015 Giacomo Stelluti Scala & Contributors. All rights reserved. See License.md in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
#if !NET40
using System.Reflection;
#endif
namespace CommandLine.Core
{
sealed class V... |
816c7956-1d4a-4359-9702-f76c97058e5d | {
"language": "C#"
} | ```c#
using CurrencyRates.Entity;
using System;
namespace CurrencyRates
{
class Program
{
static void Main(string[] args)
{
}
}
}
```
Add skeleton code to main program | ```c#
using System;
namespace CurrencyRates
{
class Program
{
enum Actions { Fetch, Show };
static void Main(string[] args)
{
try
{
var action = Actions.Fetch;
if (args.Length > 0)
{
... |
7b77eee9-b458-4382-b9b4-86ab531ec5d8 | {
"language": "C#"
} | ```c#
@(Html.X().Panel()
.Header(false)
.Region(Region.North)
.Border(false)
.Height(70)
.Content(
@<text>
<header class="site-header" role="banner">
<nav class="top-navigation">
<div class="logo-container">
<img src="../../resources/image... | ```c#
@(Html.X().Panel()
.Header(false)
.Region(Region.North)
.Border(false)
.Height(70)
.Content(
@<text>
<header class="site-header" role="banner">
<nav class="top-navigation">
<div class="logo-container">
<img src="../../resources/image... |
7ef8a496-8056-4695-8cbb-20dbc4b7bf9b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Caching;
using System.Text;
using System.Threading.Tasks;
namespace Mozu.Api.Cache
{
public class CacheManager
{
private readonly ObjectCache _cache;
private static readonly object _lockObj = new Obje... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Caching;
using System.Text;
using System.Threading.Tasks;
namespace Mozu.Api.Cache
{
public class CacheManager
{
private readonly ObjectCache _cache;
private static readonly object _lockObj = new Obje... |
f8597b93-b629-4a38-a2cd-39281e1b81fd | {
"language": "C#"
} | ```c#
using System.Globalization;
using System.Text;
namespace SharpCompress.Common
{
public class ArchiveEncoding
{
/// <summary>
/// Default encoding to use when archive format doesn't specify one.
/// </summary>
public static Encoding Default;
/// <summa... | ```c#
using System.Globalization;
using System.Text;
namespace SharpCompress.Common
{
public class ArchiveEncoding
{
/// <summary>
/// Default encoding to use when archive format doesn't specify one.
/// </summary>
public static Encoding Default;
/// <summa... |
a558b627-5077-447f-8667-5d385709572a | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
namespace Shuttle.Core.Infrastructure
{
public static class ThreadSleep
{
public const int MaxStepSize = 1000;
public static void While(int ms, IThreadState state)
{
// step size should be as large as possible,
// max ... | ```c#
using System;
using System.Threading;
namespace Shuttle.Core.Infrastructure
{
public static class ThreadSleep
{
public const int MaxStepSize = 1000;
public static void While(int ms, IThreadState state)
{
// step size should be as large as possible,
// max ... |
f4a41728-a764-41c9-bfa3-c05b2567e648 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace elbgb_core.Memory
{
class NullCartridge : Cartridge
{
public NullCartridge(CartridgeHeader header, byte[] romData)
: base(header, romData)
{
}
public override byte ReadByt... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace elbgb_core.Memory
{
class NullCartridge : Cartridge
{
public NullCartridge(CartridgeHeader header, byte[] romData)
: base(header, romData)
{
}
public override byte ReadByt... |
a0020169-598e-4d72-8699-63e258fe8cf1 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Crevice.GestureMachine
{
using System.Threading;
using System.Drawing;
using Crevice.Core.FSM;
using Crevice.Core.Events;
using Crevice.Threading;
public class G... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Crevice.GestureMachine
{
using System.Threading;
using System.Drawing;
using Crevice.Core.FSM;
using Crevice.Core.Events;
using Crevice.Threading;
public class G... |
639c502a-8c81-4a99-98ab-029d25a63983 | {
"language": "C#"
} | ```c#
namespace OwinApp
{
using System;
using Microsoft.Owin.Hosting;
using Owin;
using Nancy.Owin;
public class Program
{
public static void Main(string[] args)
{
const string url = "http://localhost:5000";
using (WebApp.Start(url, Configuration))
... | ```c#
namespace OwinApp
{
using System;
using Microsoft.Owin.Hosting;
using Nancy.Bootstrappers.Autofac;
using Owin;
using Nancy.Owin;
public class Program
{
public static void Main(string[] args)
{
const string url = "http://localhost:5000";
using ... |
e125c607-c37e-4dee-ae18-1fb73b8f4118 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class GP_ResourcePhase : Phase
{
public override void OnEnter()
{
base.OnEnter();
var hexes = TowerManager.Instance.GetHexagonsInRange(CurrentPlayer, TowerType.ResourceTower);
var vision = RangeUtils.GetPlayerVisionServer(Curr... | ```c#
using UnityEngine;
using System.Collections;
public class GP_ResourcePhase : Phase
{
/*
public override void OnEnter()
{
base.OnEnter();
var hexes = TowerManager.Instance.GetHexagonsInRange(CurrentPlayer, TowerType.ResourceTower);
var vision = RangeUtils.GetPlayerVisionServe... |
7d062bed-f6c8-4270-93b3-794c8d11e2b0 | {
"language": "C#"
} | ```c#
using System;
namespace Telerik.Windows.Controls.Cloud.Sample
{
/// <summary>
/// Contains properties used to initialize the Backend Services and Analytics connections.
/// </summary>
public static class ConnectionSettings
{
/// <summary>
/// Input your Backend Services App ... | ```c#
using System;
namespace Telerik.Windows.Controls.Cloud.Sample
{
/// <summary>
/// Contains properties used to initialize the Backend Services and Analytics connections.
/// </summary>
public static class ConnectionSettings
{
/// <summary>
/// Input your Backend Services App ... |
e2a0bb33-c182-459c-a404-76c0a51150ca | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Grr
{
public static class ConsoleExtensions
{
[DllImport("User32.dll")]
static extern in... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Grr
{
public static class ConsoleExtensions
{
[DllImport("User32.dll")]
static extern in... |
63ab6c01-c974-4abd-b191-a920fcb70c10 | {
"language": "C#"
} | ```c#
using FluentAssertions;
using NUnit.Framework;
namespace MyInfluxDbClient.UnitTests
{
public class ShowSeriesTests : UnitTestsOf<ShowSeries>
{
[Test]
public void Generate_Should_return_drop_series_When_constructed_empty()
{
SUT = new ShowSeries();
SUT.Gene... | ```c#
using FluentAssertions;
using NUnit.Framework;
namespace MyInfluxDbClient.UnitTests
{
public class ShowSeriesTests : UnitTestsOf<ShowSeries>
{
[Test]
public void Generate_Should_return_show_series_When_constructed_empty()
{
SUT = new ShowSeries();
SUT.Gene... |
c026c745-edd1-4c02-908a-e583611bc076 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
using CefSharp;
using CefSharp.WinForms;
namespace TweetDck.Resources{
static class ScriptLoader{
private const string UrlPrefix = "td:";
public static string LoadResource(string name){
try{
... | ```c#
using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
using CefSharp;
using CefSharp.WinForms;
namespace TweetDck.Resources{
static class ScriptLoader{
private const string UrlPrefix = "td:";
public static string LoadResource(string name){
try{
... |
1a88d6e2-4552-4ebd-acc5-6cccd84a894b | {
"language": "C#"
} | ```c#
using System;
using NUnit.Framework;
using Gtk;
using Qyoto;
namespace Selene.Testing
{
[TestFixture]
public partial class Harness
{
[TestFixtureSetUp]
public void Setup()
{
#if GTK
string[] Dummy = new string[] { };
Init.Check(ref Dummy);
#endif
#if QY... | ```c#
using System;
using NUnit.Framework;
using Gtk;
using Qyoto;
namespace Selene.Testing
{
[TestFixture]
public partial class Harness
{
[TestFixtureSetUp]
public void Setup()
{
#if GTK
string[] Dummy = new string[] { };
Init.Check(ref Dummy);
#endif
#if QY... |
000efe5b-56f7-40af-be35-2c3d68dfeb71 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UniRx;
using UnityEngine;
public class GeneratedSignals
{
public static IObservable<float> CreateTriangleSignal(float period)
{
return Observable.IntervalFrame(1, FrameCountType.Update)
.Scan(0f, (c, _) => c + Time.del... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using UniRx;
using UnityEngine;
public static class GeneratedSignals
{
public static IObservable<float> CreateTriangleSignal(float period)
{
return Observable.IntervalFrame(1, FrameCountType.Update)
.Scan(0f, (... |
6a2b1bea-ee8c-4681-99cd-765196d1b033 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Threading;
using DesktopWidgets.Properties;
using WMPLib;
namespace DesktopWidgets.Classes
{
public static class MediaPlayerStore
{
private static readonly List<WindowsMediaPlayer> _mediaPlayerList = new List<WindowsMediaPlayer>();
... | ```c#
using System.Collections.Generic;
using System.IO;
using System.Threading;
using DesktopWidgets.Properties;
using WMPLib;
namespace DesktopWidgets.Classes
{
public static class MediaPlayerStore
{
private static readonly List<WindowsMediaPlayer> MediaPlayers = new List<WindowsMediaPlayer>
... |
932d0d02-e4c7-45d7-a3d1-7c0da5af441d | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
namespace Rock.Messaging.Routing
{
public class XmlMessageParser : IMessageParser
{
public string GetTypeName(Type type)
{
var xmlRootAttribute = Attribute.GetCustomAttribute(... | ```c#
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
namespace Rock.Messaging.Routing
{
public class XmlMessageParser : IMessageParser
{
private readonly ConcurrentDictionary<Type, XmlRootAttribute> _xmlRootAttr... |
5fc5f497-a18f-4d7a-9fbc-30fe55242823 | {
"language": "C#"
} | ```c#
using LiteDB;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace LanfeustBridge.Services
{
public class DbService
{
public DbService(DirectoryService directoryService)
{
... | ```c#
using LiteDB;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace LanfeustBridge.Services
{
public class DbService
{
public DbService(DirectoryService d... |
b6463e12-5477-4019-bc23-5f0a707d7fe7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MvcNG.Controllers
{
public class ngAppController : BaseTSController
{
//
// GET: /ngApp/main
public ActionResult main() { //DON'T USE Index - DON'T WOR... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web
using System.Web.Mvc;
namespace MvcNG.Controllers
{
public class ngAppController : BaseTSController
{
//
// GET: /ngApp/main
public ActionResult main() { //DON'T USE Index - DON'T WORK... |
b9a4c97d-05de-4387-b4f1-ca30da640e39 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("VulkanInfo GUI")]
[assembly: AssemblyDescription("Small program to obtain information from the Vulkan Runtime.")]
#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Rele... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("VulkanInfo GUI")]
[assembly: AssemblyDescription("Small program to obtain information from the Vulkan Runtime.")]
#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Rele... |
3d73ef98-7dbf-4fd1-8ee1-71008081a761 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using CppSharp.AST;
using CppSharp.Generators;
namespace Embeddinator.Generators
{
public class SwiftGenerator : Generator
{
public SwiftTypePrinter TypePrinter { get; internal set; }
public static string IntPtrType = "UnsafePointer<Vo... | ```c#
using System.Collections.Generic;
using System.Linq;
using CppSharp.AST;
using CppSharp.Generators;
namespace Embeddinator.Generators
{
public class SwiftGenerator : Generator
{
public SwiftTypePrinter TypePrinter { get; internal set; }
public static string IntPtrType = "UnsafeRawPointer... |
1e11900b-9ee6-4a3c-9ff5-259ec6f80569 | {
"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.Runtime.CompilerServices;
using osu.Framework.Platform;
namespace osu.Game.Tests
{
/// <summary>
/// A headless host which cleans up before r... | ```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.Runtime.CompilerServices;
using osu.Framework.Platform;
namespace osu.Game.Tests
{
/// <summary>
/// A headless host which cleans up before r... |
fa51d14f-0563-47e5-bd33-9ef60e288cb3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Immutable;
namespace ApiPorter.Patterns
{
public sealed partial class PatternSearch
{
private PatternSearch(string text, ImmutableArray<PatternVariable> variables)
{
Text = text;
Variables = variables;
}
publ... | ```c#
using System;
using System.Collections.Immutable;
namespace ApiPorter.Patterns
{
public sealed partial class PatternSearch
{
private PatternSearch(string text, ImmutableArray<PatternVariable> variables)
{
Text = text;
Variables = variables;
}
publ... |
aadb0217-5e0e-4d7c-843e-7dcc1fdbb515 | {
"language": "C#"
} | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using SmugMug.v2.Authentication;
using System.Threading.Tasks;
namespace SmugMug.v2.Types
{
public class SiteEntity : SmugMugEntity
{
public... | ```c#
// Copyright (c) Alex Ghiondea. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using SmugMug.v2.Authentication;
using System.Threading.Tasks;
namespace SmugMug.v2.Types
{
public class SiteEntity : SmugMugEntity
{
public... |
49c30b07-01db-433c-a820-b834bc25958f | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Note
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.Width = 160;
Style.Height = 132;
}
[DisplayName("Saved Text")]
... | ```c#
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Note
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.MinWidth = 160;
Style.MinHeight = 132;
}
[DisplayName("Saved Text... |
c64a9a1c-2ed5-4151-9a35-8e8ae7dbba9c | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Windows.Forms;
namespace SteamShutdown
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
AppDomain.Curr... | ```c#
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
namespace SteamShutdown
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
... |
8a032d6f-25e9-4586-89ea-3c8fd5e9cb4d | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
namespace OpenSage
{
public sealed class GameTimer : IDisposable
{
private readonly Stopwatch _stopwatch;
private double _startTime;
private double _lastUpdate;
public GameTime CurrentGameTime { get; private set; }
public ... | ```c#
using System;
using System.Diagnostics;
namespace OpenSage
{
public sealed class GameTimer : IDisposable
{
private readonly Stopwatch _stopwatch;
private long _startTime;
private long _lastUpdate;
public GameTime CurrentGameTime { get; private set; }
public Game... |
a44995e9-8c64-4bf3-9794-be37bf3df7cb | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
using System;
using osu.Game.Rulesets.Objects.Types;
usi... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
using System;
using osu.Game.Rulesets.Objects.Types;
usi... |
a5ecd828-d32e-444f-abd7-40fdc856c452 | {
"language": "C#"
} | ```c#
using KenticoInspector.Core.Models;
using System;
using System.Collections.Generic;
namespace KenticoInspector.Core
{
public abstract class AbstractReport<T> : IReport, IWithMetadata<T> where T : new()
{
public string Codename => GetCodename(this.GetType());
public static string GetCode... | ```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... |
d8b8ff8c-ec51-4c12-92fd-4fed33d05df8 | {
"language": "C#"
} | ```c#
using System;
using ArduinoUploader;
namespace ArduinoSketchUploader
{
/// <summary>
/// The ArduinoSketchUploader can upload a compiled (Intel) HEX file directly to an attached Arduino.
/// </summary>
internal class Program
{
private enum StatusCodes
{
Success,
... | ```c#
using System;
using ArduinoUploader;
using NLog;
namespace ArduinoSketchUploader
{
/// <summary>
/// The ArduinoSketchUploader can upload a compiled (Intel) HEX file directly to an attached Arduino.
/// </summary>
internal class Program
{
private static readonly Logger logger = LogMa... |
63de81e7-0834-4bde-a952-c7db59379dd5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework
{
public static class Extension
{
public static async Task<HttpWebResponse> GetResponseAsync(this HttpWebRequest request, CancellationToken ... | ```c#
using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework
{
public static class Extension
{
public static async Task<HttpWebResponse> GetResponseAsync(this HttpWebRequest request, CancellationToken ... |
664de106-8702-4014-a7d4-0a3ac19f96c7 | {
"language": "C#"
} | ```c#
namespace Wox.Core.Configuration
{
public interface IPortable
{
void RemoveShortcuts();
void RemoveUninstallerEntry();
void CreateShortcuts();
void CreateUninstallerEntry();
void MoveUserDataFolder(string fromLocation, string toLocation);
void VerifyUserDa... | ```c#
namespace Wox.Core.Configuration
{
public interface IPortable
{
void EnablePortableMode();
void DisablePortableMode();
void RemoveShortcuts();
void RemoveUninstallerEntry();
void CreateShortcuts();
void CreateUninstallerEntry();
void MoveUserDataFo... |
0c915700-c463-4193-8d0e-79d90f7874a6 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.S... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.