Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Refactor the arrange part of the test
using Cafe.Tab; using Edument.CQRS; using Events.Cafe; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WebFrontend; namespace CafeTests { [TestFixture] public class AddingEventHandlers { [Test] ...
using Cafe.Tab; using Edument.CQRS; using Events.Cafe; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WebFrontend; namespace CafeTests { [TestFixture] public class AddingEventHandlers { private static...
Create negative test for getting values from nested environments
using Xunit; using Squirrel; using Squirrel.Nodes; namespace Tests { public class EnvironmentTests { private static readonly string TestVariableName = "x"; private static readonly INode TestVariableValue = new IntegerNode(1); [Fact] public void TestGetValueFromCurrentEnvironmen...
using Xunit; using Squirrel; using Squirrel.Nodes; namespace Tests { public class EnvironmentTests { private static readonly string TestVariableName = "x"; private static readonly INode TestVariableValue = new IntegerNode(1); [Fact] public void TestCanGetValueFromCurrentEnviron...
Reset stopwatch on Start instead of Pause
using MongoDB.Bson.Serialization.Attributes; using System.Diagnostics; namespace ChessVariantsTraining.Models.Variant960 { public class Clock { Stopwatch stopwatch; [BsonElement("secondsLeftAfterLatestMove")] public double SecondsLeftAfterLatestMove { get; ...
using MongoDB.Bson.Serialization.Attributes; using System.Diagnostics; namespace ChessVariantsTraining.Models.Variant960 { public class Clock { Stopwatch stopwatch; [BsonElement("secondsLeftAfterLatestMove")] public double SecondsLeftAfterLatestMove { get; ...
Add VariableParser to the main parser
using NBi.GenbiL.Action; using Sprache; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.GenbiL.Parser { class Action { public readonly static Parser<IAction> Parser = ( from sentence in Case.Parse...
using NBi.GenbiL.Action; using Sprache; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.GenbiL.Parser { class Action { public readonly static Parser<IAction> Parser = ( from sentence in Case.Parse...
Fix a http request issues.
using System; using System.IO; using System.Net; using System.Text; using Wox.Plugin; namespace Wox.Infrastructure.Http { public class HttpRequest { public static string Get(string url, string encoding = "UTF8") { return Get(url, encoding, HttpProxy.Instance); } pr...
using System; using System.IO; using System.Net; using System.Text; using Wox.Plugin; namespace Wox.Infrastructure.Http { public class HttpRequest { public static string Get(string url, string encoding = "UTF-8") { return Get(url, encoding, HttpProxy.Instance); } p...
Add trace to check effective bug
using Microsoft.SqlServer.Management.Smo; using System; using System.Collections.Generic; using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.Core.Batch.SqlServer { class BatchRunCommand : IDecorationCommandImplementation ...
using Microsoft.SqlServer.Management.Smo; using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.Core.Batch.SqlServer { class BatchRunCommand : IDecoration...
Fix songselect blur potentially never being applied
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Transforms; using osu.Game.Graphics.Backgrounds; using osuTK; namespace osu.Game.Screens { public abstrac...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Transforms; using osu.Game.Graphics.Backgrounds; using osuTK; namespace osu.Game.Screens { public abstrac...
Reformat code in metdata provider
using System; using DbLocalizationProvider.Internal; namespace DbLocalizationProvider.DataAnnotations { internal class ModelMetadataLocalizationHelper { internal static string GetTranslation(string resourceKey) { var result = resourceKey; if(!ConfigurationContext.Current...
using System; using DbLocalizationProvider.Internal; namespace DbLocalizationProvider.DataAnnotations { internal class ModelMetadataLocalizationHelper { internal static string GetTranslation(string resourceKey) { var result = resourceKey; if(!ConfigurationContext.Current...
Make the delegate test more challenging
using System; public delegate int IntMap(int x); public static class Program { private static int Apply(IntMap f, int x) { return f(x); } private static int Square(int x) { return x * x; } public static void Main() { Console.WriteLine(Apply(Square, 10)); }...
using System; public delegate T2 Map<T1, T2>(T1 x); public static class Program { private static int Apply(Map<int, int> f, int x) { return f(x); } private static int Square(int x) { return x * x; } public static void Main() { Console.WriteLine(Apply(Square, 1...
Update company name and copyright.
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("pos...
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("pos...
Print in reversed order method
namespace LinkedListInOrderInsertion { using System; using System.Collections.Generic; public class LinkedList { private Element Head = null; private Element Iterator = new Element(); internal void Add(int value) { Element insertedElement = new Element { V...
namespace LinkedListInOrderInsertion { using System; using System.Collections.Generic; public class LinkedList { private Element Head = null; private Element Iterator = new Element(); internal void Add(int value) { Element insertedElement = new Element { V...
Add extension methods to run guaranteed synchronous disposal
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Framework.Graphics { /// <summary> /// Holds extension methods for <see cref="Drawable"/>. /// </summary> public static class...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Development; using osu.Framework.Graphics.Containers; namespace osu.Framework.Graphics { /// <summary> /// Holds extension meth...
Add english as well as german
// WhistTest.cs // <copyright file="WhistTest.cs"> This code is protected under the MIT License. </copyright> using System; using CardGames.Whist; namespace ConsoleTesting { /// <summary> /// The whist test class /// </summary> public class WhistTest : IGameTest { /// <summary>...
// WhistTest.cs // <copyright file="WhistTest.cs"> This code is protected under the MIT License. </copyright> using System; using CardGames.Whist; namespace ConsoleTesting { /// <summary> /// The whist test class /// </summary> public class WhistTest : IGameTest { /// <summary>...
Update sentry to send data necessary for linking events with users
using System; using System.Collections.Generic; using osu_StreamCompanion.Code.Helpers; using Sentry; using StreamCompanionTypes.Enums; using StreamCompanionTypes.Interfaces.Services; namespace osu_StreamCompanion.Code.Core.Loggers { public class SentryLogger : IContextAwareLogger { public static stri...
using System; using System.Collections.Generic; using osu_StreamCompanion.Code.Helpers; using Sentry; using StreamCompanionTypes.Enums; using StreamCompanionTypes.Interfaces.Services; namespace osu_StreamCompanion.Code.Core.Loggers { public class SentryLogger : IContextAwareLogger { public static stri...
Make internals visible to the testing project
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Sl...
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Sl...
Add IsLocked to audit for account locked message
using System.Collections.Generic; using SFA.DAS.Audit.Types; namespace SFA.DAS.EmployerUsers.Domain.Auditing { public class AccountLockedAuditMessage : EmployerUsersAuditMessage { public AccountLockedAuditMessage(User user) { Category = "ACCOUNT_LOCKED"; Descr...
using System.Collections.Generic; using SFA.DAS.Audit.Types; namespace SFA.DAS.EmployerUsers.Domain.Auditing { public class AccountLockedAuditMessage : EmployerUsersAuditMessage { public AccountLockedAuditMessage(User user) { Category = "ACCOUNT_LOCKED"; Descr...
Change date format to iso format
using System; using FluentMigrator.Runner.Generators.Generic; namespace FluentMigrator.Runner.Generators.Jet { public class JetQuoter : GenericQuoter { public override string OpenQuote { get { return "["; } } public override string CloseQuote { get { return "]"; } } public override s...
using System; using FluentMigrator.Runner.Generators.Generic; namespace FluentMigrator.Runner.Generators.Jet { public class JetQuoter : GenericQuoter { public override string OpenQuote { get { return "["; } } public override string CloseQuote { get { return "]"; } } public override s...
Support API Key authentication using header
using System.Data.Entity; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using SupportManager.DAL; namespace SupportManager.Web.Infrastruc...
using System.Data.Entity; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using SupportManager.DAL; namespace SupportManager.Web.Infrastruc...
Remove var keyword in tests
using Newtonsoft.Json; using Telegram.Bot.Requests; using Xunit; namespace Telegram.Bot.Tests.Unit.Serialization { public class MethodNameTests { [Fact(DisplayName = "Should serialize method name in webhook responses")] public void Should_Serialize_MethodName_In_Webhook_Responses() { ...
using Newtonsoft.Json; using Telegram.Bot.Requests; using Xunit; namespace Telegram.Bot.Tests.Unit.Serialization { public class MethodNameTests { [Fact(DisplayName = "Should serialize method name in webhook responses")] public void Should_Serialize_MethodName_In_Webhook_Responses() { ...
Fix buggy type lookup when Type.FindType fails
using System; using System.Reflection; namespace FullSerializer.Internal { /// <summary> /// Provides APIs for looking up types based on their name. /// </summary> internal static class fsTypeLookup { public static Type GetType(string typeName) { //-- // see ...
using System; using System.Reflection; namespace FullSerializer.Internal { /// <summary> /// Provides APIs for looking up types based on their name. /// </summary> internal static class fsTypeLookup { /// <summary> /// Attempts to lookup the given type. Returns null if the type lookup ...
Verify that "to-project" is a valid queue name
using Lokad.Cqrs.Build.Engine; using NUnit.Framework; namespace Lokad.Cqrs { [TestFixture] public sealed class MiscTests { // ReSharper disable InconsistentNaming [Test] public void Azure_queues_regex_is_valid() { Assert.IsTrue(AzureEngineModule.QueueName.IsMatch...
using Lokad.Cqrs.Build.Engine; using NUnit.Framework; namespace Lokad.Cqrs { [TestFixture] public sealed class MiscTests { // ReSharper disable InconsistentNaming [Test] public void Azure_queues_regex_is_valid() { Assert.IsTrue(AzureEngineModule.QueueName.IsMatch...
Test names changed to Should notation
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using OpcMock; namespace OpcMockTests { [TestClass] public class ProtocolComparerTests { private const int EQUALITY = 0; [TestMethod] public void Protocols_With_The_Same_Name_Are_Equal() { Protoc...
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using OpcMock; namespace OpcMockTests { [TestClass] public class ProtocolComparerTests { private const int EQUALITY = 0; [TestMethod] public void ProtocolsWithTheSameNameShould_Be_Equal() { Proto...
Update types on Message Bus definition
using System; namespace Glimpse { public interface IMessageBus { IObservable<T> Listen<T>(); IObservable<T> ListenIncludeLatest<T>(); void SendMessage(object message); } }
using System; namespace Glimpse { public interface IMessageBus { IObservable<T> Listen<T>() where T : IMessage; IObservable<T> ListenIncludeLatest<T>() where T : IMessage; void SendMessage(IMessage message); } }
Change so that the minimum hash length is 6 characters and not 10
using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces; using HashidsNet; namespace SFA.DAS.EmployerApprenticeshipsService.Infrastructure.Services { public class HashingService : IHashingService { public string HashValue(long id) { var hashIds = new Hashids("SFA: digital ap...
using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces; using HashidsNet; namespace SFA.DAS.EmployerApprenticeshipsService.Infrastructure.Services { public class HashingService : IHashingService { public string HashValue(long id) { var hashIds = new Hashids("SFA: digital ap...
Print source and destination addresses on ICMPv6 packets
using TAP; using System; using System.Net; public class TAPCfgTest { private static void Main(string[] args) { EthernetDevice dev = new EthernetDevice(); dev.Start("Device name"); Console.WriteLine("Got device name: {0}", dev.DeviceName); dev.MTU = 1280; dev.SetAddress(IPAddress.Parse("192.168.1.1"), 16); ...
using TAP; using System; using System.Net; public class TAPCfgTest { private static void Main(string[] args) { EthernetDevice dev = new EthernetDevice(); dev.Start("Device name"); Console.WriteLine("Got device name: {0}", dev.DeviceName); dev.MTU = 1280; dev.SetAddress(IPAddress.Parse("192.168.1.1"), 16); ...
Add alwaysShowDecimals param to FormatAccuracy
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Utils { public static class FormatUtils { /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal places...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Utils { public static class FormatUtils { /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal places...
Use DotNetCoreBuild in Cake script.
////////////////////////////////////////////////////////////////////// // ARGUMENTS ////////////////////////////////////////////////////////////////////// var target = Argument("target", "Default"); var configuration = Argument("configuration", "Release"); /////////////////////////////////////////////////////////////...
////////////////////////////////////////////////////////////////////// // ARGUMENTS ////////////////////////////////////////////////////////////////////// var target = Argument("target", "Default"); var configuration = Argument("configuration", "Release"); /////////////////////////////////////////////////////////////...
Add method for querying active entities
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ECS { public class EntityComponentSystem { private EntityManager entityManager; private SystemManager systemManager; public EntityComponentSystem() { ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ECS { public class EntityComponentSystem { private EntityManager entityManager; private SystemManager systemManager; public EntityComponentSystem() { ...
Change remote app version to v0.1
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Starboard"> // Copyright © 2011 All Rights Reserved // </copyright> // <summary> // AssemblyInfo.cs // </summary> // --------------------------------...
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Starboard"> // Copyright © 2011 All Rights Reserved // </copyright> // <summary> // AssemblyInfo.cs // </summary> // --------------------------------...
Implement scanning assemblies for function types
using System; using System.Collections.Generic; using Manisero.DSLExecutor.Parser.SampleDSL.Parsing.Tokens; namespace Manisero.DSLExecutor.Parser.SampleDSL.ExpressionGeneration.FunctionExpressionGeneration.FunctionTypeResolvers { public class TypeSamplesAndSuffixConventionBasedFunctionTypeResolver : IFuncti...
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using Manisero.DSLExecutor.Domain.FunctionsDomain; using Manisero.DSLExecutor.Extensions; using Manisero.DSLExecutor.Parser.SampleDSL.Parsing.Tokens; namespace Manisero.DSLExecutor.Parser.SampleDSL.ExpressionGeneration...
Add missing copyright header text.
using Microsoft.MixedReality.Toolkit.Physics; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { /// <summary> /// The default implementation of IMixedRealityRaycastProvider. /// </summary> public class DefaultRaycastProvider : BaseDataProvider, IMixedRealityRaycastProvider { ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Physics; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { /// <summary> /// The default implementati...
Save trip before dismissing summary.
using System; using UIKit; namespace MyTrips.iOS { public partial class TripSummaryViewController : UIViewController { public ViewModel.CurrentTripViewModel ViewModel { get; set; } public TripSummaryViewController(IntPtr handle) : base(handle) { } public override void ViewDidLoad() { lblDateTime.T...
using System; using UIKit; namespace MyTrips.iOS { public partial class TripSummaryViewController : UIViewController { public ViewModel.CurrentTripViewModel ViewModel { get; set; } public TripSummaryViewController(IntPtr handle) : base(handle) { } public override void ViewDidLoad() { lblDateTime.T...
Test for migrations up to date.
using FluentAssertions; using MergableMigrations.EF6; using MergableMigrations.Specification.Implementation; using System; using System.Linq; using Xunit; namespace Mathematicians.UnitTests { public class SqlGeneratorTests { [Fact] public void CanGenerateSql() { var migrati...
using FluentAssertions; using MergableMigrations.EF6; using MergableMigrations.Specification; using MergableMigrations.Specification.Implementation; using System; using System.Linq; using Xunit; namespace Mathematicians.UnitTests { public class SqlGeneratorTests { [Fact] public void CanGenerat...
Change random to avoid identical seed
using System; using System.Threading; namespace Criteo.Profiling.Tracing.Utils { /// <summary> /// Thread-safe random long generator. /// /// See "Correct way to use Random in multithread application" /// http://stackoverflow.com/questions/19270507/correct-way-to-use-random-in-multithread-applicat...
using System; using System.Threading; namespace Criteo.Profiling.Tracing.Utils { /// <summary> /// Thread-safe random long generator. /// /// See "Correct way to use Random in multithread application" /// http://stackoverflow.com/questions/19270507/correct-way-to-use-random-in-multithread-applicat...
Allow output directory to be specified as a second parameter.
using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; namespace NuPack { public class PackageAuthoring { private static readonly HashSet<string> _exclude = new HashSet<string>(new[] { ".nupack", ".nuspec" }, ...
using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; namespace NuPack { public class PackageAuthoring { private static readonly HashSet<string> _exclude = new HashSet<string>(new[] { ".nupack", ".nuspec" }, ...
Make the queue into a list
// 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.Threading.Tasks; using osu.Framework.Statistics; namespace osu.Framework.Allocation { /// <summary> ...
// 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.Threading.Tasks; using osu.Framework.Statistics; namespace osu.Framework.Allocation { /// <summary> ...
Make performance counter tests more stable
using System.Diagnostics; using FluentAssertions; using Xunit; namespace Okanshi.Test { public class PerformanceCounterTest { [Fact] public void Performance_counter_without_instance_name() { var performanceCounter = new PerformanceCounter("Memory", "Available Bytes"); var monitor = new PerformanceCount...
using System.Diagnostics; using FluentAssertions; using Xunit; namespace Okanshi.Test { public class PerformanceCounterTest { [Fact] public void Performance_counter_without_instance_name() { var performanceCounter = new PerformanceCounter("Memory", "Available Bytes"); var monitor = new PerformanceCount...
Fix wrong property mapping in SearchShard
using System.Collections.Generic; using Nest.Domain; using Newtonsoft.Json; using System.Linq.Expressions; using System; using System.Linq; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnumerable<SearchShard...
using Nest.Domain; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnumerable...
Remove usage of obsolete IApplicationRegistration
using System.Collections.Generic; using Glimpse.Core.Extensibility; using Nancy.Bootstrapper; namespace Glimpse.Nancy { public class GlimpseRegistrations : IApplicationRegistrations { public GlimpseRegistrations() { AppDomainAssemblyTypeScanner.AddAssembliesToScan(typeof(Glimpse.Co...
using System.Collections.Generic; using Glimpse.Core.Extensibility; using Nancy.Bootstrapper; namespace Glimpse.Nancy { public class GlimpseRegistrations : IRegistrations { public GlimpseRegistrations() { AppDomainAssemblyTypeScanner.AddAssembliesToScan(typeof(Glimpse.Core.Tab.Time...
Test to check tinyioc is internal
using System; using System.Linq; using FluentAssertions; using NSaga; using Xunit; namespace Tests { public class NamespaceTests { [Fact] public void NSaga_Contains_Only_One_Namespace() { //Arrange var assembly = typeof(ISagaMediator).Assembly; // A...
using System; using System.Linq; using FluentAssertions; using NSaga; using Xunit; namespace Tests { public class NamespaceTests { [Fact] public void NSaga_Contains_Only_One_Namespace() { //Arrange var assembly = typeof(ISagaMediator).Assembly; // A...
Add license and disclaimer to About panel
@{ var version = ""; var versionName = Yio.Data.Constants.VersionConstant.Codename.ToString(); if(Yio.Data.Constants.VersionConstant.Patch == 0) { version = Yio.Data.Constants.VersionConstant.Release.ToString(); } else { version = Yio.Data.Constants.VersionConstant.Release.ToString() + ...
@{ var version = ""; var versionName = Yio.Data.Constants.VersionConstant.Codename.ToString(); if(Yio.Data.Constants.VersionConstant.Patch == 0) { version = Yio.Data.Constants.VersionConstant.Release.ToString(); } else { version = Yio.Data.Constants.VersionConstant.Release.ToString() + ...
Fix data collection cmdlets to not require login
// ---------------------------------------------------------------------------------- // // 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://www.apa...
// ---------------------------------------------------------------------------------- // // 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://www.apa...
Change "single tap" mod acronym to not conflict with "strict tracking"
// 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; namespace osu.Game.Rulesets.Osu.Mods { public class OsuModSingleTap : InputBlockingMod { public override string Name => ...
// 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; namespace osu.Game.Rulesets.Osu.Mods { public class OsuModSingleTap : InputBlockingMod { public override string Name => ...
Make map pool layout more correct
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Tournament.Components; using osu...
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Screens; using osu.Game.Tourname...
Add support for named argument parsing.
using System; using System.Dynamic; namespace BobTheBuilder { public class NamedArgumentsDynamicBuilder<T> : DynamicObject, IDynamicBuilder<T> where T : class { private readonly IDynamicBuilder<T> wrappedBuilder; private readonly IArgumentStore argumentStore; internal NamedArgumentsDy...
using System; using System.Dynamic; using System.Linq; namespace BobTheBuilder { public class NamedArgumentsDynamicBuilder<T> : DynamicObject, IDynamicBuilder<T> where T : class { private readonly IDynamicBuilder<T> wrappedBuilder; private readonly IArgumentStore argumentStore; intern...
Enable stopwatch extension methods for .NET Core
// Copyright 2014 The Noda Time Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0, // as found in the LICENSE.txt file. #if !PCL using System.Diagnostics; using JetBrains.Annotations; using NodaTime.Utility; namespace NodaTime.Extensions { /// <summary> /// Extensi...
// Copyright 2014 The Noda Time Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0, // as found in the LICENSE.txt file. using System.Diagnostics; using JetBrains.Annotations; using NodaTime.Utility; namespace NodaTime.Extensions { /// <summary> /// Extension method...
Add group by yellow cards count
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using RedCard.API.Contexts; // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 namespace RedCard.API.Controllers { [Route("...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using RedCard.API.Contexts; using RedCard.API.Models; // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 namespace RedCard.API....
Allow coroutines of 0 sec delay
using System; using System.Collections; using UnityEngine; namespace LunaClient.Utilities { public class CoroutineUtil { public static void StartDelayedRoutine(string routineName, Action action, float delayInSec) { Client.Singleton.StartCoroutine(DelaySeconds(routineName, action, d...
using System; using System.Collections; using UnityEngine; namespace LunaClient.Utilities { public class CoroutineUtil { public static void StartDelayedRoutine(string routineName, Action action, float delayInSec) { Client.Singleton.StartCoroutine(DelaySeconds(routineName, action, d...
Add check for content type when parsing in client. Fallback to Json if Protobuf is not available
using System; using System.Net.Http.Headers; using System.Threading.Tasks; using Infrastructure.Model; using Microsoft.AspNetCore.Mvc; namespace Web.Controllers { public class HomeController : Controller { [HttpGet] public async Task<string> Index() { var client = new System...
using System; using System.Net.Http.Headers; using System.Threading.Tasks; using Infrastructure.Model; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; namespace Web.Controllers { public class HomeController : Controller { [HttpGet] public async Task<string> Index() { ...
Disable warnings about obsoletion since the point is testing the obsolete stuff still works
using System; using System.IO; using System.Runtime.CompilerServices; using ExpressionToCodeLib; using Xunit; //requires binary serialization, which is omitted in older .net cores - but those are out of support: https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core namespace ExpressionToCodeT...
using System; using System.IO; using System.Runtime.CompilerServices; using ExpressionToCodeLib; using Xunit; //requires binary serialization, which is omitted in older .net cores - but those are out of support: https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core namespace ExpressionToCodeT...
Add intermediate comments to help explain what to do
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using FizzWare.NBuilder; using IntermediatorBotSample.Models; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Schema; using Newtonsoft.Json; namespace IntermediatorBotSample.Controller...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using FizzWare.NBuilder; using IntermediatorBotSample.Models; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Schema; using Newtonsoft.Json; namespace IntermediatorBotSample.Controller...
Use different sounds for minigun's missed enemy effect.
//------------------------------------------------------------------------------ // Revenge Of The Cats: Ethernet // Copyright (C) 2008, mEthLab Interactive //------------------------------------------------------------------------------ datablock AudioProfile(MinigunProjectileImpactSound) { filename = "share/sounds/...
//------------------------------------------------------------------------------ // Revenge Of The Cats: Ethernet // Copyright (C) 2008, mEthLab Interactive //------------------------------------------------------------------------------ datablock AudioProfile(MinigunProjectileImpactSound) { filename = "share/sounds/...
Move client handling into a separate method.
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace EchoServer { class Program { static void Main(string[] args) { Task main = MainAsync(args); mai...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace EchoServer { class Program { static void Main(string[] args) { Task main = MainAsync(args); mai...
Clean up the diagnostic in FieldToProperty pass.
using System.Linq; using CppSharp.AST; using CppSharp.Generators; namespace CppSharp.Passes { public class FieldToPropertyPass : TranslationUnitPass { public override bool VisitClassDecl(Class @class) { if (@class.CompleteDeclaration != null) return VisitClassDecl(@...
using System.Linq; using CppSharp.AST; using CppSharp.Generators; namespace CppSharp.Passes { public class FieldToPropertyPass : TranslationUnitPass { public override bool VisitClassDecl(Class @class) { if (@class.CompleteDeclaration != null) return VisitClassDecl(@...
Mark evil test as ignore, again
 using System; using NUnit.Framework; namespace HttpMock.Unit.Tests { [TestFixture] public class HttpFactoryTests { [Test] public void ShouldBeAbleToHostAtSameAddressIfPreviousWasDisposed() { var serverFactory = new HttpServerFactory(); var uri = new Uri(String.Format("http://localhost:{...
 using System; using NUnit.Framework; namespace HttpMock.Unit.Tests { [TestFixture] public class HttpFactoryTests { [Test] [Ignore ("Makes the test suite flaky (???)")] public void ShouldBeAbleToHostAtSameAddressIfPreviousWasDisposed() { var serverFactory = new HttpServerFactory(); va...
Make sure distance is clamped to sane values
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using osu.Game.Rulesets.Osu.Difficulty.Preprocessing; namespace osu.Game.Rulesets.Osu.Difficulty.Skills { /// <summary> /// Represents the skill ...
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using osu.Game.Rulesets.Osu.Difficulty.Preprocessing; namespace osu.Game.Rulesets.Osu.Difficulty.Skills { /// <summary> /// Represents the skill ...
Fix for GetTestCases not returning current folder
using Qart.Core.DataStore; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Qart.Testing { public class TestSystem { public IDataStore DataStorage { get; private set; } public TestSystem(IDataStore d...
using Qart.Core.DataStore; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Qart.Testing { public class TestSystem { public IDataStore DataStorage { get; private set; } public TestSystem(IDataStore d...
Refactor virtual judge user table schema
using System; using System.ComponentModel.DataAnnotations; namespace JoyOI.OnlineJudge.Models { public class VirtualJudgeUser { /// <summary> /// Gets or sets the identifier. /// </summary> /// <value>The identifier.</value> public Guid Id { get; set; } /// <su...
using System; using System.ComponentModel.DataAnnotations; namespace JoyOI.OnlineJudge.Models { public class VirtualJudgeUser { /// <summary> /// Gets or sets the identifier. /// </summary> /// <value>The identifier.</value> public Guid Id { get; set; } /// <su...
Use LargeTextureStore for online retrievals
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using osu.Framework.Allocation; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; namespace osu.Game.Beatmaps.Drawables { ...
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using osu.Framework.Allocation; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; namespace osu.Game.Beatmaps.Drawables { ...
Use registered types for Out of Band handlers in packet handling type finder
// Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using System.Collections.Generic; namespace EOLib.Net.Handlers { public class PacketHandlingTypeFinder : IPacketHandlingTypeFinder { private readonly List<FamilyActi...
// Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using System.Collections.Generic; using System.Linq; namespace EOLib.Net.Handlers { public class PacketHandlingTypeFinder : IPacketHandlingTypeFinder { private reado...
Fix latest chain properties, simplify WordCount property and make it deduce the order from the passed initial chain.
using System; using System.Collections.Generic; namespace Chainey { internal class SentenceConstruct { internal int WordCount { get { return Forwards.Count + Backwards.Count - order; } } internal string Sentence { get { ...
using System; using System.Collections.Generic; namespace Chainey { internal class SentenceConstruct { internal int WordCount { get; private set; } internal string Sentence { get { var sen = new List<string>(Backwards); sen.Remov...
Update Nuget version of package to 1.1.0.10-rc
using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("KeyPay")] [assembly: AssemblyDescription("...
using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("KeyPay")] [assembly: AssemblyDescription("...
Refactor - UserMessage instead of attribute
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using NUnit.Migrator.Model; namespace NUnit.Migrator.CodeActions { internal class AssertUserMessageDecorator : AssertExceptionBlockDecorator { private readonly ExceptionExpectancyAtAttributeLe...
using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using NUnit.Migrator.Model; namespace NUnit.Migrator.CodeActions { internal class AssertUserMessageDecorator : AssertExceptionBlockDecorator { private readonly string _userMessag...
Remove caching of invoked expressions as it is hard to do and adds little benefit
 using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Linq; namespace MFlow.Core.Internal { /// <summary> /// An expression builder /// </summary> class ExpressionBuilder<T> : IExpressionBuilder<T> { static IDictionary<object, object> _expressions= new Di...
 using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Linq; namespace MFlow.Core.Internal { /// <summary> /// An expression builder /// </summary> class ExpressionBuilder<T> : IExpressionBuilder<T> { static IDictionary<object, object> _expressions= new Di...
Add missing ctor field initializations
using SSMScripter.Integration; using System; using System.Data; namespace SSMScripter.Scripter.Smo { public class SmoObjectMetadata { public SmoObjectType Type { get; protected set; } public string Schema { get; protected set; } public string Name { get; protected set; } public...
using SSMScripter.Integration; using System; using System.Data; namespace SSMScripter.Scripter.Smo { public class SmoObjectMetadata { public SmoObjectType Type { get; protected set; } public string Schema { get; protected set; } public string Name { get; protected set; } public...
Change div class and change the position of button back
@model SpaceBlog.Models.CommentViewModel @{ ViewBag.Title = "Edit"; } <h2>Edit</h2> @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal"> <h4>Comment</h4> <hr /> @Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.Hid...
@model SpaceBlog.Models.CommentViewModel @{ ViewBag.Title = "Edit"; ViewBag.Message = "Comment"; } @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="container"> <h2>@ViewBag.Title</h2> <h4>@ViewBag.Message</h4> <hr /> @Html.ValidationSummary(true, "...
Change assertion to support multiple issues in test
using System.Threading.Tasks; using Xunit; using YouTrackSharp.Issues; using YouTrackSharp.Tests.Infrastructure; namespace YouTrackSharp.Tests.Integration.Issues { public partial class IssuesServiceTests { public class GetIssuesInProject { [Fact] public async Task Valid_...
using System.Threading.Tasks; using Xunit; using YouTrackSharp.Issues; using YouTrackSharp.Tests.Infrastructure; namespace YouTrackSharp.Tests.Integration.Issues { public partial class IssuesServiceTests { public class GetIssuesInProject { [Fact] public async Task Valid_...
Update aspnet middleware extension message to allow shouldRun to be passed in
 using Microsoft.AspNet.Builder; using System; namespace Glimpse.Host.Web.AspNet { public static class GlimpseExtension { /// <summary> /// Adds a middleware that allows GLimpse to be registered into the system. /// </summary> /// <param name="app"></param> /// <returns...
 using Glimpse.Web; using Microsoft.AspNet.Builder; using System; namespace Glimpse.Host.Web.AspNet { public static class GlimpseExtension { /// <summary> /// Adds a middleware that allows GLimpse to be registered into the system. /// </summary> /// <param name="app"></param> ...
Make internals in MSTest2 visible for JustMock dll in lite version
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("MigrateMSTest")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("MigrateMSTest")] [assembly: AssemblyCopy...
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("MigrateMSTest")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("MigrateMSTest")] [assembly: AssemblyCopy...
Rephrase culture-neutral number format helper so that it can successfully compile against both the full .NET Framework and .NET Core.
namespace Fixie.Tests { using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text.RegularExpressions; using System.Threading; using Fixie.Execution; public static class TestExtensions { const BindingFlags InstanceMethods =...
namespace Fixie.Tests { using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Reflection; using System.Text.RegularExpressions; using Fixie.Execution; public static class TestExtensions { const BindingFlags InstanceMetho...
Implement the option to start the app when logging into Windows
using MultiMiner.Engine.Configuration; using System; using System.IO; namespace MultiMiner.Win { public class ApplicationConfiguration { public ApplicationConfiguration() { this.StartupMiningDelay = 45; } public bool LaunchOnWindowsLogin { get; set; } publi...
using Microsoft.Win32; using MultiMiner.Engine.Configuration; using System; using System.IO; using System.Windows.Forms; namespace MultiMiner.Win { public class ApplicationConfiguration { public ApplicationConfiguration() { this.StartupMiningDelay = 45; } public bo...
Add non-args constructor for serialization.
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Battlezeppelins.Models { public class GameTable { public const int TABLE_ROWS = 10; public const int TABLE_COLS = 10; public Game.Role role { get; private set; } publi...
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Battlezeppelins.Models { public class GameTable { public const int TABLE_ROWS = 10; public const int TABLE_COLS = 10; public Game.Role role { get; private set; } publi...
Create a non-null functionality wrapper in the required test.
namespace NBench.VisualStudio.TestAdapter.Tests.Unit.NBenchTestDiscoverer.NBenchTestDiscoverer { using JustBehave; using NBench.VisualStudio.TestAdapter; using NBench.VisualStudio.TestAdapter.Helpers; using Ploeh.AutoFixture; using Ploeh.AutoFixture.AutoNSubstitute; using Xunit; public...
namespace NBench.VisualStudio.TestAdapter.Tests.Unit.NBenchTestDiscoverer.NBenchTestDiscoverer { using JustBehave; using NBench.VisualStudio.TestAdapter; using NBench.VisualStudio.TestAdapter.Helpers; using Ploeh.AutoFixture; using Ploeh.AutoFixture.AutoNSubstitute; using Xunit; public...
Add several methods for Windows: IsAdmin
using System; using System.Diagnostics; using System.Reflection; namespace FonctionsUtiles.Fred.Csharp { public class FunctionsWindows { public static bool IsInWinPath(string substring) { bool result = false; string winPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Security.Principal; namespace FonctionsUtiles.Fred.Csharp { public class FunctionsWindows { public static bool IsInWinPath(string substring) { bool result = false; ...
Add additional tests for EnumMatchToBooleanConverter
using System.Globalization; using System.Reflection; using FluentAssertions; using Microsoft.Office.Interop.Outlook; using Moq; using NUnit.Framework; using OutlookMatters.Core.Settings; namespace Test.OutlookMatters.Core.Settings { [TestFixture] public class EnumMatchToBooleanConverterTest { [Tes...
using System.Globalization; using System.Reflection; using FluentAssertions; using Microsoft.Office.Interop.Outlook; using Moq; using NUnit.Framework; using OutlookMatters.Core.Settings; namespace Test.OutlookMatters.Core.Settings { [TestFixture] public class EnumMatchToBooleanConverterTest { [Tes...
Reset Chutes & Ladders demos to run demo 1 by default
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ChutesAndLadders.GamePlay; using ChutesAndLadders.Entities; using System.Diagnostics; namespace Chute { class Program { static void Main(string[] args) { var bo...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ChutesAndLadders.GamePlay; using ChutesAndLadders.Entities; using System.Diagnostics; namespace Chute { class Program { static void Main(string[] args) { var bo...
Simplify property name for LineItemMembershipSubject
using LtiLibrary.Core.Common; using Newtonsoft.Json; namespace LtiLibrary.Core.Outcomes.v2 { /// <summary> /// A LineItemContainer defines the endpoint to which clients POST new LineItem resources /// and from which they GET the list of LineItems associated with a a given learning context. /// </summ...
using LtiLibrary.Core.Common; using Newtonsoft.Json; namespace LtiLibrary.Core.Outcomes.v2 { /// <summary> /// A LineItemContainer defines the endpoint to which clients POST new LineItem resources /// and from which they GET the list of LineItems associated with a a given learning context. /// </summ...
Fix wrong property mapping in SearchShard
using System.Collections.Generic; using Nest.Domain; using Newtonsoft.Json; using System.Linq.Expressions; using System; using System.Linq; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnumerable<SearchShard...
using Nest.Domain; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace Nest { [JsonObject(MemberSerialization.OptIn)] public interface ISearchShardsResponse : IResponse { [JsonProperty("shards")] IEnumerable<IEnumerable...
Clarify behaviour on non-Windows systems
using HotChocolate.Types; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem.Contextual; using Snowflake.Framework.Remoting.GraphQL.Schema; using Snowflake.Services; using System; using System.Collections.Generic; using System.IO; using System.Text;...
using HotChocolate.Types; using Microsoft.DotNet.PlatformAbstractions; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem; using Snowflake.Framework.Remoting.GraphQL.Model.Filesystem.Contextual; using Snowflake.Framework.Remoting.GraphQL.Schema; using Snowflake.Services; using System; using System.Collections...
Increase assembly version to 1.2.0
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("Tiny-JSON")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly:...
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("Tiny-JSON")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly:...
Change try remove key pair method semantics
using System.Collections.Concurrent; using System.Collections.Generic; namespace Utility.Extensions { public static class ConcurrentDictionaryExtensions { public static bool TryRemove<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key) { TValue value; ...
using System.Collections.Concurrent; using System.Collections.Generic; namespace Utility.Extensions { public static class ConcurrentDictionaryExtensions { public static bool TryRemove<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key) { TValue value; ...
Use the in-memory database for testing the home controller
using IdeaWeb.Controllers; using Microsoft.AspNetCore.Mvc; using NUnit.Framework; namespace IdeaWeb.Test { [TestFixture] public class HomeControllerTests { HomeController _controller; [SetUp] public void SetUp() { _controller = new HomeController(); } ...
using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using IdeaWeb.Controllers; using IdeaWeb.Data; using IdeaWeb.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using NUnit.Framework; namespace IdeaWeb.Test { [TestFixture] public class HomeController...
Adjust initial size to look nicer
namespace DependencyInjection.Console { internal class PatternApp { private readonly PatternWriter _patternWriter; private readonly PatternGenerator _patternGenerator; public PatternApp(bool useColours) { _patternWriter = new PatternWriter(useColours); _...
namespace DependencyInjection.Console { internal class PatternApp { private readonly PatternWriter _patternWriter; private readonly PatternGenerator _patternGenerator; public PatternApp(bool useColours) { _patternWriter = new PatternWriter(useColours); _...
Split test into two separate tests
using Xunit; namespace EmotionAPI.Tests { public class EmotionAPIClientTests : EmotionAPITestsBase { [Fact] public void Can_Create_EmotionAPIClient_Controller() { var controller = new EmotionAPIClient(mockOcpApimSubscriptionKey); Assert.NotNull(cont...
using Xunit; namespace EmotionAPI.Tests { public class EmotionAPIClientTests : EmotionAPITestsBase { [Fact] public void Can_Create_EmotionAPIClient_Class() { var sut = new EmotionAPIClient(mockOcpApimSubscriptionKey); Assert.NotNull(sut); } ...
Add keyboard shortcut to open dev tools (Ctrl+Shift+I)
using System.Windows.Forms; using CefSharp; namespace TweetDuck.Core.Handling{ class KeyboardHandlerBase : IKeyboardHandler{ protected virtual bool HandleRawKey(IWebBrowser browserControl, IBrowser browser, Keys key, CefEventFlags modifiers){ return false; } bool IKeyboardHand...
using System.Windows.Forms; using CefSharp; using TweetDuck.Core.Controls; using TweetDuck.Core.Other; using TweetDuck.Core.Utils; namespace TweetDuck.Core.Handling{ class KeyboardHandlerBase : IKeyboardHandler{ protected virtual bool HandleRawKey(IWebBrowser browserControl, IBrowser browser, Keys key, Ce...
Fix pages slug to not be case sensitive when used in url
using System; using System.Web.Mvc; using Orchard.Localization; using Orchard.ContentManagement; using Orchard.Pages.Services; using Orchard.Pages.ViewModels; using Orchard.Security; namespace Orchard.Pages.Controllers { [ValidateInput(false)] public class PageController : Controller, IUpdateModel {...
using System; using System.Web.Mvc; using Orchard.Localization; using Orchard.ContentManagement; using Orchard.Mvc.Results; using Orchard.Pages.Services; using Orchard.Pages.ViewModels; using Orchard.Security; namespace Orchard.Pages.Controllers { [ValidateInput(false)] public class PageController ...
Fix case of zero rate calculating a zero true gameplay rate
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Game.Screens.Play { public static class GameplayClockExtensions { /// <summary> /// The rate of gameplay when playbac...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Game.Screens.Play { public static class GameplayClockExtensions { /// <summary> /// The rate of gameplay when playbac...
Allow to use input event arguments in the event handlers
using OpenTK.Input; namespace MonoHaven.Input { public abstract class InputEvent { private readonly KeyModifiers mods; protected InputEvent() { mods = GetCurrentKeyModifiers(); } public bool Handled { get; set; } public KeyModifiers Modifiers { get { return mods; } } private st...
using System; using OpenTK.Input; namespace MonoHaven.Input { public abstract class InputEvent : EventArgs { private readonly KeyModifiers mods; protected InputEvent() { mods = GetCurrentKeyModifiers(); } public bool Handled { get; set; } public KeyModifiers Modifiers { get { return...
Add vscode to git ignore
using SlugityLib.Configuration; namespace SlugityLib.Tests { public class CustomSlugityConfig : ISlugityConfig { public CustomSlugityConfig() { TextCase = TextCase.LowerCase; StripStopWords = false; MaxLength = 30; StringSeparator = ' '; ...
namespace SlugityLib.Tests { public class CustomSlugityConfig : ISlugityConfig { public CustomSlugityConfig() { TextCase = TextCase.LowerCase; StripStopWords = false; MaxLength = 30; StringSeparator = ' '; ReplacementCharacters = new C...
Fix error dialog close button not working
<div class="panel" id="error-panel"> <div class="panel-inner"> <div class="panel-close"> <a href="#" id="about-panel-close"><i class="fa fa-fw fa-times"></i></a> </div> <h1 id="error-title">Error!</h1> <p id="error-message"> Oh no! </p> </div> </di...
<div class="panel" id="error-panel"> <div class="panel-inner"> <div class="panel-close"> <a href="#" id="error-panel-close"><i class="fa fa-fw fa-times"></i></a> </div> <h1 id="error-title">Error!</h1> <p id="error-message"> <img src="http://i.imgur.com/ne6uoF...
Remove filter (default will work)
using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Syndication; using System.Web; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class ChristianHoejsager : IFilterMyBlogPosts, IAmACommunityMember { public string FirstName => "Christi...
using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Syndication; using System.Web; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class ChristianHoejsager : IAmACommunityMember { public string FirstName => "Christian"; public ...
Refactor to a thread-safe queue.
using System.Collections.Generic; using System.Linq; namespace SharpRaven.Utilities { public class CircularBuffer<T> { private readonly int size; private readonly Queue<T> queue; public CircularBuffer(int size = 100) { this.size = size; queue = new Queu...
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; namespace SharpRaven.Utilities { public class CircularBuffer<T> { private readonly int size; private ConcurrentQueue<T> queue; public CircularBuffer(int size = 100) { ...
Move using-statements within namespace declaration.
using System; using Nancy.Helpers; namespace Nancy.ViewEngines.Razor { /// <summary> /// An html string that is encoded. /// </summary> public class EncodedHtmlString : IHtmlString { /// <summary> /// Represents the empty <see cref="EncodedHtmlString"/>. This field is readonly. ...
namespace Nancy.ViewEngines.Razor { using System; using Nancy.Helpers; /// <summary> /// An html string that is encoded. /// </summary> public class EncodedHtmlString : IHtmlString { /// <summary> /// Represents the empty <see cref="EncodedHtmlString"/>. This field is readon...
Add case for locked files
using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading.Tasks; using Vipr.Core; namespace Vipr { internal static class FileWriter { public static async void WriteAsync(IEnumerable<TextFile> textFilesToWrite, string outputDirectoryPath = null) ...
using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading; using System.Threading.Tasks; using Vipr.Core; namespace Vipr { internal static class FileWriter { public static async void WriteAsync(IEnumerable<TextFile> textFilesToWrite, string outpu...
Tweak benchmarks, still don't trust the results.
namespace Gu.Analyzers.Benchmarks.Benchmarks { using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; using BenchmarkDotNet.Attributes; using Microsoft.CodeAnalysis.Diagnostics; public abstract class Analyzer { private readonly CompilationWithAnal...
namespace Gu.Analyzers.Benchmarks.Benchmarks { using System.Collections.Immutable; using System.Threading; using BenchmarkDotNet.Attributes; using Microsoft.CodeAnalysis.Diagnostics; public abstract class Analyzer { private readonly CompilationWithAnalyzers compilation; protec...
Fix files encoding to UTF-8
namespace InfinniPlatform.Sdk.Hosting { /// <summary> /// . /// </summary> public interface IHostAddressParser { /// <summary> /// , . /// </summary> /// <param name="hostNameOrAddress"> .</param> /// <returns> <c>true</c>, ; <c>false</c>.</retu...
namespace InfinniPlatform.Sdk.Hosting { /// <summary> /// Интерфейс для разбора адресов узлов. /// </summary> public interface IHostAddressParser { /// <summary> /// Определяет, является ли адрес локальным. /// </summary> /// <param name="hostNameOrAddress">Имя узла ...
Change LineNumber to nullable so it does not get serialized unless set
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace Mindscape.Raygun4Net { public class RaygunBreadcrumb { public string Message { get; set; } public string Category { get; set; } public RaygunBreadcrumbs.Level Level { get; set; } =...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace Mindscape.Raygun4Net { public class RaygunBreadcrumb { public string Message { get; set; } public string Category { get; set; } public RaygunBreadcrumbs.Level Level { get; set; } =...
Add help message to !alarmclock
using System.Collections; using System.Reflection; using Assets.Scripts.Props; using UnityEngine; public class AlarmClockHoldableHandler : HoldableHandler { public AlarmClockHoldableHandler(KMHoldableCommander commander, FloatingHoldable holdable, IRCConnection connection, CoroutineCanceller canceller) : base(comman...
using System.Collections; using System.Reflection; using Assets.Scripts.Props; using UnityEngine; public class AlarmClockHoldableHandler : HoldableHandler { public AlarmClockHoldableHandler(KMHoldableCommander commander, FloatingHoldable holdable, IRCConnection connection, CoroutineCanceller canceller) : base(comman...
Use Enum.Parse overload available in PCL
using System; namespace EvilDICOM.Core.Helpers { public class EnumHelper { public static T StringToEnum<T>(string name) { return (T) Enum.Parse(typeof (T), name); } } }
using System; namespace EvilDICOM.Core.Helpers { public class EnumHelper { public static T StringToEnum<T>(string name) { return (T) Enum.Parse(typeof (T), name, false); } } }
Tag release with updated version number.
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace MonoGameUtils.UI.GameComponents { /// <summary> /// Represents a rectangular button that can be clicked in a game. /// </summary> public class Button : DrawableGameComponent { public SpriteFont Font { get; set...
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace MonoGameUtils.UI.GameComponents { /// <summary> /// Represents a rectangular button that can be clicked in a game. /// </summary> public class Button : DrawableGameComponent { public SpriteFont Font { get; set...