doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
368212a4-9597-4bba-9b64-eb75fad9cd76
{ "language": "C#" }
```c# ``` Add a benchmark case for affects render.
```c# using Avalonia.Controls; using Avalonia.Media; using BenchmarkDotNet.Attributes; namespace Avalonia.Benchmarks.Visuals; [MemoryDiagnoser] public class VisualAffectsRenderBenchmarks { private readonly TestVisual _target; private readonly IPen _pen; public VisualAffectsRenderBenchmarks() ...
768bcbca-d714-422c-a37f-2a29f8fdf67a
{ "language": "C#" }
```c# ``` Add tests for anonymous object rendering.
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ExpressionToCodeLib; using Xunit; namespace ExpressionToCodeTest { public class AnonymousObjectFormattingTest { [Fact] public void AnonymousObjectsRender...
6c875dc9-7434-4e58-8685-7af5bcf0df58
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Runtime.InteropServices; using System.Security; namespace Microsoft.Win32.SafeHandles { public sealed partial class SafePipeHandle...
```c# // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Runtime.InteropServices; using System.Security; namespace Microsoft.Win32.SafeHandles { public sealed partial class SafePipeHandle...
127e0ed6-6801-465f-9e59-b1714bcc6686
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace FluentMigrator.Runner { /// <summary> /// Advanced searching and filtration of types collections. /// </summary> static class TypeFinder { /// <summary> /// Searches for type...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace FluentMigrator.Runner { /// <summary> /// Advanced searching and filtration of types collections. /// </summary> static class TypeFinder { /// <summary> /// Searches for type...
2a179b58-825f-4bd8-a8b9-907d1229f651
{ "language": "C#" }
```c# ``` Add windowing subsystem hookup for reflection UsePlatformDetect.
```c# using Avalonia.MonoMac; using Avalonia.Platform; [assembly: ExportWindowingSubsystem(OperatingSystemType.OSX, 1, "MonoMac", typeof(MonoMacPlatform), nameof(MonoMacPlatform.Initialize))] ```
f54cd206-8492-4afd-b217-3f5ad94b21cf
{ "language": "C#" }
```c# ``` Add unit tests for DefaultSwaggerTagCatalog
```c# using FakeItEasy; using Nancy.Swagger.Services; using Swagger.ObjectModel; using System.Collections.Generic; using Xunit; namespace Nancy.Swagger.Tests.Services { public class DefaultSwaggerTagCatalogTest { private DefaultSwaggerTagCatalog _defaultSwaggerTagCatalog; public DefaultSwagge...
0d298abd-cc14-410d-a607-500be8741d7f
{ "language": "C#" }
```c# ``` Add new [LinkerSafe] attribute - which tells the linker (when enabled) that an assembly is safe to link (even if Link All is not used)
```c# // // Copyright 2013 Xamarin Inc. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publ...
038da05e-bdd0-4015-b9c1-624a3375b3cd
{ "language": "C#" }
```c# ``` Add an instant progress bar extension method
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace DarkUI.Extensions { // https://stackoverflow.com/questions/6071626/progressbar-is-slow-in-windows-forms public static class ExtensionMethods { /// <summary> ///...
28e28809-b3cc-43b4-8e95-7b0fdcbf76a4
{ "language": "C#" }
```c# ``` Add unit tests for the SqliteAnchorBuilder class
```c# // Copyright 2015 Coinprism, Inc. // // 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...
540ddca6-fc27-4168-93e6-b2cdcec2e041
{ "language": "C#" }
```c# ``` Convert a binary to decimal value
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BinaryToDecimal { class Program { static void Main(string[] args) { //Problem //Convert a binary n to its decimal value //Solu...
3c47f832-f2bf-4b38-b4b4-c1516365ef55
{ "language": "C#" }
```c# ``` Add tests for the ExceptionsAttribute
```c# using NUnit.Framework; using System; namespace NValidate.Tests { [TestFixture] public class ExceptionsAttributeTest { [Test] public void GetExceptionsSetEmpty() { var attribute = new ExceptionsAttribute(); Assert.That(attribute.GetExcepti...
43d1f945-57e6-4a51-8983-cad2508a963f
{ "language": "C#" }
```c# ``` Add tests for Sha256 class
```c# using System; using NSec.Cryptography; using Xunit; namespace NSec.Tests.Algorithms { public static class Sha256Tests { public static readonly string HashOfEmpty = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; [Fact] public static void HashEmpty() { ...
dce0e79b-5971-4317-b221-ef2a85111467
{ "language": "C#" }
```c# ``` Add very simple stacking test
```c# // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.IO; using System.Linq; using System.Text; using NUnit.Framework; using osu.Game.Beatmaps; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Tests.Be...
311b293e-a7b6-4d15-8cf5-f350f5427fc1
{ "language": "C#" }
```c# using System; using UnityEngine; using System.Collections; using System.Collections.Generic; public class ItemSpawn : MonoBehaviour { public string Guid; public static List<string> CollectedList = new List<string>(); public GameObject Shiney; public CollectableType ShineyType; private Gui...
```c# using System; using UnityEngine; using System.Collections; using System.Collections.Generic; public class ItemSpawn : MonoBehaviour { public string Guid; public static List<string> CollectedList = new List<string>(); public GameObject Shiney; public CollectableType ShineyType; private Gui...
1867dd60-fe96-4257-9e7b-ae458a0fb5c9
{ "language": "C#" }
```c# ``` Add test coverage of beat snapping hit circles
```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.Linq; using NUnit.Framework; using osu.Framework.Testing; using osu.Game.Beatmaps; using osu.Game.Rulesets.Osu.UI; using osu.Game.Tests.Beatmaps; using...
fc117b0b-7cdf-4378-bd0d-b5704abcf064
{ "language": "C#" }
```c# ``` Add a test for projection collection
```c# using Sakuno.Collections; using System.Collections.ObjectModel; using Xunit; namespace Sakuno.Base.Tests { public static class ProjectionCollectionTests { [Fact] public static void SimpleProjection() { var source = new ObservableCollection<int>(); var proj...
cc2d1dc4-f206-4bf0-900a-2f7f0cfa8ffa
{ "language": "C#" }
```c# ``` Add test coverage for song select footer area
```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.Game.Screens.Select; namespace osu.Game.Tests.Visual.SongSelect { public class TestSceneSongSelectFooter : OsuManualInp...
d15af7a7-603d-48a0-ba10-2691509fbad9
{ "language": "C#" }
```c# ``` Add Matt McNabb to authors
```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 MattMcNabb : IAmACommunityMember { public string FirstName => "Matt"; public string Last...
8f44dd51-1f2f-4b59-9dce-7eb608f6b5e8
{ "language": "C#" }
```c# using UIKit; using Foundation; namespace MonoCatalog { // The name AppDelegate is referenced in the MainWindow.xib file. public partial class AppDelegate : UIApplicationDelegate { // This method is invoked when the application is ready to run // public override bool FinishedLaunching (UIApplic...
```c# using UIKit; using Foundation; namespace MonoCatalog { // The name AppDelegate is referenced in the MainWindow.xib file. public partial class AppDelegate : UIApplicationDelegate { // This method is invoked when the application is ready to run // public override bool FinishedLaunching (UIApplic...
77ceac4d-aaa2-48be-a98b-d90f443e0226
{ "language": "C#" }
```c# ``` Add sample code in place of Hangman
```c# using System; public class Hangman { public static void Main(string[] args) { Console.WriteLine("Hello, World!"); Console.WriteLine("You entered the following {0} command line arguments:", args.Length ); for (int i=0; i < args.Length; i++) { Console.WriteLine("{0}", args[i]); } ...
e3256844-93c7-45b7-b3a7-f83ff72ea5dd
{ "language": "C#" }
```c# ``` Add ${aspnet-traceidentifier} (ASP.NET Core only)
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NLog.LayoutRenderers; namespace NLog.Web.LayoutRenderers { /// <summary> /// Print the TraceIdentifier /// </summary> /// <remarks>.NET Core Only</remarks> [LayoutRendere...
5676bd5a-311f-492a-948e-f31c818bf57f
{ "language": "C#" }
```c# ``` Add HTML control so you can add raw html to your layouts
```c# using WootzJs.Web; namespace WootzJs.Mvc.Mvc.Views { public class Html : Control { private string html; public Html(string html) { this.html = html; } protected override Element CreateNode() { var result = Browser.Document.CreateE...
336e427a-03be-4c29-8679-899a0ebaae0c
{ "language": "C#" }
```c# ``` Add tests for wrapping routine provider for Oracle.
```c# using System; using NUnit.Framework; using Moq; using SJP.Schematic.Core; using System.Data; namespace SJP.Schematic.Oracle.Tests { [TestFixture] internal static class OracleDatabaseRoutineProviderTests { [Test] public static void Ctor_GivenNullConnection_ThrowsArgNullException() ...
63c3c731-1287-44c2-83ec-7733ff11cdef
{ "language": "C#" }
```c# using System; using System.Configuration; using System.IO; using ZocMonLib; namespace ZocMonLib { public class RecordReduceStatusSourceProviderFile : RecordReduceStatusSourceProvider { private readonly ISystemLogger _logger; private readonly string _reducingStatusTxt = ConfigurationManage...
```c# using System; using System.Configuration; using System.IO; using ZocMonLib; namespace ZocMonLib { public class RecordReduceStatusSourceProviderFile : RecordReduceStatusSourceProvider { private readonly ISystemLogger _logger; private readonly string _reducingStatusTxt = ConfigurationManage...
0a4fbc0b-33fd-413a-9a47-11906fcffa71
{ "language": "C#" }
```c# ``` Add missing project installer file
```c# namespace Fr.Lakitrid.DomoCore { partial class ProjectInstaller { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </s...
d35b903f-e00f-4bc5-8487-3bc95eb1d4ea
{ "language": "C#" }
```c# ``` Add a logout IT class
```c# using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text; using System.Threading; using System.Threading.Tasks; using FluentAssertions; using Newtonsoft.Json; using Stormpath.SDK.Account; using Stormpath.SDK.Client; using Stormpath.SDK.Resource; using Xunit; na...
a360dca1-cceb-4919-bcf8-f2d9920ddd15
{ "language": "C#" }
```c# ``` Add test coverage of seeking and pausing
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Game.Rulesets; using osu.Game.Rulesets.Osu; using osuTK.Input; namespace osu.Game.Tests.Visual.Gameplay { public class TestSce...
08be6087-aa11-4604-aa50-87f38de35a3a
{ "language": "C#" }
```c# using System; using System.Reflection; namespace NMaier.SimpleDlna.Utilities { public static class ProductInformation { public static string Company { get { var attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); if (a...
```c# using System; using System.Reflection; namespace NMaier.SimpleDlna.Utilities { public static class ProductInformation { public static string Company { get { var attributes = Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); if (attri...
e0805e25-d3c7-446b-9dfb-c65f689aa3c4
{ "language": "C#" }
```c# namespace dotless.Core { using System.IO.Compression; using System.Web; using configuration; using Microsoft.Practices.ServiceLocation; public class LessCssHttpHandler : IHttpHandler { public IServiceLocator Container { get; set; } public DotlessConfiguration Config { get...
```c# namespace dotless.Core { using System.IO.Compression; using System.Web; using configuration; using Microsoft.Practices.ServiceLocation; public class LessCssHttpHandler : IHttpHandler { public IServiceLocator Container { get; set; } public DotlessConfiguration Config { get...
46edb260-c007-4542-a0e7-20d0ef5cbf67
{ "language": "C#" }
```c# ``` Add missing project context handler for ts
```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; using System.Composition; using Microsoft.CodeAnalysis.Host.Mef; using Microsoft.CodeAnalysis.L...
118a374a-220b-485d-8c2e-ccf64a068c0d
{ "language": "C#" }
```c# ``` Add factory for analytics migrations
```c# // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Nether.Data.Sql.Common; u...
23ddfb6b-f03d-4217-aa1f-22e875868f33
{ "language": "C#" }
```c# ``` Add order controller for authentified users
```c# using System; using System.Collections.Generic; using System.Web.Http; namespace TokenAuthentification.Controllers { [RoutePrefix("api/orders")] public class OrdersController : ApiController { [Authorize] [Route("")] public IHttpActionResult Get() { return...
bc8dfa69-486b-4eb5-89fe-aa41a3d7de5e
{ "language": "C#" }
```c# ``` Add simple controller for weapons
```c# using BatteryCommander.Web.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers.API { [Route("api/...
211d3e68-8b95-49b1-a820-d7b0fff3b314
{ "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: AssemblyT...
```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: AssemblyT...
a74f63ac-5d99-4d61-913c-1255a924790c
{ "language": "C#" }
```c# ``` Add a failing test to check catch replay accuracy
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Catch.UI; nam...
d6d5deff-a53d-40dc-af16-6ba4f678b137
{ "language": "C#" }
```c# ``` Add user controller on API to check in/outs.
```c# using System; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using A2BBCommon.Models; using A2BBCommon; using A2BBAPI.Data; using IdentityModel.Client; using A2BBAPI.DTO; using Microsoft.Extensions.Logging; using A2BBAPI.Models; using Sy...
fb3b3eef-28fc-4c7f-9817-7e94e6df84c0
{ "language": "C#" }
```c# ``` Add unit tests to verify that the amount parameters are added to the query string when they are added as parameter
```c# using Mollie.Api.Client; using Mollie.Api.Models; using NUnit.Framework; using System.Net.Http; using System.Threading.Tasks; namespace Mollie.Tests.Unit.Client { [TestFixture] public class PaymentMethodClientTests : BaseClientTests { private const string defaultPaymentMethodJsonResponse = @"{ ...
456f38e7-0460-4c1d-9b41-8cb753fa6afb
{ "language": "C#" }
```c# ``` Add a new datatype for joints
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.Serialization; using System.IO; namespace MultipleKinectsPlatform.MultipleKinectsPlatform.Data { [DataContract(Name="Joint")] public class Joint { [DataMem...
cd81ce49-bd66-4867-bcf2-8c4ffe7539d7
{ "language": "C#" }
```c# ``` Add shared helper to flatten response headers
```c# using System.Collections.Generic; using System.Net.Http; namespace Amazon.S3 { internal static class HttpResponseMessageExtensions { public static Dictionary<string, string> GetProperties(this HttpResponseMessage response) { #if NET5_0 var result = new Dictionary<string, stri...
182f0dd8-5d48-4319-b858-25ddfaf0fec0
{ "language": "C#" }
```c# ``` Add method to return Edge from IRefAxis
```c# using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using System.Text; using System.Threading.Tasks; using SolidworksAddinFramework.Geometry; using SolidWorks.Interop.sldworks; namespace SolidworksAddinFramework { public static class RefAxisExtensions { publ...
33cf122f-f19f-4712-ad2f-2ecaa283fb92
{ "language": "C#" }
```c# ``` Define the factory to handle the build of list
```c# using System; using System.Collections.Generic; using System.Globalization; using System.Linq; namespace NBi.Core.Members { public class PredefinedMembersFactory { private readonly ICollection<BuilderRegistration> registrations; public PredefinedMembersFactory() { ...
8651adf1-f6ef-4f82-b281-f9b036aa482d
{ "language": "C#" }
```c# ``` Add file that wasn't in repo
```c# using System; using MonoDevelop.Core; using MonoDevelop.Ide.Gui; using MonoDevelop.Projects; namespace MonoDevelop.ResXEditor.Gui { class ResXEditorDisplayBinding : IViewDisplayBinding { public string Name { get { return "ResX Editor"; } } public bool CanUseAsDefault { get { return true; }...
de248337-78ac-40c4-a6ae-b316923c21bc
{ "language": "C#" }
```c# ``` Add a very basic class to allow placing buttons on-screen.
```c# using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace MonoGameUtils.UI { /// <summary> /// Represents a rectangular button that can be clicked in a game. /// </summary> public class Button : DrawableGameComponent { public SpriteFont Font { get; set; } ...
5c7e7629-e521-4131-b6d4-24616bf66a3d
{ "language": "C#" }
```c# ``` Prepare ShuntingYard for a state object
```c# using System; using System.Collections.Generic; using Calculation.ExtensionMethods; using Operators = Calculation.ShuntingYardOperators; namespace Calculation { class SmashTheState { public int OpCount { get { return opStack.Count; } } public bool NextIsFunc...
d664c6f2-5d3c-4c13-905a-9d0582ec0708
{ "language": "C#" }
```c# ``` Add failing test of deserializing deeply nested JSON with higher-than-default MaxDepth set
```c# using Newtonsoft.Json; using NUnit.Framework; namespace JsonSubTypes.Tests { [TestFixture] public class DeeplyNestedDeserializationTests { [JsonConverter(typeof(JsonSubtypes), nameof(SubTypeClass.Discriminator))] [JsonSubtypes.KnownSubType(typeof(SubTypeClass), "SubTypeClass")] ...
a24e0bc5-cec5-42e8-a43d-341fe70391ae
{ "language": "C#" }
```c# ``` Reset the Application Entry Point
```c# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; using RapID.ClassLibrary; namespace RapID.Auth { static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] ...
551b6410-a93e-4b7b-8ffd-8a6097ffaca4
{ "language": "C#" }
```c# ``` Add tool to update all dependencies
```c# // Copyright 2021 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 agreed...
89da69d7-d1a1-4807-ae95-035040e99824
{ "language": "C#" }
```c# ``` Add empty report for web part performance analysis
```c# using KenticoInspector.Core; using KenticoInspector.Core.Constants; using KenticoInspector.Core.Models; using System; using System.Collections.Generic; namespace KenticoInspector.Reports.WebPartPerformanceAnalysis { class Report : IReport { public string Codename => nameof(WebPartPerformanceAnal...
e0702f07-111d-4ed1-a075-70dfad060357
{ "language": "C#" }
```c# ``` Add unit test for SYSTEM_LANGUAGE SCPI command
```c# using SCPI.System; using System.Text; using Xunit; namespace SCPI.Tests.System { public class SYSTEM_LANGUAGE_Tests { [Theory] [InlineData("ENGL")] [InlineData("GERM")] public void LanguageIsSetToProperty(string expected) { // Arrange var c...
d522460e-9e34-41fd-a273-b4742934827b
{ "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 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() { ...
67486978-ff6f-450e-ab28-0409029a70be
{ "language": "C#" }
```c# ``` Add player test for osu! ruleset
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] public class TestCaseOsuPlayer : Game.Tests.Visual.TestCasePlayer { ...
9c21a561-c710-4a49-831a-d5a5646c889c
{ "language": "C#" }
```c# ``` Add tests covering score preparation flow
```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.Tasks; using NUnit.Framework; using osu.Framework.Screens; using osu.Framework.Testing; using osu.Game.Rulesets; using osu.Game.Scoring; usin...
f48619c0-3fde-4735-9079-ef4e68a6b532
{ "language": "C#" }
```c# using System; using System.Threading.Tasks; using Microsoft.R.Host.Client; namespace Microsoft.VisualStudio.R.Package.Repl.Session { public static class RSessionEvaluationCommands { public static Task OptionsSetWidth(this IRSessionEvaluation evaluation, int width) { return evaluation.Eval...
```c# using System; using System.Threading.Tasks; using Microsoft.R.Host.Client; namespace Microsoft.VisualStudio.R.Package.Repl.Session { public static class RSessionEvaluationCommands { public static Task OptionsSetWidth(this IRSessionEvaluation evaluation, int width) { return evaluation.Eval...
ffc87221-8a00-4f14-a9c6-6d1af3e5577c
{ "language": "C#" }
```c# ``` Disable rename for Unity event handlers
```c# using System.Collections.Generic; using JetBrains.Application; using JetBrains.ProjectModel; using JetBrains.ReSharper.Feature.Services.Refactorings.Specific.Rename; using JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.Caches; using JetBrains.ReSharper.Psi; using JetBrains.Util; namespace JetBrains.ReSharper.Plugin...
56e8e1d8-deae-4171-a15c-2ba4e49973c6
{ "language": "C#" }
```c# ``` Add helper to check TCP port status.
```c# using System.Net; using System.Net.Sockets; namespace PSql.Tests { internal static class TcpPort { public static bool IsListening(ushort port) { const int TimeoutMs = 1000; try { using var client = new TcpClient(); retu...
a3dfec40-5700-4c13-841b-82b64cfe8af0
{ "language": "C#" }
```c# ``` Add endpoints to view jobs
```c# using BatteryCommander.Web.Models; using FluentScheduler; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; namespace BatteryCommander.Web.Controllers.API { public class JobsController : ApiController { public JobsController(Database db) : base(db) { ...
d4563181-68ba-43f8-bcdf-5385557f891e
{ "language": "C#" }
```c# ``` Add unit test to check for duplicate log types
```c# using System; using System.Linq; using Content.Shared.Administration.Logs; using NUnit.Framework; namespace Content.Tests.Shared.Administration.Logs; [TestFixture] public class LogTypeTests { [Test] public void Unique() { var types = Enum.GetValues<LogType>(); var duplicates = types...
896cca82-5569-4ef0-99e7-44b302494e23
{ "language": "C#" }
```c# ``` Add content conveter to show DataGrid
```c# using System; using System.Globalization; using System.Windows.Data; namespace Mastoon.Conveters { public class DataGridContentConveter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var doc = new Ht...
a8d3d375-9661-4a13-98a0-57ec0ca82f0f
{ "language": "C#" }
```c# ``` Add class for exponential distribution
```c# using System; using System.Collections.Generic; namespace Blaze.Randomization.Lab { public static class ExponentialDistribution { static readonly Random random = new Random(); public static double Next(double mean) => -mean * Math.Log(1 - random.NextDouble()); ...
990060a4-650d-41f5-ac34-e4bbd1a0d971
{ "language": "C#" }
```c# ``` Add alternate empty entries remover
```c# #!/usr/bin/csexec -r:System.Windows.Forms.dll using System; using System.IO; using System.Resources; using System.Collections; using System.Collections.Generic; using System.ComponentModel.Design; public static class Program { public static void Main (string [] args) { try { var script = new EmptyEntries...
13ff1fc6-b41f-4f9e-babc-90d23ef62967
{ "language": "C#" }
```c# ``` Add manual test to validate python cache
```c# // ------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. // All rights reserved. // // This code is licensed under the MIT License. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and ass...
2946b59b-50a0-4eb4-8a98-af0ddab34b7e
{ "language": "C#" }
```c# ``` Add failing test which demonstrates bug with current implementation
```c# using HarmonyLib; using NUnit.Framework; using System.Diagnostics; using System.Reflection; namespace HarmonyLibTests.Extras { [TestFixture] class RetrieveOriginalMethod : TestLogger { [Test] public void Test0() { var harmony = new Harmony("test-original-method"); var originalMethod = AccessTools...
e13b3521-f2da-4a39-8f52-cc16dcace437
{ "language": "C#" }
```c# ``` Add Acceptor for an Enumerable of objects.
```c# using System; using System.Collections.Generic; namespace CBojar.Acceptors { public class EnumerableAcceptor<T> : IAcceptor<T> { protected IEnumerable<T> _value; public EnumerableAcceptor(IEnumerable<T> value) { _value = value; } public IAcceptor<T> Accept(Action<T> visitor) { for...
f7222c93-a93b-4cfc-a555-08b8514b5996
{ "language": "C#" }
```c# ``` Add helper methods for numeric
```c# using System; namespace DeclarativeSql.Internals { /// <summary> /// Provides helper methods for numeric. /// </summary> internal static class NumericHelper { /// <summary> /// Gets the number of digits of the specified value. /// </summary> /// <param name=...
5e44b0f7-4ace-44fe-a664-dfe376571e5e
{ "language": "C#" }
```c# ``` Add a behaviour to drop nodes if all the current connected nodes are behind.
```c# using System; using System.Linq; using NBitcoin; using NBitcoin.Protocol; using NBitcoin.Protocol.Behaviors; namespace Stratis.Bitcoin.Connection { /// <summary> /// If the light wallet is only connected to nodes behind /// it cannot progress progress to the tip to get the full balance /// this...
3b39302d-d768-4ec5-a2f1-94cc590fee45
{ "language": "C#" }
```c# ``` Disable concurrency for storage integration tests
```c# // Copyright 2016 Google Inc. All Rights Reserved. // // 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 ...
eee19ffd-f727-4792-b979-44e1722bd058
{ "language": "C#" }
```c# ``` Add test scene showing off the skinnable catch-specific combo counter
```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.Linq; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Rulesets.Catch...
1154705c-c49b-45b8-b2a3-198f45d94032
{ "language": "C#" }
```c# ``` Add an instance provider for Colore
```c# // --------------------------------------------------------------------------------------- // <copyright file="ColoreProvider.cs" company="Corale"> // Copyright © 2015-2017 by Adam Hellberg and Brandon Scott. // // Permission is hereby granted, free of charge, to any person obtaining a copy of // thi...
402ebedd-f0ae-4138-8fd0-702dec66fe1d
{ "language": "C#" }
```c# ``` Add missing Contract helper function file
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics.Contracts; namespace DotNetFrontEnd.Contracts { public static class ContractExtensions { [Pure] public static bool Implies(this bool antecedent, bool consequent) { Co...
962b5538-b03d-41dd-a062-8beafc50896d
{ "language": "C#" }
```c# ``` Fix add signature and comment
```c# using System.Linq; using System.Threading; using System.Threading.Tasks; using BatteryCommander.Web.Models; using BatteryCommander.Web.Queries; using MediatR; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; namespace BatteryCommander.Web.Commands { public class AddSUTAComment : IRequest...
b567cf58-f05d-4681-920f-333e92434142
{ "language": "C#" }
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Structure; using...
```c# // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Structure; using...
95268f94-2424-40ca-947d-15216da0b9d2
{ "language": "C#" }
```c# ``` Add tests for nullable keys
```c# using System.Collections.Generic; using AutoMapper.EquivalencyExpression; using FluentAssertions; using Xunit; namespace AutoMapper.Collection { public class NullableIdTests { [Fact] public void Should_Work_With_Null_Id() { Mapper.Reset(); Mapper.Initializ...
5f43394d-5781-45f6-a152-94ad66ca652d
{ "language": "C#" }
```c# using System.Data; namespace ZocMonLib { public interface IRecordFlush { /// <summary> /// Flush all data accumulated thus far. /// </summary> void FlushAll(); /// <summary> /// Flush data for the lowest reduce resolution for the given configuration. ...
```c# using System.Data; namespace ZocMonLib { public interface IRecordFlush { /// <summary> /// Flush all data accumulated thus far. /// </summary> void FlushAll(); /// <summary> /// Flush data for the lowest reduce resolution for the given configuration. ...
22027bb9-3d80-4696-bfd2-71f52c1d530a
{ "language": "C#" }
```c# ``` Add missing file to samples
```c# @page Test <div class="row"> <div class="col-md-3"> <h2>RazorPages Test</h2> <ul> <li>This file should give you a quick view of a Mvc Raor Page in action.</li> </ul> </div> </div> ```
95b48f3b-e2de-4bdc-b307-6e5cd50c9cd4
{ "language": "C#" }
```c# ``` Make a working copy of an PCB design
```c# //----------------------------------------------------------------------------------- // PCB-Investigator Automation Script // Created on 2014-04-24 // Autor // // Make copy of job and open it in temporary path. //----------------------------------------------------------------------------------- using...
17a2abcc-4a53-499d-ac8c-ae325cc2bebb
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; using System.Linq; using System.Reflection; using System.Web; using dashing.net.common; namespace dashing.net.App_Start { public class JobConfig { ...
```c# using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; using System.Linq; using System.Reflection; using System.Web; using dashing.net.common; namespace dashing.net.App_Start { using System.IO; public class ...
abf9acb2-f5b5-4127-93af-c172bb1b23af
{ "language": "C#" }
```c# ``` Add tests class for NoteSubparser
```c# using FluentAssertions; using NFugue.Parser; using NFugue.Theory; using Staccato.Subparsers.NoteSubparser; using Xunit; namespace Staccato.Tests.Subparsers { public class NoteSubparserTests : SubparserTestBase<NoteSubparser> { [Fact] public void Should_match_simple_notes() { ...
15858ea1-0f59-45b8-9f74-a5966179fccb
{ "language": "C#" }
```c# ``` Change file name to reflect new class name
```c# using DotNetNuke.Security.Roles; using System; namespace Dnn.PersonaBar.Prompt.Models { public class RoleModel : RoleModelBase { public string Description; public DateTime CreatedDate; public int CreatedBy; #region Constructors public RoleModel() { ...
9d1bc343-8a76-4cfd-b6d1-007502b00b04
{ "language": "C#" }
```c# ``` Add labelled number box control
```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.Graphics.UserInterface; namespace osu.Game.Graphics.UserInterfaceV2 { public class LabelledNumberBox : LabelledTextBox { protected o...
908717c0-49eb-44b1-9b98-6fd2864c88cf
{ "language": "C#" }
```c# ``` Add skeleton for Autocomplete Responses.
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace WundergroundClient.Autocomplete { class AutocompleteResponse { public Boolean IsSuccessful { get; private set; } public IList<AutocompleteResponseObject> Results; } } ```
5a944614-9a68-4b10-80a8-c141ca80c732
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; namespace Csla.Security { /// <summary> /// Maintains a list of all object level /// authorization roles. /// </summary> internal class ObjectAuthorizationRules { private ...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; namespace Csla.Security { /// <summary> /// Maintains a list of all object level /// authorization roles. /// </summary> internal class ObjectAuthorizationRules { private ...
c9b86887-474f-43be-b2d7-135dbd7621ea
{ "language": "C#" }
```c# ``` Add the soft focus editor to the repository.
```c# /* * Editors/SoftFocus.cs * * Copyright 2007 Novell Inc. * * Author * Larry Ewing <lewing@novell.com> * * See COPYING for license information. * */ using Gtk; using System; namespace FSpot.Editors { public class SoftFocus : EffectEditor { Widgets.SoftFocus soft; Scale scale; bool double_buffe...
d92179f6-aa41-42f2-8027-d578d1ffa344
{ "language": "C#" }
```c# ``` Enable limitation control for rendering
```c#  namespace SharpexGL.Framework.Game.Timing { public enum RenderMode { /// <summary> /// Limits the render call to a fixed fps amount. /// </summary> Limited, /// <summary> /// No limitations. /// </summary> Unlimited } } ```
f1379adf-9003-4f88-8ddd-4a2d8ece801b
{ "language": "C#" }
```c# ``` Add a few base backend tests
```c# using Mofichan.Backend; using Mofichan.Core.Interfaces; using Moq; using Serilog; using Shouldly; using Xunit; namespace Mofichan.Tests { public class BackendSpec { private class MockBackend : BaseBackend { public bool OnStartCalled { get; private set; } public st...
b734551b-8a4d-4dbd-b266-adbdb7347c13
{ "language": "C#" }
```c# using System; using System.Linq; using Microsoft.WindowsAzure.Storage.Table; namespace Streamstone { public class Partition { static readonly string[] separator = {"|"}; public readonly CloudTable Table; public readonly string PartitionKey; public readonly string RowKey...
```c# using System; using System.Linq; using Microsoft.WindowsAzure.Storage.Table; namespace Streamstone { public class Partition { static readonly string[] separator = {"|"}; public readonly CloudTable Table; public readonly string PartitionKey; public readonly string RowKey...
35c9e722-1f11-45bf-aaf5-23e46d0b3a49
{ "language": "C#" }
```c# ``` Allow pushing a TEvent that has new() constraint
```c# using System.ComponentModel; namespace Merq { /// <summary> /// Usability overloads for <see cref="IEventStream"/>. /// </summary> [EditorBrowsable(EditorBrowsableState.Never)] public static class IEventStreamExtensions { /// <summary> /// Pushes a new instance of <typepa...
eb6c2615-8bdf-467d-add6-b202cb78cf79
{ "language": "C#" }
```c# ``` Add some very basic tests for Link
```c# using System; using System.Collections.Generic; using Seq.Api.Model; using Xunit; namespace Seq.Api.Tests { public class LinkTests { [Fact] public void ALinkWithNoParametersIsLiteral() { const string uri = "https://example.com"; var link = new Link(uri); ...
3e6de1c5-3ffd-47b5-9dfb-62594ea5fbcc
{ "language": "C#" }
```c# ``` Remove attributes of an ODB++ job
```c# //----------------------------------------------------------------------------------- // PCB-Investigator Automation Script // Created on 27.05.2015 // Autor Gruber Fabio // // Clear Attributes of components. //----------------------------------------------------------------------------------- using Sy...
ee95d851-a671-4650-830a-e2f5b8916101
{ "language": "C#" }
```c# ``` Add basic test coverage for solid border colour
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osuTK; namespace osu.Frame...
eea29eb3-be06-4751-902a-96979ffefe8d
{ "language": "C#" }
```c# ``` Add a script to draw all spring joints connected to an object, for debugging.
```c# // The MIT License (MIT) // // Copyright (c) 2015 Jabavu W. Adams. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights //...
f3a030a2-d6df-4538-a2db-76cd13bfd6a5
{ "language": "C#" }
```c# ``` Add LegacyGlobalOptionsWorkspaceService for OmniSharp EA
```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; using System.Composition; using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis...
0da46af1-1c0c-40e2-b39c-d332f0b34a27
{ "language": "C#" }
```c# ``` Define interface for a command in setup or cleanup
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NBi.Core.Etl { public interface IEtlRunCommand: IEtl { } } ```
ffee66dc-fbd7-4c11-8cd0-277ba48881e0
{ "language": "C#" }
```c# ``` Fix on previous commit ...
```c# using System; using System.Collections.Generic; using System.Text; using System.Windows.Media; using System.Windows.Shapes; using System.Windows; using System.Windows.Input; namespace FreeSCADA.Schema.Manipulators { class GeometryHilightManipulator:BaseManipulator { Rectangle hilight...
5cd593cf-2d3a-48eb-9db5-f1090c639142
{ "language": "C#" }
```c# ``` Add failing GL disposal stress test
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Linq; using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osuTK; ...
a4f37673-2376-4920-8698-c92d53915b0c
{ "language": "C#" }
```c# ``` Add unit test for getuserrole
```c# using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Text; using Microsoft.AspNetCore.Http; using Moq; using NUnit.Framework; using NUnit.Framework.Internal; using SFA.DAS.CommitmentsV2.Api.Authentication; using SFA.DAS.CommitmentsV2.Authentication; using ...
2f2cf176-e374-4708-9361-a46e0e462ee3
{ "language": "C#" }
```c# ``` Add test scene for arc bounding box computation
```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.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Lines; us...
2908116e-523c-4184-9adc-59d4029b6d36
{ "language": "C#" }
```c# ``` Add extension methods to determine whether an actor is an ancestor or descendant of another actor.
```c# using Akka.Actor; using System; namespace AKDK.Utilities { /// <summary> /// Extension methods for Akka types. /// </summary> public static class AkkaExtensions { /// <summary> /// Determine whether another actor is a descendent of the actor. /// </summary> ...
6b0d426d-cafe-4492-a167-bd0f0eca5e51
{ "language": "C#" }
```c# ``` Add test coverage of PlayingUsers tracking
```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.Linq; using Humanizer; using NUnit.Framework; using osu.Framework.Testing; using osu.Game.Online.Multiplayer; using osu.Game.Tests.Visual.Multiplayer; ...
6f4b3404-35d0-4474-8b50-9c305758ed7f
{ "language": "C#" }
```c# ``` Move serialization end event firing into a pipeline processor
```c# using System.Linq; using Sitecore.Configuration; using Sitecore.Data; using Sitecore.Data.Serialization; using Sitecore.Diagnostics; using Sitecore.Eventing; using Unicorn.Predicates; namespace Unicorn.Pipelines.UnicornSyncEnd { public class SendSerializationCompleteEvent : IUnicornSyncEndProcessor { public...
4bbc2aed-604c-4777-b3b2-b6e73a58e603
{ "language": "C#" }
```c# ``` Add back obsoleted mapping to improve backwards compatibility
```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; namespace osu.Framework.Graphics { [Obsolete("Use BlendingParameters statics instead")] // can be removed 20200220 public static class Blendi...