doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
90f23631-d407-4286-b88b-1c8c01c49c21 | {
"language": "C#"
} | ```c#
using Xunit;
// This is a work-around for #11.
// https://github.com/CXuesong/WikiClientLibrary/issues/11
[assembly:CollectionBehavior(DisableTestParallelization = true)]
```
Remove DisableTestParallelization on CI due to the same reason. | ```c#
using Xunit;
// This is a work-around for #11.
// https://github.com/CXuesong/WikiClientLibrary/issues/11
// We are using Bot Password on CI, which may naturally evade the issue.
#if ENV_CI_BUILD
[assembly:CollectionBehavior(DisableTestParallelization = true)]
#endif
``` |
b0be64c4-5baf-4be0-839f-13437084973f | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using AutoMapper;
using Diploms.Core;
using Diploms.Dto;
using Diploms.Dto.Departments;
namespace Diploms.Services.Departments
{
public class DepartmentsService
{
private readonly IRepository<Department> _repository;
private readonly IMapper _m... | ```c#
using System;
using System.Threading.Tasks;
using AutoMapper;
using Diploms.Core;
using Diploms.Dto;
using Diploms.Dto.Departments;
namespace Diploms.Services.Departments
{
public class DepartmentsService : CrudService<Department, DepartmentEditDto, DepartmentEditDto, DepartmentEditDto>
{
public ... |
e95beb04-2dbd-44b3-abef-12f42ddd68b8 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using System.Web.Security;
using N2.Templates.Mvc.Models.Parts;
using N2.Templates.Mvc.Models;
using N2.Web;
namespace N2.Templates.Mvc.Controllers
{
[Controls(typeof(LoginItem))]
public class LoginController : TemplatesControllerBase<LoginItem>
{
public override ActionResul... | ```c#
using System.Web.Mvc;
using System.Web.Security;
using N2.Templates.Mvc.Models.Parts;
using N2.Templates.Mvc.Models;
using N2.Web;
namespace N2.Templates.Mvc.Controllers
{
[Controls(typeof(LoginItem))]
public class LoginController : TemplatesControllerBase<LoginItem>
{
public override ActionResul... |
72fee6a8-4ab3-4631-bccf-419c76396ba1 | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
public class Projectile : MonoBehaviour
{
public float damage = 10;
public float speed = 30;
public Vector3 direction;
// Use this for initialization
void Start()
{
direction = direction.normalized * speed;
}
// Update is ca... | ```c#
using UnityEngine;
using System.Collections;
public class Projectile : MonoBehaviour
{
public float lifetime = 2;
private float age = 0;
public float damage = 10;
public float speed = 30;
public Vector3 direction;
// Use this for initialization
void Start()
{
direction ... |
0fb9f76f-0737-4772-be1c-d8543ce903e7 | {
"language": "C#"
} | ```c#
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;
namespace NDesk.DBus
{
//FIXME: this API needs review and de-unixification. I... | ```c#
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
//using GLib;
//using Gtk;
using NDesk.DBus;
using NDesk.GLib;
using org.freedesktop.DBus;
namespace NDesk.DBus
{
//FIXME: this API needs review and de-unixification. I... |
dfe82c7e-95d3-45e2-a624-851a4accf678 | {
"language": "C#"
} | ```c#
// Copyright © 2010-2014 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.
namespace CefSharp
{
public interface ILifeSpanHandler
{
bool OnBeforePopup(IWebBrowser browser, string sourceUrl, string ta... | ```c#
// Copyright © 2010-2014 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.
namespace CefSharp
{
public interface ILifeSpanHandler
{
/// <summary>
/// Called before a popup window is created.
... |
6d5c1471-8814-420a-ab5e-32f438e226bf | {
"language": "C#"
} | ```c#
namespace TweetDick.Core.Controls {
partial class FlatProgressBar {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </su... | ```c#
namespace TweetDick.Core.Controls {
partial class FlatProgressBar {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </su... |
e8ad0336-5c8b-4174-9b73-a864d2f36fab | {
"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("GoogleMeasurementProtocol")]
[assem... | ```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("GoogleMeasurementProtocol")]
[assem... |
d9fd6ec5-88cd-4e7b-9a09-55fd63159584 | {
"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 NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Tests.Visual;
using osuTK;
namespace osu.Game.Rulesets.Osu.Test... | ```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 NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Tests.Visual;
using osuTK;
namespace osu.Game.Rulesets.Osu.Test... |
1ee91787-4173-4fa0-88a4-65a90286a3d0 | {
"language": "C#"
} | ```c#
using System;
using System.Text.RegularExpressions;
namespace KillrVideo.Host.Config
{
/// <summary>
/// Gets configuration values from environment variables.
/// </summary>
public class EnvironmentConfigurationSource : IHostConfigurationSource
{
private static readonly Regex MatchCa... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace KillrVideo.Host.Config
{
/// <summary>
/// Gets configuration values from command line args and environment variables.
/// </summary>
public class EnvironmentConfigurationSource : I... |
d7bd8f41-0e71-4cb1-9f08-d42c04327402 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Harlow
{
public class VectorPoint : VectorFeature
{
public VectorPoint(int numOfPoints, ShapeType shapeType) :
base (numOfPoints, shapeType)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Harlow
{
public class VectorPoint : VectorFeature
{
public VectorPoint(int numOfPoints, ShapeType shapeType) :
base (numOfPoints, shapeType)
{
... |
fd4e9564-04f6-406a-9099-1d90be24182c | {
"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("MonoGameUtils")]
[assembly: Assembly... | ```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("MonoGameUtils")]
[assembly: Assembly... |
1eae76c3-0329-4f06-b26c-68bf485f58c6 | {
"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.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;... |
6aa1bbf3-54b0-45e4-b4bd-e3d950096412 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace PlaylistGrabber
{
public class Downloader
{
public string State { get; private set; }
public int DownloadedFiles { get; private set; }
public int TotalFiles { get; private set; }
... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace PlaylistGrabber
{
public class Downloader
{
public string State { get; private set; }
public int DownloadedFiles { get; private set; }
public int TotalFiles { get; private set; }
... |
94ec0508-dfe2-49b7-85aa-ce72c18339c7 | {
"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 Microsoft.AspNetCore.E2ETesting;
using Microsoft.AspNetCore.Testing;
using Templates.Test.Helpers;
using Xunit;
[assembly: TestFramework("M... | ```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 Microsoft.AspNetCore.E2ETesting;
using Microsoft.AspNetCore.Testing;
using Templates.Test.Helpers;
using Xunit;
[assembly: TestFramework("M... |
068177ac-332e-4881-a7a8-bc01d8ed9e16 | {
"language": "C#"
} | ```c#
using System.Threading;
using System.Threading.Tasks;
using MatterHackers.Agg.UI;
using NUnit.Framework;
namespace MatterHackers.MatterControl.Tests.Automation
{
[TestFixture, Category("MatterControl.UI.Automation"), RunInApplicationDomain]
public class ShowTerminalButtonClickedOpensTerminal
{
[Test, Apart... | ```c#
using System.Threading;
using System.Threading.Tasks;
using MatterHackers.Agg.UI;
using NUnit.Framework;
namespace MatterHackers.MatterControl.Tests.Automation
{
[TestFixture, Category("MatterControl.UI.Automation"), RunInApplicationDomain]
public class ShowTerminalButtonClickedOpensTerminal
{
[Test, Apart... |
adeccb1b-7fca-46e4-8928-ac50c829effa | {
"language": "C#"
} | ```c#
using Glimpse.Agent.Connection.Stream.Connection;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent
{
public class WebSocketChannelSender : IChannelSender
{
private readonly IMessageConverter _messageConverter;
private readonly IStreamHubProxyFactory _streamHubProxyFact... | ```c#
using Glimpse.Agent.Connection.Stream.Connection;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent
{
public class WebSocketChannelSender : IChannelSender
{
private readonly IMessageConverter _messageConverter;
private readonly IStreamHubProxyFactory _streamHubProxyFact... |
466359b6-6803-4cc3-aa8c-3504989221b2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Palaso.IO;
namespace Bloom
{
public class HelpLauncher
{
public static void Show(Control parent)
{
Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("Bloom.CHM"));
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Palaso.IO;
namespace Bloom
{
public class HelpLauncher
{
public static void Show(Control parent)
{
Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("Bloom.chm"));
... |
843d9700-1440-46ce-851c-5f3ede647893 | {
"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;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
public class DrawableTinyDroplet : DrawableDroplet
{
public ... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
public class DrawableTinyDroplet : DrawableDroplet
{
protected override float ScaleFactor => ... |
9941c875-a985-4dbc-b9e4-8523db90a4ee | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
namespace Fungus
{
// Defines a camera view point.
// The position and rotation are specified using the game object's transform, so this class
// only specifies the ortographic view size.
[ExecuteInEditMode]
public class View : MonoBehaviour
{
public float vi... | ```c#
using UnityEngine;
using System.Collections;
namespace Fungus
{
// Defines a camera view point.
// The position and rotation are specified using the game object's transform, so this class
// only specifies the ortographic view size.
[ExecuteInEditMode]
public class View : MonoBehaviour
{
public float vi... |
151715c2-6e95-4086-bed3-f48acaa0ea78 | {
"language": "C#"
} | ```c#
using System;
namespace EnjoyCQRS.Attributes
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class ProjectionProviderAttribute : Attribute
{
public Type Provider { get; }
public ProjectionProviderAttribute(Type provider)
{
Provider = provi... | ```c#
using System;
using System.Reflection;
using EnjoyCQRS.EventSource.Projections;
namespace EnjoyCQRS.Attributes
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class ProjectionProviderAttribute : Attribute
{
public Type Provider { get; }
public ProjectionProvi... |
1f101e7b-c8be-4b76-8328-f72d157667b6 | {
"language": "C#"
} | ```c#
using Baseline;
using Marten.Schema;
using Marten.Services;
using Marten.Testing.Documents;
using Shouldly;
using Xunit;
namespace Marten.Testing
{
public class duplicate_fields_in_table_and_upsert_Tests : IntegratedFixture
{
[Fact]
public void end_to_end()
{
theStore... | ```c#
using Baseline;
using Marten.Schema;
using Marten.Services;
using Marten.Testing.Documents;
using Shouldly;
using Xunit;
namespace Marten.Testing
{
public class duplicate_fields_in_table_and_upsert_Tests : IntegratedFixture
{
[Fact]
public void end_to_end()
{
theStore... |
634725fb-f873-4789-b71b-a6d3417aec36 | {
"language": "C#"
} | ```c#
using System;
using GitHub.Api;
using GitHub.Primitives;
using GitHub.Services;
using GitHub.VisualStudio;
using NSubstitute;
using Xunit;
public class SimpleApiClientFactoryTests
{
public class TheCreateMethod
{
[Fact]
public void CreatesNewInstanceOfSimpleApiClient()
{
... | ```c#
using System;
using GitHub.Api;
using GitHub.Primitives;
using GitHub.Services;
using GitHub.VisualStudio;
using NSubstitute;
using Xunit;
public class SimpleApiClientFactoryTests
{
public class TheCreateMethod
{
[Fact]
public void CreatesNewInstanceOfSimpleApiClient()
{
... |
3cc1d887-a3d2-437a-aaf5-b6ec8ab2ca79 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
```
Replace default script methods with Update & FixedUpdate met... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour {
// Update is called before rendering a frame
void Update ()
{
}
// FixedUpdate is called just before performing any physics calculations
void FixedUpdate ()
{
}
}
``` |
9d2763e6-06be-4c91-ae65-590744e79349 | {
"language": "C#"
} | ```c#
using FactorioModBuilder.Models.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FactorioModBuilder.Models.ProjectItems.Prototype
{
public class Recipe : TreeItem<Recipe>
{
public bool Enabled { get; set; }
... | ```c#
using FactorioModBuilder.Models.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FactorioModBuilder.Models.ProjectItems.Prototype
{
public class Recipe : TreeItem<Recipe>
{
public bool Enabled { get; set; }
... |
f9ba62f5-b0a3-4244-ba49-f761e20b0d6d | {
"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("HacknetPathfinder")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration(... | ```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("HacknetPathfinder")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration(... |
eabb55c5-0b20-4d14-9b3c-5ae379bd5bb8 | {
"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 WingtipToys
{
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private voi... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WingtipToys
{
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
HttpContext.Current... |
d2953d8c-2306-409f-9e1d-8a4fb3b1d4a6 | {
"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... |
7ed31358-ace5-4884-92a3-98731f578358 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace System
{
public static class ArrayExtension
{
public static int IndexOf<T>(this T[] me, T item)
{
for (int i = 0; i < me.Length; i++)
if (me[i].Equals(item))
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace System
{
public static class ArrayExtension
{
public static int IndexOf<T>(this T[] me, T item)
{
for (int i = 0; i < me.Length; i++)
if (me[i]?.Equals(item) == tru... |
7f564041-987f-4ffc-8f59-4cf0cc6df812 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SketchSolve
{
public class Parameter
{
public double Value = 0;
// true if the parameter is free to be adjusted by the
// solver
public bool free;... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SketchSolve
{
public class Parameter
{
public double Value = 0;
public double Max = 1000;
public double Min = -1000;
// true if the parameter is f... |
474331cc-7c25-4d44-ba59-ec42e3dd86bb | {
"language": "C#"
} | ```c#
using System.Xml;
using PropertyFeedSampleApp.PropertyFeed;
namespace PropertyFeedSampleApp
{
class Program
{
static void Main(string[] args)
{
const string userName = "VACATION11";
const string password = "f33der1!";
using (var client = new DataRecei... | ```c#
using System.Xml;
using PropertyFeedSampleApp.PropertyFeed;
namespace PropertyFeedSampleApp
{
class Program
{
static void Main(string[] args)
{
//You should have been provided values for the following
const string userName = "YOUR_USER_NAME";
const str... |
eecf4402-c7cc-4726-8b69-f626ff62574b | {
"language": "C#"
} | ```c#
using System.Collections.Specialized;
using System.Web;
using Microsoft.IdentityModel.Protocols;
namespace Owin.Security.Keycloak.Models
{
internal class AuthorizationResponse : OidcBaseResponse
{
public string Code { get; private set; }
public string State { get; private set; }
... | ```c#
using System;
using System.Collections.Specialized;
using System.Web;
using Microsoft.IdentityModel.Protocols;
namespace Owin.Security.Keycloak.Models
{
internal class AuthorizationResponse : OidcBaseResponse
{
public string Code { get; private set; }
public string State { get; private s... |
363fe5cb-a90a-485e-9e60-01c53d76a1a3 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Linq;
using Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring.IO;
namespace Microsoft.VisualStudio.R.Package.ProjectSystem
{
internal sealed class RMsBuildFileSystemFilter : IMsBuildFileSystemFilter
{
public bool IsFileAllowed(string relativePath, FileAttrib... | ```c#
using System;
using System.IO;
using System.Linq;
using Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring.IO;
namespace Microsoft.VisualStudio.R.Package.ProjectSystem
{
internal sealed class RMsBuildFileSystemFilter : IMsBuildFileSystemFilter
{
public bool IsFileAllowed(string relativePath, FileAttrib... |
7deeb915-1cca-4df5-b948-654b55a87029 | {
"language": "C#"
} | ```c#
#tool "nuget:?package=GitVersion.CommandLine"
#addin "Cake.Yaml"
public class ContextInfo
{
public string NugetVersion { get; set; }
public string AssemblyVersion { get; set; }
public GitVersion Git { get; set; }
public string BuildVersion
{
get { return NugetVersion + "-" + Git.Sha;... | ```c#
#tool "nuget:?package=GitVersion.CommandLine"
#addin "Cake.Yaml"
public class ContextInfo
{
public string NugetVersion { get; set; }
public string AssemblyVersion { get; set; }
public GitVersion Git { get; set; }
public string BuildVersion
{
get { return NugetVersion + "-" + Git.Sha;... |
638ca492-37c4-4360-89d2-c1c8acb35536 | {
"language": "C#"
} | ```c#
namespace OctoHook
{
using Autofac;
using Autofac.Extras.CommonServiceLocator;
using Autofac.Integration.WebApi;
using Microsoft.Practices.ServiceLocation;
using OctoHook.CommonComposition;
using Octokit;
using Octokit.Internal;
using System.Configuration;
using System.Reflection;
using System.Web;
us... | ```c#
namespace OctoHook
{
using Autofac;
using Autofac.Extras.CommonServiceLocator;
using Autofac.Integration.WebApi;
using Microsoft.Practices.ServiceLocation;
using OctoHook.CommonComposition;
using Octokit;
using Octokit.Internal;
using System.Configuration;
using System.Reflection;
using System.Web;
us... |
b5467224-cfde-4fc6-8bfd-80254acb85af | {
"language": "C#"
} | ```c#
using System.IO;
using System.Text;
using Moq;
using Xunit;
namespace AppHarbor.Tests
{
public class ApplicationConfigurationTest
{
public static string ConfigurationFile = Path.GetFullPath(".appharbor");
[Fact]
public void ShouldReturnApplicationIdIfConfigurationFileExists()
{
var fileSystem = ne... | ```c#
using System.IO;
using System.Text;
using Moq;
using Xunit;
namespace AppHarbor.Tests
{
public class ApplicationConfigurationTest
{
public static string ConfigurationFile = Path.GetFullPath(".appharbor");
[Fact]
public void ShouldReturnApplicationIdIfConfigurationFileExists()
{
var fileSystem = ne... |
7eb3f425-27f3-4377-86ce-5ef9c1b6473a | {
"language": "C#"
} | ```c#
using System;
using JetBrains.Annotations;
namespace PatchKit.Api
{
/// <summary>
/// <see cref="ApiConnection" /> settings.
/// </summary>
[Serializable]
public struct ApiConnectionSettings
{
/// <summary>
/// Returns default settings.
/// </summary>
publ... | ```c#
using System;
using JetBrains.Annotations;
namespace PatchKit.Api
{
/// <summary>
/// <see cref="ApiConnection" /> settings.
/// </summary>
[Serializable]
public struct ApiConnectionSettings
{
/// <summary>
/// Returns default settings.
/// </summary>
publ... |
f0a9d780-7a1c-4aa4-a32c-ce805e2e1bb1 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Wox.Core.i18n
{
internal static class AvailableLanguages
{
public static Language English = new Language("en", "English");
public static Language Chinese = new Language("zh-cn", "中文");
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Wox.Core.i18n
{
internal static class AvailableLanguages
{
public static Language English = new Language("en", "English");
public static Language Chinese = new Language("zh-cn", "中文");
... |
a6bd4655-e3ce-4a49-99b0-ecf1703033d9 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.AspNetCore.Builder;
namespace GlobalExceptionHandler.WebApi
{
public static class WebApiExceptionHandlingExtensions
{
[Obsolete("UseWebApiGlobalExceptionHandler is obsolete, use app.UseExceptionHandler().WithConventions(..) instead", true)]
public static IAp... | ```c#
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
namespace GlobalExceptionHandler.WebApi
{
public static class WebApiExceptionHandlingExtensions
{
[Obsolete("UseWebApiGlobalExceptionH... |
ea516e9a-a64d-4797-ab5a-f9501dfaa437 | {
"language": "C#"
} | ```c#
namespace AngleSharp.Scripting.CSharp.Tests
{
using NUnit.Framework;
using System;
using System.Threading.Tasks;
[TestFixture]
public class ConversionTests
{
[Test]
[ExpectedException(typeof(ArgumentNullException))]
public void ConvertCurrentDocumentOfFreshBrowsin... | ```c#
namespace AngleSharp.Scripting.CSharp.Tests
{
using NUnit.Framework;
using System;
using System.Threading.Tasks;
[TestFixture]
public class ConversionTests
{
[Test]
[ExpectedException(typeof(ArgumentNullException))]
public void ConvertCurrentDocumentOfFreshBrowsin... |
e2a83fd7-2091-4d0f-a75b-9d04e926f286 | {
"language": "C#"
} | ```c#
using System;
using Xamarin.Forms;
using ZXing.Net.Mobile.Forms;
using System.ComponentModel;
using System.Reflection;
using Xamarin.Forms.Platform.WinPhone;
using ZXing.Net.Mobile.Forms.WindowsPhone;
[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))]
namespace ZXing.Net.Mobi... | ```c#
using System;
using Xamarin.Forms;
using ZXing.Net.Mobile.Forms;
using System.ComponentModel;
using System.Reflection;
using Xamarin.Forms.Platform.WinPhone;
using ZXing.Net.Mobile.Forms.WindowsPhone;
[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))]
namespace ZXing.Net.Mobi... |
fe41f93a-b0d7-407f-a973-a1878e9f4d23 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OfficeDevPnP.Core.Extensions
{
public static class StreamExtensions
{
public static MemoryStream ToMemoryStream(this Stream source)
{
... | ```c#
using System.IO;
namespace OfficeDevPnP.Core.Extensions
{
public static class StreamExtensions
{
public static MemoryStream ToMemoryStream(this Stream source)
{
var stream = source as MemoryStream;
if (stream != null) return stream;
var target = new Me... |
d149cf12-266a-48bf-8e08-c200ea312e03 | {
"language": "C#"
} | ```c#
using System;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Web.Mvc;
using Microsoft.Azure;
using SFA.DAS.EmployerUsers.WebClientComponents;
namespace SFA.DAS.EmployerUsers.Web.Controllers
{
public class HomeController : ControllerBase
{
public A... | ```c#
using System;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Web.Mvc;
using Microsoft.Azure;
using SFA.DAS.EmployerUsers.WebClientComponents;
namespace SFA.DAS.EmployerUsers.Web.Controllers
{
public class HomeController : ControllerBase
{
public A... |
ffadda54-bc38-4635-bb10-d7213d3b5028 | {
"language": "C#"
} | ```c#
namespace App.Data.Migrations
{
using System.Data.Entity.Migrations;
public sealed class Configuration : DbMigrationsConfiguration<AppDbContext>
{
public Configuration()
{
this.AutomaticMigrationsEnabled = true;
this.AutomaticMigrationDataLossAllowed = true; //... | ```c#
namespace App.Data.Migrations
{
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.Linq;
using Microsoft.AspNet.Identity;
using App.Data.Models;
public sealed class Configuration : DbMigrationsConfiguration<AppDbContext>
{
p... |
7653756f-34e8-4c6b-8b68-775b8260fcc2 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... |
d177b7da-e872-4833-a4bb-a441e3ccee72 | {
"language": "C#"
} | ```c#
using System;
using Conreign.Contracts.Gameplay.Data;
using Conreign.Core;
using FluentValidation;
namespace Conreign.Server.Gameplay.Validators
{
internal class LaunchFleetValidator : AbstractValidator<FleetData>
{
private readonly Map _map;
private readonly Guid _senderId;
pub... | ```c#
using System;
using Conreign.Contracts.Gameplay.Data;
using Conreign.Core;
using FluentValidation;
namespace Conreign.Server.Gameplay.Validators
{
internal class LaunchFleetValidator : AbstractValidator<FleetData>
{
private readonly Map _map;
private readonly Guid _senderId;
pub... |
ab3c3c91-1665-4375-980e-ae567decfe57 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using UnityEngine;
public class RoomDetails : MonoBehaviour {
public int HorizontalSize;
public int VerticalSize;
private List<GameObject> Doors;
void Start() {
int doorIndex = 0;
for(int i = 0; i < transform.childCount; i++) {
Game... | ```c#
using System.Collections.Generic;
using UnityEngine;
public class RoomDetails : MonoBehaviour {
public int HorizontalSize;
public int VerticalSize;
public List<GameObject> Doors;
void Start() {
int doorIndex = 0;
for(int i = 0; i < transform.childCount; i++) {
GameO... |
7ee97b77-77f8-4461-8137-ee57029ceae5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EntryPoint;
using EntryPointTests.Helpers;
namespace EntryPointTests.AppOptionModels {
public class HelpWithRequiredArgsModel : BaseCliArguments {
public HelpWithRequiredArgsModel() : base("APP_NA... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EntryPoint;
using EntryPointTests.Helpers;
namespace EntryPointTests.AppOptionModels {
public class HelpWithRequiredArgsModel : BaseCliArguments {
public HelpWithRequiredArgsModel() : base("APP_NA... |
5ee35a2a-a869-4256-815e-2e34cef97ecc | {
"language": "C#"
} | ```c#
@model SFA.DAS.EmployerAccounts.Web.ViewModels.VacancyViewModel
<section class="dashboard-section">
<h2 class="section-heading heading-large">
Your apprenticeship advert
</h2>
<p>You have created a vacancy for your apprenticeship.</p>
<table class="responsive">
<tr>
... | ```c#
@model SFA.DAS.EmployerAccounts.Web.ViewModels.VacancyViewModel
<section class="dashboard-section">
<h2 class="section-heading heading-large">
Your apprenticeship advert
</h2>
<p>You have created a vacancy for your apprenticeship.</p>
<table class="responsive">
<tr>
... |
399dfed4-92fc-4ef1-a187-c3bbc676b59e | {
"language": "C#"
} | ```c#
using Bit.Data.Implementations;
using System;
namespace Microsoft.EntityFrameworkCore.Migrations
{
public static class MigrationBuilderExtensions
{
/// <summary>
/// <seealso cref="SqlServerJsonLogStore"/>
/// </summary>
public static void CreateSqlServerJsonLogStoreTable... | ```c#
using Bit.Data.Implementations;
using System;
using System.IO;
using System.Reflection;
namespace Microsoft.EntityFrameworkCore.Migrations
{
public static class MigrationBuilderExtensions
{
/// <summary>
/// <seealso cref="SqlServerJsonLogStore"/>
/// </summary>
public st... |
1398a446-9dff-468a-8fea-e90d8e50c4b5 | {
"language": "C#"
} | ```c#
using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2018";
public const ... | ```c#
using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2018";
public const ... |
8372e613-df94-43ba-9e9d-8a3545526570 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GamestatsBase;
namespace Sample.tetrisds
{
/// <summary>
/// Summary description for store
/// </summary>
public class store : GamestatsHandler
{
public store() : base("Wo3vqrDoL56sAdveYeC1", 0... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GamestatsBase;
namespace Sample.tetrisds
{
/// <summary>
/// Summary description for store
/// </summary>
public class store : GamestatsHandler
{
public store() : base("Wo3vqrDoL56sAdveYeC1", 0... |
bb66057b-927f-4e47-b8ec-41e17cee94a6 | {
"language": "C#"
} | ```c#
using Microsoft.Azure.AppService.ApiApps.Service;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace TRex.Extensions
{
public static class ClientTriggerCallbackExtensions
{
/// <summary>
/// Invokes the c... | ```c#
using Microsoft.Azure.AppService.ApiApps.Service;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace TRex.Extensions
{
public static class ClientTriggerCallbackExtensions
{
/// <summary>
/// Invokes the c... |
4adae523-1c57-4bb6-83ab-008e0ddda294 | {
"language": "C#"
} | ```c#
using System;
using EvilDICOM.Core.Enums;
namespace EvilDICOM.Core.IO.Data
{
public class DataRestriction
{
public static string EnforceLengthRestriction(uint lengthLimit, string data)
{
if (data.Length > lengthLimit)
{
Console.Write(
... | ```c#
using System;
using EvilDICOM.Core.Enums;
using EvilDICOM.Core.Logging;
namespace EvilDICOM.Core.IO.Data
{
public class DataRestriction
{
public static string EnforceLengthRestriction(uint lengthLimit, string data)
{
if (data.Length > lengthLimit)
{... |
4eac8ea2-cf4e-46b2-a798-f77061cfee58 | {
"language": "C#"
} | ```c#
namespace StudentsTask
{
using System;
using System.Collections.Generic;
using System.Linq;
public class Student
{
public const int MinAgeOfStudent = 6;
private string firstName;
private string lastName;
private int age;
public Student(string initial... | ```c#
// Problem 3. First before last
// Write a method that from a given array of students finds all students whose first name is before its last name alphabetically.
// Use LINQ query operators.
// Problem 4. Age range
// Write a LINQ query that finds the first name and last name of all students with age bet... |
4daf0f70-1665-434c-926d-ff1c9a508fbe | {
"language": "C#"
} | ```c#
using System.Diagnostics;
using Glimpse.Agent;
using Glimpse.Agent.Configuration;
using Glimpse.Initialization;
using Microsoft.Extensions.DependencyInjection;
namespace Glimpse.Agent.Internal.Inspectors.Mvc
{
public class AgentStartupWebDiagnosticsInspector : IAgentStartup
{
public AgentStartup... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Glimpse.Agent;
using Glimpse.Agent.Configuration;
using Glimpse.Initialization;
using Microsoft.Extensions.DependencyInjection;
namespace Glimpse.Agent.Internal.Inspectors.Mvc
{
public class AgentStartupWebDiagnosticsInspector :... |
5300edb3-ae5e-413a-b88e-6ad0440c39ba | {
"language": "C#"
} | ```c#
namespace Nop.Plugin.Api.IdentityServer.Middlewares
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.Extensions.Primitives;
public class IdentityServerScopeParame... | ```c#
namespace Nop.Plugin.Api.IdentityServer.Middlewares
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.Extensions.Primitives;
public class IdentityServerScopeParame... |
c66c1464-74c3-4b4b-aa4a-650f8b83922a | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using... |
52ad21ef-b9c8-444a-9696-7dffa629eb30 | {
"language": "C#"
} | ```c#
namespace CertiPay.Common
{
using System;
using System.Linq;
using System.Reflection;
using System.Transactions;
public static class Utilities
{
/// <summary>
/// Starts a new transaction scope with the given isolation level
/// </summary>
/// <returns></r... | ```c#
namespace CertiPay.Common
{
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Transactions;
public static class Utilities
{
/// <summary>
/// Starts a new transaction scope with the given isolation level
/// </summary>
... |
c60e1944-61f0-49ed-8ce4-a85600d791cd | {
"language": "C#"
} | ```c#
using System;
using System.Xml;
using System.Xml.Linq;
using Rainbow.Model;
namespace Rainbow.Diff.Fields
{
public class XmlComparison : FieldTypeBasedComparison
{
public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2)
{
if (string.IsNullOrWhiteSpace(field1.Value) || string.IsNul... | ```c#
using System;
using System.Xml;
using System.Xml.Linq;
using Rainbow.Model;
namespace Rainbow.Diff.Fields
{
public class XmlComparison : FieldTypeBasedComparison
{
public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2)
{
if (string.IsNullOrWhiteSpace(field1.Value) && string.IsNul... |
0631ee0e-8354-41c2-a234-4194e52f2907 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.IntegrationTest.Utilities;
using Roslyn.Test.Utilities;
using Roslyn.VisualStudio.Integratio... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.IntegrationTest.Utilities;
using Roslyn.Test.Utilities;
using Xunit;
using ProjectUtils = Mi... |
55512051-6d98-4bc1-9fff-fc51ab363a15 | {
"language": "C#"
} | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NJsonSchema.CodeGeneration.Tests.Models;
using NJsonSchema.CodeGeneration.TypeScript;
using NJsonSchema.Generation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NJsonSchema.... | ```c#
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NJsonSchema.CodeGeneration.Tests.Models;
using NJsonSchema.CodeGeneration.TypeScript;
using NJsonSchema.Generation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NJsonSchema.... |
0f9e61fb-db2d-42f4-ac5c-334c4caf1022 | {
"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.
#nullable disable
using Markdig.Syntax;
using Markdig.Syntax.Inlines;
using osu.Framework.Graphics.Containers.Markdown;
using osu.Game.Graphics.Containers.Markdown... | ```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.
#nullable disable
using Markdig.Syntax;
using osu.Framework.Graphics.Containers.Markdown;
using osu.Game.Graphics.Containers.Markdown;
namespace osu.Game.Overlays... |
5e077637-be04-436f-bb51-75b81a596b05 | {
"language": "C#"
} | ```c#
using System.Data.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using VotingApplication.Data.Context;
using VotingApplication.Data.Model;
using VotingApplication.Web.Api.Filters;
using VotingApplication.Web.Api.Models.DBViewM... | ```c#
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Net;
using VotingApplication.Data.Context;
using VotingApplication.Data.Model;
namespace VotingApplication.Web.Api.Controllers.API_Controllers
{
public class PollTokenController : WebApiController
{... |
57bc8a4a-0cee-49ae-b010-74ff632177ea | {
"language": "C#"
} | ```c#
using System;
using Microsoft.SPOT;
using MicroTweet;
using System.Net;
using System.Threading;
namespace SampleApplication
{
public class Program
{
public static void Main()
{
// Wait for DHCP
while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any)
... | ```c#
using System;
using Microsoft.SPOT;
using MicroTweet;
using System.Net;
using System.Threading;
namespace SampleApplication
{
public class Program
{
public static void Main()
{
// Wait for DHCP
while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any)
... |
e8f67fe5-0a78-4e9e-8906-31c7fad647a1 | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GlobalAssemblyInfo.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// -------------------------------------------------------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GlobalAssemblyInfo.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// -------------------------------------------------------------------... |
2254e341-0b20-48b3-8487-af936dddaf28 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Roslyn.Test.Utilities;
using Xunit;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UsePatternMatching
{
... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Roslyn.Test.Utilities;
using Xunit;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UsePatternMatching
{
... |
728365b6-3bc5-4c75-b694-ed96c9a546f4 | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SyncTrayzor.SyncThing.ApiClient
{
[JsonConverter(typeof(StringEnumConverter))]
public enum EventType
{
Starti... | ```c#
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SyncTrayzor.SyncThing.ApiClient
{
[JsonConverter(typeof(StringEnumConverter))]
public enum EventType
{
Starti... |
71d44647-758a-4adb-8824-e66fb1e9e15c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Core.Calculation.Predicate.Text
{
class TextMatchesTime : CultureSensitiveTextPredicate
{
public TextMatchesTime(bool not, string culture)... | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Core.Calculation.Predicate.Text
{
class TextMatchesTime : CultureSensitiveTextPredicate
{
public TextMatchesTime(bool not, string culture)... |
d4068536-7097-4faf-8843-8810c9e8f6de | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Screens;
namespace osu.Game.Graphics.UserInterface
{
/// <summar... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Screens;
namespace osu.Game.Graphics.UserInterface
{
/// <summar... |
51414bf5-00c2-440b-8c8f-4e57f0c5a479 | {
"language": "C#"
} | ```c#
namespace CertiPay.Common.Notifications.Notifications
{
public class AndroidNotification : Notification
{
public static string QueueName { get { return "AndroidNotifications"; } }
// TODO Android specific properties? Title, Image, Sound, Action Button, Picture, Priority
// Messa... | ```c#
using System;
namespace CertiPay.Common.Notifications.Notifications
{
public class AndroidNotification : Notification
{
public static string QueueName { get; } = "AndroidNotifications";
// Message => Content
/// <summary>
/// The subject line of the email
/// </... |
45e316b0-cb7e-4dde-b847-3f2a7d9b7f06 | {
"language": "C#"
} | ```c#
namespace GraduatedCylinder.Geo
{
public class GeoPosition
{
private readonly Length _altitude;
private readonly Latitude _latitude;
private readonly Longitude _longitude;
public GeoPosition(Latitude latitude, Longitude longitude, Length altitude = null) {
_la... | ```c#
namespace GraduatedCylinder.Geo
{
public class GeoPosition
{
private readonly Length _altitude;
private readonly Latitude _latitude;
private readonly Longitude _longitude;
public GeoPosition(Latitude latitude, Longitude longitude, Length altitude = null) {
_la... |
aa7bb0cd-ee25-4f4b-89bf-7932c1b85229 | {
"language": "C#"
} | ```c#
using Awesomium.Core;
using MVVM.CEFGlue.Infra;
using MVVM.CEFGlue.ViewModel.Example;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using ... | ```c#
using MVVM.CEFGlue.Infra;
using MVVM.CEFGlue.ViewModel.Example;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documen... |
ab85186f-ccc1-41fe-90fe-62bb0d6d9cfd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Bloom.Api;
using SIL.IO;
namespace Bloom
{
public class HelpLauncher
{
public static void Show(Control parent)
{
Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("B... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Bloom.Api;
using SIL.IO;
namespace Bloom
{
public class HelpLauncher
{
public static void Show(Control parent)
{
Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("B... |
813d63ea-4b99-43d2-8b72-fb651b00fd2b | {
"language": "C#"
} | ```c#
using System;
using Nancy;
using Nancy.Conventions;
using System.IO;
namespace OpenIDConnect.Clients.Angular14.Bootstrap
{
public class CustomNancyBootstrapper : DefaultNancyBootstrapper
{
protected override IRootPathProvider RootPathProvider
{
get { return new CustomRootPath... | ```c#
using Nancy;
using Nancy.Conventions;
using Nancy.TinyIoc;
namespace OpenIDConnect.Clients.Angular14.Bootstrap
{
public class CustomNancyBootstrapper : DefaultNancyBootstrapper
{
protected override void ApplicationStartup(TinyIoCContainer container, Nancy.Bootstrapper.IPipelines pipelines)
... |
9ef8fc24-d227-46c8-8604-ea12a3c2dba0 | {
"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 Newtonsoft.Json;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests.Responses
{
public class APIUserMostPlayedBeat... | ```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 Newtonsoft.Json;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests.Responses
{
public class APIUserMostPlayedBeat... |
a0a06800-6aa6-476d-acaf-30b14a4258f9 | {
"language": "C#"
} | ```c#
using ImGuiNET;
using OpenKh.Tools.Kh2MapStudio.Models;
using System.Numerics;
using static OpenKh.Tools.Common.CustomImGui.ImGuiEx;
namespace OpenKh.Tools.Kh2MapStudio.Windows
{
static class SpawnScriptWindow
{
private static readonly Vector4 ErrorColor = new Vector4(1.0f, 0.0f, 0.0f, 1.0f);
... | ```c#
using ImGuiNET;
using OpenKh.Tools.Kh2MapStudio.Models;
using System.Numerics;
using static OpenKh.Tools.Common.CustomImGui.ImGuiEx;
namespace OpenKh.Tools.Kh2MapStudio.Windows
{
static class SpawnScriptWindow
{
private static readonly Vector4 ErrorColor = new Vector4(1.0f, 0.0f, 0.0f, 1.0f);
... |
6111ce60-2a90-4b7c-a70f-8a505622263d | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Platform;
namespace osu.Game.Database
{
public class DatabaseContextFactory
{
private readonly GameHost host;
... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Platform;
namespace osu.Game.Database
{
public class DatabaseContextFactory
{
private readonly GameHost host;
... |
b9212813-4577-4430-92d9-ed810933b160 | {
"language": "C#"
} | ```c#
using System.ComponentModel.Composition;
using System.Windows.Controls;
using System.Windows.Input;
using GitHub.Exports;
using GitHub.ViewModels.Dialog.Clone;
namespace GitHub.VisualStudio.Views.Dialog.Clone
{
[ExportViewFor(typeof(IRepositorySelectViewModel))]
[PartCreationPolicy(CreationPolicy.NonSha... | ```c#
using System;
using System.ComponentModel.Composition;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
using GitHub.Exports;
using GitHub.ViewModels.Dialog.Clone;
namespace GitHub.VisualStudio.Views.Dialog.Clone
{
[ExportViewFor(typeof(IRepositorySelectViewModel))]... |
23522718-7820-480a-9591-ffbd03b8935b | {
"language": "C#"
} | ```c#
namespace NerdBank.GitVersioning.CloudBuildServices
{
using System;
using System.Collections.Generic;
using System.IO;
using Nerdbank.GitVersioning;
internal class GitHubActions : ICloudBuild
{
public bool IsApplicable => Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "t... | ```c#
namespace NerdBank.GitVersioning.CloudBuildServices
{
using System;
using System.Collections.Generic;
using System.IO;
using Nerdbank.GitVersioning;
internal class GitHubActions : ICloudBuild
{
public bool IsApplicable => Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "t... |
d3077207-3c0f-48d3-82dc-94af2549a4d8 | {
"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 NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Taiko.Difficulty;
using osu.Game.Tests.Beatmaps;
namesp... | ```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 NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Taiko.Difficulty;
using osu.Game.Tests.Beatmaps;
namesp... |
20e4678e-3688-4db3-b87f-1238d985e116 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyProduct("UsageStats")]
[assembly: AssemblyCompany("UsageStats")]
[assembly: AssemblyCopyright("© UsageStats contributo... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyProduct("UsageStats")]
[assembly: AssemblyCompany("UsageStats")]
[assembly: AssemblyCopyright("© UsageStats contributo... |
e4a23b55-838f-46b3-85d2-73f0577a135b | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: AssemblyTitle("PowerBridge")]
[assembly: AssemblyDescription("Build tasks that enable running Power... | ```c#
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: AssemblyTitle("PowerBridge")]
[assembly: AssemblyDescription("Build tasks that enable runni... |
e8ee15f4-185a-4cc0-9824-01d15310c4bf | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks
{
internal class NodejsTestInfo
{
public NodejsTestInfo(strin... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks
{
internal class NodejsTestInfo
{
public NodejsTestInfo(strin... |
e72901fc-abe4-4e83-8563-58d00e3bad9d | {
"language": "C#"
} | ```c#
using FacetedWorlds.MyCon.Model;
using System.Linq;
using System.Collections.Generic;
namespace FacetedWorlds.MyCon.Web.ViewModels
{
public class SpeakerViewModel
{
private readonly Speaker _speaker;
public SpeakerViewModel(Speaker speaker)
{
_speaker = speaker;
... | ```c#
using FacetedWorlds.MyCon.Model;
using System.Linq;
using System.Collections.Generic;
using System.Web.Mvc;
using FacetedWorlds.MyCon.Web.Extensions;
namespace FacetedWorlds.MyCon.Web.ViewModels
{
public class SpeakerViewModel
{
private readonly Speaker _speaker;
public SpeakerViewModel(... |
dd2080e9-e6dd-465c-820e-2a0c9ec2c01a | {
"language": "C#"
} | ```c#
using Cash_Flow_Projection.Models;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace Cash_Flow_Projection.Controllers
{
public class HomeController : Controller
{
private readonly Database db;
public HomeController(Database db)
... | ```c#
using Cash_Flow_Projection.Models;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace Cash_Flow_Projection.Controllers
{
public class HomeController : Controller
{
private readonly Database db;
public HomeController(Database db)
... |
e81e2bd3-f032-4436-912c-9aacf1293fb8 | {
"language": "C#"
} | ```c#
using ProjectCDA.Model;
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace ProjectCDA.Data
{
public class DataSource : INotifyPropertyChanged
{
private ObservableCollection<TwoPages> _Schedule;
public DataSource()
{
AddSomeDummyData();
... | ```c#
using ProjectCDA.Model;
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace ProjectCDA.Data
{
public class DataSource : INotifyPropertyChanged
{
private ObservableCollection<TwoPages> _Schedule;
public DataSource()
{
AddSomeDummyData();
... |
d5842236-0c4c-4e7c-8b14-f210e550b74c | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Glimpse.Internal;
using Microsoft.AspNetCore.Http;
using Microsoft.Net.Http.Headers;
namespace Glimpse.AgentServer.AspNet.Sample
{
public class SamplePage
{
private readonly ContextData<MessageContext> _context;
public SamplePage()
{
... | ```c#
using System.Threading.Tasks;
using Glimpse.Internal;
using Microsoft.AspNetCore.Http;
using Microsoft.Net.Http.Headers;
namespace Glimpse.AgentServer.AspNet.Sample
{
public class SamplePage
{
private readonly ContextData<MessageContext> _context;
public SamplePage()
{
... |
c3ae343f-ac7c-42cc-8196-5b5cef7b6414 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi.... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi.... |
974b4627-653f-4902-bf5b-3394328b3552 | {
"language": "C#"
} | ```c#
namespace Prometheus.HttpExporter.AspNetCore.HttpRequestCount
{
public class HttpRequestCountOptions : HttpExporterOptionsBase
{
public Counter Counter { get; set; } =
Metrics.CreateCounter(DefaultName, DefaultHelp, HttpRequestLabelNames.All);
private const string Defa... | ```c#
namespace Prometheus.HttpExporter.AspNetCore.HttpRequestCount
{
public class HttpRequestCountOptions : HttpExporterOptionsBase
{
public Counter Counter { get; set; } =
Metrics.CreateCounter(DefaultName, DefaultHelp, HttpRequestLabelNames.All);
private const string Defa... |
2a3ef8d3-4eed-41b8-9011-96ae0c6a3a3e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Fasterflect;
namespace Testity.BuildProcess.Unity3D
{
public class AddSerializedMemberStep : ITestityBuildStep
{
private readonly ITypeRelationalMapper typeResol... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Fasterflect;
namespace Testity.BuildProcess.Unity3D
{
public class AddSerializedMemberStep : ITestityBuildStep
{
private readonly ITypeRelationalMapper typeResol... |
52da1ec4-17c0-4e7e-9d55-e4f352c851f1 | {
"language": "C#"
} | ```c#
using IntegrationEngine.Core.Configuration;
using ServiceStack.ServiceClient.Web;
using System.Net;
namespace IntegrationEngine.Core.ServiceStack
{
public class JsonServiceClientAdapter : JsonServiceClient, IJsonServiceClient
{
public JsonServiceClientAdapter(IJsonServiceConfiguration jsonServic... | ```c#
using IntegrationEngine.Core.Configuration;
using ServiceStack.ServiceClient.Web;
using System.Net;
namespace IntegrationEngine.Core.ServiceStack
{
public class JsonServiceClientAdapter : JsonServiceClient, IJsonServiceClient
{
public IJsonServiceConfiguration JsonServiceConfiguration { get; set... |
af07bdbf-8dab-4acf-8bdb-3e9ee746ddce | {
"language": "C#"
} | ```c#
using Cake.Common.Tools.DotNetCore;
using Cake.Common.Tools.DotNetCore.Pack;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
[Dependency(typeof(UnitTests))]
public class Package : FrostingTask<Context>
{
public override void Run(Context context)
{
var path = new FilePath("./src/Cake.Fro... | ```c#
using Cake.Common.Tools.DotNetCore;
using Cake.Common.Tools.DotNetCore.Pack;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
[Dependency(typeof(UnitTests))]
public class Package : FrostingTask<Context>
{
public override void Run(Context context)
{
var path = new FilePath("./src/Cake.Fro... |
4d0d2526-d028-45e1-9824-6c4a4a356f1f | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ExtensionsDataModule.cs" company="Catel development team">
// Copyright (c) 2008 - 2015 Catel development team. All rights reserved.
// </copyright>
// -------------------... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ExtensionsDataModule.cs" company="Catel development team">
// Copyright (c) 2008 - 2015 Catel development team. All rights reserved.
// </copyright>
// -------------------... |
0f69e26e-43bc-479d-901a-8909439b4980 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Table;
using Newtonsoft.Json;
namespace SlashTodo.Infrastructure.AzureTables
{
public abstract class ComplexTableEntity<T> : TableEntity
{
priv... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Table;
using Newtonsoft.Json;
namespace SlashTodo.Infrastructure.AzureTables
{
public abstract class ComplexTableEntity<T> : TableEntity
{
priv... |
3f52cf21-7c82-41b9-999b-d0b0f0ea37f7 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#if (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP
using Microsoft.MixedReality.Toolkit.Utilities;
using Windows.UI.Input.Spatial;
#endif // (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP
namespace Microsoft.MixedReality.Toolkit.W... | ```c#
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#if (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP
using Microsoft.MixedReality.Toolkit.Utilities;
#if WINDOWS_UWP
using Windows.UI.Input.Spatial;
#elif DOTNETWINRT_PRESENT
using Microsoft.Windows.UI.Input.Spatial;
#endif
#endif // (U... |
c7bf2cf7-1b0b-4946-895d-043842462998 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Game.Input.Bindings;
namespace osu... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Game.Input.Bindings;
namespace osu... |
6e8b11b9-544c-4fb6-90cd-e7244b92dbc7 | {
"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.Graphics;
using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.Tests.Visual.Settings
{
public class ... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.Tests.Visual.Settings
{
public class TestScene... |
8f5e735c-2bb6-446e-ad51-556914c54f0e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace SevenDigital.Api.Wrapper.EndpointResolution
{
public static class DictionaryExtensions
{
public static string ToQueryString(this IDictionary<string, string> collection)
{
var sb = new StringBuilder();
foreach (va... | ```c#
using System.Collections.Generic;
using System.Text;
using OAuth;
namespace SevenDigital.Api.Wrapper.EndpointResolution
{
public static class DictionaryExtensions
{
public static string ToQueryString(this IDictionary<string, string> collection)
{
var sb = new StringBuilder();
foreach (var... |
e46b7bed-196d-46c3-a21d-702e2fb0e760 | {
"language": "C#"
} | ```c#
using System;
using BotBits;
namespace BotBitsExt.Rounds
{
public sealed class RoundsExtension : Extension<RoundsExtension>
{
private class Settings
{
public int MinimumPlayers { get; private set; }
public int WaitTime { get; private set; }
public bool... | ```c#
using System;
using BotBits;
namespace BotBitsExt.Rounds
{
public sealed class RoundsExtension : Extension<RoundsExtension>
{
private class Settings
{
public int MinimumPlayers { get; private set; }
public int WaitTime { get; private set; }
public bool... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.