Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Fix custom culture throws ArgumentException on .NET 3.5 unit tests.
#region -- License Terms -- // // MessagePack for CLI // // Copyright (C) 2017 FUJIWARA, Yusuke // // 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...
#region -- License Terms -- // // MessagePack for CLI // // Copyright (C) 2017 FUJIWARA, Yusuke // // 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...
Fix typo on depot data set.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NFleet.Data { public class DepotDataSet : IResponseData, IVersioned { public static string MIMEType = "application/vnd.jyu.nfleet.depotset"; public static string MIMEVersion = "2.2"; int IV...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NFleet.Data { public class DepotDataSet : IResponseData, IVersioned { public static string MIMEType = "application/vnd.jyu.nfleet.depotset"; public static string MIMEVersion = "2.2"; int IV...
Add explanatory comment to unclear use of rotation.
//---------------------------------------------------------------------------- // <copyright file="RemotePlayerMarker.cs" company="Delft University of Technology"> // Copyright 2015, Delft University of Technology // // This software is licensed under the terms of the MIT License. // A copy of the lic...
//---------------------------------------------------------------------------- // <copyright file="RemotePlayerMarker.cs" company="Delft University of Technology"> // Copyright 2015, Delft University of Technology // // This software is licensed under the terms of the MIT License. // A copy of the lic...
Make the Xmas Tree move randomly on its first pattern.
using System; using Microsoft.Xna.Framework; using MonoGame.Extended.Timers; using XmasHell.BulletML; namespace XmasHell.Entities.Bosses.XmasTree { class XmasTreeBehaviour1 : AbstractBossBehaviour { public XmasTreeBehaviour1(Boss boss) : base(boss) { InitialBehaviourLife = GameConfi...
using System; using Microsoft.Xna.Framework; using MonoGame.Extended.Timers; using XmasHell.BulletML; namespace XmasHell.Entities.Bosses.XmasTree { class XmasTreeBehaviour1 : AbstractBossBehaviour { public XmasTreeBehaviour1(Boss boss) : base(boss) { InitialBehaviourLife = GameConfi...
Fix incorrect current directory that accours on some devices on 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...
// 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...
Implement constructor for Leather Backpack (Lettered)
using SimpleInventory.Examples.Common; namespace SimpleInventory.Examples.InventoryLetters { public class LeatherBackpack : InventoryLetterBag<Item> { } }
using SimpleInventory.Examples.Common; namespace SimpleInventory.Examples.InventoryLetters { public class LeatherBackpack : InventoryLetterBag<Item> { /// <inheritdoc /> public LeatherBackpack() : base("Leather Backpack (Lettered)", Volumes.Litres(25), Weights.Kilograms(1)) { } } }
Add H1 back into profiles
@using StockportWebapp.Enums @using StockportWebapp.Models @model Profile @{ ViewData["Title"] = Model.Title; var articleTitle = Model.Breadcrumbs.LastOrDefault() != null ? Model.Breadcrumbs.LastOrDefault().Title + " - " : string.Empty; ViewData["og:title"] = articleTitle + Model.Title; Layout = "../....
@using StockportWebapp.Enums @using StockportWebapp.Models @model Profile @{ ViewData["Title"] = Model.Title; var articleTitle = Model.Breadcrumbs.LastOrDefault() != null ? Model.Breadcrumbs.LastOrDefault().Title + " - " : string.Empty; ViewData["og:title"] = articleTitle + Model.Title; Layout = "../....
Fix crash when bruiser monster can see player but can't path.
using System; using System.Collections.Generic; using Magecrawl.Utilities; namespace Magecrawl.GameEngine.Actors { internal class BruiserMonster : Monster { public BruiserMonster(string name, Point p, int maxHP, int vision, DiceRoll damage, double defense, double evade, double ctIncreaseModife...
using System; using System.Collections.Generic; using Magecrawl.Utilities; namespace Magecrawl.GameEngine.Actors { internal class BruiserMonster : Monster { public BruiserMonster(string name, Point p, int maxHP, int vision, DiceRoll damage, double defense, double evade, double ctIncreaseModife...
Add Azure Function that updates the system status avg temp
//using Microsoft.Framework.Configuration; //using Microsoft.WindowsAzure.Storage; //using Microsoft.WindowsAzure.Storage.Table; //using System.Threading.Tasks; //using LogLevel = Microsoft.Framework.Logging.LogLevel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table; using System; usin...
//using Microsoft.Framework.Configuration; //using Microsoft.WindowsAzure.Storage; //using Microsoft.WindowsAzure.Storage.Table; //using System.Threading.Tasks; //using LogLevel = Microsoft.Framework.Logging.LogLevel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table; using System; usin...
Fix reflection type handling of out parameters
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using System.Reflection; namespace IntelliTect.Coalesce.TypeDefinition.Wrappers { internal class ReflectionParameterWrapper : ParameterWrapper { public ReflectionParameterWrap...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using System.Reflection; namespace IntelliTect.Coalesce.TypeDefinition.Wrappers { internal class ReflectionParameterWrapper : ParameterWrapper { public ReflectionParameterWrap...
Fix breaks to xml docs
// 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.Collections.Generic; using Microsoft.Net.Http.Headers; namespace Microsoft.AspNet.Mvc.ApiExplorer { /// <summary> //...
// 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.Collections.Generic; using Microsoft.Net.Http.Headers; namespace Microsoft.AspNet.Mvc.ApiExplorer { /// <summary> //...
Fix some problem with the find bar accepting input too early
using System.Windows; using UserControl = System.Windows.Controls.UserControl; namespace anime_downloader.Views.Components { /// <summary> /// Interaction logic for FindViewModel.xaml /// </summary> public partial class Find : UserControl { public Find() { InitializeCom...
using System.Windows; using UserControl = System.Windows.Controls.UserControl; namespace anime_downloader.Views.Components { /// <summary> /// Interaction logic for FindViewModel.xaml /// </summary> public partial class Find : UserControl { public Find() { InitializeCom...
Add delay between attempts to contact the server
using System; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using FluentAssertions; namespace Microsoft.DotNet.Tools.Test.Utilities { public class NetworkHelper { // in milliseconds private const int Timeout = 20...
using System; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using FluentAssertions; namespace Microsoft.DotNet.Tools.Test.Utilities { public class NetworkHelper { // in milliseconds private const int Timeout = 20...
Make WindowsPrincipalIsInRoleNeg pass when a domain client is offline
// 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.Security.Principal; using Xunit; public class WindowsPrincipalTests { [Fact] public static voi...
// 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; using System.Security.Principal; using Xunit; public class WindowsPrinci...
Use interface ICommand instead of MvxCommand
using Android.Widget; using Cirrious.MvvmCross.ViewModels; using System; using System.Windows.Input; namespace MvvmCrossSpikes.Droid.Bindings { public class ButtonCommandBinding : MvxTargetBinding<Button, MvxCommand> { private ICommand _command; public ButtonCommandBinding(Button target) ...
using Android.Widget; using Cirrious.MvvmCross.ViewModels; using System; using System.Windows.Input; namespace MvvmCrossSpikes.Droid.Bindings { public class ButtonCommandBinding : MvxTargetBinding<Button, ICommand> { private ICommand _command; public ButtonCommandBinding(Button target) ...
Change SDK name in NewAnalyzerTemplate
/*This tutorial is going to guide you to write a diagnostic analyzer that enforces the placement of a single space between the if keyword of an if statement and the open parenthesis of the condition. For more information, please reference the ReadMe. Before you begin, go to Tools->Extensions and Updates->Online, and...
/*This tutorial is going to guide you to write a diagnostic analyzer that enforces the placement of a single space between the if keyword of an if statement and the open parenthesis of the condition. For more information, please reference the ReadMe. Before you begin, go to Tools->Extensions and Updates->Online, and...
Support RelationName as dictionary key
using Utf8Json; namespace Nest { internal class RelationNameFormatter : IJsonFormatter<RelationName> { public RelationName Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver) { if (reader.GetCurrentJsonToken() == JsonToken.String) { RelationName relationName = reader.ReadStrin...
using Utf8Json; namespace Nest { internal class RelationNameFormatter : IJsonFormatter<RelationName>, IObjectPropertyNameFormatter<RelationName> { public RelationName Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver) { if (reader.GetCurrentJsonToken() == JsonToken.String) { ...
Fix missing newline at the end of a file
// 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.IO; using Xunit; namespace System.IO.Tests { public static class DirectoryNotFoundEx...
// 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.IO; using Xunit; namespace System.IO.Tests { public static class DirectoryNotFoundEx...
Initialize to the route handler of ASP.NET MVC
using System.Web.Mvc; using System.Web.Routing; namespace RestfulRouting { public abstract class Mapper { private readonly IRouteHandler _routeHandler; protected Route GenerateRoute(string path, string controller, string action, string[] httpMethods) { return new Route(path, new RouteValueDictionary(n...
using System.Web.Mvc; using System.Web.Routing; namespace RestfulRouting { public abstract class Mapper { private readonly IRouteHandler _routeHandler; protected Mapper() { _routeHandler = new MvcRouteHandler(); } protected Route GenerateRoute(string path, string controller, string action, string[] h...
Set max concurrent deliveries to 10 in demo.
using System; using Demo.Endpoints.FileSystem; using Demo.Endpoints.Sharepoint; using Verdeler; namespace Demo { internal class Program { private static void Main(string[] args) { //Configure the distributor var distributor = new Distributor<DistributableFile, Vendor>()...
using System; using Demo.Endpoints.FileSystem; using Demo.Endpoints.Sharepoint; using Verdeler; namespace Demo { internal class Program { private static void Main(string[] args) { //Configure the distributor var distributor = new Distributor<DistributableFile, Vendor>()...
Remove milliseconds from date fields in GetLearners Json
using System; using System.Threading.Tasks; using MediatR; using Microsoft.AspNetCore.Mvc; using SFA.DAS.CommitmentsV2.Api.Types.Responses; using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners; namespace SFA.DAS.CommitmentsV2.Api.Controllers { [ApiController] [Route("api/learners")] public class...
using System; using System.Threading.Tasks; using MediatR; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using SFA.DAS.CommitmentsV2.Api.Types.Responses; using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners; namespace SFA.DAS.CommitmentsV2.Api.Controllers { [ApiController] [Route("api/learn...
Add basic execute method to parseresult (temp fix, want to add typechecking and specify return type)
using System.Collections.Generic; using Jello.Errors; using Jello.Nodes; namespace Jello { public class ParseResult { public bool Success { get; private set; } public IEnumerable<IError> Errors { get; private set; } private INode _root; public ParseResult(INode node) ...
using System.Collections.Generic; using Jello.DataSources; using Jello.Errors; using Jello.Nodes; namespace Jello { public class ParseResult { public bool Success { get; private set; } public IEnumerable<IError> Errors { get; private set; } private INode _root; public ParseR...
Fix crash when logging in
// Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using EndlessClient.ControlSets; using EndlessClient.HUD.Controls; using EOLib.Domain.Notifiers; namespace EndlessClient.Rendering.NPC { public class NPCAnimationAct...
// Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file using EndlessClient.ControlSets; using EndlessClient.HUD.Controls; using EOLib.Domain.Notifiers; namespace EndlessClient.Rendering.NPC { public class NPCAnimationAct...
Change int count to long count in Dequeue extension method
using System.Collections.Generic; using System.Linq; namespace DerConverter { internal static class QueueExtensions { public static IEnumerable<T> Dequeue<T>(this Queue<T> queue, int count) { for (int i = 0; i < count; i++) yield return queue.Dequeue(); } public st...
using System.Collections.Generic; using System.Linq; namespace DerConverter { internal static class QueueExtensions { public static IEnumerable<T> Dequeue<T>(this Queue<T> queue, long count) { for (long i = 0; i < count; i++) yield return queue.Dequeue(); } public ...
Add test case for fetch translation metadata capability when getting locales.
using NUnit.Framework; using ZendeskApi_v2; namespace Tests { [TestFixture] public class LocaleTests { private ZendeskApi api = new ZendeskApi(Settings.Site, Settings.Email, Settings.Password); [Test] public void CanGetLocales() { var all = api.Locales.GetAllLoc...
using NUnit.Framework; using ZendeskApi_v2; namespace Tests { [TestFixture] public class LocaleTests { private ZendeskApi api = new ZendeskApi(Settings.Site, Settings.Email, Settings.Password); [Test] public void CanGetLocales() { var all = api.Locales.GetAllLoc...
Fix flaky unit test caused by concurrency issue
namespace Nett { using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using Util; internal static class UserTypeMetaData { private static readonly Dictionary<Type, MetaDataInfo> MetaData = new Dictionary<Type, MetaDataInfo>(); public ...
namespace Nett { using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Reflection; using Util; internal static class UserTypeMetaData { private static readonly ConcurrentDictionary<Type, MetaDataInfo> MetaData = new...
Add copyright header to TransportSocketOptions.cs.
using System; using System.Collections.Generic; using System.Text; namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets { // TODO: Come up with some options public class SocketTransportOptions { } }
// 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.Collections.Generic; using System.Text; namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets { // TODO: Come...
Change button location to the right side of dropdown
// 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.Graphics.UserInterface; using osu.Game.Tournament.IO; namespace osu.Game.Tournament.Screens....
// 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.Graphics.UserInterface; using osu.Game.Tournament.IO; namespace osu.Game.Tournament.Screens....
Add test to make sure normal collection works.
using System; using System.Collections.Generic; using System.Linq; using CSharpViaTest.Collections.Annotations; using Xunit; namespace CSharpViaTest.Collections._20_YieldPractices { [Medium] public class TakeUntilCatchingAnException { readonly int indexThatWillThrow = new Random().Next(2, 10); ...
using System; using System.Collections.Generic; using System.Linq; using CSharpViaTest.Collections.Annotations; using Xunit; namespace CSharpViaTest.Collections._20_YieldPractices { [Medium] public class TakeUntilCatchingAnException { readonly int indexThatWillThrow = new Random().Next(2, 10); ...
Update content for feature not enabled
 <div class="grid-row"> <div class="column-two-thirds"> <h1 class="heading-xlarge">Coming soon</h1> <p>This service isn't available yet.</p> </div> </div> @section breadcrumb { <div class="breadcrumbs"> <ol> <li><a href="@Url.Action("Index","Home")">Back to homepage<...
 <div class="grid-row"> <div class="column-two-thirds"> <h1 class="heading-xlarge">Under development</h1> <p>This service is currently being developed and you don't yet have access.</p> </div> </div> @section breadcrumb { <div class="breadcrumbs"> <ol> <li><a href="@...
Increase timeout for running in container
using System; using System.Linq; using NUnit.Framework; using Shouldly; namespace Nimbus.UnitTests.MulticastRequestResponseTests { [TestFixture] internal class WhenTakingTwoResponses : GivenAWrapperWithTwoResponses { private readonly TimeSpan _timeout = TimeSpan.FromSeconds(1); private str...
using System; using System.Linq; using NUnit.Framework; using Shouldly; namespace Nimbus.UnitTests.MulticastRequestResponseTests { [TestFixture] internal class WhenTakingTwoResponses : GivenAWrapperWithTwoResponses { private readonly TimeSpan _timeout = TimeSpan.FromSeconds(1.5); private s...
Fix proxied drawables never expiring.
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE namespace osu.Framework.Graphics { public class ProxyDrawable : Drawable { public ProxyDrawable(Drawable original) { ...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE namespace osu.Framework.Graphics { public class ProxyDrawable : Drawable { public ProxyDrawable(Drawable original) { ...
Add a list of notification receivers for project create.
using Lykke.EmailSenderProducer.Interfaces; namespace CompetitionPlatform.Data.AzureRepositories.Settings { public class BaseSettings { public AzureSettings Azure { get; set; } public AuthenticationSettings Authentication { get; set; } public NotificationsSettings Notifications { get; ...
using System.Collections.Generic; using Lykke.EmailSenderProducer.Interfaces; namespace CompetitionPlatform.Data.AzureRepositories.Settings { public class BaseSettings { public AzureSettings Azure { get; set; } public AuthenticationSettings Authentication { get; set; } public Notificat...
Add geometry in GeometryFeature constructor
using Mapsui.Geometries; using Mapsui.GeometryLayer; using Mapsui.Layers; using Mapsui.Providers; using NUnit.Framework; namespace Mapsui.Tests.Layers { [TestFixture] public class WritableLayerTests { [Test] public void DoNotCrashOnNullOrEmptyGeometries() { // arrange ...
using Mapsui.Geometries; using Mapsui.GeometryLayer; using Mapsui.Layers; using NUnit.Framework; namespace Mapsui.Tests.Layers { [TestFixture] public class WritableLayerTests { [Test] public void DoNotCrashOnNullOrEmptyGeometries() { // arrange var writableL...
Allow specifying document types to search.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Mios.Swiftype { public class QuerySpecification { public string Q { get; set; } public int Page { get; set; } public int? PerPage { get; set; } public IDictionary<string, F...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Mios.Swiftype { public class QuerySpecification { public string Q { get; set; } public int Page { get; set; } public int? PerPage { get; set; } public string[] DocumentType...
Fix compile error from merging Up and Down
using Mycroft.App; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Mycroft.Cmd.App { class AppCommand : Command { /// <summary> /// Parses JSON into App command objects /// </summary> /// <param name=...
using Mycroft.App; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Mycroft.Cmd.App { class AppCommand : Command { /// <summary> /// Parses JSON into App command objects /// </summary> /// <param name=...
Send message to specific connection
using System.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace WebSocketManager { public class WebSocketManagerMiddleware { private readonly RequestDelegate _next; private WebSocketManager _webSocketManager { get; set; } private WebSocketMessageHandler _webSocketMessageHandler...
using System.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace WebSocketManager { public class WebSocketManagerMiddleware { private readonly RequestDelegate _next; private WebSocketManager _webSocketManager { get; set; } private WebSocketMessageHandler _webSocketMessageHandler...
Remove comment about ffmpeg from interface
// 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.Framework.Graphics.Animations { /// <summary> /// An animation / playback sequence. /// </summary> public interface IAnimation { ...
// 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.Framework.Graphics.Animations { /// <summary> /// An animation / playback sequence. /// </summary> public interface IAnimation { ...
Change + rank strings to be cleaner for the end-user
// 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.ComponentModel; namespace osu.Game.Scoring { public enum ScoreRank { [Description(@"F")] F, [Description(@"F")] D,...
// 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.ComponentModel; namespace osu.Game.Scoring { public enum ScoreRank { [Description(@"F")] F, [Description(@"F")] D,...
Add more supported commands to test
using GTPWrapper; using GTPWrapper.DataTypes; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GTPWrapperTest { public class Program { static void Main(string[] args) { Engine engine = new Engine(); engine...
using GTPWrapper; using GTPWrapper.DataTypes; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GTPWrapperTest { public class Program { static void Main(string[] args) { Engine engine = new Engine(); engine...
Fix banana showers not using cancellation token
// 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 osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Objects.Types; namespace osu.Game.Rulesets.Catch.Objects { public class BananaSh...
// 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 osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Objects.Types; namespace osu.Game.Rulesets.Catch.Objects { public class BananaSh...
Move to SemVer for packaging
using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("ScriptCs.Octokit")] [assembly: AssemblyDescription("Octokit Script Pack for ScriptCs.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Henrik Andersson")] [assembly: AssemblyProduct("ScriptCs.Octokit")] [assem...
using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("ScriptCs.Octokit")] [assembly: AssemblyDescription("Octokit Script Pack for ScriptCs.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Henrik Andersson")] [assembly: AssemblyProduct("ScriptCs.Octokit")] [assem...
Add method to convert scientific notation string to float
namespace SCPI.Extensions { public static class ValueTypeExtensions { /// <summary> /// Checks that the value is within specified range /// </summary> /// <param name="value">Value to check</param> /// <param name="minValue">The inclusive lower bound</param> /// ...
using System.Globalization; namespace SCPI.Extensions { public static class ValueTypeExtensions { /// <summary> /// Checks that the value is within specified range /// </summary> /// <param name="value">Value to check</param> /// <param name="minValue">The inclusive low...
Add public designator to tag
namespace HOLMS.Platform.Support.ReservationTags { class MigratedReservationTag : ReservationTagBase { protected override string[] GetDescriptorPartsAfterCategory() => new string[] { }; protected override string GetCategoryDescriptor() => MigratedBookingCategory; public overri...
namespace HOLMS.Platform.Support.ReservationTags { public class MigratedReservationTag : ReservationTagBase { protected override string[] GetDescriptorPartsAfterCategory() => new string[] { }; protected override string GetCategoryDescriptor() => MigratedBookingCategory; public...
Remove deprecated "quirks mode" test coverage: although this concept has been an issue for test frameworks, it was never really an issue for Fixie as Fixie has always targeted net45 or higher, and the problem involved only applied to end users whose projects really targeted 4.0. Also, the test was meant to catch regres...
#if NET471 namespace Fixie.Tests.Execution { using System; using System.Configuration; using System.Linq; using System.Runtime.Versioning; using Assertions; public class ExecutionEnvironmentTests { public void ShouldEnableAccessToTestAssemblyConfigFile() { Confi...
#if NET471 namespace Fixie.Tests.Execution { using System; using System.Configuration; using System.Linq; using System.Runtime.Versioning; using Assertions; public class ExecutionEnvironmentTests { public void ShouldEnableAccessToTestAssemblyConfigFile() { Config...
Add error messages to model
namespace SFA.DAS.EmployerUsers.Web.Models { public class LoginViewModel { public string EmailAddress { get; set; } public string Password { get; set; } public string OriginatingAddress { get; set; } public bool InvalidLoginAttempt { get; set; } public string R...
namespace SFA.DAS.EmployerUsers.Web.Models { public class LoginViewModel : ViewModelBase { public string EmailAddress { get; set; } public string Password { get; set; } public string OriginatingAddress { get; set; } public string ReturnUrl { get; set; } ...
Update performance tests to use TestData attribute
using System; using System.Diagnostics; using System.Linq; using NUnit.Framework; using NinjaNye.SearchExtensions.Levenshtein; namespace NinjaNye.SearchExtensions.Tests.LevenshteinTests { [TestFixture] public class LevenshteinDistancePerformanceTests : BuildStringTestsBase { #if DEBUG // P...
using System; using System.Diagnostics; using System.Linq; using NUnit.Framework; using NinjaNye.SearchExtensions.Levenshtein; namespace NinjaNye.SearchExtensions.Tests.LevenshteinTests { #if DEBUG // Performance test will always fail in debug mode [Ignore] #endif [TestFixture] public class Levenshtei...
Mark assembly as CLS compliant
using System.Reflection; [assembly: AssemblyTitle("DoTheMath.Linear")] [assembly: AssemblyDescription("A bunch of stuff for Linear Algebra.")]
using System; using System.Reflection; [assembly: AssemblyTitle("DoTheMath.Linear")] [assembly: AssemblyDescription("A bunch of stuff for Linear Algebra.")] [assembly: CLSCompliant(true)]
Add value task to FillBuffer()
using System.ComponentModel; using System.IO; namespace Sakuno.IO { [EditorBrowsable(EditorBrowsableState.Never)] public static class StreamExtensions { public static int FillBuffer(this Stream stream, byte[] buffer, int offset, int count) { var remaining = count; ...
using System; using System.ComponentModel; using System.IO; using System.Threading; using System.Threading.Tasks; namespace Sakuno.IO { [EditorBrowsable(EditorBrowsableState.Never)] public static class StreamExtensions { public static int FillBuffer(this Stream stream, byte[] buffer, int offset, i...
Use type/attribute for user secrets
// Copyright (c) Martin Costello, 2016. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. namespace MartinCostello.Website { using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Ext...
// Copyright (c) Martin Costello, 2016. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. namespace MartinCostello.Website { using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Ext...
Fix missing string format parameter
using System.IO; namespace Microsoft.Diagnostics.Runtime { /// <summary> /// Thrown when we fail to read memory from the target process. /// </summary> public class MemoryReadException : IOException { /// <summary> /// The address of memory that could not be read. /// </sum...
using System.IO; namespace Microsoft.Diagnostics.Runtime { /// <summary> /// Thrown when we fail to read memory from the target process. /// </summary> public class MemoryReadException : IOException { /// <summary> /// The address of memory that could not be read. /// </sum...
Add method to get service settings
using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System; namespace DotNetRu.Azure { [Route("diagnostics")] public class DiagnosticsController : ControllerBase { private readonly ILogger logger; public D...
using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using DotNetRu.AzureService; namespace DotNetRu.Azure { [Route("diagnostics")] public class DiagnosticsController : ControllerBase { private readonly ILogger logger; private readonly RealmSettings realmSettings; pr...
Fix to avoid unwanted updates after builds
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("UpdateVersion")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [asse...
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("UpdateVersion")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assem...
Add get best id method for person.
namespace TraktApiSharp.Objects.Get.People { using Extensions; using Newtonsoft.Json; using System; public class TraktPerson { [JsonProperty(PropertyName = "name")] public string Name { get; set; } [JsonProperty(PropertyName = "ids")] public TraktPersonIds Ids { ge...
namespace TraktApiSharp.Objects.Get.People { using Extensions; using Newtonsoft.Json; using System; /// <summary>A Trakt person.</summary> public class TraktPerson { /// <summary>Gets or sets the person name.</summary> [JsonProperty(PropertyName = "name")] public string...
Validate nullable attributes are set
#pragma warning disable CA1304 #pragma warning disable MA0011 using System.Globalization; using TestUtilities; using Xunit; namespace Meziantou.Framework.ResxSourceGenerator.GeneratorTests; public class ResxGeneratorTests { [RunIfFact(globalizationMode: FactInvariantGlobalizationMode.Disabled)] public void F...
#pragma warning disable CA1304 #pragma warning disable MA0011 using System.Globalization; using TestUtilities; using Xunit; namespace Meziantou.Framework.ResxSourceGenerator.GeneratorTests; public class ResxGeneratorTests { [RunIfFact(globalizationMode: FactInvariantGlobalizationMode.Disabled)] public void F...
Add possibility to add department and DepartmentAddDto
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Diploms.Core; namespace Diploms.WebUI.Controllers { [Route("api/[controller]")] public class DepartmentsController : Controller { [HttpGet("")] public IEnum...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Diploms.Core; namespace Diploms.WebUI.Controllers { [Route("api/[controller]")] public class DepartmentsController : Controller { private readonly IRepository<Depar...
Test for large binary blobs (more than 8000 bytes), just to be sure it works.
using System; using NHibernate; using NUnit.Framework; namespace NHibernate.Test.TypesTest { /// <summary> /// Summary description for BinaryBlobTypeFixture. /// </summary> [TestFixture] public class BinaryBlobTypeFixture : TypeFixtureBase { protected override string TypeName { get { return "BinaryBlob"...
using System; using NHibernate; using NUnit.Framework; namespace NHibernate.Test.TypesTest { /// <summary> /// Summary description for BinaryBlobTypeFixture. /// </summary> [TestFixture] public class BinaryBlobTypeFixture : TypeFixtureBase { protected override string TypeName { get { return "BinaryBlob"...
Set FTBPass to true by default
// 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.Runtime; using osu.Framework.Caching; namespace osu.Framework.Configuration { public class FrameworkDebugConfigManager : IniConfigManager<DebugSetting>...
// 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.Runtime; using osu.Framework.Caching; namespace osu.Framework.Configuration { public class FrameworkDebugConfigManager : IniConfigManager<DebugSetting>...
Tweak the hello world test
public static unsafe class Program { public static extern void* malloc(ulong size); public static extern void free(void* data); public static extern int puts(byte* str); public static int Main() { byte* str = (byte*)malloc(3); *str = (byte)'h'; *(str + 1) = (byte)'i'; ...
public static unsafe class Program { public static extern void* malloc(ulong size); public static extern void free(void* data); public static extern int puts(byte* str); public static void FillString(byte* str) { *str = (byte)'h'; *(str + 1) = (byte)'i'; *(str + 2) = (byte)'...
Disable error for invalid asmdef reference
using System.Collections.Generic; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Plugins.Unity.Json.Daemon.Errors; using JetBrains.ReSharper.Plugins.Unity.Json.Psi.Resolve; using JetBrains.ReSharper.Psi; using JetBrains.ReSharper.Psi.JavaScript.LanguageImpl.JSon; using JetBrains.ReSharper...
using System.Collections.Generic; using JetBrains.ReSharper.Feature.Services.Daemon; using JetBrains.ReSharper.Plugins.Unity.Json.Daemon.Errors; using JetBrains.ReSharper.Plugins.Unity.Json.Psi.Resolve; using JetBrains.ReSharper.Psi; using JetBrains.ReSharper.Psi.JavaScript.LanguageImpl.JSon; using JetBrains.ReSharper...
Add maxWidth Image API 2.1 property
using Newtonsoft.Json; namespace Digirati.IIIF.Model.Types.ImageApi { public class ImageServiceProfile : IProfile { [JsonProperty(Order = 1, PropertyName = "formats")] public string[] Formats { get; set; } [JsonProperty(Order = 2, PropertyName = "qualities")] public string[] Q...
using Newtonsoft.Json; namespace Digirati.IIIF.Model.Types.ImageApi { public class ImageServiceProfile : IProfile { [JsonProperty(Order = 1, PropertyName = "formats")] public string[] Formats { get; set; } [JsonProperty(Order = 2, PropertyName = "qualities")] public string[] Q...
Add debug info to troubleshoot failing test
using System; using System.Linq; using System.Net; using AngleSharp.Dom; using PreMailer.Net.Downloaders; namespace PreMailer.Net.Sources { public class LinkTagCssSource : ICssSource { private readonly Uri _downloadUri; private string _cssContents; public LinkTagCssSource(IElement node, Uri baseUri) { /...
using System; using System.Linq; using System.Net; using AngleSharp.Dom; using PreMailer.Net.Downloaders; namespace PreMailer.Net.Sources { public class LinkTagCssSource : ICssSource { private readonly Uri _downloadUri; private string _cssContents; public LinkTagCssSource(IElement node, Uri baseUri) { /...
Move Kevin's blog to his new domain at powershellexplained.com
using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Syndication; using System.Web; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class KevinMarquette : IAmAMicrosoftMVP { public string FirstName => "Kevin"; public string Last...
using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Syndication; using System.Web; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class KevinMarquette : IAmAMicrosoftMVP { public string FirstName => "Kevin"; public string Last...
Return new IDSContext if data is null
using System; using System.Text; using System.Web.Security; using Newtonsoft.Json; using NLog; namespace SFA.DAS.EmployerUsers.Web.Authentication { public class IdsContext { public string ReturnUrl { get; set; } public string ClientId { get; set; } public static string CookieName => "IDS"...
using System; using System.Text; using System.Web.Security; using Newtonsoft.Json; using NLog; namespace SFA.DAS.EmployerUsers.Web.Authentication { public class IdsContext { public string ReturnUrl { get; set; } public string ClientId { get; set; } public static string CookieName => "IDS"...
Print all route information to debug stream (Visual Studio Output panel).
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; namespace AspNetCore.RouteAnalyzer.SampleWebProject { pu...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using System.Diagnostics; namespace AspNetCore.RouteAnalyzer...
Add test coverage for null mod on seeding screen
// 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.Tournament.Models; using osu.Game.Tournament.Screens.TeamIntro; namespace osu.Game.Tournamen...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Linq; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Testing; using osu.Game.Tournament.Models; usi...
Fix invalid GC latency mode being set
// 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.Runtime; using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; namespace osu.Game.Overlays.Settin...
// 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.Runtime; using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; namespace osu.Game.Overlays.Settin...
Make _shouldEndSession false rather than null
using System; using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; namespace Alexa.NET.Response { public class ResponseBody { [JsonProperty("outputSpeech", NullValueHandling = NullValueHandling.Ignore)] public IOutputSpeech OutputSpeech { get; set; } [JsonProper...
using System; using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; namespace Alexa.NET.Response { public class ResponseBody { [JsonProperty("outputSpeech", NullValueHandling = NullValueHandling.Ignore)] public IOutputSpeech OutputSpeech { get; set; } [JsonProper...
Make the language XML file optional
using System.Collections.Generic; using System.Xml; namespace PROProtocol { public class Language { private Dictionary<string, string> _texts; public Language() { XmlDocument xml = new XmlDocument(); xml.Load("Resources/Lang.xml"); _t...
using System.Collections.Generic; using System.IO; using System.Xml; namespace PROProtocol { public class Language { private const string FileName = "Resources/Lang.xml"; private Dictionary<string, string> _texts = new Dictionary<string, string>(); public Language() ...
Use explicit type to cast back to SampleType.
using Ploeh.AutoFixture.Xunit; using Xunit; using Xunit.Extensions; namespace BobTheBuilder.Tests { public class BuildFacts { [Fact] public void CreateADynamicInstanceOfTheRequestedType() { var sut = A.BuilderFor<SampleType>(); var result = sut.Build(); ...
using Ploeh.AutoFixture.Xunit; using Xunit; using Xunit.Extensions; namespace BobTheBuilder.Tests { public class BuildFacts { [Fact] public void CreateADynamicInstanceOfTheRequestedType() { var sut = A.BuilderFor<SampleType>(); var result = sut.Build(); ...
Fix path to annotations in tests
using System; using System.Collections.Generic; using JetBrains.Application; using JetBrains.Diagnostics; using JetBrains.Metadata.Utils; using JetBrains.ReSharper.Psi.ExtensionsAPI.ExternalAnnotations; using JetBrains.TestFramework.Utils; using JetBrains.Util; namespace JetBrains.ReSharper.Plugins.Unity.Tests { ...
using System; using System.Collections.Generic; using JetBrains.Application; using JetBrains.Diagnostics; using JetBrains.Metadata.Utils; using JetBrains.ReSharper.Psi.ExtensionsAPI.ExternalAnnotations; using JetBrains.TestFramework.Utils; using JetBrains.Util; namespace JetBrains.ReSharper.Plugins.Unity.Tests { ...
Add a playback state property to the playlist
using System.Collections.ObjectModel; namespace Espera.Network { public class NetworkPlaylist { public int? CurrentIndex { get; set; } public string Name { get; set; } public int? RemainingVotes { get; set; } public ReadOnlyCollection<NetworkSong> Songs { get; set; } } }
using System.Collections.ObjectModel; namespace Espera.Network { public class NetworkPlaylist { public int? CurrentIndex { get; set; } public string Name { get; set; } public NetworkPlaybackState PlaybackState { get; set; } public int? RemainingVotes { get; set; } p...
Fix bug about not redirecting to forums
using JoinRpg.DataModel; using JoinRpg.Domain; using Microsoft.AspNetCore.Mvc; namespace JoinRpg.Portal.Controllers.Comments { internal static class CommentRedirectHelper { public static ActionResult RedirectToDiscussion(IUrlHelper Url, CommentDiscussion discussion, int? commentId = null) { ...
using JoinRpg.DataModel; using JoinRpg.Domain; using Microsoft.AspNetCore.Mvc; namespace JoinRpg.Portal.Controllers.Comments { internal static class CommentRedirectHelper { public static ActionResult RedirectToDiscussion(IUrlHelper Url, CommentDiscussion discussion, int? commentId = null) { ...
Revert assembly version and assembly file version back to 0.2.0.0
// // Copyright (c) Microsoft. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable la...
// // Copyright (c) Microsoft. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable la...
Introduce EndOffset to Analyze token
using Newtonsoft.Json; namespace Nest { [JsonObject] public class AnalyzeToken { [JsonProperty(PropertyName = "token")] public string Token { get; internal set; } [JsonProperty(PropertyName = "type")] public string Type { get; internal set; } //TODO change to long in 6.0 [JsonProperty(PropertyName = ...
using System; using Newtonsoft.Json; namespace Nest { [JsonObject] public class AnalyzeToken { [JsonProperty("token")] public string Token { get; internal set; } [JsonProperty("type")] public string Type { get; internal set; } //TODO change to long in 6.0... RC: (this is int in Elasticsearch codebase) ...
Remove Restrictions on search endpoint
using System; using System.Linq; using FluentValidation; using SFA.DAS.CommitmentsV2.Models; namespace SFA.DAS.CommitmentsV2.Application.Queries.GetApprenticeships { public class GetApprenticeshipsQueryValidator : AbstractValidator<GetApprenticeshipsQuery> { public GetApprenticeshipsQueryValidator() ...
using System; using System.Linq; using FluentValidation; using SFA.DAS.CommitmentsV2.Models; namespace SFA.DAS.CommitmentsV2.Application.Queries.GetApprenticeships { public class GetApprenticeshipsQueryValidator : AbstractValidator<GetApprenticeshipsQuery> { public GetApprenticeshipsQueryValidator() ...
Remove form Fields from Container Edit
@model Portal.CMS.Web.Areas.Builder.ViewModels.Container.EditViewModel @{ Layout = ""; } <script type="text/javascript"> function Delete() { $('#@Model.ContainerElementId').remove(); var dataParams = { "pageSectionId": @Model.PageSectionId , "componentId": "@Model.ContainerElementId", "__...
@model Portal.CMS.Web.Areas.Builder.ViewModels.Container.EditViewModel @{ Layout = ""; } <script type="text/javascript"> function Delete() { $('#@Model.ContainerElementId').remove(); var dataParams = { "pageSectionId": @Model.PageSectionId , "componentId": "@Model.ContainerElementId", "__...
Test for accelerating whilst falling now passes
using UnityEngine; using System.Collections.Generic; public class PlayerMovement { private const float Gravity = -1.0f; public bool IsOnGround { get; set; } public Vector3 Update() { if (IsOnGround) { return Vector2.zero; } return new Vector3(0....
using UnityEngine; using System.Collections.Generic; public class PlayerMovement { private const float Gravity = -1.0f; public bool IsOnGround { get; set; } private Vector3 currentVelocity; public Vector3 Update() { if (IsOnGround) { return Vector2.zero; ...
Align .NET4 assembly version with main project
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle ("Eve.NET.Net4")] [assembly: AssemblyDescription ("")] [assembly: AssemblyConfiguration ("")] [ass...
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle ("Eve.NET.Net4")] [assembly: AssemblyDescription ("")] [assembly: AssemblyConfiguration ("")] [ass...
Fix code quality for CI
// 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. #nullable disable using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Localisation; using osu.Game.Graphics.UserInterfaceV2; using osu.Game...
// 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. #nullable disable using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Localisation; using osu.Game.Graphics.UserInterfaceV2; using osu.Game...
Add locations to allow scopes to dictionary
using IdentityModel.Client; using System; using System.Collections.Generic; namespace eShopOnContainers.Core.Services.Identity { public class IdentityService : IIdentityService { public string CreateAuthorizationRequest() { // Create URI to authorization endpoint var au...
using IdentityModel.Client; using System; using System.Collections.Generic; namespace eShopOnContainers.Core.Services.Identity { public class IdentityService : IIdentityService { public string CreateAuthorizationRequest() { // Create URI to authorization endpoint var au...
Update ai/navmesh agents to stop pursuing during content display state.
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Engine.Game.Actor { public class NavMeshAgentFollowController : MonoBehaviour { public NavMeshAgent agent; public Transform targetFollow; // Use this for initialization ...
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Engine.Game.Actor { public class NavMeshAgentFollowController : MonoBehaviour { public NavMeshAgent agent; public Transform targetFollow; // Use this for initialization private ...
Call ShowPlayPauseControls and ShowNavigationControls setters in base constructor
using System; using System.Collections.Generic; using System.Text; namespace MediaManager { public abstract class NotificationManagerBase : INotificationManager { protected NotificationManagerBase() { Enabled = true; } private bool _enabled = true; ...
using System; using System.Collections.Generic; using System.Text; namespace MediaManager { public abstract class NotificationManagerBase : INotificationManager { protected NotificationManagerBase() { Enabled = true; ShowPlayPauseControls = true; ShowNavigat...
Update Authorize attribute to use Bearer policy
using LearnWordsFast.API.Exceptions; using LearnWordsFast.API.Services; using LearnWordsFast.API.ViewModels.TrainingController; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; namespace LearnWordsFast.API.Controllers { [Route("api/Training")] [Auth...
using LearnWordsFast.API.Exceptions; using LearnWordsFast.API.Services; using LearnWordsFast.API.ViewModels.TrainingController; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; namespace LearnWordsFast.API.Controllers { [Route("api/Training")] [Auth...
Use Pascal casing for method name
using System; using System.Collections.Generic; namespace WinRSJS { public sealed class Collections { static public object /* IMap<?, ?> */ createMap(string keyTypeName, string valTypeName) { Type typeKey = Type.GetType(keyTypeName); if (typeKey == null) ...
using System; using System.Collections.Generic; namespace WinRSJS { public sealed class Collections { static public object /* IMap<?, ?> */ CreateMap(string keyTypeName, string valTypeName) { Type typeKey = Type.GetType(keyTypeName); if (typeKey == null) ...
Add more supported image extensions to the image viewer plugin.
using System.IO; using System.Windows.Controls; using System.Windows.Media.Imaging; using NuGetPackageExplorer.Types; namespace PackageExplorer { [PackageContentViewerMetadata(99, ".jpg", ".gif", ".png", ".tif")] internal class ImageFileViewer : IPackageContentViewer { public object GetView(st...
using System.IO; using System.Windows.Controls; using System.Windows.Media.Imaging; using NuGetPackageExplorer.Types; namespace PackageExplorer { [PackageContentViewerMetadata(99, ".jpg", ".gif", ".png", ".tif", ".bmp", ".ico")] internal class ImageFileViewer : IPackageContentViewer { public o...
Clear all view engines and add only Razor view engine (performance)
using AnimalHope.Web.Infrastructure.Mapping; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; namespace AnimalHope.Web { public class MvcApplication : System.Web.HttpApplication { protect...
using AnimalHope.Web.Infrastructure.Mapping; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; namespace AnimalHope.Web { public class MvcApplication : System.Web.HttpApplication { protect...
Load environment variables from different targets to support ASP.Net applications.
using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace Archaius { public class EnvironmentConfiguration : DictionaryConfiguration { public EnvironmentConfiguration() : base(GetEnvironmentVariables()) { } public overri...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace Archaius { public class EnvironmentConfiguration : DictionaryConfiguration { public EnvironmentConfiguration() : base(GetEnvironmentVariables()) { } public overri...
Revert "Add failing test case"
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Linq; using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Testing; using osu.Game.Beatmaps; using osu.Game.Rulesets.Catch.Skinning.Legac...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Catch.Tests { [TestFixture] public class TestSceneCatchPlayerLegacySkin : LegacyS...
Add contracts to verifty the DrawModel() method doesn't receive null data.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace MonoGameUtils.Drawing { /// <summary> /// Various useful utility methods that don't obviously go elsewhere. /...
using System; using System.Collections.Generic; using System.Diagnostics.Contracts; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace MonoGameUtils.Drawing { /// <summary> /// Various useful utility methods that...
Clean up and add comments
 using System.Collections.Generic; using LinqToTTreeInterfacesLib; namespace LINQToTTreeLib.Statements { /// <summary> /// Sits inside a loop and records the integer that it is given on each call by pushing it onto a vector. It *does not* /// check for uniqueness. /// </summary> class Stat...
 using System.Collections.Generic; using LinqToTTreeInterfacesLib; using LINQToTTreeLib.Variables; namespace LINQToTTreeLib.Statements { /// <summary> /// Sits inside a loop and records the integer that it is given on each call by pushing it onto a vector. It *does not* /// check for uniqueness of ...
Check validity if the ImageView before trying to access its Drawable
using Android.Widget; using FFImageLoading.Work; namespace FFImageLoading.Extensions { public static class ImageViewExtensions { /// <summary> /// Retrieve the currently active work task (if any) associated with this imageView. /// </summary> /// <param name="imageView"></param> /// <returns></returns> p...
using Android.Widget; using FFImageLoading.Work; using System; namespace FFImageLoading.Extensions { public static class ImageViewExtensions { /// <summary> /// Retrieve the currently active work task (if any) associated with this imageView. /// </summary> /// <param name="imageView"></param> /// <returns>...
Set collections on property groups
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace Umbraco.Web.Models.ContentEditing { [DataContract(Name = "propertyGroup", Namespace = "")] public class PropertyGroupDisplay { public Pr...
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace Umbraco.Web.Models.ContentEditing { [DataContract(Name = "propertyGroup", Namespace = "")] public class PropertyGroupDisplay { public Pr...
Add audio feedback for rearranging list items
// 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. #nullable disable using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; namespace osu.Game.Graphics.Containers { pub...
// 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. #nullable disable using System.Collections.Specialized; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; using osu.Framework....
Update benchmarks to new format
using Microsoft.Xunit.Performance; using Xunit; namespace DNXLibrary { // This project can output the Class library as a NuGet Package. // To enable this option, right-click on the project and select the Properties menu item. In the Build tab select "Produce outputs on build". public class DNXSampleTests ...
using Microsoft.Xunit.Performance; using Xunit; namespace DNXLibrary { // This project can output the Class library as a NuGet Package. // To enable this option, right-click on the project and select the Properties menu item. In the Build tab select "Produce outputs on build". public class DNXSampleTests ...
Make Markdown help open in another window
@model JoinRpg.DataModel.MarkdownString @{ var requiredMsg = new MvcHtmlString(""); var validation = false; foreach (var attr in @Html.GetUnobtrusiveValidationAttributes(@ViewData.TemplateInfo.HtmlFieldPrefix, @ViewData.ModelMetadata)) { if (attr.Key == "data-val-required") { requiredMs...
@model JoinRpg.DataModel.MarkdownString @{ var requiredMsg = new MvcHtmlString(""); var validation = false; foreach (var attr in @Html.GetUnobtrusiveValidationAttributes(@ViewData.TemplateInfo.HtmlFieldPrefix, @ViewData.ModelMetadata)) { if (attr.Key == "data-val-required") { requiredMs...
Add english as well as german
// WhistTest.cs // <copyright file="WhistTest.cs"> This code is protected under the MIT License. </copyright> using System; using CardGames.Whist; namespace ConsoleTesting { /// <summary> /// The whist test class /// </summary> public class WhistTest : IGameTest { /// <summary>...
// WhistTest.cs // <copyright file="WhistTest.cs"> This code is protected under the MIT License. </copyright> using System; using CardGames.Whist; namespace ConsoleTesting { /// <summary> /// The whist test class /// </summary> public class WhistTest : IGameTest { /// <summary>...
Fix "Search" widget ignoring search errors
using System.Diagnostics; using System.Windows.Input; using DesktopWidgets.Classes; using DesktopWidgets.Helpers; using DesktopWidgets.ViewModelBase; using GalaSoft.MvvmLight.Command; namespace DesktopWidgets.Widgets.Search { public class ViewModel : WidgetViewModelBase { private string _searchText; ...
using System.Diagnostics; using System.Windows.Input; using DesktopWidgets.Classes; using DesktopWidgets.Helpers; using DesktopWidgets.ViewModelBase; using GalaSoft.MvvmLight.Command; namespace DesktopWidgets.Widgets.Search { public class ViewModel : WidgetViewModelBase { private string _searchText; ...
Add skin traget resetting on setup/teardown steps
// 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.IO.Stores; using osu.Game.Rulesets; using osu.Game.Skinning; namespace osu.Game.Tests.Visual {...
// 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.Extensions.IEnumerableExtensions; using osu.Framework.IO.Stores; using osu.Framework.Testing; u...
Implement last update model, had forgotten, hehe
namespace pinboard.net.Models { public class LastUpdate { } }
using Newtonsoft.Json; using System; namespace pinboard.net.Models { public class LastUpdate { [JsonProperty("update_time")] public DateTimeOffset UpdateTime { get; set; } } }