conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Revert change to message assertion as the message is consumer key dependent and the key in the CI build causes a failure\n" }, { "from": "human", "value": "using System;\nusing NUnit.Framework;\nusing SevenDigital.Api.Wrapper.Exceptions;\nusing SevenDigital.Api.Sche...
c#
chosen
[ { "from": "human", "value": "Add characterization tests for object members\n" }, { "from": "gpt", "value": "namespace FakeItEasy.Specs\r\n{\r\n using FakeItEasy.Core;\r\n using FluentAssertions;\r\n using Xbehave;\r\n\r\n public static class ObjectMembersSpecs\r\n {\r\n [Sc...
c#
chosen
[ { "from": "system", "value": "Add ResourceFinder as an option that can be set.\n" }, { "from": "human", "value": "namespace ZocMonLib.Web\n{\n public class WebSettingsExtensionOptions\n {\n public ISerializer Serializer { get; set; }\n\n public IRuntime Runtime { get; set; }\...
c#
chosen
[ { "from": "human", "value": "Support convert to or from struct type\n" }, { "from": "gpt", "value": "// Copyright (c) kuicker.org. All rights reserved.\n// Modified By YYYY-MM-DD\n// kevinjong 2016-03-04 - Creation\n\nusing System;\n\nnamespace IsTo.Tests\n{\n\tpublic struct TestStr...
c#
chosen
[ { "from": "system", "value": "Move sample to correct namespace\n" }, { "from": "human", "value": "using BenchmarkDotNet.Tasks;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BenchmarkDotNet.Samples.Other\n{\n [BenchmarkTask(platform: Be...
c#
chosen
[ { "from": "human", "value": "Add test scene for `MultiplayerPlayer`\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing System.Linq;\nusing NUnit.Framework;...
c#
chosen
[ { "from": "human", "value": "Add a method for getting settings UI components automatically from a target class\n\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\...
c#
chosen
[ { "from": "human", "value": "Add possibility to mock ConfigurationManager\n" }, { "from": "gpt", "value": "using System;\r\nusing System.Configuration;\r\nusing System.Linq;\r\nusing System.Reflection;\r\n\r\nnamespace UnitTests.Helpers\r\n{\r\n // the default app.config is used.\r\n /// <...
c#
chosen
[ { "from": "human", "value": "Add ApplicationUser class for Identity and DbContext\n" }, { "from": "gpt", "value": "using Microsoft.AspNet.Identity;\nusing Microsoft.AspNet.Identity.EntityFramework;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.Clai...
c#
chosen
[ { "from": "human", "value": "Create read-only dictionary for .NET version 2.0" }, { "from": "gpt", "value": "#if PS20\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace WpfCLR\n{\n\tpublic class ReadOnlyDictionary<TKey, TValue> : IDictionary<TKey, TValue>\n\t{\n\t\tpublic const str...
c#
chosen
[ { "from": "human", "value": "Sort chars by freq - monad\n" }, { "from": "gpt", "value": "// https://leetcode.com/problems/sort-characters-by-frequency/\n// https://leetcode.com/submissions/detail/83684155/\n//\n// Submission Details\n// 34 / 34 test cases passed.\n// Status: Accepted\n/...
c#
chosen
[ { "from": "system", "value": "Fix inverted documentation between two methods" }, { "from": "human", "value": "// Copyright (c) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nnamespace System.ComponentModel...
c#
chosen
[ { "from": "human", "value": "Check if an array is preorder\n" }, { "from": "gpt", "value": "// http://www.geeksforgeeks.org/check-if-a-given-array-can-represent-preorder-traversal-of-binary-search-tree/\n//\n// Given an array of numbers, return true if given array can represent preorder traversa...
c#
chosen
[ { "from": "human", "value": "Revert \"remove old assemblyinfo (wasn't included in the solution)\"\n\nThis reverts commit 12c5601073c9af6f86b791abdabfb5c9b99f7fbe.\n" }, { "from": "gpt", "value": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServi...
c#
chosen
[ { "from": "human", "value": "Add type to request comment help\n" }, { "from": "gpt", "value": "//\n// Copyright (c) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n//\n\nusing Microsoft.PowerShell.EditorServi...
c#
chosen
[ { "from": "human", "value": "Introduce exponential backoff for executors\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Gremlin.Net.Driver.Exceptions;\n\nnamespace ExRam.Gremlin...
c#
chosen
[ { "from": "human", "value": "Cover DelegateInvokingLoadBalancerCreator by unit tests.\n" }, { "from": "gpt", "value": "using System;\nusing System.Threading.Tasks;\nusing Moq;\nusing Ocelot.Configuration;\nusing Ocelot.Configuration.Builder;\nusing Ocelot.LoadBalancer.LoadBalancers;\nusing Ocel...
c#
chosen
[ { "from": "human", "value": "Add http request reason provider for Abp.Web\n" }, { "from": "gpt", "value": "using Abp.Dependency;\nusing Abp.EntityHistory;\nusing Abp.Runtime;\nusing JetBrains.Annotations;\nusing System.Web;\n\nnamespace Abp.Web.EntityHistory\n{\n /// <summary>\n /// Imple...
c#
chosen
[ { "from": "human", "value": "Add usability overload for IMockFactory\n\nAllow creating a mock from a single type parameter and the mocks assembly.\n" }, { "from": "gpt", "value": "using System;\nusing System.ComponentModel;\nusing System.Reflection;\n\nnamespace Moq.Sdk\n{\n /// <summary>\n ...
c#
chosen
[ { "from": "human", "value": "Add test cases for crashes involving integer casts\n\nwas https://github.com/dadhi/FastExpressionCompiler/issues/2\n" }, { "from": "gpt", "value": "using System;\nusing NUnit.Framework;\n\nnamespace FastExpressionCompiler.UnitTests\n{\n [TestFixture]\n public ...
c#
chosen
[ { "from": "human", "value": "Test to verify that minimal message body can be redelivered via the delayed transport (serialization issue)\n" }, { "from": "gpt", "value": "namespace MassTransit.Tests\n{\n using System;\n using System.Linq;\n using System.Threading.Tasks;\n using MassTr...
c#
chosen
[ { "from": "human", "value": "Remove dupes from list II\n" }, { "from": "gpt", "value": "// https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/\n// Given a sorted linked list, delete all nodes that have duplicate numbers,\n// leaving only distinct numbers from the original l...
c#
chosen
[ { "from": "human", "value": "Add tests for converting RGB with HSV\n" }, { "from": "gpt", "value": "namespace BigEgg.Tools.PowerMode.Tests.Utils\n{\n using System.Drawing;\n using System.Linq;\n using System.Reflection;\n\n using Microsoft.VisualStudio.TestTools.UnitTesting;\n\n ...
c#
chosen
[ { "from": "human", "value": "Copy Text objects to other layer and delete surce" }, { "from": "gpt", "value": "//Synchronous template\r\n//-----------------------------------------------------------------------------------\r\n// PCB-Investigator Automation Script\r\n// Created on 30.03.2017\r\n//...
c#
chosen
[ { "from": "human", "value": "Implement betting and getting popular keywords\n" }, { "from": "gpt", "value": "using System;\nusing StackExchange.Redis;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Newtonsoft.Json;\n\nnamespace CollapsedToto\n{\n [Prefix(\"/round\")]\n pub...
c#
chosen
[ { "from": "human", "value": "Add benchmark for dependency injection.\n" }, { "from": "gpt", "value": "/*\nusing BenchmarkDotNet.Attributes;\nusing Robust.Shared.IoC;\n\nnamespace Content.Benchmarks\n{\n // To actually run this benchmark you'll have to make DependencyCollection public so it's ...
c#
chosen
[ { "from": "human", "value": "Add texture cropping test case\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing osu.Framework.Allocation;\nusing osu.Framewo...
c#
chosen
[ { "from": "system", "value": "Add comment for OSX specific FileSystem test\n" }, { "from": "human", "value": "// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n// See the LICENSE file in the project root for...
c#
chosen
[ { "from": "human", "value": "Add unit tests for the SqlServerStorageEngine class\n" }, { "from": "gpt", "value": "// Copyright 2015 Coinprism, Inc.\n// \n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n//...
c#
chosen
[ { "from": "system", "value": "Change console URL for 1 code sample\n" }, { "from": "human", "value": "// Download the twilio-csharp library from twilio.com/docs/csharp/install\nusing System;\nusing Twilio.Lookups;\n\nclass Example\n{\n static void Main(string[] args)\n {\n // Find your Acco...
c#
chosen
[ { "from": "human", "value": "Add order item delete support\n" }, { "from": "gpt", "value": "@model Orders.com.Web.MVC.ViewModels.OrderItemViewModel\n\n@{\n ViewBag.Title = \"Delete\";\n}\n\n<h2>Delete Item</h2>\n\n<h3>Are you sure you want to delete this?</h3>\n<div class=\"form-horizontal\"...
c#
chosen
[ { "from": "human", "value": "Create a class that acts as a configuration node for cache providers" }, { "from": "gpt", "value": "using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Xml;\r\nusing System.IO;\r\nusing System.Configur...
c#
chosen
[ { "from": "human", "value": "Add a more specific GenericListModel to reduce the amount of code\n\n" }, { "from": "gpt", "value": "using System.Collections;\nusing System.Collections.Generic;\nusing Xe.Tools.Wpf.Models;\n\nnamespace OpenKh.Tools.Common.Models\n{\n public class MyGenericListMo...
c#
chosen
[ { "from": "human", "value": "Add build config info for ArtifactDependencies\n" }, { "from": "gpt", "value": "namespace FluentTc.Domain\n{\n public class SourceBuildType\n {\n public override string ToString()\n {\n return \"source-buildType\";\n }\n\n ...
c#
chosen
[ { "from": "human", "value": "Add realtime multiplayer test scene\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing osu.Game.Screens.Multi.Components;\n\nn...
c#
chosen
[ { "from": "human", "value": "Add tests for Get & AddToPayload\n" }, { "from": "gpt", "value": "using Bugsnag.Payload;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Xunit;\n\nnamespace Bugsnag.Tests\n{\n public cla...
c#
chosen
[ { "from": "human", "value": "Add test case for TypeRegistry\n" }, { "from": "gpt", "value": "using Htc.Vita.Core.Util;\nusing Xunit;\n\nnamespace Htc.Vita.Core.Tests\n{\n public class TypeRegistryTest\n {\n [Fact]\n public static void Default_0_RegisterDefault()\n {\n...
c#
chosen
[ { "from": "human", "value": "Add reflection exception log function\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Reflection;\n\nnamespace Recipe.DebugAndException\n{\n pub...
c#
chosen
[ { "from": "human", "value": "Create Global Supressions for CA warnings on THNETII.CommandLine.Hosting\n" }, { "from": "gpt", "value": "\n// This file is used by Code Analysis to maintain SuppressMessage \n// attributes that are applied to this project.\n// Project-level suppressions either have...
c#
chosen
[ { "from": "human", "value": "Add test coverage of login dialog\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing System.Linq;\nusing NUnit.Framework;\nusi...
c#
chosen
[ { "from": "human", "value": "Add .net 4.5 compatibility shim classes\n\nImplemented some of the interfaces and classes we use in our .NET 4.5\nversion.\n" }, { "from": "gpt", "value": "// ----------------------------------------------------\n// THIS WHOLE File CAN GO AWAY WHEN WE TARGET 4.5 ONL...
c#
chosen
[ { "from": "human", "value": "Add view model factory interface\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PhotoLife.Factories\n{\n interface IViewModelFactory\n {\n ...
c#
chosen
[ { "from": "human", "value": "Add an expression interpretation bug test\n" }, { "from": "gpt", "value": "using System;\r\nusing System.Linq.Expressions;\r\nusing Xunit;\r\n\r\nnamespace ExpressionToCodeTest\r\n{\r\n public class ExpressionInterpretationBug\r\n {\r\n struct AStruct\r...
c#
chosen
[ { "from": "human", "value": "Add benchmarks for bindable binding\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing System;\nusing BenchmarkDotNet.Attribut...
c#
chosen
[ { "from": "human", "value": "Replace missing file lost during merge\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing Orchard.Alias.Implementation.Holder;\nusing Orchard.Alias.Implementation.Storage;\n\nnamespace Orch...
c#
chosen
[ { "from": "human", "value": "Add a static resources library" }, { "from": "gpt", "value": "// Resources.cs\n// <copyright file=\"Resources.cs\"> This code is protected under the MIT License. </copyright>\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n...
c#
chosen
[ { "from": "human", "value": "Add namespace & type for experimental work\n\nCloses #209" }, { "from": "gpt", "value": "#region License and Terms\n// MoreLINQ - Extensions to LINQ to Objects\n// Copyright (c) 2018 Atif Aziz. All rights reserved.\n//\n// Licensed under the Apache License, Version 2...
c#
chosen
[ { "from": "human", "value": "Add failing test for compiled queries with Includes\n" }, { "from": "gpt", "value": "using Marten.Linq;\r\nusing Marten.Services;\r\nusing Marten.Services.Includes;\r\nusing Marten.Testing.Documents;\r\nusing Shouldly;\r\nusing System;\r\nusing System.Collections.Ge...
c#
chosen
[ { "from": "system", "value": "Set up timer so that it can't start reducing while previous reduction is still in progress.\n" }, { "from": "human", "value": "using System;\n\nnamespace ZocMonLib.Service.Reduce\n{\n public class ReduceServiceRunner\n {\n private readonly ISystemLogger...
c#
chosen
[ { "from": "human", "value": "Add test to cover `RegisterBlockHelper` readme example\n" }, { "from": "gpt", "value": "using System.Collections.Generic;\nusing Xunit;\n\nnamespace HandlebarsDotNet.Test\n{\n public class ReadmeTests\n {\n [Fact]\n public void RegisterBlockHelper...
c#
chosen
[ { "from": "human", "value": "Add usage examples for double-checking doc examples.\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing Xunit;\nusing static Nito.ConnectedProperties.ConnectedProperty;\n\nnamespace UnitTests\n{\n class Us...
c#
chosen
[ { "from": "human", "value": "Add path.cs to source control\n" }, { "from": "gpt", "value": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Chutes.Optimization.Entities\r\n{\r\n public class Path...
c#
chosen
[ { "from": "human", "value": " Add coin flipping command. Sometimes lands on it's side. No idea why!\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing TwitchLib;\nusing TwitchLib.TwitchClientClasses;\nusing System.Net;\n\nnamespace JefBot....
c#
chosen
[ { "from": "human", "value": "Add suport of nullable reference type attributes for lower TFM\n" }, { "from": "gpt", "value": "#if !NETSTANDARD2_1\nnamespace System.Diagnostics.CodeAnalysis\n{\n [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, In...
c#
chosen
[ { "from": "human", "value": "Add the builder of DateRange\n" }, { "from": "gpt", "value": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\n\r\nnamespace NBi.Core.Members.Ranges\r\n{\r\n internal class DateRangeBuilder : BaseBuilder\r...
c#
chosen
[ { "from": "system", "value": "Fix incorrect copying of blending values.\n" }, { "from": "human", "value": "// Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.\r\n// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE\r\n\r\nusing OpenTK.Graph...
c#
chosen
[ { "from": "human", "value": "Add tests for the BarLineGenerator\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing System.Linq;\nusing NUnit.Framework;\nus...
c#
chosen
[ { "from": "human", "value": "Create a supplier that supply elements continually(Stream)." }, { "from": "gpt", "value": "using System;\r\n\r\nnamespace Nohros\r\n{\r\n /// <summary>\r\n /// A implementation of the <see cref=\"ISupplier{T}\"/> class that supply\r\n /// elements of type <typepa...
c#
chosen
[ { "from": "human", "value": "Add test scene for drawings screen\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing System.IO;\nusing osu.Framework.Allocati...
c#
chosen
[ { "from": "human", "value": "Add examples and unit tests for comparing structs.\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Nito.Comparers;\nusing Nito.Comparers.Util;\nusing Xunit;\n\nnamespace UnitTests\n{\n public class Comp...
c#
chosen
[ { "from": "human", "value": "Reorder list - off by one\n" }, { "from": "gpt", "value": "// https://leetcode.com/problems/reorder-list/\n//\n// Given a singly linked list L: L0→L1→…→Ln-1→Ln,\n// reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…\n//\n// You must do this in-place without altering the n...
c#
chosen
[ { "from": "human", "value": "Add unit test for compute max stack override.\n" }, { "from": "gpt", "value": "using AsmResolver.DotNet.Builder;\nusing AsmResolver.DotNet.Code.Cil;\nusing AsmResolver.DotNet.Signatures;\nusing AsmResolver.PE.DotNet.Cil;\nusing AsmResolver.PE.DotNet.Metadata.Tables.R...
c#
chosen
[ { "from": "human", "value": "Add RenderTreeBuilder extension methods for \"prevent default\" and \"stop bubbling\"\n" }, { "from": "gpt", "value": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for l...
c#
chosen
[ { "from": "human", "value": "Add a TestCase for looong combos\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing NUnit.Framework;\nusing osu.Game.Beatmaps;...
c#
chosen
[ { "from": "system", "value": "Fix comment on attribute ctor.\nbugid: 862\n\n" }, { "from": "human", "value": "using System;\r\n\r\nnamespace System.ComponentModel.DataAnnotations\r\n{\r\n /// <summary>\r\n /// Specifies that a data field value must\r\n /// fall within the specified range.\r\...
c#
chosen
[ { "from": "human", "value": "Select everything outside of pcb profile" }, { "from": "gpt", "value": "//Synchronous template\r\n//-----------------------------------------------------------------------------------\r\n// PCB-Investigator Automation Script\r\n// Created on 14.10.2015\r\n// Autor Fa...
c#
chosen
[ { "from": "human", "value": "Transform repeat rules into a tree\n" }, { "from": "gpt", "value": "using System.Linq;\nusing slang.Lexing.Rules.Core;\nusing slang.Lexing.Trees.Nodes;\n\nnamespace slang.Lexing.Trees.Transformers\n{\n public static class RepeatRuleExtensions\n {\n publ...
c#
chosen
[ { "from": "human", "value": "Remove duplicates from sorted list II\n" }, { "from": "gpt", "value": "// https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/\n// Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the orig...
c#
chosen
[ { "from": "human", "value": "Add mock builder for CarsContextQuery\n" }, { "from": "gpt", "value": "using System.Collections.Generic;\nusing System.Linq;\nusing PathFinder.Cars.DAL.Model;\nusing PathFinder.Cars.WebApi.Queries;\n\nnamespace CarsControllersTests\n{\n public class CarContextQue...
c#
chosen
[ { "from": "human", "value": "Make metadata accessible without reflection\n\ngit-svn-id: 7230453ef4d2e9c957b80d4737114f575fc9f7f8@1159843 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "#region Apache License\n//\n// Licensed to the Apache Software Foundation (ASF) under one...
c#
chosen
[ { "from": "human", "value": "Set Profil to fix Rectangle\n\nSet Profil to fix Rectangle.\r\nThe example rectangle is fixed size with 15 Inch x 10 Inch, just change the newBounds rectangle to get the size your company needs." }, { "from": "gpt", "value": "//---------------------------------------...
c#
chosen
[ { "from": "human", "value": "Add missing file for Map tests\n" }, { "from": "gpt", "value": "using System;\nusing NUnit.Framework;\n\nnamespace InfiniMap.Test\n{\n [TestFixture]\n public class MapTests\n {\n private Map createMap(int chunkSize, int chunksToFill)\n {\n ...
c#
chosen
[ { "from": "system", "value": "Refactor var in Session to be consistent with rest of the plugins\n" }, { "from": "human", "value": "using System.Collections.Generic;\nusing Glimpse.AspNet.Extensions;\nusing Glimpse.AspNet.Model;\nusing Glimpse.Core.Extensibility;\n\nnamespace Glimpse.AspNet.Seri...
c#
chosen
[ { "from": "human", "value": "Add unit tests for SingleDisposable.\n" }, { "from": "gpt", "value": "using System;\nusing System.Threading.Tasks;\nusing Nito.AsyncEx;\nusing System.Linq;\nusing System.Threading;\nusing System.Diagnostics.CodeAnalysis;\nusing Xunit;\n\nnamespace UnitTests\n{\n ...
c#
chosen
[ { "from": "system", "value": "Update website and copyright year.\n" }, { "from": "human", "value": "using System;\nusing System.Reflection;\nusing System.Resources;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assem...
c#
chosen
[ { "from": "system", "value": "Select start page by default instead of root\n" }, { "from": "human", "value": "using System;\r\nusing N2.Web.UI.WebControls;\r\n\r\nnamespace N2.Edit\r\n{\r\n\t[ToolbarPlugin(\"\", \"tpPreview\", \"{url}\", ToolbarArea.Preview, Targets.Preview, \"~/Edit/Img/Ico/Png...
c#
chosen
[ { "from": "system", "value": "Add NorthEurope to location enum for Data Factories\n" }, { "from": "human", "value": "// \n// Copyright (c) Microsoft and contributors. All rights reserved.\n// \n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file ex...
c#
chosen
[ { "from": "human", "value": "Add test asserting reconnect works.\n" }, { "from": "gpt", "value": "using System.Threading.Tasks;\nusing NUnit.Framework;\nusing Robust.Client.Console;\nusing Robust.Shared.Interfaces.Network;\nusing Robust.Shared.IoC;\n\nnamespace Content.IntegrationTests.Tests\n{\...
c#
chosen
[ { "from": "human", "value": "Add 'tabs' and header with converter on main page\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Data;\n\nnamespace Postolego.Converters {...
c#
chosen
[ { "from": "human", "value": "Add an Rx-friendly HTTP downloader" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Net;\nusing System.Reactive.Linq;\nusing System.Reactive.Subjects;\nusing System.Text;\n\nnamespace NSync.Core\n{\n ...
c#
chosen
[ { "from": "system", "value": "Update lock to version 7.11\n" }, { "from": "human", "value": "@using System.Configuration;\n@{\n ViewBag.Title = \"Login\";\n}\n\n<div id=\"root\" style=\"width: 280px; margin: 40px auto;\">\n</div>\n@Html.AntiForgeryToken()\n<script src=\"https://cdn.auth0.com...
c#
chosen
[ { "from": "system", "value": "Add sorting order/layer comparison\nAlso move comparer methods into a list\n" }, { "from": "human", "value": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See LICENSE in the project root for license information.\n...
c#
chosen
[ { "from": "human", "value": "Add a default VS foregrounddispatcher\n" }, { "from": "gpt", "value": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.ComponentMo...
c#
chosen
[ { "from": "human", "value": "Write various unit tests for CustomerData, Name, and StreetAddress\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing NUnit.Framework;\n\n\nnamespace Electro...
c#
chosen
[ { "from": "human", "value": "Create server side API for single multiple answer question\n" }, { "from": "gpt", "value": "using Microsoft.AspNetCore.Mvc;\nusing Promact.Trappist.DomainModel.Models.Question;\nusing Promact.Trappist.Repository.Questions;\nusing System;\n\nnamespace Promact.Trappis...
c#
chosen
[ { "from": "human", "value": "Add JsonWriter impl. that defaults to using a RendererMap\n" }, { "from": "gpt", "value": "using System.IO;\nusing log4net.ObjectRenderer;\nusing log4net.Util.Serializer;\n\nnamespace Newtonsoft.Json.Serialization\n{\n public class RendererMapJsonTextWriter : Json...
c#
chosen
[ { "from": "system", "value": "Remove error message giving away path location if not accessing from the local machine\n" }, { "from": "human", "value": "namespace dotless.Core\n{\n using System.Web;\n using System.Web.SessionState;\n \n public class LessCssWithSessionHttpHandler : Le...
c#
chosen
[ { "from": "human", "value": "Add a sanity check for exported types\n" }, { "from": "gpt", "value": "using System.Linq;\nusing NUnit.Framework;\nusing ZeroLog.Tests.Support;\n\nnamespace ZeroLog.Tests;\n\n[TestFixture]\npublic class SanityChecks\n{\n [Test]\n public void should_export_expec...
c#
chosen
[ { "from": "human", "value": "Add missing file from code config branch\n" }, { "from": "gpt", "value": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace Spring.Objects.Factory.Parsing\r\n{\r\n public interface IProblemReporter\r\n {\r\n void ...
c#
chosen
[ { "from": "human", "value": "Add simple snippet to get InformationalVersion\n" }, { "from": "gpt", "value": "public static string GetProductVersion()\r\n{\r\n var attribute = (AssemblyVersionAttribute)Assembly\r\n .GetExecutingAssembly()\r\n .GetCustomAttributes( typeof(AssemblyVersionAtt...
c#
chosen
[ { "from": "human", "value": "Add a testcase for unknown frame types\n" }, { "from": "gpt", "value": "using System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nusing Xunit;\n\nusing Http2;\n\nnamespace Http2Tests\n{\n public class ConnectionUnknownFrameTests\n {\n ...
c#
chosen
[ { "from": "system", "value": "Update WriteJSONTest to initialize TiledNavMesh with non-null parameter\n" }, { "from": "human", "value": "#region License\n/**\n * Copyright (c) 2013-2014 Robert Rouhani <robert.rouhani@gmail.com> and other contributors (see CONTRIBUTORS file).\n * Licensed under ...
c#
chosen
[ { "from": "system", "value": "Add a test for TwoDigitYearMax to KoreanCalendar\n" }, { "from": "human", "value": "// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n// See the LICENSE file in the project root...
c#
chosen
[ { "from": "human", "value": "Extend the Rotorz Tile System api\n\nI built this set of extensions because, while I love Rotorz, I find its\nmethod paramaters frustrating to use. Specifically, I tend to send x\ncoordinates first in my params, followed by y coordinates; while Rotorz\ntransposes these. It has l...
c#
chosen
[ { "from": "system", "value": "Change properties to inherit from declarations.\n" }, { "from": "human", "value": "using System;\nusing System.Collections.Generic;\n\nnamespace Cxxi\n{\n /// <summary>\n /// Represents a C++ property.\n /// </summary>\n public class Property\n {\n ...
c#
chosen
[ { "from": "human", "value": "Move sort class to new file\n" }, { "from": "gpt", "value": "\n\nnamespace ContractsWindow\n{\n\tpublic enum contractSortClass\n\t{\n\t\tDifficulty = 1,\n\t\tExpiration = 2,\n\t\tAcceptance = 3,\n\t\tReward = 4,\n\t\tType = 5,\n\t\tPlanet = 6,\n\t}\n}\n" } ]
c#
chosen
[ { "from": "human", "value": "Add regression test for the pattern of using DHO proxy in `LifetimeManagementContainer`\n" }, { "from": "gpt", "value": "// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence te...
c#
chosen
[ { "from": "human", "value": "Add a platform detection mechanism to use in tests\n\nThis should eventually be replaced with (or reimplemented based on) Environment.OSVersion, once it's available.\n" }, { "from": "gpt", "value": "// Copyright (c) Microsoft. All rights reserved.\n// Licensed under ...
c#
chosen
[ { "from": "system", "value": "Add extension methods for logging timings\n" }, { "from": "human", "value": "using Serilog;\n\nnamespace GitHub.Logging\n{\n public static class ILoggerExtensions\n {\n public static void Assert(this ILogger logger, bool condition, string messageTemplat...
c#
chosen
[ { "from": "human", "value": "Add a Task extension to handle timeouts\n\n" }, { "from": "gpt", "value": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace CircuitBreaker.Net\n{\n // The following code is taken from \"Crafting a Task.TimeoutAfter Method\" post ...
c#
chosen