Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add tests for json lists.
using NUnit.Framework; using System.Collections.Generic; namespace FunWithNewtonsoft { [TestFixture] public class ListTests { [Test] public void Deserialize_PartialList_ReturnsList() { // Assemble string json = @" {'Number':'1','Letter':'A'},...
using Newtonsoft.Json; using NUnit.Framework; using System.Collections.Generic; namespace FunWithNewtonsoft { [TestFixture] public class ListTests { [Test] public void DeserializeObject_JsonList_ReturnsList() { // Assemble string json = @" [ ...
Change the Order for Inlining Multi Units
using System.Collections.Generic; using System.Linq; using GekkoAssembler.IntermediateRepresentation; namespace GekkoAssembler.Optimizers { public class IRMultiUnitOptimizer : IOptimizer { public IRCodeBlock Optimize(IRCodeBlock block) { var units = block.Units; var ne...
using System.Collections.Generic; using System.Linq; using GekkoAssembler.IntermediateRepresentation; namespace GekkoAssembler.Optimizers { public class IRMultiUnitOptimizer : IOptimizer { public IRCodeBlock Optimize(IRCodeBlock block) { var units = block.Units; var ne...
Add count to deletion dialog
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Graphics.Sprites; using osu.Game.Overlays.Dialog; namespace osu.Game.Collections { public class DeleteCollectionDialog : PopupDialo...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using Humanizer; using osu.Framework.Graphics.Sprites; using osu.Game.Overlays.Dialog; namespace osu.Game.Collections { public class DeleteCollectionDi...
Change orbit angles to degree
using UnityEngine; public class Planet : MonoBehaviour { [SerializeField] private float _radius; public float Radius { get { return _radius; } set { _radius = value; } } public float Permieter { get { return 2 * Mathf.PI * Radius; } } public void SampleOrbit2D( f...
using UnityEngine; public class Planet : MonoBehaviour { [SerializeField] private float _radius; public float Radius { get { return _radius; } set { _radius = value; } } public float Permieter { get { return 2 * Mathf.PI * Radius; } } public void SampleOrbit2D( f...
Add the defaults for GeneratorOptions
using System; namespace ExternalTemplates { /// <summary> /// Default generator options. /// </summary> public class GeneratorOptions : IGeneratorOptions { /// <summary> /// Gets the path relative to the web root where the templates are stored. /// Default is "/Content/templates". /// </summary> public...
using System; namespace ExternalTemplates { /// <summary> /// Default generator options. /// </summary> public class GeneratorOptions : IGeneratorOptions { /// <summary> /// Gets the path relative to the web root where the templates are stored. /// Default is "/Content/templates". /// </summary> public...
Fix MySql do not support Milliseconds
using FluentMigrator.Runner.Generators.Generic; namespace FluentMigrator.Runner.Generators.MySql { public class MySqlQuoter : GenericQuoter { public override string OpenQuote { get { return "`"; } } public override string CloseQuote { get { return "`"; } } public override string Quot...
using FluentMigrator.Runner.Generators.Generic; namespace FluentMigrator.Runner.Generators.MySql { public class MySqlQuoter : GenericQuoter { public override string OpenQuote { get { return "`"; } } public override string CloseQuote { get { return "`"; } } public override string Quot...
Stop chancellor from prompting the player when they have no cards in their deck.
using System; using Dominion.Rules; using Dominion.Rules.Activities; using Dominion.Rules.CardTypes; namespace Dominion.Cards.Actions { public class Chancellor : Card, IActionCard { public Chancellor() : base(3) { } public void Play(TurnContext context) { ...
using System; using Dominion.Rules; using Dominion.Rules.Activities; using Dominion.Rules.CardTypes; namespace Dominion.Cards.Actions { public class Chancellor : Card, IActionCard { public Chancellor() : base(3) { } public void Play(TurnContext context) { ...
Add support for custom key delimiter
using System; using System.Collections.Specialized; using Xunit; namespace GV.AspNet.Configuration.ConfigurationManager.UnitTests { public class AppSettingsConfigurationProviderTests { [Theory] [InlineData("Key1", "Value1")] [InlineData("Key2", "Value2")] public void LoadsKeyValuePairsFromAppSett...
using System; using System.Collections.Specialized; using Microsoft.Extensions.Configuration; using Xunit; namespace GV.AspNet.Configuration.ConfigurationManager.UnitTests { public class AppSettingsConfigurationProviderTests { public class Load { [Theory] [InlineData("", "Value")] [InlineD...
Test for aggregate exception handling
using System.Linq; using Bugsnag.Payload; using Xunit; namespace Bugsnag.Tests.Payload { public class ExceptionTests { [Fact] public void CorrectNumberOfExceptions() { var exception = new System.Exception("oh noes!"); var exceptions = new Exceptions(exception, 5); Assert.Single(exce...
using System.Linq; using System.Threading.Tasks; using Bugsnag.Payload; using Xunit; namespace Bugsnag.Tests.Payload { public class ExceptionTests { [Fact] public void CorrectNumberOfExceptions() { var exception = new System.Exception("oh noes!"); var exceptions = new Exceptions(exception,...
Use var declaration. Fix ArgumentNullException parameter name.
using System; using System.Collections.Generic; using System.Drawing; using PdfSharp.Pdf.Advanced; // ReSharper disable once CheckNamespace namespace PdfSharp.Pdf { /// <summary> /// Extension methods for the PdfSharp library PdfItem object. /// </summary> public static class PdfPageExtensions { /// <su...
using System; using System.Collections.Generic; using System.Drawing; using PdfSharp.Pdf.Advanced; // ReSharper disable once CheckNamespace namespace PdfSharp.Pdf { /// <summary> /// Extension methods for the PdfSharp library PdfItem object. /// </summary> public static class PdfPageExtensions { /// <su...
Bring Attention to the Quick Access Panel On Page Load
@model Portal.CMS.Web.Areas.Admin.ViewModels.Dashboard.QuickAccessViewModel <div class="page-admin-wrapper admin-wrapper"> @foreach (var category in Model.Categories) { <a href="@category.Link" class="button @category.CssClass @(category.LaunchModal ? "launch-modal" : "")" data-toggle="popover" data-p...
@model Portal.CMS.Web.Areas.Admin.ViewModels.Dashboard.QuickAccessViewModel <div class="page-admin-wrapper admin-wrapper animated zoomInUp"> @foreach (var category in Model.Categories) { <a href="@category.Link" class="button @category.CssClass @(category.LaunchModal ? "launch-modal" : "")" data-toggl...
Make sure we order by sequence
using System; using MyTrips.DataObjects; using MyTrips.DataStore.Abstractions; using System.Threading.Tasks; using MyTrips.Utils; using System.Collections.Generic; namespace MyTrips.DataStore.Azure.Stores { public class TripStore : BaseStore<Trip>, ITripStore { IPhotoStore photoStore; public T...
using System; using MyTrips.DataObjects; using MyTrips.DataStore.Abstractions; using System.Threading.Tasks; using MyTrips.Utils; using System.Collections.Generic; using System.Linq; namespace MyTrips.DataStore.Azure.Stores { public class TripStore : BaseStore<Trip>, ITripStore { IPhotoStore photoStor...
Revert "Remove RandomTrace stuff from main"
using static System.Console; using System.Linq; using CIV.Ccs; using CIV.Hml; namespace CIV { class Program { static void Main(string[] args) { var text = System.IO.File.ReadAllText(args[0]); var processes = CcsFacade.ParseAll(text); var hmlText = "[[ack]][[ack]][[ack...
using static System.Console; using CIV.Ccs; using CIV.Interfaces; namespace CIV { class Program { static void Main(string[] args) { var text = System.IO.File.ReadAllText(args[0]); var processes = CcsFacade.ParseAll(text); var trace = CcsFacade.RandomTrace(processes["...
Allow statements to end with EOF instead of forcing a newline for every evaluated statement
using EOBot.Interpreter.Extensions; using System.Collections.Generic; using System.Linq; namespace EOBot.Interpreter.States { public class StatementEvaluator : IScriptEvaluator { private readonly IEnumerable<IScriptEvaluator> _evaluators; public StatementEvaluator(IEnumerable<IScriptEvaluator...
using EOBot.Interpreter.Extensions; using System.Collections.Generic; using System.Linq; namespace EOBot.Interpreter.States { public class StatementEvaluator : IScriptEvaluator { private readonly IEnumerable<IScriptEvaluator> _evaluators; public StatementEvaluator(IEnumerable<IScriptEvaluator...
Remove new keyword from interface
namespace Sharpy.Core { /// <summary> /// <para>Represent a generator which can generate any amount of elements by invoking method <see cref="Generate" />.</para> /// </summary> /// <typeparam name="T"></typeparam> public interface IGenerator<out T> { /// <summary> /// <par...
namespace Sharpy.Core { /// <summary> /// <para>Represent a generator which can generate any amount of elements by invoking method <see cref="Generate" />.</para> /// </summary> /// <typeparam name="T"></typeparam> public interface IGenerator<out T> { /// <summary> /// <para...
Remove scale effect on editor screen switches
// 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.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; namespace osu.Game.Screens.Ed...
// 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.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; namespace osu.Game.Screens.Ed...
Read environment variables for test settings.
using System.Configuration; namespace SchemaZen.test { public class ConfigHelper { public static string TestDB { get { return ConfigurationManager.AppSettings["testdb"]; } } public static string TestSchemaDir { get { return ConfigurationManager.AppSettings["test_schema_dir"]; } } public static stri...
using System; using System.Configuration; namespace SchemaZen.test { public class ConfigHelper { public static string TestDB { get { return GetSetting("testdb"); } } public static string TestSchemaDir { get { return GetSetting("test_schema_dir"); } } public static string SqlDbDiffPath { get { re...
Add extra property to use new long Id's
using System; using System.Collections.Generic; using System.Text; using MiX.Integrate.Shared.Entities.Communications; namespace MiX.Integrate.Shared.Entities.Messages { public class SendJobMessageCarrier { public SendJobMessageCarrier() { } public short VehicleId { get; set; } public string Description { ge...
using System; using System.Collections.Generic; using System.Text; using MiX.Integrate.Shared.Entities.Communications; namespace MiX.Integrate.Shared.Entities.Messages { public class SendJobMessageCarrier { public SendJobMessageCarrier() { } public short VehicleId { get; set; } public string Description { ge...
Remove unused property from Track model
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SpotiPeek.App { class TrackModel { public string SongTitle; public string ArtistName; public string AlbumTitle; public string AlbumYear; } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SpotiPeek.App { class TrackModel { public string SongTitle; public string ArtistName; public string AlbumTitle; } }
Add osu! prefix to mode descriptions.
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.ComponentModel; namespace osu.Game.GameModes.Play { public enum PlayMode { [Description(@"osu!")] Osu = 0, [Des...
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.ComponentModel; namespace osu.Game.GameModes.Play { public enum PlayMode { [Description(@"osu!")] Osu = 0, [Des...
Fix to not use a test filter in NUnit when no filters has been declared in Giles. This was causing NUnit to not run the tests
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using Giles.Core.Runners; using Giles.Core.Utility; using NUnit.Core; using NUnit.Core.Filters; namespace Giles.Runner.NUnit { public class NUnitRunner : IFrameworkRunner { IEnumerable<string> filte...
using System.Collections.Generic; using System.Linq; using System.Reflection; using Giles.Core.Runners; using NUnit.Core; using NUnit.Core.Filters; namespace Giles.Runner.NUnit { public class NUnitRunner : IFrameworkRunner { IEnumerable<string> filters; public SessionResults RunAs...
Return null if invalid offset and seek to the offset
using System.Text; using dot10.IO; namespace dot10.dotNET { /// <summary> /// Represents the #Strings stream /// </summary> public class StringsStream : DotNetStream { /// <inheritdoc/> public StringsStream(IImageStream imageStream, StreamHeader streamHeader) : base(imageStream, streamHeader) { } /// ...
using System.Text; using dot10.IO; namespace dot10.dotNET { /// <summary> /// Represents the #Strings stream /// </summary> public class StringsStream : DotNetStream { /// <inheritdoc/> public StringsStream(IImageStream imageStream, StreamHeader streamHeader) : base(imageStream, streamHeader) { } /// ...
Fix issue where ratio was always returning "1"
using System; namespace Satrabel.OpenContent.Components.TemplateHelpers { public class Ratio { private readonly float _ratio; public int Width { get; private set; } public int Height { get; private set; } public float AsFloat { get { return (float)Width / (...
using System; namespace Satrabel.OpenContent.Components.TemplateHelpers { public class Ratio { private readonly float _ratio; public int Width { get; private set; } public int Height { get; private set; } public float AsFloat { get { return (float)Width / (...
Make FeeParser throw if the fee parsed is not low, medium or high (previously defaulted to medium0
using System; namespace Stratis.Bitcoin.Features.Wallet { /// <summary> /// An indicator on how fast a transaction will be accepted in a block /// </summary> public enum FeeType { /// <summary> /// Slow. /// </summary> Low = 0, /// <summary> /// Ava...
using System; namespace Stratis.Bitcoin.Features.Wallet { /// <summary> /// An indicator of how fast a transaction will be accepted in a block. /// </summary> public enum FeeType { /// <summary> /// Slow. /// </summary> Low = 0, /// <summary> /// Av...
Set current directory for initial script.
using System; using System.Threading; using System.Threading.Tasks; namespace Infusion.EngineScripts { public sealed class ScriptEngine { private readonly IScriptEngine[] engines; private string scriptRootPath; public ScriptEngine(params IScriptEngine[] engines) { ...
using System; using System.IO; using System.Threading; using System.Threading.Tasks; namespace Infusion.EngineScripts { public sealed class ScriptEngine { private readonly IScriptEngine[] engines; private string scriptRootPath; public ScriptEngine(params IScriptEngine[] engines) ...
Check for objects existing using their equals operation rather than Ids
using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace LazyLibrary.Storage.Memory { internal class MemoryRepository<T> : IRepository<T> where T : IStorable { private List<T> repository = new List<T>(); public T GetById(int id) { retur...
using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace LazyLibrary.Storage.Memory { internal class MemoryRepository<T> : IRepository<T> where T : IStorable { private List<T> repository = new List<T>(); public T GetById(int id) { retur...
Put the scratch and warehouse directories up on WASB in the Shark test service. This gets CTAS to work.
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; using System.Threading; using Microsoft.WindowsAzure; using Microsoft.WindowsAzure.Diagnostics; using Microsoft.WindowsAzure.ServiceRuntime; using Microsoft.WindowsAzure.Storage; using Microsoft.Experimental.A...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; using System.Threading; using Microsoft.WindowsAzure; using Microsoft.WindowsAzure.Diagnostics; using Microsoft.WindowsAzure.ServiceRuntime; using Microsoft.WindowsAzure.Storage; using Microsoft.Experimental.A...
Fix sonarqube markup that sub has lhs and rhs identical
using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; using System.Text; using System.Threading.Tasks; using Oberon0.Compiler.Definitions; using Oberon0.Compiler.Solver; namespace Oberon0.Compiler.Expressions.Arithmetic { [Export(typeof(ICalculatable))] cl...
using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; using System.Text; using System.Threading.Tasks; using Oberon0.Compiler.Definitions; using Oberon0.Compiler.Solver; namespace Oberon0.Compiler.Expressions.Arithmetic { [Export(typeof(ICalculatable))] cl...
Add basic bindable instantiation benchmark
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using BenchmarkDotNet.Attributes; using osu.Framework.Bindables; namespace osu.Framework.Benchmarks { public class BenchmarkBindableInstantiation {...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using BenchmarkDotNet.Attributes; using osu.Framework.Bindables; namespace osu.Framework.Benchmarks { [MemoryDiagnoser] public class BenchmarkBinda...
Add DOTNET_HOST_PATH for dotnet nuget commands
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Linq; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Micr...
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Linq; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Micr...
Add a dropdown for selecting organizations
using UnityEditor; using UnityEngine; namespace GitHub.Unity { public class PublishWindow : EditorWindow { private const string PublishTitle = "Publish this repository to GitHub"; private string repoName = ""; private string repoDescription = ""; private bool togglePrivate = fa...
using UnityEditor; using UnityEngine; namespace GitHub.Unity { public class PublishWindow : EditorWindow { private const string PublishTitle = "Publish this repository to GitHub"; private string repoName = ""; private string repoDescription = ""; private int selectedOrg = 0; ...
Add failing test coverage for tournament startup states
// 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.Testing; using osu.Game.Tournament.Components; using osu.Game.Tournament.Scr...
// 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.Components;...
Use existing file encoding if provided override is invalid
using System; using System.IO; using System.Text; using Calamari.Deployment; using Calamari.Integration.FileSystem; using Octostache; namespace Calamari.Integration.Substitutions { public class FileSubstituter : IFileSubstituter { readonly ICalamariFileSystem fileSystem; public FileSubstitute...
using System; using System.IO; using System.Text; using Calamari.Deployment; using Calamari.Integration.FileSystem; using Octostache; namespace Calamari.Integration.Substitutions { public class FileSubstituter : IFileSubstituter { readonly ICalamariFileSystem fileSystem; public FileSubstitute...
Fix bug when splitting conjunctions
using System; using System.Collections.Generic; using System.Linq; using NQuery.Binding; namespace NQuery.Optimization { internal static class Condition { public static BoundExpression And(BoundExpression left, BoundExpression right) { if (left == null) return righ...
using System; using System.Collections.Generic; using System.Linq; using NQuery.Binding; namespace NQuery.Optimization { internal static class Condition { public static BoundExpression And(BoundExpression left, BoundExpression right) { if (left == null) return righ...
Modify progress helper so that activity indicator stops after last call ends
using Cirrious.CrossCore.Core; using System; using System.Threading.Tasks; namespace codestuffers.MvvmCrossPlugins.UserInteraction { /// <summary> /// Helper class that executes a task with a progress bar /// </summary> public class ProgressHelper { private readonly IMvxMainThreadDispatche...
using Cirrious.CrossCore.Core; using System; using System.Threading.Tasks; namespace codestuffers.MvvmCrossPlugins.UserInteraction { /// <summary> /// Helper class that executes a task with a progress bar /// </summary> public class ProgressHelper { private readonly IMvxMainThreadDispatche...
Fix settings not saving when opening "Options"
#region using System.Windows; using SteamAccountSwitcher.Properties; #endregion namespace SteamAccountSwitcher { /// <summary> /// Interaction logic for Options.xaml /// </summary> public partial class Options : Window { public Options() { InitializeComponent(); ...
#region using System.Windows; using SteamAccountSwitcher.Properties; #endregion namespace SteamAccountSwitcher { /// <summary> /// Interaction logic for Options.xaml /// </summary> public partial class Options : Window { public Options() { InitializeComponent(); ...
Add tests for null checking
using GeneratorAPI; using NUnit.Framework; using NUnit.Framework.Internal; namespace Tests.GeneratorAPI { [TestFixture] internal class GeneratorTests { [SetUp] public void Initiate() { _generator = new Generator<Randomizer>(new Randomizer(Seed)); } [TearDown] ...
using System; using GeneratorAPI; using NUnit.Framework; using NUnit.Framework.Internal; namespace Tests.GeneratorAPI { [TestFixture] internal class GeneratorTests { [SetUp] public void Initiate() { _generator = new Generator<Randomizer>(new Randomizer(Seed)); } [T...
Make sure metadata is set before being returned
using System.Collections.Generic; using System.Linq; using Glimpse.Server.Internal; using Glimpse.Internal.Extensions; using Microsoft.AspNet.Http; using Microsoft.Extensions.OptionsModel; namespace Glimpse.Server.Configuration { public class DefaultMetadataProvider : IMetadataProvider { private reado...
using System.Collections.Generic; using System.Linq; using Glimpse.Server.Internal; using Glimpse.Internal.Extensions; using Microsoft.AspNet.Http; using Microsoft.Extensions.OptionsModel; namespace Glimpse.Server.Configuration { public class DefaultMetadataProvider : IMetadataProvider { private reado...
Add test trying to recreate the issue
using Xunit; using Unity.SolrNetCloudIntegration; using Unity; namespace SolrNet.Cloud.Tests { public class UnityTests { private IUnityContainer Setup() { return new SolrNetContainerConfiguration().ConfigureContainer( new FakeProvider(), new UnityContainer()...
using Xunit; using Unity.SolrNetCloudIntegration; using Unity; namespace SolrNet.Cloud.Tests { public class UnityTests { private IUnityContainer Setup() { return new SolrNetContainerConfiguration().ConfigureContainer( new FakeProvider(), new UnityContainer()...
Use the new 15.0 SDK to access meta via IServices
using System; using System.Collections.Generic; using System.Linq; using VersionOne.SDK.APIClient; namespace VersionOne.ServerConnector { // TODO extract interface and inject into VersionOneProcessor internal class EntityFactory { private readonly IMetaModel metaModel; private readonly IServic...
using System; using System.Collections.Generic; using System.Linq; using VersionOne.SDK.APIClient; namespace VersionOne.ServerConnector { // TODO extract interface and inject into VersionOneProcessor internal class EntityFactory { private readonly IServices services; private readonly IEnumerab...
Resolve line too long message on build server
// <copyright file="AssemblyInfoCommon.cs" company="natsnudasoft"> // Copyright (c) Adrian John Dunstan. 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 // // htt...
// <copyright file="AssemblyInfoCommon.cs" company="natsnudasoft"> // Copyright (c) Adrian John Dunstan. 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 // // htt...
Fix 'no multiple zeppelins of the same type' constraint server side.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using Newtonsoft.Json; namespace Battlezeppelins.Models { public class ZeppelinType { public static readonly ZeppelinType MOTHER = new ZeppelinType("Mother", 5); public static readonly ZeppelinType ...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using Newtonsoft.Json; namespace Battlezeppelins.Models { public class ZeppelinType { public static readonly ZeppelinType MOTHER = new ZeppelinType("Mother", 5); public static readonly ZeppelinType ...
Revert to previous debugging method as change wasn't working correctly.
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Windows.Forms; using CefSharp.Internals;...
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using CefSharp.Internals; namespace CefSharp.Brows...
Fix a bug with the console arguments class
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Luval.Common { public class ConsoleArguments { private List<string> _args; public ConsoleArguments(IEnumerable<string> args) { _args = new List<str...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Luval.Common { public class ConsoleArguments { private List<string> _args; public ConsoleArguments(IEnumerable<string> args) { _args = new List<str...
Support for running the app in a "portable" mode
using System; using System.IO; namespace MultiMiner.Utility { public static class ApplicationPaths { public static string AppDataPath() { string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); return Path.Combine(rootPath, "MultiMiner");...
using System; using System.IO; namespace MultiMiner.Utility { public static class ApplicationPaths { public static string AppDataPath() { //if running in "portable" mode if (IsRunningInPortableMode()) { //store files in the working directory ...
Change DisabledProgramSource class to inherit ProgramSource
using System.Collections.Generic; using System.IO; using Wox.Plugin.Program.Programs; namespace Wox.Plugin.Program { public class Settings { public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>(); public List<DisabledProgramSource> DisabledProgramSources { get; set...
using System.Collections.Generic; using System.IO; using Wox.Plugin.Program.Programs; namespace Wox.Plugin.Program { public class Settings { public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>(); public List<DisabledProgramSource> DisabledProgramSources { get; set...
Fix bitmap serialization with indexed format bitmaps
namespace TAUtil.Gdi.Bitmap { using System.Drawing; using System.Drawing.Imaging; using System.IO; using TAUtil.Gdi.Palette; /// <summary> /// Serializes a 32-bit Bitmap instance into raw 8-bit indexed color data. /// The mapping from color to index is done according to the given...
namespace TAUtil.Gdi.Bitmap { using System.Drawing; using System.Drawing.Imaging; using System.IO; using TAUtil.Gdi.Palette; /// <summary> /// Serializes a 32-bit Bitmap instance into raw 8-bit indexed color data. /// The mapping from color to index is done according to the given...
Add full testing flow for `BeatmapOffsetControl`
// 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.Graphics; using osu.Game.Screens.Play.PlayerSettings; using osu.Game.Tests.Visual.Ranking; namespace osu.Game.Tests.Visual.Gam...
// 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.Overlays.Settings; using osu.Game.Scoring; using osu.G...
Add "Search" widget no base url warning
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; 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...
Use string instead of String
using System; using System.ComponentModel; using Newtonsoft.Json; using Sendgrid.Webhooks.Converters; namespace Sendgrid.Webhooks.Service { public class WebhookCategoryConverter : GenericListCreationJsonConverter<String> { } }
using System; using System.ComponentModel; using Newtonsoft.Json; using Sendgrid.Webhooks.Converters; namespace Sendgrid.Webhooks.Service { public class WebhookCategoryConverter : GenericListCreationJsonConverter<string> { } }
Add back incorrectly removed parameter
// 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.Platform; using osu.Framework.Platform.Linux; using osu.Framework.Platform.MacOS; using osu.Framework.Platform.Windows; using System; namespace osu....
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Platform; using osu.Framework.Platform.Linux; using osu.Framework.Platform.MacOS; using osu.Framework.Platform.Windows; using System; namespace osu....
Check the environment variable for the license key
using CertiPay.PDF; using Nancy; using Nancy.TinyIoc; using System; using System.Configuration; namespace CertiPay.Services.PDF { public class Bootstrapper : DefaultNancyBootstrapper { private static String ABCPdfLicense { get { return ConfigurationManager.AppSettings["ABCPDF-Licen...
using CertiPay.PDF; using Nancy; using Nancy.TinyIoc; using System; using System.Configuration; namespace CertiPay.Services.PDF { public class Bootstrapper : DefaultNancyBootstrapper { private static String ABCPdfLicense { get { // Check the environment ...
Add skips to prime factors test suite
// This file was auto-generated based on version 1.0.0 of the canonical data. using Xunit; public class PrimeFactorsTest { [Fact] public void No_factors() { Assert.Empty(PrimeFactors.Factors(1)); } [Fact] public void Prime_number() { Assert.Equal(new[] { 2 }, PrimeFactors....
// This file was auto-generated based on version 1.0.0 of the canonical data. using Xunit; public class PrimeFactorsTest { [Fact] public void No_factors() { Assert.Empty(PrimeFactors.Factors(1)); } [Fact(Skip = "Remove to run test")] public void Prime_number() { Assert.Equ...
Add Test for SemVer Parsing
using HolzShots.Net.Custom; using Xunit; namespace HolzShots.Core.Tests.Net.Custom { public class CustomUploaderLoaderTests { [Theory] [FileStringContentData("Files/DirectUpload.net.hsjson")] [FileStringContentData("Files/FotosHochladen.hsjson")] public void ValidateTest(string ...
using HolzShots.Net.Custom; using Xunit; namespace HolzShots.Core.Tests.Net.Custom { public class CustomUploaderLoaderTests { [Theory] [FileStringContentData("Files/DirectUpload.net.hsjson")] [FileStringContentData("Files/FotosHochladen.hsjson")] public void ValidateTest(string ...
Fix scheduled tasks not being cleaned up between test 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 System.Diagnostics; using osu.Framework.Utils; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Osu.Tests { pu...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using System.Diagnostics; using osu.Framework.Threading; using osu.Framework.Utils; using osu.Game.Beatmaps; using osu.Game.Rulesets.Osu...
Add an optional timeout for connection attempts.
using System; using System.Net.Sockets; using System.Net; using System.Threading; namespace NDeproxy { public static class SocketHelper { static readonly Logger log = new Logger("SocketHelper"); public static Socket Server(int port, int listenQueue=5) { var s = new Socket(A...
using System; using System.Net.Sockets; using System.Net; using System.Threading; namespace NDeproxy { public static class SocketHelper { static readonly Logger log = new Logger("SocketHelper"); public static Socket Server(int port, int listenQueue=5) { var s = new Socket(A...
Add support for builtins directory from the assembly folder/_meta
// Copyright (c) Alexandre Mutel. All rights reserved. // This file is licensed under the BSD-Clause 2 license. // See the license.txt file in the project root for more information. using System.Collections.Generic; namespace Lunet.Core { /// <summary> /// Manages the meta information associated to a site (f...
// Copyright (c) Alexandre Mutel. All rights reserved. // This file is licensed under the BSD-Clause 2 license. // See the license.txt file in the project root for more information. using System.Collections.Generic; using System.IO; using System.Reflection; namespace Lunet.Core { /// <summary> /// Manages th...
Set `Content-Length` in the `hello` sample
using System; using System.IO; using System.Collections.Generic; using System.Threading.Tasks; using Owin; namespace Connect.Owin.Examples.Hello { // OWIN application delegate using AppFunc = Func<IDictionary<string, object>, Task>; public class Startup { public void Configuration(IAppBuilde...
using System; using System.IO; using System.Collections.Generic; using System.Threading.Tasks; using Owin; namespace Connect.Owin.Examples.Hello { // OWIN application delegate using AppFunc = Func<IDictionary<string, object>, Task>; public class Startup { public void Configuration(IAppBuilde...
Add boolean to figure out is the uow is made with the session
using System; using System.Data; using Dapper.FastCrud; namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Data { public class UnitOfWork : DbTransaction, IUnitOfWork { public SqlDialect SqlDialect { get; set; } private readonly Guid _guid = Guid.NewGuid(); public UnitOfWork(ID...
using System; using System.Data; using Dapper.FastCrud; namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Data { public class UnitOfWork : DbTransaction, IUnitOfWork { public SqlDialect SqlDialect { get; set; } private readonly Guid _guid = Guid.NewGuid(); public UnitOfWork(ID...
Add service ServiceKnownTypes for object[] and Dictionary<string, object> so that basic arrays can be passed two and from functions
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System.ServiceModel; namespace CefSharp.Internals { [ServiceContract(CallbackContract = typeof(IRenderProcess), SessionMode = SessionMo...
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System.Collections.Generic; using System.ServiceModel; namespace CefSharp.Internals { [ServiceContract(CallbackContract = typeof(IRende...
Tidy up sum a bit by moving where we cast and negate to the line below.
using System; using engine.core; namespace engine.rules { public class PercentageDiscount : Rule { private readonly string m_ApplicableItemName; private readonly double m_Percentage; public PercentageDiscount(string applicableItemName, int percentage) { m_Applicabl...
using System; using engine.core; namespace engine.rules { public class PercentageDiscount : Rule { private readonly string m_ApplicableItemName; private readonly double m_Percentage; public PercentageDiscount(string applicableItemName, int percentage) { m_Applicabl...
Use the same reference for all method calls
using WampSharp.Binding; using WampSharp.V2.Binding; using WampSharp.V2.Client; using WampSharp.WebSocket4Net; namespace WampSharp.V2 { public class DefaultWampChannelFactory : WampChannelFactory { public IWampChannel CreateChannel<TMessage>(string address, ...
using WampSharp.Binding; using WampSharp.V2.Binding; using WampSharp.V2.Client; using WampSharp.WebSocket4Net; namespace WampSharp.V2 { public class DefaultWampChannelFactory : WampChannelFactory { private readonly MessagePackObjectBinding mMsgpackBinding = new MessagePackObjectBinding(); priv...
Add an Explicit test that tries to use AsParallel(). It will hang after the exercise is completed, if the solution is the same as mine.
using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Lurchsoft.FileData; using Lurchsoft.ParallelWorkshop.Ex10WaitHalfWay; using NUnit.Framework; namespace Lurchsoft.ParallelWorkshopTests.Ex10WaitHalfWay { [TestFixture] public class LimitedModeCharacterCounterTests { ...
using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Lurchsoft.FileData; using Lurchsoft.ParallelWorkshop.Ex10WaitHalfWay; using NUnit.Framework; namespace Lurchsoft.ParallelWorkshopTests.Ex10WaitHalfWay { [TestFixture] public class LimitedModeCharacterCounterTests { ...
Use Task.Run instead of .Start()
using System; using System.IO; using System.Timers; using StatoBot.Core; namespace StatoBot.Analytics { public class AnalyzerBot : TwitchBot { public ChatAnalyzer Analyzer; public AnalyzerBot(Credentials credentials, string channel) : base(credentials, channel) { Analyzer ...
using System; using System.IO; using System.Timers; using System.Threading.Tasks; using StatoBot.Core; namespace StatoBot.Analytics { public class AnalyzerBot : TwitchBot { public ChatAnalyzer Analyzer; public AnalyzerBot(Credentials credentials, string channel) : base(credentials, channel) ...
Fix hit object placement not receiving input when outside playfield
// 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.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI.Scrolling; na...
// 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.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI.Scrolling; usi...
Reduce the number of slice operations performed during an Advance, when those slices were used only for their length.
namespace Parsley; public static class ReadOnlySpanExtensions { public static ReadOnlySpan<char> Peek(this ref ReadOnlySpan<char> input, int length) => length >= input.Length ? input.Slice(0) : input.Slice(0, length); public static void Advance(this ref ReadOnlySpan<char> input...
namespace Parsley; public static class ReadOnlySpanExtensions { public static ReadOnlySpan<char> Peek(this ref ReadOnlySpan<char> input, int length) => length >= input.Length ? input.Slice(0) : input.Slice(0, length); public static void Advance(this ref ReadOnlySpan<char> input...
Introduce caching of ShouldIgnore request so that the ignorer pipeline is only executed once per request
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Http; namespace Glimpse.Agent.Web { public class DefaultRequestIgnorerManager : IRequestIgnorerManager { public DefaultRequestIgnorerManager(IExtensionProvider<IRequestIgnorer> requestIgnorerProvider, IHttpContex...
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Http; using Microsoft.AspNet.JsonPatch.Helpers; namespace Glimpse.Agent.Web { public class DefaultRequestIgnorerManager : IRequestIgnorerManager { public DefaultRequestIgnorerManager(IExtensionProvider<IRequestIg...
Make sure we register stuff
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Splat; namespace Akavache { internal interface IWantsToRegisterStuff { void Register(IMutableDependencyResolver resolverToUse); } public static cl...
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Splat; namespace Akavache { internal interface IWantsToRegisterStuff { void Register(IMutableDependencyResolver resolverToUse); } public static cl...
Add the warrant security type.
using System; using System.ComponentModel; namespace Krs.Ats.IBNet { /// <summary> /// Contract Security Types /// </summary> [Serializable()] public enum SecurityType { /// <summary> /// Stock /// </summary> [Description("STK")] Stock, //...
using System; using System.ComponentModel; namespace Krs.Ats.IBNet { /// <summary> /// Contract Security Types /// </summary> [Serializable()] public enum SecurityType { /// <summary> /// Stock /// </summary> [Description("STK")] Stock, //...
Add helpers for converting to and from Fahrenheit
using Content.Shared.Maths; namespace Content.Shared.Utility { public static class TemperatureHelpers { public static float CelsiusToKelvin(float celsius) { return celsius + PhysicalConstants.ZERO_CELCIUS; } public static float KelvinToCelsius(float kelvin) ...
using Content.Shared.Maths; namespace Content.Shared.Utility { public static class TemperatureHelpers { public static float CelsiusToKelvin(float celsius) { return celsius + PhysicalConstants.ZERO_CELCIUS; } public static float CelsiusToFahrenheit(float celsius) ...
Write some more tests for secret splitting
using NUnit.Framework; using SecretSplitting; namespace ElectronicCash.Tests { [TestFixture] class SecretSplittingTests { private static readonly byte[] Message = Helpers.GetBytes("Supersecretmessage"); private static readonly byte[] RandBytes = Helpers.GetRandomBytes(Helpers.GetString(Mes...
using NUnit.Framework; using SecretSplitting; namespace ElectronicCash.Tests { [TestFixture] class SecretSplittingTests { private static readonly byte[] Message = Helpers.GetBytes("Supersecretmessage"); private static readonly byte[] RandBytes = Helpers.GetRandomBytes(Helpers.GetString(Mes...
Disable adding redundant arguments for getting machine id
using System; namespace BuildingBlocks.CopyManagement { public class SmartClientApplicationIdentity : IApplicationIdentity { private static readonly Lazy<IApplicationIdentity> _current; static SmartClientApplicationIdentity() { _current = new Lazy<IApplicationIden...
using System; namespace BuildingBlocks.CopyManagement { public class SmartClientApplicationIdentity : IApplicationIdentity { private static readonly Lazy<IApplicationIdentity> _current; static SmartClientApplicationIdentity() { _current = new Lazy<IApplicationIden...
Set the right shader type.
using System; using ChamberLib.Content; using System.IO; namespace ChamberLib.OpenTK { public class GlslShaderImporter { public GlslShaderImporter(ShaderStageImporter next=null) { this.next = next; } readonly ShaderStageImporter next; public ShaderContent ...
using System; using ChamberLib.Content; using System.IO; namespace ChamberLib.OpenTK { public class GlslShaderImporter { public GlslShaderImporter(ShaderStageImporter next=null) { this.next = next; } readonly ShaderStageImporter next; public ShaderContent ...
Add tests for time display
// 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.Components; using osu.Game.Tournament.Screens.Schedule; namespace osu.Game.Tourna...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Tournament.Components; using osu.Game.Tournament.Screens...
Update compatibility checks for user language permissions
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Umbraco.Cms.Core.Configuration; namespace uSync.Core { /// <summary> /// a centralized way of telling if the current version of umbraco has /// certain features or not. /// </...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Umbraco.Cms.Core.Configuration; namespace uSync.Core { /// <summary> /// a centralized way of telling if the current version of umbraco has /// certain features or not. /// </...
Correct namespace to fix failure
@using System.Security.Principal @if (User.IsSignedIn()) { using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) { @Html.AntiForgeryToken() <ul class="nav navbar-nav navbar-right"> <li> @Html.ActionLink("He...
@using System.Security.Claims @if (User.IsSignedIn()) { using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) { @Html.AntiForgeryToken() <ul class="nav navbar-nav navbar-right"> <li> @Html.ActionLink("Hello...
Make header of header middleware publicly accessible
using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Azuria.ErrorHandling; using Azuria.Requests.Builder; namespace Azuria.Middleware { /// <summary> /// Adds some static headers to the request. They indicate things like application, version and api key used. ...
using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Azuria.ErrorHandling; using Azuria.Requests.Builder; namespace Azuria.Middleware { /// <summary> /// Adds some static headers to the request. They indicate things like application, version and api key used. ...
Simplify parsing string to Topology enum
using System; using System.Globalization; using ContainerInstaller; using SIM.Pipelines.Processors; namespace SIM.Pipelines.Install.Containers { public enum Topology { Xm1, Xp0, Xp1 } public static class StringExtentions { public static Topology ToTopology(this string tpl) { if (t...
using System; using System.Globalization; using ContainerInstaller; using SIM.Pipelines.Processors; namespace SIM.Pipelines.Install.Containers { public enum Topology { Xm1, Xp0, Xp1 } public class InstallContainerArgs : ProcessorArgs { public InstallContainerArgs(EnvModel model, string des...
Add Beta property on FleaHeader event
using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace EDDiscovery.EliteDangerous.JournalEvents { public class JournalFileHeader : JournalEntry { public JournalFileHeader(JObject evt ) : base(evt, JournalTypeEnum.FileHeader) ...
using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace EDDiscovery.EliteDangerous.JournalEvents { public class JournalFileHeader : JournalEntry { public JournalFileHeader(JObject evt ) : base(evt, JournalTypeEnum.FileHeader) ...
Use ReactiveUI Events for Click Handler
using Ets.Mobile.ViewModel.Pages.Account; using ReactiveUI; using System; using System.Reactive.Linq; using Windows.UI.Xaml; namespace Ets.Mobile.Pages.Account { public partial class LoginPage : IViewFor<LoginViewModel> { #region IViewFor<T> public LoginViewModel ViewModel ...
using Ets.Mobile.ViewModel.Pages.Account; using ReactiveUI; using System; using System.Reactive.Linq; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; namespace Ets.Mobile.Pages.Account { public partial class LoginPage : IViewFor<LoginViewModel> { ...
Fix for EFCore using the same InMemoryDatabase Instance when running tests.
using AllReady.Models; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Http.Features.Authentication; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using System; using Microsoft.Entit...
using AllReady.Models; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Http.Features.Authentication; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using System; using Microsoft.Entit...
Make default fallback path factory static
using System; using Microsoft.AspNetCore.Http; namespace Hellang.Middleware.SpaFallback { public class SpaFallbackOptions { public Func<HttpContext, PathString> FallbackPathFactory { get; set; } = _ => "/index.html"; public bool AllowFileExtensions { get; set; } = false; public bool ...
using System; using Microsoft.AspNetCore.Http; namespace Hellang.Middleware.SpaFallback { public class SpaFallbackOptions { private static readonly Func<HttpContext, PathString> DefaultFallbackPathFactory = _ => "/index.html"; public Func<HttpContext, PathString> FallbackPathFactory { get; se...
Test now restores Environment properties back to their original values.
using System; using NHibernate.Cfg; using NUnit.Framework; namespace NHibernate.Test.CfgTest { /// <summary> /// Summary description for ConfigurationFixture. /// </summary> [TestFixture] public class ConfigurationFixture { [SetUp] public void SetUp() { System.IO.File.Copy("..\\..\\hibernate.cfg.xml"...
using System; using NHibernate.Cfg; using NUnit.Framework; namespace NHibernate.Test.CfgTest { /// <summary> /// Summary description for ConfigurationFixture. /// </summary> [TestFixture] public class ConfigurationFixture { [SetUp] public void SetUp() { System.IO.File.Copy("..\\..\\hibernate.cfg.x...
Add medium breakpoint to home latests posts.
@model List<Post> <section class="home-latest-posts"> <h3 class="header-surround-bar"><span>Latest Posts</span></h3> <div class="row width-100"> @foreach (var post in Model.Take(4)) { <div class="large-3 columns end"> @Html.Partial("_HomePostCard", post) </div> } </div> <div cla...
@model List<Post> <section class="home-latest-posts"> <h3 class="header-surround-bar"><span>Latest Posts</span></h3> <div class="row width-100"> @foreach (var post in Model.Take(4)) { <div class="large-3 medium-6 columns end"> @Html.Partial("_HomePostCard", post) </div> } </div> ...
Change class visibility from public to internal for Jira string extensions
namespace GitTools.IssueTrackers.Jira { public static class StringExtensions { public static string AddJiraFilter(this string value, string additionalValue, string joinText = "AND") { if (!string.IsNullOrWhiteSpace(value)) { value += string.Format(" {0} "...
namespace GitTools.IssueTrackers.Jira { internal static class StringExtensions { public static string AddJiraFilter(this string value, string additionalValue, string joinText = "AND") { if (!string.IsNullOrWhiteSpace(value)) { value += string.Format(" {0}...
Fix slider tick colour not being applied properly
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes;...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes;...
Implement tests for the EventAggregatorExtensions class.
using System; using Xunit; using Zuehlke.Eacm.Web.Backend.CQRS; namespace Zuehlke.Eacm.Web.Backend.Tests.DomainModel { public class EventAggregatorExtensionsFixture { [Fact] public void PublishEvent_() { // arrange // act // assert ...
using System; using Xunit; using Zuehlke.Eacm.Web.Backend.CQRS; using Zuehlke.Eacm.Web.Backend.Utils.PubSubEvents; namespace Zuehlke.Eacm.Web.Backend.Tests.DomainModel { public class EventAggregatorExtensionsFixture { [Fact] public void PublishEvent_EventAggregatorIsNull_ThrowsExcepti...
Fix error with merge on TModLoader GameState.
using Aurora.Profiles.Generic.GSI.Nodes; using Aurora.Profiles.TModLoader.GSI.Nodes; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Aurora.Profiles.TModLoader.GSI { public class GameState_TModLoader : GameSta...
using Aurora.Profiles.Generic.GSI.Nodes; using Aurora.Profiles.TModLoader.GSI.Nodes; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Aurora.Profiles.TModLoader.GSI { public class GameState_TModLoader : GameSta...
Switch the settings back for the mobile site. Fix this later
using System; using System.Collections.Generic; using System.Web; using System.Web.Routing; using Microsoft.AspNet.FriendlyUrls; namespace TechProFantasySoccer { public static class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { /*var settings = new Friend...
using System; using System.Collections.Generic; using System.Web; using System.Web.Routing; using Microsoft.AspNet.FriendlyUrls; namespace TechProFantasySoccer { public static class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { var settings = new Friendly...
Remove unnecessary Reverse() method in simple-linked-list
using System; using System.Collections; using System.Collections.Generic; using System.Linq; public class SimpleLinkedList<T> : IEnumerable<T> { public SimpleLinkedList(T value) : this(new[] { value }) { } public SimpleLinkedList(IEnumerable<T> values) { var array = values.ToArray...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; public class SimpleLinkedList<T> : IEnumerable<T> { public SimpleLinkedList(T value) : this(new[] { value }) { } public SimpleLinkedList(IEnumerable<T> values) { var array = values.ToArray...
Add signalr messagepack key attribute
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using MessagePack; using Newtonsoft.Json; namespace osu.Game.Online.Rooms { /// <summary> /// The local availability information about a certain be...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using MessagePack; using Newtonsoft.Json; namespace osu.Game.Online.Rooms { /// <summary> /// The local availability information about a certain be...
Move serviceName to variable - makes for easier debugging
using CefSharp.Internals; using System.Collections.Generic; using System.ServiceModel; namespace CefSharp.BrowserSubprocess { public class CefRenderProcess : CefSubProcess, IRenderProcess { private DuplexChannelFactory<IBrowserProcess> channelFactory; private CefBrowserBase browser; pu...
using CefSharp.Internals; using System.Collections.Generic; using System.ServiceModel; namespace CefSharp.BrowserSubprocess { public class CefRenderProcess : CefSubProcess, IRenderProcess { private DuplexChannelFactory<IBrowserProcess> channelFactory; private CefBrowserBase browser; pu...
Use the chain way for registering services and view models.
using System; using App.Services; using App.Services.Contracts; using App.ViewModels; using App.ViewModels.Contracts; using Microsoft.Practices.Unity; namespace App.Infrastructure { // ReSharper disable once InconsistentNaming public sealed class UWPBootstrapper : CaliburnBootstrapper { public UWP...
using System; using App.Services; using App.Services.Contracts; using App.ViewModels; using App.ViewModels.Contracts; using Microsoft.Practices.Unity; namespace App.Infrastructure { // ReSharper disable once InconsistentNaming public sealed class UWPBootstrapper : CaliburnBootstrapper { public UWP...
Fix remaining usage of DI instead of direct `Create()` call
// 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. #if NET5_0 using BenchmarkDotNet.Attributes; using Microsoft.Extensions.DependencyInjection; using OpenTabletDriver; using osu.Framework.Input.Handlers.Tablet; namespace...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #if NET5_0 using BenchmarkDotNet.Attributes; using osu.Framework.Input.Handlers.Tablet; namespace osu.Framework.Benchmarks { public class BenchmarkTabletDriver : Ben...
Use a workaround to make Mapping_from_the_default_file_path pass on .NET Core
using FluentAssertions; using NUnit.Framework; namespace Nerdle.AutoConfig.Tests.Integration { [TestFixture] public class UsingDefaultConfigFilePath { [Test] #if NETCOREAPP [Ignore("Buggy interaction between the test runner and System.Configuration.ConfigurationManager, see https://github....
using FluentAssertions; using NUnit.Framework; namespace Nerdle.AutoConfig.Tests.Integration { [TestFixture] public class UsingDefaultConfigFilePath #if NETCOREAPP : System.IDisposable { private readonly string _configFilePath; // In order to workaround flaky interaction between t...
Throw exception if more than one expression is passed to Evaluate
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Antlr4; using Antlr4.Runtime; namespace Rubberduck.Math { public static class Calculator { public static int Evaluate(string expression) { var lexer = new Basic...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Antlr4; using Antlr4.Runtime; namespace Rubberduck.Math { public static class Calculator { public static int Evaluate(string expression) { var lexer = new Basic...
Fix null references when game object is destroyed
using System.IO; using UnityEditor; using UnityEngine; namespace DTCommandPalette { public abstract class GameObjectCommand : ICommand { // PRAGMA MARK - ICommand public string DisplayTitle { get { return _obj.name; } } public string DisplayD...
using System.IO; using UnityEditor; using UnityEngine; namespace DTCommandPalette { public abstract class GameObjectCommand : ICommand { // PRAGMA MARK - ICommand public string DisplayTitle { get { if (!IsValid()) { return ""; } ...
Define an implicit conversion from strings to markup nodes
using System; namespace Pixie { /// <summary> /// A base class for markup nodes: composable elements that can /// be rendered. /// </summary> public abstract class MarkupNode { /// <summary> /// Gets a fallback version of this node for when the renderer /// doesn't know ...
using System; using Pixie.Markup; namespace Pixie { /// <summary> /// A base class for markup nodes: composable elements that can /// be rendered. /// </summary> public abstract class MarkupNode { /// <summary> /// Gets a fallback version of this node for when the renderer ...
Simplify the code a bit
using System; using System.Collections.Generic; using Avalonia.Data; namespace Avalonia { internal static class ClassBindingManager { private static readonly Dictionary<string, AvaloniaProperty> s_RegisteredProperties = new Dictionary<string, AvaloniaProperty>(); public sta...
using System; using System.Collections.Generic; using Avalonia.Data; namespace Avalonia { internal static class ClassBindingManager { private static readonly Dictionary<string, AvaloniaProperty> s_RegisteredProperties = new Dictionary<string, AvaloniaProperty>(); public sta...
Disable TGDB Tests for now
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Snowflake.Plugin.Scraping.TheGamesDb; using Snowflake.Scraping; using Snowflake.Scraping.Extensibility; using Xunit; namespace Snowflake.Scraping.Tests { public class ScraperIntegrationTests ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Snowflake.Plugin.Scraping.TheGamesDb; using Snowflake.Scraping; using Snowflake.Scraping.Extensibility; using Xunit; namespace Snowflake.Scraping.Tests { public class ScraperIntegrationTests ...