Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Configure await false to remove deadlocks
using Microsoft.Azure.AppService.ApiApps.Service; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace TRex.Extensions { public static class ClientTriggerCallbackExtensions { /// <summary> /// Invokes the callbac...
using Microsoft.Azure.AppService.ApiApps.Service; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace TRex.Extensions { public static class ClientTriggerCallbackExtensions { /// <summary> /// Invokes the callbac...
Write to log instead of console
using System; using EvilDICOM.Core.Enums; namespace EvilDICOM.Core.IO.Data { public class DataRestriction { public static string EnforceLengthRestriction(uint lengthLimit, string data) { if (data.Length > lengthLimit) { Console.Write( ...
using System; using EvilDICOM.Core.Enums; using EvilDICOM.Core.Logging; namespace EvilDICOM.Core.IO.Data { public class DataRestriction { public static string EnforceLengthRestriction(uint lengthLimit, string data) { if (data.Length > lengthLimit) { ...
Update Problems: 3 - 5
namespace StudentsTask { using System; using System.Collections.Generic; using System.Linq; public class Student { public const int MinAgeOfStudent = 6; private string firstName; private string lastName; private int age; public Student(string initialFirstN...
// Problem 3. First before last // Write a method that from a given array of students finds all students whose first name is before its last name alphabetically. // Use LINQ query operators. // Problem 4. Age range // Write a LINQ query that finds the first name and last name of all students with age between 1...
Update to support EF container isolation issue
using System.Diagnostics; using Glimpse.Agent; using Glimpse.Agent.Configuration; using Glimpse.Initialization; using Microsoft.Extensions.DependencyInjection; namespace Glimpse.Agent.Internal.Inspectors.Mvc { public class AgentStartupWebDiagnosticsInspector : IAgentStartup { public AgentStartupWebDia...
using System; using System.Collections.Generic; using System.Diagnostics; using Glimpse.Agent; using Glimpse.Agent.Configuration; using Glimpse.Initialization; using Microsoft.Extensions.DependencyInjection; namespace Glimpse.Agent.Internal.Inspectors.Mvc { public class AgentStartupWebDiagnosticsInspector : IAgen...
Make sure we always add our nop_api scope in order for the token to have access to the resources. Also make sure we always add offline_access scope as it is required by the IdentityServer. This way even if empty scope is passed i.e if using Postman the scope is empty, we still can obtain tokens with the correct scope. ...
namespace Nop.Plugin.Api.IdentityServer.Middlewares { using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Internal; using Microsoft.Extensions.Primitives; public class IdentityServerScopeParameterMid...
namespace Nop.Plugin.Api.IdentityServer.Middlewares { using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Internal; using Microsoft.Extensions.Primitives; public class IdentityServerScopeParameterMid...
Add support for followpoint skinning
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK; using OpenTK.Graphics; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.F...
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK; using OpenTK.Graphics; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.F...
Fix consistent updating of layout fields if both sides have a significant, but blank value (e.g. certain core db items)
using System; using System.Xml; using System.Xml.Linq; using Rainbow.Model; namespace Rainbow.Diff.Fields { public class XmlComparison : FieldTypeBasedComparison { public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2) { if (string.IsNullOrWhiteSpace(field1.Value) || string.IsNullOrWhi...
using System; using System.Xml; using System.Xml.Linq; using Rainbow.Model; namespace Rainbow.Diff.Fields { public class XmlComparison : FieldTypeBasedComparison { public override bool AreEqual(IItemFieldValue field1, IItemFieldValue field2) { if (string.IsNullOrWhiteSpace(field1.Value) && string.IsNullOrWhi...
Fix up the VB side
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.IntegrationTest.Utilities; using Roslyn.Test.Utilities; using Roslyn.VisualStudio.IntegrationTests...
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.IntegrationTest.Utilities; using Roslyn.Test.Utilities; using Xunit; using ProjectUtils = Microsof...
Fix for test from last commit.
using Microsoft.VisualStudio.TestTools.UnitTesting; using NJsonSchema.CodeGeneration.Tests.Models; using NJsonSchema.CodeGeneration.TypeScript; using NJsonSchema.Generation; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NJsonSchema.CodeGe...
using Microsoft.VisualStudio.TestTools.UnitTesting; using NJsonSchema.CodeGeneration.Tests.Models; using NJsonSchema.CodeGeneration.TypeScript; using NJsonSchema.Generation; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NJsonSchema.CodeGe...
Set new manage Guid when ballots are created
using System.Data.Entity; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web; using VotingApplication.Data.Context; using VotingApplication.Data.Model; using VotingApplication.Web.Api.Filters; using VotingApplication.Web.Api.Models.DBViewModels;...
using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Net; using VotingApplication.Data.Context; using VotingApplication.Data.Model; namespace VotingApplication.Web.Api.Controllers.API_Controllers { public class PollTokenController : WebApiController { ...
Update the sample application to retrieve the current time via SNTP
using System; using Microsoft.SPOT; using MicroTweet; using System.Net; using System.Threading; namespace SampleApplication { public class Program { public static void Main() { // Wait for DHCP while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any) T...
using System; using Microsoft.SPOT; using MicroTweet; using System.Net; using System.Threading; namespace SampleApplication { public class Program { public static void Main() { // Wait for DHCP while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any) T...
Change repository version to "0.0.0-alpha". The version numbers are updated by the build script (appveyor.yml).
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="GlobalAssemblyInfo.cs" company="OxyPlot"> // Copyright (c) 2014 OxyPlot contributors // </copyright> // -------------------------------------------------------------------------...
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="GlobalAssemblyInfo.cs" company="OxyPlot"> // Copyright (c) 2014 OxyPlot contributors // </copyright> // -------------------------------------------------------------------------...
Fix compilation error within the unit test
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; using Roslyn.Test.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UsePatternMatching { pub...
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; using Roslyn.Test.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UsePatternMatching { pu...
Add support for MetadataChanged/ItemMetadataChanged (whichever it turns out to be)
using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SyncTrayzor.SyncThing.ApiClient { [JsonConverter(typeof(StringEnumConverter))] public enum EventType { Starting, ...
using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SyncTrayzor.SyncThing.ApiClient { [JsonConverter(typeof(StringEnumConverter))] public enum EventType { Starting, ...
Change the pattern for matches-time
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.Core.Calculation.Predicate.Text { class TextMatchesTime : CultureSensitiveTextPredicate { public TextMatchesTime(bool not, string culture) ...
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NBi.Core.Calculation.Predicate.Text { class TextMatchesTime : CultureSensitiveTextPredicate { public TextMatchesTime(bool not, string culture) ...
Add title to android notifications object
namespace CertiPay.Common.Notifications.Notifications { public class AndroidNotification : Notification { public static string QueueName { get { return "AndroidNotifications"; } } // TODO Android specific properties? Title, Image, Sound, Action Button, Picture, Priority // Message => ...
using System; namespace CertiPay.Common.Notifications.Notifications { public class AndroidNotification : Notification { public static string QueueName { get; } = "AndroidNotifications"; // Message => Content /// <summary> /// The subject line of the email /// </summar...
Add static constructor for scripting environment
namespace GraduatedCylinder.Geo { public class GeoPosition { private readonly Length _altitude; private readonly Latitude _latitude; private readonly Longitude _longitude; public GeoPosition(Latitude latitude, Longitude longitude, Length altitude = null) { _latitude...
namespace GraduatedCylinder.Geo { public class GeoPosition { private readonly Length _altitude; private readonly Latitude _latitude; private readonly Longitude _longitude; public GeoPosition(Latitude latitude, Longitude longitude, Length altitude = null) { _latitude...
Remove using statement referring to Awesomium.
using Awesomium.Core; using MVVM.CEFGlue.Infra; using MVVM.CEFGlue.ViewModel.Example; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System...
using MVVM.CEFGlue.Infra; using MVVM.CEFGlue.ViewModel.Example; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; us...
Fix launching help through API on Linux (BL-4577)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using Bloom.Api; using SIL.IO; namespace Bloom { public class HelpLauncher { public static void Show(Control parent) { Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("Bloom.c...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using Bloom.Api; using SIL.IO; namespace Bloom { public class HelpLauncher { public static void Show(Control parent) { Help.ShowHelp(parent, FileLocator.GetFileDistributedWithApplication("Bloom.c...
Fix for Nancy view conventions and static content conventions
using System; using Nancy; using Nancy.Conventions; using System.IO; namespace OpenIDConnect.Clients.Angular14.Bootstrap { public class CustomNancyBootstrapper : DefaultNancyBootstrapper { protected override IRootPathProvider RootPathProvider { get { return new CustomRootPathProvid...
using Nancy; using Nancy.Conventions; using Nancy.TinyIoc; namespace OpenIDConnect.Clients.Angular14.Bootstrap { public class CustomNancyBootstrapper : DefaultNancyBootstrapper { protected override void ApplicationStartup(TinyIoCContainer container, Nancy.Bootstrapper.IPipelines pipelines) { ...
Fix "most played beatmap" request breakage after property rename
// 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 Newtonsoft.Json; using osu.Game.Beatmaps; using osu.Game.Rulesets; namespace osu.Game.Online.API.Requests.Responses { public class APIUserMostPlayedBeatmap ...
// 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 Newtonsoft.Json; using osu.Game.Beatmaps; using osu.Game.Rulesets; namespace osu.Game.Online.API.Requests.Responses { public class APIUserMostPlayedBeatmap ...
Fix a bug where decompiled code input was not working
using ImGuiNET; using OpenKh.Tools.Kh2MapStudio.Models; using System.Numerics; using static OpenKh.Tools.Common.CustomImGui.ImGuiEx; namespace OpenKh.Tools.Kh2MapStudio.Windows { static class SpawnScriptWindow { private static readonly Vector4 ErrorColor = new Vector4(1.0f, 0.0f, 0.0f, 1.0f); ...
using ImGuiNET; using OpenKh.Tools.Kh2MapStudio.Models; using System.Numerics; using static OpenKh.Tools.Common.CustomImGui.ImGuiEx; namespace OpenKh.Tools.Kh2MapStudio.Windows { static class SpawnScriptWindow { private static readonly Vector4 ErrorColor = new Vector4(1.0f, 0.0f, 0.0f, 1.0f); ...
Use a different database name for now to avoid conflicts when switching versions
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Platform; namespace osu.Game.Database { public class DatabaseContextFactory { private readonly GameHost host; p...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Platform; namespace osu.Game.Database { public class DatabaseContextFactory { private readonly GameHost host; p...
Set focus on search box when select page visible
using System.ComponentModel.Composition; using System.Windows.Controls; using System.Windows.Input; using GitHub.Exports; using GitHub.ViewModels.Dialog.Clone; namespace GitHub.VisualStudio.Views.Dialog.Clone { [ExportViewFor(typeof(IRepositorySelectViewModel))] [PartCreationPolicy(CreationPolicy.NonShared)] ...
using System; using System.ComponentModel.Composition; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Threading; using GitHub.Exports; using GitHub.ViewModels.Dialog.Clone; namespace GitHub.VisualStudio.Views.Dialog.Clone { [ExportViewFor(typeof(IRepositorySelectViewModel))] [...
Set env vars in GitHub Actions
namespace NerdBank.GitVersioning.CloudBuildServices { using System; using System.Collections.Generic; using System.IO; using Nerdbank.GitVersioning; internal class GitHubActions : ICloudBuild { public bool IsApplicable => Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true"; ...
namespace NerdBank.GitVersioning.CloudBuildServices { using System; using System.Collections.Generic; using System.IO; using Nerdbank.GitVersioning; internal class GitHubActions : ICloudBuild { public bool IsApplicable => Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true"; ...
Adjust diffcalc test case to pass
// 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...
Reset version number (will be updated by gitversion)
using System.Reflection; using System.Runtime.InteropServices; #if DEBUG [assembly: AssemblyConfiguration("Debug")] #else [assembly: AssemblyConfiguration("Release")] #endif [assembly: AssemblyProduct("UsageStats")] [assembly: AssemblyCompany("UsageStats")] [assembly: AssemblyCopyright("© UsageStats contributors. Al...
using System.Reflection; using System.Runtime.InteropServices; #if DEBUG [assembly: AssemblyConfiguration("Debug")] #else [assembly: AssemblyConfiguration("Release")] #endif [assembly: AssemblyProduct("UsageStats")] [assembly: AssemblyCompany("UsageStats")] [assembly: AssemblyCopyright("© UsageStats contributors. Al...
Increment minor build number for release
using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Resources; [assembly: CLSCompliant(true)] [assembly: ComVisible(false)] [assembly: AssemblyTitle("PowerBridge")] [assembly: AssemblyDescription("Build tasks that enable running PowerShell ...
using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Resources; [assembly: CLSCompliant(true)] [assembly: ComVisible(false)] [assembly: AssemblyTitle("PowerBridge")] [assembly: AssemblyDescription("Build tasks that enable running Pow...
Improve error, when test name is invalid
// 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; namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks { internal class NodejsTestInfo { public NodejsTestInfo(string full...
// 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; namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks { internal class NodejsTestInfo { public NodejsTestInfo(string full...
Format speaker bio on index page as well.
using FacetedWorlds.MyCon.Model; using System.Linq; using System.Collections.Generic; namespace FacetedWorlds.MyCon.Web.ViewModels { public class SpeakerViewModel { private readonly Speaker _speaker; public SpeakerViewModel(Speaker speaker) { _speaker = speaker; } ...
using FacetedWorlds.MyCon.Model; using System.Linq; using System.Collections.Generic; using System.Web.Mvc; using FacetedWorlds.MyCon.Web.Extensions; namespace FacetedWorlds.MyCon.Web.ViewModels { public class SpeakerViewModel { private readonly Speaker _speaker; public SpeakerViewModel(Speake...
Tweak how the entries are listed, only showing since the last balance key
using Cash_Flow_Projection.Models; using Microsoft.AspNetCore.Mvc; using System; using System.Linq; using System.Threading.Tasks; namespace Cash_Flow_Projection.Controllers { public class HomeController : Controller { private readonly Database db; public HomeController(Database db) { ...
using Cash_Flow_Projection.Models; using Microsoft.AspNetCore.Mvc; using System; using System.Linq; using System.Threading.Tasks; namespace Cash_Flow_Projection.Controllers { public class HomeController : Controller { private readonly Database db; public HomeController(Database db) { ...
Increase number of grid objects.
using ProjectCDA.Model; using System.Collections.ObjectModel; using System.ComponentModel; namespace ProjectCDA.Data { public class DataSource : INotifyPropertyChanged { private ObservableCollection<TwoPages> _Schedule; public DataSource() { AddSomeDummyData(); } ...
using ProjectCDA.Model; using System.Collections.ObjectModel; using System.ComponentModel; namespace ProjectCDA.Data { public class DataSource : INotifyPropertyChanged { private ObservableCollection<TwoPages> _Schedule; public DataSource() { AddSomeDummyData(); } ...
Fix the asset that you try and get
using System.Threading.Tasks; using Glimpse.Internal; using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; namespace Glimpse.AgentServer.AspNet.Sample { public class SamplePage { private readonly ContextData<MessageContext> _context; public SamplePage() { _con...
using System.Threading.Tasks; using Glimpse.Internal; using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; namespace Glimpse.AgentServer.AspNet.Sample { public class SamplePage { private readonly ContextData<MessageContext> _context; public SamplePage() { _con...
Fix 0 size in test scene
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Online.Multiplayer; using osu.Game.Rulesets.Osu; using osu.Game.Screens.Multi.Compon...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Online.Multiplayer; using osu.Game.Rulesets.Osu; using osu.Game.Screens.Multi.Compon...
Update http request count default name.
namespace Prometheus.HttpExporter.AspNetCore.HttpRequestCount { public class HttpRequestCountOptions : HttpExporterOptionsBase { public Counter Counter { get; set; } = Metrics.CreateCounter(DefaultName, DefaultHelp, HttpRequestLabelNames.All); private const string DefaultNam...
namespace Prometheus.HttpExporter.AspNetCore.HttpRequestCount { public class HttpRequestCountOptions : HttpExporterOptionsBase { public Counter Counter { get; set; } = Metrics.CreateCounter(DefaultName, DefaultHelp, HttpRequestLabelNames.All); private const string DefaultNam...
Add Exclusion Service to SerializeStep
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Fasterflect; namespace Testity.BuildProcess.Unity3D { public class AddSerializedMemberStep : ITestityBuildStep { private readonly ITypeRelationalMapper typeResolver; ...
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Fasterflect; namespace Testity.BuildProcess.Unity3D { public class AddSerializedMemberStep : ITestityBuildStep { private readonly ITypeRelationalMapper typeResolver; ...
Add required config property to json client adapter
using IntegrationEngine.Core.Configuration; using ServiceStack.ServiceClient.Web; using System.Net; namespace IntegrationEngine.Core.ServiceStack { public class JsonServiceClientAdapter : JsonServiceClient, IJsonServiceClient { public JsonServiceClientAdapter(IJsonServiceConfiguration jsonServiceConfi...
using IntegrationEngine.Core.Configuration; using ServiceStack.ServiceClient.Web; using System.Net; namespace IntegrationEngine.Core.ServiceStack { public class JsonServiceClientAdapter : JsonServiceClient, IJsonServiceClient { public IJsonServiceConfiguration JsonServiceConfiguration { get; set; } ...
Include source in symbols package.
using Cake.Common.Tools.DotNetCore; using Cake.Common.Tools.DotNetCore.Pack; using Cake.Core; using Cake.Core.IO; using Cake.Frosting; [Dependency(typeof(UnitTests))] public class Package : FrostingTask<Context> { public override void Run(Context context) { var path = new FilePath("./src/Cake.Frosting/...
using Cake.Common.Tools.DotNetCore; using Cake.Common.Tools.DotNetCore.Pack; using Cake.Core; using Cake.Core.IO; using Cake.Frosting; [Dependency(typeof(UnitTests))] public class Package : FrostingTask<Context> { public override void Run(Context context) { var path = new FilePath("./src/Cake.Frosting/...
Disable argument checks for now
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="ExtensionsDataModule.cs" company="Catel development team"> // Copyright (c) 2008 - 2015 Catel development team. All rights reserved. // </copyright> // -------------------------...
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="ExtensionsDataModule.cs" company="Catel development team"> // Copyright (c) 2008 - 2015 Catel development team. All rights reserved. // </copyright> // -------------------------...
Use TypeNameHandling.Objects when serializing objects to json.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage.Table; using Newtonsoft.Json; namespace SlashTodo.Infrastructure.AzureTables { public abstract class ComplexTableEntity<T> : TableEntity { private st...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage.Table; using Newtonsoft.Json; namespace SlashTodo.Infrastructure.AzureTables { public abstract class ComplexTableEntity<T> : TableEntity { private st...
Fix extensions when using dotnet adapter
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #if (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP using Microsoft.MixedReality.Toolkit.Utilities; using Windows.UI.Input.Spatial; #endif // (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP namespace Microsoft.MixedReality.Toolkit.Windows...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #if (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP using Microsoft.MixedReality.Toolkit.Utilities; #if WINDOWS_UWP using Windows.UI.Input.Spatial; #elif DOTNETWINRT_PRESENT using Microsoft.Windows.UI.Input.Spatial; #endif #endif // (UNITY_W...
Handle SelectPrevious / SelectNext as volume change operations if nothing else handled game-wide
// 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.Graphics.Containers; using osu.Framework.Input; using osu.Framework.Input.Bindings; using osu.Game.Input.Bindings; namespace 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 System; using osu.Framework.Graphics.Containers; using osu.Framework.Input; using osu.Framework.Input.Bindings; using osu.Game.Input.Bindings; namespace osu.Game....
Add test for filtered mode
// 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; namespace osu.Game.Tests.Visual.Settings { public class TestSc...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using NUnit.Framework; using osu.Framework.Graphics; using osu.Game.Graphics.UserInterfaceV2; namespace osu.Game.Tests.Visual.Settings { public class TestSceneFileSe...
Use UrlEncode from OAuth lib
using System; using System.Collections.Generic; using System.Text; namespace SevenDigital.Api.Wrapper.EndpointResolution { public static class DictionaryExtensions { public static string ToQueryString(this IDictionary<string, string> collection) { var sb = new StringBuilder(); foreach (var key ...
using System.Collections.Generic; using System.Text; using OAuth; namespace SevenDigital.Api.Wrapper.EndpointResolution { public static class DictionaryExtensions { public static string ToQueryString(this IDictionary<string, string> collection) { var sb = new StringBuilder(); foreach (var key i...
Add flying players setting to extension loader
using System; using BotBits; namespace BotBitsExt.Rounds { public sealed class RoundsExtension : Extension<RoundsExtension> { private class Settings { public int MinimumPlayers { get; private set; } public int WaitTime { get; private set; } public bool Flyin...
using System; using BotBits; namespace BotBitsExt.Rounds { public sealed class RoundsExtension : Extension<RoundsExtension> { private class Settings { public int MinimumPlayers { get; private set; } public int WaitTime { get; private set; } public bool Flyin...
Fix using for Release build
using NLog; namespace Wox.Infrastructure.Logger { public class Log { private static NLog.Logger logger = LogManager.GetCurrentClassLogger(); public static void Error(System.Exception e) { #if DEBUG throw e; #else while (e.InnerException != null) { ...
using NLog; using Wox.Infrastructure.Exception; namespace Wox.Infrastructure.Logger { public class Log { private static NLog.Logger logger = LogManager.GetCurrentClassLogger(); public static void Error(System.Exception e) { #if DEBUG throw e; #else while (e.Inn...
Revert "Revert "Reacting to CLI breaking change""
// 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.Collections.Generic; using System.IO; using System.Linq; using Microsoft.DotNet.ProjectModel.Graph; namespace Microsoft.DotNet.Watcher.Co...
// 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.Collections.Generic; using System.IO; using System.Linq; using Microsoft.DotNet.ProjectModel.Graph; namespace Microsoft.DotNet.Watcher.Co...
Remove My Profile Page Menu Item Seed
using Portal.CMS.Entities.Entities; using System.Collections.Generic; using System.Linq; namespace Portal.CMS.Entities.Seed { public static class MenuSeed { public static void Seed(PortalEntityModel context) { if (!context.Menus.Any(x => x.MenuName == "Main Menu")) { ...
using Portal.CMS.Entities.Entities; using System.Collections.Generic; using System.Linq; namespace Portal.CMS.Entities.Seed { public static class MenuSeed { public static void Seed(PortalEntityModel context) { if (!context.Menus.Any(x => x.MenuName == "Main Menu")) { ...
Fix namespaces in ios interopconfig
/* Copyright 2015 Realm Inc - All Rights Reserved * Proprietary and Confidential */ using System; namespace RealmNet { public static class InteropConfig { public static bool Is64Bit { #if REALM_32 get { Debug.Assert(IntPtr.Size == 4); retu...
/* Copyright 2015 Realm Inc - All Rights Reserved * Proprietary and Confidential */ using System; using UIKit; using Foundation; using System.IO; namespace RealmNet { public static class InteropConfig { public static bool Is64Bit { #if REALM_32 get { Debu...
Add remark about failure scenarios
// 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.Threading.Tasks; namespace Microsoft.VisualStudio.LanguageServices.ExternalAccess.ProjectSystem.Api {...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Threading.Tasks; namespace Microsoft.VisualStudio.LanguageServices.ExternalAccess.Proje...
Add 'todo' to avoid type casting
namespace Sitecore.FakeDb.Serialization.Pipelines { using Sitecore.Data; using Sitecore.Data.Serialization.ObjectModel; using Sitecore.Diagnostics; using Sitecore.FakeDb.Pipelines; public class CopyParentId { public void Process(DsItemLoadingArgs args) { Assert.ArgumentNotNull(args, "args");...
namespace Sitecore.FakeDb.Serialization.Pipelines { using Sitecore.Data; using Sitecore.Diagnostics; using Sitecore.FakeDb.Pipelines; public class CopyParentId { public void Process(DsItemLoadingArgs args) { Assert.ArgumentNotNull(args, "args"); var syncItem = args.DsDbItem.SyncItem; ...
Solve bug henk import script
@{ ViewBag.Title = "Studenten importeren"; } <h2>Studenten importeren</h2> @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal">> <p>Kopieer het CSV bestand in het veld hieronder.</p> <textarea name="csv" id="csv" class="form-control"></textarea> </div> ...
@{ ViewBag.Title = "Studenten importeren"; } <h2>Studenten importeren</h2> @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal"> <p>Kopieer het CSV bestand in het veld hieronder.</p> <textarea name="csv" id="csv" class="form-control"></textarea> </div> ...
Fix another issue where the word Hit wasn't highlighted from the start.
using Monaco; using Monaco.Editor; using Monaco.Languages; using System; using System.Runtime.InteropServices.WindowsRuntime; using System.Threading; using Windows.Foundation; namespace MonacoEditorTestApp.Helpers { class EditorHoverProvider : HoverProvider { public IAsyncOperation<Hover> ProvideHover...
using Monaco; using Monaco.Editor; using Monaco.Languages; using System; using System.Runtime.InteropServices.WindowsRuntime; using System.Threading; using Windows.Foundation; namespace MonacoEditorTestApp.Helpers { class EditorHoverProvider : HoverProvider { public IAsyncOperation<Hover> ProvideHover...
Fix for Flowchart Enabled event handler coroutine issue
using UnityEngine; using System; using System.Collections; using System.Collections.Generic; namespace Fungus { [EventHandlerInfo("", "Flowchart Enabled", "The block will execute when the Flowchart game object is enabled.")] [AddComponentMenu("")] public class FlowchartEnabled...
using UnityEngine; using System; using System.Collections; using System.Collections.Generic; namespace Fungus { [EventHandlerInfo("", "Flowchart Enabled", "The block will execute when the Flowchart game object is enabled.")] [AddComponentMenu("")] public class FlowchartEnabled...
Add missing namespace to Klawr script component template
using Klawr.ClrHost.Interfaces; using Klawr.UnrealEngine; namespace $RootNamespace$ { public class $ScriptName$ : UKlawrScriptComponent { public $ScriptName$(long instanceID, UObjectHandle nativeComponent) : base(instanceID, nativeComponent) { } } }
using Klawr.ClrHost.Interfaces; using Klawr.ClrHost.Managed.SafeHandles; using Klawr.UnrealEngine; namespace $RootNamespace$ { public class $ScriptName$ : UKlawrScriptComponent { public $ScriptName$(long instanceID, UObjectHandle nativeComponent) : base(instanceID, nativeComponent) ...
Use invariant culture for string comparisons
using System.Collections.Generic; using System.Linq; using System.Xml.Linq; namespace CsProjArrange { /// <summary> /// Compares a list of attributes in order by value. /// </summary> public class AttributeKeyComparer : IComparer<IEnumerable<XAttribute>> { public AttributeKeyComparer(IEnume...
using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; namespace CsProjArrange { /// <summary> /// Compares a list of attributes in order by value. /// </summary> public class AttributeKeyComparer : IComparer<IEnumerable<XAttribute>> { public AttributeKeyC...
Set IsEnabled wallet action property depending on wallet state
using WalletWasabi.Fluent.ViewModels.NavBar; using WalletWasabi.Helpers; namespace WalletWasabi.Fluent.ViewModels.Wallets.Actions { public abstract partial class WalletActionViewModel : NavBarItemViewModel { [AutoNotify] private bool _isEnabled; protected WalletActionViewModel(WalletViewModelBase wallet) { ...
using System.Reactive; using System.Reactive.Linq; using ReactiveUI; using WalletWasabi.Fluent.ViewModels.NavBar; using WalletWasabi.Helpers; using WalletWasabi.Wallets; namespace WalletWasabi.Fluent.ViewModels.Wallets.Actions { public abstract partial class WalletActionViewModel : NavBarItemViewModel { [AutoNoti...
Use extension method for string to float conversion
using System.Globalization; using System.Text; namespace SCPI.Acquire { public class ACQUIRE_SRATE : ICommand { public string Description => "Query the current sample rate. The default unit is Sa/s."; public float SampleRate { get; private set; } public string Command(params string[]...
using SCPI.Extensions; using System.Text; namespace SCPI.Acquire { public class ACQUIRE_SRATE : ICommand { public string Description => "Query the current sample rate. The default unit is Sa/s."; public float SampleRate { get; private set; } public string Command(params string[] para...
Prepare for 1.0 BETA 2.
using ICities; using CitiesHarmony.API; namespace UOCRevisited { /// <summary> /// The base mod class for instantiation by the game. /// </summary> public class UOCRMod : IUserMod { // Public mod name and description. public string Name => ModName + " " + Version; public s...
using ICities; using CitiesHarmony.API; namespace UOCRevisited { /// <summary> /// The base mod class for instantiation by the game. /// </summary> public class UOCRMod : IUserMod { // Public mod name and description. public string Name => ModName + " " + Version; public s...
Add CORS for local testing
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using OpenStardriveServer.Domain.Database; using OpenStardriveServer.HostedServices; namespace OpenStardriveServer; public class Startup { public void Configu...
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using OpenStardriveServer.Domain.Database; using OpenStardriveServer.HostedServices; namespace OpenStardriveServer; public class Startup { public void Configu...
Load the expected version from the assembly
namespace Raygun.Messages.Tests { using NUnit.Framework; using Shouldly; [TestFixture] public class RaygunClientMessageTests { [Test] public void Should_return_name_from_the_AssemblyTitleAttribute() { // Given var sut = SutFactory(); //...
namespace Raygun.Messages.Tests { using NUnit.Framework; using Shouldly; [TestFixture] public class RaygunClientMessageTests { [Test] public void Should_return_name_from_the_AssemblyTitleAttribute() { // Given var sut = SutFactory(); //...
Change http inflight requests default name to match Prometheus guidelines
namespace Prometheus.HttpExporter.AspNetCore.InFlight { public class HttpInFlightOptions : HttpExporterOptionsBase { public Gauge Gauge { get; set; } = Metrics.CreateGauge(DefaultName, DefaultHelp); private const string DefaultName = "aspnet_http_inflight"; private c...
namespace Prometheus.HttpExporter.AspNetCore.InFlight { public class HttpInFlightOptions : HttpExporterOptionsBase { public Gauge Gauge { get; set; } = Metrics.CreateGauge(DefaultName, DefaultHelp); private const string DefaultName = "http_executing_requests"; privat...
Add item quality to schema items.
using Newtonsoft.Json; using SourceSchemaParser.JsonConverters; using System; using System.Collections.Generic; namespace SourceSchemaParser.Dota2 { public class DotaSchemaItem : SchemaItem { public DotaSchemaItemTool Tool { get; set; } [JsonProperty("tournament_url")] public string T...
using Newtonsoft.Json; using SourceSchemaParser.JsonConverters; using System; using System.Collections.Generic; namespace SourceSchemaParser.Dota2 { public class DotaSchemaItem : SchemaItem { public DotaSchemaItemTool Tool { get; set; } [JsonProperty("tournament_url")] public string T...
Add an entity get. and change old get to get key
using System; using System.Data; using System.Threading.Tasks; using Dapper.FastCrud; using Dapper.FastCrud.Configuration.StatementOptions.Builders; using Smooth.IoC.Dapper.Repository.UnitOfWork.Data; using Smooth.IoC.Dapper.Repository.UnitOfWork.Helpers; namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Repo { p...
using System; using System.Data; using System.Threading.Tasks; using Dapper.FastCrud; using Dapper.FastCrud.Configuration.StatementOptions.Builders; using Smooth.IoC.Dapper.Repository.UnitOfWork.Data; using Smooth.IoC.Dapper.Repository.UnitOfWork.Helpers; namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Repo { p...
Use correct extension for Android x64 folder
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Diagnostics; using MICore; namespace AndroidDebugLauncher { internal static class TargetArchitectureExtensions { public sta...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Diagnostics; using MICore; namespace AndroidDebugLauncher { internal static class TargetArchitectureExtensions { public sta...
Add test cover for cancellable async query handling
using Bartender.Tests.Context; using Moq; using Xunit; namespace Bartender.Tests { public class CancellableAsyncQueryDispatcherTests : DispatcherTests { [Fact] public async void ShouldHandleQueryOnce_WhenCallDispatchAsyncMethod() { await CancellableAsyncQueryDispatcher.Dispa...
using Bartender.Tests.Context; using Moq; using Shouldly; using Xunit; namespace Bartender.Tests { public class CancellableAsyncQueryDispatcherTests : DispatcherTests { [Fact] public async void ShouldHandleQueryOnce_WhenCallDispatchAsyncMethod() { await CancellableAsyncQuery...
Remove active transactions metric no longer supplied by Seq 4
using System; using System.Collections.Generic; namespace Seq.Api.Model.Diagnostics { public class ServerMetricsEntity : Entity { public ServerMetricsEntity() { RunningTasks = new List<RunningTaskPart>(); } public double EventStoreDaysRecorded { get; set; } ...
using System; using System.Collections.Generic; namespace Seq.Api.Model.Diagnostics { public class ServerMetricsEntity : Entity { public ServerMetricsEntity() { RunningTasks = new List<RunningTaskPart>(); } public double EventStoreDaysRecorded { get; set; } ...
Make use of FluentAssertions in sanity unit test.
using Xunit; namespace Dcc.Test { public class DccMiddlewareTests { [Fact] public void SanityTest() { Assert.True(true); } } }
using FluentAssertions; using Xunit; namespace Dcc.Test { public class DccMiddlewareTests { [Fact] public void SanityTest() { true.Should().BeTrue(); } } }
Correct Administrators Role (set IsAdministrator to false)
using System; using Tralus.Framework.BusinessModel.Entities; namespace Tralus.Framework.Migration.Migrations { using System.Data.Entity.Migrations; public sealed class Configuration : TralusDbMigrationConfiguration<Data.FrameworkDbContext> { public Configuration() { AutomaticM...
using System; using Tralus.Framework.BusinessModel.Entities; namespace Tralus.Framework.Migration.Migrations { using System.Data.Entity.Migrations; public sealed class Configuration : TralusDbMigrationConfiguration<Data.FrameworkDbContext> { public Configuration() { AutomaticM...
Add new category - "Communications and media".
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CompetitionPlatform.Data.ProjectCategory; namespace CompetitionPlatform.Data.ProjectCategory { public class ProjectCategoriesRepository : IProjectCategoriesRepository { public List<string> GetCategor...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CompetitionPlatform.Data.ProjectCategory; namespace CompetitionPlatform.Data.ProjectCategory { public class ProjectCategoriesRepository : IProjectCategoriesRepository { public List<string> GetCategor...
Add SA1008 tests for ref expressions
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. namespace StyleCop.Analyzers.Test.CSharp7.SpacingRules { using Test.SpacingRules; public class SA1008CSharp7UnitTests : SA1008Unit...
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. namespace StyleCop.Analyzers.Test.CSharp7.SpacingRules { using System.Threading; using System.Threading.Tasks; using StyleCop.A...
Rename Enumerable.Equals(object, object, Type) to ItemsEqual, for clarity of purpose.
namespace Fixie.Assertions { using System; using System.Collections; class EnumerableEqualityComparer { public bool EnumerableEqual(IEnumerable x, IEnumerable y) { var enumeratorX = x.GetEnumerator(); var enumeratorY = y.GetEnumerator(); while (true)...
namespace Fixie.Assertions { using System; using System.Collections; class EnumerableEqualityComparer { public bool EnumerableEqual(IEnumerable x, IEnumerable y) { var enumeratorX = x.GetEnumerator(); var enumeratorY = y.GetEnumerator(); while (true)...
Update TecSupportService1 with the new parameter list.
using System; using System.Collections.Generic; using System.Data.Entity; using System.Data.Entity.Infrastructure; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; using DbAndRepository; using DbAndRepository.IRepositories; using DbAndR...
using System; using System.Collections.Generic; using System.Data.Entity; using System.Data.Entity.Infrastructure; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; using DbAndRepository; using DbAndRepository.IRepositories; using DbAndR...
Fix error when turning visual debugging on/off in Unity 5.4 or newer
using System; using System.Collections.Generic; using System.Linq; using UnityEditor; namespace Entitas.Unity { public class ScriptingDefineSymbols { public Dictionary<BuildTargetGroup, string> buildTargetToDefSymbol { get { return _buildTargetToDefSymbol; } } readonly Dictionary<BuildTargetGrou...
using System; using System.Collections.Generic; using System.Linq; using UnityEditor; namespace Entitas.Unity { public class ScriptingDefineSymbols { public Dictionary<BuildTargetGroup, string> buildTargetToDefSymbol { get { return _buildTargetToDefSymbol; } } readonly Dictionary<BuildTargetGrou...
Use OneTimeSetUp instead of TestFixtureSetUp.
namespace ForecastPCL.Test { using System; using System.Configuration; using System.Threading.Tasks; using DarkSkyApi; using NUnit.Framework; [TestFixture] public class LanguageTests { // These coordinates came from the Forecast API documentation, // and should return...
namespace ForecastPCL.Test { using System; using System.Configuration; using System.Threading.Tasks; using DarkSkyApi; using NUnit.Framework; [TestFixture] public class LanguageTests { // These coordinates came from the Forecast API documentation, // and should return...
Fix build for versions without Assembly.Location
// 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.Diagnostics.Tracing; using System.Reflection; using Xunit; namespace System.Net.NameResolution.Tests {...
// 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.Diagnostics.Tracing; using System.Reflection; using Xunit; namespace System.Net.NameResolution.Tests {...
Update remove route to correct value
namespace SFA.DAS.EmployerAccounts.Web.Authorization { public static class AuthorizationConstants { public const string Tier2User = "Tier2User"; public const string TeamViewRoute = "accounts/{hashedaccountid}/teams/view"; public const string TeamRoute = "accounts/{hashedaccountid}/teams...
namespace SFA.DAS.EmployerAccounts.Web.Authorization { public static class AuthorizationConstants { public const string Tier2User = "Tier2User"; public const string TeamViewRoute = "accounts/{hashedaccountid}/teams/view"; public const string TeamRoute = "accounts/{hashedaccountid}/teams...
Make Log4NetLevel enricher internal - no need for it to be public
using Serilog.Core; using Serilog.Events; namespace Umbraco.Core.Logging.SerilogExtensions { /// <summary> /// This is used to create a new property in Logs called 'Log4NetLevel' /// So that we can map Serilog levels to Log4Net levels - so log files stay consistent /// </summary> public class Log4...
using Serilog.Core; using Serilog.Events; namespace Umbraco.Core.Logging.SerilogExtensions { /// <summary> /// This is used to create a new property in Logs called 'Log4NetLevel' /// So that we can map Serilog levels to Log4Net levels - so log files stay consistent /// </summary> internal class Lo...
Add SSL option to Rabbit sample
using System.Text; using Microsoft.AspNetCore.Mvc; using RabbitMQ.Client; namespace Rabbit.Controllers { public class RabbitController : Controller { ConnectionFactory _rabbitConnection; public RabbitController([FromServices] ConnectionFactory rabbitConnection) { _rabbitCo...
using System.Text; using Microsoft.AspNetCore.Mvc; using RabbitMQ.Client; #if SSL using System.Security.Authentication; using System.Net.Security; #endif namespace Rabbit.Controllers { public class RabbitController : Controller { ConnectionFactory _rabbitConnection; public RabbitController([...
Use ReactiveUI Events for Data Context Changed
using Ets.Mobile.ViewModel.Contracts.Settings; using System; using System.Reactive.Linq; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using ReactiveUI; using System.Reactive.Concurrency; namespace Ets.Mobile.Content.Settings { public sealed partial class Options : UserControl { public Option...
using Ets.Mobile.ViewModel.Contracts.Settings; using System; using System.Reactive.Linq; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; namespace Ets.Mobile.Content.Settings { public sealed partial class Options : UserControl { public Options() { InitializeComponent(); ...
Add scripts that make HTML5, CSS and JavaScript work in Internet Explorer 8 and lower
<!DOCTYPE html> <html> <head> <title>Zaaikalender | @ViewBag.Title</title> <link rel="stylesheet" href="/Content/Stylesheets/responsive-square-elements.css"> <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script src="/Scripts/flowtype.js"></script> <script src="/Scripts/font-sett...
<!DOCTYPE html> <html> <head> <title>Zaaikalender | @ViewBag.Title</title> <link rel="stylesheet" href="/Content/Stylesheets/responsive-square-elements.css"> <!--[if lte IE 8]> <script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.0.3/es5-shim.min.js"></script> <script src="//cdnjs.c...
Tweak Stylesheet Link writing in XMlDomExtenstions
using System.Xml; namespace Palaso.Xml { public static class XmlDomExtensions { public static XmlDocument StripXHtmlNameSpace(this XmlDocument node) { XmlDocument x = new XmlDocument(); x.LoadXml(node.OuterXml.Replace("xmlns", "xmlnsNeutered")); return x; } public static void AddStyleSheet(this Xm...
using System; using System.IO; using System.Xml; namespace Palaso.Xml { public static class XmlDomExtensions { public static XmlDocument StripXHtmlNameSpace(this XmlDocument node) { XmlDocument x = new XmlDocument(); x.LoadXml(node.OuterXml.Replace("xmlns", "xmlnsNeutered")); return x; } public st...
Remove RandomTrace stuff from main
using static System.Console; using CIV.Ccs; using CIV.Interfaces; 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["...
using static System.Console; using System.Linq; using CIV.Ccs; using CIV.Hml; namespace CIV { class Program { static void Main(string[] args) { var text = System.IO.File.ReadAllText(args[0]); var processes = CcsFacade.ParseAll(text); var hmlText = "[[ack]][[ack]][[ack...
Fix command line error display
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CommandLine; using Meraki; namespace Meraki.Console { class Program { static void Main(string[] args) { try { Parser.Default.ParseArguments<LabOptions,...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CommandLine; using Meraki; namespace Meraki.Console { class Program { static void Main(string[] args) { try { Parser.Default.ParseArguments<LabOptions,...
Add heading to report result class
using System.Dynamic; namespace KenticoInspector.Core.Models { public class ReportResults { public ReportResults() { Data = new ExpandoObject(); } public dynamic Data { get; set; } public string Status { get; set; } public string Summary { get; set;...
using System.Dynamic; namespace KenticoInspector.Core.Models { public class ReportResults { public ReportResults() { Data = new ExpandoObject(); } public dynamic Data { get; set; } public string Heading { get; set; } public string Status { get; set;...
Add namespace brackets - because of teamcity
using System.Collections.Generic; namespace Arkivverket.Arkade.Core.Util.FileFormatIdentification; public interface IFileFormatInfoFilesGenerator { void Generate(IEnumerable<IFileFormatInfo> fileFormatInfoSet, string relativePathRoot, string resultFileFullPath); }
using System.Collections.Generic; namespace Arkivverket.Arkade.Core.Util.FileFormatIdentification { public interface IFileFormatInfoFilesGenerator { void Generate(IEnumerable<IFileFormatInfo> fileFormatInfoSet, string relativePathRoot, string resultFileFullPath); } }
Set the column width to resize when the listview resizes
using Microsoft.Win32; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace PathViewer { public partial class FormPathViewer : Form { ...
using Microsoft.Win32; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace PathViewer { public partial class FormPathViewer : Form { ...
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major.
using System.Reflection; [assembly: AssemblyTitle("Autofac.Extras.Tests.Moq")] [assembly: AssemblyDescription("")]
using System.Reflection; [assembly: AssemblyTitle("Autofac.Extras.Tests.Moq")]
Use system highlight color in game list selection
using System.Drawing; using System.Windows.Forms; using BrightIdeasSoftware; namespace SteamGames { internal sealed class GameRenderer : AbstractRenderer { private readonly StringFormat sf; public GameRenderer() { sf = new StringFormat(StringFormat.GenericTypographic); sf.Alignment = StringAlignment.C...
using System.Drawing; using System.Windows.Forms; using BrightIdeasSoftware; namespace SteamGames { internal sealed class GameRenderer : AbstractRenderer { private readonly StringFormat sf; private Brush SelectionBrush = new SolidBrush(Color.FromKnownColor(KnownColor.Highlight)); public GameRenderer() { ...
Make room setting's BeatmapID non-nullable
// 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 enable using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using osu.Game.Online.API; namespace osu.Game.Online.Re...
// 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 enable using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using osu.Game.Online.API; namespace osu.Game.Online.Re...
Update existing documentation for list ids.
namespace TraktApiSharp.Objects.Get.Users.Lists { using Newtonsoft.Json; using System.Globalization; /// <summary> /// A collection of ids for various web services for a Trakt list. /// </summary> public class TraktListIds { /// <summary> /// The Trakt numeric id for the li...
namespace TraktApiSharp.Objects.Get.Users.Lists { using Newtonsoft.Json; /// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt list.</summary> public class TraktListIds { /// <summary>Gets or sets the Trakt numeric id.</summary> [JsonProperty(Pr...
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...
Disable SSL for sending e-mails
using MailKit.Net.Smtp; using MimeKit; using MimeKit.Text; using System; using System.Collections.Generic; namespace SecretSanta.Utilities { public static class EmailMessage { public static void Send(MailboxAddress from, IEnumerable<MailboxAddress> to, string subject, string body) { ...
using MailKit.Net.Smtp; using MimeKit; using MimeKit.Text; using System; using System.Collections.Generic; namespace SecretSanta.Utilities { public static class EmailMessage { public static void Send(MailboxAddress from, IEnumerable<MailboxAddress> to, string subject, string body) { ...
Remove bad component state hack from client mover component.
using Content.Shared.GameObjects.Components.Movement; using Robust.Client.Player; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; #nullable enable namespace Content.Client.GameObjects.Components.Movement { [RegisterComponent] [ComponentReference(typeof(IMoverComponent))] ...
using Content.Shared.GameObjects.Components.Movement; using Robust.Shared.GameObjects; using Robust.Shared.Map; #nullable enable namespace Content.Client.GameObjects.Components.Movement { [RegisterComponent] [ComponentReference(typeof(IMoverComponent))] public class PlayerInputMoverComponent : SharedPlaye...
Mark required properties in ViewModel
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace Dangl.WebDocumentation.ViewModels.Admin { public class CreateProjectViewModel { [Display(Name ="Name")] public string ProjectName { get; set; } [Display(Name ="Public access")] public bool...
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace Dangl.WebDocumentation.ViewModels.Admin { public class CreateProjectViewModel { [Display(Name ="Name")] [Required] public string ProjectName { get; set; } [Display(Name ="Public access")] ...
Remove set log level from base handler class.
namespace NLogging { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; public abstract class Handler : IHandler { private IFormatter formatter; private LogLevel logLevel; protected Handler() ...
namespace NLogging { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; public abstract class Handler : IHandler { private IFormatter formatter; protected Handler() { this.formatter = new ...
Fix fault in temp impl of 6D handling
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Common.Logging; using GladNet; namespace Booma.Proxy { [SceneTypeCreate(GameSceneType.Pioneer2)] public sealed class Default6DCommandHandler : Command6DHandler<UnknownSubCommand6DCommand> { p...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Common.Logging; using GladNet; namespace Booma.Proxy { [SceneTypeCreate(GameSceneType.Pioneer2)] public sealed class Default6DCommandHandler : Command6DHandler<UnknownSubCommand6DCommand> { p...
Add NewLine at the end of the list
 using System; using HtmlAgilityPack; namespace ReverseMarkdown.Converters { public class Ol : ConverterBase { public Ol(Converter converter) : base(converter) { this.Converter.Register("ol", this); this.Converter.Register("ul", this); } public override string Convert(HtmlNode node) { retu...
 using System; using HtmlAgilityPack; namespace ReverseMarkdown.Converters { public class Ol : ConverterBase { public Ol(Converter converter) : base(converter) { this.Converter.Register("ol", this); this.Converter.Register("ul", this); } public override string Convert(HtmlNode node) { retu...
Remove slug from episode ids.
namespace TraktApiSharp.Objects.Get.Shows.Episodes { using Basic; /// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt episode.</summary> public class TraktEpisodeIds : TraktIds { } }
namespace TraktApiSharp.Objects.Get.Shows.Episodes { using Attributes; using Newtonsoft.Json; /// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt episode.</summary> public class TraktEpisodeIds { /// <summary>Gets or sets the Trakt numeric id.</su...
Test demonstrating an edge case of generic interfaces
using NUnit.Framework; namespace NSubstitute.Acceptance.Specs { [TestFixture] public class MatchingDerivedTypesForGenerics { IGenMethod _sub; [SetUp] public void Setup() { _sub = Substitute.For<IGenMethod>(); } [Test] public void Calls_to_generic_types_with_derived_parameters_should_be_matched (...
using NUnit.Framework; namespace NSubstitute.Acceptance.Specs { [TestFixture] public class MatchingDerivedTypesForGenerics { IGenMethod _sub; [SetUp] public void Setup() { _sub = Substitute.For<IGenMethod>(); } [Test] public void Calls_to_generic_types_with_derived_parameters_should_be_matched (...