Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Fix failing test by setting the host object | using System;
using System.IO;
using System.Text;
using Microsoft.TemplateEngine.Core.Contracts;
using Xunit;
namespace Microsoft.TemplateEngine.Core.UnitTests
{
public abstract class TestBase
{
protected static void RunAndVerify(string originalValue, string expectedValue, IProcessor processor, int bu... | using System;
using System.IO;
using System.Text;
using Microsoft.TemplateEngine.Core.Contracts;
using Microsoft.TemplateEngine.Utils;
using Xunit;
namespace Microsoft.TemplateEngine.Core.UnitTests
{
public abstract class TestBase
{
protected TestBase()
{
EngineEnvironmentSettings.... |
Add /GET for a single website resource | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using GeoToast.Data;
using GeoToast.Data.Models;
using GeoToast.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace GeoToast.Controllers
{
//[Authorize]
[Route("api/[cont... | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using GeoToast.Data;
using GeoToast.Data.Models;
using GeoToast.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace GeoToast.Controllers
{
... |
Allow statically bound Razor templates to be output cached | using System.Web.UI;
using Sitecore.Web.UI;
using Blade.Razor;
using Blade.Utility;
using Sitecore.Diagnostics;
namespace Blade.Views
{
/// <summary>
/// Allows statically binding a Razor template as if it were a WebControl
/// </summary>
public class RazorTemplate : WebControl
{
/// <summary>
/// Virtual pa... | using System.Web.UI;
using Sitecore.Web.UI;
using Blade.Razor;
using Blade.Utility;
using Sitecore.Diagnostics;
namespace Blade.Views
{
/// <summary>
/// Allows statically binding a Razor template as if it were a WebControl
/// </summary>
public class RazorTemplate : WebControl
{
/// <summary>
/// Virtual pa... |
Implement RunServerCompilation in portable build task | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.CommandLine;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Mi... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.CommandLine;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Mi... |
Fix copy/paste bug related to changeset a06f6c6cd5ab | using System;
using System.Collections.Generic;
using System.Net.Mail;
using Composite.C1Console.Workflow;
namespace CompositeC1Contrib.Email.C1Console.Workflows
{
[AllowPersistingWorkflow(WorkflowPersistingType.Idle)]
public sealed class EditConfigurableSystemNetMailClientQueueWorkflow : EditMailQue... | using System;
using System.Collections.Generic;
using System.Net.Mail;
namespace CompositeC1Contrib.Email.C1Console.Workflows
{
public sealed class EditConfigurableSystemNetMailClientQueueWorkflow : EditMailQueueWorkflow
{
public EditConfigurableSystemNetMailClientQueueWorkflow() : base("\\Inst... |
Update class that was missed in the last commit |
namespace Glimpse.Agent.AspNet.Mvc.Messages
{
public class ActionInvokedMessage
{
public string ActionId { get; set; }
public Timing Timing { get; set; }
}
} |
namespace Glimpse.Agent.AspNet.Mvc.Messages
{
public class AfterActionMessage
{
public string ActionId { get; set; }
public Timing Timing { get; set; }
}
} |
Fix feature FootprintY having FootprintX value | namespace Mappy.Data
{
using Mappy.Util;
using TAUtil.Tdf;
public class FeatureRecord
{
public string Name { get; set; }
public string World { get; set; }
public string Category { get; set; }
public int FootprintX { get; set; }
public int Fo... | namespace Mappy.Data
{
using Mappy.Util;
using TAUtil.Tdf;
public class FeatureRecord
{
public string Name { get; set; }
public string World { get; set; }
public string Category { get; set; }
public int FootprintX { get; set; }
public int Fo... |
Add missing '.' to /// comment | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="ErrorController.cs" company="https://martincostello.com/">
// Martin Costello (c) 2016
// </copyright>
// <summary>
// ErrorController.cs
// </summary>
// --------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="ErrorController.cs" company="https://martincostello.com/">
// Martin Costello (c) 2016
// </copyright>
// <summary>
// ErrorController.cs
// </summary>
// --------------------... |
Set environment variable configuration to the passed in parameter | using System;
namespace AppHarbor.Commands
{
public class LoginCommand : ICommand
{
private readonly AppHarborApi _appHarborApi;
private readonly EnvironmentVariableConfiguration _environmentVariableConfiguration;
public LoginCommand(AppHarborApi appHarborApi, EnvironmentVariableConfiguration environmentVari... | using System;
namespace AppHarbor.Commands
{
public class LoginCommand : ICommand
{
private readonly AppHarborApi _appHarborApi;
private readonly EnvironmentVariableConfiguration _environmentVariableConfiguration;
public LoginCommand(AppHarborApi appHarborApi, EnvironmentVariableConfiguration environmentVari... |
Resolve compiler warnings from BenchmarkDotNet upgrade | // Copyright (c) Andrew Arnott. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Nerdbank.Streams.Benchmark
{
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Jobs;
internal class... | // Copyright (c) Andrew Arnott. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Nerdbank.Streams.Benchmark
{
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Jobs;
internal class... |
Use HostConstants in the extensions. | namespace SignalR.Abstractions
{
public static class HostContextExtensions
{
public static T GetValue<T>(this HostContext context, string key)
{
object value;
if (context.Items.TryGetValue(key, out value))
{
return (T)value;
}
... | namespace SignalR.Abstractions
{
public static class HostContextExtensions
{
public static T GetValue<T>(this HostContext context, string key)
{
object value;
if (context.Items.TryGetValue(key, out value))
{
return (T)value;
}
... |
Update feed uri, blog platform transition | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class JoshKing : IAmACommunityMember, IFilterMyBlogPosts
{
public string FirstName => "Josh";
pu... | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class JoshKing : IAmACommunityMember
{
public string FirstName => "Josh";
public string LastName... |
Check for forum notifications more often. | namespace Mitternacht.Common {
public class TimeConstants {
public const int WaitForForum = 500;
public const int TeamUpdate = 3 * 60 * 1000;
public const int Birthday = 60 * 1000;
public const int ForumNotification = 1 * 60 * 1000;
}
}
| namespace Mitternacht.Common {
public class TimeConstants {
public const int WaitForForum = 500;
public const int TeamUpdate = 3 * 60 * 1000;
public const int Birthday = 60 * 1000;
public const int ForumNotification = 30 * 1000;
}
}
|
Update the test runner to use the new parser interface. | using System;
using System.IO;
using Cxxi;
using Cxxi.Types;
namespace Generator.Tests
{
public class HeaderTestFixture
{
protected Library library;
protected TypeMapDatabase database;
private const string TestsDirectory = @"..\..\..\tests\Native";
protected void ParseLibrary... | using System;
using System.IO;
using Cxxi;
using Cxxi.Types;
namespace Generator.Tests
{
public class HeaderTestFixture
{
protected Library library;
protected TypeMapDatabase database;
private const string TestsDirectory = @"..\..\..\tests\Native";
protected void ParseLibrary... |
Add missing unit tests for Range equality. | using System;
using NUnit.Framework;
namespace FindRandomNumber.Common {
[TestFixture]
public class RangeTests {
[TestFixture]
public class Construction : RangeTests {
[Test]
public void GivenMaximumLessThanMinimum_Throws() {
Assert.Throws<ArgumentOutOfRangeException>(() => new Range(1... | using System;
using NUnit.Framework;
namespace FindRandomNumber.Common {
[TestFixture]
public class RangeTests {
[TestFixture]
public class Construction : RangeTests {
[Test]
public void GivenMaximumLessThanMinimum_Throws() {
Assert.Throws<ArgumentOutOfRangeException>(() => new Range(1... |
Comment the security check so it's obvious what its for. | using System;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Mvc;
namespace NuGetGallery
{
public partial class PagesController : Controller
{
public IContentService ContentService { get; protected set; }
protected PagesController() { }
public PagesController(IConte... | using System;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Mvc;
namespace NuGetGallery
{
public partial class PagesController : Controller
{
public IContentService ContentService { get; protected set; }
protected PagesController() { }
public PagesController(IConte... |
Split a really long WriteLine into a Write & WriteLine. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cheers
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello there! What's your name?");
string name = Console.ReadLine()... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cheers
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello there! What's your name?");
string name = Console.ReadLine()... |
Hide comment form if user not signed in. | @model CompetitionPlatform.Models.ProjectViewModels.ProjectCommentPartialViewModel
<form asp-controller="ProjectDetails" asp-action="AddComment" enctype="multipart/form-data">
<div class="form-group">
@Html.Hidden("projectId", Model.ProjectId)
<input asp-for="@Model.ProjectId" type="hidden" />
... | @using System.Threading.Tasks
@using CompetitionPlatform.Helpers
@model CompetitionPlatform.Models.ProjectViewModels.ProjectCommentPartialViewModel
<form asp-controller="ProjectDetails" asp-action="AddComment" enctype="multipart/form-data">
@if (ClaimsHelper.GetUser(User.Identity).Email != null)
{
<div... |
Rename the test class and method | using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace VersionOne.Bugzilla.BugzillaAPI.Testss
{
[TestClass()]
public class given_a_Bug
{
private IBug _bug;
private string _expectedReassignToPayload;
[TestInitialize()]
public void SetContext()
{
_... | using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace VersionOne.Bugzilla.BugzillaAPI.Testss
{
[TestClass()]
public class Given_A_Bug
{
private IBug _bug;
private string _expectedReassignToPayload;
[TestInitialize()]
public void SetContext()
{
_... |
Use switch statement instead of an array | // 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.Bindables;
using osu.Framework.Graphics.Textures;
using osu.Game.Rulesets.Catch.Objects.Drawables;
namespace osu.Game.Rulesets.Catch.Skinning.Legacy
... | // 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.Bindables;
using osu.Game.Rulesets.Catch.Objects.Drawables;
namespace osu.Game.Rulesets.Catch.Skinning.Legacy
{
internal class LegacyFruitPiece :... |
Change Error class to internal | namespace Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation
{
using System.Runtime.Serialization;
[DataContract]
internal class BackendResponse
{
[DataMember(Name = "itemsReceived")]
public int ItemsReceived { get; set; }
[DataMember(Name = "itemsAcce... | namespace Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation
{
using System.Runtime.Serialization;
[DataContract]
internal class BackendResponse
{
[DataMember(Name = "itemsReceived")]
public int ItemsReceived { get; set; }
[DataMember(Name = "itemsAcce... |
Fix failing multiplayer player test | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.OnlinePlay.Multiplayer;
namespace osu.Game.Tes... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets.Osu;
using ... |
Fix bulk alias unit tests | namespace Nest
{
/// <summary>
/// Marker interface for alias operation
/// </summary>
public interface IAliasAction { }
}
| using Utf8Json;
using Utf8Json.Internal;
namespace Nest
{
/// <summary>
/// Marker interface for alias operation
/// </summary>
[JsonFormatter(typeof(AliasActionFormatter))]
public interface IAliasAction { }
public class AliasActionFormatter : IJsonFormatter<IAliasAction>
{
private static readonly AutomataD... |
Improve test method name for clarity. | using Fixie.Execution;
using Fixie.Internal;
namespace Fixie.Tests.Execution
{
public class RunnerAppDomainCommunicationTests
{
public void ShouldAllowRunnersInOtherAppDomainsToProvideTheirOwnListeners()
{
typeof(Listener).ShouldBeSafeAppDomainCommunicationInterface();
}
... | using Fixie.Execution;
using Fixie.Internal;
namespace Fixie.Tests.Execution
{
public class RunnerAppDomainCommunicationTests
{
public void ShouldAllowRunnersInOtherAppDomainsToProvideTheirOwnListeners()
{
typeof(Listener).ShouldBeSafeAppDomainCommunicationInterface();
}
... |
Update anti forgery helper as extension methods | namespace GeekLearning.Test.Integration.Helpers
{
using System;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
// http://www.stefanhendriks.com/2016/05/11/integration-testing-your-asp-net-core-app-dealing-with-anti-request-forgery-csrf-formdata-and-cooki... | namespace GeekLearning.Test.Integration.Helpers
{
using System;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
// http://www.stefanhendriks.com/2016/05/11/integration-testing-your-asp-net-core-app-dealing-with-anti-request-forgery-csrf-formdata-and-cooki... |
Add ResolveByName attribute to TargetControl property | using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Xaml.Interactivity;
namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// A behavior that allows to hide control on lost focus event.
/// </summary>
public class HideOnLostFocusBehavior : Behavior<Control>
{
/// ... | using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Xaml.Interactivity;
namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// A behavior that allows to hide control on lost focus event.
/// </summary>
public class HideOnLostFocusBehavior : Behavior<Control>
{
/// ... |
Set new assembly version for release 1.1.0.0 | 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("As... | 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("As... |
Enable cors request from everywhere. | using CloudConfVarnaEdition4._0.Entities;
using CloudConfVarnaEdition4._0.Repositories;
using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CloudConfVarnaEdition4._0_RestAPI.Controllers
{
[EnableCors(origins: "http://cloudconfvarnamicroservices.azurewebsites.net", header... | using CloudConfVarnaEdition4._0.Entities;
using CloudConfVarnaEdition4._0.Repositories;
using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CloudConfVarnaEdition4._0_RestAPI.Controllers
{
// Allow CORS for all origins. (Caution!)
[EnableCors(origins: "*", headers: "*... |
Use the new valid rename field tag id in integration tests | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.VisualStudio.IntegrationTest.Utilities.Input;
namespace Microsoft.VisualStudio.IntegrationTes... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.HighlightTags;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.VisualStudio.In... |
Make sure there is an error code available | using System;
using System.Runtime.InteropServices;
namespace Eavesdrop
{
internal static class NativeMethods
{
[DllImport("wininet.dll")]
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);
}
} | using System;
using System.Runtime.InteropServices;
namespace Eavesdrop
{
internal static class NativeMethods
{
[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool InternetSetOption(IntPtr hInternet, ... |
Set default back to Chrome driver. | using System.Collections.Generic;
using BoDi;
using Coypu;
using Coypu.Drivers;
using TechTalk.SpecFlow;
namespace WebSpecs.Support
{
[Binding]
public class Hooks
{
private readonly IObjectContainer objectContainer;
private BrowserSession browser;
private readonly List<... | using System.Collections.Generic;
using BoDi;
using Coypu;
using Coypu.Drivers;
using TechTalk.SpecFlow;
namespace WebSpecs.Support
{
[Binding]
public class Hooks
{
private readonly IObjectContainer objectContainer;
private BrowserSession browser;
private readonly List<... |
Set sink version to match Serilog version. | using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.1.1.1")]
[assembly: AssemblyInformationalVersion("1.0.0")]
| using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.4.204.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
|
Correct negative values under arm64 | /* Copyright © 2018 Jeremy Herbison
This file is part of AudioWorks.
AudioWorks 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.
Au... | /* Copyright © 2018 Jeremy Herbison
This file is part of AudioWorks.
AudioWorks 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.
Au... |
Read from log stream and use a simple filter | using System;
using Amazon.CloudWatchLogs;
using Amazon.Lambda.Core;
namespace LogParser {
//--- Classes ---
public class CloudWatchLogsEvent {
//--- Properties ---
public Awslogs awslogs { get; set; }
}
public class Awslogs {
//--- Properties ---
... | using System;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text.RegularExpressions;
using Amazon.CloudWatchLogs;
using Amazon.Lambda.Core;
using LogParser.Model;
using Newtonsoft.Json;
namespace LogParser {
public class Function {
//--- Fields ---
private read... |
Fix For Broken Tests For CustomType List | using NUnit.Framework;
using ServiceStack.Common.Tests.Models;
namespace ServiceStack.Redis.Tests.Support
{
public class CustomTypeFactory : ModelFactoryBase<CustomType>
{
public CustomTypeFactory()
{
ModelConfig<CustomType>.Id(x => x.CustomId);
}
public override void AssertIsEqual(CustomType actual, Cus... | using NUnit.Framework;
using ServiceStack.Common.Tests.Models;
namespace ServiceStack.Redis.Tests.Support
{
public class CustomTypeFactory : ModelFactoryBase<CustomType>
{
public CustomTypeFactory()
{
ModelConfig<CustomType>.Id(x => x.CustomId);
}
public override void AssertIsEqual(CustomType actual, Cus... |
Fix hit explosions not being cleaned up correctly when rewinding | // 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Pooling;
using osu.Game.Rulesets.Judgements;
using osu.Game.... | // 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Pooling;
using osu.Game.Rulesets.Judgements;
using osu.Game.... |
Add back actually needed change | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.IO.Stores;
using osu.Game.Rulesets;
using osu.Game.Skinning;
namespace osu.Game.Tests.Visual
{... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.IO.Stores;
using osu.Game.Rulesets;
using osu.Game.Skinning;
namespace osu.Game.Tests.Visual
{... |
Use new new syntax for initialized fields | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using LibGit2Sharp;
using static GitNStats.Core.Tooling;
namespace GitNStats.Core
{
/// <summary>
/// Walks the commit graph back to the beginning of time.
/// Guaranteed to only visit a commit once.
/// </summary>
publi... | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using LibGit2Sharp;
using static GitNStats.Core.Tooling;
namespace GitNStats.Core
{
/// <summary>
/// Walks the commit graph back to the beginning of time.
/// Guaranteed to only visit a commit once.
/// </summary>
publi... |
Add indexer, IEnumerable, and Add for easier creation of HasArbitraryKey objects | using System.Collections.Generic;
namespace Rollbar {
public abstract class HasArbitraryKeys {
protected HasArbitraryKeys(Dictionary<string, object> additionalKeys) {
AdditionalKeys = additionalKeys ?? new Dictionary<string, object>();
}
public abstract void Normalize();
... | using System.Collections;
using System.Collections.Generic;
namespace Rollbar {
public abstract class HasArbitraryKeys : IEnumerable<KeyValuePair<string, object>> {
protected HasArbitraryKeys(Dictionary<string, object> additionalKeys) {
AdditionalKeys = additionalKeys ?? new Dictionary<string, ... |
Save ip after recording, check ip on index, version 1.0 | <div class="span7">
<div id="button" class="tile quadro triple-vertical bg-lightPink bg-active-lightBlue" style="padding:10px; text-align: center;">
Your number is... <br /><br />
<span class="COUNT">@(Model)!!!</span><br /><br />
Click this pink square to record a three second video of... | <div class="span7">
<div id="button" class="tile quadro triple-vertical bg-lightPink bg-active-lightBlue" style="padding:10px; text-align: center;">
Your number is... <br /><br />
<span class="COUNT">@(Model)!!!</span><br /><br />
Click this pink square to record a three second video of... |
Fix Clear-Bitmap disposing cleared bitmap too early. | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
namespace PixelPet {
/// <summary>
/// PixelPet workbench instance.
/// </summary>
public class Workbench {
public IList<Color> Palette { get; }
public Bit... | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
namespace PixelPet {
/// <summary>
/// PixelPet workbench instance.
/// </summary>
public class Workbench {
public IList<Color> Palette { get; }
public Bit... |
Comment out redis queue tests for now. | using System;
using Exceptionless.Core;
using Exceptionless.Core.Queues;
using StackExchange.Redis;
namespace Exceptionless.Api.Tests.Queue {
public class RedisQueueTests : InMemoryQueueTests {
private ConnectionMultiplexer _muxer;
protected override IQueue<SimpleWorkItem> GetQueue(int retries, T... | //using System;
//using Exceptionless.Core;
//using Exceptionless.Core.Queues;
//using StackExchange.Redis;
//namespace Exceptionless.Api.Tests.Queue {
// public class RedisQueueTests : InMemoryQueueTests {
// private ConnectionMultiplexer _muxer;
// protected override IQueue<SimpleWorkItem> GetQueu... |
Add IArchiveReader to Autofac configuration. | using Arkivverket.Arkade.Core;
using Arkivverket.Arkade.Identify;
using Autofac;
namespace Arkivverket.Arkade.Util
{
public class ArkadeAutofacModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<ArchiveExtractor>().As<IArchiveExtractor>();... | using Arkivverket.Arkade.Core;
using Arkivverket.Arkade.Identify;
using Autofac;
namespace Arkivverket.Arkade.Util
{
public class ArkadeAutofacModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<ArchiveExtractor>().As<IArchiveExtractor>();... |
Fix not pasting stats with no boss name available. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CasualMeter.Common.Helpers;
using Tera.DamageMeter;
namespace CasualMeter.Common.Formatters
{
public class DamageTrackerFormatter : Formatter
{
public DamageTrackerFormatter(Damage... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CasualMeter.Common.Helpers;
using Tera.DamageMeter;
namespace CasualMeter.Common.Formatters
{
public class DamageTrackerFormatter : Formatter
{
public DamageTrackerFormatter(Damage... |
Support to specify UTC and offset separately to setCurrentTimeAsync | using System;
using System.Threading.Tasks;
namespace Kazyx.RemoteApi.System
{
public class SystemApiClient : ApiClient
{
/// <summary>
///
/// </summary>
/// <param name="endpoint">Endpoint URL of system service.</param>
public SystemApiClient(Uri endpoint)
... | using System;
using System.Threading.Tasks;
namespace Kazyx.RemoteApi.System
{
public class SystemApiClient : ApiClient
{
/// <summary>
///
/// </summary>
/// <param name="endpoint">Endpoint URL of system service.</param>
public SystemApiClient(Uri endpoint)
... |
Trim down data returned from API | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web.Http;
using AutoMapper;
using Umbraco.Core.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Mapping;
using Umbraco.Web.Mvc;
using Umbraco.Web.Editors;
namespace Archetype.Umbraco.Api
{
[P... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web.Http;
using AutoMapper;
using Umbraco.Core.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Mapping;
using Umbraco.Web.Mvc;
using Umbraco.Web.Editors;
namespace Archetype.Umbraco.Api
{
[P... |
Rollback mistakenly committed commented lines | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Foundation;
using UIKit;
using Xunit.Runner;
using Xunit.Runners.UI;
using Xunit.Sdk;
namespace Couchbase.Lite.Tests.iOS
{
// The UIApplicationDelegate for the application. This class is responsibl... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Foundation;
using UIKit;
using Xunit.Runner;
using Xunit.Runners.UI;
using Xunit.Sdk;
namespace Couchbase.Lite.Tests.iOS
{
// The UIApplicationDelegate for the application. This class is responsibl... |
Revert "revert logging config causing bug" | using FilterLists.Api.DependencyInjection.Extensions;
using FilterLists.Data.DependencyInjection.Extensions;
using FilterLists.Services.DependencyInjection.Extensions;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Dependency... | using FilterLists.Api.DependencyInjection.Extensions;
using FilterLists.Data.DependencyInjection.Extensions;
using FilterLists.Services.DependencyInjection.Extensions;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Dependency... |
Fix bug when moving between pages executing on UI thread. | using System;
using System.Collections.Generic;
using System.Data.Services.Client;
using System.Linq;
using System.Threading.Tasks;
namespace PackageExplorerViewModel
{
internal abstract class QueryContextBase<T>
{
private int? _totalItemCount;
public int TotalItemCount
{
... | using System;
using System.Collections.Generic;
using System.Data.Services.Client;
using System.Linq;
using System.Threading.Tasks;
namespace PackageExplorerViewModel
{
internal abstract class QueryContextBase<T>
{
private int? _totalItemCount;
public int TotalItemCount
{
... |
Add the all-important = sign to make arg passing work | // Copyright 2016-2017 Datalust Pty Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... | // Copyright 2016-2017 Datalust Pty Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
Make proeprty setters private if they are not being used | using System;
namespace MiniWebDeploy.Deployer.Features.Discovery
{
public class AssemblyDetails
{
public string Path { get; set; }
public string BinaryPath { get; set; }
public Type InstallerType { get; set; }
public AssemblyDetails(string path, string binaryPath, Type install... | using System;
namespace MiniWebDeploy.Deployer.Features.Discovery
{
public class AssemblyDetails
{
public string Path { get; private set; }
public string BinaryPath { get; private set; }
public Type InstallerType { get; private set; }
public AssemblyDetails(string path, string ... |
Add support for metadata on BankAccount creation | namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class BankAccountCreateOptions : BaseOptions
{
/// <summary>
/// REQUIRED. Either a token, like the ones returned by
/// <a href="https://stripe.com/docs/stripe.js">Stripe.js</a>, or a
/// <see... | namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class BankAccountCreateOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// A set of key/value pairs that you can attach to an object. It can be useful for storing
... |
Add space to commit again. | @model SvNaum.Web.Models.NewsInputModel
@{
this.ViewBag.Title = "Add news";
}
<h2>Create news:</h2>
@using(Html.BeginForm("NewsAdd", "Admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.EditorForModel()
<br />
<br />
<input type="submit" value="Save" />
<input type="button" ... | @model SvNaum.Web.Models.NewsInputModel
@{
this.ViewBag.Title = "Add news";
}
<h2>Create news:</h2>
@using(Html.BeginForm("NewsAdd", "Admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.EditorForModel()
<br />
<br />
<input type="submit" value="Save" />
<input type="button" ... |
Switch from record to record class | namespace ApiTemplate
{
using System.Reflection;
public record AssemblyInformation(string Product, string Description, string Version)
{
public static readonly AssemblyInformation Current = new(typeof(AssemblyInformation).Assembly);
public AssemblyInformation(Assembly assembly)
... | namespace ApiTemplate
{
using System.Reflection;
public record class AssemblyInformation(string Product, string Description, string Version)
{
public static readonly AssemblyInformation Current = new(typeof(AssemblyInformation).Assembly);
public AssemblyInformation(Assembly assembly)
... |
Use TryAdd to add services rather than Add | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Cors;
using Microsoft.AspNet.Cors.Core;
using Microsoft.Framework.ConfigurationModel;
using Micro... | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Cors;
using Microsoft.AspNet.Cors.Core;
using Microsoft.Framework.ConfigurationModel;
using Micro... |
Change from == null to is null in NodaTime.Testing | // Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Testing
{
/// <summary>
/// Helper static methods for argument/state validation. Copied from NodaTime.Utility,
... | // Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Testing
{
/// <summary>
/// Helper static methods for argument/state validation. Copied from NodaTime.Utility,
... |
Remove setters from Id and Type | using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Telegram.Bot.Types.ReplyMarkups;
namespace Telegram.Bot.Types.InlineQueryResults
{
/// <summary>
/// Base Class for inline results send in response to an <see cref="InlineQuery"/>
/// </summary>
[JsonObject(MemberSerialization.OptIn, Nam... | using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Telegram.Bot.Types.ReplyMarkups;
namespace Telegram.Bot.Types.InlineQueryResults
{
/// <summary>
/// Base Class for inline results send in response to an <see cref="InlineQuery"/>
/// </summary>
[JsonObject(MemberSerialization.OptIn, Nam... |
Add a using and set the position of the stream | namespace Pigeon
{
using System.Linq;
using System.Net.Mail;
using Pigeon.Adapters;
public class Mailer
{
private readonly IMailService mailService;
public Mailer(IMailService mailService)
{
this.mailService = mailService;
}
public void SendZi... | namespace Pigeon
{
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using Pigeon.Adapters;
public class Mailer
{
private readonly IMailService mailService;
public Mailer(IMailService mailService)
{
this.mailService = ma... |
Add permissions to sample app | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// 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... | using System.Reflection;
using System.Runtime.InteropServices;
using Android;
using Android.App;
// 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("Compone... |
Add ProvideLanguageExtension to markdown formats | using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Microsoft.Markdown.Editor.ContentTypes;
using Microsoft.VisualStudio.R.Package.Packages;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
namespace Microsoft.VisualStudio.R.Packages.Markdown {
... | using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Microsoft.Markdown.Editor.ContentTypes;
using Microsoft.VisualStudio.R.Package.Packages;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
namespace Microsoft.VisualStudio.R.Packages.Markdown {
... |
Revert orleans for backwards compatibility. | // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ===========================... | // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ===========================... |
Add bad know-how for NotifyIcon | using System;
using System.Windows.Forms;
namespace COIME.Common.Control
{
public class NotifyIconUtil
{
/// <summary>
/// Setup NotifyIcon.
/// The icon added to the notification area, and then retry until it succeeds.
/// </summary>
/// <param name="notifyIcon"></para... | using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace COIME.Common.Control
{
public class NotifyIconUtil
{
/*
* for ALT + F4 problem
* see http://d.hatena.ne.jp/hnx8/20131208/1386486457
*/
[DllImport("user3... |
Update helper for the case when you want to find a node in structured trivia. | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
namespace Microsoft.CodeAnalysis.Shared.Extensions
{
internal static class LocationExtensions
{
public static Syntax... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading;
namespace Microsoft.CodeAnalysis.Shared.Extensions
{
internal static class LocationExtensions
{
public static Syntax... |
Fix multi-input controller not adding tilt. | // Copyright 2017 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 applicabl... | // Copyright 2017 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 applicabl... |
Add sync Run helper to sort fields visitor | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Foundatio.Parsers.LuceneQueries.Extensions;
using Foundatio.Parsers.LuceneQueries.Nodes;
using Foundatio.Parsers.LuceneQueries.Visitors;
using Nest;
namespace Foundatio.Parsers.ElasticQueries.Visitors {
public class GetSortFieldsV... | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Foundatio.Parsers.LuceneQueries.Extensions;
using Foundatio.Parsers.LuceneQueries.Nodes;
using Foundatio.Parsers.LuceneQueries.Visitors;
using Nest;
namespace Foundatio.Parsers.ElasticQueries.Visitors {
public class GetSortFieldsV... |
Delete scheduled task when content is published | using Orchard.ContentManagement.Handlers;
using Orchard.PublishLater.Models;
using Orchard.PublishLater.Services;
using Orchard.Tasks.Scheduling;
namespace Orchard.PublishLater.Handlers {
public class PublishLaterPartHandler : ContentHandler {
private readonly IPublishLaterService _publishLaterService;
... | using Orchard.ContentManagement.Handlers;
using Orchard.PublishLater.Models;
using Orchard.PublishLater.Services;
using Orchard.Tasks.Scheduling;
namespace Orchard.PublishLater.Handlers {
public class PublishLaterPartHandler : ContentHandler {
private readonly IPublishLaterService _publishLaterService;
... |
Remove exceptions from character extensions | // Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System;
using System.Linq;
using EOLib.Domain.Character;
namespace EOLib.Domain.Extensions
{
public static class CharacterRenderPropertiesExtensions
{
... | // Original Work Copyright (c) Ethan Moffat 2014-2016
// This file is subject to the GPL v2 License
// For additional details, see the LICENSE file
using System;
using System.Linq;
using EOLib.Domain.Character;
namespace EOLib.Domain.Extensions
{
public static class CharacterRenderPropertiesExtensions
{
... |
Make Search Operator automatically parsed by MVC. | using System;
using System.Web.Mvc;
using TeacherPouch.Models;
using TeacherPouch.Providers;
using TeacherPouch.Repositories;
namespace TeacherPouch.Web.Controllers
{
public partial class SearchController : RepositoryControllerBase
{
public SearchController(IRepository repository)
{
... | using System;
using System.ComponentModel;
using System.Web.Mvc;
using TeacherPouch.Models;
using TeacherPouch.Providers;
using TeacherPouch.Repositories;
namespace TeacherPouch.Web.Controllers
{
public partial class SearchController : RepositoryControllerBase
{
public SearchController(IRepository rep... |
Change over usage of IAgentStartup to use IAgentStartupManager instead | using System.Linq;
using Glimpse.Web;
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.Web
{
public static class GlimpseAgentWebExtension
{
public static IApplicationBuilder UseGlimpseAgent(this IApplicationBuilder app)
{
var sta... | using System.Linq;
using Glimpse.Web;
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;
namespace Glimpse.Agent.Web
{
public static class GlimpseAgentWebExtension
{
public static IApplicationBuilder UseGlimpseAgent(this IApplicationBuilder app)
{
var man... |
Stop hover sounds from playing when dragging (scrolling) | // 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.Audio;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using... | // 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.Audio;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using... |
Stop all watchers when exiting | using System;
using FSWActions.Core;
using FSWActions.Core.Config;
namespace FSWActions.ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
WatchersConfiguration configuration = WatchersConfiguration.LoadConfigFromPath("watchers.xml");
foreach (Watch... | using System;
using System.Collections.Generic;
using FSWActions.Core;
using FSWActions.Core.Config;
namespace FSWActions.ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
WatchersConfiguration configuration = WatchersConfiguration.LoadConfigFromPath("watchers.... |
Use ToString in converter instead of boxing-cast | using Newtonsoft.Json;
using System;
using System.Globalization;
namespace Discord.Net.Converters
{
internal class NullableUInt64Converter : JsonConverter
{
public static readonly NullableUInt64Converter Instance = new NullableUInt64Converter();
public override bool CanConvert(Type objectType... | using Newtonsoft.Json;
using System;
using System.Globalization;
namespace Discord.Net.Converters
{
internal class NullableUInt64Converter : JsonConverter
{
public static readonly NullableUInt64Converter Instance = new NullableUInt64Converter();
public override bool CanConvert(Type objectType... |
Convert all of these SymbolInfo extensions to ImmutableArray and reduce allocations. | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Shared.Extension... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Roslyn.Utilities;
namespace Mic... |
Fix for failing mspec test | using System;
using Nancy.ErrorHandling;
namespace Nancy.Testing
{
public class PassThroughErrorHandler : IErrorHandler
{
public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
{
var exception = context.Items[NancyEngine.ERROR_EXCEPTION] as Exception... | using System;
using Nancy.ErrorHandling;
namespace Nancy.Testing
{
public class PassThroughErrorHandler : IErrorHandler
{
public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
{
if (!context.Items.ContainsKey(NancyEngine.ERROR_EXCEPTION))
... |
Fix multiple open data readers problem. | using FinancesSharp.Models;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
namespace FinancesSharp.ViewModels
{
public class RulesViewModel
{
public IEnumerable<CategorisationRule> Rules { get; private set; }
public RulesViewModel(FinanceDb db)
{
... | using FinancesSharp.Models;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
namespace FinancesSharp.ViewModels
{
public class RulesViewModel
{
public IEnumerable<CategorisationRule> Rules { get; private set; }
public RulesViewModel(FinanceDb db)
{
... |
Change logic in console application to draw game field on console.! | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Logic.Engine;
using Logic.GameObjects;
namespace FeelTheField
{
class ConsoleAplication
{
static void Main()
{
char ch1 = 'X';
c... | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Logic.Engine;
using Logic.Enumerations;
using Logic.GameObjects;
namespace FeelTheField
{
class ConsoleAplication
{
static void Main()
{
cha... |
Test Passes - We can get and set Items on Program | using Kata.GildedRose.CSharp.Console;
using NUnit.Framework;
using System.Collections.Generic;
namespace Kata.GildedRose.CSharp.Unit.Tests
{
[TestFixture]
public class WhenTestTheGildedRoseProgram
{
string _actualName = "+5 Dexterity Vest";
int _actualSellin = 10;
int _actualQualit... | using Kata.GildedRose.CSharp.Console;
using NUnit.Framework;
using System.Collections.Generic;
namespace Kata.GildedRose.CSharp.Unit.Tests
{
[TestFixture]
public class WhenTestTheGildedRoseProgram
{
string _actualName = "+5 Dexterity Vest";
int _actualSellin = 10;
int _actualQualit... |
Remove unneeded properties from 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: AssemblyTitle("Pl... | 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("Pla... |
Fix default connection string for MongoDB | namespace InfinniPlatform.DocumentStorage
{
/// <summary>
/// Настройки хранилища документов MongoDB.
/// </summary>
public class MongoDocumentStorageOptions
{
public const string SectionName = "mongodbDocumentStorage";
public static MongoDocumentStorageOptions Default = new MongoD... | namespace InfinniPlatform.DocumentStorage
{
/// <summary>
/// Настройки хранилища документов MongoDB.
/// </summary>
public class MongoDocumentStorageOptions
{
public const string SectionName = "mongodbDocumentStorage";
public static MongoDocumentStorageOptions Default = new MongoD... |
Fix wrong usage of Task.FromException | using Mono.Options;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
using WalletWasabi.Gui.CrashReport;
namespace WalletWasabi.Gui.CommandLine
{
internal class CrashReportCommand : Command
{
public CrashReportCommand(CrashReporter crashReporter) : base("cra... | using Mono.Options;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
using WalletWasabi.Gui.CrashReport;
namespace WalletWasabi.Gui.CommandLine
{
internal class CrashReportCommand : Command
{
public CrashReportCommand(CrashReporter crashReporter) : base("cra... |
Fix a typo in a code comment, thanks StyleCop! | using System;
using OpenQA.Selenium;
namespace ExampleApp.Test.Functional.Models.ExampleAppPages
{
/// <summary>
/// Modles the Slinqy Example App Homepage.
/// </summary>
public class HomePage : SlinqyExampleWebPage
{
public const string RelativePath = "/";
/// <summary>
... | using System;
using OpenQA.Selenium;
namespace ExampleApp.Test.Functional.Models.ExampleAppPages
{
/// <summary>
/// Models the Slinqy Example App Homepage.
/// </summary>
public class HomePage : SlinqyExampleWebPage
{
public const string RelativePath = "/";
/// <summary>
... |
Remove role=navigation on nav tag |
<div class="l-header-container">
<nav class="skip-to-main-content healthy-skip" role="navigation" aria-label="skip to main content">
<a href="#content" tabindex="1" class="skip-main"> Skip to main content </a>
</nav>
<header id="header" class="grid-container grid-100">
<div class="grid-75 ... |
<div class="l-header-container">
<nav class="skip-to-main-content healthy-skip" aria-label="skip to main content">
<a href="#content" tabindex="1" class="skip-main"> Skip to main content </a>
</nav>
<header id="header" class="grid-container grid-100">
<div class="grid-75 mobile-grid-60 tab... |
Update server side API for single multiple answer question | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbContext... | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRepository
{
private readonly TrappistDbContext _dbContext... |
Revert "Fill out the assembly metadata because Squirrel will use it" | // -----------------------------------------------------------------------
// Copyright (c) David Kean.
// -----------------------------------------------------------------------
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AudioSwitcher")]
[assembly... | // -----------------------------------------------------------------------
// Copyright (c) David Kean.
// -----------------------------------------------------------------------
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("AudioSwitcher")]
[assembly... |
Add multiple named instances on same type test | using Core;
using StructureMap;
using System;
using Xunit;
namespace Tests
{
public class BasicConfigationTests
{
[Fact]
public void NamedInstance()
{
ObjectFactory.Initialize(x =>
{
x.For<IService>().Use<Service>().Named("A");
x.... | using Core;
using StructureMap;
using System;
using Xunit;
namespace Tests
{
public class BasicConfigationTests
{
[Fact]
public void NamedInstance()
{
ObjectFactory.Initialize(x =>
{
x.For<IService>().Use<Service>().Named("A");
x.... |
Add Sleep(int) and Sleep(TimeSpan) to threading proxy. | using System;
namespace ItzWarty.Threading {
public interface IThreadingProxy {
IThread CreateThread(ThreadEntryPoint entryPoint, ThreadCreationOptions options);
ISemaphore CreateSemaphore(int initialCount, int maximumCount);
ICountdownEvent CreateCountdownEvent(int initialCount);
ICancella... | using System;
namespace ItzWarty.Threading {
public interface IThreadingProxy {
void Sleep(int durationMilliseconds);
void Sleep(TimeSpan duration);
IThread CreateThread(ThreadEntryPoint entryPoint, ThreadCreationOptions options);
ISemaphore CreateSemaphore(int initialCount, int maximumCoun... |
Fix not using correct path to runtime library | using dnlib.DotNet;
namespace Confuser.Core.Services {
internal class RuntimeService : IRuntimeService {
private ModuleDef rtModule;
/// <inheritdoc />
public TypeDef GetRuntimeType(string fullName) {
if (rtModule == null) {
rtModule = ModuleDefMD.Load("Confuser.Runtime.dll");
rtModule.EnableTypeDe... | using System;
using System.IO;
using System.Reflection;
using dnlib.DotNet;
namespace Confuser.Core.Services {
internal class RuntimeService : IRuntimeService {
private ModuleDef rtModule;
/// <inheritdoc />
public TypeDef GetRuntimeType(string fullName) {
if (rtModule == null) {
Module module = typeof... |
Change _creationOptions modifier to 'private' |
using System;
namespace Advasoft.CmdArgsTool
{
public abstract class OptionsFactoryBase
{
protected IOptionsPolicy _creationPolicy;
private ILogger _logger;
protected OptionsFactoryBase(IOptionsPolicy creationPolicy, ILogger logger)
{
_creationPolicy = creationPol... |
using System;
namespace Advasoft.CmdArgsTool
{
public abstract class OptionsFactoryBase
{
private IOptionsPolicy _creationPolicy;
private ILogger _logger;
protected OptionsFactoryBase(IOptionsPolicy creationPolicy, ILogger logger)
{
_creationPolicy = creationPolic... |
Set assembly version to 1.2.0.0 | using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über folgende
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet si... | using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über folgende
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet si... |
Fix broken create pool test. | using Hyperledger.Indy.PoolApi;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Threading.Tasks;
namespace Hyperledger.Indy.Test.PoolTests
{
[TestClass]
public class CreatePoolTest : IndyIntegrationTestBase
{
[TestMethod]
public async Task TestCreatePoolWo... | using Hyperledger.Indy.PoolApi;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Threading.Tasks;
namespace Hyperledger.Indy.Test.PoolTests
{
[TestClass]
public class CreatePoolTest : IndyIntegrationTestBase
{
[TestMethod]
public async Task TestCreatePoolWo... |
Use local static to determine score per spinner tick | // 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.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Judgements;
name... | // 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.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Rulesets.Osu.Objects.... |
Fix FEZ not exiting when FEZMod PreInitialize crashes | using System;
using FezGame.Mod;
namespace FezGame {
public class Program {
public static void orig_Main(string[] args) {
}
public static void Main(string[] args) {
try {
FEZMod.PreInitialize(args);
} catch (Exception e) {
ModLogger.Log("FEZMod", "Handl... | using System;
using FezGame.Mod;
namespace FezGame {
public class Program {
public static void orig_Main(string[] args) {
}
public static void Main(string[] args) {
try {
FEZMod.PreInitialize(args);
} catch (Exception e) {
ModLogger.Log("FEZMod", "Handl... |
Change the method to expression body definition | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SCPI
{
public class RAW : ICommand
{
public string Description => "Send a raw SCPI command to instrument";
public string Command(params string[] parameters)
{
if (parameters.Len... | namespace SCPI
{
public class RAW : ICommand
{
public string Description => "Send a raw SCPI command to instrument";
public string Command(params string[] parameters)
{
if (parameters.Length != 0)
{
if (parameters.Length > 1)
{
... |
Replace UrlHelperBase with IUrlHelper so it can be used in Views | #if NETCOREAPP
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Routing;
namespace SFA.DAS.ProviderUrlHelper.Core
{
public static class ProviderUrlHelperExtensions
{
public static string ProviderCommitmentsLink(this UrlHelperBase helper, string path)
{
var linkGenera... | #if NETCOREAPP
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
namespace SFA.DAS.ProviderUrlHelper.Core
{
public static class ProviderUrlHelperExtensions
{
public static string ProviderCommitmentsLink(this IUrlHelper helper, string path)
{
var linkGenerator = GetLi... |
Add datasource support for streaming model | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityCNTK;
using CNTK;
using System;
namespace UnityCNTK{
public class StreamingModel<T, V> : Model
where T:IConvertible
where V:IConvertible
{
public new T input;
public new V output;
// Evaluation carry ou... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityCNTK;
using CNTK;
using System;
namespace UnityCNTK{
/// <summary>
/// Streaming model streams a datasource to a model every set period
/// </summary>
public class StreamingModel: Model
{
public new DataS... |
Fix bug when a user tries to join an already created multiplayer match | public class ClientNetworkWaitingGui : AbstractNetworkWaitingGui
{
private ClientNetworkEntityWaiting network;
private GuiButtonRendererControl[] buttons = new GuiButtonRendererControl[0];
public ClientNetworkWaitingGui(NetworkEntityWaiting networkEntity)
{
network = (ClientNetworkEntityWaiting) networkEntity;
... | public class ClientNetworkWaitingGui : AbstractNetworkWaitingGui
{
private ClientNetworkEntityWaiting network;
private GuiButtonRendererControl[] buttons = new GuiButtonRendererControl[0];
public ClientNetworkWaitingGui(NetworkEntityWaiting networkEntity)
{
network = (ClientNetworkEntityWaiting) networkEntity;
... |
Change AppointmentOptimizatinCode from short to int | namespace SnapMD.VirtualCare.ApiModels.Scheduling
{
/// <summary>
/// Appointment optimization code.
/// </summary>
public enum AppointmentOptimizationCode : short
{
/// <summary>
/// Single booking.
/// </summary>
SingleBooking,
/// <summary>
/// Do... | namespace SnapMD.VirtualCare.ApiModels.Scheduling
{
/// <summary>
/// Appointment optimization code.
/// </summary>
public enum AppointmentOptimizationCode : int
{
/// <summary>
/// Single booking.
/// </summary>
SingleBooking,
/// <summary>
/// Doub... |
Fix for first unreliable sequenced message automatically being dropped | using System;
namespace Lidgren.Network
{
internal sealed class NetUnreliableSequencedReceiver : NetReceiverChannelBase
{
private int m_lastReceivedSequenceNumber;
public NetUnreliableSequencedReceiver(NetConnection connection)
: base(connection)
{
}
internal override void ReceiveMessage... | using System;
namespace Lidgren.Network
{
internal sealed class NetUnreliableSequencedReceiver : NetReceiverChannelBase
{
private int m_lastReceivedSequenceNumber = -1;
public NetUnreliableSequencedReceiver(NetConnection connection)
: base(connection)
{
}
internal override void ReceiveMe... |
Use exception assertion instead of deprecated attribute | using NUnit.Framework;
namespace HandlebarsDotNet.Test
{
[TestFixture]
public class ExceptionTests
{
[Test]
[ExpectedException("HandlebarsDotNet.HandlebarsCompilerException", ExpectedMessage = "Reached end of template before block expression 'if' was closed")]
public void TestNonCl... | using NUnit.Framework;
namespace HandlebarsDotNet.Test
{
[TestFixture]
public class ExceptionTests
{
[Test]
public void TestNonClosingBlockExpressionException()
{
Assert.Throws<HandlebarsCompilerException>(() =>
{
Handlebars.Compile("{{#if 0}... |
Return correct error code for missing reserve numbers | using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace PU_Stub.Controllers
{
public class SnodController : ApiController
{
private static readonly IDictionary<string, string> TestPersons;
... | using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace PU_Stub.Controllers
{
public class SnodController : ApiController
{
private static readonly IDictionary<string, string> TestPersons;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.