Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Make sure to register interface rather than implementation
using System.Reflection; using Castle.MicroKernel.Registration; using Castle.MicroKernel.Resolvers.SpecializedResolvers; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; namespace AppHarbor { public class AppHarborInstaller : IWindsorInstaller { public void Install(IWindsorContainer contai...
using System.Reflection; using Castle.MicroKernel.Registration; using Castle.MicroKernel.Resolvers.SpecializedResolvers; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; namespace AppHarbor { public class AppHarborInstaller : IWindsorInstaller { public void Install(IWindsorContainer contai...
Fix for chekcing the children belonging to MemberType tree.
using System.Collections.Generic; using System.Linq; using System.Net.Http.Formatting; using Umbraco.Core; using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { [CoreTree(TreeGroup =Constants.Trees.Groups.Settings)] [UmbracoTreeAuthorize(Constants.Trees.MemberTypes)] ...
using System.Collections.Generic; using System.Linq; using System.Net.Http.Formatting; using Umbraco.Core; using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Trees { [CoreTree(TreeGroup = Constants.Trees.Groups.Settings)] [UmbracoTreeAuthorize(Constants.Trees.MemberTypes)]...
Add default kick message, inform who the kicker was
using CupCake.Command; using CupCake.Command.Source; using CupCake.Permissions; using CupCake.Players; namespace CupCake.DefaultCommands.Commands.User { public sealed class KickCommand : UserCommandBase { [MinGroup(Group.Trusted)] [Label("kick", "kickplayer")] [CorrectUsage("[player] [...
using System.Runtime.InteropServices; using CupCake.Command; using CupCake.Command.Source; using CupCake.Permissions; using CupCake.Players; namespace CupCake.DefaultCommands.Commands.User { public sealed class KickCommand : UserCommandBase { [MinGroup(Group.Trusted)] [Label("kick", "kickplaye...
Fix tests - apparently CoreEventId.NavigationBaseIncludeIgnored now defaults to Error in EF Core 6.
using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Text; namespace IntelliTect.Coalesce.Tests.TargetClasses.TestDbContext { [Coalesce] public class TestDbContext : DbContext { public DbSet<Person> People { get; set; } public DbSet<Case> Cases ...
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Diagnostics; using System; using System.Collections.Generic; using System.Text; namespace IntelliTect.Coalesce.Tests.TargetClasses.TestDbContext { [Coalesce] public class TestDbContext : DbContext { public DbSet<Person> Peopl...
Fix link to remote R setup
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using System; using System.ComponentModel.Design; using System.Diagnostics; using Microsoft.VisualStudio.R.Package.Commands; using Microsoft.VisualStudio.R.Packages....
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using System; using System.ComponentModel.Design; using System.Diagnostics; using Microsoft.VisualStudio.R.Package.Commands; using Microsoft.VisualStudio.R.Packages....
Make saved settings more readable
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using System.Xml.Serialization; namespace Pequot { [XmlRoot("settings")] public class SerializableSettings : Dictionary<string, string>, IXmlSerializable { #region IXmlSerializ...
using System; using System.Collections.Generic; using System.Xml; using System.Xml.Serialization; namespace Pequot { [XmlRoot("settings")] public class SerializableSettings : Dictionary<string, string>, IXmlSerializable { #region IXmlSerializable Members public System.Xml...
Remove windows store test runner
namespace Nine.Application.WindowsStore.Test { using System; using System.Reflection; using Windows.UI.Xaml.Controls; using Xunit; using Xunit.Abstractions; public sealed partial class MainPage : Page, IMessageSink { public MainPage() { InitializeComponent(); ...
namespace Nine.Application.WindowsStore.Test { using System; using System.Reflection; using Windows.UI.Xaml.Controls; using Xunit; using Xunit.Abstractions; public sealed partial class MainPage : Page, IMessageSink { public MainPage() { InitializeComponent(); ...
Revert "Tried to Figure Out Button: Failed"
using UnityEngine; using System.Collections; public class Trampoline : MonoBehaviour { public float velocityX; public float velocityY; public Input button; void OnTriggerStay2D(Collider2D other) { if (other.gameObject.tag == "Player") { if(button){ other.rigidbody2D.AddForce(new Vector2(velocityX,velo...
using UnityEngine; using System.Collections; public class Trampoline : MonoBehaviour { public float velocityX; public float velocityY; void OnTriggerStay2D(Collider2D other) { if (other.gameObject.tag == "Player") { other.rigidbody2D.AddForce(new Vector2(velocityX,velocityY)); //other.rigidbody2D.velocit...
Add ScrollTo support to ScrollView
using System; using System.ComponentModel; using Ooui.Forms.Extensions; using Xamarin.Forms; namespace Ooui.Forms.Renderers { public class ScrollViewRenderer : ViewRenderer<ScrollView, Div> { protected override void OnElementChanged (ElementChangedEventArgs<ScrollView> e) { base.On...
using System; using System.ComponentModel; using Ooui.Forms.Extensions; using Xamarin.Forms; namespace Ooui.Forms.Renderers { public class ScrollViewRenderer : VisualElementRenderer<ScrollView> { bool disposed = false; protected override void OnElementChanged (ElementChangedEventArgs<ScrollVi...
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major.
using System; using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.Multitenant")] [assembly: AssemblyDescription("Autofac multitenancy support library.")] [assembly: ComVisible(false)]
using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Autofac.Extras.Multitenant")] [assembly: ComVisible(false)]
Add model binder to binding config
using System.Web.Http.Controllers; using System.Web.Http.ModelBinding; using WebAPI.API.ModelBindings.Providers; namespace WebAPI.API { public class ModelBindingConfig { public static void RegisterModelBindings(ServicesContainer services) { services.Add(typeof (ModelBinderProvider)...
using System.Web.Http.Controllers; using System.Web.Http.ModelBinding; using WebAPI.API.ModelBindings.Providers; namespace WebAPI.API { public class ModelBindingConfig { public static void RegisterModelBindings(ServicesContainer services) { services.Add(typeof (ModelBinderProvider)...
Address null ref when we can't get an Undo manager.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.Editor; using Microsoft.VisualStudio.OL...
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.Editor; using Microsoft.VisualStudio.OL...
Fix argon hit target area not being aligned correctly
// 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.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Game.Rulesets.Mania....
// 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.Containers; using osu.Framework.Graphics.Shapes;...
Declare array parameter as an IReadOnlyList<T> since the array need not be used as mutable.
using System; using System.Collections.Generic; namespace Fixie { public class ClassExecution { public ClassExecution(ExecutionPlan executionPlan, Type testClass, CaseExecution[] caseExecutions) { ExecutionPlan = executionPlan; TestClass = testClass; CaseExe...
using System; using System.Collections.Generic; namespace Fixie { public class ClassExecution { public ClassExecution(ExecutionPlan executionPlan, Type testClass, IReadOnlyList<CaseExecution> caseExecutions) { ExecutionPlan = executionPlan; TestClass = testClass; ...
Refactor to use UseBusDiagnostics extension
using System; using RSB; using RSB.Diagnostics; using RSB.Transports.RabbitMQ; namespace SampleDiscoverableModule { class Program { static void Main(string[] args) { var bus = new Bus(RabbitMqTransport.FromConfigurationFile()); var diagnostics = new BusDiagnostics(bus,...
using System; using System.Threading; using RSB; using RSB.Diagnostics; using RSB.Transports.RabbitMQ; namespace SampleDiscoverableModule { class Program { static void Main(string[] args) { var bus = new Bus(RabbitMqTransport.FromConfigurationFile()); bus.UseBusDiagnos...
Include the recording number in the default format
using System; using System.Collections.Generic; using System.IO; using System.Windows.Input; using AudioSharp.Utils; using Newtonsoft.Json; namespace AudioSharp.Config { public class ConfigHandler { public static void SaveConfig(Configuration config) { string json = JsonConvert.Seri...
using System; using System.Collections.Generic; using System.IO; using System.Windows.Input; using AudioSharp.Utils; using Newtonsoft.Json; namespace AudioSharp.Config { public class ConfigHandler { public static void SaveConfig(Configuration config) { string json = JsonConvert.Seri...
Split enum test to 4 separate
using JoinRpg.Domain; using JoinRpg.Services.Interfaces; using JoinRpg.TestHelpers; using JoinRpg.Web.Models; using Xunit; namespace JoinRpg.Web.Test { public class EnumTests { [Fact] public void ProblemEnum() { EnumerationTestHelper.CheckEnums<UserExtensions.AccessReason, ...
using JoinRpg.Domain; using JoinRpg.Services.Interfaces; using JoinRpg.TestHelpers; using JoinRpg.Web.Models; using Xunit; namespace JoinRpg.Web.Test { public class EnumTests { [Fact] public void AccessReason() => EnumerationTestHelper.CheckEnums<UserExtensions.AccessReason, AccessReason>(); ...
Return prefix and byte length
using System; using System.Net; namespace BmpListener.Bgp { public class IPAddrPrefix { public IPAddrPrefix(byte[] data, int offset, AddressFamily afi = AddressFamily.IP) { DecodeFromBytes(data, offset, afi); } internal int ByteLength { get { return 1 + (Length + 7...
using System; using System.Linq; using System.Net; namespace BmpListener.Bgp { public class IPAddrPrefix { // RFC 4721 4.3 // The Type field indicates the length in bits of the IP address prefix. public int Length { get; private set; } public IPAddress Prefix { get; private set...
Add FutureEmployment to data sources.
@{ ViewData["Title"] = "Data sources"; } <h2>@ViewData["Title"]</h2> <h3>@ViewData["Message"]</h3>
@{ ViewData["Title"] = "Data sources"; } <h2>@ViewData["Title"]</h2> <h3>@ViewData["Message"]</h3> http://www.oxfordmartin.ox.ac.uk/downloads/academic/The_Future_of_Employment.pdf
Clean up syntax of index page
@{ Layout = null; @using ISWebTest.ExtensionMethods; @using ISWebTest.Controllers; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title></title> </head> <body> <div> <a href="@{Url.Action<HomeController>(nameof(HomeController.Analyze))}">TEST</a> ...
 @using ISWebTest.ExtensionMethods; @using ISWebTest.Controllers; <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title></title> </head> <body> <div> <a href="@(Url.Action<HomeController>(nameof(HomeController.Analyze)))">TEST</a> </div> </body> </html>
Add interpreter with skeleton game loop
using IFVM.Core; namespace IFVM.Execution { public partial class Interpreter { public static uint Execute(Function function) { return 0; } } }
using System; using IFVM.Ast; using IFVM.Collections; using IFVM.Core; using IFVM.FlowAnalysis; namespace IFVM.Execution { public partial class Interpreter { public static uint Execute(Function function, Machine machine) { var cfg = ControlFlowGraph.Compute(function.Body); ...
Set NukeLoopWait and AegisLoopWait to 0 as per sztanpet.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Dbot.Utility { public static class Settings { public const int MessageLogSize = 200; // aka context size public static readonly TimeSpan UserCommandInterval = TimeSpan.FromSeconds(10...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Dbot.Utility { public static class Settings { public const int MessageLogSize = 200; // aka context size public static readonly TimeSpan UserCommandInterval = TimeSpan.FromSeconds(10...
Add missing `OverlayColourProvider` in test scene
// 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.Screens; using osu.Game.Overlays.FirstRunSetup; namespace osu.Game.Tests.Visual.UserInterface { public class TestSceneFirstRunScreenUIScale : Osu...
// 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.Screens; using osu.Game.Overlays; using osu.Game.Overlays.FirstRunSetup; namespace osu.Game.Tests.Visual.UserInterfac...
Use expected in tests for F.Always
using Xunit; namespace Farity.Tests { public class AlwaysTests { [Fact] public void AlwaysReturnsAFunctionThatReturnsTheSameValueAlways() { var answerToLifeUniverseAndEverything = F.Always(42); var answer = answerToLifeUniverseAndEverything(); Assert...
using Xunit; namespace Farity.Tests { public class AlwaysTests { [Fact] public void AlwaysReturnsAFunctionThatReturnsTheSameValueAlways() { const int expected = 42; var answerToLifeUniverseAndEverything = F.Always(expected); Assert.Equal(expected, an...
Allow dynamic recompilation of beatmap panel testcase
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Beatmaps; using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Onli...
// 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 System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Beatmaps; using osu.Game.Online.API; using o...
Remove not used using statements
using System; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; namespace Glimpse.Agent { public class RemoteHttpMessagePublisher : IMessagePublisher, IDisposable { private readonly HttpClient _httpClient; private readonly HttpClientHandler _httpHandler; ...
using System; using System.Net.Http; namespace Glimpse.Agent { public class RemoteHttpMessagePublisher : IMessagePublisher, IDisposable { private readonly HttpClient _httpClient; private readonly HttpClientHandler _httpHandler; public RemoteHttpMessagePublisher() { ...
Add CaseInsensitiveType (None, lower, UPPER)
using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Collections.Generic; using System.IO; namespace AntlrGrammarEditor { public class Grammar { public const string AntlrDotExt = ".g4"; public const string ProjectDotExt = ".age"; public const string LexerPostfix = "Lex...
using System.Collections.Generic; namespace AntlrGrammarEditor { public enum CaseInsensitiveType { None, lower, UPPER } public class Grammar { public const string AntlrDotExt = ".g4"; public const string LexerPostfix = "Lexer"; public const string P...
Allow more of the word for the reader count, as the writer count will always be v small
using System; using System.Threading; namespace Lurchsoft.ParallelWorkshop.Ex08DiyReaderWriterLock.PossibleSolution { /// <summary> /// A scary low-level reader-writer lock implementation. /// <para> /// This one does not block, though it does yield. It will spin the CPU until the lock is available. H...
using System.Threading; namespace Lurchsoft.ParallelWorkshop.Ex08DiyReaderWriterLock.PossibleSolution { /// <summary> /// A scary low-level reader-writer lock implementation. /// <para> /// This one does not block, though it does yield. It will spin the CPU until the lock is available. However, by doi...
Make input tablet start states be set right
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; [RequireComponent(typeof(GridLayoutGroup))] public class TabletUI : MonoBehaviour, ITablet { public ITabletCell TopLeft { get { return topLeft; } set { topLeft....
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; [RequireComponent(typeof(GridLayoutGroup))] public class TabletUI : MonoBehaviour, ITablet { public ITabletCell TopLeft { get { return topLeft; } set { topLeft....
Add basic mapping functionality of log consumers
using System; namespace Atata { public static class JsonConfigMapper { public static AtataContextBuilder Map<TConfig>(TConfig config, AtataContextBuilder builder) where TConfig : JsonConfig<TConfig> { if (config.BaseUrl != null) builder.UseBaseUrl(config...
using System; namespace Atata { public static class JsonConfigMapper { public static AtataContextBuilder Map<TConfig>(TConfig config, AtataContextBuilder builder) where TConfig : JsonConfig<TConfig> { if (config.BaseUrl != null) builder.UseBaseUrl(config...
Make test actually test drum behaviours
// 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 NUnit.Framework; using osu.Framework.Allocation; using osu.Game.Beatmaps; using osu.Game.Rulesets.Taiko.Objects; using osu.Game.R...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Testing; using osu.Game.Rulesets.Taiko.UI; using osu.Game.Tests....
Fix bug where running a project without export in a directory with a space was confusing the command line arg generator.
using Common; using Exporter; using System.Linq; namespace Crayon { // cmdLineFlags = Crayon::RunCbxFlagBuilder(command, buildContext) class RunCbxFlagBuilderWorker : AbstractCrayonWorker { public override CrayonWorkerResult DoWorkImpl(CrayonWorkerResult[] args) { Ex...
using Common; using Exporter; using System.Linq; namespace Crayon { // cmdLineFlags = Crayon::RunCbxFlagBuilder(command, buildContext) class RunCbxFlagBuilderWorker : AbstractCrayonWorker { public override CrayonWorkerResult DoWorkImpl(CrayonWorkerResult[] args) { Ex...
Remove test websocket code from WF implementation
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Rs317.Sharp { public static class Program { public static async Task Main(string[] args) { try { Console.WriteLine($"RS2 user clie...
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Rs317.Sharp { public static class Program { public static async Task Main(string[] args) { try { Console.WriteLine($"RS2 user clie...
Fix to apply for the library updates.
/* ------------------------------------------------------------------------- */ // // 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://www....
/* ------------------------------------------------------------------------- */ // // 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://www....
Remove test of no longer existing method CompileApi.
using Flood.Tools.RPCGen; using NUnit.Framework; using System; using System.IO; using System.Reflection; namespace RPCGen.Tests { [TestFixture] class RPCGenTests { [Test] public void MainTest() { string genDirectory = Path.Combine("..", "..", "gen", "RPCGen.Tests"); ...
using Flood.Tools.RPCGen; using NUnit.Framework; using System; using System.IO; using System.Reflection; namespace RPCGen.Tests { [TestFixture] class RPCGenTests { [Test] public void MainTest() { string genDirectory = Path.Combine("..", "..", "gen", "RPCGen.Tests"); ...
Change usage of connection provider for connection factory.
using Dapper; using System; using System.Collections.Generic; using System.Data; using System.Text; using WordHunt.Data.Connection; namespace WordHunt.Games.Create.Repository { public interface IGameRepository { void SaveGame(string name); } public class GameRepository : IGameRepository {...
using Dapper; using System; using System.Collections.Generic; using System.Data; using System.Text; using WordHunt.Data.Connection; namespace WordHunt.Games.Create.Repository { public interface IGameRepository { void SaveGame(string name); } public class GameRepository : IGameRepository {...
Convert ErrorCause properties only when not null
using System; using System.Collections.Generic; namespace Elasticsearch.Net { internal static class ErrorCauseExtensions { public static void FillValues(this ErrorCause rootCause, IDictionary<string, object> dict) { if (dict == null) return; if (dict.TryGetValue("reason", out var reason)) rootCause.Reaso...
using System; using System.Collections.Generic; namespace Elasticsearch.Net { internal static class ErrorCauseExtensions { public static void FillValues(this ErrorCause rootCause, IDictionary<string, object> dict) { if (dict == null) return; if (dict.TryGetValue("reason", out var reason) && reason != nul...
Use Type as a key...instead of a string.
using System.Collections.Concurrent; namespace CircuitBreaker { public class CircuitBreakerStateStoreFactory { private static ConcurrentDictionary<string, ICircuitBreakerStateStore> _stateStores = new ConcurrentDictionary<string, ICircuitBreakerStateStore>(); internal static ICirc...
using System; using System.Collections.Concurrent; namespace CircuitBreaker { public class CircuitBreakerStateStoreFactory { private static ConcurrentDictionary<Type, ICircuitBreakerStateStore> _stateStores = new ConcurrentDictionary<Type, ICircuitBreakerStateStore>(); internal st...
Use continue to reduce one indentation level.
using System; using Mono.Terminal; namespace School.REPL { public class REPL { public REPL() { } public void Run() { Evaluator evaluator = new Evaluator(); LineEditor editor = new LineEditor("School"); Console.WriteLine("School REPL...
using System; using Mono.Terminal; namespace School.REPL { public class REPL { public REPL() { } public void Run() { Evaluator evaluator = new Evaluator(); LineEditor editor = new LineEditor("School"); Console.WriteLine("School REPL...
Add odd/even type to test scenes
// 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.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Mania.UI; using osuTK.Graphics; namespace ...
// 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.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Mania.Beatmaps; using osu.Game.Rulesets.Man...
Remove "public" access modifier from test class
using Machine.Specifications; namespace Quarks.Tests { [Subject(typeof(Inflector))] public class When_using_pluralize_for_count { It should_pluralize_when_count_is_greater_than_two = () => "item".PluralizeForCount(2).ShouldEqual("items"); It should_pluralize_when_count_is_zero = () => "item"....
using Machine.Specifications; namespace Quarks.Tests { [Subject(typeof(Inflector))] class When_using_pluralize_for_count { It should_pluralize_when_count_is_greater_than_two = () => "item".PluralizeForCount(2).ShouldEqual("items"); It should_pluralize_when_count_is_zero = () => "item".Plurali...
Add message debugger display to show the message type
using System; using System.Collections.Generic; namespace Foundatio.Messaging { public interface IMessage { string Type { get; } Type ClrType { get; } byte[] Data { get; } object GetBody(); IReadOnlyDictionary<string, string> Properties { get; } } public class Messa...
using System; using System.Collections.Generic; using System.Diagnostics; namespace Foundatio.Messaging { public interface IMessage { string Type { get; } Type ClrType { get; } byte[] Data { get; } object GetBody(); IReadOnlyDictionary<string, string> Properties { get; } ...
Revert "Instance isn't found if class is on a disabled GameObject."
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using UnityEngine; namespace HoloToolkit.Unity { /// <summary> /// A simplified version of the Singleton class which doesn't depend on the Instance being se...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using UnityEngine; namespace HoloToolkit.Unity { /// <summary> /// A simplified version of the Singleton class which doesn't depend on the Instance being se...
Fix mef attributes project path provider
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.ComponentModel.Composition; using Microsoft.CodeAnalysis.Host; using Microsoft.CodeAnalysis.Host.Mef; using Microsoft.CodeAn...
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Composition; using Microsoft.CodeAnalysis.Host; using Microsoft.CodeAnalysis.Host.Mef; namespace Microsoft.VisualStudio.Edi...
Add googlebot and bingbot to list of crawler user agents
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DotNetOpen.PrerenderModule { public static class Constants { #region Const public const string PrerenderIOServiceUrl = "http://service.prerender.io/"; public co...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DotNetOpen.PrerenderModule { public static class Constants { #region Const public const string PrerenderIOServiceUrl = "http://service.prerender.io/"; public co...
Remove unnecessary comment and format file.
using System; namespace Mitternacht.Modules.Verification.Exceptions { public class UserAlreadyVerifyingException : Exception {} public class UserAlreadyVerifiedException : Exception {} public class UserCannotVerifyException : Exception { } //public class Exception : Exception { } }
using System; namespace Mitternacht.Modules.Verification.Exceptions { public class UserAlreadyVerifyingException : Exception { } public class UserAlreadyVerifiedException : Exception { } public class UserCannotVerifyException : Exception { } }
Add styles and scripts to admin Layout.
<!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width" /> <title>@ViewBag.Title</title> @Styles.Render("~/Content/bootstrap.min.css") </head> <body> <div> @RenderBody() </div> @RenderSection("Scripts", false) </bo...
<!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width" /> <title>@ViewBag.Title</title> @Styles.Render("~/Content/bootstrap.min.css") @Styles.Render("~/Content/bootstrap-responsive.min.css") @Styles.Render("~/bundles/font-awesome") ...
Put version info class under namespace.
using System.Reflection; [assembly: AssemblyCompany("Yin-Chun Wang")] [assembly: AssemblyCopyright("Copyright © Yin-Chun Wang 2014")] [assembly: AssemblyVersion(_ModernWPFVersionString.Release)] [assembly: AssemblyFileVersion(_ModernWPFVersionString.Build)] [assembly: AssemblyInformationalVersion(_ModernWPFVersionSt...
using System.Reflection; [assembly: AssemblyCompany("Yin-Chun Wang")] [assembly: AssemblyCopyright("Copyright © Yin-Chun Wang 2014")] [assembly: AssemblyVersion(ModernWPF._ModernWPFVersionString.Release)] [assembly: AssemblyFileVersion(ModernWPF._ModernWPFVersionString.Build)] [assembly: AssemblyInformationalVersion...
Revert "Logging has new overload for exceptions, use it"
using Devkoes.JenkinsManager.Model.Contract; using Devkoes.JenkinsManager.UI; using Devkoes.JenkinsManager.UI.Views; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using System; namespace Devkoes.JenkinsManager.VSPackage.ExposedServices { public class VisualStudioWindowHandler : I...
using Devkoes.JenkinsManager.Model.Contract; using Devkoes.JenkinsManager.UI; using Devkoes.JenkinsManager.UI.Views; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using System; namespace Devkoes.JenkinsManager.VSPackage.ExposedServices { public class VisualStudioWindowHandler : I...
Add test for Enterprise Connect Authorize User with enumerable string
using System; using NUnit.Framework; namespace Cronofy.Test.CronofyEnterpriseConnectAccountClientTests { internal sealed class AuthorizeUser : Base { [Test] public void CanAuthorizeUser() { const string email = "test@cronofy.com"; const string callbackUrl = "htt...
using System; using NUnit.Framework; namespace Cronofy.Test.CronofyEnterpriseConnectAccountClientTests { internal sealed class AuthorizeUser : Base { [Test] public void CanAuthorizeUser() { const string email = "test@cronofy.com"; const string callbackUrl = "htt...
Use lookup before registering serializer
using System; using Mongo.Migration.Documents; using Mongo.Migration.Documents.Serializers; using Mongo.Migration.Services.Interceptors; using MongoDB.Bson; using MongoDB.Bson.Serialization; namespace Mongo.Migration.Services.MongoDB { internal class MongoRegistrator : IMongoRegistrator { private read...
using System; using Mongo.Migration.Documents; using Mongo.Migration.Documents.Serializers; using Mongo.Migration.Services.Interceptors; using MongoDB.Bson; using MongoDB.Bson.Serialization; namespace Mongo.Migration.Services.MongoDB { internal class MongoRegistrator : IMongoRegistrator { private read...
Fix problem with image adapter when an item has empty standard values.
using Sitecore.Data; using Sitecore.Data.Fields; using Sitecore.Data.Items; namespace Propeller.Mvc.Model.Adapters { public class Image : IFieldAdapter { public string Url { get; set; } public string Alt { get; set; } public void InitAdapter(Item item, ID propId) { ...
using Sitecore; using Sitecore.Data; using Sitecore.Data.Fields; using Sitecore.Data.Items; namespace Propeller.Mvc.Model.Adapters { public class Image : IFieldAdapter { public string Url { get; set; } public string Alt { get; set; } public void InitAdapter(Item item, ID propId) ...
Delete [Display](all work's without it), fix Date format in Create
using System.ComponentModel.DataAnnotations; using System; using asp_net_mvc_localization.Utils; using Newtonsoft.Json.Serialization; namespace asp_net_mvc_localization.Models { public class User { [Required] public string Username { get; set; } [Display] [Required] [M...
using System.ComponentModel.DataAnnotations; using System; using asp_net_mvc_localization.Utils; using Newtonsoft.Json.Serialization; namespace asp_net_mvc_localization.Models { public class User { [Required] public string Username { get; set; } [Required] [MyEmailAddress] ...
Fix typo on CultureView-de-De in Localization Demo
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic> @{ Layout = "razor-layout.cshtml"; } <h1>You're here based on ther German culture set in HomeModule however the HomeModule only calls return View["CultureView"]. It uses View Location Conventions therefore there must be a file called CultureView...
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic> @{ Layout = "razor-layout.cshtml"; } <h1>You're here based on the German culture set in HomeModule however the HomeModule only calls return View["CultureView"]. It uses View Location Conventions therefore there must be a file called CultureView-...
Use the new OperatingSystem class.
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/> // // Licensed under the ImageMagick License (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.imagemagick.org/script/license.php // // Unless req...
// Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/> // // Licensed under the ImageMagick License (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.imagemagick.org/script/license.php // // Unless req...
Use the correct assertion for testing null
using NUnit.Framework; using RestSharp; namespace TempoDB.Tests { [TestFixture] public class TempoDBTests { [Test] public void Defaults() { var tempodb = new TempoDB("key", "secret"); Assert.AreEqual("key", tempodb.Key); Assert.AreEqual("secret",...
using NUnit.Framework; using RestSharp; namespace TempoDB.Tests { [TestFixture] public class TempoDBTests { [Test] public void Defaults() { var tempodb = new TempoDB("key", "secret"); Assert.AreEqual("key", tempodb.Key); Assert.AreEqual("secret",...
Test para comprobar qeu soporta ficheros de 55Mb.
using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.IO; namespace StorageAzure.Tests { [TestClass()] public class BlobTests { public Boolean Exist(string fileName) { var container = new BlobContanier().Create(); var blob = container.GetBlo...
using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.IO; namespace StorageAzure.Tests { [TestClass()] public class BlobTests { public Boolean Exist(string fileName) { var container = new BlobContanier().Create(); var blob = container.GetBlo...
Add some missing user statuses
namespace SkypeSharp { public enum UserStatus { OnlineStatus, BuddyStatus, ReceivedAuthRequest } public interface IUser : ISkypeObject { string FullName { get; } string Language { get; } string Country { get; } string City { get; } void Auth...
namespace SkypeSharp { public enum UserStatus { OnlineStatus, BuddyStatus, ReceivedAuthRequest, IsAuthorized, IsBlocked, Timezone, NROF_AUTHED_BUDDIES } public interface IUser : ISkypeObject { string FullName { get; } string Language ...
Fix for using (IDisposable) statement
using System; using Cake.Core.IO; namespace Cake.Core.Scripting.Processors { /// <summary> /// Processor for using statements. /// </summary> public sealed class UsingStatementProcessor : LineProcessor { /// <summary> /// Initializes a new instance of the <see cref="UsingStatementPr...
using System; using Cake.Core.IO; namespace Cake.Core.Scripting.Processors { /// <summary> /// Processor for using statements. /// </summary> public sealed class UsingStatementProcessor : LineProcessor { /// <summary> /// Initializes a new instance of the <see cref="UsingStatementPr...
Use a stub of ITimer instead of an actual implementation
using System; using System.Threading; using FluentAssertions; using Moq; using NUnit.Framework; using PacManGame; namespace PacManGameTests { [TestFixture] public class GameTimerTest { [Test] public void GivenABoard3x4WithPacmanLookingUpAt1x2_When500msPass_ThenPacmanIsAt1x1() { ...
using System; using System.Threading; using FluentAssertions; using Moq; using NUnit.Framework; using PacManGame; namespace PacManGameTests { [TestFixture] public class GameTimerTest { [Test] public void GivenABoard3x4WithPacmanLookingUpAt1x2_When500msPass_ThenPacmanIsAt1x1() { ...
Fix hardcoded DAP log path
using CommandLineParser.Exceptions; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LSTools.DebuggerFrontend { class Program { static void Main(string[] args) { var logFile = new FileStre...
using CommandLineParser.Exceptions; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LSTools.DebuggerFrontend { class Program { static void Main(string[] args) { var currentPath = AppDomai...
Fix adding controls to PixelLayout with a different container object
using System; using Eto.Forms; using Eto.Drawing; namespace Eto.Platform.GtkSharp { public class PixelLayoutHandler : GtkLayout<Gtk.Fixed, PixelLayout>, IPixelLayout { public PixelLayoutHandler() { Control = new Gtk.Fixed(); } public void Add(Control child, int x, int y) { IGtkControl ctl = ((I...
using System; using Eto.Forms; using Eto.Drawing; namespace Eto.Platform.GtkSharp { public class PixelLayoutHandler : GtkLayout<Gtk.Fixed, PixelLayout>, IPixelLayout { public PixelLayoutHandler () { Control = new Gtk.Fixed (); } public void Add (Control child, int x, int y) { var ctl = ((IGtkContr...
Disable shortcuts and ContextMenu in web browser control.
namespace WizardFramework.HTML { partial class HtmlWizardPage<TM> { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; #region Windows Form Designer generated code /// <summary> /// R...
namespace WizardFramework.HTML { partial class HtmlWizardPage<TM> { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; #region Windows Form Designer generated code /// <summary> /// R...
Add property to whether mark new Messages as read or not
using System.Collections; using System.Collections.Generic; namespace Azuria.Community { /// <summary> /// </summary> public class MessageEnumerable : IEnumerable<Message> { private readonly int _conferenceId; private readonly bool _markAsRead; private readonly Senpai _senpai; ...
using System.Collections; using System.Collections.Generic; namespace Azuria.Community { /// <summary> /// </summary> public class MessageEnumerable : IEnumerable<Message> { private readonly int _conferenceId; private readonly Senpai _senpai; internal MessageEnumerable(int con...
Apply own control theme before templated parent's.
using System; namespace Avalonia.Styling { public class Styler : IStyler { public void ApplyStyles(IStyleable target) { _ = target ?? throw new ArgumentNullException(nameof(target)); // If the control has a themed templated parent then first apply the styles from ...
using System; namespace Avalonia.Styling { public class Styler : IStyler { public void ApplyStyles(IStyleable target) { _ = target ?? throw new ArgumentNullException(nameof(target)); // Apply the control theme. target.GetEffectiveTheme()?.TryAttach(target, t...
Add default constructor for product rating
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace ZobShop.Models { public class ProductRating { public ProductRating(int rating, string content, int productId, User author) { this.Rating = rating; this.Content = c...
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace ZobShop.Models { public class ProductRating { public ProductRating() { } public ProductRating(int rating, string content, Product product, User author) { ...
Make Shuffle<T> return IEnumerable<T> instead of IList<T>.
// // ShuffleExtensions.cs // // Copyright (c) 2017 Takashi OTSUKI // // This software is released under the MIT License. // http://opensource.org/licenses/mit-license.php // using System; using System.Collections.Generic; using System.Linq; namespace AIWolf.Lib { #if JHELP /// <summary> /// IEnumerableインターフ...
// // ShuffleExtensions.cs // // Copyright (c) 2017 Takashi OTSUKI // // This software is released under the MIT License. // http://opensource.org/licenses/mit-license.php // using System; using System.Collections.Generic; using System.Linq; namespace AIWolf.Lib { #if JHELP /// <summary> /// IEnumerableインターフ...
Switch from public properties to serializable private ones
using UnityEngine; using UnityEngine.UI; using System.Collections; /// <summary> /// UIController holds references to GUI widgets and acts as data receiver for them. /// </summary> public class UIController : MonoBehaviour, IGUIUpdateTarget { public Text SpeedText; public Slider ThrottleSlider; public Slider Engine...
using UnityEngine; using UnityEngine.UI; using System.Collections; /// <summary> /// UIController holds references to GUI widgets and acts as data receiver for them. /// </summary> public class UIController : MonoBehaviour, IGUIUpdateTarget { [SerializeField] private Text m_SpeedText; [SerializeField] private Text...
Allow to clear user defined vars.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; namespace Eco { public class UserVariables : IVariableProvider { static readonly Dictionary<string, Func<string>> _variables = new Dictionary<string, Func<string>>(); ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; namespace Eco { public class UserVariables : IVariableProvider { static readonly Dictionary<string, Func<string>> _variables = new Dictionary<string, Func<string>>(); ...
Move touch screen initialization to property getter
namespace Samples { using System; using OpenQA.Selenium; using OpenQA.Selenium.Remote; public class WpDriver : RemoteWebDriver, IHasTouchScreen { public WpDriver(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) : base(commandExecutor, desiredCapabilities) ...
namespace Samples { #region using System; using OpenQA.Selenium; using OpenQA.Selenium.Remote; #endregion public class WpDriver : RemoteWebDriver, IHasTouchScreen { #region Fields private ITouchScreen touchScreen; #endregion #region Constructors and De...
Add compilation message debug log
using System; using System.ComponentModel.Composition; using System.Net.Http; namespace NVika { internal sealed class AppVeyorBuildServer : IBuildServer { private readonly Logger _logger; public string Name { get { return "AppVeyor"; } } [ImportingConstruc...
using System; using System.ComponentModel.Composition; using System.Net.Http; namespace NVika { internal sealed class AppVeyorBuildServer : IBuildServer { private readonly Logger _logger; private readonly string _appVeyorAPIUrl; public string Name { get { return "A...
Use Cached attribute rather than CreateChildDependencies
// 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.Graphics.Primitives; namespace osu.Framework.Graphics.Containers { public class SnapTargetContainer : SnapTarget...
// 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.Graphics.Primitives; namespace osu.Framework.Graphics.Containers { public class SnapTargetContainer : SnapTarget...
Add 'fix squiggly' to the test case
using System.Diagnostics.CodeAnalysis; using Microsoft.R.Editor.Application.Test.TestShell; using Microsoft.R.Editor.ContentType; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Microsoft.R.Editor.Application.Test.Validation { [ExcludeFromCodeCoverage] [TestClass] public class ErrorTagTest {...
using System.Diagnostics.CodeAnalysis; using Microsoft.R.Editor.Application.Test.TestShell; using Microsoft.R.Editor.ContentType; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Microsoft.R.Editor.Application.Test.Validation { [ExcludeFromCodeCoverage] [TestClass] public class ErrorTagTest {...
Allow the scope popping code to work correctly when all you have is the Interface.
 namespace LinqToTTreeInterfacesLib { /// <summary> /// Interface for implementing an object that will contain a complete single query /// </summary> public interface IGeneratedCode { /// <summary> /// Add a new statement to the current spot where the "writing" currsor is p...
 namespace LinqToTTreeInterfacesLib { /// <summary> /// Interface for implementing an object that will contain a complete single query /// </summary> public interface IGeneratedCode { /// <summary> /// Add a new statement to the current spot where the "writing" currsor is p...
Disable a test hanging on TeamCity for Linux
using System; using NUnit.Framework; namespace SIL.Windows.Forms.Tests.Progress.LogBox { [TestFixture] public class LogBoxTests { private Windows.Forms.Progress.LogBox progress; [Test] public void ShowLogBox() { Console.WriteLine("Showing LogBox"); using (var e = new LogBoxFormForTest()) { prog...
using System; using NUnit.Framework; namespace SIL.Windows.Forms.Tests.Progress.LogBox { [TestFixture] public class LogBoxTests { private Windows.Forms.Progress.LogBox progress; [Test] [Category("KnownMonoIssue")] // this test hangs on TeamCity for Linux public void ShowLogBox() { Console.WriteLine("Sh...
Add extension method to call Fetch on destination instance, e.g. _myFolder.Fetch ('dropbox://myfile.png')
using System; using System.Reactive.Linq; using System.Threading.Tasks; namespace Stampsy.ImageSource { internal static class Extensions { public static IObservable<T> SurroundWith<T> (this IObservable<T> a, IObservable<T> b) { return b.Concat (a).Concat (b); } publ...
using System; using System.Reactive.Linq; using System.Threading.Tasks; namespace Stampsy.ImageSource { public static class Extensions { public static Task<TRequest> Fetch<TRequest> (this IDestination<TRequest> destination, Uri url) where TRequest : Request { return Imag...
Access operator for array is now "item"
using System; using System.Collections.Generic; using System.Linq; using hw.UnitTest; namespace Reni.FeatureTest.Reference { [TestFixture] [ArrayElementType1] [Target(@" a: 'Text'; t: a type >>; t dump_print ")] [Output("(bit)*8[text_item]")] public sealed class ArrayElementType : CompilerTest {} }
using System; using System.Collections.Generic; using System.Linq; using hw.UnitTest; namespace Reni.FeatureTest.Reference { [TestFixture] [ArrayElementType1] [Target(@" a: 'Text'; t: a type item; t dump_print ")] [Output("(bit)*8[text_item]")] public sealed class ArrayElementType : CompilerTest {}...
Prepare for new implementation of Aggregate Atomic Action
// <auto-generated/> using System.Reflection; [assembly: AssemblyTitleAttribute("Elders.Cronus")] [assembly: AssemblyDescriptionAttribute("Elders.Cronus")] [assembly: AssemblyProductAttribute("Elders.Cronus")] [assembly: AssemblyVersionAttribute("2.0.0")] [assembly: AssemblyInformationalVersionAttribute("2.0.0")] [as...
// <auto-generated/> using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitleAttribute("Elders.Cronus")] [assembly: AssemblyDescriptionAttribute("Elders.Cronus")] [assembly: ComVisibleAttribute(false)] [assembly: AssemblyProductAttribute("Elders.Cronus")] [assembly: AssemblyCopyrightAtt...
Remove invalid characters from slug, but keep in title.
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using BlogTemplate.Models; namespace BlogTemplate.Services { public class SlugGenerator { private BlogDataStore _dataStore; public SlugGenerator(Bl...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using BlogTemplate.Models; namespace BlogTemplate.Services { public class SlugGenerator { private BlogDataStore _dataStore; public SlugGenerator(Bl...
Change default dps update rate to 0
using RainbowMage.OverlayPlugin; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; namespace Cactbot { public class CactbotOverlayConfig : OverlayConfigBase { public static string CactbotAssemblyUri { get { r...
using RainbowMage.OverlayPlugin; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; namespace Cactbot { public class CactbotOverlayConfig : OverlayConfigBase { public static string CactbotAssemblyUri { get { r...
Fix for supporting Items without weights.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace RandomGen.Fluent { public interface IRandom : IFluentInterface { INumbers Numbers { get; } INames Names { get; } ITime Time { get; } IText Text { get; } IInternet Internet { ...
using System; using System.Collections.Generic; namespace RandomGen.Fluent { public interface IRandom : IFluentInterface { INumbers Numbers { get; } INames Names { get; } ITime Time { get; } IText Text { get; } IInternet Internet { get; } IPhoneNumbers PhoneNumb...
Replace accidental tab with spaces
// 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.Rulesets.Osu.Skinning { public enum OsuSkinConfiguration { HitCirclePrefix, HitCircleOverlap, SliderBorderSize, ...
// 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.Rulesets.Osu.Skinning { public enum OsuSkinConfiguration { HitCirclePrefix, HitCircleOverlap, SliderBorderSize, ...
Load next level after 0.33 seconds to prvent button from being stuck and animation to finish
using UnityEngine; using System.Collections; using UnityEngine.UI; using UnityEngine.SceneManagement; public class GameScreen : MonoBehaviour { bool allowLevelLoad = true; void OnEnable() { allowLevelLoad = true; } public void LoadScene(string sceneName) { if (allowLevelLoad) { ...
using UnityEngine; using System.Collections; using UnityEngine.UI; using UnityEngine.SceneManagement; public class GameScreen : MonoBehaviour { bool allowLevelLoad = true; string nextLevel; void OnEnable() { allowLevelLoad = true; } public void LoadScene(string sceneName) { ...
Use Dictionary and removes setter
using System.Collections.Generic; namespace Markdig { /// <summary> /// Provides a context that can be used as part of parsing Markdown documents. /// </summary> public sealed class MarkdownParserContext { /// <summary> /// Gets or sets the context property collection. /// <...
using System.Collections.Generic; namespace Markdig { /// <summary> /// Provides a context that can be used as part of parsing Markdown documents. /// </summary> public sealed class MarkdownParserContext { /// <summary> /// Gets or sets the context property collection. /// <...
Add DebuggerHidden attribute so VS doesn't break when `Break on User-Unhandled Exceptions` is checked
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System; using System.Threading; namespace CefSharp.Example { public class AsyncBoundObject { public void Error() { ...
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System; using System.Diagnostics; using System.Threading; namespace CefSharp.Example { public class AsyncBoundObject { //We...
Copy score during submission process to ensure it isn't modified
// 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.Diagnostics; using osu.Game.Online.API; using osu.Game.Online.Rooms; using osu.Game.Online.Solo; using osu.Game.Rulesets; using osu.Game.Scorin...
// 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.Diagnostics; using osu.Game.Online.API; using osu.Game.Online.Rooms; using osu.Game.Online.Solo; using osu.Game.Rulesets; using osu.Game.Scorin...
Change the way version is displayed
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.W...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.W...
Fix 1M score being possible with only GREATs in mania
// 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.Rulesets.Judgements; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Mania.Judgements { public class ManiaJudgement : Judgement { ...
// 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.Rulesets.Judgements; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Mania.Judgements { public class ManiaJudgement : Judgement { ...
Make the about window have a space in the application name
using System; using System.IO; using System.Reflection; using System.Windows.Forms; namespace VigilantCupcake.SubForms { partial class AboutBox : Form { public AboutBox() { InitializeComponent(); this.Text = String.Format("About {0}", AssemblyTitle); this.labelProduct...
using System; using System.IO; using System.Reflection; using System.Windows.Forms; namespace VigilantCupcake.SubForms { partial class AboutBox : Form { public AboutBox() { InitializeComponent(); this.Text = String.Format("About {0}", AssemblyTitle); this.labelProduct...
Reset VM to be Service based
using System; using System.Net.Http; using System.Windows; using SwitchClient.Classic; using SwitchClient.Hyper; namespace WpfSwitchClient { public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { var client = new HttpClient() {...
using System; using System.Net.Http; using System.Windows; using SwitchClient.Classic; using SwitchClient.Hyper; namespace WpfSwitchClient { public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { var client = new HttpClient() {...
Remove server header form http responses
using System; using System.Security.Claims; using System.Web.Helpers; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using FluentValidation.Mvc; using Microsoft.ApplicationInsights; using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Azure; using NLog; using NLog.Targets;...
using System; using System.Security.Claims; using System.Web; using System.Web.Helpers; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using FluentValidation.Mvc; using Microsoft.ApplicationInsights; using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Azure; using NLog; u...
Update to default Razor snippet we use to help with Block List editor
@inherits UmbracoViewPage<BlockListModel> @using Umbraco.Core.Models.Blocks @{ if (Model?.Layout == null || !Model.Layout.Any()) { return; } } <div class="umb-block-list"> @foreach (var layout in Model.Layout) { if (layout?.Udi == null) { continue; } var data = layout.Data; ...
@inherits UmbracoViewPage<BlockListModel> @using Umbraco.Core.Models.Blocks @{ if (!Model.Any()) { return; } } <div class="umb-block-list"> @foreach (var block in Model) { if (block?.ContentUdi == null) { continue; } var data = block.Content; @Html.Partial("BlockList/Compo...
Change field and variable names from context to handle
using System; namespace PcscDotNet { public class PcscContext : IDisposable { private SCardContext _context; private readonly Pcsc _pcsc; private readonly IPcscProvider _provider; public bool IsDisposed { get; private set; } = false; public bool IsEstablished => _con...
using System; namespace PcscDotNet { public class PcscContext : IDisposable { private SCardContext _handle; private readonly Pcsc _pcsc; private readonly IPcscProvider _provider; public bool IsDisposed { get; private set; } = false; public bool IsEstablished => _hand...
Make TreeWalkForGitDir() delegate to LibGit2Sharp
namespace GitFlowVersion { using System.IO; public class GitDirFinder { public static string TreeWalkForGitDir(string currentDirectory) { while (true) { var gitDir = Path.Combine(currentDirectory, @".git"); if (Directory.Exists(gitDi...
namespace GitFlowVersion { using System.IO; using LibGit2Sharp; public class GitDirFinder { public static string TreeWalkForGitDir(string currentDirectory) { string gitDir = Repository.Discover(currentDirectory); if (gitDir != null) { ...
Support both landscape and portrait mode
// 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 Android.App; using Android.Content.PM; using Android.OS; using Android.Views; using osu.Framework.Android; namespace osu.Android { [Activity(Theme = "@android...
// 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 Android.App; using Android.Content.PM; using Android.OS; using Android.Views; using osu.Framework.Android; namespace osu.Android { [Activity(Theme = "@android...
Add ability to set width and height when setting the image
using WootzJs.Mvc.Mvc.Views.Css; using WootzJs.Web; namespace WootzJs.Mvc.Mvc.Views { public class Image : InlineControl { public Image() { } public Image(string source) { Source = source; } public Image(string defaultSource, string highlig...
using WootzJs.Mvc.Mvc.Views.Css; using WootzJs.Web; namespace WootzJs.Mvc.Mvc.Views { public class Image : InlineControl { public Image() { } public Image(string source, int? width = null, int? height = null) { Source = source; if (width != null...
Call signalr hub base method in case of exception in user codes of signalr hub events class
using System.Threading.Tasks; using Microsoft.AspNet.SignalR; using Microsoft.Owin; using Foundation.Api.Middlewares.SignalR.Contracts; namespace Foundation.Api.Middlewares.SignalR { public class MessagesHub : Hub { public override async Task OnConnected() { IOwinContext context = ...
using System.Threading.Tasks; using Microsoft.AspNet.SignalR; using Microsoft.Owin; using Foundation.Api.Middlewares.SignalR.Contracts; namespace Foundation.Api.Middlewares.SignalR { public class MessagesHub : Hub { public override async Task OnConnected() { try { ...
Use absolute path on linux
using System.Runtime.InteropServices; namespace RebirthTracker { /// <summary> /// Class to keep track of OS-specific configuration settings /// </summary> public static class Configuration { /// <summary> /// Get the folder where files should be stored /// </summary> ...
using System.Runtime.InteropServices; namespace RebirthTracker { /// <summary> /// Class to keep track of OS-specific configuration settings /// </summary> public static class Configuration { /// <summary> /// Get the folder where files should be stored /// </summary> ...
Create a TODO to revert the locking code.
using System; using System.Text; using P2E.Interfaces.Services; namespace P2E.Services { public class UserCredentialsService : IUserCredentialsService { // Syncs console output/input between instance so that only one // instance can request user credentials at any time. private static...
using System; using System.Text; using P2E.Interfaces.Services; namespace P2E.Services { public class UserCredentialsService : IUserCredentialsService { // TODO - revert that stuipd locking idea and introduce a Credentials class instead. // Syncs console output/input between instance so that ...
Add duration as statistical value for blocks in TeamCity
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Diagnostics.CodeAnalysis; using System.Linq; using JetBrains.Annotations; using Nuke.Common.OutputSinks; using Nuke.Common.Utilities; namespace Nuke.Common...
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using JetBrains.Annotations; using Nuke.Common.OutputSinks; using Nuke.Common.Utiliti...