Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Return File() result (file on the server).
using System.Web.Mvc; namespace OdeToFood.Controllers { public class CuisineController : Controller { // // GET: /Cuisine/ // Including parameter named "name" causes MVC framework to try to // find a parameter named "name" in ANY of the web request (routing // data, q...
using System.Net; using System.Web.Mvc; namespace OdeToFood.Controllers { public class CuisineController : Controller { // // GET: /Cuisine/ // Including parameter named "name" causes MVC framework to try to // find a parameter named "name" in ANY of the web request (routing ...
Add more reporters by default
using System; using System.Collections.Generic; using Assent.Reporters.DiffPrograms; namespace Assent.Reporters { public class DiffReporter : IReporter { #if NET45 internal static readonly bool IsWindows = Environment.OSVersion.Platform == PlatformID.Win32NT; #else internal static readonly bool...
using System; using System.Collections.Generic; using Assent.Reporters.DiffPrograms; namespace Assent.Reporters { public class DiffReporter : IReporter { #if NET45 internal static readonly bool IsWindows = Environment.OSVersion.Platform == PlatformID.Win32NT; #else internal static readonly bool...
Put Squirrel updater behind conditional compilation flag
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. using OpenLiveWriter.CoreServices; using OpenLiveWriter.CoreServices.ResourceDownloading; using Squirrel; using System; using System.Collections; using System.Diagnostics; using S...
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. using OpenLiveWriter.CoreServices; using OpenLiveWriter.CoreServices.ResourceDownloading; using Squirrel; using System; using System.Collections; using System.Diagnostics; using S...
Stop using [Timeout] so that there should be no thread abort on the test thread
#if !NETSTANDARD1_3 && !NETSTANDARD1_6 using System.Runtime.InteropServices; using System.Threading; namespace NUnit.Framework.Internal { [TestFixture] public class ThreadUtilityTests { [Platform("Win")] [Timeout(1000)] [TestCase(false, TestName = "Abort")] [TestCase(true,...
#if !NETSTANDARD1_3 && !NETSTANDARD1_6 using System.Runtime.InteropServices; using System.Threading; namespace NUnit.Framework.Internal { [TestFixture] public class ThreadUtilityTests { [Platform("Win")] [TestCase(false, TestName = "Abort")] [TestCase(true, TestName = "Kill")] ...
Disable local hover in cloud env
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.ComponentModel.Composition; using Microsoft.CodeAnalysis.Editor.Host; using Microsoft.Co...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.ComponentModel.Composition; using Microsoft.CodeAnalysis.Editor.Host; using Microsoft.Co...
Fix chainedresult to actually chain the results if there are more than 2
using LogicalShift.Reason.Api; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace LogicalShift.Reason.Solvers { /// <summary> /// A query result where the next result is retrieved by a function /// </summary> public class ChainedResult : IQueryRe...
using LogicalShift.Reason.Api; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace LogicalShift.Reason.Solvers { /// <summary> /// A query result where the next result is retrieved by a function /// </summary> public class ChainedResult : IQueryRe...
Update comment about when a section view can't be removed
using System; using System.Reactive.Disposables; using SolidWorks.Interop.sldworks; namespace SolidworksAddinFramework { public static class ModelViewManagerExtensions { public static IDisposable CreateSectionView(this IModelViewManager modelViewManager, Action<SectionViewData> config) { ...
using System; using System.Reactive.Disposables; using SolidWorks.Interop.sldworks; namespace SolidworksAddinFramework { public static class ModelViewManagerExtensions { public static IDisposable CreateSectionView(this IModelViewManager modelViewManager, Action<SectionViewData> config) { ...
Fix Typo in Unix Lock/Unlock PAL
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; internal static partial class Interop { internal static par...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Runtime.InteropServices; internal static partial class Interop { internal static par...
Allow redirectUrl and custom layout on home page
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using wwwplatform.Extensions; using wwwplatform.Models; namespace wwwplatform.Controllers { public class HomeController : BaseController { public ActionResult Index() { var pa...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using wwwplatform.Extensions; using wwwplatform.Models; namespace wwwplatform.Controllers { public class HomeController : BaseController { public ActionResult Index() { var pa...
Handle null id for Cars/Details action
using CarFuel.Models; using CarFuel.Services; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Microsoft.AspNet.Identity; using CarFuel.DataAccess; namespace CarFuel.Controllers { public class CarsController : Controller { //private stati...
using CarFuel.Models; using CarFuel.Services; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Microsoft.AspNet.Identity; using CarFuel.DataAccess; using System.Net; namespace CarFuel.Controllers { public class CarsController : Controller { ...
Add integration test for same.
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; using System.Threading.Tasks; namespace Box.V2.Test.Integration { [TestClass] public class BoxUsersManagerTestIntegration : BoxResourceManagerTestIntegration { [TestMethod] public async Task UsersInform...
using System; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; using System.Threading.Tasks; namespace Box.V2.Test.Integration { [TestClass] public class BoxUsersManagerTestIntegration : BoxResourceManagerTestIntegration { [TestMethod] public asy...
Fix editor crashing when loading a beatmap for an unsupported ruleset
// 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.Containers; using osu.Game.Rulesets.Edit; using osu.Game.Screens.Edit.Compose.Components.Timeline; using osu.Ga...
// 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.Containers; using osu.Game.Rulesets.Edit; using osu.Game.Screens.Edit.Compose.Components.Timeline; using osu.Ga...
Make Master/Detail sample not rely on WPF magic
using System; namespace Stylet.Samples.MasterDetail { public class EmployeeModel { public string Name { get; set; } } }
using System; namespace Stylet.Samples.MasterDetail { public class EmployeeModel : PropertyChangedBase { private string _name; public string Name { get { return this._name; } set { this.SetAndNotify(ref this._name, value); } } } }
Handle case where no facts are published.
using System.Threading.Tasks; using System.Web.Mvc; using DancingGoat.Models; using System.Collections.Generic; namespace DancingGoat.Controllers { public class AboutController : ControllerBase { public async Task<ActionResult> Index() { var response = await client.GetItemAsync<Abo...
using System.Threading.Tasks; using System.Web.Mvc; using DancingGoat.Models; using System.Collections.Generic; using KenticoCloud.Delivery; namespace DancingGoat.Controllers { public class AboutController : ControllerBase { public async Task<ActionResult> Index() { var response = a...
Set Version Numer for 3.0.3.1
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("SiteWarmer.Core")] [assembly: AssemblyDes...
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("SiteWarmer.Core")] [assembly: AssemblyDes...
Make way for future improvements
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) 2015, MPL Ali Taheri Moghaddar ali.taheri.m@gmail.com */ namespace Pablo.Graphics { /...
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) 2015, MPL Ali Taheri Moghaddar ali.taheri.m@gmail.com */ namespace Pablo.Graphics { /...
Set Default-LogLevel to Debug since Trace isn't really logged onto the console.
using Microsoft.Extensions.Logging; using Newtonsoft.Json; namespace ExRam.Gremlinq.Providers.WebSocket { public readonly struct QueryLoggingOptions { public static readonly QueryLoggingOptions Default = new QueryLoggingOptions(LogLevel.Trace, QueryLoggingVerbosity.QueryOnly, Formatting.None); ...
using Microsoft.Extensions.Logging; using Newtonsoft.Json; namespace ExRam.Gremlinq.Providers.WebSocket { public readonly struct QueryLoggingOptions { public static readonly QueryLoggingOptions Default = new QueryLoggingOptions(LogLevel.Debug, QueryLoggingVerbosity.QueryOnly, Formatting.None); ...
Fix tournament POST not wrapping return value in an object.
using System; using System.Linq; using System.Web.Http; using Peregrine.Data; namespace Peregrine.Web.Controllers { [RoutePrefix("api/tournaments")] public class TournamentsController : ApiController { [Route] public IHttpActionResult Get() { using(var dataContext = new DataContext()) { ...
using System; using System.Linq; using System.Web.Http; using Peregrine.Data; namespace Peregrine.Web.Controllers { [RoutePrefix("api/tournaments")] public class TournamentsController : ApiController { [Route] public IHttpActionResult Get() { using(var dataContext = new DataContext()) { ...
Update the TryGetJointPose docs to accurately describe the set of inputs it can take.
// 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.Utilities; namespace Microsoft.MixedReality.Toolkit.Input { public static class HandJointUtils { /// <summary> ...
// 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.Utilities; namespace Microsoft.MixedReality.Toolkit.Input { public static class HandJointUtils { /// <summary> ...
Move call to UseFluentActions before UseMvc in hello world sample project
using ExplicitlyImpl.AspNetCore.Mvc.FluentActions; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace HelloWorld { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddMvc().AddFluentActions(); ...
using ExplicitlyImpl.AspNetCore.Mvc.FluentActions; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace HelloWorld { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddMvc().AddFluentActions(); ...
Load fonts over https if using https
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Vaskelista</title> @Styles.Render("~/Content/css") @Mvc.RazorTools.Bundl...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Vaskelista</title> @Styles.Render("~/Content/css") @Mvc.RazorTools.Bundl...
Add description in test case.
// Copyright (c) 2007-2017 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 System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.Graphics; using osu.Fra...
// Copyright (c) 2007-2017 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 System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.Graphics; using osu.Fra...
Rollback now uses the changes field of the change collection instead of traverse flat.
using System; using System.Linq; using System.Transactions; using NMF.Expressions; using NMF.Models.Evolution; using NMF.Models.Repository; namespace NMF.Models { class NMFTransaction : IDisposable { private bool _committed; private readonly ExecutionEngine _engine = ExecutionEngine.Current; ...
using System; using System.Linq; using System.Transactions; using NMF.Expressions; using NMF.Models.Evolution; using NMF.Models.Repository; namespace NMF.Models { class NMFTransaction : IDisposable { private bool _committed; private readonly ExecutionEngine _engine = ExecutionEngine.Current; ...
Switch to ImmutableArray to prevent accidental mutation
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable disable using System.Diagnostics; using System.Globalization; namespace Microsoft.CodeAnalysis.Language...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Immutable; using System.Diagnostics; using System.Globalization; namespace Microsoft.Code...
Enable all kernel tests again.
using System; namespace Cosmos.TestRunner.Core { public static class DefaultEngineConfiguration { public static void Apply(Engine engine) { if (engine == null) { throw new ArgumentNullException("engine"); } engine.AddKernel(type...
using System; namespace Cosmos.TestRunner.Core { public static class DefaultEngineConfiguration { public static void Apply(Engine engine) { if (engine == null) { throw new ArgumentNullException("engine"); } engine.AddKernel(type...
Fix string.ToUpper/ToLower to use the computed result
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Diagnostics.Contracts; using System.Text; namespace System.Globalization { public partial class TextInfo { ////////////////////////////////...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Diagnostics.Contracts; using System.Text; namespace System.Globalization { public partial class TextInfo { ////////////////////////////////...
Fix wrong class hierarchy in Abstract class test cases
namespace Serilog.Tests.Support { public abstract class DummyAbstractClass { } public class DummyConcreteClassWithDefaultConstructor { // ReSharper disable once UnusedParameter.Local public DummyConcreteClassWithDefaultConstructor(string param = "") { } } p...
namespace Serilog.Tests.Support { public abstract class DummyAbstractClass { } public class DummyConcreteClassWithDefaultConstructor : DummyAbstractClass { // ReSharper disable once UnusedParameter.Local public DummyConcreteClassWithDefaultConstructor(string param = "") { ...
Change string to int for mark
namespace CloudantDotNet.Models { public class ToDoItem { public string id { get; set; } public string rev { get; set; } public string text { get; set; } } public class VREntryItem { public string id { get; set; } public string rev { get; set; } publi...
namespace CloudantDotNet.Models { public class ToDoItem { public string id { get; set; } public string rev { get; set; } public string text { get; set; } } public class VREntryItem { public string id { get; set; } public string rev { get; set; } publi...
Fix StructureMap missing default convention for React.Config
using System; using StructureMap; namespace Reactive.Config.StructureMap { public static class ContainerExtensions { public static void ReactiveConfig(this ConfigurationExpression config, Action<IReactiveConfigRegistry> action) { config.For<IKeyPathProvider>().Use<NamespaceKeyPathP...
using System; using StructureMap; namespace Reactive.Config.StructureMap { public static class ContainerExtensions { public static void ReactiveConfig(this ConfigurationExpression config, Action<IReactiveConfigRegistry> action) { config.Scan(s => { s.Ass...
Support computing navigation bar items for source generated files
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnaly...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnaly...
Update class name to reflect additional test
using NUnit.Framework; using FluentMigrator.Infrastructure; namespace FluentMigrator.Tests.Unit { using System.Collections.ObjectModel; using System.Linq; using FluentMigrator.Expressions; using Moq; [TestFixture] public class AutoReversingMigrationTests { private Mock<IMigrationCo...
using NUnit.Framework; using FluentMigrator.Infrastructure; namespace FluentMigrator.Tests.Unit { using System.Collections.ObjectModel; using System.Linq; using FluentMigrator.Expressions; using Moq; [TestFixture] public class AutoReversingMigrationTests { private Mock<IMigrationCo...
Change RedisSubscriberConnection externally owned in Autofac registration
using Autofac; using BookSleeve; using Compilify.Web.Services; namespace Compilify.Web.Infrastructure.DependencyInjection { public class RedisModule : Module { protected override void Load(ContainerBuilder builder) { builder.Register(x => RedisConnectionGateway.Current) ...
using Autofac; using BookSleeve; using Compilify.Web.Services; namespace Compilify.Web.Infrastructure.DependencyInjection { public class RedisModule : Module { protected override void Load(ContainerBuilder builder) { builder.Register(x => RedisConnectionGateway.Current) ...
Fix Uap TFM to include Aot
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; namespace Xunit { [Flags] public enum TargetFrameworkMonikers { Net45 = 0x1, ...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; namespace Xunit { [Flags] public enum TargetFrameworkMonikers { Net45 = 0x1, ...
Support params usage as input for tests
// Copyright (c) Martin Costello, 2015. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. namespace MartinCostello.AdventOfCode.Puzzles { using Xunit; /// <summary> /// A class containing methods for helping to test puzzl...
// Copyright (c) Martin Costello, 2015. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. namespace MartinCostello.AdventOfCode.Puzzles { using Xunit; /// <summary> /// A class containing methods for helping to test puzzle...
Test Commit for Slack Integration
using System.Collections; using System.Collections.Generic; using UnityEngine; public class AIController : MonoBehaviour { public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding public Transform target; // tar...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class AIController : MonoBehaviour { public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding public Transform target; // tar...
Fix an issue with assembly binding which prevents the tests from running by removing the AssemblyCulture.
// Copyright (c) Timm Krause. All rights reserved. See LICENSE file in the project root for license information. using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("AspNet.Identity.OracleProvider")] [assembly: AssemblyDescription("ASP.NET Id...
// Copyright (c) Timm Krause. All rights reserved. See LICENSE file in the project root for license information. using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("AspNet.Identity.OracleProvider")] [assembly: AssemblyDescription("ASP.NET Id...
Update model project to minor version 11
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("Pr...
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("Pr...
Change load event of UI component to from Awake to Start
using System.Collections; using PatchKit.Api; using UnityEngine; namespace PatchKit.Unity.UI { public abstract class UIApiComponent : MonoBehaviour { private Coroutine _loadCoroutine; private bool _isDirty; private ApiConnection _apiConnection; public bool LoadOnAwake = true...
using System.Collections; using PatchKit.Api; using UnityEngine; namespace PatchKit.Unity.UI { public abstract class UIApiComponent : MonoBehaviour { private Coroutine _loadCoroutine; private bool _isDirty; private ApiConnection _apiConnection; public bool LoadOnStart = true...
Add nullability for helper extensions
using System; using System.IO; using System.Linq; using System.Net.Http; using System.Text; using Telegram.Bot.Types; using Telegram.Bot.Types.Enums; namespace Telegram.Bot.Helpers { /// <summary> /// Extension Methods /// </summary> internal static class Extensions { static string EncodeUt...
using System; using System.IO; using System.Linq; using System.Net.Http; using System.Text; using Telegram.Bot.Types; using Telegram.Bot.Types.Enums; namespace Telegram.Bot.Helpers { /// <summary> /// Extension Methods /// </summary> internal static class Extensions { static string EncodeUt...
Add necessary assembly info to project.
//----------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Junle Li"> // Copyright (c) Junle Li. All rights reserved. // </copyright> //----------------------------------------------------------------------- using System.Reflection; using System.Runtime...
//----------------------------------------------------------------------- // <copyright file="AssemblyInfo.cs" company="Junle Li"> // Copyright (c) Junle Li. All rights reserved. // </copyright> //----------------------------------------------------------------------- using System.Reflection; using System.Runtime...
Change code to use async defer call for Google Maps
@using System.Web.Mvc.Html @inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic> @if (Model.value != null) { string value = Model.value.ToString(); var id = Guid.NewGuid().ToString() + "_map"; var js_id = id.Replace('-', '_'); <div class="map gridmaps" id="@id" style="width:100%;"></div> <script t...
@inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic> @if (Model.value != null) { string value = Model.value.ToString(); var id = string.Format("{0}_map", Guid.NewGuid()); <div class="map gridmaps" id="@id" style="width:100%;"></div> <script type="text/javascript"> function initializeMap() { ...
Fix unit test by specifying the font in the test image.
// Copyright (c) The Avalonia Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using System.Threading.Tasks; using Avalonia.Controls; using Avalonia.Layout; using Avalonia.Media; using Xunit; #if AVALONIA_SKIA namespace Avalonia.Ski...
// Copyright (c) The Avalonia Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using System.Threading.Tasks; using Avalonia.Controls; using Avalonia.Layout; using Avalonia.Media; using Xunit; #if AVALONIA_SKIA namespace Avalonia.Ski...
Delete corrupted downloads after an error
using System; using System.ComponentModel; using System.IO; using System.Net; namespace TweetLib.Core.Utils{ public static class WebUtils{ private static bool HasMicrosoftBeenBroughtTo2008Yet; private static void EnsureTLS12(){ if (!HasMicrosoftBeenBroughtTo2008Yet){ S...
using System; using System.ComponentModel; using System.IO; using System.Net; namespace TweetLib.Core.Utils{ public static class WebUtils{ private static bool HasMicrosoftBeenBroughtTo2008Yet; private static void EnsureTLS12(){ if (!HasMicrosoftBeenBroughtTo2008Yet){ S...
Remove meta charset from fortunes in ASP.NET
@model IEnumerable<Benchmarks.AspNet.Models.Fortune> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fortunes</title> </head> <body> <table> <tr> <th>id</th> <th>message</th> </tr> @foreach (var fortune in Model) { <tr> <td>@fortune.ID</td> <td>@fortune.Message</td> </tr> } </table...
@model IEnumerable<Benchmarks.AspNet.Models.Fortune> <!DOCTYPE html> <html> <head> <title>Fortunes</title> </head> <body> <table> <tr> <th>id</th> <th>message</th> </tr> @foreach (var fortune in Model) { <tr> <td>@fortune.ID</td> <td>@fortune.Message</td> </tr> } </table> </body> </html>
Change variable name per review request
using MQTTnet.Client.Connecting; using MQTTnet.Exceptions; namespace MQTTnet.Adapter { public class MqttConnectingFailedException : MqttCommunicationException { public MqttConnectingFailedException(MqttClientAuthenticateResult resultCode) : base($"Connecting with MQTT server failed ({resul...
using MQTTnet.Client.Connecting; using MQTTnet.Exceptions; namespace MQTTnet.Adapter { public class MqttConnectingFailedException : MqttCommunicationException { public MqttConnectingFailedException(MqttClientAuthenticateResult result) : base($"Connecting with MQTT server failed ({result.Re...
Update accessor constructor used for tests
using System; using System.Threading.Tasks; using BlogApp.Common.Contracts.Accessors; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using StackExchange.Redis; namespace BlogApp.Accessors { public sealed class BlogCacheAccessor : ICacheAccessor { #region Constructor and private membe...
using System; using System.Threading.Tasks; using BlogApp.Common.Contracts.Accessors; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using StackExchange.Redis; namespace BlogApp.Accessors { public sealed class BlogCacheAccessor : ICacheAccessor { #region Constructor and private membe...
Comment should be // not ///
#if LESSTHAN_NET471 || LESSTHAN_NETCOREAPP20 || LESSTHAN_NETSTANDARD21 // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; namespace System.Runtime.CompilerServices { /// <summary> /// Reserved ...
#if LESSTHAN_NET471 || LESSTHAN_NETCOREAPP20 || LESSTHAN_NETSTANDARD21 // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; namespace System.Runtime.CompilerServices { /// <summary> /// Reserved ...
Test coverage for simple void blocks with a variable
namespace AgileObjects.ReadableExpressions.UnitTests { using System; using System.Linq.Expressions; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] public class WhenTranslatingBlockExpressions { [TestMethod] public void ShouldTranslateANoVariableNoReturnValueBlo...
namespace AgileObjects.ReadableExpressions.UnitTests { using System; using System.Linq.Expressions; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] public class WhenTranslatingBlockExpressions { [TestMethod] public void ShouldTranslateANoVariableBlockWithNoRetur...
Remove redundant call to SatisfyImportsOnce
using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; using System.Windows; using GitHub.Exports; using GitHub.Services; using GitHub.ViewModels; namespace GitHub.Factories { /// <summary> /// Factory for creating views and view models. /// </summary> ...
using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; using System.Windows; using GitHub.Exports; using GitHub.Services; using GitHub.ViewModels; namespace GitHub.Factories { /// <summary> /// Factory for creating views and view models. /// </summary> ...
Fix osu!mania failing due to 0 hp.
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Rulesets.Mania.Judgements; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.UI; namespace osu.Gam...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Rulesets.Mania.Judgements; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.UI; namespace osu.Gam...
Update information about valid archive types
using CommandLine; namespace Arkivverket.Arkade.CLI { public abstract class ArchiveProcessingOptions : OutputOptions { [Option('t', "type", HelpText = "Optional. Archive type, valid values: noark3, noark5 or fagsystem")] public string ArchiveType { get; set; } [Option('a', "archive", H...
using CommandLine; namespace Arkivverket.Arkade.CLI { public abstract class ArchiveProcessingOptions : OutputOptions { [Option('t', "type", HelpText = "Optional. Archive type, valid values: noark3, noark4, noark5 or fagsystem")] public string ArchiveType { get; set; } [Option('a', "arc...
Normalize newlines in json test.
using System.Linq; using System.Text; using AsmResolver.DotNet.Bundles; using AsmResolver.PE.DotNet.Metadata.Strings; using AsmResolver.PE.DotNet.Metadata.Tables; using AsmResolver.PE.DotNet.Metadata.Tables.Rows; using Xunit; namespace AsmResolver.DotNet.Tests.Bundles { public class BundleFileTest { [F...
using System.Linq; using System.Text; using AsmResolver.DotNet.Bundles; using AsmResolver.PE.DotNet.Metadata.Strings; using AsmResolver.PE.DotNet.Metadata.Tables; using AsmResolver.PE.DotNet.Metadata.Tables.Rows; using Xunit; namespace AsmResolver.DotNet.Tests.Bundles { public class BundleFileTest { [F...
Update to Castle Rock header text
@using CkanDotNet.Web.Models.Helpers <p>As part of an initiative to improve the accessibility, transparency, and accountability of the Town of Castle Rock, this catalog provides open access to City-managed data. </p> @if (SettingsHelper.GetUserVoiceEnabled()) { <p>We invite you to actively participate in shapin...
@using CkanDotNet.Web.Models.Helpers <p>As part of an initiative to improve the accessibility, transparency, and accountability of the Town of Castle Rock, this catalog provides open access to town-managed data. </p> @if (SettingsHelper.GetUserVoiceEnabled()) { <p>We invite you to actively participate in shapin...
Change default HttpTimeout to 120 seconds
using System.IO; using System.Reflection; namespace Tiver.Fowl.Drivers.Configuration { public class DriversConfiguration { /// <summary> /// Location for binaries to be saved /// Defaults to assembly location /// </summary> public string DownloadLocation { get; set; } =...
using System.IO; using System.Reflection; namespace Tiver.Fowl.Drivers.Configuration { public class DriversConfiguration { /// <summary> /// Location for binaries to be saved /// Defaults to assembly location /// </summary> public string DownloadLocation { get; set; } =...
Support complex field- and record separators
using System; using System.Collections.Generic; using Arkivverket.Arkade.Util; namespace Arkivverket.Arkade.Core.Addml.Definitions { public class Separator { private static readonly Dictionary<string, string> SpecialSeparators = new Dictionary<string, string> { {"CRLF", "\r...
using System; using System.Collections.Generic; using Arkivverket.Arkade.Util; namespace Arkivverket.Arkade.Core.Addml.Definitions { public class Separator { private static readonly Dictionary<string, string> SpecialSeparators = new Dictionary<string, string> { {"CRLF", "\r...
Use of UnityWebRequest for default http client.
using System; using System.Collections.Generic; using System.IO; using UnityEngine; namespace CotcSdk { /** @cond private */ [Serializable] public class CotcSettings : ScriptableObject { public const string AssetPath = "Assets/Resources/CotcSettings.asset"; public static CotcSettings Instance { get { ...
using System; using System.Collections.Generic; using System.IO; using UnityEngine; namespace CotcSdk { /** @cond private */ [Serializable] public class CotcSettings : ScriptableObject { public const string AssetPath = "Assets/Resources/CotcSettings.asset"; public static CotcSettings Instance { get { ...
Add basePath and baseUrl parameters at AddPiranhaFileStorage extension method.
/* * Copyright (c) 2018 Håkan Edling * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. * * https://github.com/piranhacms/piranha.core * */ using Microsoft.Extensions.DependencyInjection; using Piranha; using Piranha.Local; public stati...
/* * Copyright (c) 2018 Håkan Edling * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. * * https://github.com/piranhacms/piranha.core * */ using Microsoft.Extensions.DependencyInjection; using Piranha; using Piranha.Local; ...
Allow only http/https schemes, and href attribute to contain an uri.
using Ganss.XSS; namespace CollAction.Helpers { public static class InputSanitizer { public static string Sanitize(string input) { var saniziter = new HtmlSanitizer( allowedTags: new[] { "p", "br", "strong", "em", "i", "u", "a", "ol", "ul", "li" }, al...
using Ganss.XSS; namespace CollAction.Helpers { public static class InputSanitizer { public static string Sanitize(string input) { var saniziter = new HtmlSanitizer( allowedTags: new[] { "p", "br", "strong", "em", "i", "u", "a", "ol", "ul", "li" }, al...
Fix bug: Searching too fast in dialog returns no results when enter is pressed Work items: 598
using System; using System.Linq; using Microsoft.VisualStudio.ExtensionsExplorer; namespace NuGet.Dialog.Providers { internal class PackagesSearchNode : PackagesTreeNodeBase { private string _searchText; private readonly PackagesTreeNodeBase _baseNode; public PackagesTreeNodeB...
using System; using System.Linq; using Microsoft.VisualStudio.ExtensionsExplorer; namespace NuGet.Dialog.Providers { internal class PackagesSearchNode : PackagesTreeNodeBase { private string _searchText; private readonly PackagesTreeNodeBase _baseNode; public PackagesTreeNodeB...
Use camelCase for new widgets
using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace OpenOrderFramework.Controllers { public class JsonNetResult : JsonResult { public override void ExecuteResult(ControllerConte...
using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace OpenOrderFramework.Controllers { public class JsonNetResult : JsonResult { public override void ExecuteResult(ControllerConte...
Break failing test into working & non-working parts
using System; using System.Threading.Tasks; using FluentAssertions; using Xunit; using Auth0.Tests.Shared; namespace Auth0.ManagementApi.IntegrationTests { public class StatsTests : TestBase { [Fact(Skip = "Inactivity causes these to fail")] public async Task Test_stats_sequence() { ...
using System; using System.Threading.Tasks; using FluentAssertions; using Xunit; using Auth0.Tests.Shared; using System.Linq; namespace Auth0.ManagementApi.IntegrationTests { public class StatsTests : TestBase { [Fact] public async Task Daily_Stats_Returns_Values() { string...
Revert "Navigate up many parents"
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Gibe.DittoProcessors.Processors { public class ParentAttribute : TestableDittoProcessorAttribute { private readonly uint _parentDepth; public ParentAttribute(uint parentDepth = 1) { ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Gibe.DittoProcessors.Processors { public class ParentAttribute : TestableDittoProcessorAttribute { public override object ProcessValue() { return Context.Content.Parent; } } }
Add attributes that can't be easily tested due to being public in the current target framework
using System.Collections.Generic; namespace PublicApiGenerator { partial class AttributeFilter { private static readonly HashSet<string> RequiredAttributeNames = new HashSet<string> { "System.Diagnostics.CodeAnalysis.AllowNullAttribute", "System.Diagnostics.CodeAnalysis....
using System.Collections.Generic; namespace PublicApiGenerator { partial class AttributeFilter { private static readonly HashSet<string> RequiredAttributeNames = new HashSet<string> { "System.Diagnostics.CodeAnalysis.AllowNullAttribute", "System.Diagnostics.CodeAnalysis....
Update production endpoint to new version
// 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.Online { public class ProductionEndpointConfiguration : EndpointConfiguration { public ProductionEndpointConfiguration() { ...
// 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.Online { public class ProductionEndpointConfiguration : EndpointConfiguration { public ProductionEndpointConfiguration() { ...
Make default version table meta data virtual
#region License // // Copyright (c) 2007-2009, Sean Chambers <schambers80@gmail.com> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 /...
#region License // // Copyright (c) 2007-2009, Sean Chambers <schambers80@gmail.com> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 /...
Move conditional compilation around namespace.
namespace Cassette.Views { #if NET35 public interface IHtmlString { string ToHtmlString(); } public class HtmlString : IHtmlString { string _htmlString; public HtmlString(string htmlString) { this._htmlString = htmlString; } public stri...
#if NET35 namespace Cassette.Views { public interface IHtmlString { string ToHtmlString(); } public class HtmlString : IHtmlString { string _htmlString; public HtmlString(string htmlString) { this._htmlString = htmlString; } public stri...
Test for converting an empty NameValueCollection
using System; using System.Collections.Generic; using System.Collections.Specialized; using ExtraLinq; using FluentAssertions; using NUnit.Framework; namespace ExtraLINQ.Tests { [TestFixture] public class ToDictionaryTests { [ExpectedException(typeof(ArgumentNullException))] [Test] ...
using System; using System.Collections.Generic; using System.Collections.Specialized; using ExtraLinq; using FluentAssertions; using NUnit.Framework; namespace ExtraLINQ.Tests { [TestFixture] public class ToDictionaryTests { [ExpectedException(typeof(ArgumentNullException))] [Test] ...
Make PR status visible when GitSccProvider is loaded
using System; using System.Runtime.InteropServices; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudio.ComponentModelHost; using GitHub.VisualStudio; using GitHub.InlineReviews.Services; namespace GitHub.InlineReviews { [PackageRegistration(UseManagedResou...
using System; using System.Runtime.InteropServices; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.ComponentModelHost; using GitHub.VisualStudio; using GitHub.InlineReviews.Services; namespace GitHub.InlineReviews { [PackageRegistration(UseManagedResourcesOnly = true)] [Guid(Guids.PullReques...
Adjust osu!mania scroll speed defaults to be more sane
// 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.Configuration.Tracking; using osu.Game.Configuration; using osu.Game.Rulesets.Configuration; using osu.Game.Rulesets.Mania.UI; namespace osu.Game.Ru...
// 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.Configuration.Tracking; using osu.Game.Configuration; using osu.Game.Rulesets.Configuration; using osu.Game.Rulesets.Mania.UI; namespace osu.Game.Ru...
Remove star creation debug printing
using System.Collections; using System.Collections.Generic; using UnityEngine; public class SuikaShakeSparkleSpawner : MonoBehaviour { [SerializeField] private float spanwStartTime = .05f; [SerializeField] private float spawnFrequency = .25f; [SerializeField] private GameObject sparklePrefab; ...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class SuikaShakeSparkleSpawner : MonoBehaviour { [SerializeField] private float spanwStartTime = .05f; [SerializeField] private float spawnFrequency = .25f; [SerializeField] private GameObject sparklePrefab; ...
Handle Kayak framwork's Invoking event - here we can catch the total number of requests made, as well as do some basic authentication.
using System; using Kayak; using Kayak.Framework; namespace csharp_github_api.IntegrationTests { public abstract class IntegrationTestBase : IDisposable { protected readonly KayakServer WebServer = new KayakServer(); protected string BaseUrl = "http://localhost:8080"; protected Integr...
using System; using System.Linq; using System.Text; using Kayak; using Kayak.Framework; namespace csharp_github_api.IntegrationTests { public abstract class IntegrationTestBase : IDisposable { protected readonly KayakServer WebServer = new KayakServer(); protected string BaseUrl = "http://loca...
Remove old logging line. Causes an exception if the directory doesn't exist.
using System; using System.Configuration; using System.IO; using System.Net; using System.ServiceProcess; using System.Timers; using NLog; namespace ZBuildLightsUpdater { public partial class ZBuildLightsUpdaterService : ServiceBase { private static readonly Logger Log = LogManager.GetCurrentClassLogg...
using System; using System.Configuration; using System.Net; using System.ServiceProcess; using System.Timers; using NLog; namespace ZBuildLightsUpdater { public partial class ZBuildLightsUpdaterService : ServiceBase { private static readonly Logger Log = LogManager.GetCurrentClassLogger(); pri...
Fix getmentions tests and add missing TestMethod attribute
using System.Linq; using Microsoft.Bot.Connector; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Microsoft.Bot.Builder.Tests { [TestClass] public class ActivityExTests { [TestMethod] public void HasContent_Test() { IMessageActivity activity = DialogTestBa...
using System.Collections.Generic; using System.Linq; using Microsoft.Bot.Connector; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json; namespace Microsoft.Bot.Builder.Tests { [TestClass] public class ActivityExTests { [TestMethod] public void HasContent_Test() ...
Tweak to one of the demo programs
using System; using System.Collections.Generic; using System.Linq; using MonadLib; namespace ReaderHaskellDocsExample1 { using Bindings = IDictionary<string, int>; internal class Program { private static void Main() { var sampleBindings = new Dictionary<string, int> ...
using System; using System.Collections.Generic; using System.Linq; using MonadLib; namespace ReaderHaskellDocsExample1 { using Bindings = IDictionary<string, int>; internal class Program { private static void Main() { var sampleBindings = new Dictionary<string, int> ...
Fix running on < iOS 6.0
using System; using MonoTouch.Foundation; using MonoTouch.UIKit; using Eto.Platform.iOS.Forms; using Eto.Forms; namespace Eto.Platform.iOS { [MonoTouch.Foundation.Register("EtoAppDelegate")] public class EtoAppDelegate : UIApplicationDelegate { public EtoAppDelegate () { } public override bool WillFinishLa...
using System; using MonoTouch.Foundation; using MonoTouch.UIKit; using Eto.Platform.iOS.Forms; using Eto.Forms; namespace Eto.Platform.iOS { [MonoTouch.Foundation.Register("EtoAppDelegate")] public class EtoAppDelegate : UIApplicationDelegate { public EtoAppDelegate () { } public override bool FinishedLaun...
Fix the problem that the web request is displayed twice when -Verbosity is set to detailed.
 namespace NuGet.Common { public class CommandLineRepositoryFactory : PackageRepositoryFactory { public static readonly string UserAgent = "NuGet Command Line"; private readonly IConsole _console; public CommandLineRepositoryFactory(IConsole console) { _...
 using System.Windows; namespace NuGet.Common { public class CommandLineRepositoryFactory : PackageRepositoryFactory, IWeakEventListener { public static readonly string UserAgent = "NuGet Command Line"; private readonly IConsole _console; public CommandLineRepositoryFactor...
Use bitwise operator (review by Clive)
namespace DependencyInjection.Console { internal class OddEvenPatternGenerator : IPatternGenerator { public Pattern Generate(int width, int height) { var generate = new Pattern(width, height); var squares = generate.Squares; for (var i = 0; i < squares.GetLe...
namespace DependencyInjection.Console { internal class OddEvenPatternGenerator : IPatternGenerator { public Pattern Generate(int width, int height) { var generate = new Pattern(width, height); var squares = generate.Squares; for (var i = 0; i < squares.GetLe...
Update player loader screen mouse disable text to use localised version
// 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.Game.Configuration; namespace osu.Game.Screens.Play.PlayerSettings { public class InputSetti...
// 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.Game.Configuration; using osu.Game.Localisation; namespace osu.Game.Screens.Play.PlayerSettings ...
Update automatic reservations flag to match what has been implemented
using System.Collections.Generic; using System.Linq; namespace SFA.DAS.Reservations.Api.Types { public class ReservationAllocationStatusResult { public bool AutoReservations { get; set; } } }
namespace SFA.DAS.Reservations.Api.Types { public class ReservationAllocationStatusResult { public bool CanAutoCreateReservations { get; set; } } }
Print out the response as a string when the exception is not JSON
using System; using System.Net; using System.Net.Http; namespace Kudu.Client { public static class HttpResponseMessageExtensions { /// <summary> /// Determines if the HttpResponse is successful, throws otherwise. /// </summary> public static HttpResponseMessage EnsureSuccessful...
using System; using System.Net; using System.Net.Http; namespace Kudu.Client { public static class HttpResponseMessageExtensions { /// <summary> /// Determines if the HttpResponse is successful, throws otherwise. /// </summary> public static HttpResponseMessage EnsureSuccessful...
Update server side API for single multiple answer question
using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.Models.Question; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api/question")] public class QuestionsController : Controller { private readonly IQuestionRepository ...
using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.Models.Question; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api/question")] public class QuestionsController : Controller { private readonly IQuestionRepository ...
Make the two extra ByRef value-type equality comparer methods static
using System; using System.Collections.Generic; namespace Equality { public struct StructEqualityComparer<T> : IEqualityComparer<T> where T : struct { public static StructEqualityComparer<T> Default = new StructEqualityComparer<T>(); public Boolean Equals(T x, T y) => Struct.Equals(ref x, ref y); public Int32 ...
using System; using System.Collections.Generic; namespace Equality { public struct StructEqualityComparer<T> : IEqualityComparer<T> where T : struct { public static StructEqualityComparer<T> Default = new StructEqualityComparer<T>(); public Boolean Equals(T x, T y) => Struct.Equals(ref x, ref y); public Int32 ...
Add ability to change the flie extension of API download requests
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.IO; using osu.Framework.IO.Network; namespace osu.Game.Online.API { public abstract class APIDownloadRequest : APIRequest { private string ...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.IO; using osu.Framework.IO.Network; namespace osu.Game.Online.API { public abstract class APIDownloadRequest : APIRequest { private string ...
Improve reliability of test by using semaphores
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Threading; using NUnit.Framework; using osu.Framework.Audio; namespace osu.Framework.Tests.Audio { [TestFixture] public class AudioCollectionManage...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Threading; using NUnit.Framework; using osu.Framework.Audio; namespace osu.Framework.Tests.Audio { [TestFixture] public class AudioCollectionManage...
Make node root path variable and add debugger display
using System; using System.Collections.Generic; namespace Additio.Configuration { public class Node { public const string IncludeFolderPath = @"App_Config\Include"; public string FilePath { get; set; } public string RelativePath => FilePath.Remove(0, FilePath.IndexOf(IncludeFolderPat...
using System; using System.Collections.Generic; using System.Diagnostics; namespace Additio.Configuration { [DebuggerDisplay("{RelativePath}")] public class Node { private string Root { get; } public Node(string root) { if (!root.EndsWith("\\")) root +=...
Replace SerialPort construction with factory invocation
using System; using System.IO.Ports; using MYCroes.ATCommands; using MYCroes.ATCommands.Forwarding; namespace SupportManager.Control { public class ATHelper : IDisposable { private readonly SerialPort serialPort; public ATHelper(string port) { serialPort = new SerialPort(po...
using System; using System.IO.Ports; using MYCroes.ATCommands; using MYCroes.ATCommands.Forwarding; namespace SupportManager.Control { public class ATHelper : IDisposable { private readonly SerialPort serialPort; public ATHelper(string portConnectionString) { serialPort = S...
Add installer_patcher get controller method
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; namespace EndlessAges.LauncherService.Controllers { /// <summary> /// Emulated controller ContentManager.aspx from the Endless Ages backend. /// </summary> [Route("Con...
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; namespace EndlessAges.LauncherService.Controllers { /// <summary> /// Emulated controller ContentManager.aspx from the Endless Ages backend. /// </summary> [Route("Con...
Split out `base` call from `switch` statement
// 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 Markdig.Extensions.Yaml; using Markdig.Syntax; using Markdig.Syntax.Inlines; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers.Markdo...
// 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 Markdig.Extensions.Yaml; using Markdig.Syntax; using Markdig.Syntax.Inlines; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers.Markdo...
Add ignore attribute to test which for some reason fails when it is run together with other tests
using NUnit.Framework; using System.Web.Mvc; using System.Web.Routing; using Zk.Helpers; namespace Zk.Tests { [TestFixture] public class UrlHelperExtensionTest { [Test] public void UrlHelper_CreatePartialViewName() { // ARRANGE var httpContext = MvcMockHel...
using NUnit.Framework; using System.Web.Mvc; using System.Web.Routing; using Zk.Helpers; namespace Zk.Tests { [Ignore] [TestFixture] public class UrlHelperExtensionTest { [Test] public void UrlHelper_CreatePartialViewName() { // ARRANGE var httpContext...
Use MirroringPackageRepository to auto-mirror packages in OData lookup.
using System.Linq; using System.Web.Http; using System.Web.Http.OData; using NuGet.Lucene.Web.Models; using NuGet.Lucene.Web.Util; namespace NuGet.Lucene.Web.Controllers { /// <summary> /// OData provider for Lucene based NuGet package repository. /// </summary> public class PackagesODataController : ...
using System.Linq; using System.Web.Http; using System.Web.Http.OData; using NuGet.Lucene.Web.Models; using NuGet.Lucene.Web.Util; namespace NuGet.Lucene.Web.Controllers { /// <summary> /// OData provider for Lucene based NuGet package repository. /// </summary> public class PackagesODataController : ...
Add [Fact] attribute to a test that was missing it, regaining coverage.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Xunit; namespace MalApi.IntegrationTests { public class GetRecentOnlineUsersTest { public void GetRecentOnlineUsers() { using (MyAnimeListApi api = new MyAnimeListApi()) { ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Xunit; namespace MalApi.IntegrationTests { public class GetRecentOnlineUsersTest { [Fact] public void GetRecentOnlineUsers() { using (MyAnimeListApi api = new MyAnimeListApi()) ...
Add support for MSDIA140 to DIA-based CoreRT/.NETNative StackTraceGenerator on Windows
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Diagnostics; using System.Collections.Generic; namespace Internal.StackGenerator.Dia { ...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Diagnostics; using System.Collections.Generic; namespace Internal.StackGenerator.Dia { ...
Use SingleOrDefault as we may not know all WhatMine.com algorithms
using MultiMiner.CoinApi.Data; using MultiMiner.Xgminer.Data; using Newtonsoft.Json.Linq; using System.Linq; namespace MultiMiner.WhatMine.Extensions { public static class CoinInformationExtensions { public static void PopulateFromJson(this CoinInformation coinInformation, JToken jToken) { ...
using MultiMiner.CoinApi.Data; using MultiMiner.Xgminer.Data; using Newtonsoft.Json.Linq; using System; using System.Linq; namespace MultiMiner.WhatMine.Extensions { public static class CoinInformationExtensions { public static void PopulateFromJson(this CoinInformation coinInformation, JToken jToken)...
Fix example notification timer breaking on skip (forward mouse button or Enter)
using System.Windows.Forms; using TweetDuck.Core.Controls; using TweetDuck.Plugins; using TweetDuck.Resources; namespace TweetDuck.Core.Notification.Example{ sealed class FormNotificationExample : FormNotificationMain{ public override bool RequiresResize => true; protected override bool CanDragWin...
using System.Windows.Forms; using TweetDuck.Core.Controls; using TweetDuck.Plugins; using TweetDuck.Resources; namespace TweetDuck.Core.Notification.Example{ sealed class FormNotificationExample : FormNotificationMain{ public override bool RequiresResize => true; protected override bool CanDragWin...
Revert "Fix threading issue on initialisation"
using System; using EPiServer.Framework.Localization; using EPiServer.ServiceLocation; using EPiServer.Web; namespace AlloyDemoKit.Business.Channels { /// <summary> /// Base class for all resolution definitions /// </summary> public abstract class DisplayResolutionBase : IDisplayResolution { ...
using EPiServer.Framework.Localization; using EPiServer.ServiceLocation; using EPiServer.Web; namespace AlloyDemoKit.Business.Channels { /// <summary> /// Base class for all resolution definitions /// </summary> public abstract class DisplayResolutionBase : IDisplayResolution { private Inje...
Mark System.Collections HashCollisionScenario test as OuterLoop
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using Xunit; namespace System.Collections.Tests { public class InternalHashC...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using Xunit; namespace System.Collections.Tests { public class InternalHashC...
Add validation implementation in search module.
namespace TraktApiSharp.Modules { using Enums; using Objects.Basic; using Requests; using Requests.WithoutOAuth.Search; using System.Threading.Tasks; public class TraktSearchModule : TraktBaseModule { public TraktSearchModule(TraktClient client) : base(client) { } public a...
namespace TraktApiSharp.Modules { using Enums; using Objects.Basic; using Requests; using Requests.WithoutOAuth.Search; using System; using System.Threading.Tasks; public class TraktSearchModule : TraktBaseModule { public TraktSearchModule(TraktClient client) : base(client) { }...
Fix storyboard loops start time when none of their commands start at 0.
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; namespace osu.Game.Storyboards { public class CommandLoop : CommandTimelineGroup { public double LoopStartTi...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; namespace osu.Game.Storyboards { public class CommandLoop : CommandTimelineGroup { public double LoopStartTi...
Add some empty code to InterControlAnimation
using Windows.UI.Xaml; namespace TestAppUWP.Samples.InterControlAnimation { public sealed partial class InterControlAnimation { private static Control2 _control2; private static Control1 _control1; public InterControlAnimation() { InitializeComponent(); ...
using Windows.UI.Xaml; namespace TestAppUWP.Samples.InterControlAnimation { public sealed partial class InterControlAnimation { private static Control2 _control2; private static Control1 _control1; public InterControlAnimation() { InitializeComponent(); ...
Change case for capability with js code.
using TicTacToe.Core.Enums; namespace TicTacToe.Web.ViewModels { public class TurnResultViewModel { public string Status { get; set; } public string ErrorText { get; set; } public bool IsGameDone { get; set; } public PlayerCode Winner { get; set; } public byte OpponentM...
using TicTacToe.Core.Enums; namespace TicTacToe.Web.ViewModels { public class TurnResultViewModel { public string status { get; set; } public string errorText { get; set; } public bool isGameDone { get; set; } public PlayerCode winner { get; set; } public int opponentMo...