Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add correlationId to fix startup of the EAS web application. Copied from specific branch | using System;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using Dapper;
using SFA.DAS.EAS.Domain.Configuration;
using SFA.DAS.EAS.Domain.Data.Repositories;
using SFA.DAS.EAS.Domain.Models.UserProfile;
using SFA.DAS.Sql.Client;
using SFA.DAS.NLog.Logger;
na... | using System;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using Dapper;
using SFA.DAS.EAS.Domain.Configuration;
using SFA.DAS.EAS.Domain.Data.Repositories;
using SFA.DAS.EAS.Domain.Models.UserProfile;
using SFA.DAS.Sql.Client;
using SFA.DAS.NLog.Logger;
na... |
Change namespace for helper extension method to Amazon.Lambda.TestUtilities to make it more discover able when writing tests. | using Amazon.Lambda.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
namespace Amazon.Lambda.AspNetCoreServer
{
/// <summary>
/// Helper extensions for APIGatewayProxyFunction
/// </summary>
p... | using Amazon.Lambda.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.AspNetCoreServer;
namespace Amazon.Lambda.TestUtilities
{
/// <summary>
/// Extension methods for APIGatewayPro... |
Expand and add comment for ShouldIgnore. | // 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.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.... | // 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.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.... |
Create method for overload operator + and - | using System;
namespace FractionCalculator.Class
{
public struct Fraction
{
private long numerator;
private long denominator;
public Fraction(long numerator, long denominator) : this()
{
this.Numerator = numerator;
this.Denominator = denominator;
... | using System;
namespace FractionCalculator.Class
{
public struct Fraction
{
private long numerator;
private long denominator;
public Fraction(long numerator, long denominator) : this()
{
this.Numerator = numerator;
this.Denominator = denominator;
... |
Fix email sender to 'vote on' | using Microsoft.AspNet.Identity;
using SendGrid;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Threading.Tasks;
using System.Web;
namespace VotingApplication.Web.Api.Services
{
public class SendMailEmailSender : IMailSender
{
p... | using SendGrid;
using System.Net;
using System.Net.Mail;
using System.Threading.Tasks;
namespace VotingApplication.Web.Api.Services
{
public class SendMailEmailSender : IMailSender
{
private NetworkCredential credentials;
private string hostEmail;
public SendMailEmailSender(NetworkCre... |
Boost priority of NavigateTo when running in OOP server. | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.NavigateTo;
namespace Microsoft.CodeAnalys... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.NavigateTo;
namespace Microsoft.CodeAnalys... |
Update tag button container markup | @model IEnumerable<Tag>
@{
ViewBag.Title = "Tag Index";
}
<h2>Tag Index</h2>
@if (User.Identity.IsAuthenticated)
{
<p>
<a asp-action="Create">Create new Tag</a>
</p>
}
<h3>@Model.Count() tags</h3>
<ul class="tag-buttons">
@Html.Partial("_TagButtons", Model)
</ul>
| @model IEnumerable<Tag>
@{
ViewBag.Title = "Tag Index";
}
<h2>Tag Index</h2>
@if (User.Identity.IsAuthenticated)
{
<p>
<a asp-action="Create">Create new Tag</a>
</p>
}
<h3>@Model.Count() tags</h3>
<div>
@Html.Partial("_TagButtons", Model)
</div> |
Fix bug in properties and event detection | using System;
namespace Terrajobst.Pns.Scanner
{
public struct PnsResult
{
public static readonly PnsResult DoesNotThrow = new PnsResult(-1);
private PnsResult(int level)
{
Level = level;
}
public static PnsResult ThrowsAt(int level)
{
... | using System;
namespace Terrajobst.Pns.Scanner
{
public struct PnsResult
{
public static readonly PnsResult DoesNotThrow = new PnsResult(-1);
private PnsResult(int level)
{
Level = level;
}
public static PnsResult ThrowsAt(int level)
{
... |
Abort test if test container exists. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lokad.Cqrs.Properties;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;
using NUnit.Framework;
namespace Lokad.Cqrs.Feature.TapeStorage
{
[TestFixture]
public class BlobTapeStorageT... | using System;
using Lokad.Cqrs.Properties;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;
using NUnit.Framework;
namespace Lokad.Cqrs.Feature.TapeStorage
{
[TestFixture]
public class BlobTapeStorageTests : TapeStorageTests
{
const string ContainerName = "blob-... |
Fix startup problem on windows | using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Steeltoe.Extensions.Configuration.CloudFoundry;
namespace CloudFoundry
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildW... | using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Steeltoe.Extensions.Configuration.CloudFoundry;
namespace CloudFoundry
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
... |
Fix Roslyn compiler issues when the same file is being used for multiple target platforms (and might result in a class without methods) | using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using SharpDox.Build.Roslyn.MethodVisitors;
namespace SharpDox.Build.Roslyn.Parser.ProjectParser
{
internal class MethodCallParser : BaseParser
{
internal MethodCallParser(ParserOptions parserOptions) : base(parserOptions) { }
int... | using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using SharpDox.Build.Roslyn.MethodVisitors;
namespace SharpDox.Build.Roslyn.Parser.ProjectParser
{
internal class MethodCallParser : BaseParser
{
internal MethodCallParser(ParserOptions parserOptions) : base(parserOptions) { }
int... |
Change exception to proper class | using OrienteeringToolWPF.Model;
using OrienteeringToolWPF.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrienteeringToolWPF.DAO
{
public static class CompetitorHelper
{
public static List<Competitor> CompetitorsJoi... | using OrienteeringToolWPF.Model;
using OrienteeringToolWPF.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrienteeringToolWPF.DAO
{
public static class CompetitorHelper
{
public static List<Competitor> CompetitorsJoi... |
Remove fat arrow getter because of appveyor .net version support | using LiveScoreUpdateSystem.Data.Models.Contracts;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Security.Claims;
using System.Threading.Tasks;
namespace LiveScoreUpdateSystem.Data.Models
{
public class User : IdentityUser, IDeletable, IAuditable, IDa... | using LiveScoreUpdateSystem.Data.Models.Contracts;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Security.Claims;
using System.Threading.Tasks;
namespace LiveScoreUpdateSystem.Data.Models
{
public class User : IdentityUser, IDeletable, IAuditable, IDa... |
Fix for Unknown status display | @model Vehicle
@switch(Model.Status)
{
case Vehicle.VehicleStatus.FMC:
<span class="label label-success">FMC</span>
return;
case Vehicle.VehicleStatus.NMC:
<span class="label label-danger">NMC</span>
return;
default:
<span class="label label-warning">@Model</span>
... | @model Vehicle
@switch(Model.Status)
{
case Vehicle.VehicleStatus.FMC:
<span class="label label-success">FMC</span>
return;
case Vehicle.VehicleStatus.NMC:
<span class="label label-danger">NMC</span>
return;
case Vehicle.VehicleStatus.Unknown:
<span class="... |
Fix bug: incorrectly determines the center of the top | using System.Windows.Controls.Primitives;
namespace SharpGraphEditor.Controls.GraphElements
{
/// <summary>
/// Логика взаимодействия для VertexControl.xaml
/// </summary>
public partial class VertexControl : Thumb
{
public VertexControl()
{
InitializeComponent();
... | using System.Windows.Controls.Primitives;
namespace SharpGraphEditor.Controls.GraphElements
{
/// <summary>
/// Логика взаимодействия для VertexControl.xaml
/// </summary>
public partial class VertexControl : Thumb
{
public VertexControl()
{
InitializeComponent();
... |
Set endpoint routing in responsive sample web app | // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Micr... | // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Micr... |
Rename setup blob => setup files | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Data.Entity;
namespace CodeComb.AspNet.Upload.Models
{
public static class ModelBuilderExtensions
{
public static ModelBuilder SetupBlob(this ModelBuilder self)
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Data.Entity;
namespace CodeComb.AspNet.Upload.Models
{
public static class ModelBuilderExtensions
{
public static ModelBuilder SetupFiles(this ModelBuilder self)
{
... |
Change classe accessibility to internal | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Xamarin.Forms.GoogleMaps
{
public static class GeoConstants
{
public const double EarthRadiusKm = 6371;
public const double EarthCircumferenceKm = EarthRadiusKm * 2 * M... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Xamarin.Forms.GoogleMaps
{
internal static class GeoConstants
{
public const double EarthRadiusKm = 6371;
public const double EarthCircumferenceKm = EarthRadiusKm * 2 *... |
Update NotificationSettingsVM for LiveTiles settings | using CodeHub.Services;
using GalaSoft.MvvmLight;
namespace CodeHub.ViewModels.Settings
{
public class NofiticationSettingsViewModel : ObservableObject
{
private bool _isToastEnabled = SettingsService.Get<bool>(SettingsKeys.IsToastEnabled);
public bool IsToastEnabled
{
get => _isToastEnabled;
set
{
... | using CodeHub.Services;
using GalaSoft.MvvmLight;
namespace CodeHub.ViewModels.Settings
{
public class NofiticationSettingsViewModel : ObservableObject
{
private bool _isToastEnabled = SettingsService.Get<bool>(SettingsKeys.IsToastEnabled);
private bool _isLiveTilesEnabled = SettingsService.Ge... |
Update settings with username and conference ids | // Helpers/Settings.cs
using Refractored.Xam.Settings;
using Refractored.Xam.Settings.Abstractions;
namespace CodeCamp.Helpers
{
/// <summary>
/// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the same exact way with ... | // Helpers/Settings.cs
using Refractored.Xam.Settings;
using Refractored.Xam.Settings.Abstractions;
namespace CodeCamp.Helpers
{
/// <summary>
/// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the same exact way with ... |
Revert "Fixing bad default path." | using System;
using System.IO;
using System.Collections.Generic;
namespace CyLR
{
internal static class CollectionPaths
{
public static List<string> GetPaths(Arguments arguments)
{
var paths = new List<string>
{
@"C:\Windows\System32\config",
... | using System;
using System.IO;
using System.Collections.Generic;
namespace CyLR
{
internal static class CollectionPaths
{
public static List<string> GetPaths(Arguments arguments)
{
var paths = new List<string>
{
@"C:\Windows\System32\config",
... |
Improve spacing for status messages | @{
var parsedModel = TempData.GetStatusMessageModel();
}
@if (parsedModel != null)
{
<div class="alert alert-@parsedModel.SeverityCSS @(parsedModel.AllowDismiss? "alert-dismissible":"" )" role="alert">
@if (parsedModel.AllowDismiss)
{
<button type="button" class="close" data-dismis... | @{
var parsedModel = TempData.GetStatusMessageModel();
}
@if (parsedModel != null)
{
<div class="alert alert-@parsedModel.SeverityCSS @(parsedModel.AllowDismiss? "alert-dismissible":"" ) mb-5" role="alert">
@if (parsedModel.AllowDismiss)
{
<button type="button" class="close" data-d... |
Remove unnecessary nesting of `IconButton` and update design a touch | // 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 osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
using osu.Game.Screens.Edit.Timing;
namespace osu.Game.Screens.Edit.Comp... |
Fix string injection of NAME from ViewBag to ng.constant | <script type="text/javascript">
angular.module("myapp")
.constant("WAIT", @ViewBag.WAIT)
.constant("NAME", @ViewBag.NAME)
;
</script>
| <script type="text/javascript">
angular.module("myapp")
.constant("WAIT", @ViewBag.WAIT)
.constant("NAME", '@ViewBag.NAME')
;
</script>
|
Simplify the response from the server on the agent-server http channel | using Glimpse.Web;
using Microsoft.AspNet.Http;
using Newtonsoft.Json;
using System.IO;
using System.Text;
using Microsoft.AspNet.Builder;
namespace Glimpse.Server.Web
{
public class HttpChannelReceiver : IMiddlewareResourceComposer
{
private readonly IServerBroker _messageServerBus;
public H... | using Glimpse.Web;
using Microsoft.AspNet.Http;
using Newtonsoft.Json;
using System.IO;
using System.Text;
using Microsoft.AspNet.Builder;
namespace Glimpse.Server.Web
{
public class HttpChannelReceiver : IMiddlewareResourceComposer
{
private readonly IServerBroker _messageServerBus;
public H... |
Fix problem with missing avatars | using System.Collections.Generic;
using JoinRpg.DataModel;
using JoinRpg.Domain;
using Claim = System.Security.Claims.Claim;
using ClaimTypes = System.Security.Claims.ClaimTypes;
namespace Joinrpg.Web.Identity
{
internal static class ClaimInfoBuilder
{
public static IList<Claim> ToClaimsList(this User ... | using System.Collections.Generic;
using JoinRpg.DataModel;
using JoinRpg.Domain;
using Claim = System.Security.Claims.Claim;
using ClaimTypes = System.Security.Claims.ClaimTypes;
namespace Joinrpg.Web.Identity
{
internal static class ClaimInfoBuilder
{
public static IList<Claim> ToClaimsList(this User ... |
Read plugin settings from BasePluginsDirectory and all sub-directories | namespace Nubot.Abstractions
{
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
public abstract class RobotPluginBase : IRobotPlugin
{
protected readonly IRobot Robot;
protected RobotPluginBase(string pluginName, IRobot robot)
... | namespace Nubot.Abstractions
{
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
public abstract class RobotPluginBase : IRobotPlugin
{
protected readonly IRobot Robot;
protected RobotPluginBase(string pluginName, IRobot robot)
... |
Use newly introduced autofac's SetAutofacLifetimeScope method to pass autofac scope from asp.net core pipeline to owin pipeline | using Autofac;
using Autofac.Integration.Owin;
using Bit.Owin.Contracts;
using Bit.Owin.Middlewares;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Owin;
using Owin;
using System;
using System.Reflection;
using System.Threading.Tasks;
namespace Bit.OwinCore.Middleware... | using Autofac;
using Autofac.Integration.Owin;
using Bit.Owin.Contracts;
using Bit.Owin.Middlewares;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Owin;
using Owin;
using System.Threading.Tasks;
namespace Bit.OwinCore.Middlewares
{
public class AspNetCoreAutofacD... |
Fix uri templates in season requests. | namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Seasons
{
using Enums;
using Objects.Basic;
using Objects.Get.Shows.Seasons;
using System.Collections.Generic;
internal class TraktSeasonCommentsRequest : TraktGetByIdSeasonRequest<TraktPaginationListResult<TraktSeasonComment>, TraktSeasonComment... | namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Seasons
{
using Enums;
using Objects.Basic;
using Objects.Get.Shows.Seasons;
using System.Collections.Generic;
internal class TraktSeasonCommentsRequest : TraktGetByIdSeasonRequest<TraktPaginationListResult<TraktSeasonComment>, TraktSeasonComment... |
Support `Status` filter when listing Terminal `Reader`s | namespace Stripe.Terminal
{
using System;
using Newtonsoft.Json;
public class ReaderListOptions : ListOptions
{
[JsonProperty("location")]
public string Location { get; set; }
[Obsolete("This feature has been deprecated and should not be used moving forward.")]
[JsonPro... | namespace Stripe.Terminal
{
using System;
using Newtonsoft.Json;
public class ReaderListOptions : ListOptions
{
/// <summary>
/// A location ID to filter the response list to only readers at the specific location.
/// </summary>
[JsonProperty("location")]
public ... |
Add event hub connection property | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.Description;
namespace Microsoft.Azure.WebJobs.ServiceBus
{
/// <summary>
/// Setup an 'trigger' on a parameter to... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.Description;
namespace Microsoft.Azure.WebJobs.ServiceBus
{
/// <summary>
/// Setup an 'trigger' on a parameter to... |
Throw an exception if the Redis connection is not open | using System;
using System.Threading.Tasks;
using System.Web.Mvc;
using BookSleeve;
using SignalR;
namespace Compilify.Web.EndPoints
{
public class ExecuteEndPoint : PersistentConnection
{
/// <summary>
/// Handle messages sent by the client.</summary>
protected override Ta... | using System;
using System.Threading.Tasks;
using System.Web.Mvc;
using BookSleeve;
using SignalR;
namespace Compilify.Web.EndPoints
{
public class ExecuteEndPoint : PersistentConnection
{
/// <summary>
/// Handle messages sent by the client.</summary>
protected override Ta... |
Remove protocol from licenses view. | using System.Diagnostics;
using System.Windows.Input;
using Norma.Models;
using Norma.ViewModels.Internal;
using Prism.Commands;
namespace Norma.ViewModels
{
internal class LibraryViewModel : ViewModel
{
private readonly Library _library;
public string Name => _library.Name;
public... | using System.Diagnostics;
using System.Windows.Input;
using Norma.Models;
using Norma.ViewModels.Internal;
using Prism.Commands;
namespace Norma.ViewModels
{
internal class LibraryViewModel : ViewModel
{
private readonly Library _library;
public string Name => _library.Name;
public... |
Set OpenCoffee as default test type | using System;
using System.ComponentModel;
namespace CoffeeFilter.UITests.Shared
{
public static class UITestsHelpers
{
public static string XTCApiKey {
get;
} = "024b0d715a7e9c22388450cf0069cb19";
public static TestType SelectedTest { get; set; }
public enum TestType
{
NoConnection,
ParseError,... | using System;
using System.ComponentModel;
namespace CoffeeFilter.UITests.Shared
{
public static class UITestsHelpers
{
public static string XTCApiKey {
get;
} = "024b0d715a7e9c22388450cf0069cb19";
public static TestType SelectedTest { get; set; }
public enum TestType
{
OpenCoffee = 0,
NoConnect... |
Add using when creating a memorystream | using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using CompaniesHouse.Response.Document;
using CompaniesHouse.UriBuilders;
using FluentAssertions;
using Moq;
using NUnit.Framework;
namespace CompaniesHouse.Tests.CompaniesHouseDocumentClientTests
{
[TestFixture]
public class ... | using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using CompaniesHouse.Response.Document;
using CompaniesHouse.UriBuilders;
using FluentAssertions;
using Moq;
using NUnit.Framework;
namespace CompaniesHouse.Tests.CompaniesHouseDocumentClientTests
{
[TestFixture]
public class ... |
Comment out some test code that no longer works due to API changes in UE | using System;
using System.Runtime.InteropServices;
using Klawr.ClrHost.Managed;
using Klawr.ClrHost.Interfaces;
using Klawr.ClrHost.Managed.SafeHandles;
namespace Klawr.UnrealEngine
{
public class TestActor : AActorScriptObject
{
public TestActor(long instanceID, UObjectHandle nativeObject) : base(in... | using System;
using System.Runtime.InteropServices;
using Klawr.ClrHost.Managed;
using Klawr.ClrHost.Interfaces;
using Klawr.ClrHost.Managed.SafeHandles;
namespace Klawr.UnrealEngine
{
// NOTE: IScriptObject should probably be considered deprecated in favor of UKlawrScriptComponent
public class TestActor : AA... |
Fix issue when the error messages are rendered in Markdown with an Always configuration | using MarkdownLog;
using NBi.Core.ResultSet;
using NBi.Core.ResultSet.Lookup;
using NBi.Core.ResultSet.Lookup.Violation;
using NBi.Framework.FailureMessage.Common;
using NBi.Framework.FailureMessage.Common.Helper;
using NBi.Framework.FailureMessage.Markdown.Helper;
using NBi.Framework.Sampling;
using System;
using Sys... | using MarkdownLog;
using NBi.Core.ResultSet;
using NBi.Core.ResultSet.Lookup;
using NBi.Core.ResultSet.Lookup.Violation;
using NBi.Framework.FailureMessage.Common;
using NBi.Framework.FailureMessage.Common.Helper;
using NBi.Framework.FailureMessage.Markdown.Helper;
using NBi.Framework.Sampling;
using System;
using Sys... |
Fix BillboardWrapper, prevent bb from collecting by GC | using System;
namespace Urho {
public partial class BillboardSet
{
public BillboardWrapper GetBillboardSafe (uint index)
{
unsafe {
Billboard* result = BillboardSet_GetBillboard (handle, index);
if (result == null)
return null;
return new BillboardWrapper(result);
}
... | using System;
namespace Urho {
public partial class BillboardSet
{
public BillboardWrapper GetBillboardSafe (uint index)
{
unsafe {
Billboard* result = BillboardSet_GetBillboard (handle, index);
if (result == null)
return null;
return new BillboardWrapper(this, result);
... |
Add new private field for the route handler | using System.Web.Mvc;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
protected Route GenerateRoute(string path, string controller, string action, string[] httpMethods)
{
return new Route(path,
new RouteValueDictionary(new { controller, action }),
new RouteValueDic... | using System.Web.Mvc;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Route GenerateRoute(string path, string controller, string action, string[] httpMethods)
{
return new Route(path,
new RouteValueDictionary(n... |
Add jsonconverter to extension model | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace Contentful.Core.Models.Management
{
/// <summary>
/// Encapsulates information about a Contentful Ui Extension
/// </summary>
public class UiExtension : IContentfulResource
{
/// <summary>
... | using Contentful.Core.Configuration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace Contentful.Core.Models.Management
{
/// <summary>
/// Encapsulates information about a Contentful Ui Extension
/// </summary>
[JsonConverter(typeof(ExtensionJsonConv... |
Add missing namespace for uwp | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
#if (NETFX || WINDOWS_PHONE)
using System.Windows;
using System.Windows.Data;
using System.Windows.Markup;
#elif (NETFX_CORE)
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
#elif (XAMARIN)
using Xamarin.Forms;
#endif
n... | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
#if (NETFX || WINDOWS_PHONE)
using System.Windows;
using System.Windows.Data;
using System.Windows.Markup;
#elif (NETFX_CORE)
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Markup;
#elif (XAMARIN)
... |
Add a prefix to each log | using Mindscape.Raygun4Net.Utils;
namespace Mindscape.Raygun4Net.Logging
{
public class RaygunLogger : Singleton<RaygunLogger>, IRaygunLogger
{
public RaygunLogLevel LogLevel { get; set; }
public void Error(string message)
{
Log(RaygunLogLevel.Error, message);
}
public void Warning(stri... | using Mindscape.Raygun4Net.Utils;
namespace Mindscape.Raygun4Net.Logging
{
public class RaygunLogger : Singleton<RaygunLogger>, IRaygunLogger
{
private const string RaygunPrefix = "Raygun: ";
public RaygunLogLevel LogLevel { get; set; }
public void Error(string message)
{
Log(RaygunLogLevel... |
Use Socket instead of TcpClient for port scanning Works around ObjectDisposedException on Linux + Mono | using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
namespace MultiMiner.Utility.Networking
{
public class PortScanner
{
public static List<IPEndPoint> Find(string ipRange, int startingPort, int endingPort, int connectTimeout = 100)
{
if (sta... | using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
namespace MultiMiner.Utility.Networking
{
public class PortScanner
{
public static List<IPEndPoint> Find(string ipRange, int startingPort, int endingPort, int connectTimeout = 100)
{
if (sta... |
Add multiple bing maps keys | namespace TestAppUWP.Samples.Map
{
public class MapServiceSettings
{
public static string Token = string.Empty;
}
} | namespace TestAppUWP.Samples.Map
{
public class MapServiceSettings
{
public const string TokenUwp1 = "TokenUwp1";
public const string TokenUwp2 = "TokenUwp2";
public static string SelectedToken = TokenUwp1;
}
} |
Change recognized event handler for eval | using Microsoft.Speech.Recognition;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace lex4all
{
public static class EngineControl
{
/// <summary>
/// creates engine and sets properties
/// </summary>
//... | using Microsoft.Speech.Recognition;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace lex4all
{
public static class EngineControl
{
/// <summary>
/// creates engine and sets properties
/// </summary>
//... |
Return completions from all documents | using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Recommendations;
using Microsoft.CodeAnalysis.Text;
using OmniSharp.Models;
namespace OmniSharp
{
public partial class OmnisharpController
{
[HttpPost("autocomplete")... | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Recommendations;
using Microsoft.CodeAnalysis.Text;
using OmniSharp.Models;
namespace OmniSharp
{
public partial class OmnisharpController
{... |
Fix auth http services registration | using InfinniPlatform.Http;
using InfinniPlatform.IoC;
namespace InfinniPlatform.Auth.HttpService.IoC
{
public class AuthHttpServiceContainerModule<TUser> : IContainerModule where TUser : AppUser
{
public void Load(IContainerBuilder builder)
{
builder.RegisterType(typeof(AuthIntern... | using InfinniPlatform.Http;
using InfinniPlatform.IoC;
namespace InfinniPlatform.Auth.HttpService.IoC
{
public class AuthHttpServiceContainerModule<TUser> : IContainerModule where TUser : AppUser
{
public void Load(IContainerBuilder builder)
{
builder.RegisterType(typeof(AuthIntern... |
Make testcase even more useful | // 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.Containers;
using osu.Game.Overlays.Toolbar;
using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using System.Linq... | // 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.Containers;
using osu.Game.Overlays.Toolbar;
using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using System.Linq... |
Stop hiding indexer on IList | using System.Collections.Generic;
namespace Ical.Net.Interfaces.DataTypes
{
public interface IPeriodList : IEncodableDataType, IList<IPeriod>
{
string TzId { get; set; }
IPeriod this[int index] { get; set; }
void Add(IDateTime dt);
void Remove(IDateTime dt);
}
} | using System.Collections.Generic;
namespace Ical.Net.Interfaces.DataTypes
{
public interface IPeriodList : IEncodableDataType, IList<IPeriod>
{
string TzId { get; set; }
new IPeriod this[int index] { get; set; }
void Add(IDateTime dt);
void Remove(IDateTime dt);
}
} |
Fix station events system test | using System.Threading.Tasks;
using Content.Server.GameObjects.EntitySystems.StationEvents;
using NUnit.Framework;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
namespace Content.IntegrationTests.Tests.StationEvents
{
[TestFixture]
public class Station... | using System.Threading.Tasks;
using Content.Server.GameObjects.EntitySystems.StationEvents;
using NUnit.Framework;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
namespace Content.IntegrationTests.Tests.StationEvents
{
[TestFixture]
public class Station... |
Use plain text for function secrets in Linux Containers | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs.Script.Config;
using static Microsoft.... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs.Script.Config;
using static Microsoft.... |
Remove TestCase cleanup temporarily until context disposal is sorted | // 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;
using osu.Framework.Platform;
using osu.Framework.Testing;
namespace osu.Game.Tests.Visual
{
public abstract class OsuTestCase : TestCase
... | // 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;
using osu.Framework.Platform;
using osu.Framework.Testing;
namespace osu.Game.Tests.Visual
{
public abstract class OsuTestCase : TestCase
... |
Remove the ListGroups snippet from Monitoring | // Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | // Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
Set Android permissions through Assemblyinfo | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[... |
Update the Command Help Request Error to get the value | namespace BigEgg.ConsoleExtension.Parameters.Errors
{
using System;
internal class CommandHelpRequestError : Error
{
public CommandHelpRequestError()
: base(ErrorType.CommandHelpRequest, true)
{ }
public string CommandName { get; private set; }
public bool Ex... | namespace BigEgg.ConsoleExtension.Parameters.Errors
{
using System;
internal class CommandHelpRequestError : Error
{
public CommandHelpRequestError(string commandName, bool existed, Type commandType)
: base(ErrorType.CommandHelpRequest, true)
{
CommandName = command... |
Simplify statistics in osu ruleset | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Obje... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Osu.Objects;
namespace osu.Game.Rulesets... |
Add short desc on main | using System;
using System.Collections.Generic;
using System.Threading;
using Nancy;
using Nancy.Hosting.Self;
namespace ChildProcessUtil
{
public class Program
{
private const string HttpAddress = "http://localhost:";
private static NancyHost host;
private static void Main(string[] ar... | using System;
using System.Collections.Generic;
using System.Threading;
using Nancy;
using Nancy.Hosting.Self;
namespace ChildProcessUtil
{
public class Program
{
private const string HttpAddress = "http://localhost:";
private static NancyHost host;
private static void Main(string[] ar... |
Rename Raytraced settings Options page to just Cycles. | /**
Copyright 2014-2017 Robert McNeel and Associates
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | /**
Copyright 2014-2017 Robert McNeel and Associates
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
Fix crazy Unix line endings ;) | // Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Utility
{
/// <summary>
/// Exception thrown when data read by Noda Time (such as serialized time zone data) is ... | // Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Utility
{
/// <summary>
/// Exception thrown when data read by Noda Time (such as serialized time zone ... |
Fix 'yarn audit'. Register the Audit alias | using System;
namespace Cake.Yarn
{
/// <summary>
/// Yarn Runner command interface
/// </summary>
public interface IYarnRunnerCommands
{
/// <summary>
/// execute 'yarn install' with options
/// </summary>
/// <param name="configure">options when running 'yarn insta... | using System;
namespace Cake.Yarn
{
/// <summary>
/// Yarn Runner command interface
/// </summary>
public interface IYarnRunnerCommands
{
/// <summary>
/// execute 'yarn install' with options
/// </summary>
/// <param name="configure">options when running 'yarn insta... |
Use interface, not concrete type, for Unity Fluent extension. | /* Copyright 2014 Jonathan Holland.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | /* Copyright 2014 Jonathan Holland.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... |
Test with a slightly larger image. | // Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unless req... | // Copyright 2013-2020 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unless req... |
Add option to yield return a KMSelectable to toggle-interact with. | using System.Collections;
using System.Reflection;
using UnityEngine;
public class CoroutineModComponentSolver : ComponentSolver
{
public CoroutineModComponentSolver(BombCommander bombCommander, MonoBehaviour bombComponent, IRCConnection ircConnection, CoroutineCanceller canceller, MethodInfo processMethod, Compo... | using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
public class CoroutineModComponentSolver : ComponentSolver
{
public CoroutineModComponentSolver(BombCommander bombCommander, MonoBehaviour bombComponent, IRCConnection ircConnection, CoroutineCanceller cancelle... |
Fix null reference exception when running under Mono | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace AsyncRewriter
{
/// <summary>
/// </summary>
/// <remarks>
/// http://stackoverflow.com/quest... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace AsyncRewriter
{
/// <summary>
/// </summary>
/// <remarks>
/// http://stackoverflow.com/quest... |
Use extension method for WindsorRegistrationHelper.AddServices | using System;
using Microsoft.Extensions.DependencyInjection;
namespace Castle.Windsor.MsDependencyInjection
{
public class WindsorServiceProviderFactory : IServiceProviderFactory<IWindsorContainer>
{
public IWindsorContainer CreateBuilder(IServiceCollection services)
{
var contain... | using System;
using Microsoft.Extensions.DependencyInjection;
namespace Castle.Windsor.MsDependencyInjection
{
public class WindsorServiceProviderFactory : IServiceProviderFactory<IWindsorContainer>
{
public IWindsorContainer CreateBuilder(IServiceCollection services)
{
var contain... |
Add interface as resharper forgot | using NUnit.Framework;
namespace Smooth.IoC.Dapper.FastCRUD.Repository.UnitOfWork.Tests.TestHelpers
{
public class MyDatabaseSettings
{
public string ConnectionString { get; } = $@"{TestContext.CurrentContext.TestDirectory}\Tests.db";
}
}
| using NUnit.Framework;
namespace Smooth.IoC.Dapper.FastCRUD.Repository.UnitOfWork.Tests.TestHelpers
{
public class MyDatabaseSettings : IMyDatabaseSettings
{
public string ConnectionString { get; } = $@"Data Source={TestContext.CurrentContext.TestDirectory}\Tests.db;Version=3;New=True;BinaryGUID=False... |
Update the closest known distance. | using System;
using System.Collections.Generic;
namespace ChamberLib
{
public interface IModel
{
object Tag { get; set; }
IEnumerable<IMesh> GetMeshes();
void Draw(Matrix world, Matrix view, Matrix projection,
IMaterial materialOverride=null,
LightingData? lig... | using System;
using System.Collections.Generic;
namespace ChamberLib
{
public interface IModel
{
object Tag { get; set; }
IEnumerable<IMesh> GetMeshes();
void Draw(Matrix world, Matrix view, Matrix projection,
IMaterial materialOverride=null,
LightingData? lig... |
Make ES mapping configuration Properties setter public | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.Diagnostics.EventFlow.Configuration
{
public class ElasticSearchMappingsConfiguration
{
public Dictionary<string, ElasticSearchMappingsConfigurationPropertyDescriptor... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.Diagnostics.EventFlow.Configuration
{
public class ElasticSearchMappingsConfiguration
{
public Dictionary<string, ElasticSearchMappingsConfigurationPropertyDescriptor... |
Replace CSharpHighlightingTestBase (will be removed in 2016.2 SDK) usage with TestNetFramework4-attribute | using System.IO;
using JetBrains.Annotations;
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.FeaturesTestFramework.Daemon;
using JetBrains.ReSharper.Psi;
using XmlDocInspections.Plugin.Highlighting;
namespace XmlDocInspections.Plugin.Tests.Integrativ... | using System.IO;
using JetBrains.Annotations;
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.FeaturesTestFramework.Daemon;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.TestFramework;
using XmlDocInspections.Plugin.Highlighting;
namespace ... |
Modify the companies house verification service to use the config initalised as a constructor parameter | using System;
using System.Net;
using System.Threading.Tasks;
using Microsoft.Azure;
using Newtonsoft.Json;
using NLog;
using SFA.DAS.EmployerApprenticeshipsService.Domain;
using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces;
namespace SFA.DAS.EmployerApprenticeshipsService.Infrastructure.Services
{
pu... | using System.Net;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NLog;
using SFA.DAS.EmployerApprenticeshipsService.Domain;
using SFA.DAS.EmployerApprenticeshipsService.Domain.Configuration;
using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces;
namespace SFA.DAS.EmployerApprenticeshipsService.In... |
Fix spelling error in method name | using AutoMapper;
using Esfa.Vacancy.Api.Types;
using Esfa.Vacancy.Register.Api;
using Esfa.Vacancy.Register.Application.Queries.SearchApprenticeshipVacancies;
using FluentAssertions;
using NUnit.Framework;
namespace Esfa.Vacancy.Register.UnitTests.SearchApprenticeship.Api.GivenSearchApprenticeshipParameters
{
[T... | using AutoMapper;
using Esfa.Vacancy.Api.Types;
using Esfa.Vacancy.Register.Api;
using Esfa.Vacancy.Register.Application.Queries.SearchApprenticeshipVacancies;
using FluentAssertions;
using NUnit.Framework;
namespace Esfa.Vacancy.Register.UnitTests.SearchApprenticeship.Api.GivenSearchApprenticeshipParameters
{
[T... |
Create one single instance of StringBuilder | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System.Text;
using UnityEngine;
namespace HoloToolkit.Unity
{
public static class TransformExtensions
{
/// <summary>
/// An extension... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System.Text;
using UnityEngine;
namespace HoloToolkit.Unity
{
public static class TransformExtensions
{
/// <summary>
/// An extension... |
Stop webview from reloading when rotated | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;
namespace webscripthook_android
{
[Activity(Label = "GT... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;
namespace webscripthook_android
{
[Activity(Label = "GT... |
Fix h1 class to match other views | @model IdentityServer3.Core.ViewModels.AuthorizeResponseViewModel
<h1 class="heading-large">Login successful</h1>
<form id="mainForm" method="post" action="@Model.ResponseFormUri">
<div id="autoRedirect" style="display: none;">Please wait...</div>
@Html.Raw(Model.ResponseFormFields)
<div id="man... | @model IdentityServer3.Core.ViewModels.AuthorizeResponseViewModel
@{
ViewBag.PageID = "authorize-response";
ViewBag.Title = "Login Successful";
ViewBag.HideSigninLink = "true";
}
<h1 class="heading-xlarge">Login successful</h1>
<form id="mainForm" method="post" action="@Model.ResponseFormUri">
... |
Store the number of time units per second in a static const value. | using System;
namespace FbxSharp
{
public struct FbxTime
{
public static readonly FbxTime Infinite = new FbxTime(0x7fffffffffffffffL);
public static readonly FbxTime Zero = new FbxTime(0);
public FbxTime(long time)
{
Value = time;
}
public long Valu... | using System;
namespace FbxSharp
{
public struct FbxTime
{
public static readonly FbxTime Infinite = new FbxTime(0x7fffffffffffffffL);
public static readonly FbxTime Zero = new FbxTime(0);
public const long UnitsPerSecond = 46186158000L;
public FbxTime(long time)
{
... |
Add inital response lines in PU-Stub to mimic production PU | using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace PU_Stub.Controllers
{
public class SnodController : ApiController
{
private static readonly IDictionary<string, string> TestPersons;
... | using Kentor.PU_Adapter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace PU_Stub.Controllers
{
public class SnodController : ApiController
{
private static readonly IDictionary<string, string> TestPersons;
... |
Add “using static System.Console” to main | using CIV.Ccs;
namespace CIV
{
class Program
{
static void Main(string[] args)
{
var text = System.IO.File.ReadAllText(args[0]);
var processes = CcsFacade.ParseAll(text);
var trace = CcsFacade.RandomTrace(processes["Prison"], 450);
foreach (var action in t... | using static System.Console;
using CIV.Ccs;
namespace CIV
{
class Program
{
static void Main(string[] args)
{
var text = System.IO.File.ReadAllText(args[0]);
var processes = CcsFacade.ParseAll(text);
var trace = CcsFacade.RandomTrace(processes["Prison"], 450);
... |
Make sure that a plugin is only created once | // Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.
using System;
using System.IO;
using System.Reflection;
using Autofac;
using Lunet.Core;
using Microsoft.Extensions.Logging;
namespace... | // Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.
using System;
using System.IO;
using System.Reflection;
using Autofac;
using Lunet.Core;
using Microsoft.Extensions.Logging;
namespace... |
Change default gamemode from INSTRUCTION to ONE_PLAYER | using UnityEngine;
using System.Collections;
public class GameStart : MonoBehaviour {
static int gameMode = INSTRUCTION;
const int INSTRUCTION = -1;
const int ONE_PLAYER = 1;
const int TWO_PLAYER = 2;
/// <summary>
/// The game mode of the current game
/// </summary>
public static in... | using UnityEngine;
using System.Collections;
public class GameStart : MonoBehaviour {
static int gameMode = ONE_PLAYER;
const int INSTRUCTION = -1;
const int ONE_PLAYER = 1;
const int TWO_PLAYER = 2;
/// <summary>
/// The game mode of the current game
/// </summary>
public static int... |
Fix model binding for OData Patch, Post, Put | using Abp.AspNetCore.OData.Controllers;
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.Web.Models;
using AbpODataDemo.People;
using Microsoft.AspNet.OData;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading.Tasks;
namespace AbpODataDemo.Controllers
{
[DontWrapResult]
pub... | using Abp.AspNetCore.OData.Controllers;
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.Web.Models;
using AbpODataDemo.People;
using Microsoft.AspNet.OData;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading.Tasks;
namespace AbpODataDemo.Controllers
{
[DontWrapResult]
pub... |
Add PageImage override for Mac and fix title string | /**
Copyright 2014-2017 Robert McNeel and Associates
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | /**
Copyright 2014-2017 Robert McNeel and Associates
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
Update funding link to go to account transactions index | @model SFA.DAS.EmployerApprenticeshipsService.Domain.Entities.Account.Account
<h1 class="heading-xlarge" id="company-Name">@Model.Name</h1>
<div class="grid-row">
<div class="column-two-thirds">
<div style="max-width: 90%">
<div class="grid-row">
<div class="column-half">
<h3 ... | @model SFA.DAS.EmployerApprenticeshipsService.Domain.Entities.Account.Account
<h1 class="heading-xlarge" id="company-Name">@Model.Name</h1>
<div class="grid-row">
<div class="column-two-thirds">
<div style="max-width: 90%">
<div class="grid-row">
<div class="column-half">
<h3 ... |
Make custom ingredient optional on extension method | namespace MadeWithLove.Middleware
{
using Owin;
public static class Extensions
{
public static void MakeWithLove(this IAppBuilder app, string customIngredient)
{
app.Use<MadeWithLoveMiddleware>(customIngredient);
}
}
}
| namespace MadeWithLove.Middleware
{
using Owin;
public static class Extensions
{
public static void MakeWithLove(this IAppBuilder app, string customIngredient = null)
{
app.Use<MadeWithLoveMiddleware>(customIngredient);
}
}
}
|
Add empty inputhandlers list for headless execution. | // 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 osu.Framework.Allocation;
using osu.Framework.Input;
using osu.Framework.Statistics;
namespace osu.Framework.OS
{
/// <summary>
/// A... | // 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.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Input;
using osu.Framework.Input.Handlers;
using osu.Framework.St... |
Increase version number to 0.1.0.0. | using System;
using System.Reflection;
using System.Runtime.InteropServices;
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior an... | using System;
using System.Reflection;
using System.Runtime.InteropServices;
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior an... |
Add short name for Worst Segments | using System.Collections.Generic;
namespace LiveSplit.Model.Comparisons
{
public class StandardComparisonGeneratorsFactory : IComparisonGeneratorsFactory
{
static StandardComparisonGeneratorsFactory()
{
CompositeComparisons.AddShortComparisonName(BestSegmentsComparisonGenerator.Comp... | using System.Collections.Generic;
namespace LiveSplit.Model.Comparisons
{
public class StandardComparisonGeneratorsFactory : IComparisonGeneratorsFactory
{
static StandardComparisonGeneratorsFactory()
{
CompositeComparisons.AddShortComparisonName(BestSegmentsComparisonGenerator.Comp... |
Correct compie time constant to be NET46 | namespace Microsoft.ApplicationInsights.AspNetCore.Tests.ContextInitializers
{
using System;
using System.Globalization;
using System.Net;
using System.Net.NetworkInformation;
using Helpers;
using Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers;
using Microsoft.ApplicationIns... | namespace Microsoft.ApplicationInsights.AspNetCore.Tests.ContextInitializers
{
using System;
using System.Globalization;
using System.Net;
using System.Net.NetworkInformation;
using Helpers;
using Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers;
using Microsoft.ApplicationIns... |
Move more stuff to superclass | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicCash
{
public abstract class BaseActor
{
public string Name { get; set; }
public Guid ActorGuid { get; set; }
}
}
| using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicCash
{
/// <summary>
/// The base actor abstracts all common properties of our actors (mainly Bank, Merchant, Customer)
/// </summary>
public abstract class BaseActor... |
Add environment check to determine architecture | using System;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/BindingTest.html";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
private const bool debu... | using System;
using System.Linq;
namespace CefSharp.Example
{
public static class CefExample
{
public const string DefaultUrl = "custom://cefsharp/BindingTest.html";
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
private const bool debu... |
Include version to get e.g ReSharper happy. | using System.Reflection;
#if DEBUG
[assembly: AssemblyProduct("Ensure.That (Debug)")]
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyProduct("Ensure.That (Release)")]
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyDescription("Yet another guard clause project.")... | using System.Reflection;
#if DEBUG
[assembly: AssemblyProduct("Ensure.That (Debug)")]
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyProduct("Ensure.That (Release)")]
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyDescription("Yet another guard clause project.")... |
Fix poorly written test (sorry). | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
namespace Moq.Tests
{
public class ExtensionsFixture
{
[Fact]
public void IsMockeableReturnsFalseForValueType()
{
Assert.False(typeof(int).IsMockeable());
}
// [Fact]
// pu... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
namespace Moq.Tests
{
public class ExtensionsFixture
{
#region Public Methods
[Fact]
public void IsMockeableReturnsFalseForValueType()
{
Assert.False(t... |
Support remote scripts with empty/null Content Type | using System;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using System.Threading.Tasks;
namespace Dotnet.Script.Core
{
public class ScriptDownloader
{
public async Task<string> Download(string uri)
{
using (HttpClient client = new HttpClient())
... | using System;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using System.Threading.Tasks;
namespace Dotnet.Script.Core
{
public class ScriptDownloader
{
public async Task<string> Download(string uri)
{
using (HttpClient client = new HttpClient())
... |
Add bio and Github profile | using System;
using System.Collections.Generic;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class MartijnVanDijk : IAmAMicrosoftMVP, IAmAXamarinMVP
{
public IEnumerable<Uri> FeedUris
{
get { yield return new Uri("https://medium.com/feed/@martijn00"); ... | using System;
using System.Collections.Generic;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class MartijnVanDijk : IAmAMicrosoftMVP, IAmAXamarinMVP
{
public IEnumerable<Uri> FeedUris
{
get { yield return new Uri("https://medium.com/feed/@martijn00"); ... |
Use a type converter to try and convert values | // Copyright 2007-2015 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0... | // Copyright 2007-2015 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0... |
Remove no longer required SDL2 P/Invokes in Linux clipboard | // 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.Runtime.InteropServices;
namespace osu.Framework.Platform.Linux.SDL2
{
public class SDL2Clipboard : Clipboard
{
private const ... | // 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 SDL2;
namespace osu.Framework.Platform.Linux.SDL2
{
public class SDL2Clipboard : Clipboard
{
public override string GetText() => SDL.SDL_GetClipboa... |
Store OOP server persistence database in a different file. | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Composition;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Host;
namespace Microsoft.Co... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Composition;
using System.IO;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
names... |
Update Disqus partial to use node name for the page title configuration variable | @inherits UmbracoViewPage<IMaster>
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '@Umbraco.NiceUrlWithDomain(Model.Id)';
this.page.identifier = '@Model.Id';
this.page.title = '@Model.SeoMetadata.Title';
};
(function () {
var d = d... | @inherits UmbracoViewPage<IPublishedContent>
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '@Umbraco.NiceUrlWithDomain(Model.Id)';
this.page.identifier = '@Model.Id';
this.page.title = '@Model.Name';
};
(function () {
var d = docu... |
Fix assembly metadata to fix package verifier warnings | using System.Reflection;
using System.Resources;
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.
[asse... | // 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.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle... |
Change char to byte in gaf frame header | namespace TAUtil.Gaf.Structures
{
using System.IO;
public struct GafFrameData
{
public ushort Width;
public ushort Height;
public ushort XPos;
public ushort YPos;
public char Unknown1;
public bool Compressed;
public ushort FramePointers;
... | namespace TAUtil.Gaf.Structures
{
using System.IO;
public struct GafFrameData
{
public ushort Width;
public ushort Height;
public ushort XPos;
public ushort YPos;
public byte Unknown1;
public bool Compressed;
public ushort FramePointers;
... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.