Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Fix formatting of table load errors | using System;
using Rant.Localization;
namespace Rant.Vocabulary
{
/// <summary>
/// Thrown when Rant encounters an error while loading a dictionary table.
/// </summary>
public sealed class RantTableLoadException : Exception
{
internal RantTableLoadException(string origin, int line, int col, string messageTy... | using System;
using Rant.Localization;
namespace Rant.Vocabulary
{
/// <summary>
/// Thrown when Rant encounters an error while loading a dictionary table.
/// </summary>
public sealed class RantTableLoadException : Exception
{
internal RantTableLoadException(string origin, int line, int col, string messageTy... |
Update default publishing url to point to v2 feed. | using System;
namespace NuGet
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "https://go.microsoft.com/fwlink/?LinkID=230477";
public static readonly string V1FeedUrl = "https://go.microsoft.com/fwlink/?LinkID=206669";
public static read... | using System;
namespace NuGet
{
public static class NuGetConstants
{
public static readonly string DefaultFeedUrl = "https://go.microsoft.com/fwlink/?LinkID=230477";
public static readonly string V1FeedUrl = "https://go.microsoft.com/fwlink/?LinkID=206669";
public static read... |
Allow message TimeStamp to be set when deserializing | using System;
namespace JustSaying.Models
{
public abstract class Message
{
protected Message()
{
TimeStamp = DateTime.UtcNow;
Id = Guid.NewGuid();
}
public Guid Id { get; set; }
public DateTime TimeStamp { get; private set; }
public stri... | using System;
namespace JustSaying.Models
{
public abstract class Message
{
protected Message()
{
TimeStamp = DateTime.UtcNow;
Id = Guid.NewGuid();
}
public Guid Id { get; set; }
public DateTime TimeStamp { get; set; }
public string Raisi... |
Revert "registration of api controllers fixed" | using System.Reflection;
using System.Web.Http;
using Autofac;
using Autofac.Integration.WebApi;
namespace ReSharperTnT
{
public class Bootstrapper
{
public static void Init()
{
var bootstrapper = new Bootstrapper();
var container = bootstrapper.CreateContainer();
... | using System.Web.Http;
using Autofac;
using Autofac.Integration.WebApi;
namespace ReSharperTnT
{
public class Bootstrapper
{
static Bootstrapper()
{
Init();
}
public static void Init()
{
var bootstrapper = new Bootstrapper();
var con... |
Fix possible cause of null bytes in config file | using System;
using System.IO;
using System.Runtime.InteropServices;
namespace SyncTrayzor.Utils
{
public class AtomicFileStream : FileStream
{
private const string DefaultTempFileSuffix = ".tmp";
private readonly string path;
private readonly string tempPath;
public AtomicFi... | using System;
using System.IO;
using System.Runtime.InteropServices;
namespace SyncTrayzor.Utils
{
public class AtomicFileStream : FileStream
{
private const string DefaultTempFileSuffix = ".tmp";
private readonly string path;
private readonly string tempPath;
public AtomicFi... |
Apply policy when loading reflection only assemblys | using System;
using System.IO;
using System.Reflection;
namespace ApiCheck.Loader
{
public sealed class AssemblyLoader : IDisposable
{
public AssemblyLoader()
{
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += CurrentDomainOnReflectionOnlyAssemblyResolve;
}
public void Dispose()
... | using System;
using System.IO;
using System.Reflection;
namespace ApiCheck.Loader
{
public sealed class AssemblyLoader : IDisposable
{
public AssemblyLoader()
{
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += CurrentDomainOnReflectionOnlyAssemblyResolve;
}
public void Dispose()
... |
Use single arrow character for backspace. |
using Android.Content;
using Android.Views;
using Android.Widget;
namespace Calculator.Droid
{
public class ButtonAdapter : BaseAdapter
{
Context context;
string[] buttons = new string[] {
"<-", "C", "±", "/",
"7", "8", "9", "*",
"4", "5", "6", "-",
"1", "2", "3", "+",
"0", ".", null, "="
};
... |
using Android.Content;
using Android.Views;
using Android.Widget;
namespace Calculator.Droid
{
public class ButtonAdapter : BaseAdapter
{
Context context;
string[] buttons = new string[] {
"←", "C", "±", "/",
"7", "8", "9", "*",
"4", "5", "6", "-",
"1", "2", "3", "+",
"0", ".", null, "="
};
... |
Update server side API for single multiple answer question | using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepository ... | using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepository ... |
Update param name to match IWebHookHandler | using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.WebHooks;
using Newtonsoft.Json.Linq;
namespace GenericReceivers.WebHooks
{
public class GenericJsonWebHookHandler : WebHookHandler
{
public GenericJsonWebHookHandler()
{
this.Receiver = "genericjson";
... | using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.WebHooks;
using Newtonsoft.Json.Linq;
namespace GenericReceivers.WebHooks
{
public class GenericJsonWebHookHandler : WebHookHandler
{
public GenericJsonWebHookHandler()
{
this.Receiver = "genericjson";
... |
Revert "remove a suppression no longer needed" | using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE0071:Simplify interpolation", Justification = "IDE0071 considerably decreases the performance of string construction")]
| using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE0071:Simplify interpolation", Justification = "IDE0071 considerably decreases the performance of string construction")]
[assembly: SuppressMessage("Style", "IDE0071WithoutSuggestion")]
|
Make NP file exception class public | using System;
namespace NPSharp.NP
{
internal class NpFileException : Exception
{
internal NpFileException(int error)
: base(error == 1 ? @"File not found on NP server" : @"Internal error on NP server")
{
}
internal NpFileException()
: base(@"Could not ... | using System;
namespace NPSharp.NP
{
public class NpFileException : Exception
{
internal NpFileException(int error)
: base(error == 1 ? @"File not found on NP server" : @"Internal error on NP server")
{
}
internal NpFileException()
: base(@"Could not fe... |
Add virtual property to album model | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Bravo.Models {
public class Album {
[Required]
public int AlbumId { get; set; }
[Required, MaxLength(255), Display(Name = "Title")]
public string AlbumName { get; set; }
[Required]
public int GenreId { get; set; }
... | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Bravo.Models {
public class Album {
[Required]
public int AlbumId { get; set; }
[Required, MaxLength(255), Display(Name = "Title")]
public string AlbumName { get; set; }
[Required]
public int GenreId { get; set; }
... |
Remove obsolete send message method | using System;
using MessageBird.Objects;
using MessageBird.Resources;
using MessageBird.Net;
namespace MessageBird
{
public class Client
{
private IRestClient restClient;
private Client(IRestClient restClient)
{
this.restClient = restClient;
}
public static... | using System;
using MessageBird.Objects;
using MessageBird.Resources;
using MessageBird.Net;
namespace MessageBird
{
public class Client
{
private IRestClient restClient;
private Client(IRestClient restClient)
{
this.restClient = restClient;
}
public static... |
Refactor from RaceType to DerbyType | using System;
using System.ComponentModel.DataAnnotations;
using Derby.Infrastructure;
namespace Derby.Models
{
public class Competition
{
public int Id { get; set; }
public int PackId { get; set; }
public string Title { get; set; }
public string Location { get; set; }
... | using System;
using System.ComponentModel.DataAnnotations;
using Derby.Infrastructure;
namespace Derby.Models
{
public class Competition
{
public int Id { get; set; }
public int PackId { get; set; }
public string Title { get; set; }
public string Location { get; set; }
... |
Allow to encode/decode the registry | using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using BabelMark;
using Newtonsoft.Json;
namespace EncryptApp
{
class Program
{
static int Main(string[] args)
{
if (args.Length !=... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using BabelMark;
using Newtonsoft.Json;
namespace EncryptApp
{
class Program
{
static int Main(string[] args)
{
if (args.Length !=... |
Switch to FirefoxDriver due to instability of PhantomJS headless testing. | using System;
using OpenQA.Selenium.PhantomJS;
using OpenQA.Selenium.Remote;
namespace ExpressiveAnnotations.MvcWebSample.UITests
{
public class DriverFixture : IDisposable
{
public DriverFixture() // called before every test class
{
var service = PhantomJSDriverService.CreateDefau... | using System;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.PhantomJS;
using OpenQA.Selenium.Remote;
namespace ExpressiveAnnotations.MvcWebSample.UITests
{
public class DriverFixture : IDisposable
{
public DriverFixture() // called before every test class
{
//var service = P... |
Read value of OneWire device with address in first command-line argument | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OneWireConsoleScanner
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("OneWire scanner");
var ports = OneWire.OneWire.GetP... | using System;
using System.Collections.Generic;
namespace OneWireConsoleScanner
{
internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine("OneWire scanner");
var ports = OneWire.OneWire.GetPortNames();
if (ports.Length == 0)
... |
Insert check user fields for null | using System.Collections.Generic;
using System.Collections.ObjectModel;
using Azimuth.DataAccess.Infrastructure;
namespace Azimuth.DataAccess.Entities
{
public class User : BaseEntity
{
public virtual Name Name { get; set; }
public virtual string ScreenName { get; set; }
public virtual... | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Azimuth.DataAccess.Infrastructure;
namespace Azimuth.DataAccess.Entities
{
public class User : BaseEntity
{
public virtual Name Name { get; set; }
public virtual string ScreenName { get; set; }
... |
Fix mis-matched split string indices (username is 0, password is 1). | namespace Bakery.Security
{
using System;
using System.Text;
using Text;
public class BasicAuthenticationParser
: IBasicAuthenticationParser
{
private readonly IBase64Parser base64Parser;
private readonly Encoding encoding;
public BasicAuthenticationParser(IBase64Parser base64Parser, Encodin... | namespace Bakery.Security
{
using System;
using System.Text;
using Text;
public class BasicAuthenticationParser
: IBasicAuthenticationParser
{
private readonly IBase64Parser base64Parser;
private readonly Encoding encoding;
public BasicAuthenticationParser(IBase64Parser base64Parser, Encodin... |
Add extension method to check eq mat dimensions | using System.Collections.Generic;
using WalletWasabi.Helpers;
using WalletWasabi.Crypto.Groups;
namespace System.Linq
{
public static class Extensions
{
public static GroupElement Sum(this IEnumerable<GroupElement> groupElements) =>
groupElements.Aggregate(GroupElement.Infinity, (ge, acc) => ge + acc);
publi... | using System.Collections.Generic;
using WalletWasabi.Helpers;
using WalletWasabi.Crypto.Groups;
using WalletWasabi.Crypto.ZeroKnowledge.LinearRelation;
using WalletWasabi.Crypto;
namespace System.Linq
{
public static class Extensions
{
public static GroupElement Sum(this IEnumerable<GroupElement> groupElements) =>... |
Rename cache refresh and make public | using UnityEngine;
namespace HoloToolkit.Unity
{
public static class CameraCache
{
private static Camera cachedCamera;
/// <summary>
/// Returns a cached reference to the main camera and uses Camera.main if it hasn't been cached yet.
/// </summary>
public static Camera... | using UnityEngine;
namespace HoloToolkit.Unity
{
public static class CameraCache
{
private static Camera cachedCamera;
/// <summary>
/// Returns a cached reference to the main camera and uses Camera.main if it hasn't been cached yet.
/// </summary>
public static Camera... |
Add comments and the TTL and highPriority flags for android notifications | using System;
namespace CertiPay.Common.Notifications
{
public class AndroidNotification : Notification
{
public static string QueueName { get; } = "AndroidNotifications";
// Message => Content
/// <summary>
/// The subject line of the email
/// </summary>
pub... | using System;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Describes a notification sent to an Android device via Google Cloud Messaging
/// </summary>
public class AndroidNotification : Notification
{
public static string QueueName { get; } = "AndroidNotifications";
... |
Add nl to end of file | 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("Ext... | 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("Ext... |
Add unit test that checks that a logger retrieved before the log manager is initialised can log correctly | using NUnit.Framework;
namespace ZeroLog.Tests
{
[TestFixture]
public class UninitializedLogManagerTests
{
[TearDown]
public void Teardown()
{
LogManager.Shutdown();
}
[Test]
public void should_log_without_initialize()
{
LogMa... | using System;
using NFluent;
using NUnit.Framework;
using ZeroLog.Configuration;
namespace ZeroLog.Tests
{
[TestFixture, NonParallelizable]
public class UninitializedLogManagerTests
{
private TestAppender _testAppender;
[SetUp]
public void SetUpFixture()
{
_test... |
Change default timeout to 30 seconds | using System;
namespace Renci.SshClient
{
public class ConnectionInfo
{
public string Host { get; set; }
public int Port { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public PrivateKeyFile KeyFile { get; set; }
... | using System;
namespace Renci.SshClient
{
public class ConnectionInfo
{
public string Host { get; set; }
public int Port { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public PrivateKeyFile KeyFile { get; set; }
... |
Handle subdirectories during beatmap stable import | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.IO;
namespace osu.Game.Database
{
public class LegacyBeatmapImporter : LegacyModelImporter<Beat... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.IO;
namespace o... |
Update tests to use newer name for 'webapi' template | using Xunit;
using Xunit.Abstractions;
namespace Templates.Test
{
public class WebApiTemplateTest : TemplateTestBase
{
public WebApiTemplateTest(ITestOutputHelper output) : base(output)
{
}
[Theory]
[InlineData(null)]
[InlineData("net461")]
public void ... | using Xunit;
using Xunit.Abstractions;
namespace Templates.Test
{
public class WebApiTemplateTest : TemplateTestBase
{
public WebApiTemplateTest(ITestOutputHelper output) : base(output)
{
}
[Theory]
[InlineData(null)]
[InlineData("net461")]
public void ... |
Enable error traces for Razor. | using Nancy;
namespace Plating
{
public class Bootstrapper : DefaultNancyBootstrapper
{
public Bootstrapper()
{
Cassette.Nancy.CassetteNancyStartup.OptimizeOutput = true;
}
}
} | using Nancy;
namespace Plating
{
public class Bootstrapper : DefaultNancyBootstrapper
{
public Bootstrapper()
{
StaticConfiguration.DisableErrorTraces = false;
Cassette.Nancy.CassetteNancyStartup.OptimizeOutput = true;
}
}
} |
Change class name to OrderingTypes. | namespace CompetitionPlatform.Helpers
{
public static class StreamsRoles
{
public const string Admin = "ADMIN";
}
public static class ResultVoteTypes
{
public const string Admin = "ADMIN";
public const string Author = "AUTHOR";
}
public static class OrderingConstan... | namespace CompetitionPlatform.Helpers
{
public static class StreamsRoles
{
public const string Admin = "ADMIN";
}
public static class ResultVoteTypes
{
public const string Admin = "ADMIN";
public const string Author = "AUTHOR";
}
public static class OrderingTypes
... |
Add BoolParameter and IntParameter to enum | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Snowflake.Ajax
{
/// <summary>
/// A metadata attribute to indicate parameter methods
/// Does not affect execution.
/// </summary>
[AttributeUsage(AttributeTargets.Method,... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Snowflake.Ajax
{
/// <summary>
/// A metadata attribute to indicate parameter methods
/// Does not affect execution.
/// </summary>
[AttributeUsage(AttributeTargets.Method,... |
Add Refresh() Method to ISerachModule to allow forcing a sim to resend it's search data | /*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must r... | /*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must r... |
Use new return value of Guard.ExpectNode to refine casting... | namespace dotless.Core.Parser.Functions
{
using System.Linq;
using Infrastructure;
using Infrastructure.Nodes;
using Tree;
using Utils;
public class RgbaFunction : Function
{
protected override Node Evaluate(Env env)
{
if (Arguments.Count == 2)
{
... | namespace dotless.Core.Parser.Functions
{
using System.Linq;
using Infrastructure;
using Infrastructure.Nodes;
using Tree;
using Utils;
public class RgbaFunction : Function
{
protected override Node Evaluate(Env env)
{
if (Arguments.Count == 2)
{
... |
Add visual MessageBox when an unhandled crash is encountered | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace unBand
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
... | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace unBand
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
... |
Fix issue with trailing whitespace. | using System.IO;
using System.Net.Http;
using MyCouch.Extensions;
using MyCouch.Serialization;
namespace MyCouch.Responses.Factories
{
public class DocumentResponseFactory : ResponseFactoryBase
{
public DocumentResponseFactory(SerializationConfiguration serializationConfiguration)
: base(s... | using System.IO;
using System.Net.Http;
using System.Text;
using MyCouch.Extensions;
using MyCouch.Serialization;
namespace MyCouch.Responses.Factories
{
public class DocumentResponseFactory : ResponseFactoryBase
{
public DocumentResponseFactory(SerializationConfiguration serializationConfiguration)
... |
Use the user-specific appdata path for the repository cache | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RepoZ.Api.Common;
using RepoZ.Api.Common.Git;
using RepoZ.Api.Git;
namespace RepoZ.Api.Win.Git
{
public class WindowsRepositoryCache : FileRepositoryCache
{
public WindowsRepo... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RepoZ.Api.Common;
using RepoZ.Api.Common.Git;
using RepoZ.Api.Git;
namespace RepoZ.Api.Win.Git
{
public class WindowsRepositoryCache : FileRepositoryCache
{
public WindowsRepo... |
Remove unused directives from benchmarking | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using FreeImageAPI;
using ImageMagick;
using DS = DevILSharp;
namespace Pfim.Benchmarks
{
public class DdsBenchmark
{
[Params("dxt1-sim... | using System.IO;
using BenchmarkDotNet.Attributes;
using FreeImageAPI;
using ImageMagick;
using DS = DevILSharp;
namespace Pfim.Benchmarks
{
public class DdsBenchmark
{
[Params("dxt1-simple.dds", "dxt3-simple.dds", "dxt5-simple.dds", "32-bit-uncompressed.dds")]
public string Payload { get; set... |
Update startup of sample to pass in the serviceProvider | using Glimpse.Host.Web.Owin;
using Owin;
namespace Glimpse.Owin.Sample
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.Use<GlimpseMiddleware>();
app.UseWelcomePage();
app.UseErrorPage();
}
}
} | using Glimpse.Host.Web.Owin;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
using Owin;
using System.Collections.Generic;
namespace Glimpse.Owin.Sample
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
var ... |
Build script now creates individual zip file packages to align with the NuGet packages and semantic versioning. | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// 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.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... |
Use List because IList isn't supported by FX.Configuration | using System;
using System.Collections.Generic;
namespace IntegrationEngine.Core.Configuration
{
public class IntegrationPointConfigurations
{
public IList<MailConfiguration> Mail { get; set; }
public IList<RabbitMQConfiguration> RabbitMQ { get; set; }
public IList<ElasticsearchConfigu... | using System;
using System.Collections.Generic;
namespace IntegrationEngine.Core.Configuration
{
public class IntegrationPointConfigurations
{
public List<MailConfiguration> Mail { get; set; }
public List<RabbitMQConfiguration> RabbitMQ { get; set; }
public List<ElasticsearchConfigurat... |
Remove unnecessary null check and associated comment | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Tests.Visual
{
/// <summary>
/// Test case which adjusts the beatmap's rate to match any speed adjustments in visual tests.
/// </summary>
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Tests.Visual
{
/// <summary>
/// Test case which adjusts the beatmap's rate to match any speed adjustments in visual tests.
/// </summary>
... |
Remove not common engine from base | // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
using System;
namespace Wangkanai.Detection.Models
{
[Flags]
public enum Engine
{
Unknown = 0, // Unknown engine
WebKit = 1, ... | // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
using System;
namespace Wangkanai.Detection.Models
{
[Flags]
public enum Engine
{
Unknown = 0, // Unknown engine
WebKit = 1, ... |
Fix APFT list sort by score | @model IEnumerable<APFT>
<div class="page-header">
<h1>APFT @Html.ActionLink("Add New", "New", "APFT", null, new { @class = "btn btn-default" })</h1>
</div>
<table class="table table-striped" id="dt">
<thead>
<tr>
<th>Soldier</th>
<th>Date</th>
<th>Score</th>
... | @model IEnumerable<APFT>
<div class="page-header">
<h1>APFT @Html.ActionLink("Add New", "New", "APFT", null, new { @class = "btn btn-default" })</h1>
</div>
<table class="table table-striped" id="dt">
<thead>
<tr>
<th>Soldier</th>
<th>Date</th>
<th>Score</th>
... |
Fix grammer issue and more rewording | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Catch.Skinning
{
public enum CatchSkinColour
{
/// <summary>
/// The colour to be used for the catcher while on hyper-... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Catch.Skinning
{
public enum CatchSkinColour
{
/// <summary>
/// The colour to be used for the catcher while in hyper-... |
Update header breadcrumb tab control | // 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.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays
{
public abstract class... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Over... |
Revise dropdowns for building unitypackages. | using UnityEditor;
using UnityEngine;
namespace PlayFab.Internal
{
public static class PlayFabEdExPackager
{
private static readonly string[] SdkAssets = {
"Assets/PlayFabEditorExtensions"
};
[MenuItem("PlayFab/Build PlayFab EdEx UnityPackage")]
public static void BuildUnit... | using UnityEditor;
using UnityEngine;
namespace PlayFab.Internal
{
public static class PlayFabEdExPackager
{
private static readonly string[] SdkAssets = {
"Assets/PlayFabEditorExtensions"
};
[MenuItem("PlayFab/Testing/Build PlayFab EdEx UnityPackage")]
public static void B... |
Increase project version number to 0.11.0 | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2016")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("0... | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Yevgeniy Shunevych")]
[assembly: AssemblyProduct("Atata")]
[assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2016")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("0... |
Check debugger is attached before writing something to it | #define Debug
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Bit.ViewModel
{
public class BitExceptionHandler
{
public static BitExceptionHandler Current { get; set; } = new BitExceptionHandler();
public virtual void OnExceptionReceived(Exception exp, IDi... | #define Debug
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Bit.ViewModel
{
public class BitExceptionHandler
{
public static BitExceptionHandler Current { get; set; } = new BitExceptionHandler();
public virtual void OnExceptionReceived(Exception exp, IDi... |
Use Any instead of Count > 0 | using Microsoft.AspNetCore.Http;
using NJsonSchema;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace Porthor.ResourceRequestValidators.ContentValidators
{
/// <summary>
/// Request validator for json content.
/// </summary>
public class JsonValidator : ... | using Microsoft.AspNetCore.Http;
using NJsonSchema;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace Porthor.ResourceRequestValidators.ContentValidators
{
/// <summary>
/// Request validator for json content.
/// </summary>
public cla... |
Revert "Fixed a bug where closing the quicknotes window then clicking show/hide quicknotes on the settings window would crash the program." | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;... |
Set env vars when updating VSTS variables | namespace Nerdbank.GitVersioning.CloudBuildServices
{
using System;
using System.IO;
/// <summary>
///
/// </summary>
/// <remarks>
/// The VSTS-specific properties referenced here are documented here:
/// https://msdn.microsoft.com/en-us/Library/vs/alm/Build/scripts/variables
///... | namespace Nerdbank.GitVersioning.CloudBuildServices
{
using System;
using System.IO;
/// <summary>
///
/// </summary>
/// <remarks>
/// The VSTS-specific properties referenced here are documented here:
/// https://msdn.microsoft.com/en-us/Library/vs/alm/Build/scripts/variables
///... |
Set default size for window | using System.Windows;
using Caliburn.Micro;
using OctopusPuppet.Gui.ViewModels;
namespace OctopusPuppet.Gui
{
public class AppBootstrapper : BootstrapperBase
{
public AppBootstrapper()
{
Initialize();
}
protected override void OnStartup(object sender, StartupEventA... | using System.Collections.Generic;
using System.Windows;
using Caliburn.Micro;
using OctopusPuppet.Gui.ViewModels;
namespace OctopusPuppet.Gui
{
public class AppBootstrapper : BootstrapperBase
{
public AppBootstrapper()
{
Initialize();
}
protected override void OnSt... |
Add helper method to return KeyModifier | using System;
using System.Windows.Forms;
using System.Xml.Serialization;
namespace DeRange.Config
{
[Serializable]
[XmlRoot(ElementName = "KeyboardShortcut")]
public class KeyboardShortcut
{
public bool ShiftModifier { get; set; }
public bool CtrlModifier { get; set; }
... | using System;
using System.Windows.Forms;
using System.Xml.Serialization;
namespace DeRange.Config
{
[Serializable]
[XmlRoot(ElementName = "KeyboardShortcut")]
public class KeyboardShortcut
{
public bool ShiftModifier { get; set; }
public bool CtrlModifier { get; set; }
... |
Change type signature of NotNullOrEmpty to string since it's only used for strings. | using System;
namespace DevTyr.Gullap
{
public static class Guard
{
public static void NotNull (object obj, string argumentName)
{
if (obj == null)
throw new ArgumentNullException(argumentName);
}
public static void NotNullOrEmpty (object obj, string argumentName)
{
NotNull (obj, a... | using System;
namespace DevTyr.Gullap
{
public static class Guard
{
public static void NotNull (object obj, string argumentName)
{
if (obj == null)
throw new ArgumentNullException(argumentName);
}
public static void NotNullOrEmpty (string obj, string argumentName)
{
NotNull (obj, a... |
Make Visual Studio 2017 Enterprise happy | using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
public static IEnumerable<CodeInstruction> MethodReplacer(this IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to)
{
foreach (var instruction i... | using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
namespace Harmony
{
public static class Transpilers
{
public static IEnumerable<CodeInstruction> MethodReplacer(this IEnumerable<CodeInstruction> instructions, MethodBase from, MethodBase to)
{
foreach (var instruction in... |
Update text on countdown timer GUI | using UnityEngine;
using System.Collections;
public class CountDown : MonoBehaviour {
public float maxTime = 600; //Because it is in seconds;
private float curTime;
private string prettyTime;
// Use this for initialization
void Start () {
curTime = maxTime;
}
// Update is called once per frame
void Update... | using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class CountDown : MonoBehaviour {
public float maxTime = 600; //Because it is in seconds;
private float curTime;
private string prettyTime;
private Text text;
// Use this for initialization
void Start () {
curTime = maxTime;
text = ga... |
Fix file paths default value null | using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("File")]
public class FilePath
{
public FilePath(string path)
{
Path = path;
}
public FilePath()
{
... | using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Classes
{
[ExpandableObject]
[DisplayName("File")]
public class FilePath
{
public FilePath(string path)
{
Path = path;
}
public FilePath()
{
... |
Make it Rain now rains blocks constantly | using UnityEngine;
using System.Collections;
public class MakeItRain : MonoBehaviour
{
private int numObjects = 20;
private float minX = -4f;
private float maxX = 4f;
private GameObject rain;
private GameObject rainClone;
// Use this for initialization
void Start()
{
// Here... | using UnityEngine;
using System.Collections;
public class MakeItRain : MonoBehaviour
{
private int numObjects = 20;
private float minX = -4f;
private float maxX = 4f;
private GameObject rain;
private GameObject rainClone;
int count = 0;
// Use this for initialization
void Start()
... |
Align failing CodeContracts case better to object Invariant. | using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
namespace PGSolutions.Utilities.Monads.StaticContracts {
using static Contract;
public struct MaybeAssume<T> {
///<summary>Create a new Maybe{T}.</summary>
private MaybeAssume(T value) : this() {
... | using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
namespace PGSolutions.Utilities.Monads.StaticContracts {
using static Contract;
public struct Maybe<T> {
///<summary>Create a new Maybe{T}.</summary>
private Maybe(T value) : this() {
Ensures(... |
Disable partitioning in the bootstrapper. | using System.Configuration;
using Amazon.ServiceBus.DistributedMessages.Serializers;
using ProjectExtensions.Azure.ServiceBus;
using ProjectExtensions.Azure.ServiceBus.Autofac.Container;
namespace PubSubUsingConfiguration {
static internal class Bootstrapper {
public static void Initialize() {
... | using System.Configuration;
using Amazon.ServiceBus.DistributedMessages.Serializers;
using ProjectExtensions.Azure.ServiceBus;
using ProjectExtensions.Azure.ServiceBus.Autofac.Container;
namespace PubSubUsingConfiguration {
static internal class Bootstrapper {
public static void Initialize() {
... |
Fix in API, added IsLocked field to nested schema. | // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ============================... | // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ============================... |
Adjust screen resolution to samsung galaxy s4 | using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Menu : MonoBehaviour
{
public Canvas MainCanvas;
static public int money = 1000;
public void LoadOn()
{
//DontDestroyOnLoad(money);
Application.LoadLevel(1);
}
}
| using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Menu : MonoBehaviour
{
public Canvas MainCanvas;
static public int money = 1000;
public void LoadOn()
{
Screen.SetResolution(1080, 1920, true);
//DontDestroyOnLoad(money);
Application.LoadLevel(1);
}
}
|
Refactor the error caused by a failing assertion | using System;
namespace TDDUnit {
class Assert {
public static void Equal(object expected, object actual) {
if (!expected.Equals(actual)) {
string message = string.Format("Expected: '{0}'; Actual: '{1}'", expected, actual);
Console.WriteLine(message);
throw new TestRunException(mes... | using System;
namespace TDDUnit {
class Assert {
private static void Fail(object expected, object actual) {
string message = string.Format("Expected: '{0}'; Actual: '{1}'", expected, actual);
Console.WriteLine(message);
throw new TestRunException(message);
}
public static void Equal(o... |
Clean up: removed empty line | using System;
using Microsoft.Practices.Unity;
namespace Topshelf.Unity.Sample
{
class Program
{
static void Main(string[] args)
{
// Create your container
var container = new UnityContainer();
container.RegisterType<ISampleDependency, SampleDependency>();
... | using System;
using Microsoft.Practices.Unity;
namespace Topshelf.Unity.Sample
{
class Program
{
static void Main(string[] args)
{
// Create your container
var container = new UnityContainer();
container.RegisterType<ISampleDependency, SampleDependency>();
... |
Fix for 'new' setting button triggering if you hit enter when editing a setting. | using System;
public partial class Settings : System.Web.UI.Page
{
//---------------------------------------------------------------------------
protected void Page_Load( object sender, EventArgs e )
{
// Don't allow people to skip the login page.
if( Session[ SettingsLogin.SES_SETTINGS_LOGGED_IN ] == ... | using System;
public partial class Settings : System.Web.UI.Page
{
//---------------------------------------------------------------------------
protected void Page_Load( object sender, EventArgs e )
{
// Don't allow people to skip the login page.
if( Session[ SettingsLogin.SES_SETTINGS_LOGGED_IN ] == ... |
Update List of ConnectorTypes to be compatible with ISOBUS.net List | /*******************************************************************************
* Copyright (C) 2015 AgGateway and ADAPT Contributors
* Copyright (C) 2015 Deere and Company
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0... | /*******************************************************************************
* Copyright (C) 2015 AgGateway and ADAPT Contributors
* Copyright (C) 2015 Deere and Company
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0... |
Test fix- catching permission denied exceptions | using System;
using System.Collections.Generic;
using System.IO;
namespace AGS.Engine.Desktop
{
public class DesktopFileSystem : IFileSystem
{
#region IFileSystem implementation
public string StorageFolder => Directory.GetCurrentDirectory(); //todo: find a suitable save location on desktop
... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
namespace AGS.Engine.Desktop
{
public class DesktopFileSystem : IFileSystem
{
#region IFileSystem implementation
public string StorageFolder => Directory.GetCurrentDirectory(); //todo: find a suitable save l... |
Make version 4 digits to fix replacement regex | using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyConfiguration("")]
// If you change this version, make sure to change Build\build.proj accordingly
[as... | using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyConfiguration("")]
// If you change this version, make sure to change Build\build.proj accordingly
[as... |
Update to beta1 for next release | using System.Resources;
using System.Reflection;
// 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("Configgy")]
[assembly: AssemblyDescription("Configgy: C... | using System.Resources;
using System.Reflection;
// 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("Configgy")]
[assembly: AssemblyDescription("Configgy: C... |
Delete sender and edit constructor functions | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using FuzzyCore.Server;
namespace FuzzyCore.Commands
{
public class GetFile
{
ConsoleMessage Message = new ConsoleMessa... | using FuzzyCore.Data;
using FuzzyCore.Server;
using System;
using System.IO;
namespace FuzzyCore.Commands
{
public class GetFile
{
ConsoleMessage Message = new ConsoleMessage();
private String FilePath;
private String FileName;
private JsonCommand mCommand;
public GetFi... |
Add write retry mechanism into the client. | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace EchoClient
{
class Program
{
static void Main(string[] args)
{
Task main = MainAsync(args);
main.Wait();
}
static async Task MainAsy... | using System;
using System.IO;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace EchoClient
{
class Program
{
const int MAX_WRITE_RETRY = 3;
const int WRITE_RETRY_DELAY_SECONDS = 3;
static void Main(string[] args)
{
Task main = MainAsync(args);
main.Wait();
}
static async Task Ma... |
Use expression bodied methods for compact code | using Alensia.Core.Input.Generic;
using UnityEngine.Assertions;
namespace Alensia.Core.Input
{
public class BindingKey<T> : IBindingKey<T> where T : IInput
{
public string Id { get; }
public BindingKey(string id)
{
Assert.IsNotNull(id, "id != null");
Id = id;
... | using Alensia.Core.Input.Generic;
using UnityEngine.Assertions;
namespace Alensia.Core.Input
{
public class BindingKey<T> : IBindingKey<T> where T : IInput
{
public string Id { get; }
public BindingKey(string id)
{
Assert.IsNotNull(id, "id != null");
Id = id;
... |
Fix build: react to EF namespace change | // 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 Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Metadata.ModelConventions;
namespace Microsoft.Framework... | // 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 Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Metadata.Conventions.Internal;
namespace Microsoft.Frame... |
Update copyright year in assembly info | 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: AssemblyConfigurat... | 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: AssemblyConfigurat... |
Update link to Update function | using System.Text;
using DotNetRu.Utils.Helpers;
using Newtonsoft.Json;
namespace DotNetRu.Clients.UI
{
public class AppConfig
{
public string AppCenterAndroidKey { get; set; }
public string AppCenteriOSKey { get; set; }
public string PushNotificationsChannel { get; set; }... | using System.Text;
using DotNetRu.Utils.Helpers;
using Newtonsoft.Json;
namespace DotNetRu.Clients.UI
{
public class AppConfig
{
public string AppCenterAndroidKey { get; set; }
public string AppCenteriOSKey { get; set; }
public string PushNotificationsChannel { get; set; }... |
Update example, add long tap | using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace XamExample {
public partial class MyPage : ContentPage {
public MyPage() {
InitializeComponent();
var c = 0;
XamEffects.TouchEffect.SetColor(plus, Color.White);
XamEffects.Comm... | using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace XamExample {
public partial class MyPage : ContentPage {
public MyPage() {
InitializeComponent();
var c = 0;
XamEffects.TouchEffect.SetColor(plus, Color.White);
XamEffects.Comm... |
Set Default Font to something that should be on all systems | using Mono.TextEditor.Highlighting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xwt.Drawing;
namespace XwtPlus.TextEditor
{
public class TextEditorOptions
{
public Font EditorFont = Font.FromName("Consolas 13");
publ... | using Mono.TextEditor.Highlighting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xwt.Drawing;
namespace XwtPlus.TextEditor
{
public class TextEditorOptions
{
public Font EditorFont = Font.SystemMonospaceFont;
public I... |
Build number removed from the version string, as this creates problems with NuGet dependencies. | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="VersionInfo.cs" company="Dani Michel">
// Dani Michel 2013
// </copyright>
// -----------------------------------------------------------------------------------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="VersionInfo.cs" company="Dani Michel">
// Dani Michel 2013
// </copyright>
// -----------------------------------------------------------------------------------------------... |
Add Async suffix to async methods | using System;
using System.Net;
using LtiLibrary.Core.Outcomes.v2;
using Newtonsoft.Json;
using Xunit;
namespace LtiLibrary.AspNet.Tests
{
public class LineItemsControllerUnitTests
{
[Fact]
public void GetLineItemBeforePostReturnsNotFound()
{
var controller = new LineItemsC... | using System;
using System.Net;
using LtiLibrary.Core.Outcomes.v2;
using Newtonsoft.Json;
using Xunit;
namespace LtiLibrary.AspNet.Tests
{
public class LineItemsControllerUnitTests
{
[Fact]
public void GetLineItemBeforePostReturnsNotFound()
{
var controller = new LineItemsC... |
Support config from alternative source | using System.Collections.Generic;
using System.Configuration;
using System.Linq;
namespace NLogger
{
public class CustomLogFactory<T> where T : NLoggerSection
{
private readonly List<ILogWriterRegistration<T>> _logWriterTypes;
public CustomLogFactory()
{
_logWriterTypes= n... | using System.Collections.Generic;
using System.Configuration;
using System.Linq;
namespace NLogger
{
public class CustomLogFactory<T> where T : NLoggerSection
{
private readonly List<ILogWriterRegistration<T>> _logWriterTypes;
public CustomLogFactory()
{
_logWriterTypes= n... |
Handle overflows in line selection | using System;
using MonoDevelop.Ide.Editor;
using MonoDevelop.Ide.Editor.Extension;
namespace JustEnoughVi
{
public abstract class ViMode
{
protected TextEditor Editor { get; set; }
public Mode RequestedMode { get; internal set; }
protected ViMode(TextEditor editor)
{
... | using System;
using MonoDevelop.Ide.Editor;
using MonoDevelop.Ide.Editor.Extension;
namespace JustEnoughVi
{
public abstract class ViMode
{
protected TextEditor Editor { get; set; }
public Mode RequestedMode { get; internal set; }
protected ViMode(TextEditor editor)
{
... |
Move marker file into App_Data a folder that can never be served | using System.IO;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.IO
{
public class SystemFiles
{
public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config";
public static string TelemetricsIdentifier => SystemDirectories.Umbraco + "/telemetrics-id.umb";
... | using System.IO;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.IO
{
public class SystemFiles
{
public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config";
public static string TelemetricsIdentifier => SystemDirectories.Data + "/telemetrics-id.umb";
... |
Add supression for generated xaml class | // This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in t... | // This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in t... |
Add locking on join/leave operations | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
namespace osu.Game.Online.RealtimeMultiplayer
{
[Serializable]
public class MultiplayerRoom
{
private... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
namespace osu.Game.Online.RealtimeMultiplayer
{
[Serializable]
public class MultiplayerRoom
{
private... |
Print information about the exception when the bot fails to log in to the forum. | using System;
using System.Threading.Tasks;
using Mitternacht.Services;
using NLog;
namespace Mitternacht.Modules.Forum.Services {
public class ForumService : IMService {
private readonly IBotCredentials _creds;
private readonly Logger _log;
public GommeHDnetForumAPI.Forum Forum { get; private set; }
public... | using System;
using System.Threading.Tasks;
using Mitternacht.Services;
using NLog;
namespace Mitternacht.Modules.Forum.Services {
public class ForumService : IMService {
private readonly IBotCredentials _creds;
private readonly Logger _log;
public GommeHDnetForumAPI.Forum Forum { get; private set; }
public... |
Add error handling for the client | using System;
using Grpc.Core;
using Hello;
namespace HelloClient
{
class Program
{
public static void Main(string[] args)
{
Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure);
var client = new HelloService.HelloServiceClient(channel);
String user = "Euler";
var reply = ... | using System;
using Grpc.Core;
using Hello;
namespace HelloClient
{
class Program
{
public static void Main(string[] args)
{
Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure);
var client = new HelloService.HelloServiceClient(channel);
// ideally you should check for errors ... |
Correct copy on the home page | @model IEnumerable<Article>
@{
ViewData["Title"] = "Home Page";
}
<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="/">Home</a></li>
<li role="presentation"><a href="https://kenticocloud.com/" target="_blank... | @model IEnumerable<Article>
@{
ViewData["Title"] = "Home Page";
}
<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="/">Home</a></li>
<li role="presentation"><a href="https://kenticocloud.com/" target="_blank... |
Decrease allocations in stack serializer | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Manatee.Json.Serialization.Internal.AutoRegistration
{
internal class StackSerializationDelegateProvider : SerializationDelegateProviderBase
{
public override bool CanHandle(Type type)
{
return typ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Manatee.Json.Serialization.Internal.AutoRegistration
{
internal class StackSerializationDelegateProvider : SerializationDelegateProviderBase
{
public override bool CanHandle(Type type)
{
return typ... |
Add method to calculate time | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
namespace HeadRaceTimingSite.Models
{
public class Crew
{
public int CrewId { get; set; }
public string Name { get; set; }
public int Sta... | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
namespace HeadRaceTimingSite.Models
{
public class Crew
{
public int CrewId { get; set; }
public string Name { get; set; }
public int Sta... |
Fix border highlight effects gets the wrong effect node | #if NETFX_CORE
namespace HelixToolkit.UWP
#else
namespace HelixToolkit.Wpf.SharpDX
#endif
{
using Model.Scene;
/// <summary>
/// Highlight the border of meshes
/// </summary>
public class PostEffectMeshBorderHighlight : PostEffectMeshOutlineBlur
{
protected override SceneNode OnCreateSc... | #if NETFX_CORE
namespace HelixToolkit.UWP
#else
namespace HelixToolkit.Wpf.SharpDX
#endif
{
using Model.Scene;
/// <summary>
/// Highlight the border of meshes
/// </summary>
public class PostEffectMeshBorderHighlight : PostEffectMeshOutlineBlur
{
protected override SceneNode OnCreateSc... |
Increase the message notification delay slightly. | #region Copyright 2014 Exceptionless
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://w... | #region Copyright 2014 Exceptionless
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://w... |
Send game state to client. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Battlezeppelins.Models;
namespace Battlezeppelins.Controllers
{
public class GameController : BaseController
{
public ActionResult Metadata()
{
Game game = ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Battlezeppelins.Models;
namespace Battlezeppelins.Controllers
{
public class GameController : BaseController
{
public ActionResult Metadata()
{
Game game = ... |
Fix formatting in events so it will build | namespace Ductus.FluentDocker.Model.HostEvents
{
/// <summary>
/// Base evnet emitte by the docker dameon using e.g. docker events.
/// </summary>
/// <remarks>
/// See docker documentation https://docs.docker.com/engine/reference/commandline/events/
/// </remarks>
public class Event
{
... | namespace Ductus.FluentDocker.Model.HostEvents
{
/// <summary>
/// Base evnet emitte by the docker dameon using e.g. docker events.
/// </summary>
/// <remarks>
/// See docker documentation https://docs.docker.com/engine/reference/commandline/events/
/// </remarks>
public class Event
{
/// <summary>... |
Allow strict Fake to permit access to overridden Object methods | namespace FakeItEasy.Core
{
using System;
using static FakeItEasy.ObjectMembers;
internal class StrictFakeRule : IFakeObjectCallRule
{
private readonly StrictFakeOptions options;
public StrictFakeRule(StrictFakeOptions options)
{
this.options = options;
... | namespace FakeItEasy.Core
{
using System;
using static FakeItEasy.ObjectMembers;
internal class StrictFakeRule : IFakeObjectCallRule
{
private readonly StrictFakeOptions options;
public StrictFakeRule(StrictFakeOptions options)
{
this.options = options;
... |
Set default value to BackgroundColor | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--... |
Set the artist to the username | using Espera.Network;
using Newtonsoft.Json;
using System;
namespace Espera.Core
{
public class SoundCloudSong : Song
{
public SoundCloudSong()
: base(String.Empty, TimeSpan.Zero)
{ }
[JsonProperty("artwork_url")]
public Uri ArtworkUrl { get; set; }
public ... | using Espera.Network;
using Newtonsoft.Json;
using System;
namespace Espera.Core
{
public class SoundCloudSong : Song
{
private User user;
public SoundCloudSong()
: base(String.Empty, TimeSpan.Zero)
{ }
[JsonProperty("artwork_url")]
public Uri ArtworkUrl { ... |
Change WM_DEVICECHANGE value to hexadecimal | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WinUsbInit
{
class DeviceArrivalListener : NativeWindow
{
// Constant value was found in the "windows.h" header file.
private const int WM_D... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WinUsbInit
{
class DeviceArrivalListener : NativeWindow
{
// Constant values was found in the "windows.h" header file.
private const int WM_... |
Fix signature of undirected edge | using System;
using System.Collections.Generic;
namespace Graph
{
/// <summary>
/// Represents an undirected edge (link) in a labeled <see cref="IGraph"/>.
/// </summary>
/// <typeparam name="V">
/// The type used to create vertex (node) labels.
/// </typeparam>
/// <typeparam name="W">
... | using System;
using System.Collections.Generic;
namespace Graph
{
/// <summary>
/// Represents an undirected edge (link) in a labeled <see cref="IGraph"/>.
/// </summary>
/// <typeparam name="V">
/// The type used to create vertex (node) labels.
/// </typeparam>
/// <typeparam name="W">
... |
Fix temporary models for relations. | using System;
using Newtonsoft.Json;
namespace Toggl.Phoebe.Data
{
public class ForeignKeyJsonConverter : JsonConverter
{
public override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
{
var model = (Model)value;
if (model == null) {
... | using System;
using Newtonsoft.Json;
namespace Toggl.Phoebe.Data
{
public class ForeignKeyJsonConverter : JsonConverter
{
public override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
{
var model = (Model)value;
if (model == null) {
... |
Use new intent instead of reusing broadcast one. | using System;
using Android.App;
using Android.Content;
using Android.Support.V4.Content;
namespace Toggl.Joey.Net
{
[BroadcastReceiver (Permission = "com.google.android.c2dm.permission.SEND")]
[IntentFilter (new string[] { "com.google.android.c2dm.intent.RECEIVE" },
Categories = new string[]{ "com.tog... | using System;
using Android.App;
using Android.Content;
using Android.Support.V4.Content;
namespace Toggl.Joey.Net
{
[BroadcastReceiver (Permission = "com.google.android.c2dm.permission.SEND")]
[IntentFilter (new string[] { "com.google.android.c2dm.intent.RECEIVE" },
Categories = new string[]{ "com.tog... |
Set character encoding when displaying html from markdown (BL-3785) | using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MarkdownDeep;
using SIL.IO;
namespace SIL.Windows.Forms.ReleaseNotes
{
/// <summary>
/// Shows a dialog for release notes; accepts html and markdown
/// </summary>
public partial class ShowReleaseNotesDialog : Form
{
private... | using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MarkdownDeep;
using SIL.IO;
namespace SIL.Windows.Forms.ReleaseNotes
{
/// <summary>
/// Shows a dialog for release notes; accepts html and markdown
/// </summary>
public partial class ShowReleaseNotesDialog : Form
{
private... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.