Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Create and release tooltip content on demand | using System;
using System.Windows.Controls;
using GitHub.InlineReviews.Views;
using GitHub.InlineReviews.ViewModels;
namespace GitHub.InlineReviews.Tags
{
public partial class ShowInlineCommentGlyph : UserControl
{
readonly CommentTooltipView commentTooltipView;
public ShowInlineCommentGlyph... | using System;
using System.Windows.Controls;
using GitHub.InlineReviews.Views;
using GitHub.InlineReviews.ViewModels;
namespace GitHub.InlineReviews.Tags
{
public partial class ShowInlineCommentGlyph : UserControl
{
readonly ToolTip toolTip;
public ShowInlineCommentGlyph()
{
... |
Fix up youtube URL regex matching | using System.Collections.Generic;
namespace Umbraco.Web.Media.EmbedProviders
{
public class YouTube : EmbedProviderBase
{
public override string ApiEndpoint => "https://www.youtube.com/oembed";
public override string[] UrlSchemeRegex => new string[]
{
@"youtu.be/.*",
... | using System.Collections.Generic;
namespace Umbraco.Web.Media.EmbedProviders
{
public class YouTube : EmbedProviderBase
{
public override string ApiEndpoint => "https://www.youtube.com/oembed";
public override string[] UrlSchemeRegex => new string[]
{
@"youtu.be/.*",
... |
Fix issue with Page calculation | using System;
using Newtonsoft.Json;
namespace ErgastApi.Responses
{
// TODO: Use internal/private constructors for all response types?
public abstract class ErgastResponse
{
[JsonProperty("url")]
public virtual string RequestUrl { get; private set; }
[JsonProperty("limit")]
... | using System;
using Newtonsoft.Json;
namespace ErgastApi.Responses
{
// TODO: Use internal/private constructors for all response types?
public abstract class ErgastResponse
{
[JsonProperty("url")]
public string RequestUrl { get; protected set; }
[JsonProperty("limit")]
pub... |
Add checking of Read() return value. | using System.Linq;
using System.Text;
namespace Modbus.IO
{
internal static class StreamResourceUtility
{
internal static string ReadLine(IStreamResource stream)
{
var result = new StringBuilder();
var singleByteBuffer = new byte[1];
do
... | using System.Linq;
using System.Text;
namespace Modbus.IO
{
internal static class StreamResourceUtility
{
internal static string ReadLine(IStreamResource stream)
{
var result = new StringBuilder();
var singleByteBuffer = new byte[1];
do
... |
Sort and remove unused usings | using GitHub.UI;
using GitHub.VisualStudio.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace GitHub.VisualStudio
{
public static class SharedResources
{
static readonly Dictionary<string, Drawin... | using System.Collections.Generic;
using System.Windows.Media;
using GitHub.UI;
using GitHub.VisualStudio.UI;
namespace GitHub.VisualStudio
{
public static class SharedResources
{
static readonly Dictionary<string, DrawingBrush> drawingBrushes = new Dictionary<string, DrawingBrush>();
public s... |
Add extra work to RedditBrowser sample | using Stylet.Samples.RedditBrowser.Events;
using Stylet.Samples.RedditBrowser.RedditApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Stylet.Samples.RedditBrowser.Pages
{
public class TaskbarViewModel : Screen
{
private I... | using Stylet.Samples.RedditBrowser.Events;
using Stylet.Samples.RedditBrowser.RedditApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Stylet.Samples.RedditBrowser.Pages
{
public class TaskbarViewModel : Screen
{
private I... |
Fix Sleep of the test program | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using XboxOnePadReader;
namespace PadReaderTest
{
class Program
{
static void Main(string[] args)
{
ControllerReader myController = Controller... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using XboxOnePadReader;
namespace PadReaderTest
{
class Program
{
static void Main(string[] args)
{
ControllerReader myController = Controller... |
Write Log message for test | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test1 : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
| using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test1 : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Condole.Log("This log is added by Suzuki");
}
} |
Remove unused line of code | namespace OpenKh.Game
{
public class Global
{
public const int ResolutionWidth = 512;
public const int ResolutionHeight = 416;
public const int ResolutionRemixWidth = 684;
public const float ResolutionReMixRatio = 0.925f;
public const float ResolutionBoostRatio = 2;
... | namespace OpenKh.Game
{
public class Global
{
public const int ResolutionWidth = 512;
public const int ResolutionHeight = 416;
public const int ResolutionRemixWidth = 684;
public const float ResolutionReMixRatio = 0.925f;
}
}
|
Update expected SR in test | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Taiko.Difficulty;
using osu.Game.Tests.Beatmaps;
namespace os... | // 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.Game.Beatmaps;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Taiko.Difficulty;
using osu.Game.Tests.Beatmaps;
namespace os... |
Disable text tests for now | using System;
using System.Drawing.Imaging;
using System.IO;
using NUnit.Framework;
using ValveResourceFormat;
using ValveResourceFormat.ResourceTypes;
namespace Tests
{
public class TextureTests
{
[Test]
public void Test()
{
var path = Path.Combine(TestContext.CurrentConte... | using System;
using System.Drawing.Imaging;
using System.IO;
using NUnit.Framework;
using ValveResourceFormat;
using ValveResourceFormat.ResourceTypes;
namespace Tests
{
public class TextureTests
{
[Test]
[Ignore("Need a better way of testing images rather than comparing the files directly")]
... |
Support to map swagger UI to application root url | using System;
using Microsoft.AspNetCore.StaticFiles;
using Swashbuckle.AspNetCore.SwaggerUI;
namespace Microsoft.AspNetCore.Builder
{
public static class SwaggerUIBuilderExtensions
{
public static IApplicationBuilder UseSwaggerUI(
this IApplicationBuilder app,
Action<SwaggerUI... | using System;
using Microsoft.AspNetCore.StaticFiles;
using Swashbuckle.AspNetCore.SwaggerUI;
namespace Microsoft.AspNetCore.Builder
{
public static class SwaggerUIBuilderExtensions
{
public static IApplicationBuilder UseSwaggerUI(
this IApplicationBuilder app,
Action<SwaggerUI... |
Add registration options for hover 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;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sy... | //
// 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;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sy... |
Build Script - cleanup and filling out vars | //#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
// Define directories.
var buildDir = Directory("./src/Example/bin") + Directory(configuration);
Task("Clean")
.Does(() =>
{
CleanDirectory(buildDir);... | //#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
string target = Argument("target", "Default");
string configuration = Argument("configuration", "Release");
// Define directories.
var dirs = new[]
{
Directory("./Live.Forms/bin") + Directory(configuration),
Directory("./Live.Forms.iOS/bin") + Director... |
Fix tests, but not seeding Database anymore | using System.Data.Entity;
using Kandanda.Dal.DataTransferObjects;
namespace Kandanda.Dal
{
public class KandandaDbContext : DbContext
{
public KandandaDbContext()
{
Database.SetInitializer(new SampleDataDbInitializer());
}
public DbSet<Tournament> Tournaments { get... | using System.Data.Entity;
using Kandanda.Dal.DataTransferObjects;
namespace Kandanda.Dal
{
public class KandandaDbContext : DbContext
{
public KandandaDbContext()
{
// TODO fix SetInitializer for tests
Database.SetInitializer(new DropCreateDatabaseAlways<KandandaDbConte... |
Use Helper to create instance from assembly |
namespace nuPickers.Shared.DotNetDataSource
{
using nuPickers.Shared.Editor;
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
public class DotNetDataSource
{
public string AssemblyName { get; set; }
public string ClassName { get;... |
namespace nuPickers.Shared.DotNetDataSource
{
using nuPickers.Shared.Editor;
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
public class DotNetDataSource
{
public string AssemblyName { get; set; }
public string ClassName { get;... |
Add date to status report | namespace Certify.Models.Shared
{
public class RenewalStatusReport
{
public string InstanceId { get; set; }
public string MachineName { get; set; }
public ManagedSite ManagedSite { get; set; }
public string PrimaryContactEmail { get; set; }
public string AppVersion { get... | using System;
namespace Certify.Models.Shared
{
public class RenewalStatusReport
{
public string InstanceId { get; set; }
public string MachineName { get; set; }
public ManagedSite ManagedSite { get; set; }
public string PrimaryContactEmail { get; set; }
public string A... |
Add `HasPriorLearning` to draft response | using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Api.Types.Responses
{
public sealed class GetDraftApprenticeshipResponse
{
public long Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Emai... | using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Api.Types.Responses
{
public sealed class GetDraftApprenticeshipResponse
{
public long Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Emai... |
Fix FortuneTeller for .NET4 not unregistering from eureka on app shutdown | using Autofac;
using Autofac.Integration.WebApi;
using FortuneTellerService4.Models;
using Pivotal.Discovery.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Http;
using System.Web.Routing;
namespace FortuneTellerService4
{
publ... | using Autofac;
using Autofac.Integration.WebApi;
using FortuneTellerService4.Models;
using Pivotal.Discovery.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Http;
using System.Web.Routing;
namespace FortuneTellerService4
{
publ... |
Add extra test for generic type for naming | using System;
using Xunit;
namespace Stunts.Tests
{
public class StuntNamingTests
{
[Theory]
[InlineData("StuntFactoryIDisposableIServiceProvider" + StuntNaming.DefaultSuffix, typeof(StuntFactory), typeof(IServiceProvider), typeof(IDisposable))]
public void GetNameOrdersTypes(string ex... | using System;
using System.Collections.Generic;
using Xunit;
namespace Stunts.Tests
{
public class StuntNamingTests
{
[Theory]
[InlineData("StuntFactoryIDisposableIServiceProvider" + StuntNaming.DefaultSuffix, typeof(StuntFactory), typeof(IServiceProvider), typeof(IDisposable))]
[Inlin... |
Disable broken test session thing. | using System;
using System.Diagnostics.Eventing.Reader;
using System.Net;
using System.Net.Http;
using Cogito.Net.Http;
using Microsoft.Diagnostics.Tracing;
using Microsoft.Diagnostics.Tracing.Session;
using Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Utility;
using Microsoft.Samples.Eventing;
using Microsof... | using System;
using System.Diagnostics.Eventing.Reader;
using System.Net;
using System.Net.Http;
using Cogito.Net.Http;
using Microsoft.Diagnostics.Tracing;
using Microsoft.Diagnostics.Tracing.Session;
using Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Utility;
using Microsoft.Samples.Eventing;
using Microsof... |
Fix bug - command parameter is always null. | #region Using
using System.Collections.Generic;
using System.Windows.Input;
using PuppyFramework.Services;
#endregion
namespace PuppyFramework.MenuService
{
public class MenuItem : MenuItemBase
{
#region Fields
private ObservableSortedList<MenuItemBase> _children;
pri... | #region Using
using System.Collections.Generic;
using System.Windows.Input;
using PuppyFramework.Services;
#endregion
namespace PuppyFramework.MenuService
{
public class MenuItem : MenuItemBase
{
#region Fields
private ObservableSortedList<MenuItemBase> _children;
pri... |
Fix AddSmtpSender extension methods to property add service | using FluentEmail.Core.Interfaces;
using FluentEmail.Smtp;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Net;
using System.Net.Mail;
namespace Microsoft.Extensions.DependencyInjection
{
public static class FluentEmailSmtpBuilderExtensions
{
public static FluentE... | using FluentEmail.Core.Interfaces;
using FluentEmail.Smtp;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Net;
using System.Net.Mail;
namespace Microsoft.Extensions.DependencyInjection
{
public static class FluentEmailSmtpBuilderExtensions
{
public static FluentE... |
Fix x-container-experiment-seed failure in .NET Framework branches | using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using MirrorSharp.Advanced;
using SharpLab.Server.Common;
namespace SharpLab.Server.MirrorSharp {
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)]
public class SetOptionsFromClient : ISetOpti... | using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using MirrorSharp.Advanced;
using SharpLab.Server.Common;
namespace SharpLab.Server.MirrorSharp {
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)]
public class SetOptionsFromClient : ISetOpti... |
Remove 'Positions Vacant' sticky note | <div class="sticky-notes">
<div class="sticky-note">
<i class="pin"></i>
<div class="content green">
<h1>
GC Handicapping System
</h1>
<p>
New <a href="/disciplines/golf-croquet/resources">GC Handicapping System</a> comes into effe... | <div class="sticky-notes">
<div class="sticky-note">
<i class="pin"></i>
<div class="content green">
<h1>
GC Handicapping System
</h1>
<p>
New <a href="/disciplines/golf-croquet/resources">GC Handicapping System</a> comes into effe... |
Fix showing digits - show '1' instead of 'D1' | using System;
namespace GitIStage
{
internal sealed class ConsoleCommand
{
private readonly Action _handler;
private readonly ConsoleKey _key;
public readonly string Description;
private readonly ConsoleModifiers _modifiers;
public ConsoleCommand(Action handler, Console... | using System;
namespace GitIStage
{
internal sealed class ConsoleCommand
{
private readonly Action _handler;
private readonly ConsoleKey _key;
public readonly string Description;
private readonly ConsoleModifiers _modifiers;
public ConsoleCommand(Action handler, Console... |
Create Pool Tests work. removed obsolete tests | using Hyperledger.Indy.PoolApi;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Threading.Tasks;
namespace Hyperledger.Indy.Test.PoolTests
{
[TestClass]
public class CreatePoolTest : IndyIntegrationTestBase
{
[TestMethod]
public async Task TestCreatePoolWo... | using Hyperledger.Indy.PoolApi;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Threading.Tasks;
namespace Hyperledger.Indy.Test.PoolTests
{
[TestClass]
public class CreatePoolTest : IndyIntegrationTestBase
{
[TestMethod]
public async Task TestCreatePoolWo... |
Handle other kinds of deserialization exceptions | using Auth0.Core.Serialization;
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace Auth0.Core
{
/// <summary>
/// Error information captured from a failed API request.
/// </summary>
[JsonConverter(typeof(ApiErrorConverter))]
public class ApiError
... | using Auth0.Core.Serialization;
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace Auth0.Core
{
/// <summary>
/// Error information captured from a failed API request.
/// </summary>
[JsonConverter(typeof(ApiErrorConverter))]
public class ApiError
... |
Fix MySql do not support Milliseconds | using FluentMigrator.Runner.Generators.Generic;
namespace FluentMigrator.Runner.Generators.MySql
{
public class MySqlQuoter : GenericQuoter
{
public override string OpenQuote { get { return "`"; } }
public override string CloseQuote { get { return "`"; } }
public override string Quot... | using FluentMigrator.Runner.Generators.Generic;
namespace FluentMigrator.Runner.Generators.MySql
{
public class MySqlQuoter : GenericQuoter
{
public override string OpenQuote { get { return "`"; } }
public override string CloseQuote { get { return "`"; } }
public override string Quot... |
Fix for treating enum types as primitives due non-enumeration facets | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Schema;
namespace Codge.Generator.Presentations.Xsd
{
public static class XmlSchemaExtensions
{
public static bool IsEmptyType(this XmlSchemaComplexType type)
{
... | using System.Collections.Generic;
using System.Linq;
using System.Xml.Schema;
namespace Codge.Generator.Presentations.Xsd
{
public static class XmlSchemaExtensions
{
public static bool IsEmptyType(this XmlSchemaComplexType type)
{
return type.ContentModel == null && type.Attributes... |
Add testing of different strengths | // 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.Game.Rulesets.Osu.Mods;
namespace osu.Game.Rulesets.Osu.Tests.Mods
{
public class TestSceneOsuModAimAssist : OsuModTestScene
{
... | // 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.Game.Rulesets.Osu.Mods;
namespace osu.Game.Rulesets.Osu.Tests.Mods
{
public class TestSceneOsuModAimAssist : OsuModTestScene
{
... |
Check for null in IsNetworkAvailable implementation | using davClassLibrary.Common;
using davClassLibrary.DataAccess;
using UniversalSoundBoard.DataAccess;
using Windows.Networking.Connectivity;
namespace UniversalSoundboard.Common
{
public class GeneralMethods : IGeneralMethods
{
public bool IsNetworkAvailable()
{
var connection = Ne... | using davClassLibrary.Common;
using davClassLibrary.DataAccess;
using UniversalSoundBoard.DataAccess;
using Windows.Networking.Connectivity;
namespace UniversalSoundboard.Common
{
public class GeneralMethods : IGeneralMethods
{
public bool IsNetworkAvailable()
{
var connection = Ne... |
Fix namespace in httpclient registration | using JoinRpg.Web.CheckIn;
using JoinRpg.Web.ProjectCommon;
using JoinRpg.Web.ProjectMasterTools.ResponsibleMaster;
using JoinRpg.Web.ProjectMasterTools.Subscribe;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
namespace JoinRpg.Blazor.Client.ApiClients;
public static class HttpClientRegistration
{
pr... | using JoinRpg.Web.CheckIn;
using JoinRpg.Web.ProjectCommon;
using JoinRpg.Web.ProjectMasterTools.ResponsibleMaster;
using JoinRpg.Web.ProjectMasterTools.Subscribe;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
namespace JoinRpg.Blazor.Client.ApiClients;
public static class HttpClientRegistration
{
pr... |
Add PlaySound as a debugging 'tool' | using System;
using System.Threading;
namespace Bumblebee.Extensions
{
public static class Debugging
{
public static T DebugPrint<T>(this T obj)
{
Console.WriteLine(obj.ToString());
return obj;
}
public static T DebugPrint<T>(this T obj, string message)
... | using System;
using System.Threading;
namespace Bumblebee.Extensions
{
public static class Debugging
{
public static T DebugPrint<T>(this T obj)
{
Console.WriteLine(obj.ToString());
return obj;
}
public static T DebugPrint<T>(this T obj, string message)
... |
Add check for Mono for LogicalCallContext | using System.Runtime.Remoting.Messaging;
namespace Criteo.Profiling.Tracing
{
internal static class TraceContext
{
private const string TraceCallContextKey = "crto_trace";
public static Trace Get()
{
return CallContext.LogicalGetData(TraceCallContextKey) as Trace;
... | using System;
using System.Runtime.Remoting.Messaging;
namespace Criteo.Profiling.Tracing
{
internal static class TraceContext
{
private const string TraceCallContextKey = "crto_trace";
private static readonly bool IsRunningOnMono = (Type.GetType("Mono.Runtime") != null);
public stat... |
Add test when IResponse not set | using System.Collections.Generic;
using System.Collections.Immutable;
using Octokit;
using NSubstitute;
using NUnit.Framework;
using GitHub.Extensions;
public class ApiExceptionExtensionsTests
{
public class TheIsGitHubApiExceptionMethod
{
[TestCase("Not-GitHub-Request-Id", false)]
[TestCase("... | using System.Collections.Generic;
using System.Collections.Immutable;
using Octokit;
using NSubstitute;
using NUnit.Framework;
using GitHub.Extensions;
public class ApiExceptionExtensionsTests
{
public class TheIsGitHubApiExceptionMethod
{
[TestCase("Not-GitHub-Request-Id", false)]
[TestCase("... |
Allow rotation lock on Android to function properly | // 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 Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using osu.Framework.Android;
namespace osu.Android
{
[Activity(Theme = "@android... | // 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 Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using osu.Framework.Android;
namespace osu.Android
{
[Activity(Theme = "@android... |
Add detail panel, currently empty | using Gtk;
using Mono.Addins;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Ide.Gui.Components;
namespace MonoDevelop.AddinMaker.AddinBrowser
{
class AddinBrowserWidget : VBox
{
ExtensibleTreeView treeView;
public AddinBrowserWidget (AddinRegistry registry)
{
Registry = registry;
Build ()... | using Gtk;
using Mono.Addins;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Ide.Gui.Components;
namespace MonoDevelop.AddinMaker.AddinBrowser
{
class AddinBrowserWidget : HPaned
{
ExtensibleTreeView treeView;
public AddinBrowserWidget (AddinRegistry registry)
{
Registry = registry;
Build ... |
Fix download didn't start by close response in getFileDetail, implement FillCredential method | using System;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using TirkxDownloader.Framework;
namespace TirkxDownloader.Models
{
public class DetailProvider
{
public async Task GetFileDetail(DownloadInfo detail, CancellationToken ct)
{
try
{
... | using System;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using TirkxDownloader.Framework;
using TirkxDownloader.Models;
namespace TirkxDownloader.Models
{
public class DetailProvider
{
private Author... |
Remove the ignore attribute once again | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
usin... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
usin... |
Fix 404 error when calling GetMammals, incorrect route | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script>
var data = (function ($) {
var getData = (function() {
$.ajax({
method: "GET",
url: "GetMammals",
dataType: "json",
... | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script>
var data = (function ($) {
var getData = (function() {
$.ajax({
method: "GET",
url: "@Url.Action("GetMammals", "Home")",
dataT... |
Add response DTO marker interface for service documentation | using ServiceStack.ServiceHost;
namespace License.Manager.Core.Model
{
[Route("/customers", "POST")]
[Route("/customers/{Id}", "PUT, DELETE")]
[Route("/customers/{Id}", "GET, OPTIONS")]
public class Customer : EntityBase
{
public string Name { get; set; }
public string Company { ge... | using ServiceStack.ServiceHost;
namespace License.Manager.Core.Model
{
[Route("/customers", "POST")]
[Route("/customers/{Id}", "PUT, DELETE")]
[Route("/customers/{Id}", "GET, OPTIONS")]
public class Customer : EntityBase, IReturn<Customer>
{
public string Name { get; set; }
public ... |
Fix compiling error on .net451 | /*****************************************************************************
*
* ReoGrid - .NET Spreadsheet Control
*
* https://reogrid.net/
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES O... | /*****************************************************************************
*
* ReoGrid - .NET Spreadsheet Control
*
* https://reogrid.net/
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES O... |
Add documentation for show airs. | namespace TraktApiSharp.Objects.Get.Shows
{
using Newtonsoft.Json;
/// <summary>
/// The air time of a Trakt show.
/// </summary>
public class TraktShowAirs
{
/// <summary>
/// The day of week on which the show airs.
/// </summary>
[JsonProperty(PropertyName = "... | namespace TraktApiSharp.Objects.Get.Shows
{
using Newtonsoft.Json;
/// <summary>The air time of a Trakt show.</summary>
public class TraktShowAirs
{
/// <summary>Gets or sets the day of week on which the show airs.</summary>
[JsonProperty(PropertyName = "day")]
public string Da... |
Remove delay test for CI for now | using LanguageExt;
using static LanguageExt.Prelude;
using System;
using System.Reactive.Linq;
using System.Threading;
using Xunit;
namespace LanguageExtTests
{
public class DelayTests
{
[Fact]
public void DelayTest1()
{
var span = TimeSpan.FromMilliseconds(500);
... | using LanguageExt;
using static LanguageExt.Prelude;
using System;
using System.Reactive.Linq;
using System.Threading;
using Xunit;
namespace LanguageExtTests
{
public class DelayTests
{
#if !CI
[Fact]
public void DelayTest1()
{
var span = TimeSpan.FromMilliseconds(500);
... |
Fix failing style check... second attempt | using System;
using Newtonsoft.Json.Linq;
namespace Saule.Serialization
{
internal class ResourceDeserializer
{
private readonly JToken _object;
private readonly Type _target;
public ResourceDeserializer(JToken @object, Type target)
{
_object = @object;... | using System;
using Newtonsoft.Json.Linq;
namespace Saule.Serialization
{
internal class ResourceDeserializer
{
private readonly JToken _object;
private readonly Type _target;
public ResourceDeserializer(JToken @object, Type target)
{
_object = @object;... |
Clear record before start new recording | using UnityEngine;
namespace UnityTouchRecorder
{
public class TouchRecorderController : MonoBehaviour
{
UnityTouchRecorderPlugin plugin = new UnityTouchRecorderPlugin();
[SerializeField]
TouchRecorderView view;
void Awake()
{
Object.DontDestroyOnLoad(game... | using UnityEngine;
namespace UnityTouchRecorder
{
public class TouchRecorderController : MonoBehaviour
{
UnityTouchRecorderPlugin plugin = new UnityTouchRecorderPlugin();
[SerializeField]
TouchRecorderView view;
void Awake()
{
Object.DontDestroyOnLoad(game... |
Use placeholder expressions, {nr} doesn't work because of ConfigNode beign weird | /**
* Language Patches Framework
* Translates the game into different Languages
* Copyright (c) 2016 Thomas P.
* Licensed under the terms of the MIT License
*/
using System;
namespace LanguagePatches
{
/// <summary>
/// A class that represents a text translation
/// </summary>
public class Tra... | /**
* Language Patches Framework
* Translates the game into different Languages
* Copyright (c) 2016 Thomas P.
* Licensed under the terms of the MIT License
*/
using System;
using System.Text.RegularExpressions;
namespace LanguagePatches
{
/// <summary>
/// A class that represents a text translation
... |
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... |
Remove erroneous "$" symbol from "bling string." | namespace Bakery.Configuration.Properties
{
using System;
public class PropertyNotFoundException
: Exception
{
private readonly String propertyName;
public PropertyNotFoundException(String propertyName)
{
this.propertyName = propertyName;
}
public override String Message
{
get... | namespace Bakery.Configuration.Properties
{
using System;
public class PropertyNotFoundException
: Exception
{
private readonly String propertyName;
public PropertyNotFoundException(String propertyName)
{
this.propertyName = propertyName;
}
public override String Message
{
get... |
Change default Search URL Prefix | using System.ComponentModel;
using System.Windows;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Search
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.Width = 150;
Style.FramePadding = new Thickness(0);
}
... | using System.ComponentModel;
using System.Windows;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.Search
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.Width = 150;
Style.FramePadding = new Thickness(0);
}
... |
Fix encoding issue while the query string parameters contains Chinese characters | using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
namespace Exceptionless.Core.Extensions {
public static class UriExtensions {
public static string ToQueryString(this NameValueCollection collection) {
return collection.AsKeyValuePairs().T... | using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
namespace Exceptionless.Core.Extensions {
public static class UriExtensions {
public static string ToQueryString(this NameValueCollection collection) {
return collection.AsKeyValuePairs().T... |
Make TestUserProfile service more derivation friendly | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using IdentityServer4.Extensions;
using IdentityServer4.Models;
using IdentityServer4.Services;
using Microsoft.Extensions.Logging;
using Sys... | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using IdentityServer4.Extensions;
using IdentityServer4.Models;
using IdentityServer4.Services;
using Microsoft.Extensions.Logging;
using Sys... |
Add description for mania special style | // 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.Game.Graphics.UserInterfaceV2;
using osu.Game.Screens.Edit.Setup;
namespace osu.Game.Rulesets.Man... | // 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.Game.Graphics.UserInterfaceV2;
using osu.Game.Screens.Edit.Setup;
namespace osu.Game.Rulesets.Man... |
Refactor away property setter usages to allow Color to be immutable. | namespace dotless.Core.Plugins
{
using System;
using Parser.Infrastructure.Nodes;
using Parser.Tree;
using Utils;
using System.ComponentModel;
[Description("Automatically spins all colors in a less file"), DisplayName("ColorSpin")]
public class ColorSpinPlugin : VisitorPlugin
{
... | namespace dotless.Core.Plugins
{
using Parser.Infrastructure.Nodes;
using Parser.Tree;
using Utils;
using System.ComponentModel;
[Description("Automatically spins all colors in a less file"), DisplayName("ColorSpin")]
public class ColorSpinPlugin : VisitorPlugin
{
public double Spi... |
Add support of Patch Creator 1.0.0.9 | namespace SIM.Tool.Windows.MainWindowComponents
{
using System.IO;
using System.Windows;
using Sitecore.Diagnostics.Base;
using Sitecore.Diagnostics.Base.Annotations;
using SIM.Core;
using SIM.Instances;
using SIM.Tool.Base;
using SIM.Tool.Base.Plugins;
[UsedImplicitly]
public class CreateSupportP... | namespace SIM.Tool.Windows.MainWindowComponents
{
using System;
using System.IO;
using System.Windows;
using Sitecore.Diagnostics.Base;
using Sitecore.Diagnostics.Base.Annotations;
using SIM.Core;
using SIM.Instances;
using SIM.Tool.Base;
using SIM.Tool.Base.Plugins;
[UsedImplicitly]
public clas... |
Fix new test failing on headless runs | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Screens.Select;
using osuTK;
namespace osu.Game.Tests.Visual.SongSelect
{
publi... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Screens.Select;
using osuTK;
namespace osu.Game.Tests.Visual.SongSelect
{
publi... |
Use external console when running DNX apps. | //
// DnxProjectConfiguration.cs
//
// Author:
// Matt Ward <ward.matt@gmail.com>
//
// Copyright (c) 2015 Matthew Ward
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without re... | //
// DnxProjectConfiguration.cs
//
// Author:
// Matt Ward <ward.matt@gmail.com>
//
// Copyright (c) 2015 Matthew Ward
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without re... |
Increase number of tests total | using System;
using System.Linq;
using System.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BudgetAnalyser.UnitTest
{
[TestClass]
public class MetaTest
{
private const int ExpectedMinimumTests = 836;
[TestMethod]
public void ListAllTests()
... | using System;
using System.Linq;
using System.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BudgetAnalyser.UnitTest
{
[TestClass]
public class MetaTest
{
private const int ExpectedMinimumTests = 868;
[TestMethod]
public void ListAllTests()
... |
Add warning for UWP that it works only in x86 yet | using System;
using System.IO;
using System.Runtime.InteropServices;
using Windows.Storage;
namespace Urho.UWP
{
public static class UwpUrhoInitializer
{
internal static void OnInited()
{
var folder = ApplicationData.Current.LocalFolder.Path;
}
}
}
| using System;
using System.IO;
using System.Runtime.InteropServices;
using Windows.Storage;
namespace Urho.UWP
{
public static class UwpUrhoInitializer
{
internal static void OnInited()
{
var folder = ApplicationData.Current.LocalFolder.Path;
if (IntPtr.Size == 8)
{
throw new NotSupportedException(... |
Change menu partial view type | @inherits UmbracoViewPage<MenuViewModel>
<a href="#menu" id="menu-link">
<i class="fa fa-bars" aria-hidden="true"></i>
<i class="fa fa-times" aria-hidden="true"></i>
</a>
<div id="menu">
<div class="pure-menu">
<span class="pure-menu-heading">@Model.SiteName</span>
<ul class="pure-menu-lis... | @model MenuViewModel
<a href="#menu" id="menu-link">
<i class="fa fa-bars" aria-hidden="true"></i>
<i class="fa fa-times" aria-hidden="true"></i>
</a>
<div id="menu">
<div class="pure-menu">
<span class="pure-menu-heading">@Model.SiteName</span>
<ul class="pure-menu-list">
@for... |
Use new OAID reading method | using System;
using System.Runtime.InteropServices;
using UnityEngine;
namespace com.adjust.sdk.oaid
{
#if UNITY_ANDROID
public class AdjustOaidAndroid
{
private static AndroidJavaClass ajcAdjustOaid = new AndroidJavaClass("com.adjust.sdk.oaid.AdjustOaid");
public static void ReadOaid()
... | using System;
using System.Runtime.InteropServices;
using UnityEngine;
namespace com.adjust.sdk.oaid
{
#if UNITY_ANDROID
public class AdjustOaidAndroid
{
private static AndroidJavaClass ajcAdjustOaid = new AndroidJavaClass("com.adjust.sdk.oaid.AdjustOaid");
private static AndroidJavaObject ajoCurrent... |
Make internals (in particular Runtime.*) visible to the tests. | using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyProduct("Python for .NET")]
[assembly: AssemblyVersion("4.0.0.1")]
[assembly: AssemblyDefaultAlias("Python.Runtime.dll")]
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: Assem... | using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
[assembly: AssemblyProduct("Python for .NET")]
[assembly: AssemblyVersion("4.0.0.1")]
[assembly: AssemblyDefaultAlias("Python.Runtime.dll")]
[assembly: CLSCompliant(true)]
[assemb... |
Fix FxCop warning CA1018 (attributes should have AttributeUsage) | // 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.
namespace System.Runtime.CompilerServices
{
// Custom attribute to indicating a TypeDef is a discardable attribu... | // 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.
namespace System.Runtime.CompilerServices
{
// Custom attribute to indicating a TypeDef is a discardable attribu... |
Rephrase parsing to the end of input in terms of Map. | using System.Diagnostics.CodeAnalysis;
namespace Parsley;
public static class ParserExtensions
{
public static bool TryParse<TItem, TValue>(
this Parser<TItem, TValue> parse,
ReadOnlySpan<TItem> input,
[NotNullWhen(true)] out TValue? value,
[NotNullWhen(false)] out ParseError? erro... | using System.Diagnostics.CodeAnalysis;
namespace Parsley;
public static class ParserExtensions
{
public static bool TryParse<TItem, TValue>(
this Parser<TItem, TValue> parse,
ReadOnlySpan<TItem> input,
[NotNullWhen(true)] out TValue? value,
[NotNullWhen(false)] out ParseError? erro... |
Fix tab names on node views | using System.ComponentModel;
namespace StackExchange.Opserver.Views.Dashboard
{
public enum CurrentStatusTypes
{
[Description("None")]
None = 0,
Stats = 1,
Interfaces = 2,
[Description("VM Info")]
VMHost = 3,
[Description("Elastic")]
Elastic = 4,... | using System.ComponentModel;
namespace StackExchange.Opserver.Views.Dashboard
{
public enum CurrentStatusTypes
{
[Description("None")]
None = 0,
[Description("Stats")]
Stats = 1,
[Description("Interfaces")]
Interfaces = 2,
[Description("VM Info")]
... |
Add the time as a title to the order notes date. | @model ReviewOrderViewModel
<section id="notes" class="ui-corner-all display-form">
<header class="ui-corner-top ui-widget-header">
<div class="col1 showInNav">Order Notes</div>
<div class="col2">
<a href="#" class="button" id="add-note">Add Note</a>
</div>
</header>
... | @model ReviewOrderViewModel
<section id="notes" class="ui-corner-all display-form">
<header class="ui-corner-top ui-widget-header">
<div class="col1 showInNav">Order Notes</div>
<div class="col2">
<a href="#" class="button" id="add-note">Add Note</a>
</div>
</header>
... |
Add resources to the automated tests too | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Testing;
namespace osu.Framework.Tests
{
public class AutomatedVisualTestGame : Game
{
public AutomatedVisualTes... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.IO.Stores;
using osu.Framework.Testing;
namespace osu.Framework.Tests
{
public class Automat... |
Increment version number to sync up with NuGet | using System.Reflection;
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("XeroApi")]
[assembly: AssemblyDescription... | using System.Reflection;
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("XeroApi")]
[assembly: AssemblyDescription... |
Update OData WebAPI to 5.5.0.0 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
#if !BUILD_GENERATED_VERSION
[assembly: AssemblyCompany("... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
#if !BUILD_GENERATED_VERSION
[assembly: AssemblyCompany("... |
Fix sizing of embedded (wrapped) native NSViews | using System;
using Xwt.Backends;
using Xwt.Drawing;
#if MONOMAC
using nint = System.Int32;
using nfloat = System.Single;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
#else
using Foundation;
using AppKit;
using ObjCRuntime;
#endif
namespace Xwt.Mac
{
public class EmbedNativeWidgetBacken... | using System;
using Xwt.Backends;
using Xwt.Drawing;
#if MONOMAC
using nint = System.Int32;
using nfloat = System.Single;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
#else
using Foundation;
using AppKit;
using ObjCRuntime;
#endif
namespace Xwt.Mac
{
public class EmbedNativeWidgetBacken... |
Fix - Modificata la generazione del Codice Richiesta e del Codice Chiamata come richiesto nella riunone dell'11-07-2019 | using SO115App.API.Models.Servizi.Infrastruttura.GestioneSoccorso;
using SO115App.FakePersistenceJSon.GestioneIntervento;
using SO115App.Models.Servizi.Infrastruttura.GestioneSoccorso.GenerazioneCodiciRichiesta;
using System;
namespace SO115App.FakePersistence.JSon.Utility
{
public class GeneraCodiceRichiesta : I... | using SO115App.API.Models.Servizi.Infrastruttura.GestioneSoccorso;
using SO115App.FakePersistenceJSon.GestioneIntervento;
using SO115App.Models.Servizi.Infrastruttura.GestioneSoccorso.GenerazioneCodiciRichiesta;
using System;
namespace SO115App.FakePersistence.JSon.Utility
{
public class GeneraCodiceRichiesta : I... |
Add comments to public methods | using System.Web.Script.Serialization;
namespace JsonConfig
{
public static class JsonConfigManager
{
#region Fields
private static readonly IConfigFileLoader ConfigFileLoader = new ConfigFileLoader();
private static dynamic _defaultConfig;
#endregion
#region Public ... | using System.Web.Script.Serialization;
namespace JsonConfig
{
public static class JsonConfigManager
{
#region Fields
private static readonly IConfigFileLoader ConfigFileLoader = new ConfigFileLoader();
private static dynamic _defaultConfig;
#endregion
#region Public ... |
Fix to ajax restoration of the cart. | @{
if (Layout.IsCartPage != true) {
Script.Require("jQuery");
Script.Include("shoppingcart.js", "shoppingcart.min.js");
<div class="shopping-cart-container minicart"
data-load="@Url.Action("NakedCart", "ShoppingCart", new {area="Nwazet.Commerce"})"
data-updat... | @{
if (Layout.IsCartPage != true) {
Script.Require("jQuery");
Script.Include("shoppingcart.js", "shoppingcart.min.js");
<div class="shopping-cart-container minicart"
data-load="@Url.Action("NakedCart", "ShoppingCart", new {area="Nwazet.Commerce"})"
data-updat... |
Change levy run date to 24th | using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs
{
public class ImportLevyDeclarationsJob
{
private readonly IMessageSession _message... | using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs
{
public class ImportLevyDeclarationsJob
{
private readonly IMessageSession _message... |
Remove Application Insights modules and initializers | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.LondonTravel.Site.Integration
{
using Microsoft.ApplicationInsights.DependencyCollector;
using Microsoft.Applica... | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
namespace MartinCostello.LondonTravel.Site.Integration
{
using Microsoft.ApplicationInsights.DependencyCollector;
using Microsoft.Applica... |
Remove auto-generated warning from handwritten file | // -------------------------------------------------------------------------
// Managed wrapper for QSize
// Generated from qt-gui.xml on 07/24/2011 11:57:03
//
// This file was auto generated. Do not edit.
// -------------------------------------------------------------------------
using System;
using System.Runti... | using System;
using System.Runtime.InteropServices;
using Mono.Cxxi;
namespace Qt.Gui {
[StructLayout (LayoutKind.Sequential)]
public struct QSize {
public int wd;
public int ht;
public QSize (int w, int h)
{
wd = w;
ht = h;
}
}
}
|
Change the names to be in line with the problem at hand. | using Ninject;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FunWithNinject.OpenGenerics
{
[TestFixture]
public class OpenGenericsTests
{
public interface ILogger<T>
{
Type G... | using Ninject;
using NUnit.Framework;
using System;
namespace FunWithNinject.OpenGenerics
{
[TestFixture]
public class OpenGenericsTests
{
[Test]
public void OpenGenericBinding()
{
using (var k = new StandardKernel())
{
// Assemble
... |
Set up references for event command unit tests | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Sogeti.Capstone.CQS.Integration.Tests
{
[TestClass]
public class EventCommands
{
[TestMethod]
public void CreateEventCommand()
{
}
}
}
| using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Sogeti.Capstone.CQS.Integration.Tests
{
[TestClass]
public class EventCommands
{
[TestMethod]
public void CreateEventCommand()
{
}
}
}
|
Update state to be used after redirect | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
namespace SimpleWAWS.Authentication
{
public class GoogleAuthProvider : BaseOpenIdConnectAuthProvider
{
public override stri... | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
namespace SimpleWAWS.Authentication
{
public class GoogleAuthProvider : BaseOpenIdConnectAuthProvider
{
public override stri... |
Add Rank to returned scores | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Nether.Data.Leaderboard;
namespace Nether.Web.Features.Leaderboard
{
public class LeaderboardGetResponseModel
{
... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Nether.Data.Leaderboard;
namespace Nether.Web.Features.Leaderboard
{
public class LeaderboardGetResponseModel
{
... |
Add correct JSON serialization for enum type | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace Alexa.NET.Management.Api
{
public class CustomApiEndpoint
{
[JsonProperty("uri")]
public string Uri { get; set; }
[JsonProperty("sslCertificateType")]
public SslCertificateType ... | using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Text;
namespace Alexa.NET.Management.Api
{
public class CustomApiEndpoint
{
[JsonProperty("uri")]
public string Uri { get; set; }
[JsonProperty("sslCertificateType"), ... |
Update Stripe test API key from their docs | using System;
using System.Linq;
namespace Stripe.Tests
{
static class Constants
{
public const string ApiKey = @"8GSx9IL9MA0iJ3zcitnGCHonrXWiuhMf";
}
}
| using System;
using System.Linq;
namespace Stripe.Tests
{
static class Constants
{
public const string ApiKey = @"sk_test_BQokikJOvBiI2HlWgH4olfQ2";
}
}
|
Migrate from ASP.NET Core 2.0 to 2.1 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Senparc.Weixin.MP.CoreSample
{
public class Prog... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Senparc.Weixin.MP.CoreSample
{
public class Prog... |
Remove laziness from edges' GetHashCode method | using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Basics.Structures.Graphs
{
[DebuggerDisplay("{Source}->{Target}")]
public class Edge<T> : IEquatable<Edge<T>> where T : IEquatable<T>
{
private readonly Lazy<int> _hashCode;
public Edge(T source, T target)... | using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Basics.Structures.Graphs
{
[DebuggerDisplay("{Source}->{Target}")]
public class Edge<T> : IEquatable<Edge<T>> where T : IEquatable<T>
{
public Edge(T source, T target)
{
Source = source;
... |
Add simple method to read back in a Post from disk | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace BlogTemplate.Models
{
public class BlogDataStore
{
const string StorageFolder = "BlogFiles";
public void SavePost(Post p... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace BlogTemplate.Models
{
public class BlogDataStore
{
const string StorageFolder = "BlogFiles";
public void SavePost(Post p... |
Add identifying tag to MassTransit health checks. | namespace MassTransit
{
using AspNetCoreIntegration;
using AspNetCoreIntegration.HealthChecks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Monitoring.Health;... | namespace MassTransit
{
using AspNetCoreIntegration;
using AspNetCoreIntegration.HealthChecks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Monitoring.Health;... |
Reduce shake transform count by one for more aesthetic behaviour | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Graphics.Containers
{
/// <summary>
/// A container that adds the abi... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Graphics.Containers
{
/// <summary>
/// A container that adds the abi... |
Remove call to Application.Current.Dispatcher.CheckAccess() - seems there's a null point happening on a rare instance when Application.Current.Dispatcher is null Rely on parent calling code to execute on the correct thread (which it was already executing on the UI Thread) | // Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Windows;
using System.Windows.Input;
namespace CefSharp.Wpf
{
internal class DelegateCommand : ICommand
{
... | // Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Windows.Input;
namespace CefSharp.Wpf
{
internal class DelegateCommand : ICommand
{
private readonly A... |
Comment for validation error rendering | @inherits Umbraco.Web.Mvc.UmbracoViewPage<FormEditor.Fields.IFieldWithValidation>
@if (Model.Invalid)
{
<div class="text-danger validation-error">
@Model.ErrorMessage
</div>
}
| @inherits Umbraco.Web.Mvc.UmbracoViewPage<FormEditor.Fields.IFieldWithValidation>
@* for the NoScript rendering, this is solely rendered server side *@
@if (Model.Invalid)
{
<div class="text-danger validation-error">
@Model.ErrorMessage
</div>
}
|
Remove return xml comments, not valid anymore | // Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp
{
public interface IDownloadHandler
{
/// <summary>
/// Called before a download begins.
/// </... | // Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp
{
public interface IDownloadHandler
{
/// <summary>
/// Called before a download begins.
/// </... |
Fix content root for non-windows xunit tests with no app domains | // 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 System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestH... | // 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 System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestH... |
Change obsolete signature for method Error | using System;
using System.Threading;
using NLog;
using NLogConfig = NLog.Config;
namespace BrowserLog.NLog.Demo
{
class Program
{
static void Main(string[] args)
{
LogManager.Configuration = new NLogConfig.XmlLoggingConfiguration("NLog.config", true);
var logger = Log... | using System;
using System.Threading;
using NLog;
using NLogConfig = NLog.Config;
namespace BrowserLog.NLog.Demo
{
class Program
{
static void Main(string[] args)
{
LogManager.Configuration = new NLogConfig.XmlLoggingConfiguration("NLog.config", true);
var logger = Log... |
Add escaping to query string parsing | using System;
using System.Collections.Specialized;
using System.Text.RegularExpressions;
namespace Winston.Net
{
static class Extensions
{
public static NameValueCollection ParseQueryString(this Uri uri)
{
var result = new NameValueCollection();
var query = uri.Query;
... | using System;
using System.Collections.Specialized;
using System.Text.RegularExpressions;
namespace Winston.Net
{
static class Extensions
{
public static NameValueCollection ParseQueryString(this Uri uri)
{
var result = new NameValueCollection();
var query = uri.Query;
... |
Fix editor legacy beatmap skins not receiving transformer | // 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.Skinning;
#nullable enable
namespace osu.Game.Screens.Edit
{
/// <summary>
/// A <see cref="SkinProvidingContainer"/> that fires <see cref="ISkin... | // 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.Skinning;
#nullable enable
namespace osu.Game.Screens.Edit
{
/// <summary>
/// A <see cref="SkinProvidingContainer"/> that fires <see cref="ISkin... |
Add the new managers to the root context. | using UnityEngine;
using System.Collections;
using strange.extensions.context.impl;
using strange.extensions.context.api;
public class RootContext : MVCSContext, IRootContext
{
public RootContext(MonoBehaviour view) : base(view)
{
}
public RootContext(MonoBehaviour view, ContextStartupFlags flags) ... | using UnityEngine;
using System.Collections;
using strange.extensions.context.impl;
using strange.extensions.context.api;
public class RootContext : MVCSContext, IRootContext
{
public RootContext(MonoBehaviour view) : base(view)
{
}
public RootContext(MonoBehaviour view, ContextStartupFlags flags) ... |
Set anti-forgery token unique claim type | using System;
using System.Web.Mvc;
using System.Web.Routing;
namespace SimplestMvc5Auth
{
public class Global : System.Web.HttpApplication
{
private static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapMvcAttr... | using System;
using System.Security.Claims;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Routing;
namespace SimplestMvc5Auth
{
public class Global : System.Web.HttpApplication
{
private static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{re... |
Use 'long' datatype for IDs in sample applications to avoid warnings. | // Copyright (c) on/off it-solutions gmbh. All rights reserved.
// Licensed under the MIT license. See license.txt file in the project root for license information.
#pragma warning disable SA1402 // FileMayOnlyContainASingleType
#pragma warning disable SA1649 // FileNameMustMatchTypeName
namespace InfoCarrierSample
... | // Copyright (c) on/off it-solutions gmbh. All rights reserved.
// Licensed under the MIT license. See license.txt file in the project root for license information.
#pragma warning disable SA1402 // FileMayOnlyContainASingleType
#pragma warning disable SA1649 // FileNameMustMatchTypeName
namespace InfoCarrierSample
... |
Make hft-server runtime options not based on HFTArgsDirect | using System;
namespace HappyFunTimes
{
public class HFTRuntimeOptions : HFTArgsDirect
{
public HFTRuntimeOptions(string prefix) : base(prefix)
{
}
public string dataPath = "";
public string url = "";
public string id = "";
public string name = "";
... | using System;
namespace HappyFunTimes
{
public class HFTRuntimeOptions
{
public string dataPath = "";
public string url = "";
public string id = "";
public string name = "";
public string gameId = "HFTUnity"; // this is kind of left over from when one server supported ... |
Remove the obsolete UseTypedRouting method | namespace Microsoft.AspNetCore.Builder
{
using Routing;
using System;
public static class RouteBuilderExtensions
{
/// <summary>
/// Allows using typed expression based link generation in ASP.NET Core MVC application.
/// </summary>
[Obsolete("UseTypedRouting is no long... | namespace Microsoft.AspNetCore.Builder
{
using Routing;
using System;
public static class RouteBuilderExtensions
{
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.