doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
c07b6cda-e34d-4ec3-9103-5b0f8b6ae2c7
{ "language": "C#" }
```c# ``` Add known runtime names for .NET core.
```c# namespace AsmResolver.DotNet { /// <summary> /// Provides strings of known runtime names used in .NET Core, .NET 5.0 and later. /// </summary> public static class KnownRuntimeNames { /// <summary> /// Indicates an application targeting the default .NET Core runtime. ///...
5a71bd55-7566-4396-b327-770127fe43a3
{ "language": "C#" }
```c# ``` Add missing test for PG object metadata
```c# using Marten.Testing.Documents; using Marten.Util; using Xunit; namespace Marten.Testing.Schema { public class add_origin_Tests { [Fact] public void origin_is_added_to_tables() { var user1 = new User { FirstName = "Jeremy" }; var user2 = new User { Fi...
797ba799-594b-4581-8e10-33cd8da89b18
{ "language": "C#" }
```c# ``` Add Thread Queue Size Setting
```c# using Hudl.FFmpeg.Attributes; using Hudl.FFmpeg.Enums; using Hudl.FFmpeg.Resources.BaseTypes; using Hudl.FFmpeg.Settings.Attributes; using Hudl.FFmpeg.Settings.Interfaces; namespace Hudl.FFmpeg.Settings { /// <summary> /// This option sets the maximum number of queued packets when reading from the f...
49ccaa65-f131-4263-9544-70f5416cc29f
{ "language": "C#" }
```c# // Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using osu.Framework.Graphics.OpenGL.Textures; using osu.Framework.Graphics.Textures; namespace osu.Framework.Graphics.Shaders { public clas...
```c# // Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using osu.Framework.Graphics.OpenGL.Textures; using osu.Framework.Graphics.Textures; namespace osu.Framework.Graphics.Shaders { public clas...
ffbf6eea-0b6a-4504-9554-fd7364662df5
{ "language": "C#" }
```c# ``` Move database interactions into repository. This contains the actions for both days and items.
```c# using System.Collections.Generic; using System.Linq; namespace food_tracker.Repository { public class NutritionRepository { private readonly IMyEntitiesContext _db = null; public NutritionRepository(IMyEntitiesContext db) { _db = db; } public WholeDay GetDay(st...
ddc52f15-a68f-456f-b1da-639317d65778
{ "language": "C#" }
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; namespace Microsof...
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; namespace Microsof...
785125b1-205c-4d02-9608-d5e2aed35d97
{ "language": "C#" }
```c# ``` Fix FindByAccessibilityId bug where you were not to find a subelement of an element in a dom
```c# using System.Collections.ObjectModel; namespace OpenQA.Selenium.Appium.Interfaces { internal interface IFindByAccessibilityId { /// <summary> /// Finds the first of elements that match the Accessibility Id selector supplied /// </summary> /// <param name="selector">an Acc...
8eedb71d-1244-4e74-a781-84552bd9937b
{ "language": "C#" }
```c# ``` Move a small part of current
```c# using System; using Umbraco.Core.Logging; namespace Umbraco.Core.Composing { /// <summary> /// Provides a static service locator for most singletons. /// </summary> /// <remarks> /// <para>This class is initialized with the container in UmbracoApplicationBase, /// right after the contain...
be1daecf-a3f3-4da9-981e-3045e3fbb3cd
{ "language": "C#" }
```c# ``` Fix Windows file format issues
```c# /* Copyright © Iain McDonald 2010-2019 This file is part of Decider. */ using System; using System.Collections.Generic; using System.Linq; using Decider.Csp.BaseTypes; namespace Decider.Csp.Integer { public class MetaExpressionInteger : ExpressionInteger, IMetaExpression<int> { privat...
04061252-8dfe-46fb-82a8-0fd07f41462d
{ "language": "C#" }
```c# ``` Add unit tests for HtmlTemplatePrivider
```c# namespace Host.UnitTests.Conversion { using Crest.Host.Conversion; using NUnit.Framework; [TestFixture] public sealed class HtmlTemplateProviderTests { [Test] public void ContentLocationShouldReturnTheLocationAfterTheBodyTag() { var provider = new HtmlTemp...
84fd5d66-749a-4688-83f3-f9861ff5b2c1
{ "language": "C#" }
```c# ``` Add Microsoft Graph API calls
```c# using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using System.Web; namespace SampleAADV2Bot.Helpers { public class MeetingRoom { public string DisplayName { get; set; } public string Locati...
55205507-9795-4499-a58f-5b022af2049e
{ "language": "C#" }
```c# ``` Add StackOverflow InteractiveWindow test for .NET Core
```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. extern alias InteractiveHost; using System; using System.Diagnostics; using System.Globalization; using Syst...
d84bf795-632c-4f32-bee5-c3be9ae73b0d
{ "language": "C#" }
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPool : MonoBehaviour { [SerializeField] private GameObject _prefab; private Stack<GameObject> _pool; public GameObject GetGameObject() { if (_pool != null) { if (_p...
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPool : MonoBehaviour { [SerializeField] private GameObject _prefab; private Stack<GameObject> _pool; public GameObject prefab { set { _prefab = value; } } ...
3004e9ed-549a-454e-8c6a-9c26231ddc9b
{ "language": "C#" }
```c# ``` Add mania player test scene
```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.Tests.Visual; namespace osu.Game.Rulesets.Mania.Tests { public class TestScenePlayer : PlayerTestScene { public TestScenePlayer() ...
c07ee8e8-b979-4145-b754-10104ad4254b
{ "language": "C#" }
```c# ``` Add code example for wiki.
```c# using System; using EOpt.Math.Optimization; using EOpt.Math; namespace Test { class Program { static void Main(string[] args) { Func<double[], double> func = (x) => 20 + (x[0] * x[0] - 10 * Math.Cos(2 * Math.PI * x[0])) + (x[1] * x[1] - 10 * Math.Cos(2 * Math...
6c377120-ec58-44a4-8878-6ea1313d9515
{ "language": "C#" }
```c# ``` Implement the longest common pattern
```c# using System; using Algorithms.Sorting; namespace Algorithms.Strings.Search { public class LongestCommonPattern { public String Find(String s1, String s2) { int N = s1.Length; String[] a = new String[N]; for (var i = 0; i < N; ++i) { ...
8c3eff82-ee4a-437d-b310-81baac056ea8
{ "language": "C#" }
```c# ``` Add test scene for previewing Torus alternates
```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.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu....
1630bf71-f977-4ab7-90db-25917b89a17a
{ "language": "C#" }
```c# ``` Load cadence constraint file to PCB-Investigator
```c# //Synchronous template //----------------------------------------------------------------------------------- // PCB-Investigator Automation Script // Created on 29.06.2016 // Autor Guenther // // Empty template to fill for synchronous script. //-------------------------------------------------------------...
c037c880-312a-41a3-9702-8a68c4225c6b
{ "language": "C#" }
```c# using System; using System.IO; using System.Linq; public partial class Processor { public string WeaverAssemblyPath; public bool FoundWeaverProjectFile; public virtual void FindWeaverProjectFile() { GetValue(); if (WeaverAssemblyPath == null) { Logger.LogDebug...
```c# using System; using System.IO; using System.Linq; public partial class Processor { public string WeaverAssemblyPath; public bool FoundWeaverProjectFile; public virtual void FindWeaverProjectFile() { GetValue(); if (WeaverAssemblyPath == null) { Logger.LogDebug...
d166140c-e3d3-4b0a-9fc1-5bd331a5c065
{ "language": "C#" }
```c# ``` Add interface for main character animations
```c#  public interface IPlayerAnimator { void PlayIdleAnimation(); void PlayRunAnimation(); void PlayJumpAnimation(); void PlayAttackAnimation(); void PlayRunAttackAnimation(); void PlayJumpAttackAnimation(); bool ExitTimeReached(); }```
048e5b8d-a182-4abf-bb11-a79fc946e43f
{ "language": "C#" }
```c# ``` Test matching composite type handling
```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 osu.Fra...
b379caf8-2afd-435a-9c40-387a9cecffa2
{ "language": "C#" }
```c# ``` Add static class for Serialize
```c# using System; using System.IO; using System.Runtime.Serialization; using System.Xml.Serialization; namespace parallel_extension_demo { public static class XSerializer { public static void XSerilizer<T>(T obj, string fileName) { try { if (obj == nul...
4f1348e1-1ee4-4b71-bad5-8b9fe5f2484f
{ "language": "C#" }
```c# ``` Create a case insensitive expando object
```c# // -------------------------------------------------------------------------------------------------------------------- // <copyright file="DataReaderExtensions.cs" company="Bosbec AB"> // Copyright © Bosbec AB 2014 // </copyright> // <summary> // Defines extension methods for data readers. // </summary> // -...
425467cf-9cbd-4908-bffc-fad94ffa58f0
{ "language": "C#" }
```c# //////////////////////////////////////////////////////////////// // // (c) 2009, 2010 Careminster Limited and Melanie Thielker // // All rights reserved // using System; using Nini.Config; using OpenSim.Framework; using OpenMetaverse; namespace OpenSim.Services.Interfaces { public interface IBakedTextureModu...
```c# //////////////////////////////////////////////////////////////// // // (c) 2009, 2010 Careminster Limited and Melanie Thielker // // All rights reserved // using System; using Nini.Config; using OpenSim.Framework; using OpenMetaverse; namespace OpenSim.Services.Interfaces { public interface IBakedTextureModu...
88e8bd03-c2c1-4f50-9b3e-459462217326
{ "language": "C#" }
```c# ``` Add first attempt of the Git unit tests
```c# using System; using System.IO; using Ionic.Zip; using NUnit.Framework; namespace MSBuild.Version.Tasks.Tests { [TestFixture] public class GitVersionFileTest { [SetUp] public void SetUp() { // extract the repositories in the 'Git.zip' file into the 'temp' folder ...
2f472c78-4383-4127-b599-3064007cf538
{ "language": "C#" }
```c# ``` Add tracingheader for support Diagnostics
```c# // Copyright (c) .NET Core Community. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Collections; using System.Collections.Generic; using System.Linq; namespace DotNetCore.CAP.Diagnostics { public class TracingHeaders : IEnu...
dbab7aa0-8a0d-4f27-9d11-1522676238e4
{ "language": "C#" }
```c# ``` Add unit test for SecurityKeyEntropyMode.
```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.ServiceModel.Security; using Infrastructure.Common; using Xunit; public static class SecurityK...
7ef7c825-6689-4deb-ae7c-0c4bff562be5
{ "language": "C#" }
```c# ``` Add failing test coverage of loading with an unavailable 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 System.IO; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Platform; using osu.Game.Rulesets; using osu.Game.Tests; namespace osu....
251597cc-09eb-45b9-af29-458841267922
{ "language": "C#" }
```c# ``` Add an ad-hoc way to provide dependency to children
```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.Graphics.Containers; namespace osu.Game.Tests.Visual { /// <summary> /...
83d4d371-cb42-4aab-ba74-ca2176c7885e
{ "language": "C#" }
```c# ``` Fix off indicator for json/asmdef file
```c# using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Plugins.Unity.JsonNew.Psi; using JetBrains.ReSharper.Psi; namespace JetBrains.ReSharper.Plugins.Unity.AsmDefNew.Daemon { [Language(typeof(JsonNewLanguage))] public class AsmDefNewLanguageSpecificDaemonBehavior: ILanguageSpecific...
fb860ada-00bb-467b-b01a-db98210ff2b1
{ "language": "C#" }
```c# ``` Add tests for new extensionmethods
```c# using Contentful.Core.Extensions; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Text; using Xunit; namespace Contentful.Core.Tests.Extensions { public class JTokenExtensionsTests { [Fact] public void JTokenIsNullShouldReturnTrueForNullValue() ...
86854325-deee-45b9-8a20-5883dffb6c31
{ "language": "C#" }
```c# ``` Add collection to array Newtonsoft.Json based JSON converter
```c# using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; namespace Marten.Util { /// <summary> /// Serialize collection type property to JSON array using a custom Newtonsoft.Json JsonConverter /// Note that without using custom `JsonConverter`, `Newtonsoft.Json` store...
5d837e33-686a-488a-aef7-5a912cd6b6f9
{ "language": "C#" }
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Diagnostics; namespace System.Net.Sockets { public static class IPAddressExtensions { ...
```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.Diagnostics; namespace System.Net.Sockets { internal static class IPAddressExtensions { ...
1c90c350-0530-4074-a6cf-56c431bf27ff
{ "language": "C#" }
```c# ``` Add Chat View - omitted before
```c# <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Michelangelo Web Chat</title> <link href='http://fonts.googleapis.com/css?family=Yesteryear' rel='stylesheet' type='text/css'/> <script src="~/Scripts/jquery-2.0.3.js"></script> <script src="~/Scripts/http-requester.j...
a94741a7-a784-45fa-a403-c601926e0561
{ "language": "C#" }
```c# ``` Add test for temporary directory
```c# using System.IO; using System.Linq; using System.Threading.Tasks; using Xunit; namespace Meziantou.Framework.Tests { public class TemporaryDirectoryTests { [Fact] public void CreateInParallel() { const int Iterations = 100; var dirs = new TemporaryDirector...
c06b2bb7-93f9-4796-be1b-497f5319c9ed
{ "language": "C#" }
```c# ``` Add helper class used to deserialize JSON.
```c# using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; namespace WundergroundClient.Autocomplete { [DataContract] internal class RawAutocompleteResult { [DataMember] internal RawResult[] RESULTS; } [DataContract] ...
5b1bdfee-b367-420f-aa19-997f660e2e7e
{ "language": "C#" }
```c# ``` Add the interface for the map manager
```c# using System; using System.Collections.Generic; namespace FierceGalaxyInterface.MapModule { /// <summary> /// The MapManager load/save the map from/to the disk /// </summary> public interface IMapManager { IList<String> MapsName { get; } IReadOnlyMap LoadMap(String m...
e5620972-a18a-4fac-a355-e92209c90a61
{ "language": "C#" }
```c# ``` Add stress test of EventHandler
```c# using System; #if NUNIT using NUnit.Framework; using TestClassAttribute = NUnit.Framework.TestFixtureAttribute; using TestMethodAttribute = NUnit.Framework.TestCaseAttribute; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif using Ooui; using System.Linq; using System.Threading.Tasks; using Syst...
54a51a7a-2aca-49ce-9503-d8d38374cd08
{ "language": "C#" }
```c# ``` Add file missing in build
```c# using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; using System; using System.Collections.Generic; namespace NUnit.VisualStudio.TestAdapter.Tests { class FakeTestExecutionRecorde...
841dbf1a-0823-4ce3-99aa-3cb6c512b4ac
{ "language": "C#" }
```c# ``` Add Test to check GaugeLogMetrics log number of Rejections correctly
```c# using System; using Hudl.Mjolnir.Events; using Hudl.Mjolnir.External; using Moq; using Xunit; namespace Hudl.Mjolnir.Tests.Events { public class GaugeLogMetricsTests { [Fact] public void RejectionsLoggedInGaugeCorrectly() { var mockLogFactory = new Mock<IMjolnirLogFact...
1a1d94a7-44aa-4f39-adb5-ba31a3d22338
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PA.TileList.Contextual { public class Contextual<T> : IContextual<T> where T : ICoordinate { public int X { get; set; } public int Y { get; set; } public T Context { get; pr...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PA.TileList.Contextual { public class Contextual<T> : Coordinate, IContextual<T> where T : ICoordinate { public T Context { get; private set; } public Contextual(int x, int y, T cont...
8927c753-cc25-4e03-bde0-2044441e4ff5
{ "language": "C#" }
```c# using System; using SampSharp.GameMode.World; namespace SampSharp.GameMode.SAMP.Commands { /// <summary> /// A Permission checker is used to check if a player /// is allowed to use a specific command. /// /// Every class that implement this interface /// should create pa...
```c# using System; using SampSharp.GameMode.World; namespace SampSharp.GameMode.SAMP.Commands { /// <summary> /// A Permission checker is used to check if a player /// is allowed to use a specific command. /// /// Every class that implement this interface /// should have a pa...
99f41290-bcf0-4acd-8759-00b398a0df22
{ "language": "C#" }
```c# ``` Enable IntelliSense for new component parameters.
```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; using System.Runtime.InteropServices; namespace Microsoft.CodeAnalysis.Razor { internal static class FilePathComparison { ...
a67e574a-d41c-4224-9264-d23bd0079518
{ "language": "C#" }
```c# ``` Check in simple end-to-end test for covariant returns.
```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 Roslyn.Test.Utilities; using System; using System.Text; using Xunit; using Microsoft.CodeAnalysis.Test....
b9b7bd49-e143-4488-98cc-55e64a6d322e
{ "language": "C#" }
```c# ``` Add gestione eccezioni servizi esterni
```c# using System; using System.Collections.Generic; using System.Text; namespace SO115App.Models.Classi.Condivise { public class LogException { public DateTime DataOraEsecuzione { get; set; } public string Servizio { get; set; } public string Content { get; set; } public stri...
a005598b-38ff-45b1-8e1e-f3d66a043286
{ "language": "C#" }
```c# ``` Add missing test coverage over UnableToGenerateValueException
```c# using System; using Xunit; namespace Peddler { public class UnableToGenerateValueExceptionTests { [Fact] public void WithDefaults() { // Act var exception = Throw<UnableToGenerateValueException>( () => { throw new UnableToGenerateValueException(); } ...
f77803b0-447f-46bb-a221-58482ea49610
{ "language": "C#" }
```c# ``` Implement KTH API data fetcher
```c# using Newtonsoft.Json; using Org.Json; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net.Http; using System.Runtime.Serialization.Json; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace S...
7a26776f-3b0e-4dcc-94be-7f370230ce4d
{ "language": "C#" }
```c# ``` Add tests for restoring the aggregate from events
```c# using FluentAssertions; using NetCoreCqrsEsSample.Domain.Models; using Xunit; namespace NetCoreCqrsEsSample.Tests.Domain { public class AggregateTests { [Fact] public void Should_load_aggregate_from_events_correctly() { // arrange var counter = new Counter...
d2d89cc7-e0e4-4d6d-892f-b3416050be10
{ "language": "C#" }
```c# ``` Add failing test case due to div by zero
```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.Objects; using osu.Game.Rulesets.Objects.Typ...
2ed96530-6534-4614-9c62-4a5535683189
{ "language": "C#" }
```c# ``` Add visual and assertive test coverage
```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 osu.Fram...
e04f01e2-42d6-430e-9178-c5794653b55d
{ "language": "C#" }
```c# ``` Create List.Head() and List.Tail() extension methods
```c# using System.Collections.Generic; using System.Linq; namespace squirrel { public static class ExtensionMethods { public static T Head<T>(this List<T> list) { return list[0]; } public static List<T> Tail<T>(this List<T> list) { return list....
c890d397-9a62-49c6-94fe-86cffc2455fb
{ "language": "C#" }
```c# ``` Add in-process DB ORM test
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using DataAccessExamples.Core.Data; using DataAccessExamples.Core.Services.Department; using DataAccessExamples.Core.Services.Employee; using DataAccessExamples.Core.ViewModels; using NUni...
947bf5a9-b7ab-4e0d-aad7-ae0231dd26d1
{ "language": "C#" }
```c# ``` Add test scene for beatmapset online status pill display
```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.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Drawables; ...
a1e35b0e-ff7e-462d-b04f-26c38e7ecca8
{ "language": "C#" }
```c# ``` Add default ignored request provider which discovers instances
```c# using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.Remoting.Messaging; namespace Glimpse.Agent.Web.Options { public class DefaultIgnoredRequestProvider : IIgnoredRequestProvider { private readonly ITypeService _typeService; p...
d09d1ab6-a41a-4b42-bc9c-fdf46573844b
{ "language": "C#" }
```c# ``` Add report with basic metadata
```c# using KenticoInspector.Core; using KenticoInspector.Core.Constants; using KenticoInspector.Core.Models; using System; using System.Collections.Generic; using System.Text; namespace KenticoInspector.Reports.ContentTreeConsistencyAnalysis { class Report : IReport { public string Codename => "Conte...
3055ca86-f237-4a32-b105-c044b8f2641f
{ "language": "C#" }
```c# ``` Add test for init-only properties.
```c# using Xunit; #if NET5_0 namespace Autofac.Test.Core { public class PropertyInjectionInitOnlyTests { public class HasInitOnlyProperties { public string InjectedString { get; init; } } [Fact] public void CanInjectInitOnlyProperties() { ...
25f43ef4-7e97-46e4-878b-d693d5dbcbaf
{ "language": "C#" }
```c# // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Net.Sockets; using System.Net.Tests; using System.Security.Cryptography.X509Certificates; using S...
```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.Net.Sockets; using System.Net.Tests; using System.Security.Cryptography.X509Certificates; using S...
f4f47ec7-3c8f-47e2-9042-20e3760085b7
{ "language": "C#" }
```c# ``` Create a class to parse the alis configuration node.
```c# using System; using System.Collections; using System.Collections.Generic; using System.Xml; namespace Nohros.Configuration { internal class ProviderAliasesNode { public static ICollection<string> Parse(XmlElement element) { List<string> aliases = new List<string>(element.ChildNodes.Count)...
1f9a4df2-a440-4cd1-8f92-ec2eb8557fb3
{ "language": "C#" }
```c# ``` Add tests for sqlite check constraints.
```c# using System; using NUnit.Framework; using Moq; using SJP.Schematic.Core; namespace SJP.Schematic.Sqlite.Tests { [TestFixture] internal class SqliteCheckConstraintTests { [Test] public void Ctor_GivenNullTable_ThrowsArgumentNullException() { Assert.Throws<Argument...
0233e07f-3d9f-4e4e-9c07-611ac91fdee9
{ "language": "C#" }
```c# ``` Add acceptance tests for feature prerequisites
```c# using System.Threading.Tasks; using NServiceBus; using NServiceBus.AcceptanceTesting; using NServiceBus.AcceptanceTests.EndpointTemplates; using NServiceBus.Features; using NServiceBus.Settings; using NUnit.Framework; [TestFixture] class When_notifications_are_misconfigured { [Test] public async Task Sh...
4ead15f4-145a-4b8e-ba65-584fade9e98b
{ "language": "C#" }
```c# ``` Add a interface for the NTP time module
```c# using System; namespace FierceGalaxyInterface.TimeModule { public interface NetworkTime { /// <summary> /// Return the time from a default NTP server /// </summary> DateTime GetNetworkTime(); /// <summary> /// Return the time from the given NTP server ...
8a9d4554-10fc-403c-851f-eb592bb813c6
{ "language": "C#" }
```c# ``` Add temporary workaround to load annotations
```c# using System; using System.Collections.Generic; using JetBrains.Application; using JetBrains.Metadata.Utils; using JetBrains.ReSharper.Psi.ExtensionsAPI.ExternalAnnotations; using JetBrains.Util; namespace JetBrains.ReSharper.Plugins.Unity.Rider { // Temporary workaround for RIDER-13547 [ShellComponent]...
971ca6af-16ea-44bd-9096-dc92e348f352
{ "language": "C#" }
```c# ``` Add fixed ignored request provider to allow user full controll
```c# using System.Collections.Generic; using System.Linq; namespace Glimpse.Agent.Web.Options { public class FixedIgnoredRequestProvider : IIgnoredRequestProvider { public FixedIgnoredRequestProvider() : this(Enumerable.Empty<IIgnoredRequestPolicy>()) { } public F...
c72d5753-aaa7-45c4-8ced-11f7c2294e5f
{ "language": "C#" }
```c# ``` Add missing file to repository
```c# // *********************************************************************** // Copyright (c) 2010 Charlie Poole // // 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...
a77915ed-9a8b-4de9-860b-2c819b4bed01
{ "language": "C#" }
```c# ``` Create Soccer Lobby ball factory/manager
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using SceneJect.Common; using Sirenix.OdinInspector; using Sirenix.Serialization; using UnityEngine; namespace Booma.Proxy { /// <summary> /// Simple manager that manages the spawning and despaw...
aa907de8-ebb5-4eea-b4aa-8d64515b92a3
{ "language": "C#" }
```c# ``` Add release manager command to show "lagging" packages
```c# // Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
5c5e2676-87a6-41b6-b5f4-eb5947022e8c
{ "language": "C#" }
```c# ``` Add default provider which uses reflection
```c# using System; using System.Collections.Generic; using System.Linq; namespace Glimpse.Web { public class DefaultRequestAuthorizerProvider : IRequestAuthorizerProvider { private readonly ITypeService _typeService; public DefaultRequestAuthorizerProvider(ITypeService typeService) ...
69c68508-0ac8-4a4b-b361-290beb007b9f
{ "language": "C#" }
```c# ``` Create polygon out of selectet lines and arcs
```c# //----------------------------------------------------------------------------------- // PCB-Investigator Automation Script // Created on 2014-04-24 // Autor support@easylogix.de // www.pcb-investigator.com // SDK online reference http://www.pcb-investigator.com/sites/default/files/documents/InterfaceDocumen...
d861a266-5617-4bca-acc4-c056b8a9a6ea
{ "language": "C#" }
```c# ``` Add test coverage of score importing
```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.Screens; using osu.Framework.Testing; using osu.Game.Rulesets; using osu.Game.Rulesets.Objects; using ...
088d2d98-e3d5-4857-b24d-b996a2202586
{ "language": "C#" }
```c# ``` Create User Module Ninject Commit
```c# using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using NeedDotNet.Server.Domain.Entities; using NeedDotNet.Web.Infrastructure; using NeedDotNet.Web.Services; using Ninject.Modules; using Ninject.Web.Common; namespace NeedDotNet.Web.NinjectResolution { internal class UserIdent...
89aeb0a3-f566-4100-9336-b2bd16ba46f8
{ "language": "C#" }
```c# ``` Check emptyness of an XDocument
```c# using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace GranitXMLEditor { public static class XDocumentExtension { public static bool IsEmpty(this XDocument element) { ...
2b096aa7-30d6-41cd-ad1e-1a21605c8bca
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using NuGet; namespace NuProj.Tests.Infrastructure { public static class Scenario { public static async Task<IPackage> RestoreAndBuildSinglePackage(string scenarioName) { ...
```c# using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using NuGet; namespace NuProj.Tests.Infrastructure { public static class Scenario { public static async Task<IPackage> RestoreAndBuildSinglePackage(string scenarioName, IDictionary<...
a4f2c5de-d973-4bd0-9e70-fa6ea4065345
{ "language": "C#" }
```c# ``` Add failing test showing the issue of DHO lifetime
```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.Testing; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Tests.Visual; namesp...
66bd401e-6d7f-4a58-a0f9-763489b514b5
{ "language": "C#" }
```c# ``` Create tests for grouped filters
```c# using SqlKata.Compilers; using SqlKata.Tests.Infrastructure; using Xunit; namespace SqlKata.Tests { public class WhereTests : TestSupport { [Fact] public void GroupedWhereFilters() { var q = new Query("Table1") .Where(q => q.Or().Where("Column1", 10).Or...
9cf54b58-0275-44a2-b368-7fad4985317b
{ "language": "C#" }
```c# ``` Add base class for all realtime multiplayer classes
```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 JetBrains.Annotations; using osu.Framework.Allocation; using osu.Game.Online.RealtimeMultiplayer; namespace osu.Game.Screens.Multi.RealtimeMultiplayer { ...
f8b48435-98b8-4bc5-843a-219676a71099
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace Twilio { /// <summary> /// Base class for list resource data /// </summary> public class TwilioListBase : TwilioBase { /// <summary> /// The current page number. Zero-indexed, so the first page is 0. /// </summary> public int Page { get; set;...
```c# using System; using System.Collections.Generic; namespace Twilio { /// <summary> /// Base class for list resource data /// </summary> public class TwilioListBase : TwilioBase { /// <summary> /// The current page number. Zero-indexed, so the first page is 0. /// </summary> public int Page { get; set;...
0065eecb-1c47-4952-bf41-adeb4318da6a
{ "language": "C#" }
```c# ``` Add missing enum for wood.
```c# namespace Decent.Minecraft.Client { public enum Orientation : ushort { UpDown = 0x0, EastWest = 0x4, NorthSouth = 0x8, None = 0xC } } ```
07f8f6a8-9246-4738-893e-b098efe20bd0
{ "language": "C#" }
```c# ``` Add some test coverage for Ensure
```c# using System; using Burr.Helpers; using FluentAssertions; using Xunit; using Xunit.Extensions; namespace Burr.Tests.Helpers { public class EnsureTests { public class TheArgumentNotNullMethod { [Fact] public void ThrowsForNullArgument() { ...
9bcb8bf7-54a0-4933-9653-841d3c0fa473
{ "language": "C#" }
```c# ``` Add an infraction search command
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Discord; using Discord.Commands; using Discord.WebSocket; using Modix.Data.Models; using Modix.Data.Models.Moderation; using Modix.Services.Moderation; using Serilog; using Tababular; namesp...
ed302be6-cd9b-4911-9b33-eb2966b8a585
{ "language": "C#" }
```c# ``` Add swuber icon to gmaps marker and switch views to satelite
```c#  @{ ViewBag.Title = "UserDashBoard"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>UserDashBoard</h2> <fieldset> @if (Session["NNumber"] != null) { <text> Welcome @Session["NNumber"].ToString() @Session["FirstName"].ToString() @Session["LastName"].ToString() </text> } </fieldset> ...
62701031-3b6f-47ca-bc45-d9bbe6d1f4de
{ "language": "C#" }
```c# ``` Add partial class for retry settings (compatibility)
```c# // Copyright 2019 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...
fb3d7834-305f-4a9a-9efd-f3e7a018d55f
{ "language": "C#" }
```c# ``` Add integration tests for Empiria Oracle Data Handler and Empiria ORM
```c# /* Empiria Extensions **************************************************************************************** * * * Module : Oracle Data Handler Component : Test Helpers ...
ed30853d-fa89-4a62-86c2-2af42d9807c5
{ "language": "C#" }
```c# ``` Move extensions to appropriate project
```c# using System; namespace Grobid.PdfToXml { public static class Extensions { // Same rules as pdftoxml. // Max difference in primary font sizes on two lines in the same // block. Delta1 is used when examining new lines above and below the // current block. ...
dacd17da-5b53-4b1b-a85b-e7c7274f6b77
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplicationSample { class Program { static void Main(string[] args) { } } } ``` Add some sample console output
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplicationSample { class Program { static void Main(string[] args) { Console.WriteLine("Changeset: " + VersionInfo.Changeset); ...
153cc80b-dd58-4e61-8876-d7a803cd839f
{ "language": "C#" }
```c# ``` Add dto for Teacher's list item
```c# namespace DiplomContentSystem.Dto { public class TeacherListItem { public int Id {get;set;} public string FIO {get;set;} public string Position {get;set;} public string Department {get;set;} public int WorkCount {get;set;} public int MaxWorkCount {get;set;} ...
e7367f63-ec77-4144-ac70-6991f131be7e
{ "language": "C#" }
```c# ``` Add test scene for hitcircles and combo changes
```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.Bindables; using osu.Game.Rulesets.Osu.Objects; namespace osu.Game.Rulesets.Osu.Tests { public class TestSceneHitCircleComboChange : TestSc...
f315ad6f-7a6f-444c-9fc4-8e3fb9deb1ae
{ "language": "C#" }
```c# ``` Add basic multiplayer gameplay test coverage
```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.Game.Screens.OnlinePlay.Multiplayer; namespace osu.Game.Tests.Visual.Multiplayer { public class TestMultipl...
c26bd3dd-0fea-4ab0-8244-9caf6abcb192
{ "language": "C#" }
```c# ``` Add Storage function unit test
```c# // Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
5f189ada-cf6d-49bd-b576-3207d15d6f18
{ "language": "C#" }
```c# ``` Add labelled enum dropdown variant
```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.Game.Graphics.UserInterface; namespace osu.Game.Graphics.UserInterfaceV2 { public class LabelledEnumDropdown<TEnum> : LabelledDropdown<...
da2a5091-d131-4382-b302-44038bf68b30
{ "language": "C#" }
```c# ``` Add visual test case for report button
```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.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Cursor; using osu.Framework.Testing; using osu.Game.Online.API; using osu...
e987e5d6-f2fe-481b-a1d0-01de90cf969c
{ "language": "C#" }
```c# ``` Add entry point. Technically not really needed, but fixes a ReSharper warning.
```c# using System; namespace HelloCoreClrApp.Test { public static class Program { // Entry point for the application. public static void Main(string[] args) { Console.WriteLine("Please use 'dotnet test' or 'dotnet xunit' to run unit tests."); } } }```
8f00005c-6a69-4fbe-b00c-0dc5728204a6
{ "language": "C#" }
```c# ``` Add missing file (to b7f3a06 and later)
```c# // // UniversityPortalConfig.cs // // Author: // Roman M. Yagodin <roman.yagodin@gmail.com> // // Copyright (c) 2016 Roman M. Yagodin // // 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...
b6e3a050-6113-4062-8496-b5bbdf335961
{ "language": "C#" }
```c# ``` Implement show-version command referred to in PROCESSES.md
```c# // Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
0939b73c-63ac-475d-9cbd-550b51e975f0
{ "language": "C#" }
```c# ``` TEST Transaction: no DB connection if not needed, possible to pass DB connection.
```c# // // Copyright (c) 2014 Piotr Fusik <piotr@fusik.info> // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of source code must retain the above ...
c1b95e49-c70d-4bbf-a4aa-0db72afe13f6
{ "language": "C#" }
```c# ``` Test that the container can resolve Test that the container can resolve the engine root object Having this test would have saved some time recently
```c# using System; using NuKeeper.Configuration; using NuKeeper.Engine; using NUnit.Framework; namespace NuKeeper.Tests { [TestFixture] public class ContainerRegistrationTests { [Test] public void RootCanBeResolved() { var container = ContainerRegistration.Init(MakeVal...
7cf9dc98-d284-4802-9f34-3bd22c545c06
{ "language": "C#" }
```c# ``` Add default implementation for RequestProfilers provider
```c# using System; using System.Collections.Generic; using System.Linq; namespace Glimpse.Agent.Web { public class DefaultRequestProfilerProvider : IRequestProfilerProvider { private readonly ITypeService _typeService; public DefaultRequestProfilerProvider(ITypeService typeService) ...
969601e2-c383-41d1-9b9d-0f4056285888
{ "language": "C#" }
```c# ``` Add failing test for assertion of concurrent calls
```c# namespace FakeItEasy.Tests { using System.Threading; using System.Threading.Tasks; using FluentAssertions; using Xunit; using Xunit.Abstractions; public class ConcurrentCallTests { private readonly ITestOutputHelper output; public ConcurrentCallTests(ITest...
8e899a18-e273-4f87-a662-741028f2a167
{ "language": "C#" }
```c# ``` Add tests for the ValidatorFixtureAttribute
```c# using NUnit.Framework; using System; using System.Reflection; namespace NValidate.Tests { [TestFixture] public class ValidatorFixtureAttributeTest { [ValidatorFixture("WithAttribute")] class ClassWithAttribute { } class ClassWithoutAttribute { } [Test]...
46222422-8aa1-4465-8de3-6a5b360478fd
{ "language": "C#" }
```c# ``` Include DTO pretty printer extensions
```c# using System; using System.Text; namespace CIAPI { ///<summary> /// Useful logging and debugging extensions ///</summary> public static class PrettyPrinterExtensions { ///<summary> /// Create string showing values of all public properties for object ///</summary> ...
4ecd534d-25c7-4496-b72c-e56e7fa0302a
{ "language": "C#" }
```c# ``` Add new tests for Choose Function
```c# using System; using System.IO; using EPPlusTest.FormulaParsing.TestHelpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using OfficeOpenXml; using OfficeOpenXml.FormulaParsing; using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; using OfficeOpenXml.FormulaParsing.Exceptions; namesp...