doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
2e92b66a-b577-4a3e-ba60-484c6dc13b8b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Core.CrossDomainImagesWeb
{
public partial class Default : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Core.CrossDomainImagesWeb
{
public partial class Default : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
... |
0be03f5f-c04e-4b7c-8ef9-8f5d158d7732 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using Mitternacht.Modules.Games.Common;
using Mitternacht.Services;
namespace Mitternacht.Modules.Games.Services {
public class GamesService : IMService {
private readonly IBotConf... | ```c#
using System;
using System.Collections.Concurrent;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using Mitternacht.Modules.Games.Common;
using Mitternacht.Services;
namespace Mitternacht.Modules.Games.Services {
public class GamesService : IMService {
private readonly IBotConf... |
559fe2d7-6fb2-414d-865f-19c5a1005e77 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
namespace NuGet {
public static class ExceptionUtility {
public static Exception Unwrap(Exception exception) {
if (exception == null) {
throw new ArgumentNullException("exception");
}
if (exception.... | ```c#
using System;
using System.Reflection;
namespace NuGet {
public static class ExceptionUtility {
public static Exception Unwrap(Exception exception) {
if (exception == null) {
throw new ArgumentNullException("exception");
}
if (exception.... |
d1580601-1c54-48b4-ab0a-b3b52b1fd0b7 | {
"language": "C#"
} | ```c#
using System.ComponentModel;
using System.Text;
using SharpLab.Runtime.Internal;
public static class SharpLabObjectExtensions {
// LinqPad/etc compatibility only
[EditorBrowsable(EditorBrowsableState.Never)]
public static T Dump<T>(this T value)
=> value.Inspect(title: "Dump");
... | ```c#
using System.ComponentModel;
using System.Text;
using SharpLab.Runtime.Internal;
public static class SharpLabObjectExtensions {
// LinqPad/etc compatibility only
[EditorBrowsable(EditorBrowsableState.Never)]
public static T Dump<T>(this T value) {
value.Inspect(title: "Dump");
... |
e96c858f-8942-4462-b474-6c81311d4894 | {
"language": "C#"
} | ```c#
using Alensia.Core.Input;
using UnityEngine.Assertions;
namespace Alensia.Core.Locomotion
{
public abstract class LocomotionControl<T> : Control.Control, ILocomotionControl<T>
where T : class, ILocomotion
{
public T Locomotion { get; }
public override bool Valid => base.Valid &&... | ```c#
using Alensia.Core.Input;
namespace Alensia.Core.Locomotion
{
public abstract class LocomotionControl<T> : Control.Control, ILocomotionControl<T>
where T : class, ILocomotion
{
public abstract T Locomotion { get; }
public override bool Valid => base.Valid && Locomotion != null &... |
fb9b1c8b-816a-4af6-84fe-d4b02ea31d44 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace ArcMapAddinVisibility
{
public class MapPointTool : ESRI.ArcGIS.Desktop.AddIns.Tool
{
public MapPointTool()
{
}
protected override void OnUpdate()
{
Enabled ... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geometry;
using ArcMapAddinVisibility.Helpers;
namespace ArcMapAddinVisibility
{
public class MapPointTool : ESRI.ArcGIS.Desktop.AddIns.Tool
{
public MapPointTool()
... |
97bf4ac3-0ff1-452f-a9bf-2c0bc952cee7 | {
"language": "C#"
} | ```c#
using System;
namespace AppHarbor.Commands
{
public class AddConfigCommand : ICommand
{
private readonly IApplicationConfiguration _applicationConfiguration;
public AddConfigCommand(IApplicationConfiguration applicationConfiguration)
{
_applicationConfiguration = applicationConfiguration;
}
pub... | ```c#
using System;
namespace AppHarbor.Commands
{
public class AddConfigCommand : ICommand
{
private readonly IApplicationConfiguration _applicationConfiguration;
private readonly IAppHarborClient _appharborClient;
public AddConfigCommand(IApplicationConfiguration applicationConfiguration, IAppHarborClient ... |
6ed4d720-dd9e-429a-b0c9-7f9af0fdda90 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DocFunctions.Lib.Models.Github
{
public abstract class AbstractAction
{
public string FullFilename { get; set; }
public string CommitSha { get; set; }
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DocFunctions.Lib.Models.Github
{
public abstract class AbstractAction
{
public string FullFilename { get; set; }
public string CommitSha { get; set; }
... |
3590452f-de08-4fa8-b07c-e148e6f34097 | {
"language": "C#"
} | ```c#
// Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
namespace PInvoke
{
using System;
/// <content>
/// Contains the <see cref=... | ```c#
// Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
namespace PInvoke
{
using System;
/// <content>
/// Contains the <see cref=... |
1fee02e7-81d5-49ad-83a6-b5d8e36197ae | {
"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.
//
namespace Test
{
using System;
struct AA
{
static float[] m_afStatic1;
static void Main1()
{
ulong[] param2 =... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Test
{
using System;
struct AA
{
static float[] m_afStatic1;
static void Main1()
{
ulong[] param2 =... |
e544789f-754b-4008-9f0e-85e6d0b55e52 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class AndreasBittner : IAmACommunityMember
{
public string FirstName => "Andreas";
public s... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class AndreasBittner : IAmACommunityMember
{
public string FirstName => "Andreas";
public s... |
9f0d96ce-df38-4218-ba33-32c99e4f7709 | {
"language": "C#"
} | ```c#
using System.Runtime.InteropServices;
using System.Windows;
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In orde... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVi... |
28c6bb7b-3fd7-460e-a962-7cce73bb07fa | {
"language": "C#"
} | ```c#
using StackExchange.Elastic;
namespace StackExchange.Opserver
{
public class OpserverCore
{
// Initializes various bits in OpserverCore like exception logging and such so that projects using the core need not load up all references to do so.
public static void Init()
{
... | ```c#
using System.Net;
using StackExchange.Elastic;
namespace StackExchange.Opserver
{
public class OpserverCore
{
// Initializes various bits in OpserverCore like exception logging and such so that projects using the core need not load up all references to do so.
public static void Init()
... |
734f9383-4b17-446a-8290-7868861da9ce | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Mirage.Urbanization.WinForms
{
public abstract class ToolstripMenuInitializer<TOption>
where TOption : IToolstripMenuOption
{
protected ToolstripMenuInitializer(ToolStripMenuItem targ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Mirage.Urbanization.WinForms
{
public abstract class ToolstripMenuInitializer<TOption>
where TOption : IToolstripMenuOption
{
protected ToolstripMenuInitializer(ToolStripMenuItem targ... |
88e17743-5fca-4000-ae84-ae76b0aecdb9 | {
"language": "C#"
} | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Affecto.IdentityManagement.Store.Mocking")]
[assembly: AssemblyDescription("Identity Management store layer using Effort mock database.")]
[assembly: AssemblyProduct("Affecto.IdentityManagement")]
[assembly: AssemblyCompany("Affecto")]
[assembly: AssemblyVersi... | ```c#
using System.Reflection;
[assembly: AssemblyTitle("Affecto.IdentityManagement.Store.Mocking")]
[assembly: AssemblyDescription("Identity Management store layer using Effort mock database.")]
[assembly: AssemblyProduct("Affecto.IdentityManagement")]
[assembly: AssemblyCompany("Affecto")]
[assembly: AssemblyVersi... |
b7c6723b-29e1-4c34-a64e-19d0855cca00 | {
"language": "C#"
} | ```c#
using System.Diagnostics;
using UnityEngine;
namespace Finegamedesign.Utils
{
/// <summary>
/// Wrapper of logging.
/// Conditionally compiles if in debug mode or editor.
/// </summary>
public sealed class DebugUtil
{
[Conditional("DEBUG")]
[Conditional("UNITY_EDITOR")]
... | ```c#
using System.Diagnostics;
using UnityEngine;
namespace Finegamedesign.Utils
{
/// <summary>
/// Wrapper of logging.
/// Conditionally compiles if in debug mode or editor.
/// </summary>
public sealed class DebugUtil
{
[Conditional("DEBUG")]
[Conditional("UNITY_EDITOR")]
... |
a41be644-0d19-4bd0-abba-16461f839cd0 | {
"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 ... |
b0c602e8-0b01-4575-b195-b0802e0279e9 | {
"language": "C#"
} | ```c#
using System;
using System.Xml.Serialization;
namespace XeroApi.Model
{
public class ManualJournal : ModelBase
{
[ItemUpdatedDate]
public DateTime? UpdatedDateUTC { get; set; }
[ItemId]
public Guid ManualJournalID { get; set; }
public DateTime? Date { get; set; }... | ```c#
using System;
using System.Xml.Serialization;
namespace XeroApi.Model
{
public class ManualJournal : ModelBase
{
[ItemUpdatedDate]
public DateTime? UpdatedDateUTC { get; set; }
[ItemId]
public Guid ManualJournalID { get; set; }
public DateTime? Date { get; set; }... |
16696b9c-c2be-4fd8-8a4d-250f5f6db24a | {
"language": "C#"
} | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.ComponentModel;
using System.Security;
using System.Security.Principal;
namespace System
{
i... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.ComponentModel;
using System.Security;
using System.Security.Principal;
namespace System
{
i... |
cc0352f5-4796-4c60-a631-6e0c29e24281 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Xml.Linq;
using WebDav.Helpers;
namespace WebDav.Request
{
internal static class PropfindRequestBuilder
{
public static string BuildRequestBody(string[] customProperties)
{
XNamespace webDavNs = "DAV:";
var doc = new XDocument(new X... | ```c#
using System.Linq;
using System.Xml.Linq;
using WebDav.Helpers;
namespace WebDav.Request
{
internal static class PropfindRequestBuilder
{
public static string BuildRequestBody(string[] customProperties)
{
var doc = new XDocument(new XDeclaration("1.0", "utf-8", null));
... |
704b8227-ac92-416a-adf3-bb932d486125 | {
"language": "C#"
} | ```c#
using MaterialColor.Common.Data;
using System.Collections.Generic;
using UnityEngine;
namespace MaterialColor.Core
{
public static class State
{
public static Dictionary<string, Color32> TypeColorOffsets = new Dictionary<string, Color32>();
public static Dictionary<SimHashes, ElementColo... | ```c#
using MaterialColor.Common.Data;
using System.Collections.Generic;
using UnityEngine;
namespace MaterialColor.Core
{
public static class State
{
public static Dictionary<string, Color32> TypeColorOffsets = new Dictionary<string, Color32>();
public static Dictionary<SimHashes, ElementColo... |
d5fbb82a-4f53-4721-ad69-390d2bd4af71 | {
"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.Localisation;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface... | ```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.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game... |
88edacdf-4289-41dd-8032-a27ec872b654 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.Deployment.WindowsInstaller;
namespace Wix.CustomActions
{
using System.IO;
public class CustomActions
{
[CustomAction]
public static ActionResult CloseIt(Session session)
{
try
{
const string fileFullPath... | ```c#
using System;
using Microsoft.Deployment.WindowsInstaller;
namespace Wix.CustomActions
{
using System.IO;
using System.Diagnostics;
public class CustomActions
{
[CustomAction]
public static ActionResult CloseIt(Session session)
{
try
{
... |
43e01445-01b7-4361-8205-8cbe7675b78a | {
"language": "C#"
} | ```c#
namespace FlatFile.FixedLength.Attributes.Infrastructure
{
using System;
using System.Linq;
using FlatFile.Core;
using FlatFile.Core.Attributes.Extensions;
using FlatFile.Core.Attributes.Infrastructure;
using FlatFile.Core.Base;
public class FixedLayoutDescriptorProvider : ILayoutDesc... | ```c#
namespace FlatFile.FixedLength.Attributes.Infrastructure
{
using System;
using System.Linq;
using FlatFile.Core;
using FlatFile.Core.Attributes.Extensions;
using FlatFile.Core.Attributes.Infrastructure;
using FlatFile.Core.Base;
public class FixedLayoutDescriptorProvider : ILayoutDesc... |
8b989845-be64-4206-8440-450cf8dff705 | {
"language": "C#"
} | ```c#
using UnityEngine;
namespace com.adjust.sdk.test
{
public class TestFactoryAndroid : ITestFactory
{
private string _baseUrl;
private AndroidJavaObject ajoTestLibrary;
private CommandListenerAndroid onCommandReceivedListener;
public TestFactoryAndroid(string baseUrl)
... | ```c#
using UnityEngine;
namespace com.adjust.sdk.test
{
public class TestFactoryAndroid : ITestFactory
{
private string _baseUrl;
private AndroidJavaObject ajoTestLibrary;
private CommandListenerAndroid onCommandReceivedListener;
public TestFactoryAndroid(string baseUrl)
... |
b47c082a-fb98-47e4-80f6-0ffb719e0c2c | {
"language": "C#"
} | ```c#
#addin "Cake.FileHelpers"
var TARGET = Argument ("target", Argument ("t", "Default"));
var version = EnvironmentVariable ("APPVEYOR_BUILD_VERSION") ?? Argument("version", "0.0.9999");
Task ("Default").Does (() =>
{
const string sln = "./../Vibrate.sln";
const string cfg = "Release";
NuGetRestore (sl... | ```c#
#addin "Cake.FileHelpers"
var TARGET = Argument ("target", Argument ("t", "Default"));
var version = EnvironmentVariable ("APPVEYOR_BUILD_VERSION") ?? Argument("version", "0.0.9999");
Task ("Default").Does (() =>
{
const string sln = "./../Vibrate.sln";
const string cfg = "Release";
NuGetRestore (sl... |
f620476e-93ef-447a-960f-c6f093ec5e56 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Describes how an employee pay is calculated
/// </summary>
public enum EmployeePayType : byte
{
/// <summary>
/// Employee earns a set salary per period of time, i.e. $70,000 yearly
... | ```c#
using System.Collections.Generic;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Describes how an employee pay is calculated
/// </summary>
public enum EmployeePayType : byte
{
/// <summary>
/// Employee earns a set salary per period of time, i.e. $70,000 yearly
... |
19eebc4e-089e-45e5-ac44-754301bcee82 | {
"language": "C#"
} | ```c#
using System.Web.Mvc;
using Twilio.TwiML;
using Twilio.TwiML.Mvc;
using ValidateRequestExample.Filters;
namespace ValidateRequestExample.Controllers
{
public class IncomingController : TwilioController
{
[ValidateTwilioRequest]
public ActionResult Voice(string from)
{
... | ```c#
using System.Web.Mvc;
using Twilio.AspNet.Mvc;
using Twilio.TwiML;
using ValidateRequestExample.Filters;
namespace ValidateRequestExample.Controllers
{
public class IncomingController : TwilioController
{
[ValidateTwilioRequest]
public ActionResult Voice(string from)
{
... |
7be82118-0406-4ae6-9480-f40721bad03c | {
"language": "C#"
} | ```c#
using System;
using NUnit.Framework;
using DevTyr.Gullap;
namespace DevTyr.Gullap.Tests.With_Guard.For_NotNullOrEmpty
{
[TestFixture]
public class When_argument_is_not_null
{
[Test]
public void Should_pass ()
{
Guard.NotNullOrEmpty ("", null);
Assert.Pass ();
}
}
}
```
Fix test for NotNullOrE... | ```c#
using System;
using NUnit.Framework;
using DevTyr.Gullap;
namespace DevTyr.Gullap.Tests.With_Guard.For_NotNullOrEmpty
{
[TestFixture]
public class When_argument_is_not_null_or_empty
{
[Test]
public void Should_pass ()
{
Guard.NotNullOrEmpty ("Test", null);
Assert.Pass ();
}
}
}
``` |
dc4de48f-1447-4688-a596-0e24225c55da | {
"language": "C#"
} | ```c#
using BankService.Domain.Contracts;
using BankService.Domain.Models;
using Microsoft.AspNet.Cors;
using Microsoft.AspNet.Mvc;
using System.Collections.Generic;
namespace BankService.Api.Controllers
{
[EnableCors("MyPolicy")]
[Route("api/accountHolders")]
public class AccountHolderController : Contro... | ```c#
using BankService.Domain.Contracts;
using BankService.Domain.Models;
using Microsoft.AspNet.Mvc;
using System.Collections.Generic;
namespace BankService.Api.Controllers
{
[Route("api/accountHolders")]
public class AccountHolderController : Controller
{
private readonly IAccountHolderReposito... |
4bda1243-9f2a-436a-b17d-c2172c5c1a33 | {
"language": "C#"
} | ```c#
namespace VotingSystem.Web.Areas.User.ViewModels
{
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using VotingSystem.Models;
using VotingSystem.Web.Infrastructure.Mapping;
using AutoMapper;
public class UserPollsViewModel : IMapFrom<Poll>, IHaveCus... | ```c#
namespace VotingSystem.Web.Areas.User.ViewModels
{
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using VotingSystem.Models;
using VotingSystem.Web.Infrastructure.Mapping;
using AutoMapper;
public class UserPollsViewModel : IMapFrom<Poll>, IHaveCus... |
223aba09-9cd7-4574-8e53-c45a1a475913 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VVVV.DX11.Internals.Effects.Pins;
using VVVV.PluginInterfaces.V2;
using SlimDX.Direct3D11;
using VVVV.PluginInterfaces.V1;
using VVVV.Hosting.Pins;
using VVVV.DX11.Lib.Effects.Pins;
using FeralTic.DX11;
namespace VVVV.DX... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VVVV.DX11.Internals.Effects.Pins;
using VVVV.PluginInterfaces.V2;
using SlimDX.Direct3D11;
using VVVV.PluginInterfaces.V1;
using VVVV.Hosting.Pins;
using VVVV.DX11.Lib.Effects.Pins;
using FeralTic.DX11;
namespace VVVV.DX... |
33d310ae-f0ea-49be-8580-e0e4e713890e | {
"language": "C#"
} | ```c#
using Harvest.Net.Models;
using System;
using System.Linq;
using Xunit;
namespace Harvest.Net.Tests
{
public class TimeTrackingFacts : FactBase, IDisposable
{
DayEntry _todelete = null;
[Fact]
public void Daily_ReturnsResult()
{
var result = Api.Daily();
... | ```c#
using Harvest.Net.Models;
using System;
using System.Linq;
using Xunit;
namespace Harvest.Net.Tests
{
public class TimeTrackingFacts : FactBase, IDisposable
{
DayEntry _todelete = null;
[Fact]
public void Daily_ReturnsResult()
{
var result = Api.Daily();
... |
493ecdeb-aa0f-40ee-87cd-3615c0977481 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.Net.Http.Headers;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Formatters;
using ProtoBuf.Meta;
namespace Infrastructure
{
public class ProtobufOutputFormatter : OutputFormatter
{
private static Lazy<RuntimeTypeModel> model = new Lazy<RuntimeTypeMode... | ```c#
using System;
using Microsoft.Net.Http.Headers;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Formatters;
using ProtoBuf.Meta;
namespace Infrastructure
{
public class ProtobufOutputFormatter : OutputFormatter
{
private static Lazy<RuntimeTypeModel> model = new Lazy<RuntimeTypeMode... |
596e6168-9834-4348-80ff-5a0eb5eeda08 | {
"language": "C#"
} | ```c#
using Abp.Dependency;
using Abp.EntityHistory;
using Abp.Runtime;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Http;
using System.Text;
namespace Abp.AspNetCore.EntityHistory
{
/// <summary>
/// Implements <see cref="IEntityChangeSetReasonProvider"/> to get reason from HTTP request.
/// <... | ```c#
using Abp.Dependency;
using Abp.EntityHistory;
using Abp.Runtime;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Http;
using System.Text;
using Microsoft.AspNetCore.Http.Extensions;
namespace Abp.AspNetCore.EntityHistory
{
/// <summary>
/// Implements <see cref="IEntityChangeSetReasonProvider"/... |
6cdfafb1-c82d-417f-89fb-ca6975e95e29 | {
"language": "C#"
} | ```c#
using System;
using System.Data.Entity;
using PhotoLife.Data.Contracts;
namespace PhotoLife.Data
{
public class UnitOfWork : IUnitOfWork
{
private readonly DbContext dbContext;
public UnitOfWork(DbContext context)
{
if (context == null)
{
... | ```c#
using System;
using PhotoLife.Data.Contracts;
namespace PhotoLife.Data
{
public class UnitOfWork : IUnitOfWork
{
private readonly IPhotoLifeEntities dbContext;
public UnitOfWork(IPhotoLifeEntities context)
{
if (context == null)
{
throw ne... |
e7a15c0a-3642-435e-bc23-68383724c192 | {
"language": "C#"
} | ```c#
namespace Worker.Scalable
{
using King.Service;
using System.Diagnostics;
using System.Threading.Tasks;
public class ScalableTask : IDynamicRuns
{
public int MaximumPeriodInSeconds
{
get { return 30; }
}
public int MinimumPeriodInSeconds
{... | ```c#
namespace Worker.Scalable
{
using King.Service;
using System;
using System.Diagnostics;
using System.Threading.Tasks;
public class ScalableTask : IDynamicRuns
{
public int MaximumPeriodInSeconds
{
get
{
return 30;
}
... |
cda42b87-9362-46d5-9bfc-ad58c5733205 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base.Get;
using Objects.Basic;
using Objects.Get.Shows.Common;
internal class TraktShowsTrendingRequest : TraktGetRequest<TraktPaginationListResult<TraktTrendingShow>, TraktTrendingShow>
{
internal TraktShowsTrendingR... | ```c#
namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base;
using Base.Get;
using Objects.Basic;
using Objects.Get.Shows.Common;
internal class TraktShowsTrendingRequest : TraktGetRequest<TraktPaginationListResult<TraktTrendingShow>, TraktTrendingShow>
{
internal Tra... |
47ec220e-ac73-483c-a108-9ea589672e26 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using LinqToDB;
using NUnit.Framework;
namespace Tests.UserTests
{
[TestFixture]
public class Issue1556Tests : TestBase
{
[Test]
public void Issue1556Test([DataSources(ProviderName.Sybase, ProviderName.OracleNative)] string context)
{
using (var db = GetDataContext... | ```c#
using System;
using System.Linq;
using LinqToDB;
using NUnit.Framework;
namespace Tests.UserTests
{
[TestFixture]
public class Issue1556Tests : TestBase
{
[Test]
public void Issue1556Test(
[DataSources(ProviderName.Sybase, ProviderName.OracleNative, ProviderName.Access)] string context)
{
using... |
5c60f56b-8de8-4bca-8ae7-f064e60a2857 | {
"language": "C#"
} | ```c#
using System.Net.Http;
using System.Threading.Tasks;
using Anemonis.MicrosoftOffice.AddinHost.Middleware;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualStudio.TestTools.UnitTesting... | ```c#
using System.Net.Http;
using System.Threading.Tasks;
using Anemonis.MicrosoftOffice.AddinHost.Middleware;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualStudio.TestTools.UnitTesting... |
777e9944-8eea-44c9-9258-ed88e37c2711 | {
"language": "C#"
} | ```c#
using GRA.Domain.Service;
using GRA.Controllers.ViewModel.ParticipatingBranches;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace GRA.Controllers
{
public class ParticipatingBranchesController : Base.UserController
{
private readonly SiteService _siteService;... | ```c#
using GRA.Domain.Service;
using GRA.Controllers.ViewModel.ParticipatingBranches;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace GRA.Controllers
{
public class ParticipatingBranchesController : Base.UserController
{
private readonly SiteService _siteService;... |
c956dad9-59b7-482f-81c7-5ba49b126f6e | {
"language": "C#"
} | ```c#
using System;
namespace OpenWeatherMap.Standard.Models
{
/// <summary>
/// wind model
/// </summary>
[Serializable]
public class Wind : BaseModel
{
private float speed, gust;
private int deg;
/// <summary>
/// wind speed
/// </summary>
pub... | ```c#
using Newtonsoft.Json;
using System;
namespace OpenWeatherMap.Standard.Models
{
/// <summary>
/// wind model
/// </summary>
[Serializable]
public class Wind : BaseModel
{
private float speed, gust;
private int deg;
/// <summary>
/// wind speed
///... |
843ca95a-b7f9-4e53-9bcf-d6d8a53a220f | {
"language": "C#"
} | ```c#
using RepoZ.Api.IO;
using System;
using System.Linq;
namespace RepoZ.Api.Mac.IO
{
public class MacDriveEnumerator : IPathProvider
{
public string[] GetPaths()
{
return System.IO.DriveInfo.GetDrives()
.Where(d => d.DriveType == System.IO.DriveType.Fixed)
... | ```c#
using RepoZ.Api.IO;
using System;
using System.Linq;
namespace RepoZ.Api.Mac.IO
{
public class MacDriveEnumerator : IPathProvider
{
public string[] GetPaths()
{
return new string[] { Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) };
}
}
}``` |
f51dee6a-4c4f-4a58-a1f8-966d4159c555 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sprache;
using System.Text.RegularExpressions;
using KVLib.KeyValues;
namespace KVLib
{
/// <summary>
/// Parser entry point for reading Key Value strings
/// </summ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sprache;
using System.Text.RegularExpressions;
using KVLib.KeyValues;
namespace KVLib
{
/// <summary>
/// Parser entry point for reading Key Value strings
/// </summ... |
c145b20d-be54-444e-a2dd-83ff9533ade9 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using HtmlAgilityPack;
namespace ReverseMarkdown.Converters
{
public class Li
: ConverterBase
{
public Li(Converter converter)
: base(converter)
{
this.Converter.Register("li", this);
}
public override string Convert(HtmlNode node)
{
string content = th... | ```c#
using System;
using System.Linq;
using HtmlAgilityPack;
namespace ReverseMarkdown.Converters
{
public class Li
: ConverterBase
{
public Li(Converter converter)
: base(converter)
{
this.Converter.Register("li", this);
}
public override string Convert(HtmlNode node)
{
string content = th... |
bce6062d-973b-4c53-a6b7-36f8b482b746 | {
"language": "C#"
} | ```c#
namespace DungeonsAndDragons.DOF
{
public class Character
{
public int Level { get; set; }
public int Strength { get; set; }
public int Dexterity { get; set; }
public IWeapon CurrentWeapon { get; set; }
public int StrengthModifier
{
get { retu... | ```c#
namespace DungeonsAndDragons.DOF
{
public class Character
{
public int Level { get; set; }
public int Strength { get; set; }
public int Dexterity { get; set; }
public IWeapon CurrentWeapon { get; set; }
public int StrengthModifier
{
get { retu... |
e0bc7581-ac34-4dc5-9c6e-27fcf634f45c | {
"language": "C#"
} | ```c#
namespace Stripe.Issuing
{
using Newtonsoft.Json;
public class VerificationData : StripeEntity<VerificationData>
{
/// <summary>
/// One of <c>match</c>, <c>mismatch</c>, or <c>not_provided</c>.
/// </summary>
[JsonProperty("address_line1_check")]
public string... | ```c#
namespace Stripe.Issuing
{
using Newtonsoft.Json;
public class VerificationData : StripeEntity<VerificationData>
{
/// <summary>
/// One of <c>match</c>, <c>mismatch</c>, or <c>not_provided</c>.
/// </summary>
[JsonProperty("address_line1_check")]
public string... |
28fea31a-a816-4580-a4c7-09fd5071b1c8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Requests
{
public class Schema
{
public string Url { get; private set; }
public string Base { get; private set; }
public string Path { get; private set; }... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Requests
{
public class Schema
{
public string Url { get; private set; }
public string Base { get; private set; }
public string Path { get; private set; }... |
7838e11b-7cc3-422a-88d2-eada502568a9 | {
"language": "C#"
} | ```c#
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int x = ClassLibrary1.Class1.ReturnFive();
Console.WriteLine("Hello World!");
}
}
}
```
Add a quick little demo of using a function from the shared class library t... | ```c#
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
// Quick little demo of using a function from the shared class library
int x = ClassLibrary1.Class1.ReturnFive();
System.Diagnostics.Debug.Assert(x == 5);
... |
6a9cc342-22bb-4b4f-ad7e-0ffb68249a00 | {
"language": "C#"
} | ```c#
@model IEnumerable<Unit>
<div class="page-header">
<h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default" })</h1>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th>
<th... | ```c#
@model IEnumerable<Unit>
<div class="page-header">
<h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default" })</h1>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th>
<th... |
ec357b4e-9a93-4f5f-81d1-63c973ff6837 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
namespace Meraki {
public partial class MerakiClient {
private readonly HttpClient _client;
private readonly UrlFormatProvider _formatter = new UrlFormatProvider();
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
namespace Meraki {
public partial class MerakiClient {
private readonly HttpClient _client;
private r... |
26d68c52-a3c1-427a-b056-d32a5bb08634 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Duality;
using RockyTV.Duality.Plugins.IronPython.Resources;
using IronPython.Hosting;
using IronPython.Runtime;
using IronPython.Compiler;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting;
using Duality.Editor;
namespace Ro... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Duality;
using RockyTV.Duality.Plugins.IronPython.Resources;
using IronPython.Hosting;
using IronPython.Runtime;
using IronPython.Compiler;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting;
using Duality.Editor;
namespace Ro... |
0b220a82-1c17-4513-ad76-50d6b4ef94a0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace SFA.DAS.EmployerUsers.Api.Controllers
{
[RoutePrefix("api/status")]
public class StatusController : ApiController
{
[Route("")]
public IHttpAc... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using SFA.DAS.EmployerUsers.Api.Orchestrators;
namespace SFA.DAS.EmployerUsers.Api.Controllers
{
[RoutePrefix("api/status")]
public class Stat... |
19d80c5c-4306-42b0-81d8-d82c66434582 | {
"language": "C#"
} | ```c#
namespace Siftables
{
public partial class MainWindowView
{
public MainWindowView()
{
InitializeComponent();
}
}
}
```
Break build to test TeamCity. | ```c#
namespace Siftables
{
public partial class MainWindowView
{
public MainWindowView()
{
InitializeComponent();
DoSomething();
}
}
}
``` |
7cc95ad2-9cf7-4acc-b53a-c7a2afa4fbdf | {
"language": "C#"
} | ```c#
namespace Fixie
{
using Internal;
using Internal.Expressions;
/// <summary>
/// Subclass Discovery to customize test discovery rules.
///
/// The default discovery rules are applied to a test assembly whenever the test
/// assembly includes no such subclass.
///
/// By defua... | ```c#
namespace Fixie
{
using Internal;
using Internal.Expressions;
/// <summary>
/// Subclass Discovery to customize test discovery rules.
///
/// The default discovery rules are applied to a test assembly whenever the test
/// assembly includes no such subclass.
///
/// By defau... |
b6daac99-db64-4036-b966-413a2d999cda | {
"language": "C#"
} | ```c#
using System.Web.UI;
using IntelliFactory.WebSharper;
namespace IntelliFactory.WebSharper.JQuery.Mobile.Resources
{
[IntelliFactory.WebSharper.Core.Attributes.Require(typeof(IntelliFactory.WebSharper.JQuery.Resources.JQuery))]
public class JQueryMobile : IntelliFactory.WebSharper.Core.Resources.Bas... | ```c#
using System.Web.UI;
using IntelliFactory.WebSharper;
namespace IntelliFactory.WebSharper.JQuery.Mobile.Resources
{
[IntelliFactory.WebSharper.Core.Attributes.Require(typeof(IntelliFactory.WebSharper.JQuery.Resources.JQuery))]
public class JQueryMobile : IntelliFactory.WebSharper.Core.Resources.Bas... |
0a87b9bc-ae21-4fd2-a4d2-23994df17273 | {
"language": "C#"
} | ```c#
using System;
using Moq;
using Xunit;
namespace MarcinHoppe.LangtonsAnts.Tests
{
public class AntTests
{
[Fact]
public void AntTurnsRightOnWhiteSquare()
{
// Arrange
var ant = AntAt(10, 7);
var board = Mock.Of<Board>(b => b.ColorAt(PositionAt(... | ```c#
using System;
using Moq;
using Xunit;
namespace MarcinHoppe.LangtonsAnts.Tests
{
public class AntTests
{
[Fact]
public void AntTurnsRightOnWhiteSquare()
{
// Arrange
var ant = AntAt(10, 7);
var board = Mock.Of<Board>(b => b.ColorAt(PositionAt(... |
680d98aa-d10e-4440-866d-6888d399a688 | {
"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("FakeHttpContext.Tests")]
[assembly: ... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
using Xunit;
[assembly: CollectionBehavior(DisableTestParallelization = true)]
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated w... |
f8b63df4-279c-44cc-a0e5-1dcffc27b812 | {
"language": "C#"
} | ```c#
#region Usings
using NUnit.Framework;
#endregion
namespace UnitTests
{
[TestFixture]
public class UnitTest1
{
[Test]
public void TestMethod1()
{
Assert.True(true);
}
}
}```
Replace test with test stub | ```c#
#region Usings
using NUnit.Framework;
using WebApplication.Controllers;
#endregion
namespace UnitTests
{
[TestFixture]
public class UnitTest1
{
[Test]
public void TestMethod1()
{
var controller = new HabitController();
Assert.True(true);
}
... |
0f858789-f30d-4226-b67c-bc7841467439 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using Microsoft.WindowsAzure.MobileServices;
namespace MyDriving.AzureClient
{
public class AzureClient : IAzureClient
{
const string DefaultMobileSe... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using Microsoft.WindowsAzure.MobileServices;
namespace MyDriving.AzureClient
{
public class AzureClient : IAzureClient
{
const string DefaultMobileSe... |
7eacc8fd-296b-4f8c-a567-9a095a6aee45 | {
"language": "C#"
} | ```c#
using Lombiq.HelpfulExtensions.Extensions.SiteTexts.Services;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Data.Migration;
using OrchardCore.Modules;
namespace Lombiq.HelpfulExtensions.Extensions.SiteTexts;
[Feature(FeatureIds.SiteTexts)]
public class Startup : StartupBase
{
public over... | ```c#
using Lombiq.HelpfulExtensions.Extensions.SiteTexts.Services;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Data.Migration;
using OrchardCore.Modules;
namespace Lombiq.HelpfulExtensions.Extensions.SiteTexts;
[Feature(FeatureIds.SiteTexts)]
public class Startup : StartupBase
{
public over... |
7c04f33d-c86f-4029-86f2-93dec6e6ea6a | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace Clubhouse.io.net.Entities.Labels
{
public class ClubhouseCreateLabelParams
{
[JsonProperty(PropertyName = "color")]
public string Color { get; set; }
[JsonProperty(PropertyName = "external_id")]
public string ExternalID { get; set; }
... | ```c#
using Newtonsoft.Json;
namespace Clubhouse.io.net.Entities.Labels
{
public class ClubhouseCreateLabelParams
{
[JsonProperty(PropertyName = "color", NullValueHandling = NullValueHandling.Ignore)]
public string Color { get; set; }
[JsonProperty(PropertyName = "external_id", NullVa... |
1b06f841-247f-4a71-844e-b783d6884f91 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace KotoriCore.Configuration
{
/// <summary>
/// Kotori main configuration.
/// </summary>
public class Kotori
{
/// <summary>
/// Gets or sets the instance.
/// </summary>
/// <value>The instance.</value>
public... | ```c#
using System.Collections.Generic;
namespace KotoriCore.Configuration
{
/// <summary>
/// Kotori main configuration.
/// </summary>
public class Kotori
{
/// <summary>
/// Gets or sets the instance.
/// </summary>
/// <value>The instance.</value>
public... |
ef1f20e8-b295-444c-802a-1f21eccc52cc | {
"language": "C#"
} | ```c#
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unle... | ```c#
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unle... |
81b114e8-c45a-44f6-8f14-14ab59c879ae | {
"language": "C#"
} | ```c#
using System;
using System.Drawing;
using NUnit.Framework;
using Palaso.UI.WindowsForms;
namespace PalasoUIWindowsForms.Tests.FontTests
{
[TestFixture]
public class FontHelperTests
{
[SetUp]
public void SetUp()
{
// setup code goes here
}
[TearDown]
public void TearDown()
{
// tear down... | ```c#
using System;
using System.Drawing;
using System.Linq;
using NUnit.Framework;
using Palaso.UI.WindowsForms;
namespace PalasoUIWindowsForms.Tests.FontTests
{
[TestFixture]
public class FontHelperTests
{
[Test]
public void MakeFont_FontName_ValidFont()
{
using (var sourceFont = SystemFonts.DefaultFont... |
0954762f-e877-48ef-aa9c-2016b509d45d | {
"language": "C#"
} | ```c#
using CrossStitch.Core.Configuration;
namespace CrossStitch.Core.Modules.Stitches
{
public class StitchesConfiguration : IModuleConfiguration
{
public static StitchesConfiguration GetDefault()
{
return ConfigurationLoader.GetConfiguration<StitchesConfiguration>("stitches.json... | ```c#
using CrossStitch.Core.Configuration;
namespace CrossStitch.Core.Modules.Stitches
{
public class StitchesConfiguration : IModuleConfiguration
{
public static StitchesConfiguration GetDefault()
{
return ConfigurationLoader.GetConfiguration<StitchesConfiguration>("stitches.json... |
9dba614a-4ebe-4d2f-9c3a-d56d8ac43393 | {
"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... |
e58fd792-12f4-431c-8575-b8012d110ec3 | {
"language": "C#"
} | ```c#
using NUnit.Framework;
using SecretSplitting;
namespace ElectronicCash.Tests
{
[TestFixture]
class SecretSplittingTests
{
private static readonly byte[] Message = Helpers.GetBytes("Supersecretmessage");
private static readonly byte[] RandBytes = Helpers.GetRandomBytes(Helpers.GetStri... | ```c#
using NUnit.Framework;
using SecretSplitting;
namespace ElectronicCash.Tests
{
[TestFixture]
class SecretSplittingTests
{
private static readonly byte[] Message = Helpers.GetBytes("Supersecretmessage");
private static readonly byte[] RandBytes = Helpers.GetRandomBytes(Helpers.GetStri... |
14d04fe8-faa6-4dd4-beae-69a62afab71c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using XHRTool.XHRLogic.Common;
namespace XHRTool.UI.WPF.ViewModels
{
[Serializable]
public class UrlHistoryModel
{
public UrlHistoryModel(string u... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using XHRTool.XHRLogic.Common;
namespace XHRTool.UI.WPF.ViewModels
{
[Serializable]
public class UrlHistoryModel
{
public UrlHistoryModel(string u... |
7a676c27-4a73-41bf-af98-ca85d11ac174 | {
"language": "C#"
} | ```c#
namespace Stripe
{
using Newtonsoft.Json;
public class BillingDetailsOptions : INestedOptions
{
[JsonProperty("address")]
public AddressOptions Address { get; set; }
[JsonProperty("country")]
public string Country { get; set; }
[JsonProperty("line1")]
... | ```c#
namespace Stripe
{
using Newtonsoft.Json;
public class BillingDetailsOptions : INestedOptions
{
[JsonProperty("address")]
public AddressOptions Address { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
[JsonProperty("name")]
publ... |
61a905ec-217c-4032-a726-bc36f6c47caf | {
"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.Shapes;
using osu.Game.Graphics.UserInterface;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual.Us... | ```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.Shapes;
using osu.Game.Graphics.UserInterface;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual.Us... |
5484ea86-9df1-4e50-86fc-d19843c524cc | {
"language": "C#"
} | ```c#
using System.Xml;
namespace umbraco.editorControls.imagecropper
{
public class DataTypeData : umbraco.cms.businesslogic.datatype.DefaultData
{
public DataTypeData(umbraco.cms.businesslogic.datatype.BaseDataType DataType) : base(DataType) { }
public override XmlNode ToXMl(XmlDocu... | ```c#
using System.Xml;
namespace umbraco.editorControls.imagecropper
{
public class DataTypeData : umbraco.cms.businesslogic.datatype.DefaultData
{
public DataTypeData(umbraco.cms.businesslogic.datatype.BaseDataType DataType) : base(DataType) { }
public override XmlNode ToXMl(XmlDocu... |
9cc5469f-c2cc-4a68-8a75-6446a3fb2132 | {
"language": "C#"
} | ```c#
using System;
using System.Threading.Tasks;
using Treehopper;
using Treehopper.Libraries.Displays;
namespace LedShiftRegisterDemo
{
class Program
{
static void Main(string[] args)
{
App().Wait();
}
static async Task App()
{
var board = awa... | ```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using Treehopper;
using Treehopper.Libraries.Displays;
namespace LedShiftRegisterDemo
{
class Program
{
static void Main(string[] args)
{
App().Wait();
}
static async Task App()
{
... |
bedb4faf-c7fe-437a-9dab-5fb81c9138b5 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Tests.Experimental.Requests.Users.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Base.Post.Bodyless;
using TraktApiSharp.Experimental.Requests.Users.OAuth;
[TestClass]
public class Trak... | ```c#
namespace TraktApiSharp.Tests.Experimental.Requests.Users.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Base.Post.Bodyless;
using TraktApiSharp.Experimental.Requests.Users.OAuth;
using TraktApiSharp.Requests;
... |
ddea8057-937a-453b-aba8-1bfa36b95d93 | {
"language": "C#"
} | ```c#
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Windows.Forms;
namespace Common
{
public partial class InterfaceSelectorComboBox : ComboBox
{
public InterfaceSelectorComboBox()
{
InitializeComponent();
NetworkInterface[] inte... | ```c#
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Windows.Forms;
namespace Common
{
public partial class InterfaceSelectorComboBox : ComboBox
{
public InterfaceSelectorComboBox()
{
InitializeComponent();
Initalize();
... |
c3c430eb-2983-4bbb-887f-eaff544535ea | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using NUnit.Framework;
namespace MaxMind.MaxMindDb.Test
{
[TestFixture]
public class ThreadingTest
{
[Test]
public void TestParallelFor()
{
var reade... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using NUnit.Framework;
namespace MaxMind.MaxMindDb.Test
{
[TestFixture]
public class ThreadingTest
{
[Test]
public void TestParallelFor()
{
var reade... |
4242c52c-44eb-4a35-a2bd-a7cbeb436395 | {
"language": "C#"
} | ```c#
using Xamarin.Forms;
#if __ANDROID__
using NativePoint = Android.Graphics.PointF;
using NativeColor = Android.Graphics.Color;
#elif __IOS__
using NativePoint = CoreGraphics.CGPoint;
#elif NETFX_CORE
using NativePoint = Windows.Foundation.Point;
#endif
#if NETFX_CORE
using NativeColor = Windows.UI.Color;
#endif
... | ```c#
using Xamarin.Forms;
#if __ANDROID__
using NativePoint = Android.Graphics.PointF;
using NativeColor = Android.Graphics.Color;
#elif __IOS__
using NativePoint = CoreGraphics.CGPoint;
#elif NETFX_CORE
using NativePoint = Windows.Foundation.Point;
#endif
#if NETFX_CORE
using NativeColor = Windows.UI.Color;
#endif
... |
9ed48d3a-6107-4b34-bdef-d8d16c5bc932 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Represents an email notification sent a user, employee, or administrator
/// </summary>
public class EmailNotification : Notification
{
public static String QueueName { get { r... | ```c#
using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Represents an email notification sent a user, employee, or administrator
/// </summary>
public class EmailNotification : Notification
{
public static String QueueName { get { r... |
f08d485a-07a0-453b-98c4-da78ab1d4926 | {
"language": "C#"
} | ```c#
using Avalonia.Controls;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace WalletWasabi.Gui.Converters
{
public class WindowStateAfterSartJsonConverter : JsonConverter
{
/// <inheritdoc />
public override bool CanConvert(Type objectType)
{
return objec... | ```c#
using Avalonia.Controls;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace WalletWasabi.Gui.Converters
{
public class WindowStateAfterSartJsonConverter : JsonConverter
{
/// <inheritdoc />
public override bool CanConvert(Type objectType)
{
return objec... |
f83336ab-4a28-4bed-b909-ac3dee66ac71 | {
"language": "C#"
} | ```c#
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Data;
using SFA.DAS.EmployerFinance.Interfaces;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJo... | ```c#
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Data;
using SFA.DAS.EmployerFinance.Interfaces;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJo... |
5ca8ef15-c46a-4cff-884e-5c77e5b1d3cc | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using AgateLib;
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.InputLib;
namespace Tests.DisplayTests
{
class FullscreenTest : IAgateTest
{
public string Name
{
get { return "Full Screen"; }
}
public string Categor... | ```c#
using System;
using System.Collections.Generic;
using AgateLib;
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.InputLib;
namespace Tests.DisplayTests
{
class FullscreenTest : IAgateTest
{
public string Name
{
get { return "Full Screen"; }
}
public string Categor... |
261100d1-a41f-4689-a63e-ce11bec8d900 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frenetic.TagHandlers;
using Frenetic.TagHandlers.Objects;
using Voxalia.ServerGame.TagSystem.TagObjects;
using Voxalia.ServerGame.ServerMainSystem;
using Voxalia.ServerGame.EntitySystem;
using Voxalia.Shared;
namespace V... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frenetic.TagHandlers;
using Frenetic.TagHandlers.Objects;
using Voxalia.ServerGame.TagSystem.TagObjects;
using Voxalia.ServerGame.ServerMainSystem;
using Voxalia.ServerGame.EntitySystem;
using Voxalia.Shared;
namespace V... |
8ff789f7-db45-4c91-b388-cd7a049324e7 | {
"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 : IQuestionRepository
{
private readonly TrappistDbContext _dbC... | ```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 : IQuestionRepository
{
private readonly TrappistDbContext _dbC... |
4a002458-d6f0-4081-995f-004d51ee8e79 | {
"language": "C#"
} | ```c#
// Copyright 2020, Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | ```c#
// Copyright 2020, Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
890028aa-b264-4146-ba99-9260d4fcc0e9 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using PPTail.Entities;
using PPTail.Interfaces;
namespace PPTail
{
public class Program
{
public static void Main(string[] args)
{
(var argsAreValid, var argumen... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using PPTail.Entities;
using PPTail.Interfaces;
using PPTail.Extensions;
namespace PPTail
{
public class Program
{
const string _connectionStringProviderKey = "Provider";
p... |
a7f06f64-1049-4ccb-bf28-165b5a23bdb3 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authentication;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Wukong.Models;
namespace Wukong.Controlle... | ```c#
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authentication;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Wukong.Models;
namespace Wukong.Controllers
{
[Route("oa... |
1293eba3-210a-4095-a3cb-ae032ca54573 | {
"language": "C#"
} | ```c#
using System.IO;
using System.Reflection;
using NUnit.Framework;
public class GitHubAssemblyTests
{
[Theory]
public void GitHub_Assembly_Should_Not_Reference_DesignTime_Assembly(string assemblyFile)
{
var asm = Assembly.LoadFrom(assemblyFile);
foreach (var referencedAssembly in asm.G... | ```c#
using System;
using System.IO;
using System.Reflection;
using NUnit.Framework;
public class GitHubAssemblyTests
{
[Theory]
public void GitHub_Assembly_Should_Not_Reference_DesignTime_Assembly(string assemblyFile)
{
var asm = Assembly.LoadFrom(assemblyFile);
foreach (var referencedAss... |
923cbabe-687c-4ba6-b4bc-72602e04527f | {
"language": "C#"
} | ```c#
using System;
using Quartz.Impl.Calendar;
using Xunit;
namespace Quartz.DynamoDB.Tests
{
/// <summary>
/// Tests the DynamoCalendar serialisation for all quartz derived calendar types.
/// </summary>
public class CalendarSerialisationTests
{
[Fact]
[Trait("Category", "Unit")]... | ```c#
using System;
using Quartz.Impl.Calendar;
using Xunit;
namespace Quartz.DynamoDB.Tests
{
/// <summary>
/// Tests the DynamoCalendar serialisation for all quartz derived calendar types.
/// </summary>
public class CalendarSerialisationTests
{
/// <summary>
/// Tests that the d... |
d803ccca-8f12-4ed1-b201-8f8260d60edc | {
"language": "C#"
} | ```c#
using KitKare.Data.Models;
using KitKare.Data.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using AutoMapper.QueryableExtensions;
using KitKare.Server.ViewModels;
namespace KitKare.Server.Controllers
{
public ... | ```c#
using KitKare.Data.Models;
using KitKare.Data.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using AutoMapper.QueryableExtensions;
using KitKare.Server.ViewModels;
namespace KitKare.Server.Controllers
{
public ... |
a41fa099-de4c-4834-a41a-6e99538f2790 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ILCompiler.DependencyAnalysisFramework
{
public interface IDependencyNode
{
bool Marked
{
get;
}
}
public interface IDependencyNode<D... | ```c#
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
namespace ILCompiler.DependencyAnalysisFramework
{
public interface ID... |
eb884077-a555-4943-b4e2-df7436198802 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace Casper {
public class MSBuild : TaskBase {
public string WorkingDirectory { get; set; }
public string ProjectFile { get; set; }
public string[] Targets { get; set; }
public IDictionary<string, string> Properties { get; set; }
public override void Execute(... | ```c#
using System.Collections.Generic;
using System.Collections;
namespace Casper {
public class MSBuild : TaskBase {
public string WorkingDirectory { get; set; }
public string ProjectFile { get; set; }
public IList Targets { get; set; }
public IDictionary Properties { get; set; }
public override void Ex... |
f3d8da8c-dafa-4613-a60b-83199818113a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace Cosmos.TestRunner.Core
{
public static class TestKernelSets
{
public static IEnumerable<Type> GetStableKernelTypes()
{
yield return typeof(VGACompilerCrash.Kernel);
////yield return typeof(Cosmos.Compiler.T... | ```c#
using System;
using System.Collections.Generic;
namespace Cosmos.TestRunner.Core
{
public static class TestKernelSets
{
public static IEnumerable<Type> GetStableKernelTypes()
{
yield return typeof(VGACompilerCrash.Kernel);
//yield return typeof(Cosmos.Compiler.Tes... |
b8be9c02-d6bb-4f59-9bf0-c868f7b8033b | {
"language": "C#"
} | ```c#
using System;
using BudgetAnalyser.Engine.BankAccount;
using BudgetAnalyser.Engine.Budget;
using JetBrains.Annotations;
namespace BudgetAnalyser.Engine.Statement.Data
{
[AutoRegisterWithIoC]
internal partial class Mapper_TransactionDto_Transaction
{
private readonly IAccountTypeRep... | ```c#
using System;
using BudgetAnalyser.Engine.BankAccount;
using BudgetAnalyser.Engine.Budget;
using JetBrains.Annotations;
namespace BudgetAnalyser.Engine.Statement.Data
{
[AutoRegisterWithIoC]
internal partial class Mapper_TransactionDto_Transaction
{
private readonly IAccountTypeRep... |
56de6788-e125-417f-84ba-6b31fe65c65e | {
"language": "C#"
} | ```c#
namespace Vlc.DotNet.Core
{
public interface IAudioManagement
{
IAudioOutputsManagement Outputs { get; }
}
}
```
Add Audio properties to IAudiomanagement | ```c#
namespace Vlc.DotNet.Core
{
public interface IAudioManagement
{
IAudioOutputsManagement Outputs { get; }
bool IsMute { get; set; }
void ToggleMute();
int Volume { get; set; }
ITracksManagement Tracks { get; }
int Channel { get; set; }
long Del... |
87ad8b29-b044-4a9a-a3d0-33c7da7eee80 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
namespace JetBrains.ReSharper.Plugins.PresentationAssistant
{
public static class ActionIdBlacklist
{
private static readonly HashSet<string> ActionIds = new HashSet<string>
{
// These are the only actions that should be hidden
"T... | ```c#
using System.Collections.Generic;
namespace JetBrains.ReSharper.Plugins.PresentationAssistant
{
public static class ActionIdBlacklist
{
private static readonly HashSet<string> ActionIds = new HashSet<string>
{
// These are the only actions that should be hidden
"T... |
840757dd-0fc3-4006-aedb-db366a02ae25 | {
"language": "C#"
} | ```c#
using System.Runtime.Serialization;
namespace Nest
{
public enum StringFielddataFormat
{
[EnumMember(Value = "paged_bytes")]
PagedBytes,
[EnumMember(Value = "doc_values")]
DocValues,
[EnumMember(Value = "disabled")]
Disabled
}
}
```
Remove doc_values fielddata format for strings | ```c#
using System.Runtime.Serialization;
namespace Nest
{
public enum StringFielddataFormat
{
[EnumMember(Value = "paged_bytes")]
PagedBytes,
[EnumMember(Value = "disabled")]
Disabled
}
}
``` |
288297bd-8cca-407a-aafa-7d7aebba48d0 | {
"language": "C#"
} | ```c#
using System;
using Humanizer;
namespace Repack
{
internal class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Usage: repack [date]");
Console.WriteLine("Prints how long it is until your birthday.");
Console.WriteLine("If you ... | ```c#
using System;
using Humanizer;
namespace Repack
{
internal class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Usage: repack [date]");
Console.WriteLine("Prints how long it is until your birthday.");
Console.WriteLine("If you ... |
7ccc4498-26a1-461c-b302-98e6cfff508b | {
"language": "C#"
} | ```c#
using CommandLine;
using CommandLine.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Builder
{
public class Options
{
[Option('a', "buildDir", Required = true, HelpText = "")]
public string BuildDir { get... | ```c#
using CommandLine;
using CommandLine.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Builder
{
public class Options
{
[Option('a', "buildDir", Required = true, HelpText = "")]
public string BuildDir { get... |
15518ed4-a99b-47e1-96fe-7eb4f590e490 | {
"language": "C#"
} | ```c#
using LogicalShift.Reason.Api;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LogicalShift.Reason.Solvers
{
/// <summary>
/// Represents a solver that can solve a single clause
/// </summary>
public class SimpleSingleClauseSolver : ISol... | ```c#
using LogicalShift.Reason.Api;
using LogicalShift.Reason.Assignment;
using LogicalShift.Reason.Literals;
using LogicalShift.Reason.Unification;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LogicalShift.Reason.Solvers
{
/// <summary>
/// Repre... |
b04380be-49bf-452b-a74e-c2a922ca65b7 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using Realms;
using Rea... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using Realms;
using Rea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.