doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
6729bde3-ad01-40a3-8187-88ee449c1b32 | {
"language": "C#"
} | ```c#
namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity
{
[JsonProperty("succeeded")]
public bool Succeeded { get; set; }
[JsonProperty("version")]
public string Version { get; s... | ```c#
namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity
{
/// <summary>
/// Whether or not authentication was performed. 3D Secure will succeed without
/// authentication when the card is... |
7c67380d-c77b-485d-88b0-5762ef5704d4 | {
"language": "C#"
} | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyProduct("Hangfire")]
[assembly: AssemblyCopyright("Copyright © 2013-2015 Sergey Odinokov, Adam Barclay")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
// Don't edit m... | ```c#
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyProduct("Hangfire")]
[assembly: AssemblyCopyright("Copyright © 2013-2017 Sergey Odinokov, Adam Barclay")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
// Don't edit m... |
b0ca1b81-0f95-4569-b87e-eab87b999f8c | {
"language": "C#"
} | ```c#
using UnityEngine;
using System.Collections;
using Matcha.Game.Tweens;
public class InteractiveEntity : MonoBehaviour
{
public enum EntityType { none, prize, weapon };
public EntityType entityType;
[HideInInspector]
public bool alreadyCollided = false;
public bool disableIfOffScreen = true... | ```c#
using UnityEngine;
using System;
using System.Collections;
using Matcha.Game.Tweens;
public class InteractiveEntity : MonoBehaviour
{
public enum EntityType { none, prize, weapon };
public EntityType entityType;
[HideInInspector]
public bool alreadyCollided = false;
public bool disableIfOf... |
eb12a5c9-f12f-410a-9cf0-d369860ff816 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Beatmaps
{
public class BeatmapStatistic
{
[O... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osuTK;
namespace osu.Game.Beatmaps
{
public class BeatmapStatistic
... |
2d531056-c541-4575-a2ab-c5cf2e1e852c | {
"language": "C#"
} | ```c#
using System;
using Client.Common;
using Client.Game;
using UnityEngine;
namespace Client.Controllers
{
// Create a ball. Once there is a Goal, create a new
// ball at the given time frame.
public class BallController : MonoBehaviour
{
[SerializeField]
[Tooltip("The soccer ball p... | ```c#
using System;
using Client.Common;
using Client.Game;
using UnityEngine;
namespace Client.Controllers
{
// Create a ball. Once there is a Goal, create a new
// ball at the given time frame.
public class BallController : MonoBehaviour
{
[SerializeField]
[Tooltip("The soccer ball p... |
fbc13dbf-4083-4ec9-aeb3-80338f27ff9d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExoMail.Smtp.Extensions
{
public static class StringExtensions
{
public static Stream ToStream(this string str)
{
return new MemorySt... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExoMail.Smtp.Extensions
{
public static class StringExtensions
{
public static Stream ToStream(this string str)
{
return new MemorySt... |
8fd62c8c-9b27-40e9-b67c-c98f16bb9ab1 | {
"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... |
f58a886d-bc2a-4c20-a2ed-912f288f256d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelAgency.Data;
using TravelAgency.Data.Migrations;
using TravelAgency.MongoDbExtractor;
namespace TravelAgency.Client
{
public class Startup
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelAgency.Data;
using TravelAgency.Data.Migrations;
using TravelAgency.MongoDbExtractor;
namespace TravelAgency.Client
{
public class Startup
{
... |
d6be67db-4814-4862-84dd-b0e9345f6662 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using JetBrains.Annotations;
namespace Itg.ZabbixAgent.Core
{
internal class ZabbixProtocol
{
private static readonly byte[] headerBytes = Encoding.ASCII.GetBytes(ZabbixConstants.HeaderString);
private static re... | ```c#
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using JetBrains.Annotations;
namespace Itg.ZabbixAgent.Core
{
internal class ZabbixProtocol
{
private static readonly byte[] headerBytes = Encoding.ASCII.GetBytes(ZabbixConstants.HeaderString);
private static re... |
6cffd277-5129-4c50-8abb-a768848ff0c5 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Tournament.Components;
namespace osu.Game.Tournament.Screens.Showcase
{
public cla... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Tournament.Components;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
name... |
bcce1c0c-3f4f-46ff-8db0-1b07b0e4f553 | {
"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.Rulesets;
namespace osu.Game.Scoring.Legacy
{
/// <summary>
/// A <see cref="LegacyScoreDecoder"/> which retrieves... | ```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.Rulesets;
namespace osu.Game.Scoring.Legacy
{
/// <summary>
/// A <see cref="LegacyScoreDecoder"/> which retrieves... |
664c8fcb-2542-447c-b731-670acab6d127 | {
"language": "C#"
} | ```c#
using System;
using System.Web;
namespace RollbarSharp
{
public class RollbarHttpModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.Error += SendError;
}
public void Dispose()
{
}
private void SendError(object sender, EventArgs e)
{
var a... | ```c#
using System;
using System.Web;
namespace RollbarSharp
{
public class RollbarHttpModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.Error += SendError;
}
public void Dispose()
{
}
private static ... |
33a501da-d164-4171-bfc3-536f81871e87 | {
"language": "C#"
} | ```c#
namespace ClojSharp.Core.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Forms;
using ClojSharp.Core.Language;
using ClojSharp.Core.SpecialForms;
using Microsoft.VisualStudio.TestTools.UnitTesting;
... | ```c#
namespace ClojSharp.Core.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Compiler;
using ClojSharp.Core.Forms;
using ClojSharp.Core.Language;
using ClojSharp.Core.SpecialForms;
using Microsoft.VisualS... |
428510a2-d17f-48e1-8010-cece6f029ea8 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.UI;
using System.Web.WebPages;
using DotNetNuke.Web.Client;
using DotNetNuke.Web.Client.ClientResourceManagement;
namespace Satrabel.OpenContent.Components
{
public ab... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.UI;
using System.Web.WebPages;
using DotNetNuke.Web.Client;
using DotNetNuke.Web.Client.ClientResourceManagement;
namespace Satrabel.OpenContent.Components
{
public ab... |
1efe2eff-e0b6-40f8-8aef-703064f9375c | {
"language": "C#"
} | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using Microsoft.AspNet.Http.Authentication;
namespace Microsoft.AspNet.IISPlatformHandler
{
public class I... | ```c#
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using Microsoft.AspNet.Http.Authentication;
namespace Microsoft.AspNet.IISPlatformHandler
{
public class I... |
525d4607-d0bd-42eb-a816-44277f5eda91 | {
"language": "C#"
} | ```c#
namespace Curse.NET.Model
{
public class CreateInviteResponse
{
public string InviteCode { get; set; }
public int CreatorID { get; set; }
public string CreatorName { get; set; }
public string GroupID { get; set; }
public Group Group { get; set; }
public string ChannelID { get; set; }
public Chann... | ```c#
using System;
using Newtonsoft.Json;
namespace Curse.NET.Model
{
public class CreateInviteResponse
{
public string InviteCode { get; set; }
public int CreatorID { get; set; }
public string CreatorName { get; set; }
public string GroupID { get; set; }
public Group Group { get; set; }
public string ... |
dab8c18d-c9c3-4bc4-b46e-f87bdfc54266 | {
"language": "C#"
} | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... | ```c#
using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepos... |
7b1cfbff-09b3-40a7-845a-e0c4aaa8be87 | {
"language": "C#"
} | ```c#
namespace StraightSql.Test
{
using System;
using System.Threading.Tasks;
using Xunit;
public class DatabaseAbstractionTest
{
[Fact]
public async Task DatabaseAbstractionTestAsync()
{
var queryDispatcher = new QueryDispatcher(new ConnectionFactory(ConnectionString.Default));
var data... | ```c#
namespace StraightSql.Test
{
using System;
using System.Threading.Tasks;
using Xunit;
public class DatabaseAbstractionTest
{
[Fact]
public async Task DatabaseAbstractionTestAsync()
{
var queryDispatcher = new QueryDispatcher(new ConnectionFactory(ConnectionString.Default));
var data... |
88b19344-94b7-490e-97ea-71e5f902757f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace aspnet_start
{
public class Startup
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace aspnet_start
{
public class Startup
{
... |
75fede29-329e-4006-825b-6957d37bd795 | {
"language": "C#"
} | ```c#
using System;
using System.Runtime.InteropServices;
namespace TimeToMain
{
public static class Program
{
[DllImport("libnative.so")]
private static extern void write_marker(string name);
public static void Main(string[] args)
{
write_marker("/function/main");
... | ```c#
using System;
using System.Runtime.InteropServices;
namespace TimeToMain
{
public static class Program
{
[DllImport("libnative.so")]
private static extern void write_marker(string name);
public static void Main(string[] args)
{
Console.WriteLine("Hello World!"... |
12cc4642-81f7-4654-805c-f117c8587d72 | {
"language": "C#"
} | ```c#
using System;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
namespace Our.Umbraco.OpeningHours.Converters
{
[PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)]
public class OpeningHoursValueConverter :... | ```c#
using System;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
using Our.Umbraco.OpeningHours.Model;
namespace Our.Umbraco.OpeningHours.Converters
{
[PropertyValueType(typeof(OpeningHours))]
[PropertyValueCache(PropertyCacheV... |
40bcc700-c7b2-428d-bb6f-b066101fa6bf | {
"language": "C#"
} | ```c#
using NakedObjects;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace AdventureWorksModel
{
public partial class PersonPhone {
#region Injected Services
public IDomainObjectContainer Container { set; protected get; }
#endregion
... | ```c#
using NakedObjects;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace AdventureWorksModel
{
public partial class PersonPhone {
#region Injected Services
public IDomainObjectContainer Container { set; protected get; }
#endregion
... |
a67b386a-15d9-4189-98f5-51d97c7941e2 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Ru... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Ru... |
b7c181a3-6412-45f9-b377-111b9aec3907 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
namespace EasyNetQ.Management.Client.Model
{
public class ExchangeInfo
{
public string Type { get; private set; }
public bool AutoDelete { get; private set; }
public bool Durable { get; private set; }
public bool Internal { ... | ```c#
using System;
using System.Collections.Generic;
namespace EasyNetQ.Management.Client.Model
{
public class ExchangeInfo
{
public string Type { get; private set; }
public bool AutoDelete { get; private set; }
public bool Durable { get; private set; }
public bool Internal { ... |
0614c3eb-47e2-4773-9734-c9321ddaa923 | {
"language": "C#"
} | ```c#
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
public class PublishWindow : EditorWindow
{
private const string PublishTitle = "Publish this repository to GitHub";
private string repoName = "";
private string repoDescription = "";
private int selectedOrg =... | ```c#
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
public class PublishWindow : EditorWindow
{
private const string PublishTitle = "Publish this repository to GitHub";
private string repoName = "";
private string repoDescription = "";
private int selectedOrg =... |
dfb453a9-5758-4fd4-8fc6-087efd9fd6d3 | {
"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.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Consumption Management Li... | ```c#
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Consumption Management Li... |
f7eef529-6337-4fdd-9117-74e9848b2b1e | {
"language": "C#"
} | ```c#
#region
using System;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
namespace DesktopWidgets.Classes
{
internal static class AssemblyInfo
{
public static Version Version { get; } = Assembly.GetExecutingAssembly().GetName().Version;
public static string Copyr... | ```c#
#region
using System;
using System.Deployment.Application;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
namespace DesktopWidgets.Classes
{
internal static class AssemblyInfo
{
public static Version Version { get; } = (ApplicationDeployment.IsNetworkDeployed
... |
d4fede5d-a77c-4238-bc97-66a29cccc77f | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... | ```c#
using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _db... |
acd5be95-c926-45c4-b6b7-68acb9382ddd | {
"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.
namespace Microsoft.CodeAnalysis.Editor
{
internal struct CodeDefinitionWindowLocation
{
public string DisplayName { get; }
... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.Text;
namespace Microsoft.CodeAnalysis.Editor
{
internal struct CodeDefinitionWindowLocation
{
public str... |
cee6e1cb-5c16-4999-b4d2-71b3aa2db26e | {
"language": "C#"
} | ```c#
using Newtonsoft.Json;
namespace Tweetinvi.Models.V2
{
public class UrlV2
{
/// <summary>
/// The URL as displayed in the Twitter client.
/// </summary>
[JsonProperty("display_url")] public string DisplayUrl { get; set; }
/// <summary>
/// The end position... | ```c#
using Newtonsoft.Json;
namespace Tweetinvi.Models.V2
{
public class UrlV2
{
/// <summary>
/// The URL as displayed in the Twitter client.
/// </summary>
[JsonProperty("display_url")] public string DisplayUrl { get; set; }
/// <summary>
/// The end position... |
b4863652-5085-460e-b4d9-86dff5caec3b | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodePlayground
{
class Program
{
static void Main(string[] args)
{
// This doesn't change (yet):
foreach (var item in GeneratedStrings())
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodePlayground
{
class Program
{
static void Main(string[] args)
{
// This doesn't change (yet):
foreach (var item in GeneratedStrings())
... |
8b491bb7-3062-4777-abf6-394325b5b5f0 | {
"language": "C#"
} | ```c#
//------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2008, mEthLab Interactive
//------------------------------------------------------------------------------
//--------------------------------------------------------------------... | ```c#
//------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2008, mEthLab Interactive
//------------------------------------------------------------------------------
//--------------------------------------------------------------------... |
6972bb8c-5968-4766-b103-ce6ad1546f15 | {
"language": "C#"
} | ```c#
using FireworksNet.Algorithm;
using FireworksNet.Algorithm.Implementation;
using FireworksNet.Problems;
using FireworksNet.StopConditions;
using System;
using Xunit;
namespace FireworksNet.Tests.Algorithm
{
public class ParallelFireworkAlgorithmTests : AlgorithmTestDataSource
{
}
}
```
Add ... | ```c#
using FireworksNet.Algorithm;
using FireworksNet.Algorithm.Implementation;
using FireworksNet.Problems;
using FireworksNet.StopConditions;
using System;
using Xunit;
namespace FireworksNet.Tests.Algorithm
{
public class ParallelFireworkAlgorithmTests : AlgorithmTestDataSource
{
[Theory]
[... |
2818d832-1501-4137-8db6-745384f4142f | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game... |
a4f00429-2f67-4c2f-bcec-78895c97abbc | {
"language": "C#"
} | ```c#
namespace Gigobyte.Daterpillar.Management
{
public interface ISchemaComparer : System.IDisposable
{
SchemaDiscrepancy Compare(ISchemaAggregator source, ISchemaAggregator target);
}
}```
Add new overload to Compare method | ```c#
using Gigobyte.Daterpillar.Transformation;
namespace Gigobyte.Daterpillar.Management
{
public interface ISchemaComparer : System.IDisposable
{
SchemaDiscrepancy Compare(Schema source, Schema target);
SchemaDiscrepancy Compare(ISchemaAggregator source, ISchemaAggregator target);
}
}`... |
40e117f8-18ee-4c50-9fcb-6a9985a5a3e1 | {
"language": "C#"
} | ```c#
namespace Gu.Analyzers.Test.GU0006UseNameofTests
{
using System.Threading.Tasks;
using NUnit.Framework;
internal class HappyPath : HappyPathVerifier<GU0006UseNameof>
{
[Test]
public async Task WhenThrowingArgumentException()
{
var testCode = @"
using System... | ```c#
namespace Gu.Analyzers.Test.GU0006UseNameofTests
{
using System.Threading.Tasks;
using NUnit.Framework;
internal class HappyPath : HappyPathVerifier<GU0006UseNameof>
{
[Test]
public async Task WhenThrowingArgumentException()
{
var testCode = @"
using System... |
d156acda-518c-4b89-a07e-e338f2ad8a82 | {
"language": "C#"
} | ```c#
using System;
namespace BenchmarkDotNet.Diagnostics
{
[Obsolete("The \"GCDiagnoser\" has been renamed, please use the \"MemoryDiagnoser\" instead (it has the same functionality)", true)]
public class GCDiagnoser
{
}
}
```
Revert "give compilation error instead of warning or exception at runtime... | ```c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
namespace BenchmarkDotNet.Diagnostics.Windows
{
[Obsolete(message)]
publ... |
556349cc-6e95-42f5-99e4-f0685dbf377c | {
"language": "C#"
} | ```c#
using System.ComponentModel.Composition.Hosting;
using Raven.Client;
using Raven.Client.Indexes;
namespace Snittlistan.Infrastructure.Indexes
{
public static class IndexCreator
{
public static void CreateIndexes(IDocumentStore store)
{
var typeCatalog = new TypeCatalog(typeof(Matches_PlayerSt... | ```c#
using System.ComponentModel.Composition.Hosting;
using System.Linq;
using System.Reflection;
using Raven.Client;
using Raven.Client.Indexes;
namespace Snittlistan.Infrastructure.Indexes
{
public static class IndexCreator
{
public static void CreateIndexes(IDocumentStore store)
{
var indexes... |
e43fbd33-8a67-4a82-a9e9-45920cf2bb90 | {
"language": "C#"
} | ```c#
namespace PersonPrisoner
{
class Program
{
static void Main(string[] args)
{
Person person = new Prisoner();
person.WalkEast(5);
}
}
}
```
Add explanatory text comment for person-prisoner example | ```c#
namespace PersonPrisoner
{
class Program
{
static void Main(string[] args)
{
Person person = new Prisoner();
person.WalkEast(5);
}
}
#region Explanation
// At a first glance, it would be pretty obvious to make the prisoner derive from person class.... |
86f434ec-cebf-4343-bbf6-8aaaf9236b33 | {
"language": "C#"
} | ```c#
using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Models
{
/// <inheritdoc />
public sealed class ChatChannel : Api.Models.ChatChannel
{
/// <summary>
/// The row Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// The <see cref="Api.Models.Internal.ChatBot.Id"/>
... | ```c#
using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Models
{
/// <inheritdoc />
public sealed class ChatChannel : Api.Models.ChatChannel
{
/// <summary>
/// The row Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// The <see cref="Api.Models.Internal.ChatBot.Id"/>
... |
470281d3-9776-47c2-ad1b-2492ab1ae077 | {
"language": "C#"
} | ```c#
using System;
using Castle.DynamicProxy;
using Dargon.Services.PortableObjects;
using Dargon.Services.Utilities;
namespace Dargon.Services.Client {
public class ServiceInvocationInterceptor : IInterceptor {
private readonly IServiceContext serviceContext;
public ServiceInvocationInterceptor(IServ... | ```c#
using System;
using Castle.DynamicProxy;
using Dargon.Services.PortableObjects;
using Dargon.Services.Utilities;
namespace Dargon.Services.Client {
public class ServiceInvocationInterceptor : IInterceptor {
private readonly IServiceContext serviceContext;
public ServiceInvocationInterceptor(IServ... |
775fe2a9-2bbb-4cd7-9130-91d20c8d2121 | {
"language": "C#"
} | ```c#
using System;
namespace AppHarbor.Commands
{
public class CreateCommand : ICommand
{
private readonly AppHarborApi _appHarborApi;
public CreateCommand(AppHarborApi appHarborApi)
{
_appHarborApi = appHarborApi;
}
public void Execute(string[] arguments)
{
throw new NotImplementedException();... | ```c#
using System;
namespace AppHarbor.Commands
{
public class CreateCommand : ICommand
{
private readonly AppHarborApi _appHarborApi;
public CreateCommand(AppHarborApi appHarborApi)
{
_appHarborApi = appHarborApi;
}
public void Execute(string[] arguments)
{
var result = _appHarborApi.CreateApp... |
baac2ab4-8e78-451f-9b96-c41a1d080968 | {
"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... |
e30344ba-0e01-4267-82d4-9a7fa30bc7ed | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using JetBrains.Metadata.Utils;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.Impl.Reflection2.ExternalAnnotations;
using JetBrains.Util;
namespace AgentHeisenbug.Ann... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using JetBrains.Metadata.Utils;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.Impl.Reflection2.ExternalAnnotations;
using JetBrains.Util;
namespace ... |
9ef23df9-e499-4f8e-9906-2290e14d6bd2 | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Audiotica.Core.Utils
{
public static class StringExtensions
{
public static string CleanForFileName(this string str, string invalidMessage)
{
if (string.IsNullOrEmpty(str))
{
return nu... | ```c#
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Audiotica.Core.Utils
{
public static class StringExtensions
{
public static string CleanForFileName(this string str, string invalidMessage)
{
if (string.IsNullOrEmpty(str))
{
return nu... |
05771cc9-3419-4785-9d97-1674fe297c70 | {
"language": "C#"
} | ```c#
using System;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
namespace IronAHK.Scripting
{
partial class Script
{
public static void CreateTrayMenu()
{
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
return;
v... | ```c#
using System;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
namespace IronAHK.Scripting
{
partial class Script
{
public static void CreateTrayMenu()
{
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
return;
v... |
635e700b-75a1-4b63-822c-53fecb107ba6 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Skills;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulese... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Skills;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulese... |
55033cf4-45e0-448a-853d-470e41cd4610 | {
"language": "C#"
} | ```c#
using Xunit;
namespace Nett.UnitTests
{
public class TomlConfigTests
{
[Fact]
public void WhenConfigHasActivator_ActivatorGetsUsed()
{
// Arrange
var config = TomlConfig.Create(cfg => cfg
.ConfigureType<IFoo>(ct => ct
.C... | ```c#
using Xunit;
namespace Nett.UnitTests
{
public class TomlConfigTests
{
[Fact]
public void WhenConfigHasActivator_ActivatorGetsUsed()
{
// Arrange
var config = TomlConfig.Create(cfg => cfg
.ConfigureType<IFoo>(ct => ct
.C... |
eaeaaef5-6a16-4db0-bd32-d2f209fbb634 | {
"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.Audio.Sample
{
/// <summary>
/// A <see cref="SampleChannel"/> which explicitly plays no audio.
/// Aimed for scenarios in which... | ```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.Audio.Sample
{
/// <summary>
/// A <see cref="SampleChannel"/> which explicitly plays no audio.
/// Aimed for scenarios in which... |
3abfc857-77ba-4b26-b2a5-b0252a222281 | {
"language": "C#"
} | ```c#
using System;
using System.Threading;
using UnityEngine;
using UnityEngine.UI;
namespace PatchKit.Unity.Patcher.Licensing
{
public class KeyLicenseObtainer : MonoBehaviour, ILicenseObtainer
{
private State _state = State.None;
private KeyLicense _keyLicense;
private Animator _a... | ```c#
using System;
using System.Threading;
using UnityEngine;
using UnityEngine.UI;
namespace PatchKit.Unity.Patcher.Licensing
{
public class KeyLicenseObtainer : MonoBehaviour, ILicenseObtainer
{
private State _state = State.None;
private KeyLicense _keyLicense;
private Animator _a... |
0d175e37-b1fb-4e65-aaf7-b378e200b4f2 | {
"language": "C#"
} | ```c#
/*
* FSpot.Query.OrderByTime.cs
*
* Author(s):
* Stephane Delcroix <stephane@delcroix.org>
*
* This is free software. See COPYING for details.
*
*/
using System;
using FSpot.Utils;
namespace FSpot.Query {
public class OrderByTime : IQueryCondition, IOrderCondition
{
public static OrderByTime OrderBy... | ```c#
/*
* FSpot.Query.OrderByTime.cs
*
* Author(s):
* Stephane Delcroix <stephane@delcroix.org>
*
* This is free software. See COPYING for details.
*
*/
using System;
using FSpot.Utils;
namespace FSpot.Query {
public class OrderByTime : IQueryCondition, IOrderCondition
{
public static OrderByTime OrderBy... |
fcbba8eb-baa5-4335-aaa5-30502c4ac741 | {
"language": "C#"
} | ```c#
using System.Threading.Tasks;
namespace MetaMediaPlugin.Abstractions
{
public interface IMediaService
{
bool IsCameraAvailable { get; }
bool IsTakePhotoSupported { get; }
bool IsPickPhotoSupported { get; }
string PhotosDirectory { get; set; } // this is only used... | ```c#
using System.Threading.Tasks;
namespace MetaMediaPlugin.Abstractions
{
public interface IMediaService
{
bool IsCameraAvailable { get; }
bool IsTakePhotoSupported { get; }
bool IsPickPhotoSupported { get; }
/// <summary>
/// Specify the photo directory ... |
9689a484-6283-4390-8793-e04407d7acc1 | {
"language": "C#"
} | ```c#
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.Build.CommandLine;
using Microsoft.Build.Logging.StructuredLogger;
using Microsoft.Build.Utilities;
namespace StructuredLogViewer
{
public class HostedBuild
{
private string projectFilePath;
public... | ```c#
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.Build.CommandLine;
using Microsoft.Build.Logging.StructuredLogger;
using Microsoft.Build.Utilities;
namespace StructuredLogViewer
{
public class HostedBuild
{
private string projectFilePath;
public... |
fbca48ab-a0e8-488d-a5ca-aeb3a0d75b23 | {
"language": "C#"
} | ```c#
namespace Grabacr07.KanColleWrapper.Translation
{
public static class ItemTranslationHelper
{
public static string TranslateItemName(string name)
{
string stripped = TranslationHelper.StripInvalidCharacters(name);
string translated = (string.IsNullOrEmpty(stripped)... | ```c#
namespace Grabacr07.KanColleWrapper.Translation
{
public static class ItemTranslationHelper
{
public static string TranslateItemName(string name)
{
string stripped = name;
string translated = (string.IsNullOrEmpty(stripped) ? null : Equipment.Resources.ResourceMana... |
0f45bbeb-b01e-48b8-8c82-d5d672db8e81 | {
"language": "C#"
} | ```c#
using System;
using Abp.Dependency;
using Abp.EntityHistory;
using Abp.Runtime;
using JetBrains.Annotations;
using System.Web;
namespace Abp.Web.EntityHistory
{
/// <summary>
/// Implements <see cref="IEntityChangeSetReasonProvider"/> to get reason from HTTP request.
/// </summary>
public class ... | ```c#
using Abp.Dependency;
using Abp.EntityHistory;
using Abp.Runtime;
using JetBrains.Annotations;
using System.Web;
namespace Abp.Web.EntityHistory
{
/// <summary>
/// Implements <see cref="IEntityChangeSetReasonProvider"/> to get reason from HTTP request.
/// </summary>
public class HttpRequestEnt... |
0cbe9583-8dd2-42f1-badd-be566441399c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Bari.Core.Generic;
using Bari.Core.Tools;
using Bari.Core.UI;
namespace Bari.Plugins.Gallio.Tools
{
public class Gallio: DownloadablePackedExternalTool, IGallio
{
private readonly IFileSystemDirectory targe... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Bari.Core.Generic;
using Bari.Core.Tools;
using Bari.Core.UI;
namespace Bari.Plugins.Gallio.Tools
{
public class Gallio: DownloadablePackedExternalTool, IGallio
{
private readonly IFileSystemDirectory targe... |
881742b6-42e6-488a-b7ee-c1b888747cc0 | {
"language": "C#"
} | ```c#
using System.Diagnostics;
using System.Threading;
static class DebugUtilities {
public static void Burn(long ms) {
Stopwatch stopwatch = Stopwatch.StartNew();
while (stopwatch.ElapsedMilliseconds < ms) {
}
}
public static void Sleep(long ms) {
Stopwatch stopwatch = Stopwatch.StartNew();
while (sto... | ```c#
using SharpDX;
using System;
using System.Diagnostics;
using System.Threading;
static class DebugUtilities {
public static void Burn(long ms) {
Stopwatch stopwatch = Stopwatch.StartNew();
while (stopwatch.ElapsedMilliseconds < ms) {
}
}
public static void Sleep(long ms) {
Stopwatch stopwatch = Stopw... |
bef564ba-516b-483d-bafa-e56a4918bdec | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
namespace KornelijePetak.IncidentCS
{
public static partial class Incident
{
internal static Random Rand { get; private set; }
public static PrimitiveRandomizer Primitive { get; private set; }
public static TextRandomizer Text { get; private set; }
static Incident()
... | ```c#
using System;
using System.Linq;
namespace KornelijePetak.IncidentCS
{
public static partial class Incident
{
internal static Random Rand { get; private set; }
public static IPrimitiveRandomizer Primitive { get; private set; }
public static ITextRandomizer Text { get; private set; }
static Incident(... |
547b7d85-2283-4846-8d44-389dfe2c2b4f | {
"language": "C#"
} | ```c#
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using topicr.Models;
namespace topicr.Controllers.Api
{
[Produces("application/json")]
[Route("api/topics")]
public class TopicController : Controller
{
private readonly TopicContext _db;
public TopicController(TopicContext db)
... | ```c#
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using topicr.Models;
namespace topicr.Controllers.Api
{
[Produces("application/json")]
[Route("api/topics")]
public class TopicController : Controller
{
private readonly TopicContext _db;
public TopicController(TopicContext db)
... |
218d181c-845e-4ebd-b6fc-3824f7c579bd | {
"language": "C#"
} | ```c#
public static class Bob
{
public static string Response(string statement)
{
if (IsSilence(statement))
return "Fine. Be that way!";
if (IsYelling(statement))
return "Whoa, chill out!";
if (IsQuestion(statement))
return "Sure.";
return "Wha... | ```c#
public static class Bob
{
public static string Response(string statement)
{
if (IsSilence(statement))
return "Fine. Be that way!";
if (IsYelling(statement) && IsQuestion(statement))
return "Calm down, I know what I'm doing!";
if (IsYelling(statement))
... |
1e7ce3d9-14a7-449e-8b17-b173af54f55e | {
"language": "C#"
} | ```c#
using System;
namespace PalmDB
{
/// <summary>
/// Typical guard class that contains methods to validate method arguments.
/// </summary>
public static class Guard
{
/// <summary>
/// Throws a <see cref="ArgumentNullException"/> if the specified <paramref name="argument"/> is... | ```c#
using System;
namespace PalmDB
{
/// <summary>
/// Typical guard class that contains methods to validate method arguments.
/// </summary>
internal static class Guard
{
/// <summary>
/// Throws a <see cref="ArgumentNullException"/> if the specified <paramref name="argument"/> ... |
ec96b87f-6d24-4a1d-91bf-125937a39798 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Serialization;
using NBi.Core;
using NBi.Core.ResultSet;
using static NBi.Core.ResultSet.ResultSetBuilder;
namespace NBi.Xml.Items.ResultSet
{
public class ResultSetXml : BaseItem
{
[XmlElement("ro... | ```c#
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Serialization;
using NBi.Core;
using NBi.Core.ResultSet;
namespace NBi.Xml.Items.ResultSet
{
public class ResultSetXml : BaseItem
{
[XmlElement("row")]
public List<RowXml> _rows { get; se... |
00d896dc-e301-42e9-a1ff-71b89a9585ba | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FightFleet
{
public enum BoardCellStatus
{
Blank = 0,
Ship = 1,
Hit = 2
}
}
```
Add a 4th board cell status "Miss" to show that the user shoot to a blank spot. | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FightFleet
{
public enum BoardCellStatus
{
Blank = 0,
Ship = 1,
Hit = 2,
Miss = 3
}
}
``` |
39e844c0-423f-4950-96ef-29018538c409 | {
"language": "C#"
} | ```c#
using System.Reflection;
using JetBrains.ActionManagement;
using JetBrains.Application.PluginSupport;
// 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: Ass... | ```c#
using System.Reflection;
using JetBrains.ActionManagement;
using JetBrains.Application.PluginSupport;
// 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: Ass... |
ca4ab90f-8482-4425-968e-6a1e9ede19b5 | {
"language": "C#"
} | ```c#
using System;
class Protagonist {
private static Protagonist INSTANCE;
private static int MAX_MONEY = 99;
private int balance;
public int Balance {
get { return balance; }
}
private Inventory inventory;
public Inventory Inventory {
get { return inventory; }
}
private Outfit outfit;
private Pro... | ```c#
using System;
class Protagonist {
private static Protagonist INSTANCE;
private static int MAX_MONEY = 99;
private int balance;
public int Balance {
get { return balance; }
}
private Inventory inventory;
public Inventory Inventory {
get { return inventory; }
}
private Outfit outfit;
private Pro... |
f2211e8d-97ea-49db-b7e7-650de7a23630 | {
"language": "C#"
} | ```c#
using System;
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
[Serializable]
class AuthenticationWindow : BaseWindow
{
[SerializeField] private AuthenticationView authView;
[MenuItem("GitHub/Authenticate")]
public static void Launch()
{
Ope... | ```c#
using System;
using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
[Serializable]
class AuthenticationWindow : BaseWindow
{
[SerializeField] private AuthenticationView authView;
[MenuItem("GitHub/Authenticate")]
public static void Launch()
{
Ope... |
b5a42362-c6ce-4c8e-90e9-ce6e9d2557de | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace twitch_tv_viewer.Models
{
public class TwitchChannel : IComparable
{
public TwitchChannel()
{
}
public TwitchChannel(JToken data)
{
var channel... | ```c#
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace twitch_tv_viewer.Models
{
public class TwitchChannel : IComparable
{
public TwitchChannel()
{
}
public TwitchChannel(JToken data)
{
var channel... |
f04b5ec3-30dd-4c64-bf77-5d16a9f21fd4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Game;
using GnomeServer.Extensions;
using GnomeServer.Routing;
namespace GnomeServer.Controllers
{
[Route("Game")]
public sealed class GameController : ConventionRoutingController
{
[HttpGet]
... | ```c#
using System.Globalization;
using System.Net;
using Game;
using GnomeServer.Routing;
namespace GnomeServer.Controllers
{
[Route("Game")]
public sealed class GameController : ConventionRoutingController
{
[HttpGet]
[Route("Speed")]
public IResponseFormatter GetSpeed()
... |
e3a5450c-d365-45c0-b78f-3f5cd5856b1a | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Globalization;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Aspose.Cells.Examples.CSharp.Articles
{
public class LoadWorkbookWithSpecificCultureInfoNumberFormat
{
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Globalization;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Aspose.Cells.Examples.CSharp.Articles
{
public class LoadWorkbookWithSpecificCultureInfoNumberFormat
{
... |
a57da5d9-70ad-4166-8a77-c716f5d5cc05 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.G... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.G... |
25bae73e-7190-445c-a9f5-d7cbeb0dc23d | {
"language": "C#"
} | ```c#
using BatteryCommander.Web.Models;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers
{
public class ACFTController : Controller
{
private readonly Database db;
publi... | ```c#
using BatteryCommander.Web.Models;
using BatteryCommander.Web.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers
{
public class ACFTControll... |
043ff96e-cded-4492-8417-01bbf88295f1 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
using Newtonsoft.Json;
namespace Exceptional.Core
{
public class ExceptionSummary
{
[JsonProperty(PropertyName = "occurred_at")]
public DateTime OccurredAt { get; set; }
[JsonProperty(PropertyName = "message")]
public string Me... | ```c#
using System;
using System.Globalization;
using System.Linq;
using Newtonsoft.Json;
namespace Exceptional.Core
{
public class ExceptionSummary
{
[JsonProperty(PropertyName = "occurred_at")]
public string OccurredAt { get; set; }
[JsonProperty(PropertyName = "message")... |
d900436f-74c5-4f7c-9c9c-2439dbdd3116 | {
"language": "C#"
} | ```c#
using System;
using System.Web.Routing;
using MvcContrib.TestHelper;
using SnittListan.Controllers;
using Xunit;
namespace SnittListan.Test
{
public class RoutesTest : IDisposable
{
public RoutesTest()
{
new RouteConfigurator(RouteTable.Routes).Configure();
}
public void Dispose()
... | ```c#
using System;
using System.Web.Routing;
using MvcContrib.TestHelper;
using SnittListan.Controllers;
using Xunit;
using System.Web.Mvc;
namespace SnittListan.Test
{
public class RoutesTest : IDisposable
{
public RoutesTest()
{
new RouteConfigurator(RouteTable.Routes).Configure();
}
... |
79f2be60-0ba5-4192-a8a2-2e8c052c0201 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License
using Microsoft.MixedReality.Toolkit.UI.Interaction;
using UnityEditor;
namespace Microsoft.MixedReality.Toolkit.Editor
{
/// <summary>
/// Custom inspector for an InteractiveElement.
/// </summary>
[CustomEditor(typeof(I... | ```c#
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License
using Microsoft.MixedReality.Toolkit.UI.Interaction;
using UnityEditor;
namespace Microsoft.MixedReality.Toolkit.Editor
{
/// <summary>
/// Custom inspector for an InteractiveElement.
/// </summary>
[CustomEditor(typeof(I... |
e1e69e1f-c059-473a-8193-682266a51ef3 | {
"language": "C#"
} | ```c#
using System.IO;
using NClap.ConsoleInput;
using NClap.Utilities;
namespace NClap.Repl
{
/// <summary>
/// Parameters for constructing a loop with advanced line input. The
/// parameters indicate how the loop's textual input and output should
/// be implemented.
/// </summary>
public cl... | ```c#
using System.IO;
using NClap.ConsoleInput;
using NClap.Utilities;
namespace NClap.Repl
{
/// <summary>
/// Parameters for constructing a loop with advanced line input. The
/// parameters indicate how the loop's textual input and output should
/// be implemented.
/// </summary>
public cl... |
ffd53b8b-97b6-4452-b835-a048f9ea0120 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzi... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzi... |
7a75fe0b-6b3f-4c8f-9228-2b8211b80cc4 | {
"language": "C#"
} | ```c#
// Copyright 2017 Daniel Plemmons
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | ```c#
// Copyright 2017 Daniel Plemmons
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
9e1c261e-999e-458e-93ab-6ce804f12ea6 | {
"language": "C#"
} | ```c#
using System;
using System.Linq;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Micr... | ```c#
using System;
using System.Linq;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Micr... |
a4dd7a44-dc64-474c-92e1-4a4a0da892d7 | {
"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("XeroApi")]
[assembly: AssemblyDescr... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("XeroApi")]
[assembly: AssemblyDescr... |
ea33c9bb-4ea3-4b8b-b4f5-c28bfd5b3016 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;
namespace TTMouseclickSimulator.Core.ToontownRewritten.Actions.Fishing
{
public class FishingSpotFlavor
{
public Coordinates Scan1 { g... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;
namespace TTMouseclickSimulator.Core.ToontownRewritten.Actions.Fishing
{
public class FishingSpotFlavor
{
public Coordinates Scan1 { g... |
5395484a-b7f7-4734-b370-1205dcdcc2b6 | {
"language": "C#"
} | ```c#
namespace Foo.Tests.Web.Controllers
{
public class HomeControllerTest
{
}
}
```
Initialize new home controller instance for test class | ```c#
using Foo.Web.Controllers;
namespace Foo.Tests.Web.Controllers
{
public class HomeControllerTest
{
private readonly HomeController _controller;
public HomeControllerTest()
{
_controller = new HomeController();
}
}
}
``` |
1072b0de-dba7-4e41-9d58-669ffc49c173 | {
"language": "C#"
} | ```c#
using Glimpse.Web;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using System.IO;
using System.Reflection;
using System.Text;
using Glimpse.Server.Web;
namespace Glimpse.Agent.Browser.Resources
{
public class BrowserAgent : IMiddlewareResourceComposer
{
public void Register(IAppli... | ```c#
using Glimpse.Web;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using System.IO;
using System.Reflection;
using System.Text;
using Glimpse.Server.Web;
namespace Glimpse.Agent.Browser.Resources
{
public class BrowserAgent : IMiddlewareResourceComposer
{
public void Register(IAppli... |
5dc4ca59-7f39-40b8-a074-bbaf5641d126 | {
"language": "C#"
} | ```c#
@{
Layout = "master.cshtml";
}
<div class="admin-container">
<div class="admin-form-view">
<form role="form" method="POST" target="/">
<div class="form-group well">
<label for="key">Key</label>
<input type="password" class="form-control" id="key" name="... | ```c#
@{
Layout = "master.cshtml";
}
<div class="admin-container">
<div class="admin-form-view">
<form role="form" method="POST">
<div class="form-group well">
<label for="key">Key</label>
<input type="password" class="form-control" id="key" name="key" placeh... |
2400ebe7-737f-4718-9f63-60e36a0f65fb | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
using Aggregator.Core.Interfaces;
using Aggregator.Core.Monitoring;
namespace Aggregator.Core
{
/// <summary>
/// Invokes Powershell scripting engine
/// </summary>
public class PsScriptEngine : ScriptEngine
{
... | ```c#
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
using Aggregator.Core.Interfaces;
using Aggregator.Core.Monitoring;
namespace Aggregator.Core
{
/// <summary>
/// Invokes Powershell scripting engine
/// </summary>
public class PsScriptEngine : ScriptEngine
{
... |
1da5cdb1-7585-46ea-ac3b-8f8443c2a153 | {
"language": "C#"
} | ```c#
#region
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Interop;
using SteamAccountSwitcher.Properties;
#endregion
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class SwitchWindow... | ```c#
#region
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Interop;
using SteamAccountSwitcher.Properties;
#endregion
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class SwitchWindow... |
02e675b2-6113-4386-8368-9d2362116680 | {
"language": "C#"
} | ```c#
using System;
using System.Windows.Forms;
using GUI.Utils;
namespace GUI.Forms
{
public partial class SettingsForm : Form
{
public SettingsForm()
{
InitializeComponent();
}
private void SettingsForm_Load(object sender, EventArgs e)
{
forea... | ```c#
using System;
using System.Windows.Forms;
using GUI.Utils;
namespace GUI.Forms
{
public partial class SettingsForm : Form
{
public SettingsForm()
{
InitializeComponent();
}
private void SettingsForm_Load(object sender, EventArgs e)
{
forea... |
4c65d8fd-424a-4e1b-9c18-5eb19462e4d4 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using Umbraco.Core.IO;
using umbraco.businesslogic;
using umbraco.interfaces;
namespace umbraco.presentation
{
public class EnsureSystemPathsApplicationStartupHandler : IApplicationStartupHandler... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using Umbraco.Core.IO;
using umbraco.businesslogic;
using umbraco.interfaces;
namespace umbraco.presentation
{
public class EnsureSystemPathsApplicationStartupHandler : IApplicationStartupHandler... |
3570e896-8ad2-469b-8822-5cc5b81c0030 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Ooui;
namespace Tests
{
[TestClass]
public class CanvasTests
{
[TestMethod]
public void Context2dState ()
{
var c = new Canvas ();
Assert.AreEqual (1, c.StateMessages.Count);
... | ```c#
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Ooui;
namespace Tests
{
[TestClass]
public class CanvasTests
{
[TestMethod]
public void Context2dState ()
{
var c = new Canvas ();
Assert.AreEqual (1, c.StateMessages.Count);
... |
61131f1a-4858-46b6-8622-e2fd1a78b98a | {
"language": "C#"
} | ```c#
namespace RollGen
{
public abstract class Dice
{
public abstract PartialRoll Roll(int quantity = 1);
public abstract string RolledString(string roll);
public abstract object CompiledObj(string rolled);
public int Compiled(string rolled) => System.Convert.ToInt32(CompiledOb... | ```c#
namespace RollGen
{
public abstract class Dice
{
public abstract PartialRoll Roll(int quantity = 1);
public abstract string RolledString(string roll);
public abstract object CompiledObj(string rolled);
public int Compiled(string rolled) => System.Convert.ToInt32(CompiledOb... |
36800ef2-f33e-4493-8077-ce1c8d89e994 | {
"language": "C#"
} | ```c#
using System;
using Microsoft.AspNetCore.Builder;
using Criteo.Profiling.Tracing;
namespace Criteo.Profiling.Tracing.Middleware
{
public static class TracingMiddleware
{
public static void UseTracing(this IApplicationBuilder app, string serviceName)
{
var extractor = new Middl... | ```c#
using System;
using Microsoft.AspNetCore.Builder;
using Criteo.Profiling.Tracing;
namespace Criteo.Profiling.Tracing.Middleware
{
public static class TracingMiddleware
{
public static void UseTracing(this IApplicationBuilder app, string serviceName)
{
var extractor = new Middl... |
ec58cbd0-1cfa-433d-a830-bdc67251406b | {
"language": "C#"
} | ```c#
using UnityEngine;
using UnityEditor;
using System.IO;
namespace ATP.AnimationPathTools {
public static class ScriptableObjectUtility
{
/// <summary>
// This makes it easy to create, name and place unique new ScriptableObject asset files.
/// </summary>
public static void CreateAsset<T> () where T : ... | ```c#
using UnityEngine;
using UnityEditor;
using System.IO;
namespace ATP.AnimationPathTools {
public static class ScriptableObjectUtility
{
/// <summary>
// This makes it easy to create, name and place unique new ScriptableObject asset files.
/// </summary>
public static void CreateAsset<T> () where T : ... |
ff30dd6e-2c0f-4c70-9c64-36f4f2a4d62a | {
"language": "C#"
} | ```c#
namespace TensorSharp.Operations
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class SubtractDoubleDoubleOperation : IBinaryOperation<double, double, double>
{
public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<... | ```c#
namespace TensorSharp.Operations
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class SubtractDoubleDoubleOperation : IBinaryOperation<double, double, double>
{
public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<... |
3f163e14-823f-4f71-8a24-c876d6b7c95b | {
"language": "C#"
} | ```c#
// Copyright (C) 2020 Fievus
//
// This software may be modified and distributed under the terms
// of the MIT license. See the LICENSE file for details.
using System;
using System.Reflection;
using System.Runtime.Loader;
namespace Carna.ConsoleRunner
{
internal class CarnaAssemblyLoadContext : AssemblyLoa... | ```c#
// Copyright (C) 2020 Fievus
//
// This software may be modified and distributed under the terms
// of the MIT license. See the LICENSE file for details.
using System;
using System.Reflection;
using System.Runtime.Loader;
namespace Carna.ConsoleRunner
{
internal class CarnaAssemblyLoadContext : AssemblyLoa... |
039c7cf3-0573-4dce-9931-2ffb0272c4a5 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using Census.Interfaces;
namespace Census.UmbracoObject
{
public class Property : IUmbracoObject
{
public string Name { get { return "Document Type"; } }
public List<string> Backoffic... | ```c#
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using Census.Interfaces;
namespace Census.UmbracoObject
{
public class Property : IUmbracoObject
{
public string Name { get { return "Document Type"; } }
public List<string> Backoffic... |
0f759f0b-84f3-47ea-9c31-5342d1a02d10 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Graphics.UserInterface;
using osu.Framewor... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Extensions;
... |
a5a4631d-1bfb-419e-bfc2-a53e69a67b60 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Mlabs.Ogg.Metadata;
namespace Mlabs.Ogg
{
public class OggReader
{
private readonly Stream m_fileStream;
private readonly bool m_owns;
public OggReader(string fileName)
{
... | ```c#
using System;
using System.IO;
using System.Linq;
namespace Mlabs.Ogg
{
public class OggReader
{
private readonly Stream m_fileStream;
private readonly bool m_owns;
public OggReader(string fileName)
{
if (fileName == null) throw new ArgumentNullException("fil... |
75bd620b-659d-46f0-9d5b-b91bd2f91c44 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimTrans.Builder;
using RimTrans.Builder.Crawler;
namespace RimTransLibTest {
public static class GenHelper {
public static void Gen_DefTypeNameOf() {
Console.Write(... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimTrans.Builder;
using RimTrans.Builder.Crawler;
namespace RimTransLibTest {
public static class GenHelper {
public static void Gen_DefTypeNameOf() {
Console.Write(... |
1e16fbd4-da2d-45f0-988f-748c9d3c1598 | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Timing;
namespace osu.Framework.Audio.Track
{
public class TrackVirtual : Track
{
private readonly Stopwatc... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Timing;
namespace osu.Framework.Audio.Track
{
public class TrackVirtual : Track
{
private readonly Stopwatc... |
48c57a4c-479d-463e-9d13-21c11014f02e | {
"language": "C#"
} | ```c#
<?xml version="1.0"?>
<!-- RSS generated by Trac v<?cs var:trac.version ?> on <?cs var:trac.time ?> -->
<rss version="2.0">
<channel><?cs
if:project.name_encoded ?>
<title><?cs var:project.name_encoded ?>: Revisions of <?cs var:log.path ?></title><?cs
else ?>
<title>Revisions of <?cs var:log.path ?><... | ```c#
<?xml version="1.0"?>
<!-- RSS generated by Trac v<?cs var:trac.version ?> on <?cs var:trac.time ?> -->
<rss version="2.0">
<channel><?cs
if:project.name_encoded ?>
<title><?cs var:project.name_encoded ?>: Revisions of <?cs var:log.path ?></title><?cs
else ?>
<title>Revisions of <?cs var:log.path ?><... |
c956affc-ed24-4e0e-a32d-2a34cac5f6c5 | {
"language": "C#"
} | ```c#
namespace ZWave.CommandClasses
{
public enum ThermostatFanModeValue : byte
{
AutoLow = 0x00,
Low = 0x01,
AutoHigh = 0x02,
High = 0x03,
AutoMedium = 0x04,
Medium = 0x05,
Circulation = 0x06,
HumidityCirculation = 0x07,
LeftAndRight = 0... | ```c#
namespace ZWave.CommandClasses
{
public enum ThermostatFanModeValue : byte
{
AutoLow = 0x00,
Low = 0x01,
AutoHigh = 0x02,
High = 0x03,
AutoMedium = 0x04,
Medium = 0x05,
Circulation = 0x06,
HumidityCirculation = 0x07,
LeftAndRight = 0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.