Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Revert "Added method to perform validity check for effect parameters" | namespace SoxSharp.Effects
{
public abstract class BaseEffect : IBaseEffect
{
public abstract string Name { get; }
public virtual bool IsValid() { return true; }
public abstract override string ToString();
}
}
| namespace SoxSharp.Effects
{
public abstract class BaseEffect : IBaseEffect
{
public abstract string Name { get; }
public abstract override string ToString();
}
}
|
Add IsFilterActive; remove unneeded parameters for filter method (pass it on ctor) | using System;
using System.Collections.Generic;
using System.Linq;
using PrepareLanding.Extensions;
using RimWorld;
using RimWorld.Planet;
using UnityEngine;
using Verse;
namespace PrepareLanding.Filters
{
public abstract class TileFilter : ITileFilter
{
protected List<int> _filteredTiles = new List<i... | using System;
using System.Collections.Generic;
using System.Linq;
using PrepareLanding.Extensions;
using RimWorld;
using RimWorld.Planet;
using UnityEngine;
using Verse;
namespace PrepareLanding.Filters
{
public abstract class TileFilter : ITileFilter
{
protected List<int> _filteredTiles = new List<i... |
Update description, version and remove ComVisible | using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("NModbus4")]
[assembly: AssemblyProduct("NModbus4")]
[assembly: AssemblyCompany("Maxwe11")]
[assembly: AssemblyCopyright("Licensed under MIT License.")]
[assembly: Assem... | using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("NModbus4")]
[assembly: AssemblyProduct("NModbus4")]
[assembly: AssemblyCompany("Maxwe11")]
[assembly: AssemblyCopyright("Licensed under MIT License.")]
[assembly: Assem... |
Increase version number to 1.2.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("Com... | 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("Com... |
Fix typos in cluster reroute explanation | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Nest
{
[JsonObject]
public class ClusterRerouteExplanation
{
[JsonProperty("command")]
public string Comand { get; set; }
[JsonProperty("parameters")]
public ClusterRerouteParameters Pa... | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Nest
{
[JsonObject]
public class ClusterRerouteExplanation
{
[JsonProperty("command")]
public string Command { get; set; }
[JsonProperty("parameters")]
public ClusterRerouteParameters P... |
Correct the sand box to catch exception if a non-CLR dll is present. | using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace AgateLib.Drivers
{
class AgateSandBoxLoader : MarshalByRefObject
{
public AgateDriverInfo[] ReportDrivers(string file)
{
List<AgateDriverInfo> retval = new List<AgateDri... | using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace AgateLib.Drivers
{
class AgateSandBoxLoader : MarshalByRefObject
{
public AgateDriverInfo[] ReportDrivers(string file)
{
List<AgateDriverInfo> retval = new List<AgateDri... |
Make html template container builder public. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.IsolatedStorage;
namespace Cassette
{
class HtmlTemplateModuleContainerBuilder : ModuleContainerBuilder
{
readonly string applicationRoot;
public HtmlTemplateModuleContainerBuilde... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.IsolatedStorage;
namespace Cassette
{
public class HtmlTemplateModuleContainerBuilder : ModuleContainerBuilder
{
readonly string applicationRoot;
public HtmlTemplateModuleContaine... |
Fix null ref access when texture panel is open and you hover over a texture that failed to load. | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Assimp;
namespace open3mod
{
public partial class TextureDetailsDialog : Form
... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Assimp;
namespace open3mod
{
public partial class TextureDetailsDialog : Form
... |
Use CurrentLocation.ProviderPath to get actual file system path | using System.Management.Automation;
namespace PoshGit2
{
class PSCurrentWorkingDirectory : ICurrentWorkingDirectory
{
private SessionState _sessionState;
public PSCurrentWorkingDirectory(SessionState sessionState)
{
_sessionState = sessionState;
}
... | using System.Management.Automation;
namespace PoshGit2
{
class PSCurrentWorkingDirectory : ICurrentWorkingDirectory
{
private SessionState _sessionState;
public PSCurrentWorkingDirectory(SessionState sessionState)
{
_sessionState = sessionState;
}
... |
Fix osu! mode adding combos twice. | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game.Modes... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game.Modes... |
Test to have json overall anser | using System;
using Nancy;
namespace MicroServicesHelloWorld{
public class CurrentDateTimeModule: NancyModule
{
public CurrentDateTimeModule()
{
Get("/", _ => DateTime.UtcNow);
}
}
} | using System;
using Nancy;
namespace MicroServicesHelloWorld{
public class CurrentDateTimeModule: NancyModule
{
public CurrentDateTimeModule()
{
Get("/", _ => {
var response = (Response)("\""+DateTime.UtcNow.ToString()+"\"");
response.ContentType = "application/json"... |
Fix typo in the CbxBundle refactoring causing the bytecode to not get copied to exported projects. | using System.Collections.Generic;
namespace Wax
{
public class CbxBundleView : JsonBasedObject
{
public string ByteCode { get { return this.GetString("byteCode"); } set { this.SetString("byteCode", value); } }
public ResourceDatabase ResourceDB { get { return this.GetObject("resources")... | using System.Collections.Generic;
namespace Wax
{
public class CbxBundleView : JsonBasedObject
{
public string ByteCode { get { return this.GetString("byteCode"); } set { this.SetString("byteCode", value); } }
public ResourceDatabase ResourceDB { get { return this.GetObject("resources")... |
Add Custom Error Page and Routing | using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Portal.CMS.Web
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(Rout... | using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Portal.CMS.Web
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(Rout... |
Throw better exception for invalid interfaces | // 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.Reflection;
using System.Reflection.Metadata;
using System.Threading;
using Debug = Syste... | // 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.Reflection;
using System.Reflection.Metadata;
using System.Threading;
using Debug = Syste... |
Add label to the node colour key explaining what it is | using Gtk;
using SlimeSimulation.Controller.WindowComponentController;
namespace SlimeSimulation.View.WindowComponent
{
public class NodeHighlightKey
{
public Widget GetVisualKey()
{
VBox key = new VBox(true, 10);
HBox sourcePart = new HBox(true, 10);
source... | using Gtk;
using SlimeSimulation.Controller.WindowComponentController;
namespace SlimeSimulation.View.WindowComponent
{
public class NodeHighlightKey
{
public Widget GetVisualKey()
{
VBox key = new VBox(true, 10);
key.Add(new Label("Node colour key"));
var ... |
Add shipment for physical goods | using System;
using System.Collections.Generic;
namespace conekta
{
public class Details
{
public string name { get; set; }
public string phone { get; set; }
public string email { get; set; }
public Customer customer { get; set; }
public List<LineItem> line_items { get; set; }
public BillingAddress bill... | using System;
using System.Collections.Generic;
namespace conekta
{
public class Details
{
public string name { get; set; }
public string phone { get; set; }
public string email { get; set; }
public Customer customer { get; set; }
public List<LineItem> line_items { get; set; }
public BillingAddress bill... |
Replace precision check with absolute equality assert | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Utils;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screen... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Utils;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screen... |
Fix incorrect return type for spotlight request | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetSpotlightsRequest : APIRequ... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using Newtonsoft.Json;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetSpot... |
Throw exception if BMP version != 3 | using System;
using System.Linq;
using BmpListener;
using BmpListener.Extensions;
namespace BmpListener.Bmp
{
public class BmpHeader
{
public BmpHeader(byte[] data)
{
Version = data.First();
//if (Version != 3)
//{
// throw new Exception("inva... | using System;
using System.Linq;
using BmpListener;
using BmpListener.Extensions;
namespace BmpListener.Bmp
{
public class BmpHeader
{
private readonly int bmpVersion = 3;
public BmpHeader(byte[] data)
{
Version = data.First();
if (Version != bmpVersion)
... |
Fix issues on first run, which takes a little longer to start up | using System;
using System.Net.Http;
using System.Threading;
using PactNet.Core;
namespace PactNet.Mocks.MockHttpService.Host
{
internal class RubyHttpHost : IHttpHost
{
private readonly IPactCoreHost _coreHost;
private readonly HttpClient _httpClient;
internal RubyHttpHost... | using System;
using System.Net.Http;
using System.Threading;
using PactNet.Core;
namespace PactNet.Mocks.MockHttpService.Host
{
internal class RubyHttpHost : IHttpHost
{
private readonly IPactCoreHost _coreHost;
private readonly HttpClient _httpClient;
internal RubyHttpHost... |
Add argument checking on commit | using System;
using System.Collections.Generic;
using System.Threading;
namespace CollabEdit.VersionControl
{
public class RepositoryBranch<TValue, TMeta>
{
private object syncRoot = new Object();
public RepositoryBranch() { }
public RepositoryBranch(string name, Repository<TValue, T... | using System;
using System.Collections.Generic;
using System.Threading;
namespace CollabEdit.VersionControl
{
public class RepositoryBranch<TValue, TMeta>
{
private object syncRoot = new Object();
public RepositoryBranch() { }
public RepositoryBranch(string name, Repository<TValue, T... |
Add form for setting balance in one step | @model Cash_Flow_Projection.Models.Dashboard
@{
ViewData["Title"] = "Home Page";
}
<table class="table table-striped">
@foreach (var entry in Model.Entries.OrderBy(_ => _.Date))
{
<tr>
<td>@Html.DisplayFor(_ => entry.Date)</td>
<td>@Html.DisplayFor(_ => entry.Description)<... | @model Cash_Flow_Projection.Models.Dashboard
@{
ViewData["Title"] = "Home Page";
}
@using (Html.BeginForm("Balance", "Home", FormMethod.Post))
{
@Html.AntiForgeryToken()
<input type="text" id="balance" placeholder="Set Balance" />
<button type="submit">Set</button>
}
<table class="table table-stripe... |
Move variable to inner scope where it's used | using UnityEngine;
using System;
using System.Collections;
public class MapifyLevelPopulator {
private MapifyMapIterator mapIterator;
private MapifyTileRepository tileRepository;
private Transform container;
public MapifyLevelPopulator(MapifyMapIterator mapIterator, MapifyTileRepository tileRepository, Trans... | using UnityEngine;
using System;
using System.Collections;
public class MapifyLevelPopulator {
private MapifyMapIterator mapIterator;
private MapifyTileRepository tileRepository;
private Transform container;
public MapifyLevelPopulator(MapifyMapIterator mapIterator, MapifyTileRepository tileRepository, Trans... |
Correct typo (just caught my eye, no biggie). | using System.Globalization;
namespace Our.Umbraco.Ditto.Tests.Models
{
using System.ComponentModel;
using Our.Umbraco.Ditto.Tests.TypeConverters;
using global::Umbraco.Core.Models;
public class ComplexModel
{
public int Id { get; set; }
[DittoValueResolver(typeof(NameVauleResovl... | using System.Globalization;
namespace Our.Umbraco.Ditto.Tests.Models
{
using System.ComponentModel;
using Our.Umbraco.Ditto.Tests.TypeConverters;
using global::Umbraco.Core.Models;
public class ComplexModel
{
public int Id { get; set; }
[DittoValueResolver(typeof(NameValueResovl... |
Add retry when invoking the lazy to build TagDictionary | using System;
using System.Collections.Generic;
using System.IO;
using FifteenBelow.Deployment.Update;
namespace Ensconce
{
internal static class TextRendering
{
private static readonly Lazy<TagDictionary> LazyTags = new Lazy<TagDictionary>(BuildTagDictionary);
public static IDictionary<string,... | using System;
using System.Collections.Generic;
using System.IO;
using FifteenBelow.Deployment.Update;
namespace Ensconce
{
internal static class TextRendering
{
private static readonly Lazy<TagDictionary> LazyTags = new Lazy<TagDictionary>(() => Retry.Do(BuildTagDictionary, TimeSpan.FromSeconds(5)));
... |
Change Pick 'position' property to int as it represents position in team | using Newtonsoft.Json;
namespace FplClient.Data
{
public class FplPick
{
[JsonProperty("element")]
public int PlayerId { get; set; }
[JsonProperty("element_type")]
public int ElementType { get; set; }
[JsonProperty("position")]
public FplPlayerPosition Positio... | using Newtonsoft.Json;
namespace FplClient.Data
{
public class FplPick
{
[JsonProperty("element")]
public int PlayerId { get; set; }
[JsonProperty("element_type")]
public int ElementType { get; set; }
[JsonProperty("position")]
public int TeamPosition { get; s... |
Replace Enumerable.Repeat call with an one-element array. | using System.Collections.Generic;
using System.Linq;
namespace NuGet.VisualStudio {
public static class AggregatePackageSource {
public static readonly PackageSource Instance = new PackageSource("(Aggregate source)", Resources.VsResources.AggregateSourceName);
public static bool IsAggregat... | using System.Collections.Generic;
using System.Linq;
namespace NuGet.VisualStudio {
public static class AggregatePackageSource {
public static readonly PackageSource Instance = new PackageSource("(Aggregate source)", Resources.VsResources.AggregateSourceName);
public static bool IsAggregat... |
Add integration tests for MalUserNotFoundException being thrown. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using MalApi;
namespace MalApi.IntegrationTests
{
[TestFixture]
public class GetAnimeListForUserTest
{
[Test]
public void GetAnimeListForUser()
{
string username... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using MalApi;
using System.Threading.Tasks;
namespace MalApi.IntegrationTests
{
[TestFixture]
public class GetAnimeListForUserTest
{
[Test]
public void GetAnimeListForUser()
... |
Improve the efficiency of puzzle 12 | // Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing the sol... | // Copyright (c) Martin Costello, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.ProjectEuler.Puzzles
{
using System;
using System.Linq;
/// <summary>
/// A class representing the sol... |
Make RemoteService a Duplex Service | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace SPAD.neXt.Interfaces.ServiceContract
{
public sealed class RemoteServiceResponse
{
public bool HasError { get; set; }
public string Error { ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace SPAD.neXt.Interfaces.ServiceContract
{
public static class RemoteServiceContract
{
public static readonly Uri ServiceUrl = new Uri("net.pipe://local... |
Update StreamWriter tests + Explicitly iterate IEnumerable method | namespace Host.UnitTests.Serialization
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Crest.Host.Serialization;
using FluentAssertions;
using Xunit;
public class MethodsTests
{
private readon... | namespace Host.UnitTests.Serialization
{
using System.Collections;
using System.Linq;
using Crest.Host.Serialization;
using FluentAssertions;
using Xunit;
public class MethodsTests
{
private readonly Methods methods = new Methods(typeof(FakeSerializerBase));
public sealed ... |
Add more information to failed Hooks | using System;
using Mono.Cecil;
using Mono.Cecil.Inject;
using Pathfinder.Attribute;
using Pathfinder.Util;
namespace Pathfinder.Internal.Patcher
{
internal static class Executor
{
internal static void Main(AssemblyDefinition gameAssembly)
{
// Retrieve the hook methods
... | using System;
using Mono.Cecil;
using Mono.Cecil.Inject;
using Pathfinder.Attribute;
using Pathfinder.Util;
namespace Pathfinder.Internal.Patcher
{
internal static class Executor
{
internal static void Main(AssemblyDefinition gameAssembly)
{
// Retrieve the hook methods
... |
Fix json serialization when the destination type is equal to the value type (fixes net40 for boolean conversions) | using System;
using Newtonsoft.Json;
using System.Reflection;
using System.Collections.Generic;
using System.ComponentModel;
namespace Eto.Serialization.Json
{
public class TypeConverterConverter : JsonConverter
{
readonly Dictionary<Type, TypeConverter> converters = new Dictionary<Type, TypeConverter>();
publ... | using System;
using Newtonsoft.Json;
using System.Reflection;
using System.Collections.Generic;
using System.ComponentModel;
namespace Eto.Serialization.Json
{
public class TypeConverterConverter : JsonConverter
{
readonly Dictionary<Type, TypeConverter> converters = new Dictionary<Type, TypeConverter>();
publ... |
Change assembly watcher after notification changes | using Godot;
using GodotTools.Internals;
using static GodotTools.Internals.Globals;
namespace GodotTools
{
public class HotReloadAssemblyWatcher : Node
{
private Timer watchTimer;
public override void _Notification(int what)
{
if (what == Node.NotificationWmFocusIn)
... | using Godot;
using GodotTools.Internals;
using static GodotTools.Internals.Globals;
namespace GodotTools
{
public class HotReloadAssemblyWatcher : Node
{
private Timer watchTimer;
public override void _Notification(int what)
{
if (what == Node.NotificationWmWindowFocusIn)
... |
Change test to map with allign with initial design and documentation | using NBi.Core.Query;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Testing.Unit.Core.Query
{
[TestFixture]
public class CommandBuilderTest
{
[Test]
public void Build_TimeoutSpecified... | using NBi.Core.Query;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Testing.Unit.Core.Query
{
[TestFixture]
public class CommandBuilderTest
{
[Test]
public void Build_TimeoutSpecified... |
Revert "sandbox demo of shutdown cancel." | using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
namespace Sandbox
{
public class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationComplete... | using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
namespace Sandbox
{
public class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationComplete... |
Fix external fonts loading example (use folders to seek fonts) | using System;
using Aspose.Slides.Export;
using Aspose.Slides.Charts;
using Aspose.Slides;
/*
This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Slides for .NET API reference
when the project is build. Please check https://docs.nuget.org/consume/nuget-faq for more information.
If you do ... | using System;
using Aspose.Slides.Export;
using Aspose.Slides.Charts;
using Aspose.Slides;
/*
This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Slides for .NET API reference
when the project is build. Please check https://docs.nuget.org/consume/nuget-faq for more information.
If you do ... |
Add new employment fields for change employer (Portable) | using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Api.Types.Requests
{
public class CreateChangeOfPartyRequestRequest : SaveDataRequest
{
public ChangeOfPartyRequestType ChangeOfPartyRequestType { get; set; }
public long NewPartyId { get; set; }
public int... | using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Api.Types.Requests
{
public class CreateChangeOfPartyRequestRequest : SaveDataRequest
{
public ChangeOfPartyRequestType ChangeOfPartyRequestType { get; set; }
public long NewPartyId { get; set; }
public int... |
Change the UpdateManager's version to 2.0.1 | using System;
namespace UpdateManager
{
public class UpdateManagerUpdateable : IUpdateable
{
private UpdateManagerUpdateable() { }
private static UpdateManagerUpdateable _Instance { get; set; }
public static UpdateManagerUpdateable Instance
{
get
{
... | using System;
namespace UpdateManager
{
public class UpdateManagerUpdateable : IUpdateable
{
private UpdateManagerUpdateable() { }
private static UpdateManagerUpdateable _Instance { get; set; }
public static UpdateManagerUpdateable Instance
{
get
{
... |
Fix typo in test message. | using System;
using System.Xml;
using Arkivverket.Arkade.Core;
namespace Arkivverket.Arkade.Tests.Noark5
{
public class NumberOfArchives : BaseTest
{
public const string AnalysisKeyArchives = "Archives";
public NumberOfArchives(IArchiveContentReader archiveReader) : base(TestType.Content, arch... | using System;
using System.Xml;
using Arkivverket.Arkade.Core;
namespace Arkivverket.Arkade.Tests.Noark5
{
public class NumberOfArchives : BaseTest
{
public const string AnalysisKeyArchives = "Archives";
public NumberOfArchives(IArchiveContentReader archiveReader) : base(TestType.Content, arch... |
Update CreatedOn or MmodifiedOn properties of tracked entities when saving changes. | using LanguageSchoolApp.Data.Model;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LanguageSchoolApp.Data
{
public class MsSqlDbContext : IdentityDbC... | using LanguageSchoolApp.Data.Model;
using LanguageSchoolApp.Data.Model.Contracts;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LanguageSchoolApp.Data
{... |
Revert "Removed Guid from iOS project" | 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("Ap... | 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("Ap... |
Remove + cleanup warnings. Refactor pass. | using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace Engine {
public class BaseEngine : BaseEngineObject {
public BaseEngine() {
}
public virtual void Tick(float deltaTime) {
}
}
} | using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace Engine {
public class BaseEngine : BaseEngineObject {
public BaseEngine() {
}
public virtual void Tick(float deltaTime) {
}
}
} |
Remove unnecessary call to Trim | using System;
using System.Linq;
using AutoMapper;
namespace PicklesDoc.Pickles.ObjectModel
{
public class KeywordResolver : ITypeConverter<string, Keyword>
{
private readonly string language;
public KeywordResolver(string language)
{
this.language = language;
}
... | using System;
using System.Linq;
using AutoMapper;
namespace PicklesDoc.Pickles.ObjectModel
{
public class KeywordResolver : ITypeConverter<string, Keyword>
{
private readonly string language;
public KeywordResolver(string language)
{
this.language = language;
}
... |
Remove the 'IgnoreHidden' parameter from ITorrentFileSource | using System;
using System.Collections.Generic;
using System.Text;
namespace MonoTorrent.Common
{
public interface ITorrentFileSource
{
IEnumerable<FileMapping> Files { get; }
bool IgnoreHidden { get; }
string TorrentName { get; }
}
}
| using System;
using System.Collections.Generic;
using System.Text;
namespace MonoTorrent.Common
{
public interface ITorrentFileSource
{
IEnumerable<FileMapping> Files { get; }
string TorrentName { get; }
}
}
|
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... |
Make TabControl test label more clear | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Diagnostics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Scr... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Screens.Testing;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterfac... |
Add artificial wait to fix tests | using System;
using System.Net.Http;
using System.Threading.Tasks;
using GlobalExceptionHandler.Tests.WebApi.Fixtures;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
using Shouldly;
using Xunit;
namespace GlobalExceptionHand... | using System;
using System.Net.Http;
using System.Threading.Tasks;
using GlobalExceptionHandler.Tests.WebApi.Fixtures;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
using Shouldly;
using Xunit;
namespace GlobalExceptionHand... |
Increase logging to Verbose for examples | using System;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/home";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
private const bool debuggingSubProc... | using System;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/home";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
private const bool debuggingSubProc... |
Rewrite markup for password reminder form | @model ForgotPasswordViewModel
@{
ViewData["Title"] = "Forgot your password?";
}
<h2>@ViewData["Title"].</h2>
<p>
For more information on how to enable reset password please see this <a href="http://go.microsoft.com/fwlink/?LinkID=532713">article</a>.
</p>
@*<form asp-controller="Account" asp-action... | @model ForgotPasswordViewModel
@{
ViewData["Title"] = "Forgot your password?";
}
<h2>@ViewData["Title"].</h2>
<p>
For more information on how to enable reset password please see this <a href="http://go.microsoft.com/fwlink/?LinkID=532713">article</a>.
</p>
@*
<form asp-controller="Account" asp-action... |
Add a and x ions | using System.Collections.Generic;
namespace EngineLayer
{
static class ProductTypeToTerminusType
{
public static TerminusType IdentifyTerminusType(List<ProductType> lp)
{
if ((lp.Contains(ProductType.B) || lp.Contains(ProductType.BnoB1ions) || lp.Contains(ProductType.C)) && (lp.Con... | using System.Collections.Generic;
namespace EngineLayer
{
static class ProductTypeToTerminusType
{
public static TerminusType IdentifyTerminusType(List<ProductType> lp)
{
if ((lp.Contains(ProductType.B) || lp.Contains(ProductType.BnoB1ions) || lp.Contains(ProductType.C) || lp.Conta... |
Remove unneeded setting of SqlParameter.Offset | namespace NServiceBus
{
using System;
using System.Data.Common;
using System.Data.SqlClient;
public abstract partial class SqlDialect
{
/// <summary>
/// Microsoft SQL Server
/// </summary>
public partial class MsSqlServer : SqlDialect
{
/// <summ... | namespace NServiceBus
{
using System;
using System.Data.Common;
public abstract partial class SqlDialect
{
/// <summary>
/// Microsoft SQL Server
/// </summary>
public partial class MsSqlServer : SqlDialect
{
/// <summary>
/// Microsoft SQ... |
Use Enum.Parse overload available in PCL | using System;
namespace EvilDICOM.Core.Helpers
{
public class EnumHelper
{
public static T StringToEnum<T>(string name)
{
return (T) Enum.Parse(typeof (T), name);
}
}
} | using System;
namespace EvilDICOM.Core.Helpers
{
public class EnumHelper
{
public static T StringToEnum<T>(string name)
{
return (T) Enum.Parse(typeof (T), name, false);
}
}
} |
Add [Authorize] to ExecuteCommand action | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WhitelistExecuter.Lib;
using WhitelistExecuter.Web.Models;
namespace WhitelistExecuter.Web.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WhitelistExecuter.Lib;
using WhitelistExecuter.Web.Filters;
using WhitelistExecuter.Web.Models;
namespace WhitelistExecuter.Web.Controllers
{
public class HomeController : Controller
{
... |
Fix for a crash that can occur while exporting from the level editor - falling back to the global scene manager if we can't find a scene manager attached to the dom node tree | // Copyright 2015 XLGAMES Inc.
//
// Distributed under the MIT License (See
// accompanying file "LICENSE" or the website
// http://www.opensource.org/licenses/mit-license.php)
using System;
using Sce.Atf.Adaptation;
namespace LevelEditorXLE.Extensions
{
internal static class ExtensionsClass
{
intern... | // Copyright 2015 XLGAMES Inc.
//
// Distributed under the MIT License (See
// accompanying file "LICENSE" or the website
// http://www.opensource.org/licenses/mit-license.php)
using System;
using Sce.Atf.Adaptation;
namespace LevelEditorXLE.Extensions
{
internal static class ExtensionsClass
{
intern... |
Add integration tests for links and forms | using NUnit.Framework;
using System.IO;
namespace CertiPay.PDF.Tests
{
public class PDFServiceTests
{
[Test]
public void ShouldGenerateMultiPagePDF()
{
IPDFService svc = new PDFService();
byte[] output = svc.CreatePdf(new PDFService.Settings
{
... | using NUnit.Framework;
using System.IO;
namespace CertiPay.PDF.Tests
{
public class PDFServiceTests
{
[Test]
public void ShouldGenerateMultiPagePDF()
{
IPDFService svc = new PDFService();
byte[] output = svc.CreatePdf(new PDFService.Settings
{
... |
Use NonGeneric entry point for MessagePack-CSharp serializer | using System.IO;
using MessagePack;
using MessagePack.Resolvers;
namespace Obvs.Serialization.MessagePack
{
public class MessagePackCSharpMessageSerializer : IMessageSerializer
{
private readonly IFormatterResolver _resolver;
public MessagePackCSharpMessageSerializer()
: this(null... | using System.IO;
using MessagePack;
using MessagePack.Resolvers;
namespace Obvs.Serialization.MessagePack
{
public class MessagePackCSharpMessageSerializer : IMessageSerializer
{
private readonly IFormatterResolver _resolver;
public MessagePackCSharpMessageSerializer()
: this(null... |
Fix legacy decoder using wrong 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 osu.Game.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<SkinConfiguration>
{
public LegacySkinDeco... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps.Formats;
namespace osu.Game.Skinning
{
public class LegacySkinDecoder : LegacyDecoder<DefaultSkinConfiguration>
{
public LegacyS... |
Convert EncryptedString to String explicitly | using System;
using System.IO;
using LastPass;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Read LastPass credentials from a file
// The file should contain 2 lines: username and password.
// See credentials.txt.example for an exam... | using System;
using System.IO;
using LastPass;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Read LastPass credentials from a file
// The file should contain 2 lines: username and password.
// See credentials.txt.example for an exam... |
Change starting search from 1 billion because none before | using System;
using FonctionsUtiles.Fred.Csharp;
namespace ConsoleAppPrimesByHundred
{
internal class Program
{
private static void Main()
{
Action<string> display = Console.WriteLine;
display("Prime numbers by hundred:");
foreach (var kvp in FunctionsPrimes.NumberOfPrimesByHundred(1000... | using System;
using FonctionsUtiles.Fred.Csharp;
namespace ConsoleAppPrimesByHundred
{
internal class Program
{
private static void Main()
{
Action<string> display = Console.WriteLine;
display("Prime numbers by hundred:");
foreach (var kvp in FunctionsPrimes.NumberOfPrimesByHundred(1000... |
Fix user name detection for some regions | // Copyright (c) Gothos
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Tera.Game.Messages
{
public class LoginServerMessage : ParsedMessage
{
public EntityId Id { get; private set; }
public uint PlayerId { get; private set; }
... | // Copyright (c) Gothos
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Tera.Game.Messages
{
public class LoginServerMessage : ParsedMessage
{
public EntityId Id { get; private set; }
public uint PlayerId { get; private set; }
... |
Fix event action "Select Widget" cancel still applying | using System.Windows;
using DesktopWidgets.Actions;
using DesktopWidgets.Classes;
using DesktopWidgets.Events;
using DesktopWidgets.Helpers;
namespace DesktopWidgets.Windows
{
/// <summary>
/// Interaction logic for EventActionPairEditor.xaml
/// </summary>
public partial class EventActionPairEdit... | using System.Windows;
using DesktopWidgets.Actions;
using DesktopWidgets.Classes;
using DesktopWidgets.Events;
using DesktopWidgets.Helpers;
namespace DesktopWidgets.Windows
{
/// <summary>
/// Interaction logic for EventActionPairEditor.xaml
/// </summary>
public partial class EventActionPairEdit... |
Change the SendReceiveAsync() implementation to support commands that do not have responses | using PluginContracts;
using System;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.IO;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN communicati... | using PluginContracts;
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace LAN
{
public class LANInterface : IPluginV1
{
public string Name { get; } = "LAN";
public string Description { get; } = "LAN communication interface for os... |
Edit accounts of 'all' page. | @Html.Partial("_AccountTypeLinks")
<h2>All Accounts</h2>
<table id="accountsTable" class="table table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Balance</th>
</tr>
</thead>
</table>
@section scripts
{
<script>
$(document).ready(function() {
$('#acco... | @Html.Partial("_AccountTypeLinks")
<h2>All Accounts</h2>
<table id="accountsTable" class="table table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Balance</th>
</tr>
</thead>
</table>
@section scripts
{
<script>
$(document).ready(function() {
$('#acco... |
Fix toolbox expand being interrupted by gaps between groups | // 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 osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers;
using osuTK;
namespace osu.Game.Rulesets.Edit
{
... | // 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.Input.Events;
using osu.Game.Graphics.Containers;
using osuTK;
namespace osu.Game.Rulesets.Edit
{
public class Expa... |
Add support for `type` when listing Products | namespace Stripe
{
using Newtonsoft.Json;
public class ProductListOptions : ListOptionsWithCreated
{
[JsonProperty("active")]
public bool? Active { get; set; }
[JsonProperty("ids")]
public string[] Ids { get; set; }
[JsonProperty("shippable")]
public bool? ... | namespace Stripe
{
using Newtonsoft.Json;
public class ProductListOptions : ListOptionsWithCreated
{
[JsonProperty("active")]
public bool? Active { get; set; }
[JsonProperty("ids")]
public string[] Ids { get; set; }
[JsonProperty("shippable")]
public bool? ... |
Add content type for downloads | using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
namespace DSCPullServerWeb.Helpers
{
public class FileActionResult : IHttpActionResult
{
private FileInfo _file;
public FileActionResult(FileInfo... | using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
namespace DSCPullServerWeb.Helpers
{
public class FileActionResult : IHttpActionResult
{
private FileInfo _file;
public FileActionResult(FileInfo... |
Add sanity check to dissalow invalid file paths | // Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.IO;
using SQLite.Net;
namespace osu.Framework.Platform
{
public abstract class BasicStorage
{
public st... | // Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System.IO;
using osu.Framework.IO.File;
using SQLite.Net;
namespace osu.Framework.Platform
{
public abstract class BasicStorage
{
... |
Make hyperdash testcase easier to win again | using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
[Ignore("getting CI working")]
public class TestCaseHyperdash : Game.Tests.Visual.TestCasePlayer
{
public TestCaseHyperdash()
: ... | using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
[Ignore("getting CI working")]
public class TestCaseHyperdash : Game.Tests.Visual.TestCasePlayer
{
public TestCaseHyperdash()
: ... |
Fix slight error in documentation | using System;
using System.Linq;
using System.Reflection;
namespace AssemblyVersionFromGit
{
public static class AssemblyVersionReader
{
/// <summary>
/// Formats the assembly version from the specified assembly.
/// Requires that the AssemblyInfo.cs file contains the AssemblyInformati... | using System;
using System.Linq;
using System.Reflection;
namespace AssemblyVersionFromGit
{
public static class AssemblyVersionReader
{
/// <summary>
/// Formats the assembly version from the specified assembly.
/// Requires that <paramref name="assembly"/> contains an AssemblyInforma... |
Create a database initializer with a url for the github project | using System.Data.Entity;
using MyPersonalShortner.Lib.Domain.Url;
namespace MyPersonalShortner.Lib.Infrastructure.EntityFramework
{
public class EFContext : DbContext
{
public EFContext()
: base("MyPersonalShortner")
{
// TODO: Remove In Prod
Database.Creat... | using System.Data.Entity;
using MyPersonalShortner.Lib.Domain.Url;
namespace MyPersonalShortner.Lib.Infrastructure.EntityFramework
{
public class EFContext : DbContext
{
public EFContext()
: base("MyPersonalShortner")
{
Database.SetInitializer(new MyPersonalSHortnerInit... |
Add Email test for ReadState. | using OttoMail.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
namespace OttoMail.Tests
{
public class EmailTest
{
[Fact]
public void GetSubjectTest()
{
//Arrange
var email = ne... | using OttoMail.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
namespace OttoMail.Tests
{
public class EmailTest
{
[Fact]
public void GetSubjectTest()
{
//Arrange
var email = ne... |
Add styles and scripts to admin Layout. | <!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/bootstrap.min.css")
</head>
<body>
<div>
@RenderBody()
</div>
@RenderSection("Scripts", false)
</bo... | <!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/bootstrap.min.css")
@Styles.Render("~/Content/bootstrap-responsive.min.css")
@Styles.Render("~/bundles/font-awesome")
... |
Test data whitespace fixes (from tabs to spaces) | namespace dotless.Test.Specs.Functions
{
using NUnit.Framework;
public class ExtractFixture : SpecFixtureBase
{
[Test]
public void TestExtractFromCommaSeparatedList()
{
var input =
@"
@list: ""Arial"", ""Helvetica"";
.someClass {
font-fami... | namespace dotless.Test.Specs.Functions
{
using NUnit.Framework;
public class ExtractFixture : SpecFixtureBase
{
[Test]
public void TestExtractFromCommaSeparatedList()
{
var input =
@"
@list: ""Arial"", ""Helvetica"";
.someClass {
font-fami... |
Refactor context to not use vars | namespace ClojSharp.Core
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Language;
public class Context : ClojSharp.Core.IContext
{
private IDictionary<string, object> values = new Dictionary<string, object>();
... | namespace ClojSharp.Core
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Language;
public class Context : ClojSharp.Core.IContext
{
private IDictionary<string, object> values = new Dictionary<string, object>();
... |
Use Trace instead of Console | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SamSeifert.Utilities
{
public static class Logger
{
public static Action<String> WriteLine = (String s) =>
{
Console.WriteLine(s);
};
}
}
| using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SamSeifert.Utilities
{
public static class Logger
{
public static Action<String> WriteLine = (String s) =>
{
Trace.WriteLine(s);
... |
Fix issue when WebException with ProtocolError status has empty response | using System;
using System.Net;
namespace PatchKit.Api
{
public class WrapHttpWebRequest : IHttpWebRequest
{
private readonly HttpWebRequest _httpWebRequest;
public int Timeout
{
get { return _httpWebRequest.Timeout; }
set { _httpWebRequest.Timeout = value; }
... | using System;
using System.Net;
namespace PatchKit.Api
{
public class WrapHttpWebRequest : IHttpWebRequest
{
private readonly HttpWebRequest _httpWebRequest;
public int Timeout
{
get { return _httpWebRequest.Timeout; }
set { _httpWebRequest.Timeout = value; }
... |
Prepare add IsValid for book borrow record | using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace hihapi.Models.Library
{
[Table("T_LIB_BOOK_BORROW_RECORD")]
public class LibraryBookBorrowRecord: BaseModel
{
[Key]
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace hihapi.Models.Library
{
[Table("T_LIB_BOOK_BORROW_RECORD")]
public class LibraryBookBorrowRecord: BaseModel
{
[Key]
... |
Make the event steam static again | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace EventSourcingTodo.Domain
{
public interface ITodoListRepository
{
IList<Event> Events { get; }
TodoList Get();
void PostChanges(TodoList todoList);
}
public class TodoLis... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace EventSourcingTodo.Domain
{
public interface ITodoListRepository
{
IList<Event> Events { get; }
TodoList Get();
void PostChanges(TodoList todoList);
}
public class TodoLis... |
Refactor default GetElapsed to use static readonly instance | //-----------------------------------------------------------------------
// <copyright file="LoopingScheduler.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace EventHandlerSample
{
us... | //-----------------------------------------------------------------------
// <copyright file="LoopingScheduler.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace EventHandlerSample
{
us... |
Fix spelling in error message | namespace DarkSky.Services
{
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <summary>
/// Interface to use for handling JSON serialization via Json.NET
/// </summary>
public class JsonNetJsonSerializerService : IJsonSerializerService
{
JsonSerializer... | namespace DarkSky.Services
{
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <summary>
/// Interface to use for handling JSON serialization via Json.NET
/// </summary>
public class JsonNetJsonSerializerService : IJsonSerializerService
{
JsonSerializer... |
Use "." instead of ":" in env var key. | namespace EventStore.Persistence.AcceptanceTests
{
using System;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
using SqlPersistence;
public class EnviromentConnectionFactory : IConnectionFactory
{
private readonly string providerInvariantName;
privat... | namespace EventStore.Persistence.AcceptanceTests
{
using System;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
using SqlPersistence;
public class EnviromentConnectionFactory : IConnectionFactory
{
private readonly string providerInvariantName;
privat... |
Add missing .dtd file contents. | // 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.IO;
namespace System.Security.Cryptography.Xml.Tests
{
internal static class TestHelpers
{
... | // 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.IO;
namespace System.Security.Cryptography.Xml.Tests
{
internal static class TestHelpers
{
... |
Add default values to options | using System;
using System.Collections;
using System.Collections.Generic;
namespace Okanshi.Observers {
public class InfluxDbObserverOptions {
public string DatabaseName { get; }
public string RetentionPolicy { get; set; }
public Func<Tag, bool> TagToFieldSelector { get; set; }
... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Okanshi.Observers {
public class InfluxDbObserverOptions {
public string DatabaseName { get; }
public string RetentionPolicy { get; set; }
public Func<Tag, bool> TagToFieldSelector { get; set; } = x => false;
... |
Update the ViewModel we return as JSON to the Upgrade Installer Step - Has logic for checking latest logic (Needs bullet proof testing & discussion most likely) | using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
/// <summary>
/// This step is purely here to show the button to commence the upgrade
/// </summary>
[InstallSetupStep(InstallationType.Upgrade,
"Upgrade", "upgrade", 1, "Upgrading Umbraco to the latest and greatest ... | using Semver;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Web.Install.Models;
namespace Umbraco.Web.Install.InstallSteps
{
/// <summary>
/// This step is purely here to show the button to commence the upgrade
/// </summary>
[InstallSetupStep(InstallationType.Upgrade,
"Up... |
Add calibrate command to the factory to be able to be parsed | using System;
using System.Collections.Generic;
using Admo.classes.lib.commands;
using NLog;
using Newtonsoft.Json;
namespace Admo.classes.lib
{
class CommandFactory
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private static readonly Dictionary<string, Type> ... | using System;
using System.Collections.Generic;
using Admo.classes.lib.commands;
using NLog;
using Newtonsoft.Json;
namespace Admo.classes.lib
{
class CommandFactory
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private static readonly Dictionary<string, Type> ... |
Allow DI for LoginOverlay to resolve to null in non-graphical environments (fix tests) | // 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.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Overlays;
namespace... | // 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.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Overlays;
namespace... |
Add missing namespace from service registration | using Glimpse.Server;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System.Collections.Generic;
namespace Glimpse
{
public class GlimpseServerServices
{
public static IEnumerable<IServiceDescriptor> GetDefaultServices()
{
return ... | using Glimpse.Agent;
using Glimpse.Server;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System.Collections.Generic;
namespace Glimpse
{
public class GlimpseServerServices
{
public static IEnumerable<IServiceDescriptor> GetDefaultServices()
... |
Fix indentation; add braces around single-line if. | namespace Nancy.Demo.Authentication.Basic
{
using Nancy.Authentication.Basic;
using Nancy.Security;
public class UserValidator : IUserValidator
{
public IUserIdentity Validate(string username, string password)
{
if (username == "demo" && password == "demo")
return new DemoUserIden... | namespace Nancy.Demo.Authentication.Basic
{
using Nancy.Authentication.Basic;
using Nancy.Security;
public class UserValidator : IUserValidator
{
public IUserIdentity Validate(string username, string password)
{
if (username == "demo" && password == "demo")
... |
Use temporary redirect to swagger | namespace ApiTemplate.Controllers
{
using ApiTemplate.Constants;
using Microsoft.AspNetCore.Mvc;
[Route("")]
[ApiExplorerSettings(IgnoreApi = true)]
public class HomeController : ControllerBase
{
/// <summary>
/// Redirects to the swagger page.
/// </summary>
///... | namespace ApiTemplate.Controllers
{
using ApiTemplate.Constants;
using Microsoft.AspNetCore.Mvc;
[Route("")]
[ApiExplorerSettings(IgnoreApi = true)]
public class HomeController : ControllerBase
{
/// <summary>
/// Redirects to the swagger page.
/// </summary>
///... |
Make codefixer for explicit interface polymorph analyzer | using System;
using System.Composition;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnal... | using System;
using System.Composition;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnal... |
Increase assembly version to 1.0. | // Copyright
// ----------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="https://github.com/safakgur/Dawn.SocketAwaitable">
// MIT
// </copyright>
// <license>
// This source code is subject to terms and condit... | // Copyright
// ----------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="https://github.com/safakgur/Dawn.SocketAwaitable">
// MIT
// </copyright>
// <license>
// This source code is subject to terms and condit... |
Change StartJobsAsync to work on the generic host | using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace MR.AspNetCore.Jobs
{
public static class JobsWebHostExtensions
{
public static Task StartJobsAsync(this IWebHost host)
{
var bootstrapper = host.Services.GetRequiredService<IBootstrappe... | using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace MR.AspNetCore.Jobs
{
public static class JobsWebHostExtensions
{
public static Task StartJobsAsync(this IHost host)
{
var bootstrapper = host.Services.GetRequiredService<IBootstrapper>(... |
Set the access token properly in the OAuth form | using LiveSplit.Options;
using System;
using System.Windows.Forms;
namespace LiveSplit.Web.Share
{
public partial class SpeedrunComOAuthForm : Form, ISpeedrunComAuthenticator
{
private string accessToken;
public SpeedrunComOAuthForm()
{
InitializeComponent();
}
... | using LiveSplit.Options;
using System;
using System.Windows.Forms;
namespace LiveSplit.Web.Share
{
public partial class SpeedrunComOAuthForm : Form, ISpeedrunComAuthenticator
{
private string accessToken;
public SpeedrunComOAuthForm()
{
InitializeComponent();
}
... |
Add new properties to message schema | using System.Collections;
using System.Collections.Generic;
namespace Mindscape.Raygun4Net.Messages
{
public class RaygunMessageDetails
{
public string MachineName { get; set; }
public string GroupingKey { get; set; }
public string Version { get; set; }
public RaygunErrorMessage Error { get; set... | using System.Collections;
using System.Collections.Generic;
namespace Mindscape.Raygun4Net.Messages
{
public class RaygunMessageDetails
{
public string MachineName { get; set; }
public string GroupingKey { get; set; }
public string Version { get; set; }
public string CorrelationId { get; set; }
... |
Use AutoFixture to populate test objects | using System.IO;
using AppHarbor.Commands;
using Moq;
using Xunit;
namespace AppHarbor.Tests.Commands
{
public class LogoutAuthCommandTest
{
[Fact]
public void ShouldLogoutUser()
{
var accessTokenConfigurationMock = new Mock<AccessTokenConfiguration>();
var writer = new Mock<TextWriter>();
var logout... | using System.IO;
using AppHarbor.Commands;
using Moq;
using Ploeh.AutoFixture.Xunit;
using Xunit.Extensions;
namespace AppHarbor.Tests.Commands
{
public class LogoutAuthCommandTest
{
[Theory, AutoCommandData]
public void ShouldLogoutUser([Frozen]Mock<IAccessTokenConfiguration> accessTokenConfigurationMock, [Fro... |
Add default format (json) in web api config | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace TokenAuthentification
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API route... | using Newtonsoft.Json.Serialization;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web.Http;
namespace TokenAuthentification
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
... |
Remove plants from tundra biome | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrueCraft.Core.TerrainGen.Noise;
using TrueCraft.Core.Logic.Blocks;
using TrueCraft.API.World;
using TrueCraft.API;
namespace TrueCraft.Core.TerrainGen.Biomes
{
public class TundraBiome : BiomeProvider
{
public... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrueCraft.Core.TerrainGen.Noise;
using TrueCraft.Core.Logic.Blocks;
using TrueCraft.API.World;
using TrueCraft.API;
namespace TrueCraft.Core.TerrainGen.Biomes
{
public class TundraBiome : BiomeProvider
{
public... |
Disable provider filtering for Alexa | @inject Microsoft.AspNetCore.Identity.SignInManager<LondonTravelUser> SignInManager
@{
var providers = SignInManager.GetExternalAuthenticationSchemes()
.OrderBy((p) => p.DisplayName)
.ThenBy((p) => p.AuthenticationScheme)
.ToList();
var schemesToShow = ViewData["AuthenticationSchemesTo... | @inject Microsoft.AspNetCore.Identity.SignInManager<LondonTravelUser> SignInManager
@{
var providers = SignInManager.GetExternalAuthenticationSchemes()
.OrderBy((p) => p.DisplayName)
.ThenBy((p) => p.AuthenticationScheme)
.ToList();
/*
var schemesToShow = ViewData["AuthenticationSc... |
Refactor - rename test methods | using NUnit.Framework;
namespace IntUITive.Selenium.Tests
{
[TestFixture]
public class IntuitivelyFindByIdTests : BaseIntuitivelyTests
{
[Test]
public void Find_WithIdAsTerm_ReturnsSingleElement()
{
var element = Intuitively.Find("uniqueId");
Ass... | using NUnit.Framework;
namespace IntUITive.Selenium.Tests
{
[TestFixture]
public class IntuitivelyFindByIdTests : BaseIntuitivelyTests
{
[Test]
public void Find_WithIdAsTerm_ReturnsElement()
{
var element = Intuitively.Find("uniqueId");
Assert.Th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.