doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
bbd6d741-2144-43e8-884c-6a615c91b8c0
{ "language": "C#" }
```c# ``` Add helper class to generate all names
```c# namespace Storm.Binding.AndroidTarget.Helper { public static class NameGeneratorHelper { private const string VIEWHOLDER_FORMAT = "AutoGen_ViewHolder_{0}"; private static int _viewHolderCounter; public static string GetViewHolderName() { return string.Format(VIEWHOLDER_FORMAT, _viewHolderCounter++)...
28248587-5e43-430a-918b-e684a7bf4ecb
{ "language": "C#" }
```c# ``` Add ToStringInvariant method for IFormattable
```c# using System.Globalization; namespace Meziantou.Framework; public static class FormattableExtensions { public static string ToStringInvariant<T>(this T value) where T : IFormattable { return ToStringInvariant(value, format: null); } public static string ToStringInvariant<T>(this T value...
af535bf9-fc06-41d3-a4ab-77766d4e3ef7
{ "language": "C#" }
```c# ``` Add basic test scene for testing platform actions
```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; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics...
3419084d-c54a-4b63-a20f-258dfc4cb624
{ "language": "C#" }
```c# ``` Add file missed in bug fix 440109
```c# // *********************************************************************** // Copyright (c) 2009 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 restri...
a06522b4-67c8-4524-942f-af0a2bcfab5d
{ "language": "C#" }
```c# ``` Add cmdlet information for Remove-AzureDataDisk
```c# // ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // 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://w...
03126629-9648-4872-ab98-fff3453e9344
{ "language": "C#" }
```c# ``` Add class to get information about the current assembly.
```c# #region auto-generated FILE INFORMATION // ============================================== // This file is distributed under the MIT License // ============================================== // // Filename: AssemblyInfo.cs // Version: 2018-06-02 15:41 // // Copyright (c) 2018, Si13n7 Developments (r) // All r...
cdc3f474-ac88-4d8f-b9f2-d65184827a3a
{ "language": "C#" }
```c# ``` Add composite managing display of selection box drag handles
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework....
5ab09ca2-d07f-4aa6-8645-ba8aec37b994
{ "language": "C#" }
```c# namespace EventStore.Persistence.AcceptanceTests.Engines { using MongoPersistence; using Serialization; public class AcceptanceTestMongoPersistenceFactory : MongoPersistenceFactory { public AcceptanceTestMongoPersistenceFactory() : base("Mongo", new NullDocumentSerializer()) { } protected overrid...
```c# namespace EventStore.Persistence.AcceptanceTests.Engines { using MongoPersistence; using Serialization; public class AcceptanceTestMongoPersistenceFactory : MongoPersistenceFactory { public AcceptanceTestMongoPersistenceFactory() : base("Mongo", new DocumentObjectSerializer()) { } protected overr...
3c191438-21c3-482f-8aa8-d20c7700dc30
{ "language": "C#" }
```c# ``` Add Prepend and Append extension methods
```c# // Copyright 2018 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; namespace Nuke.Common.Utilities { public static partial class StringExtension...
e80a2446-e1b1-4820-b00f-1f8f2c33dc67
{ "language": "C#" }
```c# ``` Add handwritten code for Operation.ToLroResponse()
```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...
25689119-139a-4e13-b065-da38309de4ab
{ "language": "C#" }
```c# ``` Add what's that song script
```c# var robot = Require<Robot>(); var baseUri = robot.GetConfigVariable("MMBOT_PLAYME_URL"); if(baseUri != null && !baseUri.EndsWith("/")){ baseUri = baseUri + "/"; } robot.Respond(@"what'?s that song\??", msg => { msg.Http(baseUri + "Queue/CurrentTrack") .GetJson((err, res, body) => { try...
a60518d8-6198-425a-b487-a66be381f53e
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Configuration; using System.Globalization; using System.Linq; using System.Net; using System.Text; using System.Web; namespace SimpleWAWS.Authentication { public class GoogleAuthProvider : BaseOpenIdConnectAuthProvider { public overrid...
```c# using System; using System.Collections.Generic; using System.Configuration; using System.Globalization; using System.Linq; using System.Net; using System.Text; using System.Web; namespace SimpleWAWS.Authentication { public class GoogleAuthProvider : BaseOpenIdConnectAuthProvider { public overrid...
465cb358-ad3e-4912-89c5-b4299e4def73
{ "language": "C#" }
```c# using FluentMigrator; namespace Abp.Modules.Core.Data.Migrations.V20130824 { [Migration(2013082402)] public class _02_CreateAbpUsersTable : Migration { public override void Up() { Create.Table("AbpUsers") .WithColumn("Id").AsInt32().NotNullable().PrimaryKe...
```c# using FluentMigrator; namespace Abp.Modules.Core.Data.Migrations.V20130824 { [Migration(2013082402)] public class _02_CreateAbpUsersTable : Migration { public override void Up() { Create.Table("AbpUsers") .WithColumn("Id").AsInt32().NotNullable().PrimaryKe...
4c9cfdb7-aff3-41b0-870d-5ccd83f408b6
{ "language": "C#" }
```c# ``` Copy test helper from main project
```c# namespace AngleSharp.Core.Tests { using NUnit.Framework; using System; using System.IO; using System.Net.NetworkInformation; /// <summary> /// Small (but quite useable) code to enable / disable some /// test(s) depending on the current network status. /// Taken from /// http:...
4856439b-417b-40e1-bc81-348c51cb1981
{ "language": "C#" }
```c# ``` Add file with DynamicTimeWarping.onDeserialized to source contol
```c# // Accord Statistics Library // The Accord.NET Framework // http://accord-framework.net // // Copyright © César Souza, 2009-2015 // cesarsouza at gmail.com // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as publ...
de22eac1-1e9d-405c-abd3-faacee88231e
{ "language": "C#" }
```c# ``` Add unit test for CreateExtractJobOptions
```c# // Copyright 2017 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 ...
a169754b-f5bd-4f00-822f-c4e1bbbd38db
{ "language": "C#" }
```c# ``` Move ExeptionMessages to StaticData folder
```c# namespace BashSoft.Exceptions { public static class ExceptionMessages { public const string DataAlreadyInitialisedException = "Data is already initialized!"; public const string DataNotInitializedExceptionMessage = "The data structure must be initialised first in order to make any ...
30ed0f17-3155-4d01-b58d-35743a915202
{ "language": "C#" }
```c# ``` Add base class for all human actors
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ElectronicCash { public abstract class BaseActor { public string Name { get; set; } public Guid ActorGuid { get; set; } } } ```
15176e75-1faa-4d31-8c3e-f8b368d23b6e
{ "language": "C#" }
```c# using System; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Windows.Threading; using System.Windows.Media.Media3D; using VrPlayer.Contracts.Trackers; using VrPlayer.Helpers; using OpenTK; namespace VrPlayer.Trackers.OculusRiftTracker { [DataContract] ...
```c# using System; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Windows.Threading; using System.Windows.Media.Media3D; using VrPlayer.Contracts.Trackers; using VrPlayer.Helpers; using OpenTK; using System.Windows.Media; namespace VrPlayer.Trackers.OculusRiftTracker...
5642213d-f40a-46cb-b8ce-db4446870acf
{ "language": "C#" }
```c# ``` Add new unit Tests for BasicBlocks
```c# using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NUnit.Tests.Middle_End { [TestFixture] public class BasicBlockTests { [Test] public void TestMethod() { // TODO: Ad...
3efb9250-153a-44b4-a57e-99fbf153c322
{ "language": "C#" }
```c# ``` Add first pass of function (mostly already done via linqpad script)
```c# using System.Net; public static async Task<HttpResponseMessage> Run(HttpRequestMessage req) { try { //log.Info("Going to find an art idea..."); var idea = FindRandomArtIdea(); //log.Info($"Found the idea \"{idea}\""); return req.CreateResponse(HttpStatus...
7a1b1234-e6a1-4619-b11a-b42c0f9d87ba
{ "language": "C#" }
```c# ``` Add missing unit test file.
```c# using NUnit.Framework; using System; using Symbooglix; using Microsoft.Boogie; using Microsoft.Basetypes; namespace ConstantFoldingTests { [TestFixture()] public class FoldBVor : TestBase { [Test()] public void AllOnes() { helper(5, 10, 15); } [Te...
d8829f51-21af-42e6-817b-47950ebc805f
{ "language": "C#" }
```c# ``` Update server side API for single multiple answer question
```c# using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.Models.Question; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api/question")] public class QuestionsController : Controller { private readonly IQuestionRepos...
1af81935-ab30-46c0-b29a-1d765e19ecde
{ "language": "C#" }
```c# ``` Read initialize properties of config file
```c# using System; using System.Collections.Generic; using System.IO; using Newtonsoft.Json; using FuzzyCore.Server; namespace FuzzyCore.Initialize { public class ConfigReader { public string ConfigFile_Path = "./config.json"; public string ConfigFile_Content = ""; bool ConfigFile_Con...
75c9e42e-fa0b-4b94-b552-c975291e6eb4
{ "language": "C#" }
```c# ``` Compress array in intervals of consecutive elements
```c# // http://careercup.com/question?id=5693954190213120 // // Given an ordered array, find segments // using System; using System.Collections.Generic; using System.Linq; static class Program { static IEnumerable<int[]> Segment(this int[] array) { int n = array.Length; int start = array[0]; ...
825f73c1-5c27-4839-bfd1-86f5376be136
{ "language": "C#" }
```c# ``` Add - Inizio implementazione evento trasferimento chiamata
```c# using SO115App.API.Models.Classi.Soccorso; using SO115App.API.Models.Classi.Soccorso.Eventi; using System; namespace SO115App.Models.Classi.Soccorso.Eventi { public class TrasferimentoChiamata : Evento { public TrasferimentoChiamata(RichiestaAssistenza richiesta, DateTime istante, string codiceF...
46ec8dd0-7fe6-4ae9-8d12-491c9dabaa89
{ "language": "C#" }
```c# ``` Add container struct for search index values.
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SourceBrowser.Search.ViewModels { public struct TokenViewModel { public string DocumentId { get; } public string FullName { get; } public int LineNumber {...
a178afc0-f763-4a66-b676-839f5e351c16
{ "language": "C#" }
```c# ``` Add a boring wrapper around Engine since it's sealed
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Tools.WindowsInstallerXml.Bootstrapper; namespace Shimmer.WiXUi { public interface IEngine { Engine.Variables<long> NumericVariables { get; } int PackageCount { get; } Engine.Var...
e9c90d11-184a-4bd3-8bf6-51cf3889a23a
{ "language": "C#" }
```c# ``` Fix for using two kinds of RssMonitor objects.
```c# /* ------------------------------------------------------------------------- */ // // Copyright (c) 2010 CubeSoft, 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...
e5f35ac9-c702-4417-a885-c05ba9c15ea2
{ "language": "C#" }
```c# ``` Add test to show a handler is instantiated twice, when using a pipeline
```c# using Microsoft.Extensions.DependencyInjection; namespace MediatR.Extensions.Microsoft.DependencyInjection.Tests { using System.Reflection; using System.Threading.Tasks; using Shouldly; using Xunit; public class PipelineMultiCallToConstructorTests { public class ConstructorTestB...
3b1ef8f0-7ac5-437d-9109-ecfa6fca72ab
{ "language": "C#" }
```c# ``` Add temporary extension for bridging osuTK
```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 TKVector2 = osuTK.Vector2; using SNVector2 = System.Numerics.Vector2; namespace osu.Framework.Extensions { /// <summary> /// Temporary extension func...
b8a36f2e-3334-4acb-a732-08305360fe16
{ "language": "C#" }
```c# ``` Move class to final location
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Game.Conf...
d16b8040-2281-47b3-b5ce-884218bcc526
{ "language": "C#" }
```c# ``` Test program for using new RDF wrapper classes
```c# /* -*- Mode: csharp; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */ /*************************************************************************** * SimpleLookupTest.cs * * Copyright (C) 2005 Novell * Written by Aaron Bockover (aaron@aaronbock.net) **********************************************...
c3290afc-b8d7-4535-9cfa-a865e3c15529
{ "language": "C#" }
```c# using System; using Toggl.Phoebe.Data.DataObjects; namespace Toggl.Phoebe.Data { public static class DataExtensions { /// <summary> /// Checks if the two objects share the same type and primary key. /// </summary> /// <param name="data">Data object.</param> /// <p...
```c# using System; using System.Collections.Generic; using Toggl.Phoebe.Data.DataObjects; namespace Toggl.Phoebe.Data { public static class DataExtensions { /// <summary> /// Checks if the two objects share the same type and primary key. /// </summary> /// <param name="data">D...
84507cef-ada8-47d8-9486-58f05794ed8e
{ "language": "C#" }
```c# ``` Create implementation for Inspectors InspectorStartup
```c# using System.Collections.Generic; namespace Glimpse.Agent.Web { public class InspectorsInspectorStartup : IInspectorStartup { private readonly IEnumerable<IInspector> _inspectors; public InspectorsInspectorStartup(IInspectorProvider inspectorProvider) { _inspectors =...
51d45444-a2ba-42c0-97ff-af674c07bcaa
{ "language": "C#" }
```c# ``` Add example for When failing
```c# using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using Xunit; using Xunit.ScenarioReporting; namespace Examples { public class FailingWhen { [Fact] public Task<ScenarioRunResult> ShouldFail() { return new TestRunner().Ru...
60825cd8-ba03-4331-b0e5-2e4ab0c13374
{ "language": "C#" }
```c# ``` Create missing train describer context factory
```c# using System.Data.Entity.Infrastructure; using RailDataEngine.Data.Common; namespace RailDataEngine.Data.TrainDescriber { public class TrainDescriberContextFactory : IDbContextFactory<TrainDescriberContext> { public TrainDescriberContext Create() { ITrainDescriberDatabase db ...
dc33ebf4-6bc8-4eea-92e8-973450fb1bde
{ "language": "C#" }
```c# ``` Add basic testing of new beatmaps persistence
```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.Rulesets; using osu.Game.Rulesets.Osu; using osu.Game.Storyboards; namespace osu.Game.Tests.Visual.E...
1facea8f-0c33-43e5-99a7-d2a7de1ea6e2
{ "language": "C#" }
```c# ``` Add unit tests for binary search and sorting methods.
```c# using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text; using Xunit; namespace WalletWasabi.Tests.UnitTests { public class ListExtensionTests { [Fact] public void InsertSorted_Orders_Items_Correctly () { var actual = new List<int>(); actual.InsertS...
c7a202a3-29ea-404e-a204-f48f4c01cc38
{ "language": "C#" }
```c# using System; using System.Security.Principal; using Csla.Serialization; using System.Collections.Generic; using Csla.Core.FieldManager; using System.Runtime.Serialization; using Csla.Core; namespace Csla.Security { public abstract partial class CslaIdentity : ReadOnlyBase<CslaIdentity>, IIdentity ...
```c# using System; using System.Security.Principal; using Csla.Serialization; using System.Collections.Generic; using Csla.Core.FieldManager; using System.Runtime.Serialization; using Csla.Core; namespace Csla.Security { public abstract partial class CslaIdentity : ReadOnlyBase<CslaIdentity>, IIdentity ...
0ffb4b13-39e3-4519-b462-5a22dee63aa6
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using Algorithms.Common; namespace Algorithms.Sorting { public static class CountingSorter { public static void CountingSort(this int[] array) { if (array == null || array.Length == 0) return; // ...
```c# using System; using System.Collections.Generic; using Algorithms.Common; namespace Algorithms.Sorting { public static class CountingSorter { public static void CountingSort(this IList<int> collection) { if (collection == null || collection.Count == 0) return;...
8a137216-e3a4-4f7c-993e-aad1ae5237c8
{ "language": "C#" }
```c# ``` Add codex for mater messages
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Apex7000_BillValidator { class MasterCodex { internal enum MasterMessage : int { // Byte0 - bit 0 Accept1 = 1 << 0, Accept2 = 1 << 1, ...
cb4be33a-c923-4fcb-84be-d9ef1ca57d17
{ "language": "C#" }
```c# using System; using System.Collections.Generic; namespace Csla.Validation { internal class RulesList { private List<IRuleMethod> _list = new List<IRuleMethod>(); private bool _sorted; private List<string> _dependantProperties; public void Add(IRuleMethod item) { _list.Add(item); ...
```c# using System; using System.Collections.Generic; namespace Csla.Validation { internal class RulesList { private List<IRuleMethod> _list = new List<IRuleMethod>(); private bool _sorted; private List<string> _dependantProperties; public void Add(IRuleMethod item) { _list.Add(item); ...
f27b0aab-102c-4639-9166-56bd1deaa457
{ "language": "C#" }
```c# ``` Add enumeration for deep linking types
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace umbraco.cms.helpers { public enum DeepLinkType { Template, DocumentType, Content, Media, MediaType, XSLT, RazorScript, Css, ...
8b4c6c0e-8ffd-44e2-9a6d-03fcab029c6a
{ "language": "C#" }
```c# ``` Add back missing 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 System; using System.Collections.Generic; using System.ComponentModel; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Grap...
9e6716f2-9d83-42e6-ae50-24d4925a781e
{ "language": "C#" }
```c# ``` Add Extension Methods class that was not added in previous commit.
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SKGL { public static class ExtensionMethods { public static bool IsValid(this KeyInformation keyInformation ) { if(keyInformation != null) { return true...
2f0ce8e2-f59d-46e9-9dec-ca8864c7946c
{ "language": "C#" }
```c# ``` Add automapping override for account entity
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using FluentNHibernate.Automapping; using FluentNHibernate.Automapping.Alterations; using FluentNHibernate.Mapping; using MiTrello.Domain.Entities; namespace MiniTrello.Data.AutoMappingOverride { ...
f6578933-dbed-485d-a378-8f2d2e74875c
{ "language": "C#" }
```c# ``` Add Passing and Failing Async Function Tests
```c# using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using Microsoft.VisualStudio.TestTools.UnitTesting; using NiL.JS.BaseLibrary; using NiL.JS.Core; using NiL.JS.Extensions; namespace FunctionalTests { [TestClass] public class AsyncFunctionTests { ...
a5c255a6-47b9-4613-9710-d9c1b0dbfa0d
{ "language": "C#" }
```c# ``` Add integration test for single and multiple common_words
```c# using System; using System.Linq; using Elasticsearch.Net; using FluentAssertions; using Nest; using Tests.Framework; using Tests.Framework.ManagedElasticsearch.Clusters; using Tests.Framework.MockData; using Xunit; namespace Tests.Reproduce { public class GithubIssue2886 : IClusterFixture<WritableCluster> { ...
c265c6bb-10a6-42be-a0dd-6870c7b694b5
{ "language": "C#" }
```c# ``` Test file 'Value Controller' added
```c# using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace CloudBread_Admin_Web.Controllers { public class ValuesController : ApiController { // GET api/values public IEnumerable<string> Get() { ...
560413a1-1b33-44c1-9043-51f1fabe32c8
{ "language": "C#" }
```c# ``` Add missing file to VC
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Nett { internal class TomlComment { public string CommentText { get; private set; } public CommentLocation Location { get; private set; } public TomlComment(string commentText, Commen...
6fd00016-7930-4393-b4ba-2b1a7caca68d
{ "language": "C#" }
```c# ``` Add a common object to provide wall locking.
```c# using System; using System.Threading; using System.Threading.Tasks; namespace KafkaNet.Common { public class ThreadWall { private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); public void Block() { _semaphore.Wait(); } public void Rele...
aaa03199-49b8-4e6a-9d2d-6643e19c0d47
{ "language": "C#" }
```c# ``` Add visual tests for `Filter`
```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 ManagedBass.Fx; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Graphics; using osu.Game.Audio.Effects; ...
3d9111f6-cfd3-495c-ba64-b485f9dce59e
{ "language": "C#" }
```c# ``` Add test for interface derived classes
```c# using NUnit.Framework; using Python.Runtime; namespace Python.EmbeddingTest { public class TestInterfaceClasses { public string testCode = @" from clr import AddReference AddReference(""System"") AddReference(""Python.EmbeddingTest"") from Python.EmbeddingTest import * testModule = TestInterface...
4aec1915-690a-49a1-9a88-564c5d548ebb
{ "language": "C#" }
```c# ``` Add test coverage of `SubmittableScore` serialisation to (roughly) match spec
```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 Newtonsoft.Json; using NUnit.Framework; using osu.Game.IO.Serialization; using osu.Game.Online.Solo; using osu.Game.Tests.Resources; namespace osu.Game.Tests...
c6a52645-bc9c-424d-8082-a272ff479b5a
{ "language": "C#" }
```c# ``` Add failing test case for player sending wrong ruleset ID to spectator server
```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.Game.Online.API; using osu.Game.Online.Spectator; using osu.Game.Rulesets; using osu.Game.Rulesets....
91b9e6b8-5a47-4e98-9c4e-ffbb81920cdb
{ "language": "C#" }
```c# ``` Add shell sort implementation in csharp
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace shellsort { public class ShellSort { private readonly int[] _array; public ShellSort(int[] array) { this._array = array; } p...
d64d3bba-8aa1-4f31-a9d8-410c36d5e5db
{ "language": "C#" }
```c# ``` Test file updated to latest base namespace
```c# namespace Corale.Colore.Tests { using System; using NUnit.Framework; [TestFixture] public class ColoreExceptionTests { [Test] public void ShouldSetMessage() { const string Expected = "Test message."; Assert.AreEqual(Expected, new ColoreExcepti...
f12a137e-3d6f-435d-9297-de1188011b30
{ "language": "C#" }
```c# ``` Add a few tests for F.Range
```c# using System.Collections; using System.Collections.Generic; using System.Linq; using Xunit; namespace CSharp.Functional.Tests { public class RangeTests { [Theory] [InlineData(0, 1)] public void RangeProvidesAnIEnumerable(int start, int end) { var result = F.Ra...
4bbb9fb7-e9d0-4b03-830e-67a24c4f6db0
{ "language": "C#" }
```c# ``` Split some methods off into a private class.
```c# using Microsoft.AspNet.SignalR; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using VJoyWrapper; namespace WebsocketGamepad { public partial class PhoneHub : Hub { p...
f02368b8-88b6-4011-b0d2-aa2c3a889ad9
{ "language": "C#" }
```c# ``` Add benchmark coverage of mod retrieval
```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 BenchmarkDotNet.Attributes; using osu.Game.Online.API; using osu.Game.Rulesets.Osu; namespace osu.Game.Benchmarks { public class BenchmarkRuleset : Bench...
6ebf6f04-8692-4b50-9944-2cbaaeaf797a
{ "language": "C#" }
```c# ``` Add Entity Framework job storage tests
```c# using System; using Hangfire.EntityFramework.Utils; using Xunit; namespace Hangfire.EntityFramework { public class EntityFrameworkJobStorageTests { private EntityFrameworkJobStorageOptions Options; public EntityFrameworkJobStorageTests() { Options = new EntityFramewo...
c266b843-507a-4937-be56-540b90167c9a
{ "language": "C#" }
```c# ``` Add platform specified root exception class
```c# using System; using System.Runtime.Serialization; namespace Xemi.Core { public class XemiException:Exception { public XemiException() { } public XemiException(string message) : base(message) { } public XemiException(string messageFormat, pa...
fc49d862-3f80-4d14-8392-56ab1afbea79
{ "language": "C#" }
```c# ``` Add a integration test to verify we can retrieve the current profile from the ProfileClient
```c# using Mollie.Api.Models.Profile.Response; using Mollie.Tests.Integration.Framework; using NUnit.Framework; using System.Threading.Tasks; namespace Mollie.Tests.Integration.Api { [TestFixture] public class ProfileTests : BaseMollieApiTestClass { [Test] public async Task GetCurrentProfileA...
45074b66-d655-4892-b1d9-920b37d88f37
{ "language": "C#" }
```c# ``` Add a convenience method for converting transform positions to gui positions
```c# using UnityEngine; using System.Collections; public class TransformToGuiFinder { public static Vector2 Find(Transform target) { var position = Camera.main.WorldToScreenPoint(target.position); position.y = Screen.height - position.y; return position; } } ```
f6216511-2a51-4f56-8cb8-0439745320c7
{ "language": "C#" }
```c# ``` Add missing file and other changes.
```c# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Canon.Eos.Framework.Eventing { public class EosExceptionEventArgs : EventArgs { public Exception Exception { get; internal set; } } } ```
7387b339-664d-4922-96f5-588b86ab8d1a
{ "language": "C#" }
```c# using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("mustache-sharp")] [assembly: AssemblyDescription("A extension of the mustache text template engine for .NET.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyC...
```c# using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("mustache-sharp")] [assembly: AssemblyDescription("A extension of the mustache text template engine for .NET.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyC...
e7916316-ad39-4b85-b226-bd77851cfe08
{ "language": "C#" }
```c# ``` Add benchmark for hashing extensions
```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.IO; using BenchmarkDotNet.Attributes; using osu.Framework.Extensions; namespace osu.Framework.Benchmarks { [MemoryDiagnoser] pu...
dcff9722-03a2-40b0-bb13-f5fdf38fdbcd
{ "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.Collections.Generic; using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysi...
```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.Collections.Generic; using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysi...
e51e95e6-a661-4cbd-ba50-07af9aa34b79
{ "language": "C#" }
```c# ``` Add interface to handle local beatmap presentation logic
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Beatmaps; using osu.Game.Rulesets; namespace osu.Game.Screens { /// <summary> /// Denotes a screen which can handle beatmap / ruleset select...
0387c190-9fa3-4d01-bd8e-e48a2ae5180f
{ "language": "C#" }
```c# ``` Add an Uri extension to work with Uri scheme.
```c# using System; using System.Text.RegularExpressions; using Microsoft.Win32; namespace SteamFriendsManager.Utility { public static class UriExtension { public static bool CheckSchemeExistance(this Uri uri) { var schemeKey = Registry.ClassesRoot.OpenSubKey(uri.Scheme); ...
498141c1-9df7-42a8-9bcc-e4519c6a9ffc
{ "language": "C#" }
```c# ``` Add prefix module to get or set the current prefix
```c# using System.Threading.Tasks; using Discord; using Discord.Commands; using SoraBot.Common.Extensions.Modules; using SoraBot.Services.Guilds; namespace SoraBot.Bot.Modules { [Name("Prefix")] [Summary("Commands to get and set the prefix inside a Guild")] public class PrefixModule : SoraSocketCommandMo...
f02b051c-bf71-4911-907f-d5f00f78dbc4
{ "language": "C#" }
```c# ``` Create root entry point for SystemWeb
```c# #if SystemWeb using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; namespace Glimpse { public static class Glimpse { public static IServiceCollection Start() { return Start(null); ...
663f7338-5e60-4304-98bc-8ef5bfbbb886
{ "language": "C#" }
```c# ``` Add basic structure for hex colour picker part
```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.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; namespace osu.Framework.Graphics.UserInterface { p...
18499917-add9-48ce-8dd0-a0a049010f28
{ "language": "C#" }
```c# ``` Add very basic TestGetRootPartPosition() test
```c# /* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * * 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 ...
7c87cb36-045f-4c31-b8ae-af299c459e9e
{ "language": "C#" }
```c# namespace FakeItEasy.Tools { using System; using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using Octokit; public static class ReleaseHelpers { public static ICollection<int> GetIssueNumbersReferencedFromReleases(IEn...
```c# namespace FakeItEasy.Tools { using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using Octokit; public static class ReleaseHelpers { public static ICollection<int> GetIssueNumbersReferencedFromReleases(IEnumerable<Release> r...
8207d9d9-ecdc-404b-b374-2d8461fcf277
{ "language": "C#" }
```c# ``` Add ability to run evaluation tests
```c# using System; using Xunit; namespace NQuery.Tests.Evaluation { public class EvaluationTest { protected void AssertProduces<T>(string text, T[] expected) { var expectedColumns = new[] { typeof(T) }; var expectedRows = new object[expected.Length][]; for ...
a390eec0-b69b-49ef-8385-ae3256bff8cb
{ "language": "C#" }
```c# ``` Add mouse tint debug component
```c# using System; using System.Collections.Generic; using System.Text; using SadConsole.Input; using SadRogue.Primitives; namespace SadConsole.Components { /// <summary> /// Tints a surface when that surface would use the mouse. Helps debug which object is receiving mouse input as you move the mouse around....
8781c8b2-458f-4350-a222-25492438162e
{ "language": "C#" }
```c# ``` Add utils class which holds temporary linking info between user-device.
```c# using A2BBAPI.Models; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace A2BBAPI.Utils { /// <summary> /// Class holding info for device linking. /// </summary> public class LinkHolder { #region Public properties /// <su...
558b3407-2c49-428b-9b58-9f0fe6ebe957
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; namespace ExpressionToCodeLib { [Obsolete( "This class is *not* the base class of all assertion violation exceptions - don't rely on it! It will be removed in version 2." ), Seria...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; namespace ExpressionToCodeLib { [Serializable] sealed class AssertFailedException : Exception { public AssertFailedException(string message) : base(message) { } ...
7f368f1f-0796-464e-81c5-6a9250f41e79
{ "language": "C#" }
```c# ``` Add content media type tests
```c# using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; using Porthor.Models; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Xuni...
a3e51a10-c566-4fdd-b8c3-5a719b6a42d0
{ "language": "C#" }
```c# ``` Add class for fixed point data
```c# using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LBD2OBJ.Types { class FixedPoint { public int IntegralPart { get; set; } public int DecimalPart { get; set; } public FixedPoint(byte[] data) { if ...
204a9cde-ea45-473f-a7fd-e10065846bd5
{ "language": "C#" }
```c# ``` Add presenter for asmdef occurrences
```c# using System.Drawing; using JetBrains.Application.UI.Controls.JetPopupMenu; using JetBrains.Diagnostics; using JetBrains.ProjectModel; using JetBrains.ReSharper.Feature.Services.Occurrences; using JetBrains.ReSharper.Feature.Services.Presentation; using JetBrains.ReSharper.Plugins.Unity.AsmDef.Psi.Caches; using J...
e263856b-89ba-4f66-a414-f3738f67cce3
{ "language": "C#" }
```c# ``` Add web response status handling
```c# using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; namespace Recipe.Web { public enum ResponseCategories { Unknown, Informational, Success, Redirected, ClientError, ServerEr...
5db80af1-a8cf-410a-9bd2-ff9d8c741777
{ "language": "C#" }
```c# using Glimpse.Core2.Extensibility; namespace Glimpse.Core2.ClientScript { public class Metadata:IDynamicClientScript { public ScriptOrder Order { get { return ScriptOrder.IncludeAfterClientInterfaceScript; } } public string GetResourceName() { ...
```c# using Glimpse.Core2.Extensibility; namespace Glimpse.Core2.ClientScript { public class Metadata:IDynamicClientScript { public ScriptOrder Order { get { return ScriptOrder.RequestMetadataScript; } } public string GetResourceName() { return ...
672b83d7-0e6d-4e2a-abc9-fe1b6c5b93c3
{ "language": "C#" }
```c# ``` Add the ability to scoot the camera
```c# using System.Collections; using System.Collections.Generic; using UnityEngine; public class MainCamera : MonoBehaviour { public GameObject cursor; private IEnumerator currentMove; // Use this for initialization void Start () { } // Update is called once per frame void Update () { //this.transfor...
3ef934cb-480c-4c48-b715-fead7af46087
{ "language": "C#" }
```c# ``` Add component for unstable rate statistic
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using System.Linq; using osu.Game.Rulesets.Scoring; namespace osu.Game.Screens.Ranking.Statistics { /// <summar...
56a946a6-7ef7-48aa-9bbb-d6c5d03ab7bf
{ "language": "C#" }
```c# ``` Add regression test for checking scene close when SceneManager is asked to close
```c# /* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * * 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 ...
7930ebd5-e2dc-411c-bf4a-36ee47657a19
{ "language": "C#" }
```c# ``` Add test coverage for failing scenario
```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.IO.Stores; using osu.Framework.Tests.Visual; namespace osu.Framework.Tests.IO { public...
b0fb6767-3e16-4f1b-9a73-fd102bb907bb
{ "language": "C#" }
```c# ``` Add some tests for ErgastClient
```c# using System; using System.Threading.Tasks; using ErgastApi.Client; using ErgastApi.Client.Caching; using ErgastApi.Requests; using ErgastApi.Responses; using FluentAssertions; using NSubstitute; using Xunit; namespace ErgastApi.Tests.Client { public class ErgastClientTests { private ErgastClien...
b0fb1d1d-c53c-4f1d-b737-d85ccd1d6f3c
{ "language": "C#" }
```c# ``` Add utility class for Xml-related tasks
```c# #region License /* Copyright (c) 2017 Wes Hampson * * 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, m...
6fdbe798-603d-49f0-8aa5-a392452fe777
{ "language": "C#" }
```c# using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using Bonobo.Git.Server.Models; using Microsoft.Practices.Unity; using System.Web; using Microsoft.Owin.Security.WsFederation; using Microsoft.Owin.Security.Cookies; using Owin; namespace Bonobo.Git.Server.Securit...
```c# using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using Bonobo.Git.Server.Models; using Microsoft.Practices.Unity; using Owin; namespace Bonobo.Git.Server.Security { public abstract class AuthenticationProvider : IAuthenticationProvider { [Depend...
1392ab71-c063-4959-9492-ab40e59c8d39
{ "language": "C#" }
```c# ``` Add joint trigger (OnJointBreak() + OnJointBreak2D())
```c# using System; // require keep for Windows Universal App using UnityEngine; namespace UniRx.Triggers { [DisallowMultipleComponent] public class ObservableJointTrigger : ObservableTriggerBase { Subject<float> onJointBreak; void OnJointBreak(float breakForce) { if (...
1b08f290-478b-4839-9763-04a5acca8184
{ "language": "C#" }
```c# ``` Add extensions to byte for getting a value from the first or last n bits of said byte.
```c# using System; namespace mcThings.Extensions { public static class ByteExtensions { public static byte ReadFirstNBits(this byte value, byte n) { if (n > 8) throw new ArgumentException($"{nameof(n)} cannot be greater than 8.", nameof(n)); return (by...
bda2cb4a-5fb3-4dcc-9bd9-22145e0aad55
{ "language": "C#" }
```c# ``` Add a compilation unit type that represents a parse tree from a specific file.
```c# using slang.AST; namespace slang.Compilation { public class CompilationUnit { public CompilationUnit (string sourceFilename, ProgramNode root) { SourceFile = sourceFilename; Root = root; } public string SourceFile { get; set; } public Pro...
2a918c12-8482-4706-bae0-03d00e612be8
{ "language": "C#" }
```c# ``` Add a component super class
```c# // Component.cs // <copyright file="Component.cs"> This code is protected under the MIT License. </copyright> using System.Collections.Generic; namespace EnigmaUtilities.Components { /// <summary> /// An abstract super class for each component in the enigma machine. /// </summary> public abstrac...
0e9497cb-bc75-48f7-bbc0-f1c7cc0e62f0
{ "language": "C#" }
```c# ``` Add structure for legacy hit explosions
```c# // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Game.Rulesets.UI.Scroll...
3e04232b-3da9-48ce-bf66-9836d0556fa7
{ "language": "C#" }
```c# ``` Remove unban timer on actual unban event
```c# using DSharpPlus.EventArgs; using ModCore.Entities; using ModCore.Logic; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ModCore.Listeners { public class UnbanTimerRemove { [AsyncListener(EventTypes.GuildBanRemoved)] ...
8aa348aa-94d5-43fc-9b78-4d001a61e18b
{ "language": "C#" }
```c# ``` Move string extensions to own file
```c# namespace MediaFileParser.MediaTypes.MediaFile.Junk { /// <summary> /// Junk String Extensions Class /// </summary> public static class JunkStringExtensions { /// <summary> /// Determines whether the beginning of this string instance matches a specified JunkString. ///...
27a2ff7c-2395-4b03-b2df-3b153c573299
{ "language": "C#" }
```c# ``` Add Retry Test(not done yet)
```c# using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Unosquare.Swan.Components; using Unosquare.Swan.Networking; namespace Unosquare.Swan.Test { [TestFixture] public class ComponentsRetryTest { private static int count ...