Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Remove ConcurrentQueue wrapper around input enumerable and just iterate it directly in the Run method | using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
namespace BulkWriter.Pipeline.Internal
{
internal class StartEtlPipelineStep<TIn> : EtlPipelineStep<TIn, TIn>
{
public StartEtlPipelineStep(EtlPipelineContext pipelineContext, IEnumerable<TIn> enumerable) : ... | using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
namespace BulkWriter.Pipeline.Internal
{
internal class StartEtlPipelineStep<TIn> : EtlPipelineStep<TIn, TIn>
{
private readonly IEnumerable<TIn> _inputEnumerable;
public StartEtlPipelineStep(EtlPip... |
Add all opcodes to the enum | namespace Mos6510.Instructions
{
public enum Opcode
{
Inx,
Iny,
Nop,
And,
Ora,
Eor,
Adc,
Clc,
Lda,
Sbc,
Sta,
Ldx,
Ldy,
}
}
| namespace Mos6510.Instructions
{
public enum Opcode
{
Adc, // Add Memory to Accumulator with Carry
And, // "AND" Memory with Accumulator
Asl, // Shift Left One Bit (Memory or Accumulator)
Bcc, // Branch on Carry Clear
Bcs, // Branch on Carry Set
Beq, // Branch on Result Zero
Bit, // Test... |
Fix wrong json key of WeekdayOfMonth property. | using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Omise.Models
{
public class ScheduleOnRequest : Request
{
[JsonProperty("weekdays")]
public Weekdays[] Weekdays { get; set; }
[JsonProperty("days_of_month")]
public int[] DaysOfMonth { get; set; ... | using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Omise.Models
{
public class ScheduleOnRequest : Request
{
[JsonProperty("weekdays")]
public Weekdays[] Weekdays { get; set; }
[JsonProperty("days_of_month")]
public int[] DaysOfMonth { get; set; ... |
Make ExcludeFromCodeCoverage compatibility stub internal | #if NET35 || UAP
using System;
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
public class ExcludeFromCodeCoverageAttribute : Attribute
{
}
}
#endif | #if NET35 || UAP
using System;
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
internal class ExcludeFromCodeCoverageAttribute : Attribute
{
}
}
#endif |
Disable EF Core transaction test. | using System;
using System.Threading.Tasks;
using Abp.Domain.Repositories;
using Abp.Domain.Uow;
using Abp.EntityFrameworkCore.Tests.Domain;
using Microsoft.EntityFrameworkCore;
using Shouldly;
using Xunit;
namespace Abp.EntityFrameworkCore.Tests
{
public class Transaction_Tests : EntityFrameworkCoreModuleTestBase... | using System;
using System.Threading.Tasks;
using Abp.Domain.Repositories;
using Abp.Domain.Uow;
using Abp.EntityFrameworkCore.Tests.Domain;
using Microsoft.EntityFrameworkCore;
using Shouldly;
namespace Abp.EntityFrameworkCore.Tests
{
//WE CAN NOT TEST TRANSACTIONS SINCE INMEMORY DB DOES NOT SUPPORT IT! TODO: Use... |
Make card image types optional | using Newtonsoft.Json;
namespace Alexa.NET.Response
{
public class CardImage
{
[JsonProperty("smallImageUrl")]
[JsonRequired]
public string SmallImageUrl { get; set; }
[JsonProperty("largeImageUrl")]
[JsonRequired]
public string LargeImageUrl { get; set; }
... | using Newtonsoft.Json;
namespace Alexa.NET.Response
{
public class CardImage
{
[JsonProperty("smallImageUrl",NullValueHandling = NullValueHandling.Ignore)]
public string SmallImageUrl { get; set; }
[JsonProperty("largeImageUrl", NullValueHandling = NullValueHandling.Ignore)]
p... |
Fix typo in Asp.Net 4.5 Sample app (Simple4) | @{
ViewBag.Title = "Configuration Settings for Spring Cloud Config Server";
}
<h2>@ViewBag.Title.</h2>
<h4>spring:cloud:config:enabled = @ViewBag.Enabled</h4>
<h4>spring:cloud:config:env = @ViewBag.Environment</h4>
<h4>spring:cloud:config:failFast = @ViewBag,FailFast</h4>
<h4>spring:cloud:config:name = @ViewBag.N... | @{
ViewBag.Title = "Configuration Settings for Spring Cloud Config Server";
}
<h2>@ViewBag.Title.</h2>
<h4>spring:cloud:config:enabled = @ViewBag.Enabled</h4>
<h4>spring:cloud:config:env = @ViewBag.Environment</h4>
<h4>spring:cloud:config:failFast = @ViewBag.FailFast</h4>
<h4>spring:cloud:config:name = @ViewBag.N... |
Introduce Null Argument check if context is null on RequestIgnorerManager | using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Http;
namespace Glimpse.Agent.Web
{
public class DefaultRequestIgnorerManager : IRequestIgnorerManager
{
public DefaultRequestIgnorerManager(IExtensionProvider<IRequestIgnorer> requestIgnorerProvider, IHttpContextAccessor http... | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Http;
namespace Glimpse.Agent.Web
{
public class DefaultRequestIgnorerManager : IRequestIgnorerManager
{
public DefaultRequestIgnorerManager(IExtensionProvider<IRequestIgnorer> requestIgnorerProvider, IHttpContex... |
Fix AutomapHelper to only return assemblies decorated with IgnitionAutomapAttribute | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Ignition.Foundation.Core.Automap
{
public static class IgnitionAutomapHelper
{
public static IEnumerable<Assembly> GetAutomappedAssemblies()
{
var automappedAssemblies = Assembly.GetExecutingAssembl... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Ignition.Foundation.Core.Automap
{
public static class IgnitionAutomapHelper
{
public static IEnumerable<Assembly> GetAutomappedAssemblies()
{
var automappedAssemblies = Assembly.GetExecutingAssembl... |
Fix delay bug on resetting | using UnityEngine;
public class GameController : MonoBehaviour
{
GlobalGame game;
public float previewTime, previewTimer, confirmTime, confirmTimer;
public GlobalGame Game
{
get { return game; }
set { game = value; }
}
public void Confirm()
{
game.Confirm();
}... | using UnityEngine;
public class GameController : MonoBehaviour
{
GlobalGame game;
public float previewTime, previewTimer, confirmTime, confirmTimer;
public GlobalGame Game
{
get { return game; }
set { game = value; }
}
public void Confirm()
{
game.Confirm();
}... |
Add comments, better error handling to new class. | using System;
using System.Threading.Tasks;
using System.Xml.Serialization;
using LtiLibrary.Core.Outcomes.v1;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using System.IO;
namespace LtiLibrary.AspNet.Outcomes.v1
{
public class ImsxXmlMediaTypeModelBinder : IModelBinder
{
private static readonly XmlSe... | using LtiLibrary.Core.Outcomes.v1;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using System;
using System.IO;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace LtiLibrary.AspNet.Outcomes.v1
{
/// <summary>
/// Use this ModelBinder to deserialize imsx_POXEnvelopeRequest XML. For example,... |
Use more appropriate exception (can also never happen - JSON.NET uses the CanWrite property). | using System;
using Lloyd.AzureMailGateway.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Lloyd.AzureMailGateway.Core.JsonConverters
{
public class AddressConverter : JsonConverter
{
public override bool CanConvert(Type objectType) => (objectType == typeof(Address));
pub... | using System;
using Lloyd.AzureMailGateway.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Lloyd.AzureMailGateway.Core.JsonConverters
{
public class AddressConverter : JsonConverter
{
public override bool CanConvert(Type objectType) => (objectType == typeof(Address));
pub... |
Add a rotating box for indication of a good game template state | // 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;
namespace TemplateGame.Game
{
public class TemplateGameGame : osu.Framework.Game
{
[BackgroundDependencyLoader]
... | // 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.Shapes;
using osuTK;
using osuTK.Graphics;
namespace TemplateGame.Game
{
... |
Fix the subscription drop script | using System.IO;
using NServiceBus.Persistence.Sql.ScriptBuilder;
class SubscriptionWriter
{
public static void WriteSubscriptionScript(string scriptPath, BuildSqlDialect sqlDialect)
{
var createPath = Path.Combine(scriptPath, "Subscription_Create.sql");
File.Delete(createPath);
using ... | using System.IO;
using NServiceBus.Persistence.Sql.ScriptBuilder;
class SubscriptionWriter
{
public static void WriteSubscriptionScript(string scriptPath, BuildSqlDialect sqlDialect)
{
var createPath = Path.Combine(scriptPath, "Subscription_Create.sql");
File.Delete(createPath);
using ... |
Make sure we receive a meaningful response | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NFluent;
using NUnit.Framework;
namespace AppVeyorServices.IntegrationTests
{
[TestFixture]
public class AppVeyorGatewayTests
{
[Test]
public void GetProjects_Always_... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NFluent;
using NUnit.Framework;
namespace AppVeyorServices.IntegrationTests
{
[TestFixture]
public class AppVeyorGatewayTests
{
[Test]
public void GetProjects_Always_... |
Add a blank line test | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ASPVariables
{
public partial class SessionResultsPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ASPVariables
{
public partial class SessionResultsPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
... |
Add setting to bypass front-to-back | // 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.Configuration;
using osu.Framework.Graphics;
namespace osu.Game.Overlays.Settings.Sections.Debug
{
public 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.Configuration;
using osu.Framework.Graphics;
namespace osu.Game.Overlays.Settings.Sections.Debug
{
public class ... |
Return Journal entries latest first | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Apollo.Data.ResultModels;
using Dapper;
namespace Apollo.Data
{
public interface IJournalDataService
{
Task<IReadOnlyList<JournalEntry>> GetAllJournalEntries();
Task CreateJournalEntry(JournalEntry entry);... | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Apollo.Data.ResultModels;
using Dapper;
namespace Apollo.Data
{
public interface IJournalDataService
{
Task<IReadOnlyList<JournalEntry>> GetAllJournalEntries();
Task CreateJournalEntry(JournalEntry entry);... |
Add xmldoc warning against use of FramesPerSecond | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Timing
{
/// <summary>
/// A clock which will only update its current time when a frame proces is triggered.
/// Useful for keeping a... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Timing
{
/// <summary>
/// A clock which will only update its current time when a frame proces is triggered.
/// Useful for keeping a... |
Replace field by access to base class | using System;
using System.Collections.Generic;
namespace NQuery.Language
{
public sealed class ExpressionSelectColumnSyntax : SelectColumnSyntax
{
private readonly ExpressionSyntax _expression;
private readonly AliasSyntax _alias;
private readonly SyntaxToken? _commaToken;
pub... | using System;
using System.Collections.Generic;
namespace NQuery.Language
{
public sealed class ExpressionSelectColumnSyntax : SelectColumnSyntax
{
private readonly ExpressionSyntax _expression;
private readonly AliasSyntax _alias;
public ExpressionSelectColumnSyntax(ExpressionSyntax e... |
Use SkinnableSprite for approach circle | // 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.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics... | // 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.Containers;
using osu.Framework.Graphics.Textures;
using osu.Game.Skinning;
n... |
Use port 80 by default for containerizer | using Microsoft.Owin.Hosting;
using System;
using System.Net.Http;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using Owin.WebSocket;
using Owin.WebSocket.Extensions;
using System.Threading.Tasks;
namespace Containerizer
{
public class Program
{
static void Main(string[] arg... | using Microsoft.Owin.Hosting;
using System;
using System.Net.Http;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using Owin.WebSocket;
using Owin.WebSocket.Extensions;
using System.Threading.Tasks;
namespace Containerizer
{
public class Program
{
static void Main(string[] arg... |
Allow downloading files from administrative mode | @using Humanizer
@model FilesOverviewModel
@{
ViewBag.Title = "Uploaded file overview";
}
<h2>@ViewBag.Title</h2>
@{
var sortedFiles = Model.Files.OrderBy(x => x.Metadata.OriginalFileName);
}
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>File name</th>
<th... | @using Humanizer
@model FilesOverviewModel
@{
ViewBag.Title = "Uploaded file overview";
}
<h2>@ViewBag.Title</h2>
@{
var sortedFiles = Model.Files.OrderBy(x => x.Metadata.OriginalFileName);
}
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>File name</th>
<th... |
Call InitializeComponent, if no code-behind | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
namespace MicroMVVM
{
public static class ViewLocator
{
public static UIElement LocateForModel(object... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
namespace MicroMVVM
{
public static class ViewLocator
{
public static UIElement LocateForModel(object... |
Remove unnecessary code and fix double nesting causing filtering to not work | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Gam... | // 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.Localisation;
using osu.Game.Configuration;
using osu.Game.Localisation;
namespace osu.... |
Fix layout switcher tool menu path | using UnityEditor;
using UnityEngine;
namespace SpaceTrader.Util.EditorUtil {
public static class AspectRatioLayoutSwitcherEditor {
[MenuItem("SpaceTrader/Refresh All Layout Switchers")]
private static void RefreshAllSwitchersInScene() {
var switchers = Object.FindObjectsOfType<AspectR... | using UnityEditor;
using UnityEngine;
namespace SpaceTrader.Util.EditorUtil {
public static class AspectRatioLayoutSwitcherEditor {
[MenuItem("Tools/SpaceTrader/Refresh All Layout Switchers")]
private static void RefreshAllSwitchersInScene() {
var switchers = Object.FindObjectsOfType<A... |
Make the test pass for PostgreSQL, using a bit of a hack | using System;
using System.Data;
using System.Text;
using NHibernate.Engine;
using NExpression = NHibernate.Expression;
using NHibernate.SqlCommand;
using NHibernate.Type;
using NHibernate.DomainModel;
using NUnit.Framework;
namespace NHibernate.Test.ExpressionTest
{
/// <summary>
/// Summary description for Insen... | using System;
using System.Data;
using System.Text;
using NHibernate.Engine;
using NExpression = NHibernate.Expression;
using NHibernate.SqlCommand;
using NHibernate.Type;
using NHibernate.DomainModel;
using NUnit.Framework;
namespace NHibernate.Test.ExpressionTest
{
/// <summary>
/// Summary description for Insen... |
Reduce diff size: undo autoformat. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace DummyConsoleApp
{
public class Program
{
static void Main(string[] args)
{
var exitCodeToReturn = int.Parse(args[0]);
var millisecondsToSleep = int.Parse(args[1]);
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace DummyConsoleApp
{
public class Program
{
static void Main(string[] args)
{
int exitCodeToReturn = int.Parse(args[0]);
int millisecondsToSleep = int.Parse(args[1]);
... |
Switch over to using Regex extension | using System;
using Glimpse.Agent.Web.Options;
using Microsoft.Framework.OptionsModel;
namespace Glimpse.Agent.Web
{
public class GlimpseAgentWebOptionsSetup : ConfigureOptions<GlimpseAgentWebOptions>
{
public GlimpseAgentWebOptionsSetup() : base(ConfigureGlimpseAgentWebOptions)
{
... | using System;
using Glimpse.Agent.Web.Options;
using Microsoft.Framework.OptionsModel;
namespace Glimpse.Agent.Web
{
public class GlimpseAgentWebOptionsSetup : ConfigureOptions<GlimpseAgentWebOptions>
{
public GlimpseAgentWebOptionsSetup() : base(ConfigureGlimpseAgentWebOptions)
{
... |
Fix the test on MySQL, should work now | using System;
using System.Data;
using System.Text;
using NHibernate.Engine;
using NExpression = NHibernate.Expression;
using NHibernate.SqlCommand;
using NHibernate.Type;
using NHibernate.DomainModel;
using NUnit.Framework;
namespace NHibernate.Test.ExpressionTest
{
/// <summary>
/// Summary description for NotEx... | using System;
using System.Data;
using System.Text;
using NHibernate.Engine;
using NExpression = NHibernate.Expression;
using NHibernate.SqlCommand;
using NHibernate.Type;
using NHibernate.DomainModel;
using NUnit.Framework;
namespace NHibernate.Test.ExpressionTest
{
/// <summary>
/// Summary description for NotEx... |
Switch Thomas Rayner over to IWorkAtMicrosoft | 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 ThomasRayner : IAmAMicrosoftMVP
{
public string FirstName => "Thomas";
public string LastN... | 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 ThomasRayner : IWorkAtMicrosoft
{
public string FirstName => "Thomas";
public string LastN... |
Add assemblywide cake namespace imports | 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("Ca... | using Cake.Core.Annotations;
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.... |
Mark ROM region for Glulx | using System;
using IFVM.Core;
namespace IFVM.Glulx
{
public class GlulxMachine : Machine
{
public GlulxHeader Header { get; }
public GlulxMachine(Memory memory) : base(memory)
{
this.Header = new GlulxHeader(memory);
VerifyChecksum(memory, this.Header.Checksu... | using System;
using IFVM.Core;
namespace IFVM.Glulx
{
public class GlulxMachine : Machine
{
public GlulxHeader Header { get; }
public GlulxMachine(Memory memory) : base(memory)
{
this.Header = new GlulxHeader(memory);
VerifyChecksum(memory, this.Header.Checksu... |
Order pages by title in dropdown | using System.Collections.Generic;
using System.Linq;
using DirigoEdgeCore.Data.Entities;
using DirigoEdgeCore.Models;
public class RedirectViewModel : DirigoBaseModel
{
public List<Redirect> Redirects;
public List<string> Pages = new List<string>();
public RedirectViewModel()
{
BookmarkTitle ... | using System.Collections.Generic;
using System.Linq;
using DirigoEdgeCore.Data.Entities;
using DirigoEdgeCore.Models;
public class RedirectViewModel : DirigoBaseModel
{
public List<Redirect> Redirects;
public List<string> Pages = new List<string>();
public RedirectViewModel()
{
BookmarkTitle ... |
Remove other_files message box from the region selector | using System;
using System.IO;
using System.Windows.Forms;
namespace MusicRandomizer
{
public partial class VersionRequestForm : Form
{
public SplatoonRegion chosenRegion;
public VersionRequestForm()
{
InitializeComponent();
}
private void V... | using System;
using System.IO;
using System.Windows.Forms;
namespace MusicRandomizer
{
public partial class VersionRequestForm : Form
{
public SplatoonRegion chosenRegion;
public VersionRequestForm()
{
InitializeComponent();
}
private void V... |
Allow category to be null in Azure SQL listener | using System.Data;
using System.Data.SqlClient;
using SimpleAzureTraceListener.Listeners.Base;
using SimpleAzureTraceListener.Models;
namespace SimpleAzureTraceListener.Listeners
{
public class AzureSqlTraceListener : AzureTraceListener
{
private readonly string _tableName;
private r... | using System;
using System.Data;
using System.Data.SqlClient;
using SimpleAzureTraceListener.Listeners.Base;
using SimpleAzureTraceListener.Models;
namespace SimpleAzureTraceListener.Listeners
{
public class AzureSqlTraceListener : AzureTraceListener
{
private readonly string _tableName;
... |
Hide the blinking console tail on linux. | using SnakeApp.Models;
using System;
using System.Threading.Tasks;
namespace SnakeApp
{
public class GameController
{
public async Task StartNewGame()
{
var game = new Game(80, 25, 5, 100);
game.Start();
ConsoleKeyInfo userInput = new ConsoleKeyInfo();
do
{
userInput = Console.ReadKey(true);... | using SnakeApp.Models;
using System;
using System.Threading.Tasks;
namespace SnakeApp
{
public class GameController
{
public async Task StartNewGame()
{
PrepareConsole();
var game = new Game(80, 25, 5, 100);
game.Start();
ConsoleKeyInfo userInput = new ConsoleKeyInfo();
do
{
userInput = ... |
Change method callings to default static instance | using System;
namespace PcscDotNet
{
public static class Pcsc<TIPcscProvider> where TIPcscProvider : class, IPcscProvider, new()
{
private static readonly Pcsc _instance = new Pcsc(new TIPcscProvider());
public static Pcsc Instance => _instance;
public static PcscContext CreateContext... | using System;
namespace PcscDotNet
{
public static class Pcsc<TIPcscProvider> where TIPcscProvider : class, IPcscProvider, new()
{
private static readonly Pcsc _instance = new Pcsc(new TIPcscProvider());
public static Pcsc Instance => _instance;
public static PcscContext CreateContext... |
Add registration options for codeAction request | using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
using Newtonsoft.Json.Linq;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public class CodeActionRequest
{
public static readonly
RequestType<CodeActionParams, CodeActionCommand[], object, object>... | using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
using Newtonsoft.Json.Linq;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public class CodeActionRequest
{
public static readonly
RequestType<CodeActionParams, CodeActionCommand[], object, TextDoc... |
Move down to highlight the Create methods. | using System.Net.Http;
using MyCouch.Net;
namespace MyCouch.Requests.Factories
{
public class AttachmentHttpRequestFactory :
HttpRequestFactoryBase,
IHttpRequestFactory<GetAttachmentRequest>,
IHttpRequestFactory<PutAttachmentRequest>,
IHttpRequestFactory<DeleteAttachmentRequest>
... | using System.Net.Http;
using MyCouch.Net;
namespace MyCouch.Requests.Factories
{
public class AttachmentHttpRequestFactory :
HttpRequestFactoryBase,
IHttpRequestFactory<GetAttachmentRequest>,
IHttpRequestFactory<PutAttachmentRequest>,
IHttpRequestFactory<DeleteAttachmentRequest>
... |
Fix copy and past bug. | using UnityEngine;
using System.Collections;
using Realms.Common.Packet;
using System;
namespace Realms.Server.Packet
{
[Serializable]
public class PlayerHandshakePacket : IPacket
{
/// <summary>
/// Is the connection to the server allowed
/// </summary>
public... | using UnityEngine;
using System.Collections;
using Realms.Common.Packet;
using System;
namespace Realms.Server.Packet
{
[Serializable]
public class PlayerHandshakePacket : IPacket
{
/// <summary>
/// Is the connection to the server allowed
/// </summary>
public... |
Fix failing test due to missing dependency | // 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.Graphics;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Edit.Components.Timelines.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.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Beatmaps;
using osu.Game.Scr... |
Mark the ExtractTest as EndToEnd. | using org.grobid.core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using System.Xml.Linq;
using org.apache.log4j;
namespace Grobid.Test
{
public class GrobidTest
{
... | using org.grobid.core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentAssertions;
using Xunit;
using Grobid.NET;
using System.Xml.Linq;
using org.apache.log4j;
namespace Grobid.Test
{
public class GrobidTest
{
... |
Add registration options for documentHighlight request | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public enum Docum... | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public enum Docum... |
Put obstaclenetworking setup in the right place. | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpinnerActivator : MonoBehaviour
{
public bool boostEnabled;
public GameObject boost;
private void Start()
{
boost.GetComponent<BoostPadForce>().boostEnabled = false;
boost.GetComponent<BoostPa... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class SpinnerActivator : MonoBehaviour
{
public bool boostEnabled;
public GameObject boost;
private void Start()
{
boost.GetComponent<BoostPadForce>().boostEnabled = false;
... |
Remove some hints, function name is clear enough | using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Networking;
public static class UnityUtils
{
/// <summary>
/// Is any of the keys UP?
/// </summary>
/// <param name="keys"></param>
/// <returns></returns>
public static bool IsAnyKeyUp(KeyCode[] keys)
{
foreach (Key... | using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Networking;
public static class UnityUtils
{
public static bool IsAnyKeyUp(KeyCode[] keys)
{
foreach (KeyCode key in keys)
{
if (Input.GetKeyUp(key))
return true;
}
return false;
}
... |
Add view elements for resending Confirm code | <h1 class="heading-xlarge">Enter your security code</h1>
<form method="post">
@Html.AntiForgeryToken()
<fieldset>
<legend class="visuallyhidden">Enter your security code</legend>
<div class="form-group">
<label class="form-label-bold" for="SecurityCode">Enter security co... | @model SFA.DAS.EmployerUsers.Web.Models.OrchestratorResponse<SFA.DAS.EmployerUsers.Web.Models.ConfirmChangeEmailViewModel>
<h1 class="heading-xlarge">Enter your security code</h1>
<form method="post">
@Html.AntiForgeryToken()
<fieldset>
<legend class="visuallyhidden">Enter your security co... |
Test for properties column filtering | using System;
using System.Collections.Generic;
using System.Text;
namespace Serilog.Sinks.MSSqlServer.Tests
{
class TestPropertiesColumnFiltering
{
}
}
| using Dapper;
using FluentAssertions;
using System.Data.SqlClient;
using Xunit;
namespace Serilog.Sinks.MSSqlServer.Tests
{
[Collection("LogTest")]
public class TestPropertiesColumnFiltering
{
internal class PropertiesColumns
{
public string Properties { get; set; }
}
... |
Make sure SQL Server tests don't run in parallel | // Copyright 2015 Coinprism, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | // Copyright 2015 Coinprism, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
Use ShapeFactory as base class | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Test2d;
namespace Test2d
{
/// <summ... | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Test2d;
namespace Test2d
{
/// <summ... |
Abort key handling if SDL2 passes us an unknown key | // 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.Input.StateChanges;
using osu.Framework.Input.States;
using osu.Framework.Platform;
using osu.Framework.Statistics;
using Veldrid;
using TKKey = osuTK... | // 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.Input.StateChanges;
using osu.Framework.Input.States;
using osu.Framework.Platform;
using osu.Framework.Statistics;
using Veldrid;
using TKKey = osuTK... |
Fix formatting on queued sender | using CertiPay.Common.Logging;
using CertiPay.Common.WorkQueue;
using System.Threading;
using System.Threading.Tasks;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Sends notifications to the background worker queue for async processing and retries
/// </summary>
public partial class Queu... | using CertiPay.Common.Logging;
using CertiPay.Common.WorkQueue;
using System.Threading;
using System.Threading.Tasks;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Sends notifications to the background worker queue for async processing and retries
/// </summary>
public partial class Queu... |
Rename Control_DragAndDrop_UsingDragAndDropUsingScriptBehavior test to Control_DragAndDrop_UsingDomEvents | using NUnit.Framework;
namespace Atata.Tests
{
public class ControlTests : UITestFixture
{
[Test]
public void Control_DragAndDrop_UsingDragAndDropUsingScriptBehavior()
{
Go.To<DragAndDropPage>().
DropContainer.Items.Should.BeEmpty().
... | using NUnit.Framework;
namespace Atata.Tests
{
public class ControlTests : UITestFixture
{
[Test]
public void Control_DragAndDrop_UsingDomEvents()
{
Go.To<DragAndDropPage>().
DropContainer.Items.Should.BeEmpty().
DragItems.Items.Sh... |
Refactor Divide Integers Operation to use GetValujes and CloneWithValues | namespace TensorSharp.Operations
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class DivideIntegerIntegerOperation : IBinaryOperation<int, int, int>
{
public Tensor<int> Evaluate(Tensor<int> tensor1, Tensor<int> tensor2)
... | namespace TensorSharp.Operations
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class DivideIntegerIntegerOperation : IBinaryOperation<int, int, int>
{
public Tensor<int> Evaluate(Tensor<int> tensor1, Tensor<int> tensor2)
... |
Set max connections per server to 1024 by default. | // Copyright (c) MarinAtanasov. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the project root for license information.
//
using AppBrix.Configuration;
using System;
using System.Linq;
using System.Threading;
namespace AppBrix.Web.Client.Configuration
{
public sealed class WebCli... | // Copyright (c) MarinAtanasov. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the project root for license information.
//
using AppBrix.Configuration;
using System;
using System.Linq;
using System.Threading;
namespace AppBrix.Web.Client.Configuration
{
public sealed class WebCli... |
Enable default mapped span results for Razor. | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using S... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using S... |
Set more specific return type to enable application/atom+xml response formatting. | using System.Linq;
using System.Web.Http;
using System.Web.Http.OData;
using NuGet.Lucene.Web.Models;
using NuGet.Lucene.Web.Util;
namespace NuGet.Lucene.Web.Controllers
{
/// <summary>
/// OData provider for Lucene based NuGet package repository.
/// </summary>
public class PackagesODataController : ... | using System.Linq;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.OData;
using NuGet.Lucene.Web.Models;
using NuGet.Lucene.Web.Util;
namespace NuGet.Lucene.Web.Controllers
{
/// <summary>
/// OData provider for Lucene based NuGet package repository.
/// </summary>
public class Pac... |
Correct basic client config test | using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Threading;
using Lokad.Cqrs.Build.Client;
using Lokad.Cqrs.Build.Engine;
using Lokad.Cqrs.Core.Dispatch.Events;
using Microsoft.WindowsAzure;
using NUnit.Framework;
using System.Linq;
namespace Lokad.Cqrs
{
... | using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Threading;
using Lokad.Cqrs.Build.Client;
using Lokad.Cqrs.Build.Engine;
using Lokad.Cqrs.Core.Dispatch.Events;
using Microsoft.WindowsAzure;
using NUnit.Framework;
using System.Linq;
namespace Lokad.Cqrs
{
... |
Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0. | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... |
Add Fsm variable for text/initials | using UnityEngine;
using System;
using HutongGames.PlayMaker;
using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
using BCP.SimpleJSON;
/// <summary>
/// Custom PlayMaker action for MPF that sends a Trigger BCP command to MPF.
/// </summary>
[ActionCategory("BCP")]
[Tooltip("Sends 'text_input_high_score_... | using UnityEngine;
using System;
using HutongGames.PlayMaker;
using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
using BCP.SimpleJSON;
/// <summary>
/// Custom PlayMaker action for MPF that sends a Trigger BCP command to MPF.
/// </summary>
[ActionCategory("BCP")]
[Tooltip("Sends 'text_input_high_score_... |
Remove old points from back | using Nito;
using System.Collections;
using System.Net.NetworkInformation;
using UnityEngine;
namespace TrailAdvanced.PointSource {
public abstract class AbstractPointSource : MonoBehaviour {
public int maxPoints = 1000;
protected Deque<Vector3> points;
protected int minimumFreeCapacity = 10;
public Deque... | using Nito;
using System.Collections;
using System.Net.NetworkInformation;
using UnityEngine;
namespace TrailAdvanced.PointSource {
public abstract class AbstractPointSource : MonoBehaviour {
public int maxPoints = 1000;
protected Deque<Vector3> points;
protected int minimumFreeCapacity = 10;
public Deque... |
Reduce the date size for the email subject | namespace Pigeon.Pipelines
{
using System;
using Sitecore.Diagnostics;
public class SetEmailSubject:PigeonPipelineProcessor
{
public override void Process(PigeonPipelineArgs args)
{
Assert.IsNotNull(args,"args != null");
args.Subject = $"[Pigeon] {System.Web.Ho... | namespace Pigeon.Pipelines
{
using System;
using Sitecore.Diagnostics;
public class SetEmailSubject:PigeonPipelineProcessor
{
public override void Process(PigeonPipelineArgs args)
{
Assert.IsNotNull(args,"args != null");
args.Subject = $"[Pigeon] {System.Web.Ho... |
Fix bug with IB instrument addition window | // -----------------------------------------------------------------------
// <copyright file="AddInstrumentInteractiveBrokersWindow.xaml.cs" company="">
// Copyright 2016 Alexander Soffronow Pagonidis
// </copyright>
// -----------------------------------------------------------------------
using MahApps.Metro.Contr... | // -----------------------------------------------------------------------
// <copyright file="AddInstrumentInteractiveBrokersWindow.xaml.cs" company="">
// Copyright 2016 Alexander Soffronow Pagonidis
// </copyright>
// -----------------------------------------------------------------------
using MahApps.Metro.Contr... |
Simplify VoidResult to a value type | namespace StyleCop.Analyzers.Helpers
{
using System.Threading.Tasks;
internal static class SpecializedTasks
{
internal static Task CompletedTask { get; } = Task.FromResult(default(VoidResult));
private sealed class VoidResult
{
private VoidResult()
{
... | namespace StyleCop.Analyzers.Helpers
{
using System.Threading.Tasks;
internal static class SpecializedTasks
{
internal static Task CompletedTask { get; } = Task.FromResult(default(VoidResult));
private struct VoidResult
{
}
}
}
|
Change port of urls in multi tenant admin | using System.Web.Mvc;
using Orchard.Environment.Configuration;
namespace Orchard.MultiTenancy.Extensions {
public static class UrlHelperExtensions {
public static string Tenant(this UrlHelper urlHelper, ShellSettings tenantShellSettings) {
return string.Format(
"http://{... | using System.Web.Mvc;
using Orchard.Environment.Configuration;
namespace Orchard.MultiTenancy.Extensions {
public static class UrlHelperExtensions {
public static string Tenant(this UrlHelper urlHelper, ShellSettings tenantShellSettings) {
//info: (heskew) might not keep the port inserti... |
Add SetComparison to the default build | namespace DeepEquals
{
using System.Collections;
public class DeepComparison
{
public static IEqualityComparer CreateComparer()
{
return new ComparisonComparer(Create());
}
public static CompositeComparison Create()
{
var root = new CompositeComparison();
root.AddRange(
new DefaultComparis... | namespace DeepEquals
{
using System.Collections;
public class DeepComparison
{
public static IEqualityComparer CreateComparer()
{
return new ComparisonComparer(Create());
}
public static CompositeComparison Create()
{
var root = new CompositeComparison();
root.AddRange(
new DefaultComparis... |
Update the docs here, too. | using System.Collections.Generic;
using System.Threading.Tasks;
namespace SparkPost
{
public interface IRecipientLists
{
/// <summary>
/// Creates a recipient list.
/// </summary>
/// <param name="recipientList">The properties of the recipientList to create.</param>
///... | using System.Collections.Generic;
using System.Threading.Tasks;
namespace SparkPost
{
public interface IRecipientLists
{
/// <summary>
/// Creates a recipient list.
/// </summary>
/// <param name="recipientList">The properties of the recipientList to create.</param>
///... |
Use DetectIsJson string extension as opposed to a horrible try/catch | @model dynamic
@using Umbraco.Web.Templates
@{
var embedValue = string.Empty;
try {
embedValue = Model.value.preview;
} catch(Exception ex) {
embedValue = Model.value;
}
}
<div class="video-wrapper">
@Html.Raw(embedValue)
</div>
| @model dynamic
@using Umbraco.Web.Templates
@{
string embedValue = Convert.ToString(Model.value);
embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value;
}
<div class="video-wrapper">
@Html.Raw(embedValue)
</div>
|
Fix `AsNonNull` not working on release configuration | // 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.Diagnostics;
using System.Diagnostics.CodeAnalysis;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// Extensions that apply to... | // 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.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using NUnit.Framework;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// E... |
Update delete signature to use only id | using System.Collections.Generic;
using DapperTesting.Core.Model;
namespace DapperTesting.Core.Data
{
public interface IUserRepository
{
void Create(User user);
void Delete(User user);
User Get(int id);
User Get(string email);
List<User> GetAll();
void Update(U... | using System.Collections.Generic;
using DapperTesting.Core.Model;
namespace DapperTesting.Core.Data
{
public interface IUserRepository
{
void Create(User user);
void Delete(int id);
User Get(int id);
User Get(string email);
List<User> GetAll();
void Update(User... |
Use static import for repeated EditorGUI.* calls | using UnityEditor;
using UnityEngine;
namespace Alensia.Core.I18n
{
[CustomPropertyDrawer(typeof(TranslatableText))]
public class TranslatableTextPropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var tex... | using UnityEditor;
using UnityEngine;
using static UnityEditor.EditorGUI;
namespace Alensia.Core.I18n
{
[CustomPropertyDrawer(typeof(TranslatableText))]
public class TranslatableTextPropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent ... |
Move TestEnvironmentSetUpFixture into project root namespace | using ImplicitNullability.Plugin.Tests;
using JetBrains.Application.BuildScript.Application.Zones;
using JetBrains.ReSharper.TestFramework;
using JetBrains.TestFramework;
using JetBrains.TestFramework.Application.Zones;
using NUnit.Framework;
[assembly: RequiresSTA]
namespace ImplicitNullability.Plugin.Tests
{
[... | using JetBrains.Application.BuildScript.Application.Zones;
using JetBrains.ReSharper.TestFramework;
using JetBrains.TestFramework;
using JetBrains.TestFramework.Application.Zones;
using NUnit.Framework;
[assembly: RequiresSTA]
namespace ImplicitNullability.Plugin.Tests
{
[ZoneDefinition]
public interface IIm... |
Add a 60 sec pause before SQL Server connection | using System.Data;
using System.Threading;
using Evolve.Driver;
using Xunit;
namespace Evolve.Core.Test.Driver
{
public class CoreReflectionBasedDriverTest
{
[Fact(DisplayName = "MicrosoftDataSqliteDriver_works")]
public void MicrosoftDataSqliteDriver_works()
{
var driver = ... | using System.Data;
using System.Threading;
using Evolve.Driver;
using Xunit;
namespace Evolve.Core.Test.Driver
{
public class CoreReflectionBasedDriverTest
{
[Fact(DisplayName = "MicrosoftDataSqliteDriver_works")]
public void MicrosoftDataSqliteDriver_works()
{
var driver = ... |
Fix for nullable doubles in entities | using System;
using Newtonsoft.Json.Linq;
namespace Chronological
{
public class DataType
{
public string TimeSeriesInsightsType { get; }
internal DataType(string dataType)
{
TimeSeriesInsightsType = dataType;
}
internal JProperty ToJProperty()
{
... | using System;
using Newtonsoft.Json.Linq;
namespace Chronological
{
public class DataType
{
public string TimeSeriesInsightsType { get; }
internal DataType(string dataType)
{
TimeSeriesInsightsType = dataType;
}
internal JProperty ToJProperty()
{
... |
Make interface test more interesting | using System;
interface IFlyable
{
void Fly();
string Name { get; }
}
class Bird : IFlyable
{
public Bird() { }
public string Name => "Bird";
public void Fly()
{
Console.WriteLine("Chirp");
}
}
class Plane : IFlyable
{
public Plane() { }
public string Name => "Plane";
... | using System;
interface IFlyable
{
void Fly();
string Name { get; }
}
class Bird : IFlyable
{
public Bird()
{
Name = "Bird";
}
public string Name { get; private set; }
public void Fly()
{
Console.WriteLine("Chirp");
}
}
class Plane : IFlyable
{
public Plane()... |
Update binding redirects for 0.3.0 builds | // 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.VisualStudio.Shell;
// Add binding redirects for each assembly we ship in VS. This is required so that these assemblies show
// up in ... | // 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.VisualStudio.Shell;
// Add binding redirects for each assembly we ship in VS. This is required so that these assemblies show
// up in ... |
Use cross platform compatible paths for debug run. | using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
namespace IronAHK
{
partial class Program
{
const bool debug =
#if DEBUG
true
#else
false
#endif
;
[Conditional("DEBUG"), DllImport("kernel32.dll")]
static extern void AllocConsole();
... | using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
namespace IronAHK
{
partial class Program
{
const bool debug =
#if DEBUG
true
#else
false
#endif
;
[Conditional("DEBUG"), DllImport("kernel32.dll")]
static extern void AllocConsole();
... |
Remove weird vestigial `Current` reimplementation | // 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;
using osu.Game.Graphics.Sprites;
using osu.Game.Screens.Play.HUD;
using osuTK;
namespace osu.Game.Skinning
{... | // 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.Game.Graphics.Sprites;
using osu.Game.Screens.Play.HUD;
using osuTK;
namespace osu.Game.Skinning
{
public class LegacyScoreCo... |
Use full URI rather than CURIE for property type | using System.Collections.Generic;
using BrightstarDB.EntityFramework;
namespace BrightstarDB.Samples.EntityFramework.FoafCore
{
[Entity("http://xmlns.com/foaf/0.1/Person")]
public interface IPerson
{
[Identifier("http://www.brightstardb.com/people/")]
string Id { get; }
[PropertyT... | using System.Collections.Generic;
using BrightstarDB.EntityFramework;
namespace BrightstarDB.Samples.EntityFramework.FoafCore
{
[Entity("http://xmlns.com/foaf/0.1/Person")]
public interface IPerson
{
[Identifier("http://www.brightstardb.com/people/")]
string Id { get; }
[PropertyT... |
Test broken by QueryWrapper.ShouldContain issue | namespace Nancy.Testing.Tests
{
using System.IO;
using System.Linq;
using System.Text;
using Nancy;
using Nancy.Tests;
using Xunit;
public class BrowserResponseBodyWrapperFixture
{
[Fact]
public void Should_contain_response_body()
{
// ... | namespace Nancy.Testing.Tests
{
using System.IO;
using System.Linq;
using System.Text;
using Nancy;
using Nancy.Tests;
using Xunit;
public class BrowserResponseBodyWrapperFixture
{
[Fact]
public void Should_contain_response_body()
{
// ... |
Add new test for String.SubstringRightSafe | #region Using
using System;
using NUnit.Framework;
#endregion
namespace PortableExtensions.Testing
{
[TestFixture]
public partial class StringExTest
{
[TestCase]
public void SubstringRightSafeTestCase()
{
var actual = "testabc".SubstringRightSafe( 3 );
Ass... | #region Using
using System;
using NUnit.Framework;
#endregion
namespace PortableExtensions.Testing
{
[TestFixture]
public partial class StringExTest
{
[TestCase]
public void SubstringRightSafeTestCase()
{
var actual = "testabc".SubstringRightSafe( 3 );
Ass... |
Change - Consolidated sub-expressions unit-tests. | using Newtonsoft.Json.Linq;
using Xunit;
using DevLab.JmesPath.Expressions;
using DevLab.JmesPath.Utils;
namespace jmespath.net.tests.Expressions
{
public class JmesPathSubExpressionTest
{
[Fact]
public void JmesPathSubExpression_identifier()
{
const string json ... | using Newtonsoft.Json.Linq;
using Xunit;
using DevLab.JmesPath.Expressions;
using DevLab.JmesPath.Utils;
namespace jmespath.net.tests.Expressions
{
public class JmesPathSubExpressionTest
{
/*
* http://jmespath.org/specification.html#subexpressions
*
* search(foo.... |
Add triple variant of Zip as IEnumerable<> extension | using System.Collections.Generic;
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);
}
}
| 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... |
Fix Slowest() and Fastest() extension methods | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="MeasurementGroupExtensions.cs" company="Catel development team">
// Copyright (c) 2008 - 2016 Catel development team. All rights reserved.
// </copyright>
// -------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="MeasurementGroupExtensions.cs" company="Catel development team">
// Copyright (c) 2008 - 2016 Catel development team. All rights reserved.
// </copyright>
// -------------------... |
Fix model position translation for header views. | using System;
using System.Linq;
using Android.OS;
using Android.Util;
using Android.Views;
using Android.Widget;
using Toggl.Joey.UI.Adapters;
using ListFragment = Android.Support.V4.App.ListFragment;
namespace Toggl.Joey.UI.Fragments
{
public class RecentTimeEntriesListFragment : ListFragment
{
publ... | using System;
using System.Linq;
using Android.OS;
using Android.Util;
using Android.Views;
using Android.Widget;
using Toggl.Joey.UI.Adapters;
using ListFragment = Android.Support.V4.App.ListFragment;
namespace Toggl.Joey.UI.Fragments
{
public class RecentTimeEntriesListFragment : ListFragment
{
publ... |
Change putMessage function to prevent double serialization. | using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Queue;
namespace AzureStorage.Queue
{
public class AzureQueue<T> : IAzureQueue<T> where T : class
{
private readonly CloudQueue _queue;
public AzureQueue(string conectionString, string qu... | using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Queue;
namespace AzureStorage.Queue
{
public class AzureQueue<T> : IAzureQueue<T> where T : class
{
private readonly CloudQueue _queue;
public AzureQueue(string conectionString, string qu... |
Fix bug with edit/view non-domain users with enabled domain integration | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
namespace Bonobo.Git.Server
{
public class UsernameUrl
{
//to allow support for email addresses as user names, only encode/decode user name if it is no... | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
namespace Bonobo.Git.Server
{
public class UsernameUrl
{
//to allow support for email addresses as user names, only encode/decode user name if it is no... |
Fix wrong namespace beeing used in TitanTest | using Titan.Sharecode;
using Xunit;
namespace TitanTest
{
public class ShareCodeDecoderTest
{
[Fact]
public void TestDecoder()
{
if(ShareCode.Decode("CSGO-727c4-5oCG3-PurVX-sJkdn-LsXfE").MatchID == 3208347562318757960)
{
Assert.True(true, "The d... | using Titan.MatchID.Sharecode;
using Xunit;
namespace TitanTest
{
public class ShareCodeDecoderTest
{
[Fact]
public void TestDecoder()
{
if(ShareCode.Decode("CSGO-727c4-5oCG3-PurVX-sJkdn-LsXfE").MatchID == 3208347562318757960)
{
Assert.True(true... |
Handle "null" data values from Lassie API | using Eurofurence.App.Server.Services.Abstractions.Lassie;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
namespace Eurofurence.App.Server.Services.Lassie
{
public class LassieApiClient : ILassieApiClient
{
private class DataResponseWrappe... | using Eurofurence.App.Server.Services.Abstractions.Lassie;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
namespace Eurofurence.App.Server.Services.Lassie
{
public class LassieApiClient : ILassieApiClient
{
private class DataResponseWrappe... |
Add unit tests for enum access token grant type read and write. | namespace TraktApiSharp.Tests.Enums
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Enums;
[TestClass]
public class TraktAccessTokenGrantTypeTests
{
[TestMethod]
public void TestTraktAccessTokenGrantTypeHasMembers()
{
... | namespace TraktApiSharp.Tests.Enums
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using TraktApiSharp.Enums;
[TestClass]
public class TraktAccessTokenGrantTypeTests
{
class TestObject
{
[JsonConverter(typeof... |
Add more complex array test to hello app | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AttributeRouting;
namespace NServiceMVC.Examples.HelloWorld.Controllers
{
public class ArraySampleController : ServiceController
{
//
// GET: /ArraySample/
[G... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AttributeRouting;
namespace NServiceMVC.Examples.HelloWorld.Controllers
{
public class ArraySampleController : ServiceController
{
//
// GET: /ArraySample/
[G... |
Make the MVC content verification test explicitly pass the framework | using Xunit;
namespace Microsoft.TemplateEngine.Cli.UnitTests
{
public class PrecedenceSelectionTests : EndToEndTestBase
{
[Theory(DisplayName = nameof(VerifyTemplateContent))]
[InlineData("mvc", "MvcNoAuthTest.json", "MvcFramework20Test.json")]
[InlineData("mvc -au individual", "MvcInd... | using Xunit;
namespace Microsoft.TemplateEngine.Cli.UnitTests
{
public class PrecedenceSelectionTests : EndToEndTestBase
{
[Theory(DisplayName = nameof(VerifyTemplateContent))]
[InlineData("mvc -f netcoreapp2.0", "MvcNoAuthTest.json", "MvcFramework20Test.json")]
[InlineData("mvc -au ind... |
Fix bug where property names were always named the p1 name. | namespace Microsoft.ApplicationInsights.Extensibility.AggregateMetrics
{
using System.Globalization;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility.Implementation;
internal static class MetricTelemetryExtensions
{
internal static void ... | namespace Microsoft.ApplicationInsights.Extensibility.AggregateMetrics
{
using System.Globalization;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility.Implementation;
internal static class MetricTelemetryExtensions
{
internal static void ... |
Add unit test to save and VALIDATE file in given non-en-US culture. | using ClosedXML.Excel;
using NUnit.Framework;
using System.IO;
namespace ClosedXML_Tests.Excel.Saving
{
[TestFixture]
public class SavingTests
{
[Test]
public void CanSuccessfullySaveFileMultipleTimes()
{
using (var wb = new XLWorkbook())
{
v... | using ClosedXML.Excel;
using NUnit.Framework;
using System.Globalization;
using System.IO;
using System.Threading;
namespace ClosedXML_Tests.Excel.Saving
{
[TestFixture]
public class SavingTests
{
[Test]
public void CanSuccessfullySaveFileMultipleTimes()
{
using (var wb... |
Fix font not loading in initial dialogue | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class DatingSimDialogueController : MonoBehaviour
{
public float introTextDelay;
[Tooltip("If set to >0 will slow down or speed up text advance to complete it in this time")]
public float introTextForceCompl... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class DatingSimDialogueController : MonoBehaviour
{
public float introTextDelay;
[Tooltip("If set to >0 will slow down or speed up text advance to complete it in this time")]
public float introTextForceCompl... |
Convert to new Visual Studio project types | // Copyright (c) SimControl e.U. - Wilhelm Medetz. See LICENSE.txt in the project root for more information.
#if false
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
// TODO: CR
namespace SimControl.Reactive
{
//public class ObservedState: INo... | // Copyright (c) SimControl e.U. - Wilhelm Medetz. See LICENSE.txt in the project root for more information.
#if false
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
// TODO: CR
namespace SimControl.Reactive
{
//public class ObservedState: INo... |
Fix overlined playlist test scene not working | // 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.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi;
using osu.Game.Tests.Be... | // 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.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi;
using osu.Game.Tests.Be... |
Fix not setting custom scheme response status text correctly | using System.IO;
using System.Net;
using System.Text;
using CefSharp;
using TweetLib.Browser.Interfaces;
using TweetLib.Browser.Request;
namespace TweetDuck.Browser.Adapters {
internal sealed class CefSchemeResourceVisitor : ISchemeResourceVisitor<IResourceHandler> {
public static CefSchemeResourceVisitor Instance ... | using System;
using System.IO;
using System.Net;
using CefSharp;
using TweetLib.Browser.Interfaces;
using TweetLib.Browser.Request;
namespace TweetDuck.Browser.Adapters {
internal sealed class CefSchemeResourceVisitor : ISchemeResourceVisitor<IResourceHandler> {
public static CefSchemeResourceVisitor Instance { get... |
Fix for Deserialization of complex objects | using System;
using CQRS.Light.Contracts;
using Newtonsoft.Json;
namespace CQRS.Light.Core
{
public class JsonSerializationStrategy : ISerializationStrategy
{
public string Serialize(object @object)
{
return JsonConvert.SerializeObject(@object);
}
public object Des... | using System;
using CQRS.Light.Contracts;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace CQRS.Light.Core
{
public class JsonSerializationStrategy : ISerializationStrategy
{
private readonly JsonSeriali... |
Support loading bitmaps from resources. | // Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Globalization;
using OmniXaml.TypeConversion;
using Perspex.Media.Imaging;
namespace Perspex.Markup.Xaml.Converters
{
publi... | // Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Globalization;
using OmniXaml.TypeConversion;
using Perspex.Media.Imaging;
using Perspex.Platform;
namespace Perspex.Markup.Xam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.