Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Fix build for UE4.2 - Add SlateCore as new module dependency
// Copyright (c) 2014 Sebastien Rombauts (sebastien.rombauts@gmail.com) // // Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt // or copy at http://opensource.org/licenses/MIT) using UnrealBuildTool; public class GitSourceControl : ModuleRules { public GitSourceControl(TargetInfo Target) {...
// Copyright (c) 2014 Sebastien Rombauts (sebastien.rombauts@gmail.com) // // Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt // or copy at http://opensource.org/licenses/MIT) using UnrealBuildTool; public class GitSourceControl : ModuleRules { public GitSourceControl(TargetInfo Target) {...
Enable callback test only when url is set
@page @model SupportManager.Web.Pages.User.ApiKeys.ListModel @{ Layout = "/Features/Shared/_Layout.cshtml"; ViewData["Title"] = "API Keys"; } <h2>API Keys</h2> @if (!Model.Data.ApiKeys.Any()) { <div class="jumbotron"> <p> No API keys created yet. </p> <p> ...
@page @model SupportManager.Web.Pages.User.ApiKeys.ListModel @{ Layout = "/Features/Shared/_Layout.cshtml"; ViewData["Title"] = "API Keys"; } <h2>API Keys</h2> @if (!Model.Data.ApiKeys.Any()) { <div class="jumbotron"> <p> No API keys created yet. </p> <p> ...
Use String.Split(...) instead of recreating it.
namespace Fixie.Assertions { using System; using System.Collections.Generic; public class AssertException : Exception { public static string FilterStackTraceAssemblyPrefix = "Fixie.Assertions."; public AssertException(string message) : base(message) { } ...
namespace Fixie.Assertions { using System; using System.Collections.Generic; public class AssertException : Exception { public static string FilterStackTraceAssemblyPrefix = "Fixie.Assertions."; public AssertException(string message) : base(message) { } ...
Load footer image in JavaScript disabled
@model SiteOptions <hr /> <footer> <p> &copy; @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year | <a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information"> Site Status &amp; Uptime </a> | Built from ...
@model SiteOptions <hr /> <footer> <p> &copy; @Model.Metadata.Author.Name @DateTimeOffset.UtcNow.Year | <a id="link-status" href="@Model.ExternalLinks.Status.AbsoluteUri" target="_blank" title="View site uptime information"> Site Status &amp; Uptime </a> | Built from ...
Update for SSL error with site
using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace HackyNewsWeb { public class Global : HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); } } }
using System.Net; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace HackyNewsWeb { public class Global : HttpApplication { protected void Application_Start() { // to account for SSL error ServicePointManager.SecurityProtocol = System.Net.Securi...
Add checking for end of text
using System; namespace LeanGoldfish { public class IsCharacter : ParsingUnit { private char character; public IsCharacter(char character) { this.character = character; } internal override ParsingResult TryParse(string text, int position) { ...
using System; namespace LeanGoldfish { public class IsCharacter : ParsingUnit { private char character; public IsCharacter(char character) { this.character = character; } internal override ParsingResult TryParse(string text, int position) { ...
Improve ABI to work better on x64 (values seems better off passed by value instead of byval*).
using SharpLLVM; namespace SharpLang.CompilerServices { class DefaultABI : IABI { private readonly ContextRef context; private readonly TargetDataRef targetData; private readonly int intPtrSize; public DefaultABI(ContextRef context, TargetDataRef targetData) { ...
using SharpLLVM; namespace SharpLang.CompilerServices { class DefaultABI : IABI { private readonly ContextRef context; private readonly TargetDataRef targetData; private readonly int intPtrSize; public DefaultABI(ContextRef context, TargetDataRef targetData) { ...
Put the null db initializer back in there.
using Data.Mappings; using Domain.Entities; using System.Data.Entity; namespace Data { public class DriversEdContext : DbContext { public DriversEdContext() { // Database.SetInitializer<DriversEdContext>(null); } public DbSet<Driver> Drivers { get; set; } public DbSet<Co...
using Data.Mappings; using Domain.Entities; using System.Data.Entity; namespace Data { public class DriversEdContext : DbContext { public DriversEdContext() { Database.SetInitializer<DriversEdContext>(null); } public DbSet<Driver> Drivers { get; set; } public DbSet<Cours...
Update assembly details for NuGet
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("Mammoth")] [assembly: AssemblyDescription("Convert Word documents from docx to simple HTML")] [as...
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("Mammoth")] [assembly: AssemblyDescription("Convert Word documents from docx to simple HTML")] [as...
Set IndexedAttachments to version 2.0.2.0
using System.Reflection; [assembly: AssemblyTitle("Raven.Bundles.Contrib.IndexedAttachments")] [assembly: AssemblyDescription("Plugin for RavenDB that extracts text from attachments so they can be indexed.")] [assembly: AssemblyVersion("2.0.1.0")] [assembly: AssemblyFileVersion("2.0.1.0")]
using System.Reflection; [assembly: AssemblyTitle("Raven.Bundles.Contrib.IndexedAttachments")] [assembly: AssemblyDescription("Plugin for RavenDB that extracts text from attachments so they can be indexed.")] [assembly: AssemblyVersion("2.0.2.0")] [assembly: AssemblyFileVersion("2.0.2.0")]
Rename retrys token to retries
using StreamCompanionTypes.DataTypes; using StreamCompanionTypes.Enums; using StreamCompanionTypes.Interfaces; using StreamCompanionTypes.Interfaces.Sources; namespace PlaysReplacements { public class PlaysReplacements : IPlugin, ITokensSource { private int Plays, Retrys; private Tokens.TokenS...
using StreamCompanionTypes.DataTypes; using StreamCompanionTypes.Enums; using StreamCompanionTypes.Interfaces; using StreamCompanionTypes.Interfaces.Sources; namespace PlaysReplacements { public class PlaysReplacements : IPlugin, ITokensSource { private int Plays, Retries; private Tokens.Token...
Revert accidental change of the 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; } ...
Advance version number scheme to include pressure regulator gadget.
using System; namespace it.unifi.dsi.stlab.networkreasoner.gas.system.terranova { public class VersioningInfo { public String VersionNumber { get { return "v1.0.1"; } } public String EngineIdentifier { get { return "Network Reasoner, stlab.dsi.unifi.it"; } } } }
using System; namespace it.unifi.dsi.stlab.networkreasoner.gas.system.terranova { public class VersioningInfo { /// <summary> /// Gets the version number. /// /// Here are the stack of versions with a brief description: /// /// v1.1.0: introduce pressure regulator gadget for edges. /// /// v1.0.1:...
Replace Single with SingleOrDefault for Url Reposiory
using System; using System.Collections.Generic; using System.Linq; using UrlShortenerApi.Data; using UrlShortenerApi.Models; namespace UrlShortenerApi.Repositories { public class UrlRepository : IUrlRepository { ApplicationDbContext _context; public UrlRepository(ApplicationDbContext context) ...
using System; using System.Collections.Generic; using System.Linq; using UrlShortenerApi.Data; using UrlShortenerApi.Models; namespace UrlShortenerApi.Repositories { public class UrlRepository : IUrlRepository { ApplicationDbContext _context; public UrlRepository(ApplicationDbContext context) ...
Add validation implementation in recommendations module.
namespace TraktApiSharp.Modules { using Objects.Basic; using Objects.Get.Recommendations; using Requests; using Requests.WithOAuth.Recommendations; using System.Threading.Tasks; public class TraktRecommendationsModule : TraktBaseModule { public TraktRecommendationsModule(TraktClien...
namespace TraktApiSharp.Modules { using Objects.Basic; using Objects.Get.Recommendations; using Requests; using Requests.WithOAuth.Recommendations; using System; using System.Threading.Tasks; public class TraktRecommendationsModule : TraktBaseModule { public TraktRecommendation...
Rework regex to allow whitespace
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Cake...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Cake...
Update to hello support snippet
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 using Amazon.AWSSupport; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace SupportActions; /// <summary> /// Hello AWS Support example. /// </summary> public stat...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 namespace SupportActions; // snippet-start:[Support.dotnetv3.HelloSupport] using Amazon.AWSSupport; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; public static class H...
Remove extra braces at the end of the file
using System; using System.Net.Http; using System.Net.NetworkInformation; using System.Net.Sockets; namespace Healthcheck { internal class Program { private static void Main(string[] args) { var client = new HttpClient(); var port = Environment.GetEnvir...
using System; using System.Net.Http; using System.Net.NetworkInformation; using System.Net.Sockets; namespace Healthcheck { internal class Program { private static void Main(string[] args) { var client = new HttpClient(); var port = Environment.GetEnvironmentVariable("...
Use same null default value when JS is disabled
using System; using System.Web.Mvc; namespace AspNetBrowserLocale.Core { public static class HtmlHelpers { public static MvcHtmlString InitializeLocaleDateTime(this HtmlHelper htmlHelper) { return MvcHtmlString.Create( @"<script> var elements = document.querySelectorAll('[data-...
using System; using System.Web.Mvc; namespace AspNetBrowserLocale.Core { public static class HtmlHelpers { private const string NullValueDisplay = "&mdash;"; public static MvcHtmlString InitializeLocaleDateTime(this HtmlHelper htmlHelper) { return MvcHtmlString.Create(stri...
Remove unnecessary "@" prefix from method argument variable name.
namespace Bakery.Text { using System; public static class StringRemoveExtensions { public static String Remove(this String @string, String @remove) { return @string.Replace(@remove, String.Empty); } } }
namespace Bakery.Text { using System; public static class StringRemoveExtensions { public static String Remove(this String @string, String remove) { if (remove == null) throw new ArgumentNullException(nameof(remove)); return @string.Replace(remove, String.Empty); } } }
Change Demo Trading intervall -> performance
using Main; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DemoTrader { public class StdTraders : Trader { public StdTraders() : base() { } public override string Name { get { return "De...
using Main; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DemoTrader { public class StdTraders : Trader { public StdTraders() : base() { } public override string Name { get { return "De...
Disable authentication with empty access key
using System; using Skylight.Miscellaneous; namespace Skylight { public class InputCodeForRoom { private readonly Out _out; public InputCodeForRoom(Out @out) { _out = @out; } /// <summary> /// Inputs the edit key. /// </summary> ...
using System; using Skylight.Miscellaneous; namespace Skylight { public class InputCodeForRoom { private readonly Out _out; public InputCodeForRoom(Out @out) { _out = @out; } /// <summary> /// Inputs the edit key. /// </summary> ...
Add another RunProject function with args to script.
using System; using System.IO; namespace SikuliSharp { public static class Sikuli { public static ISikuliSession CreateSession() { return new SikuliSession(CreateRuntime()); } public static SikuliRuntime CreateRuntime() { return new SikuliRuntime( new AsyncDuplexStreamsHandlerFactory(), new...
using System; using System.IO; namespace SikuliSharp { public static class Sikuli { public static ISikuliSession CreateSession() { return new SikuliSession(CreateRuntime()); } public static SikuliRuntime CreateRuntime() { return new SikuliRuntime( new AsyncDuplexStreamsHandlerFactory(), new...
Revert "measure time of GetSharedSecret"
using NUnit.Framework; using System.Collections.Generic; using System.Diagnostics; using System.Text; namespace Elliptic.Tests { [Explicit] [TestFixture] public class Curve25519TimingTests { [Test] public void Curve25519_GetPublicKey() { var millis = new List<long>(...
using NUnit.Framework; using System.Collections.Generic; using System.Diagnostics; using System.Text; namespace Elliptic.Tests { [Explicit] [TestFixture] public class Curve25519TimingTests { [Test] public void Curve25519_GetPublicKey() { var millis = new List<long>(...
Update variable names to reflect class name changes
/* * John Hall <john.hall@xjtag.com> * Copyright (c) Midas Yellow Ltd. All rights reserved. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CvsGitConverter { class Program { static void Main(string[] args) { if (args.Length != 1) thr...
/* * John Hall <john.hall@xjtag.com> * Copyright (c) Midas Yellow Ltd. All rights reserved. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CvsGitConverter { class Program { static void Main(string[] args) { if (args.Length != 1) thr...
Fix for missing author info
using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Net; using RestSharp; using Dapper; using DapperExtensions; using WPMGMT.BESScraper.Model; namespace WPMGMT.BESScraper { class Program { static void Main(string[] args) { ...
using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Net; using RestSharp; using Dapper; using DapperExtensions; using WPMGMT.BESScraper.Model; namespace WPMGMT.BESScraper { class Program { static void Main(string[] args) { ...
Check Environment.UserInteractive instead of argument
using System; using System.Linq; using System.ServiceProcess; namespace PolymeliaDeployAgent { using PolymeliaDeploy; using PolymeliaDeploy.Controller; static class Program { /// <summary> /// The main entry point for the application. /// </summary> static void Main(st...
using System; using System.Linq; using System.ServiceProcess; namespace PolymeliaDeployAgent { using PolymeliaDeploy; using PolymeliaDeploy.Controller; static class Program { /// <summary> /// The main entry point for the application. /// </summary> static void Main(st...
Clean up fluent node builder to not leak implementation details
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SassSharp.Ast { public class FluentAstBuilder { private IList<Node> nodes; public FluentAstBuilder() { nodes = new List<Node>(); } ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SassSharp.Ast { public class FluentAstBuilder { private IList<Node> nodes; public FluentAstBuilder() { nodes = new List<Node>(); } ...
Remove work-in progress enum, not presently required.
#if DESKTOP using System; using System.Collections.ObjectModel; namespace Eto.Forms { public interface IMenuItem : IMenu { } public enum MenuItemType { Check, Image, Radio, Separator, } public abstract class MenuItem : BaseAction { protected MenuItem (Generator g, Type type, bool initialize = true)...
#if DESKTOP using System; using System.Collections.ObjectModel; namespace Eto.Forms { public interface IMenuItem : IMenu { } public abstract class MenuItem : BaseAction { protected MenuItem (Generator g, Type type, bool initialize = true) : base(g, type, initialize) { } } public class MenuItemCollec...
Fix use of `ThreadsResponse` (type changed for threads container)
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using System.Threading; using System.Threading.Tasks; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.DebugAdapter.Protocol.R...
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using System.Threading; using System.Threading.Tasks; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.DebugAdapter.Protocol.R...
Revert "Revert "Revert "added try catch, test commit"""
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Core.CrossDomainImagesWeb { public partial class Default : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) { ...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Core.CrossDomainImagesWeb { public partial class Default : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) { ...
Add NUL to invalid characters
using System; namespace Villermen.RuneScapeCacheTools.Extensions { public static class PathExtensions { public static char[] InvalidCharacters = { '/', ':', '"', '*', '?', '>', '<', '|' }; /// <summary> /// Parses the given directory and unifies its format, to be applied to unpred...
using System; namespace Villermen.RuneScapeCacheTools.Extensions { public static class PathExtensions { public static char[] InvalidCharacters = { '/', ':', '"', '*', '?', '>', '<', '|', '\0' }; /// <summary> /// Parses the given directory and unifies its format, to be applied to ...
Update default project to start an engine and tick a few times.
using System; using Ninject; using Ninject.Extensions.Logging; using Ninject.Extensions.Logging.NLog4; using OpenAOE.Engine; namespace OpenAOE { class Program { static void Main(string[] args) { var context = new StandardKernel( new NinjectSettings() ...
using System; using System.Collections.Generic; using Ninject; using Ninject.Extensions.Logging; using Ninject.Extensions.Logging.NLog4; using OpenAOE.Engine; using OpenAOE.Engine.Entity; namespace OpenAOE { class Program { static void Main(string[] args) { var context = new Standa...
Check if column exist in table
using System; using System.Collections.Generic; using OpenQA.Selenium; using OpenQA.Selenium.Remote; namespace Tellurium.MvcPages.WebPages { public class WebTableRow : WebElementCollection<PageFragment> { private readonly IWebElement webElement; private Dictionary<string, int> columnsMap; ...
using System; using System.Collections.Generic; using OpenQA.Selenium; using OpenQA.Selenium.Remote; namespace Tellurium.MvcPages.WebPages { public class WebTableRow : WebElementCollection<PageFragment> { private readonly IWebElement webElement; private Dictionary<string, int> columnsMap; ...
Add Windows auth to service, and authorize to the SpiderCrab Operators group
namespace SpiderCrab.Agent { using Ninject; using Ninject.Web.Common.OwinHost; using Ninject.Web.WebApi.OwinHost; using Owin; using Properties; using System.Reflection; using System.Web.Http; public class Startup { public void Configuration(IAppBuilder app) ...
namespace SpiderCrab.Agent { using Newtonsoft.Json.Serialization; using Ninject; using Ninject.Web.Common.OwinHost; using Ninject.Web.WebApi.OwinHost; using Owin; using Properties; using System; using System.Net; using System.Reflection; using System.Web.Http; ...
Use 3x3x3.vox as default example
using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading.Tasks; using Voxels.SkiaSharp; namespace Voxels.CommandLine { class Program { static void Main(string[] args) { var filename = args.Length == 1 ? args[0] : "monu9.vox"; // "3x3x...
using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading.Tasks; using Voxels.SkiaSharp; namespace Voxels.CommandLine { class Program { static void Main(string[] args) { var filename = args.Length == 1 ? args[0] : "3x3x3.vox"; ...
Fix the expected / actual order to correct the message
using System; using System.IO; using System.Runtime.InteropServices; namespace Dbus { public class ReceivedMessage : IDisposable { private readonly MessageHeader messageHeader; public ReceivedMessage( MessageHeader messageHeader, Decoder decoder ) { ...
using System; using System.IO; using System.Runtime.InteropServices; namespace Dbus { public class ReceivedMessage : IDisposable { private readonly MessageHeader messageHeader; public ReceivedMessage( MessageHeader messageHeader, Decoder decoder ) { ...
Change the deployment structure a bit
using System; using Tamir.SharpSsh; namespace MCloud { public class ScriptDeployment : SSHDeployment { public ScriptDeployment (string local_path) : this (local_path, String.Concat ("/root/", local_path)) { } public ScriptDeployment (string local_path, string remote_path) { LocalScriptPath = local_...
using System; using Tamir.SharpSsh; namespace MCloud { public class ScriptDeployment : PutFileDeployment { public ScriptDeployment (string local) : base (local) { } public ScriptDeployment (string local, string remote_dir) : base (local, remote_dir) { } protected override void RunImpl (Node node,...
Remove NavMeshAgent handling from decision script (not its role)
using UnityEngine; [CreateAssetMenu (menuName = "AI/Decisions/TargetReached")] public class Decision_OnTargetReached : Decision { public bool overrideDistanceToReach; public float distanceToReach; public override bool Decide(StateController controller) { return isTargetReached(controller); } private bool i...
using UnityEngine; [CreateAssetMenu (menuName = "AI/Decisions/TargetReached")] public class Decision_OnTargetReached : Decision { public bool overrideDistanceToReach; public float distanceToReach; public override bool Decide(StateController controller) { return isTargetReached(controller); } private bool i...
Fix correct count 6 -> 7
using System.Linq; using Thinktecture.IdentityServer.Core.Services.Contrib; using Xunit; namespace Unittests { public class AvailableTranslations { [Theory] [InlineData("Default")] [InlineData("pirate")] [InlineData("nb-NO")] [InlineData("tr-TR")] [InlineData("de...
using System.Linq; using Thinktecture.IdentityServer.Core.Services.Contrib; using Xunit; namespace Unittests { public class AvailableTranslations { [Theory] [InlineData("Default")] [InlineData("pirate")] [InlineData("nb-NO")] [InlineData("tr-TR")] [InlineData("de...
Fix MSBuild tests on macOS/Linux
using System.IO; namespace TestUtility { public static class StringExtensions { /// <summary> /// Given a file or directory path, return a path where all directory separators /// are replaced with a forward slash (/) character. /// </summary> public static string Ensure...
using System.IO; namespace TestUtility { public static class StringExtensions { /// <summary> /// Given a file or directory path, return a path where all directory separators /// are replaced with a forward slash (/) character. /// </summary> public static string Ensure...
Add tests for SA1024 in tuple expressions
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. namespace StyleCop.Analyzers.Test.CSharp7.SpacingRules { using Test.SpacingRules; public class SA1024CSharp7UnitTests : SA1024Unit...
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. namespace StyleCop.Analyzers.Test.CSharp7.SpacingRules { using System; using System.Linq; using System.Reflection; using Sy...
Fix names and spelling in comments
using System.Reflection; [assembly: AssemblyCompany("Kentor")] [assembly: AssemblyCopyright("Copyright Kentor and contributors 2015")] // Kentor.AuthServices uses semantic versioning in three parts // // Major Version // Minor Version // Patch Number // // An odd patch number is a development versio...
using System.Reflection; [assembly: AssemblyCompany("Kentor")] [assembly: AssemblyCopyright("Copyright Kentor and contributors 2015")] // Kentor.PU-Adapter uses semantic versioning in three parts // // Major Version // Minor Version // Patch Number // // An odd patch number is a development version,...
Fix AppVeyor message limit by printing a warning for the 501st report message
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Diagnostics.CodeAnalysis; using System.Linq; using JetBrains.Annotations; using Nuke.Common.OutputSinks; namespace Nuke.Common.CI.AppVeyor { [UsedImplic...
// Copyright 2019 Maintainers of NUKE. // Distributed under the MIT License. // https://github.com/nuke-build/nuke/blob/master/LICENSE using System; using System.Diagnostics.CodeAnalysis; using System.Linq; using JetBrains.Annotations; using Nuke.Common.OutputSinks; namespace Nuke.Common.CI.AppVeyor { [UsedImplic...
Switch to using NSWindow instead of presenter
using MonoMac.Foundation; using MonoMac.AppKit; using Cirrious.CrossCore; using Cirrious.MvvmCross.Mac.Platform; using Cirrious.MvvmCross.Mac.Views.Presenters; using Cirrious.MvvmCross.ViewModels; using System.Drawing; namespace Pina.Mac { public partial class AppDelegate : MvxApplicationDelegate { MainWindowContr...
using MonoMac.Foundation; using MonoMac.AppKit; using Cirrious.CrossCore; using Cirrious.MvvmCross.Mac.Platform; using Cirrious.MvvmCross.Mac.Views.Presenters; using Cirrious.MvvmCross.ViewModels; using System.Drawing; namespace Pina.Mac { public partial class AppDelegate : MvxApplicationDelegate { MainWindowContr...
Check when internet connection is disabled
namespace VkApiGenerator.Console { class Program { static void Main(string[] args) { var methods = new[] { "notes.get", "notes.getById", "notes.getFriendsNotes", "notes.add", "notes.edit", ...
using System.Net; using VkApiGenerator.Model; namespace VkApiGenerator.Console { class Program { static void Main(string[] args) { var methods = new[] { "notes.get", "notes.getById", "notes.getFriendsNotes", ...
Add coroutine usage in AEX
using UnityEngine; using System.Collections; using ActionEngine; public static class VeryAwesomeAEX { public static ActionBase Create (IAEScriptContext ctx) { var simpleAEX = ctx.GetAEScript("$simple"); var cube = ctx.GetTransform("$cube"); var sphere = ctx.GetTransform("$sphere"); return AE.Sequence( ...
using ActionEngine; using System.Collections; using UnityEngine; public static class VeryAwesomeAEX { public static ActionBase Create (IAEScriptContext ctx) { var simpleAEX = ctx.GetAEScript("$simple"); var cube = ctx.GetTransform("$cube"); var sphere = ctx.GetTransform("$sphere"); return AE.Sequence( ...
Add ability to return token from rule
namespace slang.Lexing.Rules.Core { public abstract class Rule { public static Rule operator | (Rule left, Rule right) { return new Or (left, right); } public static Rule operator + (Rule left, Rule right) { return new And (left, right); ...
using slang.Lexing.Tokens; using System; namespace slang.Lexing.Rules.Core { public abstract class Rule { public Func<Token> TokenCreator { get; set; } public static Rule operator | (Rule left, Rule right) { return new Or (left, right); } public static Rule...
Add MVC and middleware to listening only for 'api' requests
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; namespace TodoList.Web { public class Startup { // T...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using System.IO; namespace TodoList.Web { public class Startup ...
Mark the playback states with integer values
namespace Espera.Network { public enum NetworkPlaybackState { None, Playing, Paused, Stopped, Finished } }
namespace Espera.Network { public enum NetworkPlaybackState { None = 0, Playing = 1, Paused = 2, Stopped = 3, Finished = 4 } }
Check the use of default(T) instead exception.
using NUnit.Framework; using System; using System.Collections.Generic; namespace NHibernate.Test.NHSpecificTest.NH1119 { [TestFixture] public class Fixture : BugTestCase { public override string BugNumber { get { return "NH1119"; } } [Test] public void SelectMinFromEmptyTable() { ...
using System; using NUnit.Framework; namespace NHibernate.Test.NHSpecificTest.NH1119 { [TestFixture] public class Fixture : BugTestCase { public override string BugNumber { get { return "NH1119"; } } [Test] public void SelectMinFromEmptyTable() { using (ISession s = OpenSession())...
Set the detail instead of the title
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using static Hellang.Middleware.ProblemDetails.ProblemDetailsOptionsSetup; using MvcProblemDetails = Microsoft.AspNetCore.Mvc.ProblemDetails; using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory; namespace...
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using static Hellang.Middleware.ProblemDetails.ProblemDetailsOptionsSetup; using MvcProblemDetails = Microsoft.AspNetCore.Mvc.ProblemDetails; using MvcProblemDetailsFactory = Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory; namespace...
Fix missing logger by moving the expanded detail to the exception
using System; using System.Collections.Generic; using System.IO; public class ConfigFileFinder { public static List<string> FindWeaverConfigs(string solutionDirectoryPath, string projectDirectory) { var files = new List<string>(); var solutionConfigFilePath = Path.Combine(solutionDirectoryPath...
using System; using System.Collections.Generic; using System.IO; public class ConfigFileFinder { public static List<string> FindWeaverConfigs(string solutionDirectoryPath, string projectDirectory) { var files = new List<string>(); var solutionConfigFilePath = Path.Combine(solutionDirectoryPath...
Change LinterVersion output to json format
namespace Linterhub.Cli.Strategy { using Runtime; using Engine; using Linterhub.Engine.Exceptions; public class LinterVersionStrategy : IStrategy { public object Run(RunContext context, LinterFactory factory, LogManager log) { if (string.IsNullOrEmpty(context.Linter)) ...
namespace Linterhub.Cli.Strategy { using Runtime; using Engine; using Linterhub.Engine.Exceptions; using Newtonsoft.Json; using System.Dynamic; public class LinterVersionStrategy : IStrategy { public object Run(RunContext context, LinterFactory factory, LogManager log) { ...
Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0.
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.34003 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generate...
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18051 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generate...
Add back test cleanup before run
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using osu.Framework.Platform; using osu.Framework.Testing; namespace osu.Game.Tests.Visual { public abstract class OsuTestCase : TestCase ...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using osu.Framework.Platform; using osu.Framework.Testing; namespace osu.Game.Tests.Visual { public abstract class OsuTestCase : TestCase ...
Fix sidereal calculations for sun
using System; namespace LunaClient.Extensions { public static class CelestialBodyExtension { public static double SiderealDayLength(this CelestialBody body) { //Taken from CelestialBody.Start() if (body == null) return 0; var siderealOrbitalPeriod = 6.2831...
using System; namespace LunaClient.Extensions { public static class CelestialBodyExtension { public static double SiderealDayLength(this CelestialBody body) { //Taken from CelestialBody.Start() //body.solarRotationPeriod will be false if it's the sun! if (b...
Use Smtp PickUp delivery for stubbing saving of emails locally
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Mail; using System.Text; using System.Web; using VORBS.Utils.interfaces; namespace VORBS.Utils { public class StubbedEmailClient : ISmtpClient { private NLog.Logger _logger; public StubbedEmai...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Mail; using System.Text; using System.Web; using VORBS.Utils.interfaces; namespace VORBS.Utils { public class StubbedEmailClient : ISmtpClient { private NLog.Logger _logger; public StubbedEmai...
Add Google Plus +1 to AddThis defaults
@using CkanDotNet.Web.Models.Helpers <!-- AddThis Button BEGIN --> <div class="share-buttons"> <div class="addthis_toolbox addthis_default_style "> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_butt...
@using CkanDotNet.Web.Models.Helpers <!-- AddThis Button BEGIN --> <div class="share-buttons"> <div class="addthis_toolbox addthis_default_style "> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_butt...
Implement proper disposable pattern to satisfy sonarcloud's compaint of a code smell :/
/* © 2019 Ivan Pointer MIT License: https://github.com/ivanpointer/NuLog/blob/master/LICENSE Source on GitHub: https://github.com/ivanpointer/NuLog */ using NuLog.Configuration; using NuLog.LogEvents; using System; namespace NuLog.CLI.Benchmarking { /// <summary> /// A dummy target for performance testing -...
/* © 2019 Ivan Pointer MIT License: https://github.com/ivanpointer/NuLog/blob/master/LICENSE Source on GitHub: https://github.com/ivanpointer/NuLog */ using NuLog.Configuration; using NuLog.LogEvents; using System; namespace NuLog.CLI.Benchmarking { /// <summary> /// A dummy target for performance testing -...
Remove usage of legacy code
#region Usings using System; using System.Collections.Generic; using System.Windows.Input; using ReactiveUI.Legacy; using UI.WPF.Launcher.Common.Classes; #endregion namespace UI.WPF.Modules.Installation.ViewModels.Installation { public class InstallationViewModel : ReactiveObjectBase { private Insta...
#region Usings using System; using System.Collections.Generic; using System.Windows.Input; using ReactiveUI; using UI.WPF.Launcher.Common.Classes; #endregion namespace UI.WPF.Modules.Installation.ViewModels.Installation { public class InstallationViewModel : ReactiveObjectBase { private Installation...
Use file name as the name of a Cursor Set
using System.Collections.Generic; using System.Linq; using Alensia.Core.Common; using UnityEngine; namespace Alensia.Core.UI.Cursor { public class CursorSet : ScriptableObject, IDirectory<CursorDefinition>, IEditorSettings { protected IDictionary<string, CursorDefinition> CursorMap { ...
using System.Collections.Generic; using System.Linq; using Alensia.Core.Common; using UnityEngine; namespace Alensia.Core.UI.Cursor { public class CursorSet : ScriptableObject, INamed, IDirectory<CursorDefinition>, IEditorSettings { public string Name => name; protected IDictionary<string, Cur...
Fix new lines in console
using System; using System.Drawing; using System.IO; using System.Text; using System.Windows.Forms; namespace GUI.Utils { internal class ConsoleTab { internal class MyLogger : TextWriter { private TextBox control; public MyLogger(TextBox control) { ...
using System; using System.Drawing; using System.IO; using System.Text; using System.Windows.Forms; namespace GUI.Utils { internal class ConsoleTab { internal class MyLogger : TextWriter { private TextBox control; public MyLogger(TextBox control) { ...
Modify DialogsPage to allow testing of startup location.
using Avalonia.Controls; using Avalonia.Markup.Xaml; #pragma warning disable 4014 namespace ControlCatalog.Pages { public class DialogsPage : UserControl { public DialogsPage() { this.InitializeComponent(); this.FindControl<Button>("OpenFile").Click += delegate ...
using Avalonia.Controls; using Avalonia.Markup.Xaml; #pragma warning disable 4014 namespace ControlCatalog.Pages { public class DialogsPage : UserControl { public DialogsPage() { this.InitializeComponent(); this.FindControl<Button>("OpenFile").Click += delegate ...
Add copyright to one more .cs source file.
namespace ShoutLib { internal class Constants { public const string ProjectId = "YOUR-PROJECT-ID"; public const string ServiceAccountEmail = "YOUR-SERVICE-ACCOUNT@developer.gserviceaccount.com"; public const string ServiceAccountP12KeyPath = @"C:\PATH\TO\YOUR\FILE.p12"; pu...
// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by a...
Add a timer and log to sms sending
using CertiPay.Common.Logging; using System; using System.Threading.Tasks; using Twilio; namespace CertiPay.Common.Notifications { /// <summary> /// Send an SMS message to the given recipient. /// </summary> /// <remarks> /// Implementation may be sent into background processing. /// </remarks...
using CertiPay.Common.Logging; using System; using System.Threading.Tasks; using Twilio; namespace CertiPay.Common.Notifications { /// <summary> /// Send an SMS message to the given recipient. /// </summary> /// <remarks> /// Implementation may be sent into background processing. /// </remarks...
Fix support for input and fix some bugs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IPOCS_Programmer.ObjectTypes { public class GenericInput : BasicObject { public override byte objectTypeId { get { return 11; } } public byte inputPin { get; set; } ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IPOCS_Programmer.ObjectTypes { public class GenericInput : BasicObject { public override byte objectTypeId { get { return 11; } } public byte inputPin { get; set; } ...
Comment out the sample tests
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xunit; using System.IO; namespace ParkingSpace.Facts.Sample { public class SampleFileFacts { public static IEnumerable<object[]> getFilesFromCurrentFolder() { var di = new DirectoryI...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xunit; using System.IO; namespace ParkingSpace.Facts.Sample { public class SampleFileFacts { public static IEnumerable<object[]> getFilesFromCurrentFolder() { var di = new DirectoryI...
Save all the lines of code!
using ReactiveMarrow; using System; using System.Reactive.Disposables; using System.Reactive.Linq; namespace Espera.Core { internal static class ReactiveHelpers { /// <summary> /// Takes the left observable and combines it with the latest value of the right observable. /// This method ...
using ReactiveMarrow; using System; using System.Reactive.Disposables; using System.Reactive.Linq; namespace Espera.Core { internal static class ReactiveHelpers { /// <summary> /// Takes the left observable and combines it with the latest value of the right observable. /// This method ...
Add license to new unit test class file
using Microsoft.VisualStudio.TestTools.UnitTesting; namespace UnitTestUsefullFunctions { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { Assert.IsTrue(true); } } }
/* The MIT License(MIT) Copyright(c) 2015 Freddy Juhel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, pub...
Set property item as localizable only if Localizable attribute value is true
using Serenity.ComponentModel; using Serenity.Data; using System; using System.ComponentModel; using System.Reflection; namespace Serenity.PropertyGrid { public partial class LocalizablePropertyProcessor : PropertyProcessor { private ILocalizationRowHandler localizationRowHandler; ...
using Serenity.ComponentModel; using Serenity.Data; using System; using System.ComponentModel; using System.Reflection; namespace Serenity.PropertyGrid { public partial class LocalizablePropertyProcessor : PropertyProcessor { private ILocalizationRowHandler localizationRowHandler; ...
Improve persistent session client test
using Microsoft.VisualStudio.TestTools.UnitTesting; using RohlikAPI; namespace RohlikAPITests { [TestClass] public class PersistentSessionHttpClientTests { [TestMethod] public void GetTest() { const string testCookieName = "testCookieName"; const string test...
using Microsoft.VisualStudio.TestTools.UnitTesting; using RohlikAPI; namespace RohlikAPITests { [TestClass] public class PersistentSessionHttpClientTests { [TestMethod] public void HTTPGet_PersistsCookies() { const string testCookieName = "testCookieName"; c...
Check parameters and add friendly exceptions.
using System; using System.Linq; namespace MQTTnet.Extensions { public static class UserPropertyExtension { public static string GetUserProperty(this MqttApplicationMessage message, string propertyName, StringComparison comparisonType = StringComparison.OrdinalIgnoreCase) { return m...
using System; using System.Linq; namespace MQTTnet.Extensions { public static class UserPropertyExtension { public static string GetUserProperty(this MqttApplicationMessage message, string propertyName, StringComparison comparisonType = StringComparison.OrdinalIgnoreCase) { if (mess...
Fix new unit test to fail if it does not throw properly
// ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- using System; using System.Linq; using Microsoft.WindowsAzure.MobileServices.Test.Functional; us...
// ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- using System; using System.Linq; using Microsoft.WindowsAzure.MobileServices.Test.Functional; us...
Fix fault in context menu
// Copyright (c) 2013 Blue Onion Software - All rights reserved using System.Windows.Documents; using System.Windows.Input; using tweetz5.Model; namespace tweetz5.Controls { public partial class Timeline { public TimelineController Controller { get; private set; } public Timeline...
// Copyright (c) 2013 Blue Onion Software - All rights reserved using System.Windows; using System.Windows.Input; using tweetz5.Model; namespace tweetz5.Controls { public partial class Timeline { public TimelineController Controller { get; private set; } public Timeline() ...
Add the col class. (It move the button to the right a little)
@using AnlabMvc.Controllers @model AnlabMvc.Controllers.AdminAnalysisController.AnalysisDeleteModel @{ ViewBag.Title = "Delete Analysis Method"; } <div> <hr /> <h3>Are you sure you want to delete this?</h3> <dl class="dl-horizontal"> <dt> @Html.DisplayNameFor(model => model.An...
@using AnlabMvc.Controllers @model AnlabMvc.Controllers.AdminAnalysisController.AnalysisDeleteModel @{ ViewBag.Title = "Delete Analysis Method"; } <div class="col"> <hr /> <h3>Are you sure you want to delete this?</h3> <dl class="dl-horizontal"> <dt> @Html.DisplayNameFor(model...
Remove errant comment on calc type
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace CertiPay.Payroll.Common { /// <summary> /// Identifies the method to calculate the result /// </summary> public enum CalculationType : byte { // TODO: We might implement some other calculation methods ...
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace CertiPay.Payroll.Common { /// <summary> /// Identifies the method to calculate the result /// </summary> public enum CalculationType : byte { /// <summary> /// Deduction is taken as a percentag...
Format available channels for Limit attribute
using Discord.Commands; using System; using System.Linq; using System.Threading.Tasks; namespace Modix.Utilities { public class LimitToChannelsAttribute : PreconditionAttribute { public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IDependencyMap map)...
using Discord.Commands; using System; using System.Linq; using System.Threading.Tasks; namespace Modix.Utilities { public class LimitToChannelsAttribute : PreconditionAttribute { public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IDependencyMap map)...
Fix typo that broke the build
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("Cs...
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("Cs...
Hide connect password from logs.
namespace MQTTnet.Packets { public class MqttConnectPacket : MqttBasePacket { public string ProtocolName { get; set; } public byte? ProtocolLevel { get; set; } public string ClientId { get; set; } public string Username { get; set; } public string Password { get; set...
namespace MQTTnet.Packets { public class MqttConnectPacket : MqttBasePacket { public string ProtocolName { get; set; } public byte? ProtocolLevel { get; set; } public string ClientId { get; set; } public string Username { get; set; } public string Password { get; set...
Support for IP address URLs
using System; using System.Collections.Generic; using System.IO; namespace MultiMiner.Win.Extensions { static class StringExtensions { private readonly static Dictionary<string, string> hostDomainNames = new Dictionary<string, string>(); public static string DomainFromHost(this string host) ...
using System; using System.Collections.Generic; using System.IO; namespace MultiMiner.Win.Extensions { static class StringExtensions { private readonly static Dictionary<string, string> hostDomainNames = new Dictionary<string, string>(); public static string DomainFromHost(this string host) ...
Clean commented code and a tiny optimization to return false if the value is null.
using System; using System.Linq; using System.Linq.Expressions; using System.Collections.Generic; namespace ServiceStack.OrmLite { public static class Sql { //public static bool In<T>(T value, IList<Object> list) //{ // foreach (Object obj in list) // { // if (obj == null || value == null)...
using System; using System.Linq; using System.Linq.Expressions; using System.Collections.Generic; namespace ServiceStack.OrmLite { public static class Sql { public static bool In<T>(T value, params object[] list) { if(value == null) return false; foreach (var obj in list) { if (obj == null)...
Add heardbeat file to server
using Anotar.NLog; using Ninject; using Ninject.Extensions.Factory; using SOVND.Lib; using System; using System.Text; using SOVND.Lib.Handlers; using SOVND.Lib.Models; using SOVND.Server.Settings; using System.Threading; using System.Linq; using SOVND.Server.Handlers; namespace SOVND.Server { class Program { ...
using Anotar.NLog; using Ninject; using Ninject.Extensions.Factory; using SOVND.Lib; using System; using System.Text; using SOVND.Lib.Handlers; using SOVND.Lib.Models; using SOVND.Server.Settings; using System.Threading; using System.Linq; using SOVND.Server.Handlers; using System.IO; using SOVND.Lib.Utils; namespace...
Use better formatting for skin display (matching BeatmapMetadata)
// 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.Game.Configuration; using osu.Game.Database; namespace osu.Game.Skinning { public class SkinInfo : IHasFil...
// 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.Game.Configuration; using osu.Game.Database; namespace osu.Game.Skinning { public class SkinInfo : IHasFil...
Use autofixture for unit tests of the command bus.
using System; using Microsoft.Practices.ServiceLocation; using Moq; using NUnit.Framework; using Uncas.BuildPipeline.Commands; using Uncas.BuildPipeline.Repositories; using Uncas.BuildPipeline.Utilities; namespace Uncas.BuildPipeline.Tests.Unit { [TestFixture] public class CommandBusTests { [Test]...
using Microsoft.Practices.ServiceLocation; using Microsoft.Practices.Unity; using Moq; using NUnit.Framework; using Ploeh.AutoFixture; using Uncas.BuildPipeline.Commands; namespace Uncas.BuildPipeline.Tests.Unit { [TestFixture] public class CommandBusTests : WithFixture<CommandBus> { [Test] ...
Add read only props to access RVA and size
using System; using System.IO; namespace dot10.PE { /// <summary> /// Represents the IMAGE_DATA_DIRECTORY PE section /// </summary> public class ImageDataDirectory : FileSection { RVA virtualAddress; uint dataSize; /// <summary> /// Default constructor /// </summary> public ImageDataDirectory() { }...
using System; using System.IO; namespace dot10.PE { /// <summary> /// Represents the IMAGE_DATA_DIRECTORY PE section /// </summary> public class ImageDataDirectory : FileSection { RVA virtualAddress; uint dataSize; /// <summary> /// Returns the IMAGE_DATA_DIRECTORY.VirtualAddress field /// </summary> ...
Improve the way Booleans are shown if they are not within the maximum allowable limit
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NeuralNet.Configuration; namespace NeuralNetTypes { class NeuralNetBooleanFormatter : NetInputOutputFormatter { private const double high = 0.9, low = 0.1, maxError = 0.1; ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NeuralNet.Configuration; namespace NeuralNetTypes { class NeuralNetBooleanFormatter : NetInputOutputFormatter { private const double high = 0.9, low = 0.1, maxError = 0.1; ...
Fix null ref error if bfgminer returns no Status w / the devs API
namespace MultiMiner.Xgminer.Api { public class DeviceInformation { public string Kind { get; set; } public int Index { get; set; } public bool Enabled { get; set; } public string Status { get; set; } public double Temperature { get; set; } public int FanSpeed { ...
using System; namespace MultiMiner.Xgminer.Api { public class DeviceInformation { public DeviceInformation() { Status = String.Empty; } public string Kind { get; set; } public int Index { get; set; } public bool Enabled { get; set; } public s...
Remove overload by using default value
using System.Collections.Generic; namespace DiffPlex.DiffBuilder.Model { public enum ChangeType { Unchanged, Deleted, Inserted, Imaginary, Modified } public class DiffPiece { public ChangeType Type { get; set; } public int? Position { get; s...
using System.Collections.Generic; namespace DiffPlex.DiffBuilder.Model { public enum ChangeType { Unchanged, Deleted, Inserted, Imaginary, Modified } public class DiffPiece { public ChangeType Type { get; set; } public int? Position { get; s...
Add more detail in documentation comment.
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rock { /// <summary> /// An implementation of <see cref="IApplicationInfo"/> that uses a config /// file's appSettings section. /// </summary> p...
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rock { /// <summary> /// An implementation of <see cref="IApplicationInfo"/> that uses a config /// file's appSettings section. /// </summary> p...
Check if we're in debug and set IncludeErrorPolicy accordingly
using System.Web.Http; using System.Web.Http.Controllers; using System.Web.Http.Filters; namespace Umbraco.Web.WebApi { /// <summary> /// Ensures controllers have detailed error messages even when debug mode is off /// </summary> public class EnableDetailedErrorsAttribute : ActionFilterAttribute {...
using System.Web; using System.Web.Http; using System.Web.Http.Controllers; using System.Web.Http.Filters; namespace Umbraco.Web.WebApi { /// <summary> /// Ensures controllers have detailed error messages even when debug mode is off /// </summary> public class EnableDetailedErrorsAttribute : ActionFil...
Change the HttpUtility.UrlEncode to Uri.EscapeDataString method.
using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; namespace Exceptionless.Core.Extensions { public static class UriExtensions { public static string ToQueryString(this NameValueCollection collection) { return collection.AsKeyValuePairs().T...
using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; namespace Exceptionless.Core.Extensions { public static class UriExtensions { public static string ToQueryString(this NameValueCollection collection) { return collection.AsKeyValuePairs().T...
Fix issue with API header binding when running under a subdirectory
using System; using System.Web.Mvc; namespace NuGetGallery { public class HttpHeaderValueProviderFactory : ValueProviderFactory { public override IValueProvider GetValueProvider(ControllerContext controllerContext) { var request = controllerContext.RequestContext.HttpContext.Reques...
using System; using System.Web.Mvc; namespace NuGetGallery { public class HttpHeaderValueProviderFactory : ValueProviderFactory { public override IValueProvider GetValueProvider(ControllerContext controllerContext) { var request = controllerContext.RequestContext.HttpContext.Reques...
Make necrophage require Look faculty
using UnityEngine; using System.Collections; using System.Collections.Generic; public class NecrophageBehavior : AgentBehavior { // "pursue" nearest corpse public override bool updatePlan(List<AgentPercept> percepts, int allottedWorkUnits) { Action newMoveAction; Action newLookAction; Agent tempAgent; boo...
using UnityEngine; using System.Collections; using System.Collections.Generic; public class NecrophageBehavior : AgentBehavior { // "pursue" nearest corpse public override bool updatePlan(List<AgentPercept> percepts, int allottedWorkUnits) { Action newMoveAction; Action newLookAction; Agent tempAgent; boo...
Add check for microgames when forced in Practice
using System.Collections; using System.Collections.Generic; using UnityEngine; public class MicrogameStage : Stage { public static string microgameId; [SerializeField] private string forceMicrogame; public override Microgame getMicrogame(int num) { Microgame microgame = new Microgame(microgameId); microgam...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class MicrogameStage : Stage { public static string microgameId; [SerializeField] private string forceMicrogame; public override void onStageStart() { //Update collection if microgame is forced, in case it's in ...
Refactor the Venue level cost centre to inherit from the Account level cost centre to allow sharing of data structures.
using Newtonsoft.Json; namespace Ivvy.API.Venue { public class CostCenter { public enum DefaultTypes { Other = 1, VenueFood = 2, VenueBeverage = 3, VenueAudioVisual = 4, VenueRoomHire = 5, VenueAccommodation = 6, } ...
using Newtonsoft.Json; namespace Ivvy.API.Venue { public class CostCenter : Account.CostCenter { [JsonProperty("parentId")] public int? ParentId { get; set; } } }
Add Maximum/Average aggregate functions for amplitudes
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE namespace osu.Framework.Audio.Track { public struct TrackAmplitudes { public float LeftChannel; public float RightChannel; ...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using System; namespace osu.Framework.Audio.Track { public struct TrackAmplitudes { public float LeftChannel; public float R...
Add source documentation for configuration class.
namespace TraktApiSharp.Core { using System.Net.Http; public class TraktConfiguration { internal TraktConfiguration() { ApiVersion = 2; UseStagingUrl = false; } internal static HttpClient HTTP_CLIENT = null; public int ApiVersion { get; set...
namespace TraktApiSharp.Core { using System.Net.Http; /// <summary>Provides global client settings.</summary> public class TraktConfiguration { internal TraktConfiguration() { ApiVersion = 2; UseStagingUrl = false; } internal static HttpClient H...
Add info to addin description about uninstalling old addin
using Mono.Addins; [assembly:Addin ("Dnx", Namespace = "MonoDevelop", Version = "0.5", Category = "IDE extensions")] [assembly:AddinName ("DNX")] [assembly:AddinDescription ("Adds .NET Core and ASP.NET Core support.")] [assembly:AddinDependency ("Core", "6.0")] [assembly:AddinDependency ("Ide", "6.0")] [assembly...
using Mono.Addins; [assembly:Addin ("Dnx", Namespace = "MonoDevelop", Version = "0.5", Category = "IDE extensions")] [assembly:AddinName ("DNX")] [assembly:AddinDescription ("Adds .NET Core and ASP.NET Core support.\n\nPlease uninstall any older version of the addin and restart the application before installing t...
Add more shell unit test
using System.IO; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace LiteDB.Tests.Engine { [TestClass] public class Shell_Tests { [TestMethod] public void Shell_Commands() { using (var db = new LiteEngine(new MemoryStream())) { ...
using System.IO; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace LiteDB.Tests.Engine { [TestClass] public class Shell_Tests { [TestMethod] public void Shell_Commands() { using (var db = new LiteEngine(new MemoryStream())) { ...