Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add using statement for Swashbuckle 4.0
using Swashbuckle.AspNetCore.SwaggerGen; namespace Swashbuckle.AspNetCore.Filters { public static class SwaggerGenOptionsExtensions { public static void ExampleFilters(this SwaggerGenOptions swaggerGenOptions) { swaggerGenOptions.OperationFilter<ExamplesOperationFilter>(); ...
using Microsoft.Extensions.DependencyInjection; using Swashbuckle.AspNetCore.SwaggerGen; namespace Swashbuckle.AspNetCore.Filters { public static class SwaggerGenOptionsExtensions { public static void ExampleFilters(this SwaggerGenOptions swaggerGenOptions) { swaggerGenOptions.Opera...
Use slug for single search result
using Hops.Repositories; using Microsoft.AspNet.Mvc; using System.Collections.Generic; using System.Linq; namespace Hops.Controllers { [Route("[controller]")] public class SearchController : Controller { private ISqliteRepository sqliteRepository; public SearchController(ISqliteRepository...
using Hops.Repositories; using Microsoft.AspNet.Mvc; using System.Collections.Generic; using System.Linq; namespace Hops.Controllers { [Route("[controller]")] public class SearchController : Controller { private ISqliteRepository sqliteRepository; public SearchController(ISqliteRepository...
Fix compilation error introduced with last minute cleanup added when looking at the diff.
using System.Collections.Generic; namespace Parser { // Assigns each locale an ID from 0 to n - 1 internal static class LocaleIdAllocator { public static void Run(ParserContext parser, IList<CompilationScope> scopes) { foreach (CompilationScope scope in scopes) ...
using System.Collections.Generic; namespace Parser { // Assigns each locale an ID from 0 to n - 1 internal static class LocaleIdAllocator { // TODO: merge this with the current ID allocator in ParserContext. public static void Run(ParserContext parser, IList<CompilationScope> scope...
Remove explicit default value initialization.
using System; using System.Runtime.CompilerServices; using System.Threading; namespace GUtils.Testing { /// <summary> /// A class that tracks the amount of times its <see cref="WrappedDelegate" /> was invoked. /// </summary> /// <typeparam name="T"></typeparam> public class DelegateInvocationCount...
using System; using System.Runtime.CompilerServices; using System.Threading; namespace GUtils.Testing { /// <summary> /// A class that tracks the amount of times its <see cref="WrappedDelegate" /> was invoked. /// </summary> /// <typeparam name="T"></typeparam> public class DelegateInvocationCount...
Use login/getting started background image.
using Foundation; using System; using UIKit; namespace MyDriving.iOS { public partial class GettingStartedContentViewController : UIViewController { public UIImage Image { get; set; } public int PageIndex { get; set; } public GettingStartedContentViewController (IntPtr handle) : base (handle) { ...
using Foundation; using System; using UIKit; namespace MyDriving.iOS { public partial class GettingStartedContentViewController : UIViewController { public UIImage Image { get; set; } public int PageIndex { get; set; } public GettingStartedContentViewController (IntPtr handle) : base (handle) { ...
Add volatile keyword accroding to the doc
using System; using System.Linq; using System.Collections.Generic; using Wukong.Models; namespace Wukong.Services { public sealed class Storage { static readonly Lazy<Storage> instance = new Lazy<Storage>(() => new Storage()); IDictionary<string, User> userMap = new Dictionary<str...
using System; using System.Linq; using System.Collections.Generic; using Wukong.Models; namespace Wukong.Services { public sealed class Storage { static readonly Lazy<Storage> instance = new Lazy<Storage>(() => new Storage()); volatile IDictionary<string, User> userMap = new Dicti...
Fix cursors sent to osu-web being potentially string formatted in incorrect culture
// 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.IO.Network; using osu.Framework.Extensions.IEnumerableExtensions; using osu.Game.Online.API.Requests; namespace osu.Game.Extensions { public sta...
// 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.Globalization; using Newtonsoft.Json.Linq; using osu.Framework.IO.Network; using osu.Framework.Extensions.IEnumerableExtensions; using osu.Game.Online.API.R...
Add more diagnostics to FileThumbPrint
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; using System.Security.Cryptography; namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests { public class File...
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; using System.Security.Cryptography; namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests { public class File...
Fix broken implementation of static HttpClient
using System; using System.Net.Http; using System.Net.Http.Headers; using Microsoft.Extensions.Options; namespace AllReady.Hangfire.Jobs { public class SendRequestStatusToGetASmokeAlarm : ISendRequestStatusToGetASmokeAlarm { private readonly IOptions<GetASmokeAlarmApiSettings> getASmokeAlarmA...
using System; using System.Net.Http; using System.Net.Http.Headers; using Microsoft.Extensions.Options; namespace AllReady.Hangfire.Jobs { public class SendRequestStatusToGetASmokeAlarm : ISendRequestStatusToGetASmokeAlarm { private static HttpClient httpClient; public SendRequestS...
Fix default icon path when add new web search
using System.IO; using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; namespace Wox.Plugin.WebSearch { public class WebSearch { public const string DefaultIcon = "web_search.png"; public string Title { get; set; } public string ActionKeyword { get; s...
using System.IO; using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; namespace Wox.Plugin.WebSearch { public class WebSearch { public const string DefaultIcon = "web_search.png"; public string Title { get; set; } public string ActionKeyword { get; s...
Align url invalid char unit tests with changes done to the validation logic
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using OfficeDevPnP.Core.Utilities; using System.Collections.Generic; namespace OfficeDevPnP.Core.Tests.AppModelExtensions { [TestClass] public class UrlUtilityTests { [TestMethod] public void ContainsInvalidCharsReturnsFalse...
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using OfficeDevPnP.Core.Utilities; using System.Collections.Generic; namespace OfficeDevPnP.Core.Tests.AppModelExtensions { [TestClass] public class UrlUtilityTests { [TestMethod] public void ContainsInvalidCharsReturnsFalse...
Add support for removing okanshi instances
using System.Collections.Generic; namespace Okanshi.Dashboard { public interface IConfiguration { void Add(OkanshiServer server); IEnumerable<OkanshiServer> GetAll(); } }
using System.Collections.Generic; namespace Okanshi.Dashboard { public interface IConfiguration { void Add(OkanshiServer server); IEnumerable<OkanshiServer> GetAll(); void Remove(string name); } }
Update tests to use explicit globals
using NUnit.Framework; namespace Mond.Tests { [TestFixture] public class MondStateTests { [Test] public void MultiplePrograms() { const string source1 = @" hello = fun (x) { return 'hi ' + x; }; a = he...
using NUnit.Framework; namespace Mond.Tests { [TestFixture] public class MondStateTests { [Test] public void MultiplePrograms() { const string source1 = @" global.hello = fun (x) { return 'hi ' + x; }; ...
Allow blank/root route to be configured
using System.Web.Mvc; using System.Web.Routing; namespace Navigation.Mvc { public class RouteConfig { public static void AddStateRoutes() { if (StateInfoConfig.Dialogs == null) return; ValueProviderFactories.Factories.Insert(0, new NavigationDataValueProviderFactory()); string controlle...
using System.Web.Mvc; using System.Web.Routing; namespace Navigation.Mvc { public class RouteConfig { public static void AddStateRoutes() { if (StateInfoConfig.Dialogs == null) return; ValueProviderFactories.Factories.Insert(0, new NavigationDataValueProviderFactory()); string controlle...
Update to make hidden input for token self-closing
using System.Web.Mvc; using System.Web.Mvc.Html; using CourtesyFlush; namespace System.Web.WebPages { public static class HtmlHelperExtension { public static MvcHtmlString FlushHead(this HtmlHelper html) { return FlushHead(html, null); } public static MvcHtmlString...
using System.Web.Mvc; using System.Web.Mvc.Html; using CourtesyFlush; namespace System.Web.WebPages { public static class HtmlHelperExtension { public static MvcHtmlString FlushHead(this HtmlHelper html) { return FlushHead(html, null); } public static MvcHtmlString...
Allow access to the Data object
using System.Collections.Generic; using Hangfire.MemoryStorage.Database; using Hangfire.Server; using Hangfire.Storage; namespace Hangfire.MemoryStorage { public class MemoryStorage : JobStorage { private readonly MemoryStorageOptions _options; private readonly Data _data; public Memo...
using System.Collections.Generic; using Hangfire.MemoryStorage.Database; using Hangfire.Server; using Hangfire.Storage; namespace Hangfire.MemoryStorage { public class MemoryStorage : JobStorage { private readonly MemoryStorageOptions _options; public Data Data { get; } public Memory...
Remove `internal-reportinstallsuccess` from `dotnet complete`.
// 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.Linq; using Microsoft.DotNet.Cli.CommandLine; namespace Microsoft.DotNet.Cli { internal static class InternalReportinstallsucce...
// 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.Linq; using Microsoft.DotNet.Cli.CommandLine; namespace Microsoft.DotNet.Cli { internal static class InternalReportinstallsucce...
Replace order of default settings
using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Orleans.Providers.MongoDB.Configuration; using Orleans.Runtime; using Orleans.Serialization; namespace Orleans.Providers.MongoDB.StorageProviders.Serializers { public class JsonGrainStateSerializer : IGrainStateSerializer...
using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Orleans.Providers.MongoDB.Configuration; using Orleans.Runtime; using Orleans.Serialization; namespace Orleans.Providers.MongoDB.StorageProviders.Serializers { public class JsonGrainStateSerializer : IGrainStateSerializer...
Add scenario test to check the minimum string length constraint is ignored
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using Ploeh.AutoFixture; using Xunit; namespace Ploeh.AutoFixtureUnitTest.DataAnnotations { public class StringLengthArgumentSupportTests { [Fact] public void Fixt...
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using Ploeh.AutoFixture; using Xunit; namespace Ploeh.AutoFixtureUnitTest.DataAnnotations { public class StringLengthArgumentSupportTests { [Fact] public void Fixt...
Break build again for TeamCity email notify test.
namespace Siftables { public partial class MainWindowView { public MainWindowView() { InitializeComponent(); DoSomething(); } } }
namespace Siftables { public partial class MainWindowView { public MainWindowView() { InitializeComponent(); DoAllOfTheThings(); } } }
Fix indentation for scheduled triggers
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Linq; using Nuke.Common.Utilities; namespace Nuke.Common.CI.GitHubActions.Configuration { public class GitHubActionsScheduledTrigger : GitHubActionsDeta...
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Linq; using Nuke.Common.Utilities; namespace Nuke.Common.CI.GitHubActions.Configuration { public class GitHubActionsScheduledTrigger : GitHubActionsDeta...
Check dVers versions for null (version numbers such as 1, 1.2 and 1.3)
using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace KerbalPackageManager { internal class dotVersion { public dotVersion(string toFilename) { var jObj = JObject.Parse(File.ReadAllText(toFilenam...
using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace KerbalPackageManager { internal class dotVersion { public dotVersion(string toFilename) { var jObj = JObject.Parse(File.ReadAllText(toFilenam...
Refactor - rename test class
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NUnit.Framework; namespace IntUITive.Selenium.Tests { [TestFixture] public class IntuitivelyTests { [Test] public void Find_WithNoTerm_Fails() { ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NUnit.Framework; namespace IntUITive.Selenium.Tests { [TestFixture] public class EdgeCaseTests { [Test] public void Find_WithNoTerm_Fails() { ...
Put loop test's variables in a local scope
using NUnit.Framework; namespace Rant.Tests.Expressions { [TestFixture] public class Loops { private readonly RantEngine rant = new RantEngine(); [Test] public void StringBuildingWhileLoop() { var output = rant.Do(@" [@ var parts = (""this"", ""is"", ""a"",...
using NUnit.Framework; namespace Rant.Tests.Expressions { [TestFixture] public class Loops { private readonly RantEngine rant = new RantEngine(); [Test] public void StringBuildingWhileLoop() { var output = rant.Do(@" [@ (function() { var parts ...
Remove "Get" statement from example docs
using Discord; using Discord.Commands; using Discord.WebSocket; public class ModuleA : ModuleBase { private readonly DatabaseService _database; // Dependencies can be injected via the constructor public ModuleA(DatabaseService database) { _database = database; } public async Task Read...
using Discord; using Discord.Commands; using Discord.WebSocket; public class ModuleA : ModuleBase { private readonly DatabaseService _database; // Dependencies can be injected via the constructor public ModuleA(DatabaseService database) { _database = database; } public async Task Read...
Improve cfx default settings (removing hack switch)
using Chromium; using Chromium.Event; using Neutronium.Core; using Neutronium.WPF; namespace Neutronium.WebBrowserEngine.ChromiumFx { public abstract class ChromiumFxWebBrowserApp : HTMLApp { protected virtual bool DisableWebSecurity => true; protected override IWPFWebWindowFactory GetWindowF...
using Chromium; using Chromium.Event; using Neutronium.Core; using Neutronium.WPF; namespace Neutronium.WebBrowserEngine.ChromiumFx { public abstract class ChromiumFxWebBrowserApp : HTMLApp { protected virtual bool DisableWebSecurity => false; protected override IWPFWebWindowFactory GetWindow...
Remove User ID from device credential creation payload
using Auth0.Core; using Newtonsoft.Json; namespace Auth0.ManagementApi.Models { /// <summary> /// /// </summary> public class DeviceCredentialCreateRequest : DeviceCredentialBase { /// <summary> /// Gets or sets the ID of the client for which the credential will be created. ...
using System; using Auth0.Core; using Newtonsoft.Json; namespace Auth0.ManagementApi.Models { /// <summary> /// /// </summary> public class DeviceCredentialCreateRequest : DeviceCredentialBase { /// <summary> /// Gets or sets the ID of the client for which the credential will be ...
Add option to control whether player can use twisting
using UnityEngine; using System.Collections; public class GameManager : MonoBehaviour { public static GameManager Instance; public Mode CurrentMode = Mode.TopDown; CameraController cameraController; void Awake() { if (Instance == null) { Instance = this; } els...
using UnityEngine; using System.Collections; public class GameManager : MonoBehaviour { public static GameManager Instance; public Mode CurrentMode = Mode.TopDown; public bool AllowTwisting = true; CameraController cameraController; void Awake() { if (Instance == null) { ...
Fix migration to handle identical aliases for different group names and write error to log
using System.Linq; using Umbraco.Core.Persistence.Dtos; namespace Umbraco.Core.Migrations.Upgrade.V_8_16_0 { public class AddPropertyTypeGroupColumns : MigrationBase { public AddPropertyTypeGroupColumns(IMigrationContext context) : base(context) { } public override void Mi...
using System.Linq; using Umbraco.Core.Logging; using Umbraco.Core.Persistence.Dtos; namespace Umbraco.Core.Migrations.Upgrade.V_8_16_0 { public class AddPropertyTypeGroupColumns : MigrationBase { public AddPropertyTypeGroupColumns(IMigrationContext context) : base(context) { } ...
Use await instead of hand-written continuation.
using System; using System.Threading.Tasks; namespace MySql.Data { internal static class ValueTaskExtensions { public static ValueTask<TResult> ContinueWith<T, TResult>(this ValueTask<T> valueTask, Func<T, ValueTask<TResult>> continuation) { return valueTask.IsCompleted ? continuation(valueTask.Result) : ...
using System; using System.Threading.Tasks; namespace MySql.Data { internal static class ValueTaskExtensions { public static async ValueTask<TResult> ContinueWith<T, TResult>(this ValueTask<T> valueTask, Func<T, ValueTask<TResult>> continuation) => await continuation(await valueTask); public static ValueTask<T>...
Fix missing plot in claims
@using JoinRpg.Web.App_Code @using JoinRpg.Web.Models.Plot @model PlotElementViewModel @if (!Model.Visible) { return; } @{ var hideClass = Model.Status == PlotStatus.InWork ? "world-object-hidden" : ""; } @if (Model.HasEditAccess) { <div> @Html.DisplayFor(model => model.Status) @Html.ActionLink(...
@using JoinRpg.Web.App_Code @using JoinRpg.Web.Models.Plot @model PlotElementViewModel @if (!Model.Visible) { return; } @{ var hideClass = Model.Status == PlotStatus.InWork ? "world-object-hidden" : ""; } @if (Model.HasEditAccess) { <div> @Html.DisplayFor(model => model.Status) @Html.ActionLink(...
Fix invalid logic when start server
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace LiteNetLibHighLevel { [RequireComponent(typeof(LiteNetLibAssets))] public class LiteNetLibGameManager : LiteNetLibManager { private LiteNetLibAssets assets; public LiteNetLibAssets Assets { ...
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace LiteNetLibHighLevel { [RequireComponent(typeof(LiteNetLibAssets))] public class LiteNetLibGameManager : LiteNetLibManager { private LiteNetLibAssets assets; public LiteNetLibAssets Assets { ...
Make username password fields fit on Mac Chrome
@using JabbR; <form class="form-horizontal" action="@Url.Content("~/account/login")" method="post"> @Html.ValidationSummary() <div class="control-group"> <div class="controls"> <div class="input-prepend"> <span class="add-on"><i class="icon-user"></i>...
@using JabbR; <form class="form-horizontal" action="@Url.Content("~/account/login")" method="post"> @Html.ValidationSummary() <div class="control-group"> <div class="controls"> <div class="input-prepend"> <span class="add-on"><i class="icon-user"></i>...
Use empty hit windows for spinner ticks
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Audio; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Osu.Judgements; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Osu.Object...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Audio; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Osu.Judgements; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Osu.Object...
Fix TestGetPlaylistFormats after adding more extensions to the PlaylistReaderFactory
using System; using ATL.AudioReaders; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Text; namespace ATL.test { [TestClass] public class FactoryTest { [TestMethod] public void TestGetPlaylistFormats() { StringBuilder filter = new StringBuilder(""); ...
using System; using ATL.AudioReaders; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Text; namespace ATL.test { [TestClass] public class FactoryTest { [TestMethod] public void TestGetPlaylistFormats() { StringBuilder filter = new StringBuilder(""); ...
Fix iOS cache folder path
using System; using System.IO; namespace Amica.vNext { public class SqliteObjectCache : SqliteObjectCacheBase { protected override string GetDatabasePath() { const string sqliteFilename = "cache.db3"; var cacheFolder = Path.Combine(ApplicationName, "SimpleCache"); ...
using System; using System.IO; using Amica.vNext; [assembly: Xamarin.Forms.Dependency(typeof(SqliteObjectCache))] namespace Amica.vNext { public class SqliteObjectCache : SqliteObjectCacheBase { protected override string GetDatabasePath() { const string sqliteFilename = "cache.db3...
Add API comments for Git Testing ;)
using Microsoft.Practices.Unity; using Microsoft.Practices.Unity.ObjectBuilder; namespace UnityAutoMoq { public class UnityAutoMoqExtension : UnityContainerExtension { private readonly UnityAutoMoqContainer autoMoqContainer; public UnityAutoMoqExtension(UnityAutoMoqContainer autoMoqCo...
using Microsoft.Practices.Unity; using Microsoft.Practices.Unity.ObjectBuilder; namespace UnityAutoMoq { /// <summary> /// Provide extensions for Unity Auto Moq /// </summary> public class UnityAutoMoqExtension : UnityContainerExtension { private readonly UnityAutoMoqContainer aut...
Switch to the less restrictive IConfiguration
#if NETSTANDARD1_6 using System; using Microsoft.Extensions.Configuration; namespace RapidCore.Configuration { /// <summary> /// Base class for strongly typed configuration classes. /// /// The idea is to allow you to define a config class specific /// for your project, but gain easy access to rea...
#if NETSTANDARD1_6 using System; using Microsoft.Extensions.Configuration; namespace RapidCore.Configuration { /// <summary> /// Base class for strongly typed configuration classes. /// /// The idea is to allow you to define a config class specific /// for your project, but gain easy access to rea...
Add Travis to contact list.
@{ ViewBag.Title = "Contact"; } <h2>@ViewBag.Title.</h2> <h3>@ViewBag.Message</h3> <address> One Microsoft Way<br /> Redmond, WA 98052-6399<br /> <abbr title="Phone">P:</abbr> 425.555.0100 </address> <address> <strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.co...
@{ ViewBag.Title = "Contact"; } <h2>@ViewBag.Title.</h2> <h3>@ViewBag.Message</h3> <address> One Microsoft Way<br /> Redmond, WA 98052-6399<br /> <abbr title="Phone">P:</abbr> 425.555.0100 </address> <address> <strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.co...
Change assembly version for release
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("Flirper1.0")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly...
using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("Flirper1.1")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly...
Add missing Include for CircleType
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Xml.Serialization; using Rocket.Unturned.Player; namespace Safezone.Model { [XmlInclude(typeof(RectangleType))] public abstract class SafeZoneType { private static readonly Dictionary<String, Type> R...
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Xml.Serialization; using Rocket.Unturned.Player; namespace Safezone.Model { [XmlInclude(typeof(RectangleType))] [XmlInclude(typeof(CircleType))] public abstract class SafeZoneType { private stati...
Change destination for slack notifications
using AzureStorage.Queue; using Core; using Core.Notifiers; using Lykke.JobTriggers.Abstractions; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; namespace AzureRepositories.Notifiers { public class SlackNotifier : ISlackNotifier, IPoisionQue...
using AzureStorage.Queue; using Core; using Core.Notifiers; using Lykke.JobTriggers.Abstractions; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; namespace AzureRepositories.Notifiers { public class SlackNotifier : ISlackNotifier, IPoisionQue...
Add --base-tile option to Deserialize-Tilemap.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PixelPet.Commands { internal class DeserializeTilemapCmd : CliCommand { public DeserializeTilemapCmd() : base("Deserialize-Tilemap") { } public override void Run(Workbench workbench, Cli cli) { cli.Log("Deseria...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PixelPet.Commands { internal class DeserializeTilemapCmd : CliCommand { public DeserializeTilemapCmd() : base("Deserialize-Tilemap", new Parameter[] { new Parameter("base-tile", "bt", false, new ParameterValue("i...
Convert this in a different way
using System; using System.Collections.Generic; using BugsnagUnity.Payload; using UnityEngine; namespace BugsnagUnity { static class DictionaryExtensions { private static IntPtr Arrays { get; } = AndroidJNI.FindClass("java/util/Arrays"); private static IntPtr ToStringMethod { get; } = AndroidJNIHelper.Get...
using System; using System.Collections.Generic; using BugsnagUnity.Payload; using UnityEngine; namespace BugsnagUnity { static class DictionaryExtensions { internal static void PopulateDictionaryFromAndroidData(this IDictionary<string, object> dictionary, AndroidJavaObject source) { using (var set = ...
Fix image hash computing (PNG gives different results on different ms windows versions)
using System.Drawing; using System.Drawing.Imaging; using System.IO; namespace MaintainableSelenium.MvcPages.Utils { public static class ImageExtensions { public static Bitmap ToBitmap(this byte[] screenshot) { using (MemoryStream memoryStream = new MemoryStream(screenshot)) ...
using System.Drawing; using System.Drawing.Imaging; using System.IO; namespace MaintainableSelenium.MvcPages.Utils { public static class ImageExtensions { public static Bitmap ToBitmap(this byte[] screenshot) { using (MemoryStream memoryStream = new MemoryStream(screenshot)) ...
Remove obsolete ifdefs and property
using System; using Xablu.WebApiClient.Exceptions; namespace Xablu.WebApiClient { public class CrossRestApiClient { private static Action<RestApiClientOptions> _configureRestApiClient; private static Lazy<IRestApiClient> _restApiClientImplementation = new Lazy<IRestApiClient>(() => CreateRestAp...
using System; using Xablu.WebApiClient.Exceptions; namespace Xablu.WebApiClient { public class CrossRestApiClient { private static Action<RestApiClientOptions> _configureRestApiClient; private static Lazy<IRestApiClient> _restApiClientImplementation = new Lazy<IRestApiClient>(() => CreateRestAp...
Fix installments to use the correct type
namespace Stripe { using System; using Newtonsoft.Json; using Stripe.Infrastructure; public class PaymentIntentPaymentMethodOptionsCard : StripeEntity<PaymentIntentPaymentMethodOptionsCard> { /// <summary> /// Installment details for this payment (Mexico only). /// </summary...
namespace Stripe { using System; using Newtonsoft.Json; using Stripe.Infrastructure; public class PaymentIntentPaymentMethodOptionsCard : StripeEntity<PaymentIntentPaymentMethodOptionsCard> { /// <summary> /// Installment details for this payment (Mexico only). /// </summary...
Use {0:c} rather than ToString("c") where possible.
@using System.Linq; @using Nwazet.Commerce.Models; @{ var priceTiers = new List<PriceTier>(Model.PriceTiers); var discountedPriceTiers = new List<PriceTier>(Model.DiscountedPriceTiers); } @if (Model.PriceTiers != null && Enumerable.Count(Model.PriceTiers) > 0) { <table class="tiered-prices"> <tr> ...
@using System.Linq; @using Nwazet.Commerce.Models; @{ var priceTiers = new List<PriceTier>(Model.PriceTiers); var discountedPriceTiers = new List<PriceTier>(Model.DiscountedPriceTiers); } @if (Model.PriceTiers != null && Enumerable.Count(Model.PriceTiers) > 0) { <table class="tiered-prices"> <tr> ...
Save created towers in an array
using UnityEngine; using System.Collections; public class GameController : MonoBehaviour { public GameObject towerBase; public GameObject gameField; void Start () { Debug.Log ("GameController: Game Started"); this.initGamePlatform (); } void Update () { } void initGamePlatform() { for (int x = 0; x <...
using UnityEngine; using System.Collections; public class GameController : MonoBehaviour { public GameObject towerBase; public GameObject gameField; private GameObject[,] towerBases; private int gameFieldWidth = 0; private int gameFieldHeight = 0; void Start () { this.gameFieldWidth = (int)(gameField.trans...
Fix for always using front
using Android.Content; using Android.Hardware; namespace Plugin.Media { internal static class IntentExtraExtensions { private const string extraFrontPre25 = "android.intent.extras.CAMERA_FACING"; private const string extraFrontPost25 = "android.intent.extras.LENS_FACING_FRONT"; private const string extraBackP...
using Android.Content; using Android.Hardware; namespace Plugin.Media { internal static class IntentExtraExtensions { private const string extraFrontPre25 = "android.intent.extras.CAMERA_FACING"; private const string extraFrontPost25 = "android.intent.extras.LENS_FACING_FRONT"; private const string extraBackP...
Hide "Rank Achieved" sorting mode until it's supported
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.ComponentModel; using osu.Framework.Localisation; using osu.Game.Resources.Localisation.Web; namespace osu.Game.Screens.Select.Filter { public enum Sor...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.ComponentModel; using osu.Framework.Localisation; using osu.Game.Resources.Localisation.Web; namespace osu.Game.Screens.Select.Filter { public enum Sor...
Revert accidental change of async flag .
using System; using System.Diagnostics; namespace NuGetConsole.Implementation.PowerConsole { /// <summary> /// Represents a host with extra info. /// </summary> class HostInfo : ObjectWithFactory<PowerConsoleWindow> { Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; } ...
using System; using System.Diagnostics; namespace NuGetConsole.Implementation.PowerConsole { /// <summary> /// Represents a host with extra info. /// </summary> class HostInfo : ObjectWithFactory<PowerConsoleWindow> { Lazy<IHostProvider, IHostMetadata> HostProvider { get; set; } ...
Update the example precondition to use IServiceProvider
// (Note: This precondition is obsolete, it is recommended to use the RequireOwnerAttribute that is bundled with Discord.Commands) using Discord.Commands; using Discord.WebSocket; using System.Threading.Tasks; // Inherit from PreconditionAttribute public class RequireOwnerAttribute : PreconditionAttribute { // Ov...
// (Note: This precondition is obsolete, it is recommended to use the RequireOwnerAttribute that is bundled with Discord.Commands) using Discord.Commands; using Discord.WebSocket; using Microsoft.Extensions.DependencyInjection; using System; using System.Threading.Tasks; // Inherit from PreconditionAttribute public c...
Configure data portal before using data portal
using Csla.Configuration; using ProjectTracker.Library; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; namespace ProjectTracker.Ui.Xamarin { public partial class App : Application { public static Page RootPage { get; priva...
using Csla.Configuration; using ProjectTracker.Library; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; namespace ProjectTracker.Ui.Xamarin { public partial class App : Application { public static Page RootPage { get; priva...
Sort attribute types as documentation
namespace Akeneo.Model { public class AttributeType { public const string Date = "pim_catalog_date"; public const string Metric = "pim_catalog_metric"; public const string Price = "pim_catalog_price_collection"; public const string Number = "pim_catalog_number"; public const string Text = "pim_catalog_text...
namespace Akeneo.Model { public class AttributeType { /// <summary> /// It is the unique product’s identifier. The catalog can contain only one. /// </summary> public const string Identifier = "pim_catalog_identifier"; /// <summary> /// Text /// </summary> public const string Text = "pim_catalog_tex...
Add implementation for change tracking.
// Copyright (c) Alex Ghiondea. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace SmugMug.v2.Types { public class SmugMugEntity { protected void NotifyPropertyValueChanged(string name, object value) { }...
// Copyright (c) Alex Ghiondea. 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.Diagnostics; namespace SmugMug.v2.Types { public class SmugMugEntity { private Dictionary<string, ob...
Add flag to know if the package is bundled or not.
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="Package.cs" company="Naos"> // Copyright 2015 Naos // </copyright> // -----------------------------------------------------------------------------------------------------------...
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="Package.cs" company="Naos"> // Copyright 2015 Naos // </copyright> // -----------------------------------------------------------------------------------------------------------...
Switch back to hello world example,
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Logging; namespace Tiesmaster.Dcc { public class Startup { public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddCon...
using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; namespace Tiesmaster.Dcc { public class Startup { public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF...
Add placeholder for agent config
using Microsoft.AspNet.Builder; using Glimpse.Host.Web.AspNet; using Microsoft.Framework.DependencyInjection; namespace Glimpse.Agent.AspNet.Sample { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddGlimpse() .RunningAg...
using Glimpse.Agent.Web; using Microsoft.AspNet.Builder; using Glimpse.Host.Web.AspNet; using Microsoft.Framework.DependencyInjection; namespace Glimpse.Agent.AspNet.Sample { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddGlimpse() ...
Fix Missing magic extension and max version of decoder
/* Copyright 2016 Daro Cutillas Carrillo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
/* Copyright 2016 Daro Cutillas Carrillo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
Remove VerifyMessage extension (implemented in NBitcoin)
using HiddenWallet.Models; using System; using System.Collections.Generic; using System.Text; namespace NBitcoin { public static class NBitcoinExtensions { public static ChainedBlock GetBlock(this ConcurrentChain me, Height height) => me.GetBlock(height.Value); public static string ToHe...
using HiddenWallet.Models; using System; using System.Collections.Generic; using System.Text; namespace NBitcoin { public static class NBitcoinExtensions { public static ChainedBlock GetBlock(this ConcurrentChain me, Height height) => me.GetBlock(height.Value); public static string ToHe...
Rename tests to reflect recent naming changes.
using System; using System.Threading.Tasks; using Xunit; namespace Nocto.Tests.Integration { public class UsersEndpointTests { public class TheGetUserAsyncMethod { [Fact] public async Task ReturnsSpecifiedUser() { var github = new GitHubClien...
using System; using System.Threading.Tasks; using Xunit; namespace Nocto.Tests.Integration { public class UsersEndpointTests { public class TheGetMethod { [Fact] public async Task ReturnsSpecifiedUser() { var github = new GitHubClient { Login...
Revert "fix(logging): 🐛 try alt AppInsights IKey init"
using System; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Serilog; namespace FilterLists.SharedKernel.Logging { public static class HostRunner { public static async Task TryRunWithLogg...
using System; using System.Threading.Tasks; using Microsoft.ApplicationInsights; using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Serilog; namespace FilterLists.SharedKernel.Logging { public static class HostRunner { ...
Remove specific references to .sln files.
using System; using System.IO; using SourceBrowser.Generator; namespace SourceBrowser.Samples { class Program { static void Main(string[] args) { // Combined with, or replaced by, provided paths to create absolute paths string userProfilePath = Environment.GetFolderPath...
using System; using System.IO; using SourceBrowser.Generator; namespace SourceBrowser.Samples { class Program { static void Main(string[] args) { // Combined with, or replaced by, provided paths to create absolute paths string userProfilePath = Environment.GetFolderPath...
Use constants in upgrade migration
using Umbraco.Core.Logging; using Umbraco.Core.Persistence.SqlSyntax; namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFourteenZero { /// <summary> /// Migrates member group picker properties from NVarchar to NText. See https://github.com/umbraco/Umbraco-CMS/issues/3268. /// </summ...
using Umbraco.Core.Logging; using Umbraco.Core.Persistence.SqlSyntax; namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFourteenZero { /// <summary> /// Migrates member group picker properties from NVarchar to NText. See https://github.com/umbraco/Umbraco-CMS/issues/3268. /// </summ...
Add sample code to get the authenticated user from the site.
using SmugMug.v2.Authentication; using SmugMug.v2.Authentication.Tokens; using System.Diagnostics; namespace SmugMugTest { class Program { private static OAuthToken s_oauthToken; static void Main(string[] args) { s_oauthToken = ConsoleAuthentication.GetOAuthTokenFromProvid...
using SmugMug.v2.Authentication; using SmugMug.v2.Authentication.Tokens; using SmugMug.v2.Types; using System.Diagnostics; namespace SmugMugTest { class Program { private static OAuthToken s_oauthToken; static void Main(string[] args) { s_oauthToken = ConsoleAuthentication...
Make it work with any number of arguments
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConComp { class Program { static void Main(string[] args) { var fname1 = args[0]; var fname2 = args[1]; var task1 = ...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; namespace ConComp { internal class Program { private static void Main(string[] args) { var tasks = new Dictionary<string, Task<long>>(); foreach (var arg in...
Add a method to create an instance of the applicable path element type to resolver
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Reflection; using Pather.CSharp.PathElements; namespace Pather.CSharp { public class Resolver { private IList<Type> pathElementTypes; public Resolver() { pathEleme...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Reflection; using Pather.CSharp.PathElements; namespace Pather.CSharp { public class Resolver { private IList<Type> pathElementTypes; public Resolver() { pathEleme...
Bring back the LoadFrom method.
using System.Collections.Generic; using System.Net.Mail; using SparkPost.Utilities; namespace SparkPost { public class Transmission { public Transmission() { Recipients = new List<Recipient>(); Metadata = new Dictionary<string, object>(); SubstitutionData = ...
using System.Collections.Generic; using System.Net.Mail; using SparkPost.Utilities; namespace SparkPost { public class Transmission { public Transmission() { Recipients = new List<Recipient>(); Metadata = new Dictionary<string, object>(); SubstitutionData = ...
Fix bug argument matcher would cause index out of range
using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; namespace ApiPorter.Patterns { internal sealed class ArgumentMatcher : Matcher { private readonly ArgumentVariable _variable; private readonly int _following; p...
using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; namespace ApiPorter.Patterns { internal sealed class ArgumentMatcher : Matcher { private readonly ArgumentVariable _variable; private readonly int _following; p...
Use static properties instead of static constructor ==> if exception is thrown, detailed information is available, else TypeInitialiser exception is thrown
using System.Collections.Generic; using NHibernate; using NHibernate.Cfg; using NHibernate.Dialect; using NHibernate.Driver; namespace PPWCode.Vernacular.NHibernate.I.Test { public static class NhConfigurator { private const string ConnectionString = "Data Source=:memory:;Version=3;New=Tru...
using System.Collections.Generic; using NHibernate; using NHibernate.Cfg; using NHibernate.Dialect; using NHibernate.Driver; namespace PPWCode.Vernacular.NHibernate.I.Test { public static class NhConfigurator { private const string ConnectionString = "Data Source=:memory:;Version=3;New=Tru...
Fix for issue U4-5364 without trying to fix the localization of the error text.
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Umbraco.Core.Models; namespace Umbraco.Core.PropertyEditors { /// <summary> /// A validator that validates an email address /// </summary> [ValueValidator("Email")] internal sealed class EmailValidator :...
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Umbraco.Core.Models; namespace Umbraco.Core.PropertyEditors { /// <summary> /// A validator that validates an email address /// </summary> [ValueValidator("Email")] internal sealed class EmailValidator :...
Add trace with some quotes
using System; using System.Collections.Generic; using System.Configuration; using System.Diagnostics; using System.Linq; using System.Web; using System.Web.Mvc; using MyCoolLib; namespace Mvc52Application.Controllers { public class HomeController : Controller { public ActionResult Index() { ...
using System; using System.Collections.Generic; using System.Configuration; using System.Diagnostics; using System.Linq; using System.Web; using System.Web.Mvc; using MyCoolLib; namespace Mvc52Application.Controllers { public class HomeController : Controller { public ActionResult Index() { ...
Remove usage of FX_DEPS_FILE as a fallback for locating `dotnet`, since that can find the wrong result when a newer patch is installed to the global dotnet location than the one installed into the folder containing Process.MainModule.
#if !NET452 namespace Fixie.Cli { using System; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; class Dotnet { public static readonly string Path = FindDotnet(); static string FindDotnet() { var fileName = RuntimeInformation...
#if !NET452 namespace Fixie.Cli { using System; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; class Dotnet { public static readonly string Path = FindDotnet(); static string FindDotnet() { var fileName = RuntimeInformation...
Put markers in a dictionary for reuse.
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPlacer : MonoBehaviour { public CountryLocation reader; public GameObject prefab; // Use this for initialization void Start () { Debug.Log ("LOOK WE ARE DOING THINGS"); reader.NotANormalWord (); Debug.Log ("S...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPlacer : MonoBehaviour { public CountryLocation reader; public GameObject prefab; private Dictionary<string, GameObject> markers; // Use this for initialization void Start () { Debug.Log ("LOOK WE ARE DOING TH...
Add bot class method stubs
using System; /// <summary> /// Summary description for Class1 /// </summary> public class Bot { public Bot() { // // TODO: Add constructor logic here // } }
using System; /// <summary> /// Summary description for Class1 /// </summary> public class Bot { private const int chromosomeSize = 10; private Chromosome<double> chromosome; public Bot() { chromosome = new Chromosome<double>(chromosomeSize); } public Bot(double[] values) { chromosome = new Chromosome<do...
Bring welcome page back to project
using Microsoft.AspNet.Builder; namespace KWebStartup { public class Startup { public void Configure(IApplicationBuilder app) { app.UseStaticFiles(); } } }
using Microsoft.AspNet.Builder; namespace KWebStartup { public class Startup { public void Configure(IApplicationBuilder app) { app.UseStaticFiles(); app.UseWelcomePage(); } } }
Remove PremiumRS edition value due to public preview schedule changes
// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apa...
// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apa...
Add LateUpdate check to scaler
using System.Collections; using System.Collections.Generic; using UnityEngine; [ExecuteInEditMode] public class TextMeshLimitSize : MonoBehaviour { #pragma warning disable 0649 //Serialized Fields [SerializeField] private Vector2 maxExtents; [SerializeField] private TextMesh textMesh; [Serializ...
using System.Collections; using System.Collections.Generic; using UnityEngine; [ExecuteInEditMode] public class TextMeshLimitSize : MonoBehaviour { #pragma warning disable 0649 //Serialized Fields [SerializeField] private Vector2 maxExtents; [SerializeField] private TextMesh textMesh; [Serializ...
Add comment to Auth Login action describing redirect
// Copyright(c) 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy of // the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
// Copyright(c) 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy of // the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
Allow products to have 0 price
using System; using System.Globalization; using System.Text.RegularExpressions; namespace RohlikAPI.Helpers { public class PriceParser { public double ParsePrice(string priceString) { var priceStringWithoutSpaces = priceString.Replace(" ", "").Replace("&nbsp;",""); var ...
using System; using System.Globalization; using System.Text.RegularExpressions; namespace RohlikAPI.Helpers { public class PriceParser { public double ParsePrice(string priceString) { var priceStringWithoutSpaces = priceString.Replace(" ", "").Replace("&nbsp;",""); var ...
Add comment as this may be removed in the future
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using osu.Framework.Platform.Linux.Native; namespace osu.Framework.Platform.Linux { public class LinuxGameHost : DesktopGameHost { internal L...
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using osu.Framework.Platform.Linux.Native; namespace osu.Framework.Platform.Linux { public class LinuxGameHost : DesktopGameHost { internal L...
Fix the EF causing issues identity framework
using System; using Microsoft.AspNet.Identity.EntityFramework; using Project.Data.Configuration; using System.Data.Entity; using Project.Domain.Entities; namespace Project.Data { public class ProjectContext : IdentityDbContext<ApplicationUser> { public ProjectContext() : base("ProjectContext") { } ...
using Microsoft.AspNet.Identity.EntityFramework; using Project.Data.Configuration; using System.Data.Entity; using Project.Domain.Entities; namespace Project.Data { public class ProjectContext : IdentityDbContext<ApplicationUser> { public ProjectContext() : base("ProjectContext") { } public D...
Add Response Bad Request on Detail Page
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using CarFuel.DataAccess; using CarFuel.Models; using CarFuel.Services; using Microsoft.AspNet.Identity; namespace CarFuel.Controllers { public class CarsController : Controller { private ICarDb db; p...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using CarFuel.DataAccess; using CarFuel.Models; using CarFuel.Services; using Microsoft.AspNet.Identity; namespace CarFuel.Controllers { public class CarsController : Controller { private ICarDb db; p...
Undo a change which causes compiler error in .NET 4.0 (but not .NET 4.5
using System.Collections.Generic; using System.Linq; namespace NuGet.Common { public static class AggregateRepositoryHelper { public static AggregateRepository CreateAggregateRepositoryFromSources(IPackageRepositoryFactory factory, IPackageSourceProvider sourceProvider, IEnumerable<string> sour...
using System.Collections.Generic; using System.Linq; namespace NuGet.Common { public static class AggregateRepositoryHelper { public static AggregateRepository CreateAggregateRepositoryFromSources(IPackageRepositoryFactory factory, IPackageSourceProvider sourceProvider, IEnumerable<string> sour...
Replace tournament routes with generic {year}/{discipline}/{slug}
using System; using System.Threading.Tasks; using System.Web.Mvc; using CroquetAustralia.Website.App.Infrastructure; namespace CroquetAustralia.Website.App.tournaments { [RoutePrefix("tournaments")] public class TournamentsController : ApplicationController { private readonly WebApi _webApi; ...
using System; using System.Threading.Tasks; using System.Web.Mvc; using CroquetAustralia.Website.App.Infrastructure; namespace CroquetAustralia.Website.App.tournaments { [RoutePrefix("tournaments")] public class TournamentsController : ApplicationController { private readonly WebApi _webApi; ...
Fix initializing the auth view'
using System; using UnityEditor; using UnityEngine; namespace GitHub.Unity { [Serializable] class AuthenticationWindow : BaseWindow { private const string Title = "Sign in"; [SerializeField] private AuthenticationView authView; [MenuItem("GitHub/Authenticate")] public sta...
using System; using UnityEditor; using UnityEngine; namespace GitHub.Unity { [Serializable] class AuthenticationWindow : BaseWindow { private const string Title = "Sign in"; [SerializeField] private AuthenticationView authView; [MenuItem("GitHub/Authenticate")] public sta...
Switch back to tabbed winforms example being the default (maybe one day create a method to switch between the two)
// 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.Windows.Forms; using CefSharp.Example; using CefSharp.WinForms.Example.Minimal; namespace CefSharp.WinForms.Example { ...
// 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.Windows.Forms; using CefSharp.Example; using CefSharp.WinForms.Example.Minimal; namespace CefSharp.WinForms.Example { ...
Write to debug in debug env
using System; using System.IO; namespace WebScriptHook.Framework { public class Logger { public static string FileName { get; internal set; } = "WebScriptHook.log"; public static LogType LogLevel { get; internal set; ...
using System; using System.IO; using System.Diagnostics; namespace WebScriptHook.Framework { public class Logger { public static string FileName { get; internal set; } = "WebScriptHook.log"; public static LogType LogLevel { get; ...
Fix for unsubscribe freezing ui thread
using System.Threading.Tasks; using CryptoExchange.Net.Interfaces; namespace Binance.Net.Objects { internal class BinanceStream { internal bool TryReconnect { get; set; } = true; public IWebsocket Socket { get; set; } public BinanceStreamSubscription StreamResult { get; set; } ...
using System.Threading.Tasks; using CryptoExchange.Net.Interfaces; namespace Binance.Net.Objects { internal class BinanceStream { internal bool TryReconnect { get; set; } = true; public IWebsocket Socket { get; set; } public BinanceStreamSubscription StreamResult { get; set; } ...
Print "Other:" for single choice questions
using System; using System.Text; using SurveyMonkey.Helpers; namespace SurveyMonkey.ProcessedAnswers { public class SingleChoiceAnswer : IProcessedResponse { public string Choice { get; set; } public string OtherText { get; set; } public string Printable { get ...
using System; using System.Text; using SurveyMonkey.Helpers; namespace SurveyMonkey.ProcessedAnswers { public class SingleChoiceAnswer : IProcessedResponse { public string Choice { get; set; } public string OtherText { get; set; } public string Printable { get ...
Adjust the CoinWarz price / exchange rate so that BTC is 1 (100%)
using MultiMiner.Coin.Api; using Newtonsoft.Json.Linq; namespace MultiMiner.CoinWarz.Api { public static class CoinInformationExtensions { public static void PopulateFromJson(this CoinInformation coinInformation, JToken jToken) { coinInformation.Symbol = jToken.Value<string>("CoinT...
using MultiMiner.Coin.Api; using Newtonsoft.Json.Linq; namespace MultiMiner.CoinWarz.Api { public static class CoinInformationExtensions { public static void PopulateFromJson(this CoinInformation coinInformation, JToken jToken) { coinInformation.Symbol = jToken.Value<string>("CoinT...
Revert "Added log of exceptions"
using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Globalization; using System.IO; using System.Linq; using System.Threading.Tasks; using System.Windows; using System.Windows.Threading; namespace EasySnippets { /// <summary> /// Interaction logic for Ap...
using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Threading.Tasks; using System.Windows; using System.Windows.Threading; namespace EasySnippets { /// <summary> /// Interaction logic for App.xaml /// </summary> public partial ...
Fix bug in reset code
using UnityEngine; public class Trials { public static void Reset() { Debug.Log("Reset trials"); } public static void AddSuccess() { string trials = PlayerPrefs.GetString("Trials"); trials += "S"; while(trials.Length > 100) { trials = trials.Substring(1); ...
using UnityEngine; public class Trials { public static void Reset() { PlayerPrefs.SetString("Trials", ""); } public static void AddSuccess() { string trials = PlayerPrefs.GetString("Trials"); trials += "S"; while(trials.Length > 100) { trials = trials.Substri...
Convert code to use extension method
using System; using System.Diagnostics; using System.Linq; using System.DoubleNumerics; using JetBrains.Annotations; using SolidworksAddinFramework.OpenGl; using SolidWorks.Interop.sldworks; namespace SolidworksAddinFramework.Geometry { public class BSpline3D : BSpline<Vector4> { public BSpline3D([NotN...
using System; using System.Diagnostics; using System.Linq; using System.DoubleNumerics; using JetBrains.Annotations; using SolidworksAddinFramework.OpenGl; using SolidWorks.Interop.sldworks; namespace SolidworksAddinFramework.Geometry { public class BSpline3D : BSpline<Vector4> { public BSpline3D([NotN...
Set version number of unit tests to be different
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Un...
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTi...
Revert AssemblyVersion to 2.0.0 because there are no breaking changes in this version
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Reflection; using System.Resources; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Microsoft Azure Traffic Manager Management Libra...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Reflection; using System.Resources; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Microsoft Azure Traffic Manager Management Libra...
Fix creating a font with a specific style
using System; using Eto.Drawing; using System.Collections.Generic; using MonoTouch.UIKit; using System.Linq; namespace Eto.Platform.iOS.Drawing { public class FontFamilyHandler : WidgetHandler<object, FontFamily>, IFontFamily { public FontFamilyHandler () { } public FontFamilyHandler (string familyName) {...
using System; using Eto.Drawing; using System.Collections.Generic; using MonoTouch.UIKit; using System.Linq; namespace Eto.Platform.iOS.Drawing { public class FontFamilyHandler : WidgetHandler<object, FontFamily>, IFontFamily { public FontFamilyHandler () { } public FontFamilyHandler (string familyName) {...
Change to using TypeCatalog instead of AssemblyCatalog
using System.ComponentModel.Composition.Hosting; namespace IocPerformance.Adapters { public sealed class MefContainerAdapter : IContainerAdapter { private CompositionContainer container; public void Prepare() { var catalog = new AssemblyCatalog(typeof(Program).Assembly); ...
using System.ComponentModel.Composition.Hosting; namespace IocPerformance.Adapters { public sealed class MefContainerAdapter : IContainerAdapter { private CompositionContainer container; public void Prepare() { var catalog = new TypeCatalog(typeof(Implementation1), typeof(...
Make sure debugger is attached for DebugBreak, otherwise user is prompted to attach a debugger
using System; using System.Collections.Generic; using System.Threading; namespace Bumblebee.Extensions { public static class Debugging { public static T DebugPrint<T>(this T obj) { Console.WriteLine(obj.ToString()); return obj; } public static T DebugPri...
using System; using System.Collections.Generic; using System.Threading; namespace Bumblebee.Extensions { public static class Debugging { public static T DebugPrint<T>(this T obj) { Console.WriteLine(obj.ToString()); return obj; } public static T DebugPri...