doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
3f491634-4517-4cca-92d7-492f8b3b2720 | {
"language": "C#"
} | ```c#
// Copyright (c) Samuel Cragg.
//
// Licensed under the MIT license. See LICENSE file in the project root for
// full license information.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Samu... | ```c#
// Copyright (c) Samuel Cragg.
//
// Licensed under the MIT license. See LICENSE file in the project root for
// full license information.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Samu... |
b5117578-ebba-44c9-b77d-8dbccce5bd76 | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class DestroyEnemy : MonoBehaviour {
public static int kills = 0;
void OnCollisionEnter (Collision col) {
if(col.gameObject.name.Contains("Monster")) {
kills += 1;
Destroy(col.gam... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class DestroyEnemy : MonoBehaviour {
public static int kills = 0;
void OnCollisionEnter (Collision col) {
if(col.gameObject.name.Contains("Monster")) {
kills += 1;
Destroy(col.gam... |
c922c2d5-6503-4c32-8403-70ac1353ae20 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.Extensions.DependencyInjection;
using MR.Augmenter.Internal;
namespace MR.Augmenter
{
public static class AugmenterServiceCollectionExtensions
{
public static IAugmenterBuilder AddAugmenter(
this IServiceCollection services,
Action<AugmenterConfiguration> configure)
{
... | ```c#
using System;
using Microsoft.Extensions.DependencyInjection;
using MR.Augmenter.Internal;
namespace MR.Augmenter
{
public static class AugmenterServiceCollectionExtensions
{
/// <summary>
/// Adds augmenter to services.
/// </summary>
/// <param name="services"></param>
/// <param name="configure">... |
7df946f4-8857-4bf5-a03c-31d7b7c27f45 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Input;
using AudioSharp.Utils;
namespace AudioSharp.Config
{
public class ConfigHandler
{
public static void SaveConfig(Configuration config)
{
string json = JsonUtils.SerializeObject(config)... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Input;
using AudioSharp.Utils;
namespace AudioSharp.Config
{
public class ConfigHandler
{
public static void SaveConfig(Configuration config)
{
string json = JsonUtils.SerializeObject(config)... |
25ac93b6-6bae-45fc-825f-3f49f16b50aa | {
"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... |
a562a879-d394-4e65-aabb-7a4673a2d0d9 | {
"language": "C#"
} | ```c#
using System.Linq;
using BobTheBuilder.ArgumentStore.Queries;
using JetBrains.Annotations;
namespace BobTheBuilder.Activation
{
internal class InstanceCreator
{
private readonly IArgumentStoreQuery constructorArgumentsQuery;
public InstanceCreator([NotNull]IArgumentStoreQuery constructo... | ```c#
using System.Linq;
using BobTheBuilder.ArgumentStore.Queries;
using JetBrains.Annotations;
namespace BobTheBuilder.Activation
{
internal class InstanceCreator
{
private readonly IArgumentStoreQuery constructorArgumentsQuery;
public InstanceCreator([NotNull]IArgumentStoreQuery constructo... |
505349c1-96c5-42bc-a5b5-000a93938143 | {
"language": "C#"
} | ```c#
using System;
using System.Web.Mvc;
using TeacherPouch.Models;
using TeacherPouch.Web.ViewModels;
namespace TeacherPouch.Web.Controllers
{
public partial class PagesController : ControllerBase
{
// GET: /
public virtual ViewResult Home()
{
return View(Views.Home);
... | ```c#
using System;
using System.Web.Mvc;
using TeacherPouch.Models;
using TeacherPouch.Web.ViewModels;
namespace TeacherPouch.Web.Controllers
{
public partial class PagesController : ControllerBase
{
// GET: /
public virtual ViewResult Home()
{
return View(Views.Home);
... |
9146a7ba-3b6b-4f04-ba6e-acfb8e61befe | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation.Language;
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Extensions
{
// TODO Add documentation
public static class Extensions
{
public static IEnumerable<string> GetLines(this string... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation.Language;
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Extensions
{
// TODO Add documentation
public static class Extensions
{
public static IEnumerable<string> GetLines(this string... |
67039100-fe33-4dbe-a7f8-2cb453a0a46c | {
"language": "C#"
} | ```c#
using GitHub.Exports;
using GitHub.UI;
using GitHub.ViewModels;
using System.ComponentModel.Composition;
using System.Windows.Controls;
using ReactiveUI;
namespace GitHub.VisualStudio.UI.Views
{
public class GenericPullRequestCreationView : SimpleViewUserControl<IPullRequestCreationViewModel, GenericPullReq... | ```c#
using GitHub.Exports;
using GitHub.UI;
using GitHub.ViewModels;
using System.ComponentModel.Composition;
using System.Windows.Controls;
using ReactiveUI;
namespace GitHub.VisualStudio.UI.Views
{
public class GenericPullRequestCreationView : SimpleViewUserControl<IPullRequestCreationViewModel, GenericPullReq... |
b43df912-8ccf-4933-bf77-fdf9e0678a74 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Net;
using AngleSharp;
using AngleSharp.Parser.Html;
namespace WebDriverManager.DriverConfigs.Impl
{
public class OperaConfig : IDriverConfig
{
public virtual string GetName()
{
return "Opera";
}
public virtual string GetUrl32(... | ```c#
using System.Linq;
using System.Net;
using AngleSharp;
using AngleSharp.Parser.Html;
namespace WebDriverManager.DriverConfigs.Impl
{
public class OperaConfig : IDriverConfig
{
public virtual string GetName()
{
return "Opera";
}
public virtual string GetUrl32(... |
bb16d444-57b0-43bb-84c8-9069abceeada | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
using Newtonsoft.Json;
/// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt season.</summary>
public class TraktSeasonIds
{
/// <summary>Gets or sets the Trakt numeric id.</summary>
[Jso... | ```c#
namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
using Newtonsoft.Json;
/// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt season.</summary>
public class TraktSeasonIds
{
/// <summary>Gets or sets the Trakt numeric id.</summary>
[Jso... |
b822c693-824c-4fd8-bb3f-3cb9ee325cf2 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Mindscape.Raygun4Net
{
public static class RaygunExceptionFilterAttacher
{
public static void AttachExceptionFilter(HttpApplication context, RaygunHttpModule module)
{
if (GlobalFilters.Filters.Count == 0) retur... | ```c#
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Mindscape.Raygun4Net
{
public static class RaygunExceptionFilterAttacher
{
public static void AttachExceptionFilter(HttpApplication context, RaygunHttpModule module)
{
if (GlobalFilters.Filters.Count == 0) return;
Filt... |
bbdf75b6-0314-4c0d-8557-04d34a4e8d02 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
namespace System.Web.OData.Design.Scaffolding
{
internal static class ScaffolderVersions
{
public static readonly Version WebApiOD... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
namespace System.Web.OData.Design.Scaffolding
{
internal static class ScaffolderVersions
{
public static readonly Version WebApiOD... |
854ff966-94e7-4652-9603-0ed6a1d8f364 | {
"language": "C#"
} | ```c#
using System.Linq;
using NUnit.Framework;
namespace LastPass.Test
{
[TestFixture]
class VaultTest
{
[Test]
public void Create_returns_vault_with_correct_accounts()
{
var vault = Vault.Create(new Blob(TestData.Blob, 1));
Assert.AreEqual(TestData.Accounts... | ```c#
using System.Linq;
using NUnit.Framework;
namespace LastPass.Test
{
[TestFixture]
class VaultTest
{
[Test]
public void Create_returns_vault_with_correct_accounts()
{
var vault = Vault.Create(new Blob(TestData.Blob, 1));
Assert.AreEqual(TestData.Accounts... |
134cd3de-b539-4098-9f34-5a25acec16cb | {
"language": "C#"
} | ```c#
using Urho.Gui;
using Urho.Resources;
namespace Urho.Portable
{
//TODO: generate this class using T4 from CoreData folder
public static class CoreAssets
{
public static ResourceCache Cache => Application.Current.ResourceCache;
public static class Models
{
public static Model Box => Cache.GetModel("... | ```c#
using Urho.Gui;
using Urho.Resources;
namespace Urho
{
//TODO: generate this class using T4 from CoreData folder
public static class CoreAssets
{
public static ResourceCache Cache => Application.Current.ResourceCache;
public static class Models
{
public static Model Box => Cache.GetModel("Models/Bo... |
ee02cce0-b2ac-49dd-9ed4-59c747e74f74 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.EntityFrameworkCore;
using SupportManager.Telegram.DAL;
using Topshelf;
namespace SupportManager.Telegram
{
class Program
{
static void Main(string[] args)
{
if (args.Length == 2 && args[0].Equals("migrate", StringComparison.InvariantCultureIgnor... | ```c#
using System;
using Microsoft.EntityFrameworkCore;
using SupportManager.Telegram;
using SupportManager.Telegram.Infrastructure;
using Topshelf;
if (args.Length == 2 && args[0].Equals("migrate", StringComparison.InvariantCultureIgnoreCase))
{
var db = DbContextFactory.Create(args[1]);
db.Database.Migrat... |
f29b45d1-012e-4899-8466-ee832fbe0d72 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace LazyStorage
{
public class StorableObject : IEquatable<StorableObject>
{
public int LazyStorageInternalId { get; set; }
public Dictionary<string, string> Info { get; }
public StorableObject()
{
Info = n... | ```c#
using System;
using System.Collections.Generic;
namespace LazyStorage
{
public class StorableObject
{
public Dictionary<string, string> Info { get; }
public StorableObject()
{
Info = new Dictionary<string, string>();
}
}
}``` |
b13c2766-328b-4673-a2dc-1f2f029950dd | {
"language": "C#"
} | ```c#
using System;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Core.DomainModel;
using Core.DomainServices;
using Presentation.Web.Models;
namespace Presentation.Web.Controllers.API
{
public class PasswordResetRequestController : BaseApiController
{
private readonly IUserSer... | ```c#
using System;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Core.DomainModel;
using Core.DomainServices;
using Presentation.Web.Models;
namespace Presentation.Web.Controllers.API
{
[AllowAnonymous]
public class PasswordResetRequestController : BaseApiController
{
priv... |
dbf2ca8b-12ac-47d1-9487-f0b79971394a | {
"language": "C#"
} | ```c#
using System;
using System.Web;
using System.Web.Hosting;
namespace NuGet.Server.Infrastructure {
public class PackageUtility {
internal static string PackagePhysicalPath = HostingEnvironment.MapPath("~/Packages");
public static Uri GetPackageUrl(string path, Uri baseUri) {
... | ```c#
using System;
using System.Web;
using System.Web.Hosting;
using System.Configuration;
namespace NuGet.Server.Infrastructure
{
public class PackageUtility
{
internal static string PackagePhysicalPath;
private static string DefaultPackagePhysicalPath = HostingEnvironment.MapPath... |
11c21e6d-146f-424a-85b4-3d6ed656e91a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace NFleet.Data
{
public class RouteEventData : IResponseData, IVersioned
{
public static string MIMEType = "application/vnd.jyu.nfleet.routeevent";
public static string MIMEVersion = "2.0";
int IVersioned.VersionNumber { get... | ```c#
using System;
using System.Collections.Generic;
namespace NFleet.Data
{
public class RouteEventData : IResponseData, IVersioned
{
public static string MIMEType = "application/vnd.jyu.nfleet.routeevent";
public static string MIMEVersion = "2.0";
int IVersioned.VersionNumber { get... |
fbe33988-9e84-447b-98be-b979f0812c42 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using System.Text;
namespace SCPI
{
public class IDN : ICommand
{
public string Description => "Query the ID string of the instrument";
public string Manufacturer { get; private set; }
public string Model { get; private set; }
public stri... | ```c#
using System.Linq;
using System.Text;
namespace SCPI
{
public class IDN : ICommand
{
public string Description => "Query the ID string of the instrument";
public string Manufacturer { get; private set; }
public string Model { get; private set; }
public string SerialNumbe... |
96bd2a29-613b-49aa-ae5e-8bf0742f3c99 | {
"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.
namespace osu.Framework.Graphics.Cursor
{
/// <summary>
/// Implementing this interface allows the implementing <see cref="Drawable"/> to display a custom ... | ```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.Framework.Graphics.Cursor
{
/// <summary>
/// Implementing this interface allows the implementing <see cref="Drawable"/> to display a custom ... |
b624ca7b-38d8-41ec-92a0-3efcaa594c77 | {
"language": "C#"
} | ```c#
using NPoco;
using System;
namespace Dalian.Models
{
[PrimaryKey("SiteId")]
public class Sites
{
public string SiteId { get; set; }
public string Name { get; set; }
public string Url { get; set; }
public string Note { get; set; }
public string Source { get; se... | ```c#
using NPoco;
using System;
namespace Dalian.Models
{
[PrimaryKey("SiteId", AutoIncrement = false)]
public class Sites
{
public string SiteId { get; set; }
public string Name { get; set; }
public string Url { get; set; }
public string Note { get; set; }
public ... |
f2f09e69-bb7f-4562-a8e0-ece17216b489 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Autofac;
using Autofac.Core;
namespace ServiceStack.DependencyInjection
{
public class DependencyResolver : IDisposable
{
private readonly ILifetimeScope _lifetimeScope;
public DependencyResolver(ILifetimeScope lifetimeScope)
... | ```c#
using System;
using System.Collections.Generic;
using Autofac;
using Autofac.Core;
namespace ServiceStack.DependencyInjection
{
public class DependencyResolver : IDisposable
{
private readonly ILifetimeScope _lifetimeScope;
public DependencyResolver(ILifetimeScope lifetimeScope)
... |
5d88623e-c3ea-45e8-8f62-7f6e302a588c | {
"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.Input.Events;
using osu.Framework.Utils;
using osu.Game.Graphics.Containers;
namespace osu.Game.Beatmaps.Drawables.Cards
{
pu... | ```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.Input.Events;
using osu.Framework.Utils;
using osu.Game.Graphics.Containers;
namespace osu.Game.Beatmaps.Drawables.Cards
{
pu... |
63a2fc6b-5a03-490a-96b6-6d72a5620686 | {
"language": "C#"
} | ```c#
@model dynamic
@{
ViewBag.Title = "Регистрация успешна";
}
<h2>@ViewBag.Title</h2>
<p>Остался всего один клик! Проверьте свою почту, там лежит письмо от нас с просьбой подтвердить email...</p>
```
Change message in register success | ```c#
@model dynamic
@{
ViewBag.Title = "Регистрация успешна";
}
<h2>@ViewBag.Title</h2>
<p>Остался всего один клик! Проверьте свою почту, там лежит письмо от нас с просьбой подтвердить email.</p>
``` |
cff90967-3510-4475-a869-9bd416b19602 | {
"language": "C#"
} | ```c#
using System;
using Ooui;
namespace Samples
{
class Program
{
static void Main (string[] args)
{
new ButtonSample ().Publish ();
new TodoSample ().Publish ();
Console.ReadLine ();
}
}
}
```
Add --port option to samples | ```c#
using System;
using Ooui;
namespace Samples
{
class Program
{
static void Main (string[] args)
{
for (var i = 0; i < args.Length; i++) {
var a = args[i];
switch (args[i]) {
case "-p" when i + 1 < args.Length:
... |
fe6bd2f4-5c09-43ef-9ff4-beee9d10056d | {
"language": "C#"
} | ```c#
using Hangfire.Common;
using Hangfire.Console.Serialization;
using Hangfire.Console.Storage;
using Hangfire.Server;
using Hangfire.States;
using System;
namespace Hangfire.Console.Server
{
/// <summary>
/// Server filter to initialize and cleanup console environment.
/// </summary>
internal clas... | ```c#
using Hangfire.Common;
using Hangfire.Console.Serialization;
using Hangfire.Console.Storage;
using Hangfire.Server;
using Hangfire.States;
using System;
namespace Hangfire.Console.Server
{
/// <summary>
/// Server filter to initialize and cleanup console environment.
/// </summary>
internal clas... |
c864b376-36ab-4210-94c7-df54eee609da | {
"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.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Osu.Mods
{
public class OsuModTouchDevice : Mod
{
public override string Name => "Touch D... | ```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.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Osu.Mods
{
public class OsuModTouchDevice : Mod
{
public override string Name => "Touch D... |
df168a65-6e81-4d9f-8234-7735996a2f5f | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DarkRoomObstacleEnable : MonoBehaviour
{
[SerializeField]
private float maxXDistance = 11f;
void Start ()
{
}
void Update ()
{
for (int i = 0; i < transform.childCount; i++)
{... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class DarkRoomObstacleEnable : MonoBehaviour
{
[SerializeField]
private float maxXDistance = 11f;
void Start ()
{
for (int i = 0; i < transform.childCount; i++)
{
... |
49c6e682-5b3f-4954-a177-6eb13451bff5 | {
"language": "C#"
} | ```c#
using System;
namespace clipr
{
/// <summary>
/// Mark the property as a subcommand. (cf. 'svn checkout')
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public class VerbAttribute : Attribute
{
/// <summary>
/// Name of the subcommand. If... | ```c#
using System;
namespace clipr
{
/// <summary>
/// Mark the property as a subcommand. (cf. 'svn checkout')
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public class VerbAttribute : Attribute
{
/// <summary>
/// Name of the subcommand. If... |
4cb37f64-25a4-40e8-8d4d-d3909b501929 | {
"language": "C#"
} | ```c#
#tool nuget:?package=XamarinComponent&version=1.1.0.32
#addin nuget:?package=Cake.Xamarin.Build&version=1.0.14.0
#addin nuget:?package=Cake.Xamarin
#addin nuget:?package=Cake.XCode
```
Remove explicit build addin dependency version | ```c#
#tool nuget:?package=XamarinComponent&version=1.1.0.32
#addin nuget:?package=Cake.Xamarin.Build
#addin nuget:?package=Cake.Xamarin
#addin nuget:?package=Cake.XCode
``` |
2749ddec-8392-4506-856f-248abab67455 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using KafkaNet;
using KafkaNet.Model;
using KafkaNet.Protocol;
using System.Collections.Generic;
namespace TestHarness
{
class Program
{
static void Main(string[] args)
{
var options = new KafkaOptions(new Uri("http://CSDKAFKA01:909... | ```c#
using System;
using System.Threading.Tasks;
using KafkaNet;
using KafkaNet.Common;
using KafkaNet.Model;
using KafkaNet.Protocol;
using System.Collections.Generic;
namespace TestHarness
{
class Program
{
static void Main(string[] args)
{
//create an options file that sets up ... |
65e0b65d-ccbf-4e54-90c3-33fba6061ad9 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace TweetDuck.Video.Controls{
sealed class LabelTooltip : Label{
public LabelTooltip(){
Visible = false;
}
public void AttachTooltip(Control control, bool followCursor, string... | ```c#
using System;
using System.Drawing;
using System.Windows.Forms;
namespace TweetDuck.Video.Controls{
sealed class LabelTooltip : Label{
public LabelTooltip(){
Visible = false;
}
public void AttachTooltip(Control control, bool followCursor, string tooltip){
Att... |
a79e2588-177d-499a-8a32-066f6e7c3c3b | {
"language": "C#"
} | ```c#
// Licensed under the GPL License, Version 3.0. See LICENSE in the git repository root for license information.
using Newtonsoft.Json;
namespace Ecwid.Models
{
/// <summary>
/// </summary>
public class TaxRule
{
/// <summary>
/// Gets or sets the tax in %.
/// </summary>... | ```c#
// Licensed under the GPL License, Version 3.0. See LICENSE in the git repository root for license information.
using Newtonsoft.Json;
namespace Ecwid.Models
{
/// <summary>
/// </summary>
public class TaxRule
{
/// <summary>
/// Gets or sets the tax in %.
/// </summary>... |
5bf5f018-084a-487a-a5cf-6b363f725f31 | {
"language": "C#"
} | ```c#
using System;
using System.Data;
using System.Data.Common;
namespace Rebus.AdoNet.Dialects
{
public class PostgreSql82Dialect : PostgreSqlDialect
{
protected override Version MinimumDatabaseVersion => new Version("8.2");
public override ushort Priority => 82;
public override bool SupportsReturningClaus... | ```c#
using System;
using System.Linq;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
namespace Rebus.AdoNet.Dialects
{
public class PostgreSql82Dialect : PostgreSqlDialect
{
private static readonly IEnumerable<string> _postgresExceptionNames = new[] { "NpgsqlException", "PostgresEx... |
8ca55919-6ff9-4af2-9c67-1f5d22bb7657 | {
"language": "C#"
} | ```c#
using UnityEditor;
using UnityEngine;
namespace Tactosy.Unity
{
[CustomEditor(typeof(Manager_Tactosy))]
public class TactosyEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
Manager_Tactosy tactosyManager = (Manager_Tactosy) ... | ```c#
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
namespace Tactosy.Unity
{
#if UNITY_EDITOR
[CustomEditor(typeof(Manager_Tactosy))]
public class TactosyEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
Manager_Tac... |
6af94d6b-67b0-44aa-8c9f-d767565b52fc | {
"language": "C#"
} | ```c#
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public clas... | ```c#
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public clas... |
fb29642d-bd11-4a08-a978-2d58854ca09c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace Biggy.SqlCe.Tests {
[Trait("SQL CE Compact column mapping", "")]
public class SqlCEColumnMapping {
public string _connectionStringName = "chinook";
[Fact(Displa... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace Biggy.SqlCe.Tests {
[Trait("SQL CE Compact column mapping", "")]
public class SqlCEColumnMapping {
public string _connectionStringName = "chinook";
[Fact(Displa... |
1bdb8380-a850-4f2e-9ac8-1b256831158f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using Bloom.Publish;
using BloomTemp;
using Chorus.VcsDrivers.Mercurial;
using LibChorus.TestUtilities;
using NUnit.Framework;
using Palaso.IO;
using Palaso.Progress.LogBox;
namesp... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using Bloom.Publish;
using BloomTemp;
using Chorus.VcsDrivers.Mercurial;
using LibChorus.TestUtilities;
using NUnit.Framework;
using Palaso.IO;
using Palaso.Progress.LogBox;
namesp... |
bdf28392-c5d2-4e46-b771-fab7f5fc2019 | {
"language": "C#"
} | ```c#
using System;
using System.Windows.Forms;
namespace BZ2TerrainEditor
{
/// <summary>
/// Main class.
/// </summary>
public static class Program
{
private static int editorInstances;
/// <summary>
/// Gets or sets the number of editor instances.
/// The application will exit when the number of inst... | ```c#
using System;
using System.Windows.Forms;
namespace BZ2TerrainEditor
{
/// <summary>
/// Main class.
/// </summary>
public static class Program
{
private static int editorInstances;
/// <summary>
/// Gets or sets the number of editor instances.
/// The application will exit when the number of inst... |
5b350de2-d8ac-4336-abc3-c94645b01837 | {
"language": "C#"
} | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class ResetBallUI : NetworkBehaviour {
private void OnGUI()
{
GUILayout.BeginArea(new Rect(Screen.width - 150, 10, 140, 40));
if (GUILayout.Button("Reset Bal... | ```c#
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Networking.NetworkSystem;
public class ResetBallUI : NetworkBehaviour {
// Message handle for the client id message
private short RESPAWN_MESSAGE = 1003;
void OnServe... |
d32bf0dd-b82b-49c1-9ee5-f01a5b36d3ac | {
"language": "C#"
} | ```c#
using System;
using System.Timers;
using Shell.Execute;
namespace PiDashcam
{
public class StillCam
{
Timer timer;
int imgcounter;
public StillCam()
{
timer = new Timer(10000);
timer.Elapsed += Timer_Elapsed;
timer.Start();
imgcounter = 1;
}
public void Stop()
{
timer.Stop();
... | ```c#
using System;
using System.Timers;
using Shell.Execute;
namespace PiDashcam
{
public class StillCam
{
Timer timer;
int imgcounter;
public StillCam()
{
timer = new Timer(6000);
timer.Elapsed += Timer_Elapsed;
timer.Start();
imgcounter = 1;
}
public void Stop()
{
timer.Stop();
}... |
ad0e264e-21c8-448a-9336-c5dee35cf795 | {
"language": "C#"
} | ```c#
using CertiPay.Common.Logging;
using NUnit.Framework;
using System;
using System.Threading;
namespace CertiPay.Common.Tests.Logging
{
public class MetricLoggingExtensionsTests
{
private static readonly ILog Log = LogManager.GetLogger<MetricLoggingExtensionsTests>();
[Test]
publi... | ```c#
using CertiPay.Common.Logging;
using NUnit.Framework;
using System;
using System.Threading;
namespace CertiPay.Common.Tests.Logging
{
public class MetricLoggingExtensionsTests
{
private static readonly ILog Log = LogManager.GetLogger<MetricLoggingExtensionsTests>();
[Test]
publi... |
6af431af-f24d-4138-bb24-efbf86618458 | {
"language": "C#"
} | ```c#
using UnityEngine;
public class ReturnToHiveState : State
{
Arrive arrive;
public ReturnToHiveState(GameObject gameObject) : base(gameObject)
{
this.gameObject = gameObject;
}
public override void Enter()
{
arrive = gameObject.GetComponent<Arrive>();
arrive.targ... | ```c#
using UnityEngine;
public class ReturnToHiveState : State
{
Arrive arrive;
public ReturnToHiveState(GameObject gameObject) : base(gameObject)
{
this.gameObject = gameObject;
}
public override void Enter()
{
arrive = gameObject.GetComponent<Arrive>();
arrive.targ... |
c92d9699-84f0-427a-94b0-c1bb4dd7e88b | {
"language": "C#"
} | ```c#
namespace Veil.Compiler
{
internal partial class VeilTemplateCompiler
{
private static void EmitWriteExpression<T>(VeilCompilerState<T> state, SyntaxTreeNode.WriteExpressionNode node)
{
state.Emitter.LoadWriterToStack();
state.PushExpressionScopeOnStack(node.Expres... | ```c#
using System.Reflection;
namespace Veil.Compiler
{
internal partial class VeilTemplateCompiler
{
private static MethodInfo htmlEncodeMethod = typeof(Helpers).GetMethod("HtmlEncode");
private static void EmitWriteExpression<T>(VeilCompilerState<T> state, SyntaxTreeNode.WriteExpressionNod... |
a1d97ec3-f335-4a16-845e-48976fbdc00e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Witness.Controllers
{
public class SandboxController : Controller
{
public ActionResult Index()
{
return View();
}
}
}
```
Add sho... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Witness.Controllers
{
public class SandboxController : Controller
{
public ActionResult Index()
{
Response.Cache.SetExpires(DateTime.UtcNow.AddMinu... |
47c2243b-568d-4481-90ac-0599aa7e1af9 | {
"language": "C#"
} | ```c#
namespace Sep.Git.Tfs.Core.TfsInterop
{
public class WrapperFor<T>
{
private readonly T _wrapped;
public WrapperFor(T wrapped)
{
_wrapped = wrapped;
}
public T Unwrap()
{
return _wrapped;
}
public static T Unwrap(o... | ```c#
namespace Sep.Git.Tfs.Core.TfsInterop
{
public class WrapperFor<TFS_TYPE>
{
private readonly TFS_TYPE _wrapped;
public WrapperFor(TFS_TYPE wrapped)
{
_wrapped = wrapped;
}
public TFS_TYPE Unwrap()
{
return _wrapped;
}
... |
ca7d09a7-237a-4b52-a9cc-fdd6eb402f0c | {
"language": "C#"
} | ```c#
// Copyright 2020 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.Execution;
using Nuke.Common.Tools.DotNet;
namespace Nuke.Common.CI
{
[PublicAPI]
[Attrib... | ```c#
// Copyright 2020 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.Execution;
using Nuke.Common.Tools.DotNet;
namespace Nuke.Common.CI
{
[PublicAPI]
[Attrib... |
30a8e288-e2eb-454e-a150-56e7cc1e3f32 | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... | ```c#
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-ge... |
b6cd03a6-b12f-431c-9367-cf314e2edbae | {
"language": "C#"
} | ```c#
@model Dinamico.Models.ContentPage
@{
Content.Define(re =>
{
re.Title = "News page";
re.IconUrl = "{IconsUrl}/newspaper.png";
re.DefaultValue("Visible", false);
re.RestrictParents("Container");
re.Sort(N2.Definitions.SortBy.PublishedDescending);
});
}
@Html.Partial("LayoutPartials/Bl... | ```c#
@model Dinamico.Models.ContentPage
@{
Content.Define(re =>
{
re.Title = "News page";
re.IconUrl = "{IconsUrl}/newspaper.png";
re.DefaultValue("Visible", false);
re.RestrictParents("Container");
re.Sort(N2.Definitions.SortBy.PublishedDescending);
re.Tags("Tags");
});
}
@Html.Partia... |
3c1cc699-84e9-4e2d-96d9-d780c7cd1be3 | {
"language": "C#"
} | ```c#
namespace WarehouseSystem.Web
{
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using WarehouseSystem.Web.App_Start;
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration... | ```c#
namespace WarehouseSystem.Web
{
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using WarehouseSystem.Web.App_Start;
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
ViewEngines.Engi... |
0f169de4-5fa9-418b-b622-6bc984f4476e | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Newtonsoft.Json;
using System;
using Newtonsoft.Json.Converters;
namespace Nest
{
[JsonObject(MemberSerialization.OptIn)]
public class DateMapping : MultiFieldMapping, IElasticType, IElasticCoreType
{
public DateMapping():base("date")
{
}
/// <summary>
/// Th... | ```c#
using System.Collections.Generic;
using Newtonsoft.Json;
using System;
using Newtonsoft.Json.Converters;
namespace Nest
{
[JsonObject(MemberSerialization.OptIn)]
public class DateMapping : MultiFieldMapping, IElasticType, IElasticCoreType
{
public DateMapping():base("date")
{
}
/// <summary>
/// Th... |
f76d8e53-56d0-4454-b5b9-8442002409e8 | {
"language": "C#"
} | ```c#
@model SFA.DAS.EmployerAccounts.Web.ViewModels.AccountDashboardViewModel
<div class="das-panel das-panel--featured">
@if (Model.ReservedFundingToShow != null)
{
<h3 class="das-panel__heading">Apprenticeship funding secured</h3>
<dl class="das-definition-list das-definition-list--with... | ```c#
@model SFA.DAS.EmployerAccounts.Web.ViewModels.AccountDashboardViewModel
@if (Model.ReservedFundingToShow != null)
{
<h3 class="das-panel__heading">Apprenticeship funding secured</h3>
<dl class="das-definition-list das-definition-list--with-separator">
<dt class="das-definition-list__title">Lega... |
fddb014f-b504-4c9f-b65e-01009da45d8e | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Azure.Mobile.Server;
using DailySoccer.Shared.Models;
namespace DailySoccerAppService.Controllers
{
public class MatchesController : ApiController
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Azure.Mobile.Server;
using DailySoccer.Shared.Models;
namespace DailySoccerAppService.Controllers
{
public class MatchesController : ApiController
{
... |
0a1586dc-4b2b-4c76-bab0-0170fcd39af7 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Threading;
namespace Smaller
{
public class RunJobController
{
private static readonly EventWaitHandle _showSi... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Threading;
namespace Smaller
{
public class RunJobController
{
private static readonly EventWaitHandle _showSi... |
c837bef6-f8f0-42b8-b53c-ea7a5ad6163f | {
"language": "C#"
} | ```c#
using System;
namespace TAPCfg {
public class EthernetFrame {
private byte[] data;
private byte[] src = new byte[6];
private byte[] dst = new byte[6];
private int etherType;
public EthernetFrame(byte[] data) {
this.data = data;
Array.Copy(data, 0, dst, 0, 6);
Array.Copy(data, 6, src, 0, 6);... | ```c#
using System;
namespace TAPCfg {
public enum EtherType : int {
InterNetwork = 0x0800,
ARP = 0x0806,
RARP = 0x8035,
AppleTalk = 0x809b,
AARP = 0x80f3,
InterNetworkV6 = 0x86dd,
CobraNet = 0x8819,
}
public class EthernetFrame {
private byte[] data;
... |
287fca0d-5718-46ab-addb-5a0f89ae48b0 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace Cake.AppVeyor.Tests
{
public static class Keys
{
const string YOUR_APPVEYOR_API_TOKEN = "{APPVEYOR_APITOKEN}";
static string appVeyorApiToken;
public static string AppVeyorApiToken {
get
{
if ... | ```c#
using System;
using System.IO;
namespace Cake.AppVeyor.Tests
{
public static class Keys
{
const string YOUR_APPVEYOR_API_TOKEN = "{APPVEYOR_APITOKEN}";
static string appVeyorApiToken;
public static string AppVeyorApiToken {
get
{
if ... |
7a5e7794-8724-467c-918a-8b43ac7698b7 | {
"language": "C#"
} | ```c#
using System;
using NUnit.Framework;
using FbxSharp;
namespace FbxSharpTests
{
[TestFixture]
public class ObjectPrinterTest
{
[Test]
public void QuoteQuotesAndEscapeStrings()
{
Assert.AreEqual("\"abcdefghijklmnopqrstuvwxyz\"", ObjectPrinter.quote("abcdefghijklmnop... | ```c#
using System;
using NUnit.Framework;
using FbxSharp;
using System.IO;
namespace FbxSharpTests
{
[TestFixture]
public class ObjectPrinterTest
{
[Test]
public void QuoteQuotesAndEscapeStrings()
{
Assert.AreEqual("\"abcdefghijklmnopqrstuvwxyz\"", ObjectPrinter.quote(... |
7ea4aaec-43de-4ae0-b665-0e40aea3cce1 | {
"language": "C#"
} | ```c#
using System.Reflection;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
//... | ```c#
using System.Reflection;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
//... |
e6323a69-da9a-43f1-99f4-c01be1a5d9d4 | {
"language": "C#"
} | ```c#
using System;
using Roton.Emulation.Core;
using Roton.Emulation.Data;
using Roton.Emulation.Data.Impl;
using Roton.Infrastructure.Impl;
namespace Roton.Emulation.Interactions.Impl
{
[Context(Context.Original, 0x14)]
[Context(Context.Super, 0x14)]
public sealed class ForestInteraction : IInteraction
... | ```c#
using System;
using Roton.Emulation.Core;
using Roton.Emulation.Data;
using Roton.Emulation.Data.Impl;
using Roton.Infrastructure.Impl;
namespace Roton.Emulation.Interactions.Impl
{
[Context(Context.Original, 0x14)]
[Context(Context.Super, 0x14)]
public sealed class ForestInteraction : IInteraction
... |
8bc0c9df-345f-4654-b090-a73b6ddd918f | {
"language": "C#"
} | ```c#
//-------------------------------------------------------------------------------
// <copyright file="NewtonsoftJsonMessageSerializer.cs" company="MMS AG">
// Copyright (c) MMS AG, 2008-2015
// </copyright>
//-------------------------------------------------------------------------------
namespace MMS.ServiceB... | ```c#
//-------------------------------------------------------------------------------
// <copyright file="NewtonsoftJsonMessageSerializer.cs" company="MMS AG">
// Copyright (c) MMS AG, 2008-2015
// </copyright>
//-------------------------------------------------------------------------------
namespace MMS.ServiceB... |
da0c2518-10a6-46e1-8cd7-dd955c12e871 | {
"language": "C#"
} | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ContextExtensions.cs" company="Quartz Software SRL">
// Copyright (c) Quartz Software SRL. All rights reserved.
// </copyright>
// <summary>
// Implements the context ex... | ```c#
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ContextExtensions.cs" company="Quartz Software SRL">
// Copyright (c) Quartz Software SRL. All rights reserved.
// </copyright>
// <summary>
// Implements the context ex... |
55275727-6c40-470f-80f7-2d75bef05175 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.KeyManagement;
using Microsoft.Framework.DependencyInjection;
using... | ```c#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.KeyManagement;
using Microsoft.Framework.DependencyInjection;
using... |
b07f689a-f770-485a-8aab-5e5d4ac9dcab | {
"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.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapRequest : APIRequest<AP... | ```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.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapRequest : APIRequest<AP... |
f311d773-7602-4811-bb60-f05729d0a233 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("DanTup's DartAnalysis.NET: A .NET wrapper around Google's Analysis Server for Dart.")]
[assembly: AssemblyProduct("DanTup's DartAnalysis.NET: A .NET wrapper around Google's Analysis Se... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("DartAnalysis.NET: A .NET wrapper around Google's Analysis Server for Dart.")]
[assembly: AssemblyProduct("DartAnalysis.NET: A .NET wrapper around Google's Analysis Server for Dart.")]
... |
f2f9a00e-3090-4e62-8f7c-e4f1a329b33b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Mvc52Application.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
... | ```c#
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Mvc52Application.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
T... |
c4da98b5-56ea-4f3c-ba57-edd8f1ea4e41 | {
"language": "C#"
} | ```c#
using ErgastApi.Client.Attributes;
using ErgastApi.Responses;
namespace ErgastApi.Requests
{
public class SeasonListRequest : StandardRequest<SeasonResponse>
{
// Value not used
// ReSharper disable once UnassignedGetOnlyAutoProperty
[UrlTerminator, UrlSegment("seasons")]
... | ```c#
using ErgastApi.Client.Attributes;
using ErgastApi.Responses;
namespace ErgastApi.Requests
{
public class SeasonListRequest : StandardRequest<SeasonResponse>
{
[UrlSegment("constructorStandings")]
public int? ConstructorStanding { get; set; }
[UrlSegment("driverStandings")]
... |
a4b4a029-a08c-4e98-9496-c93c9c96c187 | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Sinch.ServerSdk.Callouts;
using Sinch.WebApiClient;
public interface ICalloutApiEndpoints
{
[HttpPost("calling/v1/callouts/")]
Task<CalloutResponse> Callout([ToBody] CalloutRequest request);
}```
Remove API route trailing slash to avoid AWS API Gateway modification | ```c#
using System.Threading.Tasks;
using Sinch.ServerSdk.Callouts;
using Sinch.WebApiClient;
public interface ICalloutApiEndpoints
{
[HttpPost("calling/v1/callouts")]
Task<CalloutResponse> Callout([ToBody] CalloutRequest request);
}``` |
3850a251-d6bc-4f28-a899-0d3dfa35d42e | {
"language": "C#"
} | ```c#
namespace ImGui.Development
{
public class GUIDebug
{
public static void SetWindowPosition(string windowName, Point position)
{
var possibleWindow = Application.ImGuiContext.WindowManager.Windows.Find(window => window.Name == windowName);
if (possibleWindow != null... | ```c#
using ImGui.Rendering;
namespace ImGui.Development
{
public class GUIDebug
{
public static void SetWindowPosition(string windowName, Point position)
{
var possibleWindow = Application.ImGuiContext.WindowManager.Windows.Find(window => window.Name == windowName);
if... |
38584d85-af06-4063-a444-37a10b7a2a84 | {
"language": "C#"
} | ```c#
namespace SFA.DAS.EmployerApprenticeshipsService.Domain.Entities.Account
{
public class LegalEntity
{
public long Id { get; set; }
public string Name { get; set; }
}
}```
Change legal entity to include the CompanyNumber, RegisteredAddress and DateOfIncorporation | ```c#
using System;
namespace SFA.DAS.EmployerApprenticeshipsService.Domain.Entities.Account
{
public class LegalEntity
{
public long Id { get; set; }
public string CompanyNumber { get; set; }
public string Name { get; set; }
public string RegisteredAddress { get; set; }
... |
93a69638-5e3b-41f6-86df-2c646f4910a5 | {
"language": "C#"
} | ```c#
namespace Akiba.Core
{
using System.IO;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
internal class Configuration
{
public const string ConfigurationName = "configuration.yaml";
public enum ScreenModes : ushort
{
Window... | ```c#
namespace Akiba.Core
{
using System.IO;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
internal class Configuration
{
public const string ConfigurationName = "configuration.yaml";
public enum ScreenModes : ushort
{
Window... |
6f97d628-6105-4d25-b901-9448979968f7 | {
"language": "C#"
} | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Runtime.CompilerServices
{
// Custom attribute to indicating a TypeDef is a discardable a... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Runtime.CompilerServices
{
// Custom attribute to indicating a TypeDef is a discardable a... |
d0c63d3a-a162-4139-8d27-91648146d613 | {
"language": "C#"
} | ```c#
using Gtk;
using NLog;
using SlimeSimulation.Controller.WindowController.Templates;
namespace SlimeSimulation.View.WindowComponent.SimulationControlComponent
{
class AdaptionPhaseControlBox : AbstractSimulationControlBox
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger()... | ```c#
using Gtk;
using NLog;
using SlimeSimulation.Controller.WindowController.Templates;
namespace SlimeSimulation.View.WindowComponent.SimulationControlComponent
{
class AdaptionPhaseControlBox : AbstractSimulationControlBox
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger()... |
8dce7311-44c3-4866-be07-774f6cfa5bd1 | {
"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.Threading;
using NUnit.Framework;
using osu.Framework.Audio;
namespace osu.Framework.Tests.Audio
{
[TestFixture]
public class AudioCollection... | ```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.Threading;
using NUnit.Framework;
using osu.Framework.Audio;
namespace osu.Framework.Tests.Audio
{
[TestFixture]
public class AudioCollection... |
64fb2e62-b4c1-4a03-b0a2-26bce18175d2 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ERMine.Core.Modeling
{
public class Attribute : IEntityRelationship
{
public string Label { get; set; }
public string DataType { get; set; }
public Domain... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ERMine.Core.Modeling
{
public class Attribute : IEntityRelationship
{
public string Label { get; set; }
public string DataType { get; set; }
public Domain... |
b41fcfab-1eac-45ff-9d04-5c98f6e93b03 | {
"language": "C#"
} | ```c#
using PS.Mothership.Core.Common.Template.Gen;
using PS.Mothership.Core.Common.Template.Opp;
using System;
using System.Runtime.Serialization;
namespace PS.Mothership.Core.Common.Dto.Application
{
[DataContract]
public class OpportunitySummaryDto
{
[DataMember]
public Guid Opportunity... | ```c#
using PS.Mothership.Core.Common.Template.Gen;
using PS.Mothership.Core.Common.Template.Opp;
using System;
using System.Runtime.Serialization;
namespace PS.Mothership.Core.Common.Dto.Application
{
[DataContract]
public class OpportunitySummaryDto
{
[DataMember]
public Guid Opportunity... |
2324d4ad-01ca-4070-a37f-ad0f885eeb9c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
namespace Bex.Extensions
{
internal static class UriExtensions
{
internal static IEnumerable<KeyValuePair<string, string>> QueryString(this Uri uri)
{
var uriString = uri.IsAbsoluteUri ? uri.... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
namespace Bex.Extensions
{
internal static class UriExtensions
{
internal static IEnumerable<KeyValuePair<string, string>> QueryString(this Uri uri)
{
if (string.IsNullOrEmpty(uri.Query))
... |
068d1ec0-5230-43fc-b44d-9d76cbca6809 | {
"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("ExCSS Parser")]
[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("ExCSS Parser")]
[assembly: Assembly... |
288185e7-1643-4edb-8e66-3ba4a55bed24 | {
"language": "C#"
} | ```c#
namespace Octokit
{
public static class AcceptHeaders
{
public const string StableVersion = "application/vnd.github.v3";
public const string StableVersionHtml = "application/vnd.github.html";
public const string RedirectsPreviewThenStableVersionJson = "application/vnd.github.qui... | ```c#
using System.Diagnostics.CodeAnalysis;
namespace Octokit
{
public static class AcceptHeaders
{
public const string StableVersion = "application/vnd.github.v3";
public const string StableVersionHtml = "application/vnd.github.html";
public const string RedirectsPreviewThenStableV... |
0e6308fd-39b8-4a69-bce0-107e4302fe28 | {
"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.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Framework.Screens;
usi... | ```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.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Framework.Screens;
usi... |
482b2869-4971-4d49-b226-ce3819a54b5f | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using Ploeh.AutoFixture;
namespace AppHarbor.Tests
{
public class TextWriterCustomization : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customize<TextWriter>(x => x.FromFactory(() => { return Console.Out; }));
}
}
}
```
Make sure to also customi... | ```c#
using System.IO;
using Moq;
using Ploeh.AutoFixture;
namespace AppHarbor.Tests
{
public class TextWriterCustomization : ICustomization
{
public void Customize(IFixture fixture)
{
var textWriterMock = new Mock<TextWriter>();
fixture.Customize<TextWriter>(x => x.FromFactory(() => { return textWriterMo... |
adedfd04-8b40-494c-a6a4-f4e2c252730b | {
"language": "C#"
} | ```c#
using System;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Stripe
{
public class StripeSubscriptionUpdateOptions : StripeSubscriptionCreateOptions
{
[JsonProperty("prorate")]
public bool? Prorate { get; set; }
}
}```
Add "plan" to StripSubscriptionUpdateOptions so we can... | ```c#
using System;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Stripe
{
public class StripeSubscriptionUpdateOptions : StripeSubscriptionCreateOptions
{
[JsonProperty("prorate")]
public bool? Prorate { get; set; }
[JsonProperty("plan")]
public string PlanId { get; set; }... |
75b9c1d7-aebc-4b91-adb2-ec4c0af849c1 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
namespace DarkMultiPlayerServer
{
public class LogExpire
{
private static string logDirectory
{
get
{
return Path.Combine(Server.universeDirectory, DarkLog.LogFolder);
}
}
public static vo... | ```c#
using System;
using System.IO;
namespace DarkMultiPlayerServer
{
public class LogExpire
{
private static string logDirectory
{
get
{
return Path.Combine(Server.universeDirectory, DarkLog.LogFolder);
}
}
public static vo... |
e23fbe20-5ec5-4023-a00d-3a1481779cbe | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Vocal.Model;
namespace Vocal.Core
{
public class JsonCommandLoader
{
const string DefaultConfigFile = "comman... | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using Vocal.Model;
namespace Vocal.Core
{
public class JsonCommandLoader
{
const string AppDataFolder = "VocalBuildEngine";
const string DefaultConfigFile = "commandsTemplate.json";
const stri... |
5c11540a-1023-4e96-ae31-ee7fe032c823 | {
"language": "C#"
} | ```c#
@using FormFactory
@model PropertyVm
<input type="hidden" name="@Model.Name" id="MyFileSubmitPlaceHolder" />@*here to trick model binding into working :( *@
<input type="file" name="@Model.Name" @Model.Readonly() @Model.Disabled() />```
Hide file input if readonly | ```c#
@using FormFactory
@model PropertyVm
@if(!Model.Readonly)
{
<input type="hidden" name="@Model.Name" /> @*here to trick model binding into working :( *@
<input type="file" name="@Model.Name" @Model.Readonly() @Model.Disabled() />
}``` |
fe7de394-ae5e-4323-8633-377571e36fde | {
"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;
using System.Composition;
using System.IO;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Serialization;
namespace ... | ```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;
using System.Composition;
using System.IO;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Serialization;
namespace ... |
de64459a-803a-4148-bec1-deeb917eb0fc | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using StockportContentApi.ContentfulModels;
using StockportContentApi.Model;
namespace StockportContentApi.ContentfulFactories
{
public class CommsContentfulFactory : IContentfulFactory<ContentfulCommsHomepage, CommsHomepage>
{
private readonly IContentfulFactor... | ```c#
using System.Collections.Generic;
using StockportContentApi.ContentfulModels;
using StockportContentApi.Model;
namespace StockportContentApi.ContentfulFactories
{
public class CommsContentfulFactory : IContentfulFactory<ContentfulCommsHomepage, CommsHomepage>
{
private readonly IContentfulFactor... |
b2275397-5d80-4c38-917f-776858f46f80 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Resources;
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... | ```c#
using System.Reflection;
using System.Resources;
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... |
5ba462df-55b3-4e19-843b-04d67b6b0c31 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Immutable;
using System.IO;
using Microsoft.Extensions.Logging;
using OmniSharp.Utilities;
namespace OmniSharp.MSBuild.Discovery.Providers
{
internal class MonoInstanceProvider : MSBuildInstanceProvider
{
public MonoInstanceProvider(ILoggerFactory loggerFac... | ```c#
using System;
using System.Collections.Immutable;
using System.IO;
using Microsoft.Extensions.Logging;
using OmniSharp.Utilities;
namespace OmniSharp.MSBuild.Discovery.Providers
{
internal class MonoInstanceProvider : MSBuildInstanceProvider
{
public MonoInstanceProvider(ILoggerFactory loggerFac... |
fb0dbf5c-a087-4996-8cf6-0520e71807a9 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Threading.Tasks;
namespace NTwitch
{
public interface ITwitchClient
{
ConnectionState ConnectionState { get; }
Task<IChannel> GetChannelAsync(ulong id);
Task<IEnumerable<ITopGame>> GetTopGames(TwitchPageOptions options = nul... | ```c#
using System.Collections.Generic;
using System.Threading.Tasks;
namespace NTwitch
{
public interface ITwitchClient
{
ConnectionState ConnectionState { get; }
Task<IChannel> GetChannelAsync(ulong id);
Task<IEnumerable<ITopGame>> GetTopGamesAsync(TwitchPageOptions options ... |
bf23425d-f42a-4fce-9635-0876c30a1e47 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Diagnostics;
namespace Microsoft.Its.Domain
{
/// <summary>
/// Provides access to system time.
/// </summary>
[Debug... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Diagnostics;
namespace Microsoft.Its.Domain
{
/// <summary>
/// Provides access to system time.
/// </summary>
[Debug... |
f32b8299-7035-45e5-8915-79a5aa9954fd | {
"language": "C#"
} | ```c#
@model string
@{
ViewData["Title"] = "Thank you";
ViewData["og:title"] = "Thank you";
Layout = "../Shared/_Layout.cshtml";
}
<div class="grid-container-full-width">
<div class="grid-container grid-100">
<div class="l-body-section-filled l-short-content mobile-grid-100 tablet-grid-100 g... | ```c#
@model string
@{
ViewData["Title"] = "Thank you";
ViewData["og:title"] = "Thank you";
Layout = "../Shared/_Layout.cshtml";
}
<div class="grid-container-full-width">
<div class="grid-container grid-100">
<div class="l-body-section-filled l-short-content mobile-grid-100 tablet-grid-100 g... |
565bbc08-945d-4b02-bbcb-e78197b0da23 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net;
using System.Net.Mail;
using SendGrid;
using TapBoxCommon.Models;
using Microsoft.Azure;
namespace TapBoxWebjob
{
class MailSender
{
public static void SendMailToOwner(Device Notifi... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net;
using System.Net.Mail;
using SendGrid;
using TapBoxCommon.Models;
using Microsoft.Azure;
namespace TapBoxWebjob
{
class MailSender
{
public static void SendMailToOwner(Device Notifi... |
61d68354-931c-4c75-b934-53ad81a4d41c | {
"language": "C#"
} | ```c#
using System;
namespace Csla
{
internal class BrowsableAttribute : Attribute
{
public BrowsableAttribute(bool flag)
{ }
}
internal class DisplayAttribute : Attribute
{
public string Name { get; set; }
public bool AutoGenerateField { get; set; }
public DisplayAttribut... | ```c#
//-----------------------------------------------------------------------
// <copyright file="PortedAttributes.cs" company="Marimer LLC">
// Copyright (c) Marimer LLC. All rights reserved.
// Website: http://www.lhotka.net/cslanet/
// </copyright>
// <summary>Dummy implementations of .NET attributes... |
60608398-d14e-4127-85db-0672eef2ef5c | {
"language": "C#"
} | ```c#
using System;
using FeatureSwitcher.AwsConfiguration.Behaviours;
namespace FeatureSwitcher.AwsConfiguration.Models
{
internal class BehaviourCacheItem
{
public IBehaviour Behaviour { get; }
public DateTime CacheTimeout { get; }
public bool IsExpired => this.CacheTimeou... | ```c#
using System;
using FeatureSwitcher.AwsConfiguration.Behaviours;
namespace FeatureSwitcher.AwsConfiguration.Models
{
internal class BehaviourCacheItem
{
public IBehaviour Behaviour { get; }
public DateTime CacheTimeout { get; private set; }
public bool IsExpired => thi... |
1b3d5fcd-cd75-475d-9cb8-b6754f0d0879 | {
"language": "C#"
} | ```c#
using TruckRouter.Models;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();... | ```c#
using TruckRouter.Models;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();... |
3cc7cabd-0818-4257-a3c8-8a05fe761bd5 | {
"language": "C#"
} | ```c#
using NLog;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace SyncTrayzor.Syncthing.ApiClient
{
public class SyncthingHttpClientHandler : WebRequestHandler
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public Syncthing... | ```c#
using NLog;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace SyncTrayzor.Syncthing.ApiClient
{
public class SyncthingHttpClientHandler : WebRequestHandler
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public Syncthing... |
64823092-6e16-4e1d-b545-0779c9437e0d | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System;
using System.Reflection;
using Microsoft.Common.Core;
using Microsoft.R.Host.Protocol;
namespace Microsoft.R.Host.Client {
public static clas... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System;
using System.Reflection;
using Microsoft.Common.Core;
using Microsoft.R.Host.Protocol;
namespace Microsoft.R.Host.Client {
public static clas... |
e81ff7dd-b0a0-4a62-958e-6ee8d625925e | {
"language": "C#"
} | ```c#
using System.Runtime.Remoting.Channels;
namespace RedGate.AppHost.Remoting
{
internal class ClientChannelSinkProviderForParticularServer : IClientChannelSinkProvider
{
private readonly IClientChannelSinkProvider m_Upstream;
private readonly string m_Url;
internal Client... | ```c#
using System;
using System.Runtime.Remoting.Channels;
namespace RedGate.AppHost.Remoting
{
internal class ClientChannelSinkProviderForParticularServer : IClientChannelSinkProvider
{
private readonly IClientChannelSinkProvider m_Upstream;
private readonly string m_Url;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.