Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Remove unused ClickMacro controller method
// Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file namespace EndlessClient.HUD { public interface IHudButtonController { void ClickInventory(); void ClickViewMapToggle(); void ClickActive...
// Original Work Copyright (c) Ethan Moffat 2014-2016 // This file is subject to the GPL v2 License // For additional details, see the LICENSE file namespace EndlessClient.HUD { public interface IHudButtonController { void ClickInventory(); void ClickViewMapToggle(); void ClickActive...
Fix misnamed LOWFONT enumeration to LOWERFONT
namespace Grobid.NET { public enum FontSizeStatus { HIGHERFONT, SAMEFONTSIZE, LOWFONT, } }
namespace Grobid.NET { public enum FontSizeStatus { HIGHERFONT, SAMEFONTSIZE, LOWERFONT, } }
Make the default BrstmTrackType Standard
using DspAdpcm.Adpcm.Formats.Internal; using DspAdpcm.Adpcm.Formats.Structures; namespace DspAdpcm.Adpcm.Formats.Configuration { /// <summary> /// Contains the options used to build the BRSTM file. /// </summary> public class BrstmConfiguration : B_stmConfiguration { /// <summary> ...
using DspAdpcm.Adpcm.Formats.Internal; using DspAdpcm.Adpcm.Formats.Structures; namespace DspAdpcm.Adpcm.Formats.Configuration { /// <summary> /// Contains the options used to build the BRSTM file. /// </summary> public class BrstmConfiguration : B_stmConfiguration { /// <summary> ...
Support server messages in the Image widget
using MonoHaven.UI.Widgets; namespace MonoHaven.UI.Remote { public class ServerImage : ServerWidget { public static ServerWidget Create(ushort id, ServerWidget parent, object[] args) { var resName = (string)args[0]; var widget = new Image(parent.Widget); widget.Drawable = App.Resources.GetImage(resNam...
using MonoHaven.UI.Widgets; namespace MonoHaven.UI.Remote { public class ServerImage : ServerWidget { public static ServerWidget Create(ushort id, ServerWidget parent, object[] args) { var resName = (string)args[0]; var widget = new Image(parent.Widget); widget.Drawable = App.Resources.GetImage(resNam...
Reduce allocations while maintaining read-only-ness
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Framework.Extensions.ListExtensions; namespace osu.Framework.Graphics.Containers { /// <summary> /// A ...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; namespace osu.Framework.Graphics.Containers { /// <summary> /// A basic implementation of <see cref="ITextPart"/>...
Fix sync context Run always returns true when it ran something.
using System; using System.Collections.Generic; using System.Threading; namespace Toggl.Phoebe.Tests { public class MainThreadSynchronizationContext : SynchronizationContext { private readonly Thread thread; private readonly object syncRoot = new Object (); private readonly Queue<Job> ...
using System; using System.Collections.Generic; using System.Threading; namespace Toggl.Phoebe.Tests { public class MainThreadSynchronizationContext : SynchronizationContext { private readonly Thread thread; private readonly object syncRoot = new Object (); private readonly Queue<Job> ...
Make GameObject.SetEnabled extension method more generic
using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace Assets.Scripts { public static class GameObjectUtilities { public static void SetEnabled(this GameObject obj, bool enabled) { // Disable rendering of this component ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace Assets.Scripts { public static class GameObjectUtilities { public static void SetEnabled(this GameObject obj, bool enabled) { // Disable rendering of this component ...
Fix for help blowing up if a module or command lacks a summary
using System.Linq; using System.Text; using System.Threading.Tasks; using Discord; using Discord.Commands; namespace Modix.Modules { [Name("Info"), Summary("General helper module")] public sealed class InfoModule : ModuleBase { private CommandService commandService; public InfoModule(Comm...
using System.Linq; using System.Text; using System.Threading.Tasks; using Discord; using Discord.Commands; namespace Modix.Modules { [Name("Info"), Summary("General helper module")] public sealed class InfoModule : ModuleBase { private CommandService commandService; public InfoModule(Comm...
Allow properties to be nullable to support V12 databases
using System; using System.Xml.Linq; namespace Linq2Azure.SqlDatabases { public class Database { internal Database(XElement xml, DatabaseServer databaseServer) { xml.HydrateObject(XmlNamespaces.WindowsAzure, this); DatabaseServer = databaseServer; } pub...
using System; using System.Xml.Linq; namespace Linq2Azure.SqlDatabases { public class Database { internal Database(XElement xml, DatabaseServer databaseServer) { xml.HydrateObject(XmlNamespaces.WindowsAzure, this); DatabaseServer = databaseServer; } pub...
Fix the issue with settings name
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; namespace BoardGamesApi.Controllers { [ApiExplorerSettings(IgnoreApi = true)] public class TempController : Controller { private readonly IConfiguration _configuration; publ...
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; namespace BoardGamesApi.Controllers { [ApiExplorerSettings(IgnoreApi = true)] public class TempController : Controller { private readonly IConfiguration _configuration; publ...
Add textarea, keyboard listener and timer.
@{ ViewBag.Title = "Typing Classifier"; } <div class="jumbotron"> This will be our awesome typing classifier </div> <div class="row"> Typing classifier goes here. @Html.ActionLink("Go to results", "Results", "Home"); </div>
@{ ViewBag.Title = "Typing Classifier"; } @section scripts { <script type="text/javascript"> 'use strict' var timer = getTimer(); $(function() { var capturing = false; document.addEventListener('keydown', function(event) { if(!capturing) { capturing = true; ...
Sort snippets in descending order
using System; using System.Linq; using System.Web.Mvc; using Hangfire.Highlighter.Jobs; using Hangfire.Highlighter.Models; namespace Hangfire.Highlighter.Controllers { public class HomeController : Controller { private readonly HighlighterDbContext _db = new HighlighterDbContext(); public Act...
using System; using System.Linq; using System.Web.Mvc; using Hangfire.Highlighter.Jobs; using Hangfire.Highlighter.Models; namespace Hangfire.Highlighter.Controllers { public class HomeController : Controller { private readonly HighlighterDbContext _db = new HighlighterDbContext(); public Act...
Move generating mock data to separate function.
using ProjectCDA.Model; using ProjectCDA.Model.Constants; using System.Collections.Generic; using System.Collections.ObjectModel; namespace ProjectCDA.DAL { public class DataService : IDataService { public IEnumerable<FacingPages> GetData() { ObservableCollection<FacingPages> gridD...
using ProjectCDA.Model; using ProjectCDA.Model.Constants; using System.Collections.Generic; using System.Collections.ObjectModel; namespace ProjectCDA.DAL { public class DataService : IDataService { public IEnumerable<FacingPages> GetData() { return GetMockData(); } ...
Make key entry case insensitive
using System; using System.IO; namespace Hangman { public class Hangman { public static void Main(string[] args) { var game = new Game("HANG THE MAN"); while (true) { string titleText = File.ReadAllText("title.txt"); Cell[] title = { new Cell(titleText, Cell.CentreAlign) ...
using System; using System.IO; namespace Hangman { public class Hangman { public static void Main(string[] args) { var game = new Game("HANG THE MAN"); while (true) { string titleText = File.ReadAllText("title.txt"); Cell[] title = { new Cell(titleText, Cell.CentreAlign) ...
Fix the temp enum change
// 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 Microsoft.CodeAnalysis.InheritanceMargin; using Microsoft.VisualStudio.Imaging; using Microsoft.VisualStudio....
// 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 Microsoft.CodeAnalysis.InheritanceMargin; using Microsoft.VisualStudio.Imaging; using Microsoft.VisualStudio....
Use readonly properties instead of public fields
using System; namespace Avalonia.Media.Fonts { public readonly struct FontKey : IEquatable<FontKey> { public readonly string FamilyName; public readonly FontStyle Style; public readonly FontWeight Weight; public FontKey(string familyName, FontWeight weight, FontStyle style) ...
using System; namespace Avalonia.Media.Fonts { public readonly struct FontKey : IEquatable<FontKey> { public FontKey(string familyName, FontWeight weight, FontStyle style) { FamilyName = familyName; Style = style; Weight = weight; } public st...
Fix null reference exception when creating a project.
using System; namespace ZBuildLights.Core.Models { public class EditProject { public Guid? ProjectId { get; set; } public string Name { get; set; } public EditProjectCruiseProject[] CruiseProjects { get; set; } } public class EditProjectCruiseProject { public strin...
using System; namespace ZBuildLights.Core.Models { public class EditProject { public Guid? ProjectId { get; set; } public string Name { get; set; } public EditProjectCruiseProject[] CruiseProjects { get; set; } public EditProjectCruiseProject[] SafeProjects { ...
Clarify xmldoc regarding return value
// 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.Bindables { /// <summary> /// An interface that represents a leased bindable. /// </summary> public interface ILeasedBindable : IB...
// 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.Bindables { /// <summary> /// An interface that represents a leased bindable. /// </summary> public interface ILeasedBindable : IB...
Add tests for user name
using NUnit.Framework; using ZobShop.Models; namespace ZobShop.Tests.Models.UserTests { [TestFixture] public class PropertyTests { [TestCase("street")] [TestCase("highway")] [TestCase("boulevard")] public void TestAddressProperty_ShouldWorkCorrectly(string address) ...
using NUnit.Framework; using ZobShop.Models; namespace ZobShop.Tests.Models.UserTests { [TestFixture] public class PropertyTests { [TestCase("street")] [TestCase("highway")] [TestCase("boulevard")] public void TestAddressProperty_ShouldWorkCorrectly(string address) ...
Add nv optimus enabler for core tester
using SharpDX.Windows; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace CoreTest { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread]...
using SharpDX.Windows; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace CoreTest { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread]...
Fix serialization failure due to missing set
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Online.RealtimeMultiplayer { public class MultiplayerClientState { public MultiplayerClientState(in long roomId) { ...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Online.RealtimeMultiplayer { public class MultiplayerClientState { public long CurrentRoomID { get; set; } public MultiplayerC...
Fix so that dotnet test command can be used
using System.IO; using Microsoft.Extensions.Configuration; using System.Linq; namespace MyNatsClient.IntegrationTests { public static class TestSettings { public static IConfigurationRoot Config { get; set; } static TestSettings() { var builder = new ConfigurationBuilder()...
using System; using System.IO; using Microsoft.Extensions.Configuration; using System.Linq; namespace MyNatsClient.IntegrationTests { public static class TestSettings { public static IConfigurationRoot Config { get; set; } static TestSettings() { var builder = new Configur...
Create server side API for single multiple answer question
using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.Models.Question; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api/question")] public class QuestionsController : Controller { private readonly IQuestionRepository ...
using Microsoft.AspNetCore.Mvc; using Promact.Trappist.DomainModel.Models.Question; using Promact.Trappist.Repository.Questions; using System; namespace Promact.Trappist.Core.Controllers { [Route("api/question")] public class QuestionsController : Controller { private readonly IQuestionRepository ...
Correct casing of file names
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. namespace Microsoft.Azure.WebJobs.Script.Description { public static class CSharpConstants { public const string PrivateAssembliesFolderName = "bin"; ...
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. namespace Microsoft.Azure.WebJobs.Script.Description { public static class CSharpConstants { public const string PrivateAssembliesFolderName = "bin"; ...
Remove cyclical Dispose method causing error.
using System.Threading.Tasks; using Microsoft.ServiceFabric.Data; namespace ServiceFabric.Mocks { /// <summary> /// A sequence of operations performed as a single logical unit of work. /// </summary> public class MockTransaction : ITransaction { public long CommitSequenceNumber => 0L; ...
using System.Threading.Tasks; using Microsoft.ServiceFabric.Data; namespace ServiceFabric.Mocks { /// <summary> /// A sequence of operations performed as a single logical unit of work. /// </summary> public class MockTransaction : ITransaction { public long CommitSequenceNumber => 0L; ...
Add some seed data for quals
namespace BatteryCommander.Common.Migrations { using System.Data.Entity.Migrations; internal sealed class Configuration : DbMigrationsConfiguration<BatteryCommander.Common.DataContext> { public Configuration() { AutomaticMigrationsEnabled = true; } protected ove...
namespace BatteryCommander.Common.Migrations { using BatteryCommander.Common.Models; using System.Data.Entity.Migrations; internal sealed class Configuration : DbMigrationsConfiguration<BatteryCommander.Common.DataContext> { public Configuration() { AutomaticMigrationsEnable...
Update S.Diag.Contracts tests to verify behavior for DEBUG and !DEBUG
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Diagnostics.Contracts; using Xunit; namespace System.Diagnostics.Contracts.Tests { public class BasicContractsTest { [Fact] ...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Diagnostics.Contracts; using Xunit; namespace System.Diagnostics.Contracts.Tests { public class BasicContractsTest { [Fact] ...
Fix removal of installation directory from PATH on uninstall
using System; using System.Collections.Generic; using System.Linq; namespace SyncTool.Cli.Installation { public class PathVariableInstallerStep : IInstallerStep { public void OnInitialInstall(Version version) { var value = Environment.GetEnvironmentVariable("PATH", EnvironmentVaria...
using System; using System.Collections.Generic; using System.Linq; namespace SyncTool.Cli.Installation { public class PathVariableInstallerStep : IInstallerStep { public void OnInitialInstall(Version version) { var value = Environment.GetEnvironmentVariable("PATH", EnvironmentVaria...
Add overlay layer to enumeration type
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Beatmaps.Legacy { internal enum LegacyStoryLayer { Background = 0, Fail = 1, Pass = 2, Foreground = 3, ...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Beatmaps.Legacy { internal enum LegacyStoryLayer { Background = 0, Fail = 1, Pass = 2, Foreground = 3, ...
Switch service registration over to using new RequestProfile provider
using Glimpse.Agent; using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; using System; using System.Collections.Generic; using Glimpse.Agent.Web; using Glimpse.Agent.Web.Options; using Microsoft.Framework.OptionsModel; namespace Glimpse { public class GlimpseAgentWebServic...
using Glimpse.Agent; using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; using System; using System.Collections.Generic; using Glimpse.Agent.Web; using Glimpse.Agent.Web.Options; using Microsoft.Framework.OptionsModel; namespace Glimpse { public class GlimpseAgentWebServic...
Fix the build some more
using System.Reflection; namespace Loyc.Compatibility { #if NetStandard20 || DotNet45 /// <summary>Defines ITuple in .NET Standard 2.0. System.Runtime.CompilerServices.ITuple /// was added to .NET Core 2.0 and .NET Framework 4.7.1, but it wasn't added to .NET /// Standard 2.0. ITuple was added to .NET Standard 2...
using System.Reflection; namespace Loyc.Compatibility { #if NetStandard20 || DotNet45 /// <summary>Defines ITuple in .NET Standard 2.0. System.Runtime.CompilerServices.ITuple /// was added to .NET Core 2.0 and .NET Framework 4.7.1, but it wasn't added to .NET /// Standard 2.0. ITuple was added to .NET Standard 2....
FIX Logger object on Powershell engine
using System.Collections.Generic; using System.Management.Automation.Runspaces; using Aggregator.Core.Interfaces; using Aggregator.Core.Monitoring; namespace Aggregator.Core { /// <summary> /// Invokes Powershell scripting engine /// </summary> public class PsScriptEngine : ScriptEngine { ...
using System.Collections.Generic; using System.Management.Automation.Runspaces; using Aggregator.Core.Interfaces; using Aggregator.Core.Monitoring; namespace Aggregator.Core { /// <summary> /// Invokes Powershell scripting engine /// </summary> public class PsScriptEngine : ScriptEngine { ...
Clarify comment in sample app
using System; using System.IO; using System.Text; using DelimitedDataParser; namespace WindowsEncoding { internal class Program { private static void Main() { // When using DelimitedDataParser in a .NET Core app, // be sure to include the NuGet package System.Text.Encod...
using System; using System.IO; using System.Text; using DelimitedDataParser; namespace WindowsEncoding { internal class Program { private static void Main() { // If code page based character encodings are required when using // DelimitedDataParser in a .NET Core app, be...
Test 'long'-based 'enum' types, too
using System; public enum Colors { Red = 1, Alpha, Green = 13, Blue } public static class Program { public static void Main(string[] Args) { Console.WriteLine((int)Colors.Red); Console.WriteLine((int)Colors.Alpha); Console.WriteLine((int)Colors.Green); Console.W...
using System; public enum Colors { Red = 1, Alpha, Green = 13, Blue } public enum LongColors : long { Red = 1, Alpha, Green = 13, Blue } public static class Program { public static void Main(string[] Args) { Console.WriteLine((int)Colors.Red); Console.WriteLine...
Fix du mauvais nom de classe
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Nutritia { public class MySqlPlatService : IPlatService { // TODO : Fonctionne pas private MySqlConnexion connexion; public Plat Retrieve(Re...
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Nutritia { public class MySqlPlatService : IPlatService { // TODO : Fonctionne pas private MySqlConnexion connexion; public Plat Retrieve(Re...
Refactor BlockChain to have an internal list
namespace BlockchainSharp.Core { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class BlockChain { public long number; public BlockChain(Block block) { if (!block.IsGenesis) throw n...
namespace BlockchainSharp.Core { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class BlockChain { private IList<Block> blocks = new List<Block>(); public BlockChain(Block block) { if (!block.IsGene...
Load FMK credentials from serialized file.
using Assets.Scripts.Data.Interfaces; using System.Collections.Generic; using Assets.Scripts.Data.Model.Objects; using Assets.Scripts.Data.Model.Telemetrics; using Assets.Scripts.Data.Providers.Fmk; using UnityEngine; namespace Assets.Scripts.Data.Providers { /// <summary> /// The author is working in First M...
using Assets.Scripts.Data.Interfaces; using System.Collections.Generic; using Assets.Scripts.Data.Model.Objects; using Assets.Scripts.Data.Model.Telemetrics; using Assets.Scripts.Data.Providers.Fmk; using UnityEngine; namespace Assets.Scripts.Data.Providers { /// <summary> /// The author is working in First M...
Remove unnecessary `public` prefix in interface specification
// 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; namespace osu.Game.Screens.Play { [Cached] public interface ILocalUserPlayInfo { /// <...
// 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; namespace osu.Game.Screens.Play { [Cached] public interface ILocalUserPlayInfo { /// <...
Revert "YoumuSlash: Better camera looping algorithm"
using System.Collections; using System.Collections.Generic; using UnityEngine; public class YoumuSlash3DEnvironmentController : MonoBehaviour { [SerializeField] private GameObject stairObject; [SerializeField] private Vector2 stairOffset; [SerializeField] private Transform cameraParent; [...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class YoumuSlash3DEnvironmentController : MonoBehaviour { [SerializeField] private Transform stairParent; [SerializeField] private GameObject stairObject; [SerializeField] private Vector2 stairOffset; [S...
Improve performance of keycode translations
using SierraLib.Translation; using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Articulate { public sealed class FileBasedTranslation : SierraL...
using SierraLib.Translation; using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Articulate { public sealed class FileBasedTranslation : SierraL...
Make NetID use 1000+ range
namespace Content.Shared.GameObjects { public static class ContentNetIDs { public const uint HANDS = 0; } }
namespace Content.Shared.GameObjects { public static class ContentNetIDs { public const uint HANDS = 1000; } }
Revert "LOG ALL THE ERRORS"
using RollbarSharp; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace LandmineWeb.App_Start { public class RollbarExceptionFilter : IExceptionFilter { public void OnException(ExceptionContext filterContext) { //if (...
using RollbarSharp; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace LandmineWeb.App_Start { public class RollbarExceptionFilter : IExceptionFilter { public void OnException(ExceptionContext filterContext) { if (fi...
Add extra test to ensure Account deserialization
using Machine.Specifications; namespace Stripe.Tests { public class when_creating_a_charge_with_a_stripe_account { private static StripeAccount _stripeAccount; private static StripeCharge _stripeCharge; Establish context = () => { // create a new custom account ...
using Machine.Specifications; namespace Stripe.Tests { public class when_creating_a_charge_with_a_stripe_account { private static StripeAccount _stripeAccount; private static StripeCharge _stripeCharge; Establish context = () => { // create a new custom account ...
Fix sorting of search bags
using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.Documents; using System.Linq; using System.Threading.Tasks; using TheCollection.Business.Tea; using TheCollection.Web.Constants; using TheCollection.Web.Extensions; using TheCollection.Web.Models; using TheCollection.Web.Services; namespace TheCollection.Web.Comma...
using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.Documents; using System.Linq; using System.Threading.Tasks; using TheCollection.Business.Tea; using TheCollection.Web.Constants; using TheCollection.Web.Extensions; using TheCollection.Web.Models; using TheCollection.Web.Services; namespace TheCollection.Web.Comma...
Add link to explanatory comment
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using Microsoft.CodeAnalysis.Diagnostics; namespace Microsoft.CodeAnalysis.Options { internal static cla...
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using Microsoft.CodeAnalysis.Diagnostics; namespace Microsoft.CodeAnalysis.Options { internal static cla...
Add exception handler to main()
using CommandLineParser; using Saucy.Actions; using Saucy.Providers.GitHub; namespace Saucy { public class Program { public static int Main(string[] args) { var settings = new SaucySettings(); ILogger logger = new VerboseLogger(); var restoreVerb = new SaucyCommandLine( ...
using CommandLineParser; using Saucy.Actions; using Saucy.Providers.GitHub; namespace Saucy { using System; public class Program { public static int Main(string[] args) { var consoleWriter = new ConsoleWriter(); try { var settings = new SaucySettings(); ...
Add option to use current dir.
using System; namespace Watts { internal class Program { private static int Main(string[] args) { if (args.Length != 1) { Console.WriteLine("Usage: Watts.exe <\"Path/To/Config.json\">"); return 1; } var watts = ne...
using System; using System.Diagnostics; using System.IO; namespace Watts { internal class Program { private static int Main(string[] args) { var watts = new WebApiToTypeScript.WebApiToTypeScript(); if (args.Length == 0) { var path = Path.Comb...
Use intermediate variables to improve readability.
namespace Bakery.Security { using System; using System.Text; using Text; public class BasicAuthenticationPrinter : IBasicAuthenticationPrinter { private readonly IBase64Printer base64Printer; private readonly Encoding encoding; public BasicAuthenticationPrinter(IBase64Printer base64Printer, ...
namespace Bakery.Security { using System; using System.Text; using Text; public class BasicAuthenticationPrinter : IBasicAuthenticationPrinter { private readonly IBase64Printer base64Printer; private readonly Encoding encoding; public BasicAuthenticationPrinter(IBase64Printer base64Printer, ...
Enable automatic versioning and Nuget packaging of shippable Vipr binaries
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.IO; using System.Reflection; using System.Text; using System.Xml.Linq; using Vipr.Core; namespace Vipr { internal c...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.IO; namespace Vipr { internal class Program { private static void Main(string[] args) { ...
Revert "Enabling startup error logging"
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; namespace MabWeb { public class Program { public static void Main(string[] args) { var host = new WebHostBuilder() .U...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; namespace MabWeb { public class Program { public static void Main(string[] args) { var host = new WebHostBuilder() .U...
Use string interpolation in key error
/* ** Project ShiftDrive ** (C) Mika Molenkamp, 2016. */ using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Audio; namespace ShiftDrive { /// <summary> /// A simple static container, for holding game assets like textures and meshes. /// </summary> ...
/* ** Project ShiftDrive ** (C) Mika Molenkamp, 2016. */ using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Audio; namespace ShiftDrive { /// <summary> /// A simple static container, for holding game assets like textures and meshes. /// </summary> ...
Update main window text to include nomod/modded star rating
using osu_StreamCompanion.Code.Core.DataTypes; using osu_StreamCompanion.Code.Interfaces; using osu_StreamCompanion.Code.Windows; namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window { public class WindowDataGetter :IModule,IMapDataGetter,IMainWindowUpdater { private MainWindowUpdater _mai...
using System; using CollectionManager.DataTypes; using CollectionManager.Enums; using osu_StreamCompanion.Code.Core.DataTypes; using osu_StreamCompanion.Code.Interfaces; using osu_StreamCompanion.Code.Windows; namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window { public class WindowDataGetter :IModul...
Fix D rank displaying as F
// 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.ComponentModel; namespace osu.Game.Scoring { public enum ScoreRank { [Description(@"F")] F, [Description(@"F")] D,...
// 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.ComponentModel; namespace osu.Game.Scoring { public enum ScoreRank { [Description(@"F")] F, [Description(@"D")] D,...
Add "are" to the command pattern
using System.Text.RegularExpressions; using ChatExchangeDotNet; namespace Hatman.Commands { class Should : ICommand { private readonly Regex ptn = new Regex(@"(?i)^((sh|[cw])ould|can|will|is)", Extensions.RegOpts); private readonly string[] phrases = new[] { "No.", ...
using System.Text.RegularExpressions; using ChatExchangeDotNet; namespace Hatman.Commands { class Should : ICommand { private readonly Regex ptn = new Regex(@"(?i)^((sh|[cw])ould|can|are|will|is)", Extensions.RegOpts); private readonly string[] phrases = new[] { "No.", ...
Remove template contents from the home/index view
@{ ViewBag.Title = "Home Page"; } <div class="jumbotron"> <h1>ASP.NET</h1> <p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p> <p><a href="http://asp.net" class="btn btn-primary btn-large">Learn more &raquo;</a></p> </di...
@{ ViewBag.Title = "Home Page"; }
Add custom representation of unrenderable unicode characters.
// 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.Graphics.Sprites; namespace osu.Game.Graphics.Sprites { class OsuSpriteText : SpriteText { public const float FONT_SIZE = ...
// 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.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.MathUtils; using OpenTK; using OpenTK.Graphics; namespace osu.Game.Gra...
Add the nullable DateTime type
using System; using Newtonsoft.Json.Linq; namespace Chronological { public class DataType { public string TimeSeriesInsightsType { get; } internal DataType(string dataType) { TimeSeriesInsightsType = dataType; } internal JProperty ToJProperty() { ...
using System; using Newtonsoft.Json.Linq; namespace Chronological { public class DataType { public string TimeSeriesInsightsType { get; } internal DataType(string dataType) { TimeSeriesInsightsType = dataType; } internal JProperty ToJProperty() { ...
Simplify uri -> filename conversion
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace Mono.Debugging.Client { [Serializable] public class SourceLink { // Keep the / character to use as a path separator to help group related symbols static readonly HashSet<char> invalids = new HashSet<...
using System; using System.IO; namespace Mono.Debugging.Client { [Serializable] public class SourceLink { public string Uri { get; } public string RelativeFilePath { get; } public SourceLink (string uri, string relativeFilePath) { RelativeFilePath = relativeFilePath; Uri = uri; } public string ...
Add support for new column name in fortis export
using CsvHelper.Configuration; using MyAccounts.Business.AccountOperations.Contracts; namespace MyAccounts.Business.AccountOperations.Fortis { public sealed class FortisOperationExportCsvMap : ClassMap<FortisOperation> { public FortisOperationExportCsvMap() { Map(m => m.Reference).N...
using CsvHelper.Configuration; using MyAccounts.Business.AccountOperations.Contracts; namespace MyAccounts.Business.AccountOperations.Fortis { public sealed class FortisOperationExportCsvMap : ClassMap<FortisOperation> { public FortisOperationExportCsvMap() { Map(m => m.Reference).N...
Change Foreground Match Data "Title Match Mode" default value
using System.ComponentModel; using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; namespace DesktopWidgets.Classes { [ExpandableObject] public class ForegroundMatchData { [DisplayName("Title")] public string Title { get; set; } [DisplayName("Title Match Mode")] public StringMa...
using System.ComponentModel; using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; namespace DesktopWidgets.Classes { [ExpandableObject] public class ForegroundMatchData { [DisplayName("Title")] public string Title { get; set; } [DisplayName("Title Match Mode")] public StringMa...
Add serialize loop handling to prevent crashing for circular loops
// MvxJsonConverter.cs // (c) Copyright Cirrious Ltd. http://www.cirrious.com // MvvmCross is licensed using Microsoft Public License (Ms-PL) // Contributions and inspirations noted in readme.md and license.txt // // Project Lead - Stuart Lodge, @slodge, me@slodge.com using System; using System.Collections.Generic; u...
// MvxJsonConverter.cs // (c) Copyright Cirrious Ltd. http://www.cirrious.com // MvvmCross is licensed using Microsoft Public License (Ms-PL) // Contributions and inspirations noted in readme.md and license.txt // // Project Lead - Stuart Lodge, @slodge, me@slodge.com using System; using System.Collections.Ge...
Create an instance of Game
using System; namespace Hangman { public class Hangman { public static void Main(string[] args) { // Table table = new Table(2, 3); // string output = table.Draw(); // Console.WriteLine(output); } } }
using System; namespace Hangman { public class Hangman { public static void Main(string[] args) { Game game = new Game(); Console.WriteLine("Made a new Game object"); // Table table = new Table(2, 3); // string output = table.Draw(); // Console.WriteLine(output); } } }
Move the backgroundtask runner into Initialize method to follow same practise as SchedulerComponent
using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Web.Scheduling; namespace Umbraco.Web.Telemetry { public class TelemetryComponent : IComponent { private IProfilingLogger _logger; private IRuntimeState _runtime; private BackgroundTaskRunner<IB...
using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Web.Scheduling; namespace Umbraco.Web.Telemetry { public class TelemetryComponent : IComponent { private IProfilingLogger _logger; private IRuntimeState _runtime; private BackgroundTaskRunner<IB...
Fix .NET 3.5 build error
using System; using System.Reflection; using Newtonsoft.Json; namespace TrackableData.Json { public class TrackableContainerTrackerJsonConverter : JsonConverter { public override bool CanConvert(Type objectType) { return typeof(IContainerTracker).IsAssignableFrom(objectType); ...
using System; using System.Reflection; using Newtonsoft.Json; namespace TrackableData.Json { public class TrackableContainerTrackerJsonConverter : JsonConverter { public override bool CanConvert(Type objectType) { return typeof(IContainerTracker).IsAssignableFrom(objectType); ...
Fix api response success detection (sometimes body contains response, no +OK
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="ApiResponse.cs" company="Dan Barua"> // (C) Dan Barua and contributors. Licensed under the Mozilla Public License. // </copyright> // -------------------------------------------...
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="ApiResponse.cs" company="Dan Barua"> // (C) Dan Barua and contributors. Licensed under the Mozilla Public License. // </copyright> // -------------------------------------------...
Use new style embed for vimeo links and made it https.
using System.Collections.Generic; using System.Text.RegularExpressions; using JabbR.ContentProviders.Core; namespace JabbR.ContentProviders { public class VimeoContentProvider : EmbedContentProvider { private static readonly Regex _vimeoIdRegex = new Regex(@"(\d+)"); protected override Regex ...
using System.Collections.Generic; using System.Text.RegularExpressions; using JabbR.ContentProviders.Core; namespace JabbR.ContentProviders { public class VimeoContentProvider : EmbedContentProvider { private static readonly Regex _vimeoIdRegex = new Regex(@"(\d+)"); protected override Regex ...
Hide in-game cursor manually in the testbrowser
// 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.Testing; using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; namespace osu.Game.Tournament.Tests { public class TournamentTestBrowser :...
// 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.Testing; using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; namespace osu.Game.Tournament.Tests { public class TournamentTestBrowser :...
Create list of used providers properly.
using Chalmers.ILL.Models; using Examine; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web; using Chalmers.ILL.Extensions; using Chalmers.ILL.OrderItems; namespace Chalmers.ILL.Providers { public class ProviderService : IProviderService { IOrde...
using Chalmers.ILL.Models; using Examine; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web; using Chalmers.ILL.Extensions; using Chalmers.ILL.OrderItems; namespace Chalmers.ILL.Providers { public class ProviderService : IProviderService { IOrde...
Use var instead of full type name
using LiteNetLib.Utils; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using UnityEngine; namespace LiteNetLibHighLevel { public class NetFieldStruct<T> : LiteNetLibNetField<T> where T : struct { public override void Deserialize(NetDa...
using LiteNetLib.Utils; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using UnityEngine; namespace LiteNetLibHighLevel { public class NetFieldStruct<T> : LiteNetLibNetField<T> where T : struct { public override void Deserialize(NetDa...
Add a confirm to revert while wrong operation.
@model IEnumerable<MMLibrarySystem.Models.BorrowRecord> @{ ViewBag.Title = "Borrowed Books"; } <table id="bookList"> <tr> <td> Book Number </td> <td> Title </td> <td> Borrowed By </td> <td> Borrowed Start ...
@model IEnumerable<MMLibrarySystem.Models.BorrowRecord> @{ ViewBag.Title = "Borrowed Books"; } <table id="bookList"> <tr> <td> Book Number </td> <td> Title </td> <td> Borrowed By </td> <td> Borrowed Start ...
Set MinimumInteritemSpacing and MinimumLineSpacing on flow layout
using System; using System.Collections.Generic; using System.Linq; using MonoTouch.Foundation; using MonoTouch.UIKit; using System.Drawing; namespace SimpleCollectionView { [Register ("AppDelegate")] public partial class AppDelegate : UIApplicationDelegate { // class-level declarations UIW...
using System; using System.Collections.Generic; using System.Linq; using MonoTouch.Foundation; using MonoTouch.UIKit; using System.Drawing; namespace SimpleCollectionView { [Register ("AppDelegate")] public partial class AppDelegate : UIApplicationDelegate { // class-level declarations UIW...
Include header in named pipe test
using System.Threading; using Xunit; namespace RockLib.Messaging.NamedPipes.Tests { public class NamedPipesTests { [Fact] public void NamedPipeMessagesAreSentAndReceived() { var waitHandle = new AutoResetEvent(false); using (var receiver = new NamedPipeReceiver(...
using System.Threading; using Xunit; namespace RockLib.Messaging.NamedPipes.Tests { public class NamedPipesTests { [Fact] public void NamedPipeMessagesAreSentAndReceived() { var waitHandle = new AutoResetEvent(false); using (var receiver = new NamedPipeReceiver(...
Add SMS to list page
@model IEnumerable<alert_roster.web.Models.User> @{ ViewBag.Title = "View Subscriptions"; } <h2>@ViewBag.Title</h2> <p> @Html.ActionLink("Create New", "Subscribe") </p> @if (TempData["Message"] != null) { <div class="alert alert-info">@TempData["Message"]</div> } <table class="table"> <tr> ...
@model IEnumerable<alert_roster.web.Models.User> @{ ViewBag.Title = "View Subscriptions"; } <h2>@ViewBag.Title</h2> <p> @Html.ActionLink("Create New", "Subscribe") </p> @if (TempData["Message"] != null) { <div class="alert alert-info">@TempData["Message"]</div> } <table class="table"> <tr> ...
Add unit test for at least one previously mistreated formula
using ClosedXML.Excel; using NUnit.Framework; using System; using System.Data; namespace ClosedXML_Tests.Excel { public class NumberFormatTests { [Test] public void PreserveCellFormat() { using (var wb = new XLWorkbook()) { var ws = wb.AddWorkshee...
using ClosedXML.Excel; using NUnit.Framework; using System; using System.Data; namespace ClosedXML_Tests.Excel { public class NumberFormatTests { [Test] public void PreserveCellFormat() { using (var wb = new XLWorkbook()) { var ws = wb.AddWorkshee...
Fix EarTrumpet.Web deps after - to . rename
using System.Xml.Serialization; namespace EarTrumpet.Actions.DataModel.Serialization { public class AppRef { public static readonly string EveryAppId = "EarTrumpet.EveryApp"; public static readonly string ForegroundAppId = "EarTrumpet.ForegroundApp"; public string Id { get; set; } ...
namespace EarTrumpet.Actions.DataModel.Serialization { public class AppRef { public static readonly string EveryAppId = "EarTrumpet.EveryApp"; public static readonly string ForegroundAppId = "EarTrumpet.ForegroundApp"; public string Id { get; set; } public override int GetHash...
Move assembly directive out of namespace
using System.Web.Routing; using ConsolR.Hosting.Web; using SignalR; namespace ConsolR.Hosting { [assembly: WebActivator.PostApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")] public static class Bootstrapper { public static void PreApplicationStart() { var routes = RouteTa...
using System.Web.Routing; using ConsolR.Hosting.Web; using SignalR; [assembly: WebActivator.PostApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")] namespace ConsolR.Hosting { public static class Bootstrapper { public static void PreApplicationStart() { var routes = RouteTab...
Fix paging next in service client level methods
@using System.Linq; @using AutoRest.Core.ClientModel @using AutoRest.Core.Utilities @using AutoRest.Java.Azure.TemplateModels @inherits AutoRest.Core.Template<AutoRest.Java.Azure.TemplateModels.AzureServiceClientTemplateModel> /** * The interface defining all the services for @Model.Name to be * used by Retrofit to ...
@using System.Linq; @using AutoRest.Core.ClientModel @using AutoRest.Core.Utilities @using AutoRest.Java.Azure.TemplateModels @inherits AutoRest.Core.Template<AutoRest.Java.Azure.TemplateModels.AzureServiceClientTemplateModel> /** * The interface defining all the services for @Model.Name to be * used by Retrofit to ...
Add missing [Test] attribute on test method
using System; using System.Collections.Generic; using System.Linq; using FluentAssertions; using Nerdle.AutoConfig.Strategy; using NUnit.Framework; namespace Nerdle.AutoConfig.Tests.Unit.Strategy.StrategyManagerTests { [TestFixture] class When_creating_a_strategy { StrategyManager _sut; [S...
using System; using System.Collections.Generic; using System.Linq; using FluentAssertions; using Nerdle.AutoConfig.Strategy; using NUnit.Framework; namespace Nerdle.AutoConfig.Tests.Unit.Strategy.StrategyManagerTests { [TestFixture] class When_creating_a_strategy { StrategyManager _sut; [S...
Allow config file to passed in
using System.Dynamic; using System.IO; using System.Management.Automation; using System.Reflection; namespace ConfigPS { public class Global : DynamicObject { readonly PowerShell ps; public Global() { var fileName = Path.GetFileName(Assembly.GetCallingAssembly...
using System.Dynamic; using System.IO; using System.Management.Automation; using System.Reflection; namespace ConfigPS { public class Global : DynamicObject { readonly PowerShell ps; public Global(string configFileName = null) { if (configFileName == null) ...
Update demo app with more comments
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RailPhase.Demo { class Program { static void Main(string[] args) { // Create a simple web app and serve content on to URLs. var app = new App();...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RailPhase.Demo { class Program { static void Main(string[] args) { // Create a simple web app and serve content on to URLs. var app = new App();...
Set DebuggingSubProcess = Debugger.IsAttached rather than a hard coded value
using System; using System.Linq; namespace CefSharp.Example { public static class CefExample { public const string DefaultUrl = "custom://cefsharp/BindingTest.html"; // Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work. private const bool debu...
using System; using System.Diagnostics; using System.Linq; namespace CefSharp.Example { public static class CefExample { public const string DefaultUrl = "custom://cefsharp/BindingTest.html"; // Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work. ...
Add check for possible null reference
using System; using System.Collections.Generic; namespace compiler.middleend.ir { //TODO: redisign this class and its supporting classes public class BasicBlock { public string Name { get; } public List<Instruction> Instructions{ get; set; } public Anchor AnchorBlock { get; set; } public BasicBl...
using System; using System.Collections.Generic; namespace compiler.middleend.ir { //TODO: redisign this class and its supporting classes public class BasicBlock { public string Name { get; } public List<Instruction> Instructions{ get; set; } public Anchor AnchorBlock { get; set; } public BasicBl...
Clean up ToComment so it handles a few edge cases a bit better
using System; using System.Collections.Generic; using System.Linq; using System.Web; using StackExchange.DataExplorer.Helpers; using System.Text; namespace StackExchange.DataExplorer.Models { public partial class Query { public string BodyWithoutComments { get { P...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using StackExchange.DataExplorer.Helpers; using System.Text; namespace StackExchange.DataExplorer.Models { public partial class Query { public string BodyWithoutComments { get { P...
Add possibility to add custom AudioObject prefab.
using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public struct CategoryItem { public string name; public SoundItem[] soundItems; }
using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public struct CategoryItem { public string name; public SoundItem[] soundItems; public GameObject audioObjectPrefab; }
Use default AudioObject prefab if none is assigned.
using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public struct CategoryItem { public string name; public SoundItem[] soundItems; public GameObject audioObjectPrefab; }
using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public struct CategoryItem { public string name; public SoundItem[] soundItems; public GameObject audioObjectPrefab = null; public bool usingDefaultPrefab = true; }
Update display text on the view model.
using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using BTCPayServer.Validation; using System.ComponentModel; namespace BTCPayServer.Models.InvoicingModels { public class CreateInv...
using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using BTCPayServer.Validation; using System.ComponentModel; namespace BTCPayServer.Models.InvoicingModels { public class CreateInv...
Set AddDate on server for new transactions
using Quibill.Web.Contexts; using System; using System.Collections.Generic; using Quibill.Domain.Models; using System.Data.Entity; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using Microsoft.AspNet.Identity; using Quibill.Domain; namespace Quibill.Web.Controllers { [Authoriz...
using Quibill.Web.Contexts; using System; using System.Collections.Generic; using Quibill.Domain.Models; using System.Data.Entity; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using Microsoft.AspNet.Identity; using Quibill.Domain; namespace Quibill.Web.Controllers { [Authoriz...
Add code to start generating the methods.
// Copyright (c) Alex Ghiondea. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using SmugMug.Shared.Descriptors; using System.Collections.Generic; using System.Text; namespace SmugMugCodeGen { public partial class CodeGen { p...
// Copyright (c) Alex Ghiondea. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using SmugMug.Shared.Descriptors; using System.Collections.Generic; using System.Text; namespace SmugMugCodeGen { public partial class CodeGen { p...
Change default to be once per month for a year
using System; using System.ComponentModel.DataAnnotations; namespace Cash_Flow_Projection.Models { public class RepeatingEntry { [DataType(DataType.Date)] public DateTime FirstDate { get; set; } = DateTime.Today; public String Description { get; set; } public Decimal Amount {...
using System; using System.ComponentModel.DataAnnotations; namespace Cash_Flow_Projection.Models { public class RepeatingEntry { [DataType(DataType.Date)] public DateTime FirstDate { get; set; } = DateTime.Today; public String Description { get; set; } public Decimal Amount {...
Use camelCase and string enums with YAML serialization
using Halforbit.DataStores.FileStores.Serialization.Json.Implementation; using Newtonsoft.Json.Linq; using System.Dynamic; using System.Text; using System.Threading.Tasks; using YamlDotNet.Serialization; using ISerializer = Halforbit.DataStores.FileStores.Interface.ISerializer; namespace Halforbit.DataStores....
using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization; using System.Dynamic; using System.Text; using System.Threading.Tasks; using YamlDotNet.Serialization; using ISerializer = Halforbit.DataStores.FileStores.Interface.ISerializer; namespac...
Add template for Visual Studio C++ resource files
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Bumpy { internal sealed class Template { private static readonly Dictionary<string, Template> Templates = new Dictionary<string, Template>() { { ".csproj", new Template(@"<(?<marker>[Vv]...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Bumpy { internal sealed class Template { private static readonly Dictionary<string, Template> Templates = new Dictionary<string, Template>() { { ".csproj", new Template(@"<(?<marker>[Vv]...
Add test for preserving empty paragraphs
using Xunit; using System.IO; using Xunit.Sdk; namespace Mammoth.Tests { public class DocumentConverterTests { [Fact] public void DocxContainingOneParagraphIsConvertedToSingleParagraphElement() { assertSuccessfulConversion( ConvertToHtml("single-paragraph.docx"), "<p>Walking on imported air</p>"); }...
using Xunit; using System.IO; using Xunit.Sdk; using System; namespace Mammoth.Tests { public class DocumentConverterTests { [Fact] public void DocxContainingOneParagraphIsConvertedToSingleParagraphElement() { assertSuccessfulConversion( ConvertToHtml("single-paragraph.docx"), "<p>Walking on imported ...
Add a couple of friend assemblies
// Copyright 2006 Alp Toker <alp@atoker.com> // This software is made available under the MIT License // See COPYING for details using System.Reflection; using System.Runtime.CompilerServices; //[assembly: AssemblyVersion("0.0.0.*")] [assembly: AssemblyTitle ("NDesk.DBus")] [assembly: AssemblyDescription ("D-Bus IPC ...
// Copyright 2006 Alp Toker <alp@atoker.com> // This software is made available under the MIT License // See COPYING for details using System.Reflection; using System.Runtime.CompilerServices; //[assembly: AssemblyVersion("0.0.0.*")] [assembly: AssemblyTitle ("NDesk.DBus")] [assembly: AssemblyDescription ("D-Bus IPC ...
Allow specifying a default localizer.
using System; using System.Collections.Generic; namespace Mios.Localization.Localizers { public class DictionaryLocalizer { private readonly IDictionary<string, string> source; public DictionaryLocalizer(IDictionary<string,string> source) { this.source = source; } public LocalizedString Localize(...
using System; using System.Collections.Generic; namespace Mios.Localization.Localizers { public class DictionaryLocalizer { private readonly IDictionary<string, string> source; private readonly Localizer defaultLocalizer; public DictionaryLocalizer(IDictionary<string, string> source) : this(source, ...
Remove the outter try/catch in BuildRaygunClient
using System; using System.Diagnostics; using Mindscape.Raygun4Net; using MarkerMetro.Unity.WinIntegration.Logging; using MarkerMetro.Unity.WinIntegration; namespace UnityProject.Logging { /// <summary> /// Implementation of IExceptionLogger for Raygun Exception Logger. /// </summary> public sealed ...
using System; using System.Diagnostics; using Mindscape.Raygun4Net; using MarkerMetro.Unity.WinIntegration.Logging; using MarkerMetro.Unity.WinIntegration; namespace UnityProject.Logging { /// <summary> /// Implementation of IExceptionLogger for Raygun Exception Logger. /// </summary> public sealed ...
Add TODO regarding use of styling in VM
namespace StarsReloaded.Client.ViewModel.Fragments { using System.Windows; using GalaSoft.MvvmLight.Command; using StarsReloaded.Client.ViewModel.Attributes; public class CollapsiblePanelViewModel : BaseViewModel { private bool isExpanded; private string header; public ...
namespace StarsReloaded.Client.ViewModel.Fragments { using System.Windows; using GalaSoft.MvvmLight.Command; using StarsReloaded.Client.ViewModel.Attributes; public class CollapsiblePanelViewModel : BaseViewModel { private bool isExpanded; private string header; public ...
Check receiver has at least email property
using System; using System.Collections.Generic; using System.Dynamic; using System.Linq; using System.Text; using System.Threading.Tasks; using Dragon.Mail.Interfaces; namespace Dragon.Mail.Impl { public class DefaultReceiverMapper : IReceiverMapper { public void Map(dynamic receiver, Models.Mail mail...
using System; using System.Collections.Generic; using System.Dynamic; using System.Linq; using System.Text; using System.Threading.Tasks; using Dragon.Mail.Interfaces; namespace Dragon.Mail.Impl { public class DefaultReceiverMapper : IReceiverMapper { public void Map(dynamic receiver, Models.Mail mail...
Add extra extension method for getting URI
using System; namespace Glimpse.Web { public static class HttpRequestExtension { public static string Uri(this IHttpRequest request) { return $"{request.Scheme}://{request.Host}{request.PathBase}{request.Path}{request.QueryString}"; } } }
using System; namespace Glimpse.Web { public static class HttpRequestExtension { public static string Uri(this IHttpRequest request) { return $"{request.Scheme}://{request.Host}{request.PathBase}{request.Path}{request.QueryString}"; } public static string UriAbsolu...
Remove pause at end (left in accidentally)
using System; namespace UpVer { class Program { static void Main(string[] args) { try { var settings = new Settings(args); var updater = new VersionUpdater(settings); var changes = updater.Process(); if (...
using System; namespace UpVer { class Program { static void Main(string[] args) { try { var settings = new Settings(args); var updater = new VersionUpdater(settings); var changes = updater.Process(); if (...
Add bootstrap and jquery using bower package management.
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>@ViewBag.Title</title> <link rel="stylesheet" type="text/css" href="~/css/styles.css" /> </head> <body> <div> @RenderBody() </div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>@ViewBag.Title</title> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" /> <link rel="stylesheet" href="~/css/styles.css" /> </head> <b...