Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add AtataContextBuilder_OnBuilding and AtataContextBuilder_OnBuilding_WithoutDriver tests | using System;
using NUnit.Framework;
namespace Atata.Tests
{
public class AtataContextBuilderTests : UITestFixtureBase
{
[Test]
public void AtataContextBuilder_Build_WithoutDriver()
{
InvalidOperationException exception = Assert.Throws<InvalidOperationException>(() =>
... | using System;
using NUnit.Framework;
namespace Atata.Tests
{
public class AtataContextBuilderTests : UITestFixtureBase
{
[Test]
public void AtataContextBuilder_Build_WithoutDriver()
{
InvalidOperationException exception = Assert.Throws<InvalidOperationException>(() =>
... |
Remove extra config param that's not used | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Framework.Configuration;
using Microsoft.Framework.DependencyInjection;
... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Framework.Configuration;
using Microsoft.Framework.DependencyInjection;
... |
Fix interaction with popover when textbox is disabled | // 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.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.UserInterface;
using osu.Fra... | // 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.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.UserInterface;
using osu.Fra... |
Fix Unable to connect to backend on access denied | using System.IO;
using System.Linq;
namespace ELFinder.Connector.Drivers.FileSystem.Extensions
{
/// <summary>
/// File system info extensions
/// </summary>
public static class FIleSystemInfoExtensions
{
#region Extension methods
/// <summary>
/// Get visible files in d... | using System.IO;
using System.Linq;
namespace ELFinder.Connector.Drivers.FileSystem.Extensions
{
/// <summary>
/// File system info extensions
/// </summary>
public static class FIleSystemInfoExtensions
{
#region Extension methods
/// <summary>
/// Get visible files in d... |
Use the tel uri in windows store for phone calls | // MvxPhoneCallTask.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using System;
using Windows.System;
namespace Ci... | // MvxPhoneCallTask.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using System;
using Windows.System;
namespace Ci... |
Allow option to prevent system checkers from being auto registered | using System;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace HealthNet.AspNetCore
{
public static class HealthNetMiddlewareExtensions
{
private static readonly Type VersionProviderType = typeof(IVersionProvider);
private static readonly Typ... | using System;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace HealthNet.AspNetCore
{
public static class HealthNetMiddlewareExtensions
{
private static readonly Type VersionProviderType = typeof(IVersionProvider);
private static readonly Typ... |
Change string formatting due to appveyor failing | using Newtonsoft.Json;
using Telegram.Bot.Types.ReplyMarkups;
using Xunit;
namespace Telegram.Bot.Tests.Unit.Serialization
{
public class ReplyMarkupSerializationTests
{
[Theory(DisplayName = "Should serialize request poll keyboard button")]
[InlineData(null)]
[InlineData("regular")]
... | using Newtonsoft.Json;
using Telegram.Bot.Types.ReplyMarkups;
using Xunit;
namespace Telegram.Bot.Tests.Unit.Serialization
{
public class ReplyMarkupSerializationTests
{
[Theory(DisplayName = "Should serialize request poll keyboard button")]
[InlineData(null)]
[InlineData("regular")]
... |
Fix a small, old typo | using Halforbit.DataStores.FileStores.Implementation;
using Halforbit.DataStores.FileStores.LocalStorage.Implementation;
using Halforbit.Facets.Attributes;
using System;
namespace HalfOrbit.DataStores.FileStores.LocalStorage.Attributes
{
public class RootPathAttribute : FacetParameterAttribute
{
... | using Halforbit.DataStores.FileStores.Implementation;
using Halforbit.DataStores.FileStores.LocalStorage.Implementation;
using Halforbit.Facets.Attributes;
using System;
namespace Halforbit.DataStores.FileStores.LocalStorage.Attributes
{
public class RootPathAttribute : FacetParameterAttribute
{
... |
Create Sequence Marker only if it is used. | using System;
using Platform.Data.Core.Pairs;
namespace Platform.Data.Core.Sequences
{
public struct SequencesOptions // TODO: To use type parameter <TLink> the ILinks<TLink> must contain GetConstants function.
{
public ulong SequenceMarkerLink;
public bool UseCascadeUpdate;
public boo... | using System;
using Platform.Data.Core.Pairs;
namespace Platform.Data.Core.Sequences
{
public struct SequencesOptions // TODO: To use type parameter <TLink> the ILinks<TLink> must contain GetConstants function.
{
public ulong SequenceMarkerLink;
public bool UseCascadeUpdate;
public boo... |
Add property for response content, mapped to Data collection. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mios.Payment {
[Serializable]
public class VerificationProviderException : Exception {
public VerificationProviderException() { }
public VerificationProviderException(string me... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mios.Payment {
[Serializable]
public class VerificationProviderException : Exception {
public string ResponseContent {
get { return Data["Response"] as string; }
set { Dat... |
Fix Blockbusters not accepting uppercase input | using System.Collections;
using System.Linq;
using System.Text.RegularExpressions;
public class BlockbustersComponentSolver : ComponentSolver
{
public BlockbustersComponentSolver(TwitchModule module) :
base(module)
{
selectables = Module.BombComponent.GetComponent<KMSelectable>().Children;
ModInfo = Component... | using System.Collections;
using System.Linq;
using System.Text.RegularExpressions;
public class BlockbustersComponentSolver : ComponentSolver
{
public BlockbustersComponentSolver(TwitchModule module) :
base(module)
{
selectables = Module.BombComponent.GetComponent<KMSelectable>().Children;
ModInfo = Component... |
Set DOTNET_HOST_PATH so Roslyn tasks will use the right host |
using Xunit;
[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)]
|
using System;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Xml.Linq;
using Xunit;
[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)]
// Register test framework for assembly fixture
[assembly: TestFramework("Xunit.NetCore.Extensions.XunitTestFrameworkW... |
Remove async helper methods for json serialization. | namespace TraktApiSharp.Utils
{
using Newtonsoft.Json;
using System.Threading.Tasks;
internal static class Json
{
internal static readonly JsonSerializerSettings DEFAULT_JSON_SETTINGS
= new JsonSerializerSettings
{
Formatting = Formatting.None,
... | namespace TraktApiSharp.Utils
{
using Newtonsoft.Json;
internal static class Json
{
internal static readonly JsonSerializerSettings DEFAULT_JSON_SETTINGS
= new JsonSerializerSettings
{
Formatting = Formatting.None,
NullValueHandling = NullVal... |
Use private accessor for property | using System;
namespace UDIR.PAS2.OAuth.Client
{
internal class AuthorizationServer
{
public AuthorizationServer(Uri baseAddress)
{
BaseAddress = baseAddress;
TokenEndpoint = new Uri(baseAddress, "/connect/token").ToString();
}
public AuthorizationServer(string baseAddress) : this(new Uri(baseAddress... | using System;
namespace UDIR.PAS2.OAuth.Client
{
internal class AuthorizationServer
{
public AuthorizationServer(Uri baseAddress)
{
BaseAddress = baseAddress;
TokenEndpoint = new Uri(baseAddress, "/connect/token").ToString();
}
public AuthorizationServer(string baseAddress) : this(new Uri(baseAddress... |
Use builtin MongoDB Bson serialization | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MongoDB.Driver;
using MongoDB.Bson;
using MongoDB.Bson.Serialization;
using Newtonsoft.Json;
namespace M101DotNet
{
public class Program
{
public static void Main(string[] args)
{
MainAsync(args).... | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MongoDB.Driver;
using MongoDB.Bson;
using MongoDB.Bson.Serialization;
using MongoDB.Bson.IO;
namespace M101DotNet
{
public class Program
{
public static void Main(string[] args)
{
MainAsync(args).... |
Add a little more info to the thread listing. | using System.Collections.Generic;
using Mono.Debugger.Cli.Debugging;
using Mono.Debugger.Cli.Logging;
namespace Mono.Debugger.Cli.Commands
{
public sealed class ThreadsCommand : ICommand
{
public string Name
{
get { return "Threads"; }
}
public string Description
... | using System.Collections.Generic;
using Mono.Debugger.Cli.Debugging;
using Mono.Debugger.Cli.Logging;
namespace Mono.Debugger.Cli.Commands
{
public sealed class ThreadsCommand : ICommand
{
public string Name
{
get { return "Threads"; }
}
public string Description
... |
Add OSX default install location for BeyondCompare. | using System;
using System.Collections.Generic;
using System.Linq;
namespace Assent.Reporters.DiffPrograms
{
public class BeyondCompareDiffProgram : DiffProgramBase
{
static BeyondCompareDiffProgram()
{
var paths = new List<string>();
if (DiffReporter.IsWindows)
... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Assent.Reporters.DiffPrograms
{
public class BeyondCompareDiffProgram : DiffProgramBase
{
static BeyondCompareDiffProgram()
{
var paths = new List<string>();
if (DiffReporter.IsWindows)
... |
Add some simple runtime stats while implementing the Z80 core | using System;
using elbsms_core;
namespace elbsms_console
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("Usage: elbsms_console <path to rom>");
return;
}
string romP... | using System;
using System.Diagnostics;
using elbsms_core;
namespace elbsms_console
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("Usage: elbsms_console <path to rom>");
return;
... |
Make the next release version 0.1.1 (bug fixes) | using System.Reflection;
[assembly: AssemblyProduct("SqlStreamStore")]
[assembly: AssemblyCopyright("Copyright Damian Hickey & Contributors 2015 - 2016")]
[assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
| using System.Reflection;
[assembly: AssemblyProduct("SqlStreamStore")]
[assembly: AssemblyCopyright("Copyright Damian Hickey & Contributors 2015 - 2016")]
[assembly: AssemblyVersion("0.1.1.0")]
[assembly: AssemblyFileVersion("0.1.1.0")]
|
Move Seq 'Compact' flag, default | namespace Cash_Flow_Projection
{
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Core;
public class Program
{
public static LoggingLevelSwitch LogLe... | namespace Cash_Flow_Projection
{
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Core;
public class Program
{
public static LoggingLevelSwitch LogLe... |
Add mx handling and not implemented if non supported type request | using ARSoft.Tools.Net.Dns;
using System;
using System.Net;
using System.Net.Sockets;
namespace DNSRootServerResolver
{
public class Program
{
public static void Main(string[] args)
{
using (var server = new DnsServer(IPAddress.Any, 25, 25, DnsServerHandler))
{
... | using ARSoft.Tools.Net.Dns;
using System;
using System.Net;
using System.Net.Sockets;
namespace DNSRootServerResolver
{
public class Program
{
public static void Main(string[] args)
{
using (var server = new DnsServer(IPAddress.Any, 25, 25, DnsServerHandler))
{
... |
Add missing namespace to resolve asset retargeting failures | using Microsoft.MixedReality.Toolkit.Input;
using Microsoft.MixedReality.Toolkit.UI;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TouchHandler : MonoBehaviour, IMixedRealityTouchHandler
{
#region Event handlers
public TouchEvent OnTouchStarted = new TouchEvent()... | using Microsoft.MixedReality.Toolkit.Input;
using Microsoft.MixedReality.Toolkit.UI;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Input
{
public class TouchHandler : MonoBehaviour, IMixedRealityTouchHandler
{
#region Event han... |
Implement ESDATModel test for OSM2.Actions | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Hatfield.EnviroData.DataAcquisition.ESDAT.Test.Converters
{
class ESDATDataConverterTest
{
}
}
| using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Moq;
using Hatfield.EnviroData.Core;
using Hatfield.EnviroData.DataAcquisition.ESDAT;
using Hatfield.EnviroData.DataAcquisition.ESDAT.Converters;
namespace Hatfield.EnviroData.DataAcquisition.ESDAT.Test.... |
Fix repository permission checks. Yes, that was stupid. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Bonobo.Git.Server.Data;
using Bonobo.Git.Server.Models;
using Microsoft.Practices.Unity;
namespace Bonobo.Git.Server.Security
{
public class ADRepositoryPermissionService : IRepositoryPermissionService
{
[Depe... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Bonobo.Git.Server.Data;
using Bonobo.Git.Server.Models;
using Microsoft.Practices.Unity;
namespace Bonobo.Git.Server.Security
{
public class ADRepositoryPermissionService : IRepositoryPermissionService
{
[Depe... |
Fix test to use the appropriate config | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpressionToCodeLib;
using Xunit;
namespace ExpressionToCodeTest
{
public class AnonymousObjectFormattingTest
{
[Fact]
public void AnonymousObjectsRenderAsCode... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpressionToCodeLib;
using Xunit;
namespace ExpressionToCodeTest
{
public class AnonymousObjectFormattingTest
{
[Fact]
public void AnonymousObjectsRenderAsCode... |
Fix update installer not running as administrator due to breaking change in .NET | using System;
using System.ComponentModel;
using System.Diagnostics;
using TweetDuck.Configuration;
using TweetLib.Core;
using TweetLib.Utils.Static;
namespace TweetDuck.Updates {
sealed class UpdateInstaller {
private string Path { get; }
public UpdateInstaller(string path) {
this.Path = path;
}
public... | using System;
using System.ComponentModel;
using System.Diagnostics;
using TweetDuck.Configuration;
using TweetLib.Core;
using TweetLib.Utils.Static;
namespace TweetDuck.Updates {
sealed class UpdateInstaller {
private string Path { get; }
public UpdateInstaller(string path) {
this.Path = path;
}
public... |
Set default delay value = 1000 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Hqub.Lastfm
{
public static class Configure
{
/// <summary>
/// Set value delay between requests.
/// </summary>
public static int Delay { get; set; }
}
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Hqub.Lastfm
{
public static class Configure
{
static Configure()
{
Delay = 1000;
}
/// <summary>
/// Set value delay between requests.
... |
Fix parameters supported in `Recurring` for `PriceData` across the API | namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
public class SubscriptionItemPriceDataRecurringOptions : INestedOptions
{
/// <summary>
/// Specifies a usage aggregation strategy for prices where <see cref="UsageType"/> is
/// <c>metered</c>. Allowed values a... | namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
public class SubscriptionItemPriceDataRecurringOptions : INestedOptions
{
/// <summary>
/// he frequency at which a subscription is billed. One of <c>day</c>, <c>week</c>,
/// <c>month</c> or <c>year</c>... |
Add usage comment to interface | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.VisualStudio.LanguageServices.ExternalAccess.VSTypeScript.Api
{
interface IVsTypeScriptRemo... | // 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 Microsoft.CodeAnalysis;
namespace Microsoft.VisualStudio.LanguageServices.ExternalAccess.VSTypeScript.Api
{
... |
Disable tests coverage for unsupported Unity versions | using JetBrains.Application;
using JetBrains.Application.Components;
using JetBrains.Collections.Viewable;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Host.Features;
using JetBrains.ReSharper.Host.Features.UnitTesting;
using JetBrains.ReSharper.Plugins.Unity.ProjectModel;
using JetBrains.ReSharper.UnitTestF... | using System;
using JetBrains.Application;
using JetBrains.Application.Components;
using JetBrains.Collections.Viewable;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Host.Features;
using JetBrains.ReSharper.Host.Features.UnitTesting;
using JetBrains.ReSharper.Plugins.Unity.ProjectModel;
using JetBrains.ReSha... |
Add documentation for person images. | namespace TraktApiSharp.Objects.Get.People
{
using Basic;
using Newtonsoft.Json;
public class TraktPersonImages
{
[JsonProperty(PropertyName = "headshot")]
public TraktImageSet Headshot { get; set; }
[JsonProperty(PropertyName = "fanart")]
public TraktImageSet FanArt {... | namespace TraktApiSharp.Objects.Get.People
{
using Basic;
using Newtonsoft.Json;
/// <summary>A collection of images and image sets for a Trakt person.</summary>
public class TraktPersonImages
{
/// <summary>Gets or sets the headshot image set.</summary>
[JsonProperty(PropertyName ... |
Fix bug in Paragraph rewriter | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DocAsCode.MarkdownLite
{
public class MarkdownParagraphBlockToken : IMarkdownToken, IMarkdownRewritable<MarkdownParagraphBlockToken>
{
... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DocAsCode.MarkdownLite
{
public class MarkdownParagraphBlockToken : IMarkdownToken, IMarkdownRewritable<MarkdownParagraphBlockToken>
{
... |
Make content root path independent of working directory. | using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Mitternacht;
using System.Threading.Tasks;
namespace MitternachtWeb {
public class Program {
public static MitternachtBot MitternachtBot;
public static async Task Main(string[] args) {
Mitte... | using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Mitternacht;
using System;
using System.IO;
using System.Threading.Tasks;
namespace MitternachtWeb {
public class Program {
public static MitternachtBot MitternachtBot;
public static async Task... |
Fix tray icon double click not activating switcher window | using System;
using System.Windows;
using System.Windows.Media.Imaging;
using Hardcodet.Wpf.TaskbarNotification;
using SteamAccountSwitcher.Properties;
namespace SteamAccountSwitcher
{
internal class TrayIconHelper
{
public static void ShowRunningInTrayBalloon()
{
ShowTrayBalloon(
... | using System;
using System.Windows;
using System.Windows.Media.Imaging;
using Hardcodet.Wpf.TaskbarNotification;
using SteamAccountSwitcher.Properties;
namespace SteamAccountSwitcher
{
internal class TrayIconHelper
{
public static void ShowRunningInTrayBalloon()
{
ShowTrayBalloon(
... |
Add method to extract and zip | using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
namespace ExcelMediaConsole
{
class Program
{
static void Main(string[] args)
{
var excelFilePath = "Book1.xlsx";
var outputDirPath = "Media";
D... | using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
namespace ExcelMediaConsole
{
class Program
{
static void Main(string[] args)
{
var excelFilePath = "Book1.xlsx";
var outputDirPath = "Media";
D... |
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;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Integration.Web")]
[assembly: AssemblyDescription("Autofac ASP.NET Integration")]
[assembly: InternalsVisibleTo("Autofac.Tests.Integration.Web, PublicKey=0024000... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Integration.Web")]
[assembly: InternalsVisibleTo("Autofac.Tests.Integration.Web, PublicKey=00240000048000009400000006020000002400005253413100040000010001008728425885ef385e049261... |
Drop alpha status, it is a 1.0.0 release as is | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Commons;
[assembly: AssemblyTitle("TickTack")]
[assembly: AssemblyDescription("Delayed reminder!")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Rafael Teixeira")]
[assembly: AssemblyProduc... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Commons;
[assembly: AssemblyTitle("TickTack")]
[assembly: AssemblyDescription("Delayed reminder!")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Rafael Teixeira")]
[assembly: AssemblyProduc... |
Add git commands to tool. | namespace Pagination.ReleaseActions {
class Tag : ReleaseAction {
public override void Work() {
var tag = Context.Version.StagedVersion;
Process("git", "commit", "-a", "-m", $"\"(Auto-)Commit version '{tag}'.\"");
Process("git", "tag", "-a", tag, "-m", $"\"(Auto-)Tag ver... | namespace Pagination.ReleaseActions {
class Tag : ReleaseAction {
public override void Work() {
var tag = Context.Version.StagedVersion;
Process("git", "status");
Process("git", "commit", "-a", "-m", $"\"(Auto-)Commit version '{tag}'.\"");
Process("git", "pus... |
Add test case for fading hold note | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Bindables;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
usin... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Bindables;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu... |
Make hold note ticks affect combo score rather than bonus | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Judgements
{
public class HoldNoteTickJudgement : ManiaJudgement
{
public override boo... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Judgements
{
public class HoldNoteTickJudgement : ManiaJudgement
{
protected override ... |
Fix a syntax error causing typo | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Snowflake.Events
{
public partial class SnowflakeEventSource
{
public static SnowflakeEventSource SnowflakeEventSource;
SnowflakeEventSource()
{
}
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Snowflake.Events
{
public partial class SnowflakeEventSource
{
public static SnowflakeEventSource EventSource;
SnowflakeEventSource()
{
}
public... |
Switch stream publisher over to use new proxy | using System;
namespace Glimpse.Agent
{
public class RemoteStreamMessagePublisher : BaseMessagePublisher
{
public override void PublishMessage(IMessage message)
{
var newMessage = ConvertMessage(message);
// TODO: Use SignalR to publish message
}
}
} | using Glimpse.Agent.Connection.Stream.Connection;
using System;
namespace Glimpse.Agent
{
public class RemoteStreamMessagePublisher : BaseMessagePublisher
{
private readonly IStreamProxy _messagePublisherHub;
public RemoteStreamMessagePublisher(IStreamProxy messagePublisherHub)
{
... |
Unify DispatchWrapper behavior for null | // 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 Xunit;
namespace System.Runtime.InteropServices.Tests
{
#pragma warning disable 0618 // DispatchWrapper is ma... | // 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 Xunit;
namespace System.Runtime.InteropServices.Tests
{
#pragma warning disable 0618 // DispatchWrapper is ma... |
Fix a dialog display glitch on Linux (20190725) | using System.Windows.Forms;
namespace Bloom.WebLibraryIntegration
{
public partial class OverwriteWarningDialog : Form
{
public OverwriteWarningDialog()
{
InitializeComponent();
}
}
}
| using System.Windows.Forms;
namespace Bloom.WebLibraryIntegration
{
public partial class OverwriteWarningDialog : Form
{
public OverwriteWarningDialog()
{
InitializeComponent();
}
protected override void OnLoad(System.EventArgs e)
{
base.OnLoad(e);
// Fix a display glitch on Linux with the Mono ... |
Test password for new students. | using System.Collections.Generic;
using System.Web.Mvc;
using AutoMapper;
using StudentFollowingSystem.Data.Repositories;
using StudentFollowingSystem.Filters;
using StudentFollowingSystem.Models;
using StudentFollowingSystem.ViewModels;
using Validatr.Filters;
namespace StudentFollowingSystem.Controllers
{
[Auth... | using System.Collections.Generic;
using System.Web.Helpers;
using System.Web.Mvc;
using AutoMapper;
using StudentFollowingSystem.Data.Repositories;
using StudentFollowingSystem.Filters;
using StudentFollowingSystem.Models;
using StudentFollowingSystem.ViewModels;
namespace StudentFollowingSystem.Controllers
{
[Au... |
Fix hand-written Monitoring snippet to use resource names | // 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... |
Add get method for teacher name | using System.Collections.Generic;
namespace UniProgramGen.Data
{
public class Teacher
{
public Requirements requirements { get; internal set; }
public string name { get; internal set; }
public Teacher(Requirements requirements, string name)
{
this.requirements = re... | using System.Collections.Generic;
namespace UniProgramGen.Data
{
public class Teacher
{
public Requirements requirements { get; internal set; }
public string name { get; internal set; }
public string Name
{
get { return name; }
}
public Teacher(Req... |
Make styling consistent between files | // Note.cs
// <copyright file="Note.cs"> This code is protected under the MIT License. </copyright>
using System.Collections.Generic;
namespace Todo_List
{
/// <summary>
/// A data representation of a note.
/// </summary>
public class Note
{
/// <summary>
/// Initializes a new inst... | // Note.cs
// <copyright file="Note.cs"> This code is protected under the MIT License. </copyright>
using System.Collections.Generic;
namespace Todo_List
{
/// <summary>
/// A data representation of a note.
/// </summary>
public class Note
{
/// <summary>
/// Initializes a new inst... |
Fix bug when deactivating ibus keyboards Setting the Keyboard to null in GlobalInputContext.Clear prevented the IbusKeyboardAdaptor.SetIMEKeyboard method from disabling the keyboard. | #if __MonoCS__
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using IBusDotNet;
using NDesk.DBus;
namespace Palaso.UI.WindowsForms.Keyboarding.Linux
{
/// <summary>
/// a global cache used only to reduce traffic with ibus via dbus.
/// </summary>
internal static class GlobalCachedInp... | #if __MonoCS__
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using IBusDotNet;
using NDesk.DBus;
namespace Palaso.UI.WindowsForms.Keyboarding.Linux
{
/// <summary>
/// a global cache used only to reduce traffic with ibus via dbus.
/// </summary>
internal static class GlobalCachedInp... |
Remove old serialization check that is no longer required | using System;
using System.IO;
using System.Runtime.Serialization;
using ProtoBuf;
using ProtoBuf.Meta;
namespace Dx.Runtime
{
public class DefaultObjectWithTypeSerializer : IObjectWithTypeSerializer
{
private readonly ILocalNode m_LocalNode;
public DefaultObjectWithTypeSerializer(ILocalNode ... | using System;
using System.IO;
using System.Runtime.Serialization;
using ProtoBuf;
using ProtoBuf.Meta;
namespace Dx.Runtime
{
public class DefaultObjectWithTypeSerializer : IObjectWithTypeSerializer
{
private readonly ILocalNode m_LocalNode;
public DefaultObjectWithTypeSerializer(ILocalNode ... |
Clean code with using instead of fixed namespaces | namespace TheCollection.Domain.Contracts.Repository {
using System.Collections.Generic;
using System.Threading.Tasks;
public interface ILinqSearchRepository<T> where T : class {
Task<IEnumerable<T>> SearchItemsAsync(System.Linq.Expressions.Expression<System.Func<T, bool>> predicate = null, int page... | namespace TheCollection.Domain.Contracts.Repository {
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
public interface ILinqSearchRepository<T> where T : class {
Task<IEnumerable<T>> SearchItemsAsync(Expression<Func<T, bool>> pred... |
Simplify logic in user profile validation | using Microsoft.AspNet.Identity.EntityFramework;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace AllReady.Models
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser... | using Microsoft.AspNet.Identity.EntityFramework;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace AllReady.Models
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser... |
Add unit test for partition change | using System.Linq;
using Xunit;
namespace PagedList.Tests
{
public class SplitAndPartitionFacts
{
[Fact]
public void Partition_Works()
{
//arrange
var list = Enumerable.Range(1, 9999);
//act
var splitList = list.Partition(1000);
//assert
Assert.Equal(10, splitList.Count());
Assert.Equal... | using System.Linq;
using Xunit;
namespace PagedList.Tests
{
public class SplitAndPartitionFacts
{
[Fact]
public void Partition_Works()
{
//arrange
var list = Enumerable.Range(1, 9999);
//act
var splitList = list.Partition(1000);
//assert
Assert.Equal(10, splitList.Count());
Assert.Equal... |
Improve error message when BlogPost.Content markdown to html fails | using System;
using System.Web;
using Casper.Domain.Features.BlogPosts;
using CroquetAustraliaWebsite.Library.Content;
namespace CroquetAustraliaWebsite.Application.App.home
{
public class BlogPostViewModel
{
private readonly BlogPost _blogPost;
private readonly Lazy<IHtmlString> _contentFactor... | using System;
using System.Web;
using Anotar.NLog;
using Casper.Domain.Features.BlogPosts;
using CroquetAustraliaWebsite.Library.Content;
namespace CroquetAustraliaWebsite.Application.App.home
{
public class BlogPostViewModel
{
private readonly BlogPost _blogPost;
private readonly Lazy<IHtmlStr... |
Fix misordered hit error in score meter types | // 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.ComponentModel;
namespace osu.Game.Configuration
{
public enum ScoreMeterType
{
[Description("None")]
None,
[Description("... | // 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.ComponentModel;
namespace osu.Game.Configuration
{
public enum ScoreMeterType
{
[Description("None")]
None,
[Description("... |
Replace hardcoded string with constant | using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
namespace AuthSamples.ClaimsTransformer.Controllers
{
public class AccountController : Controller
{
[HttpGet]
public IAction... | using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Mvc;
namespace AuthSamples.ClaimsTransformer.Controllers
{
public class AccountController : Contro... |
Change subcommand60 packet test case name in VS | namespace Booma.Proxy
{
public sealed partial class CapturedPacketsTests
{
public class PacketCaptureTestEntry
{
public short OpCode { get; }
public byte[] BinaryData { get; }
public string FileName { get; }
/// <inheritdoc />
public PacketCaptureTestEntry(short opCode, byte[] binaryData, strin... | namespace Booma.Proxy
{
public sealed partial class CapturedPacketsTests
{
public class PacketCaptureTestEntry
{
public short OpCode { get; }
public byte[] BinaryData { get; }
public string FileName { get; }
/// <inheritdoc />
public PacketCaptureTestEntry(short opCode, byte[] binaryData, strin... |
Tweak screenshot notification script (minor edit) | using System;
using System.Windows.Forms;
using CefSharp;
using TweetDck.Core.Bridge;
using TweetDck.Core.Controls;
using TweetDck.Resources;
namespace TweetDck.Core.Notification.Screenshot{
sealed class FormNotificationScreenshotable : FormNotification{
public FormNotificationScreenshotable(Action callba... | using System;
using System.Windows.Forms;
using CefSharp;
using TweetDck.Core.Bridge;
using TweetDck.Core.Controls;
using TweetDck.Resources;
namespace TweetDck.Core.Notification.Screenshot{
sealed class FormNotificationScreenshotable : FormNotification{
public FormNotificationScreenshotable(Action callba... |
Add temporary warning of upcoming lab closure. | @{
ViewData["Title"] = "Home Page";
}
<div class="col-8">
<p class="lead">The UC Davis Analytical Laboratory is a core support facility of the UC Davis College of Agriculture and Environmental Sciences.</p>
<p>Analytical Laboratory clients are University of California academics, other educational instituti... | @{
ViewData["Title"] = "Home Page";
}
<div class="col-8">
<p class="lead">PLEASE NOTE: The Analytical Lab will be closed on July 4th and 5th.</p>
<p class="lead">The UC Davis Analytical Laboratory is a core support facility of the UC Davis College of Agriculture and Environmental Sciences.</p>
<... |
Fix IP look up page broken | using Newtonsoft.Json;
namespace AzureSpeed.WebUI.Models
{
public class Prefix
{
[JsonProperty("ip_prefix")]
public string IpPrefix { get; set; }
[JsonProperty("region")]
public string Region { get; set; }
[JsonProperty("region")]
public string Service { get; ... | using Newtonsoft.Json;
namespace AzureSpeed.WebUI.Models
{
public class Prefix
{
[JsonProperty("ip_prefix")]
public string IpPrefix { get; set; }
[JsonProperty("region")]
public string Region { get; set; }
[JsonProperty("service")]
public string Service { get;... |
Remove Idle timeout in IIS | using System;
using System.Diagnostics;
using Microsoft.Web.Administration;
using Microsoft.WindowsAzure.ServiceRuntime;
using System.Linq;
namespace SFA.DAS.ReferenceData.Api
{
public class WebRole : RoleEntryPoint
{
public override void Run()
{
using (var serverManager = new Serv... | using System;
using System.Diagnostics;
using Microsoft.Web.Administration;
using Microsoft.WindowsAzure.ServiceRuntime;
using System.Linq;
namespace SFA.DAS.ReferenceData.Api
{
public class WebRole : RoleEntryPoint
{
public override void Run()
{
using (var serverManager = new Serv... |
Fix example of strings exercise | static class LogLine
{
public static string Message(string logLine)
{
return logLine.Substring(logLine.IndexOf(":") + 1).Trim();
}
public static string LogLevel(string logLine)
{
return logLine.Substring(1, (logLine.IndexOf("]") - 1).ToLower();
}
public static string Reform... | static class LogLine
{
public static string Message(string logLine)
{
return logLine.Substring(logLine.IndexOf(":") + 1).Trim();
}
public static string LogLevel(string logLine)
{
return logLine.Substring(1, logLine.IndexOf("]") - 1).ToLower();
}
public static string Reforma... |
Use new Process interface in tests | using System;
using System.Collections.Generic;
using CIV.Ccs;
using CIV.Interfaces;
using Moq;
namespace CIV.Test
{
public static class Common
{
/// <summary>
/// Setup a mock process that can only do the given action.
/// </summary>
/// <returns>The mock process.</returns>
... | using System;
using System.Collections.Generic;
using CIV.Ccs;
using CIV.Interfaces;
using Moq;
namespace CIV.Test
{
public static class Common
{
/// <summary>
/// Setup a mock process that can only do the given action.
/// </summary>
/// <returns>The mock process.</returns>
... |
Add Link method to compare string with wildcards | using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework
{
public static class Extension
{
public static async Task<HttpWebResponse> GetResponseAsync(this HttpWebRequest request, CancellationToken ct)
... | using System;
using System.Collections.Generic;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework
{
public static class Extension
{
public static async Task<HttpWebResponse> GetResponseAsync(this HttpWebReq... |
Add parameter for a REQUEST type API Gateway Custom Authorizer | namespace Amazon.Lambda.APIGatewayEvents
{
/// <summary>
/// For requests coming in to a custom API Gateway authorizer function.
/// </summary>
public class APIGatewayCustomAuthorizerRequest
{
/// <summary>
/// Gets or sets the 'type' property.
/// </summary>
public ... | using System.Collections.Generic;
namespace Amazon.Lambda.APIGatewayEvents
{
/// <summary>
/// For requests coming in to a custom API Gateway authorizer function.
/// </summary>
public class APIGatewayCustomAuthorizerRequest
{
/// <summary>
/// Gets or sets the 'type' property.
... |
Increment library version as version on pre-release line messed up versioning | using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyProduct("Aggregates.NET")]
[assembly: AssemblyDescription(".NET event sourced domain driven design model via NServiceBus and EventStore")]
[assembly: AssemblyCopyright("Copyright © Charles Solar 2017")]
[assembly: AssemblyVersion("0.12... | using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyProduct("Aggregates.NET")]
[assembly: AssemblyDescription(".NET event sourced domain driven design model via NServiceBus and EventStore")]
[assembly: AssemblyCopyright("Copyright © Charles Solar 2017")]
[assembly: AssemblyVersion("0.13... |
Add description for magic params | namespace HeyRed.Mime
{
public enum MagicParams
{
MAGIC_PARAM_INDIR_MAX = 0,
MAGIC_PARAM_NAME_MAX,
MAGIC_PARAM_ELF_PHNUM_MAX,
MAGIC_PARAM_ELF_SHNUM_MAX,
MAGIC_PARAM_ELF_NOTES_MAX,
MAGIC_PARAM_REGEX_MAX,
MAGIC_PARAM_BYTES_MAX
}
}
| namespace HeyRed.Mime
{
public enum MagicParams
{
/// <summary>
/// The parameter controls how many levels of recursion will be followed for indirect magic entries.
/// </summary>
MAGIC_PARAM_INDIR_MAX = 0,
/// <summary>
/// The parameter controls the maximum nu... |
Make main screen a bit more identifiable | using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Screens;
namespace TemplateGame.Game
{
public class MainScreen : Screen
{
[BackgroundDependencyLoader]
private void load()
{
AddInternal(new SpinningBox
{
Anchor = A... | using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osuTK.Graphics;
namespace TemplateGame.Game
{
public class MainScreen : Screen
{
[BackgroundDependencyLoader]
private void ... |
Change expiry job back to 28th | using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs
{
public class ExpireFundsJob
{
private readonly IMessageSession _messageSession;
... | using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs
{
public class ExpireFundsJob
{
private readonly IMessageSession _messageSession;
... |
Use file version as client version | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Azure.EventHubs
{
using System;
using System.Reflection;
using System.Runtime.Versioning;
using Microsoft.Azure.Amqp;
static c... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Azure.EventHubs
{
using System;
using System.Reflection;
using System.Runtime.Versioning;
using Microsoft.Azure.Amqp;
static c... |
Make different mod name in patched version | using ICities;
using MetroOverhaul.OptionsFramework.Extensions;
namespace MetroOverhaul
{
public class Mod : IUserMod
{
public string Name => "Metro Overhaul";
public string Description => "Brings metro depots, ground and elevated metro tracks";
public void OnSettingsUI(UIHelperBase h... | using ICities;
using MetroOverhaul.OptionsFramework.Extensions;
namespace MetroOverhaul
{
public class Mod : IUserMod
{
#if IS_PATCH
public const bool isPatch = true;
#else
public const bool isPatch = false;
#endif
public string Name => "Metro Overhaul" + (isPatch ? " [Patched]" : "")... |
Remove requirement for [schema_owner] = 'dbo' | using NBi.Core.Structure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Core.Structure.Relational.Builders
{
class SchemaDiscoveryCommandBuilder : RelationalDiscoveryCommandBuilder
{
protected override strin... | using NBi.Core.Structure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBi.Core.Structure.Relational.Builders
{
class SchemaDiscoveryCommandBuilder : RelationalDiscoveryCommandBuilder
{
protected override strin... |
Correct href in <see/> tag | using System;
namespace Plethora
{
public static class MathEx
{
/// <summary>
/// Returns the greatest common divisor of two numbers.
/// </summary>
/// <param name="a">The first number.</param>
/// <param name="b">The second number.</param>
/// <returns>The gre... | using System;
namespace Plethora
{
public static class MathEx
{
/// <summary>
/// Returns the greatest common divisor of two numbers.
/// </summary>
/// <param name="a">The first number.</param>
/// <param name="b">The second number.</param>
/// <returns>The gre... |
Throw an exception of [CallerMemberName] misbehaves. | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace ShopifyAPIAdapterLibrary.Models
{
public class ShopifyResourceModel : IResourceModel
{
public ev... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace ShopifyAPIAdapterLibrary.Models
{
public class ShopifyResourceModel : IResourceModel
{
public ev... |
Reduce exposure of public API | using System;
using System.Runtime.InteropServices;
using LibGit2Sharp.Core;
namespace LibGit2Sharp
{
public class IndexEntry
{
public IndexEntryState State { get; set; }
public string Path { get; private set; }
public ObjectId Id { get; private set; }
internal static IndexEn... | using System;
using System.Runtime.InteropServices;
using LibGit2Sharp.Core;
namespace LibGit2Sharp
{
public class IndexEntry
{
public IndexEntryState State { get; private set; }
public string Path { get; private set; }
public ObjectId Id { get; private set; }
internal static... |
Change version to 0.9.0.0 for the premature build | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TweetDick")]
[assembly: AssemblyDescripti... | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TweetDick")]
[assembly: AssemblyDescripti... |
Remove list element when switching scene | using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class LeaderboardUI : MonoBehaviour
{
[SerializeField] private RectTransform _scoresList;
[SerializeField] private Text _sceneTitle;
[SerializeField] private string _defaultScene = "Tuto";
private const strin... | using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class LeaderboardUI : MonoBehaviour
{
[SerializeField] private RectTransform _scoresList;
[SerializeField] private Text _sceneTitle;
[SerializeField] private string _defaultScene = "Tuto";
... |
Fix for content type NULL in rare cercumstances | using System.Net.Http;
using MyCouch.Extensions;
namespace MyCouch.Responses.Materializers
{
public class BasicResponseMaterializer
{
public virtual void Materialize(Response response, HttpResponseMessage httpResponse)
{
response.RequestUri = httpResponse.RequestMessage.RequestUri;... | using System.Net.Http;
using MyCouch.Extensions;
namespace MyCouch.Responses.Materializers
{
public class BasicResponseMaterializer
{
public virtual void Materialize(Response response, HttpResponseMessage httpResponse)
{
response.RequestUri = httpResponse.RequestMessage.RequestUri;... |
Set fixed height and add debug messages for OnAppearing/OnDisappearing | using Telerik.XamarinForms.DataControls.ListView;
using TelerikListViewPoc.Components;
using Xamarin.Forms;
namespace TelerikListViewPoc.Controls
{
public class BookListCell : ListViewTemplateCell
{
public BookListCell()
{
var titleLabel = new Label
{
... | using System.Diagnostics;
using Telerik.XamarinForms.DataControls.ListView;
using TelerikListViewPoc.Components;
using Xamarin.Forms;
namespace TelerikListViewPoc.Controls
{
public class BookListCell : ListViewTemplateCell
{
public BookListCell()
{
var titleLabel = new Label
... |
Use struct instead of class for event/notification data. | using System;
namespace DanTup.DartAnalysis
{
#region JSON deserialisation objects
class ServerStatusEvent
{
public ServerAnalysisStatus analysis = null;
}
class ServerAnalysisStatus
{
public bool analyzing = false;
}
#endregion
public class ServerStatusNotification
{
public bool IsAnalysing { get... | using System;
namespace DanTup.DartAnalysis
{
#region JSON deserialisation objects
class ServerStatusEvent
{
public ServerAnalysisStatus analysis = null;
}
class ServerAnalysisStatus
{
public bool analyzing = false;
}
#endregion
public struct ServerStatusNotification
{
public bool IsAnalysing { ge... |
Update StringExtension to validate email | namespace AdamS.StoreTemp.Models.Common
{
public static class StringExtensions
{
public static bool IsValidEmailAddress(this string emailAddress)
{
return !string.IsNullOrWhiteSpace(emailAddress);
}
}
} | using System.Text.RegularExpressions;
namespace AdamS.StoreTemp.Models.Common
{
public static class StringExtensions
{
public static bool IsValidEmailAddress(this string emailAddress)
{
Regex regex = new Regex(@"^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$");
Match m... |
Replace ASN array with IList | using System;
using System.Linq;
namespace BmpListener.Bgp
{
public abstract class BgpMessage
{
protected const int BgpHeaderLength = 19;
protected BgpMessage(ref ArraySegment<byte> data)
{
Header = new BgpHeader(data);
var offset = data.Offset + BgpHeaderLengt... | using System;
namespace BmpListener.Bgp
{
public abstract class BgpMessage
{
protected const int BgpHeaderLength = 19;
protected BgpMessage(ArraySegment<byte> data)
{
Header = new BgpHeader(data);
var offset = data.Offset + BgpHeaderLength;
var coun... |
Fix MediatR examples exception handlers overrides | using MediatR.Pipeline;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediatR.Examples.ExceptionHandler.Overrides;
public class CommonExceptionHandler : AsyncRequestExceptionHandler<PingResourceTimeout, Pong>
{
private readonly TextWriter _writer;
public Commo... | using MediatR.Pipeline;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediatR.Examples.ExceptionHandler.Overrides;
public class CommonExceptionHandler : AsyncRequestExceptionHandler<PingResourceTimeout, Pong>
{
private readonly TextWriter _writer;
public Commo... |
Move from MSTest to NUnit | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NUnit.Framework;
using SharpResume.Model;
using Assert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;
namespace Sharp... | using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json.Linq;
using NUnit.Framework;
using SharpResume.Model;
using Assert = NUnit.Framework.Assert;
namespace SharpResume.Tests
{
[TestFixture]
public class UnitTest
{
const string JsonName = "resume.json";
static readonly string _json = File.Re... |
Fix comment (which was in an unsaved file, unfortunately) | // Copyright 2020, Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... | // Copyright 2020, Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
Prepare for a release - this will go out with v2 R255 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Xi... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Xi... |
Return IEnumerable<FulfillmentOrder> instead of ListResult<FulfillmentOrder> | using System.Net.Http;
using ShopifySharp.Filters;
using System.Collections.Generic;
using System.Threading.Tasks;
using ShopifySharp.Infrastructure;
using System;
using System.Threading;
using ShopifySharp.Lists;
namespace ShopifySharp
{
/// <summary>
/// A service for manipulating Shopify fulfillment orders... | using System.Net.Http;
using ShopifySharp.Filters;
using System.Collections.Generic;
using System.Threading.Tasks;
using ShopifySharp.Infrastructure;
using System;
using System.Threading;
using ShopifySharp.Lists;
namespace ShopifySharp
{
/// <summary>
/// A service for manipulating Shopify fulfillment orders... |
Fix crash when acrobat is not correctly installed | using System.Windows.Forms;
namespace XComponent.Common.UI.Pdf
{
public partial class WinFormPdfHost : UserControl
{
public WinFormPdfHost()
{
InitializeComponent();
if(!DesignMode)
axAcroPDF1.setShowToolbar(true);
}
public void LoadFile(str... | using System;
using System.Windows.Forms;
namespace XComponent.Common.UI.Pdf
{
public partial class WinFormPdfHost : UserControl
{
public WinFormPdfHost()
{
InitializeComponent();
if(!DesignMode)
axAcroPDF1.setShowToolbar(true);
}
public voi... |
Move call to UseFluentActions before UseMvc in api test project | using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using ExplicitlyImpl.AspNetCore.Mvc.FluentActions;
namespace SimpleApi
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
servi... | using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using ExplicitlyImpl.AspNetCore.Mvc.FluentActions;
namespace SimpleApi
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
servi... |
Fix Log4Net path for loading config file | // Copyright 2007-2011 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.... | // Copyright 2007-2011 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.... |
Sort properties vs. methods; whitespace. | namespace StraightSql
{
using System;
using System.Data.Common;
public interface IReader
{
Object Read(DbDataReader reader);
Type Type { get; }
}
}
| namespace StraightSql
{
using System;
using System.Data.Common;
public interface IReader
{
Type Type { get; }
Object Read(DbDataReader reader);
}
}
|
Add using lines and namespaces | public class ShaneONeill : IAmACommunityMember, IFilterMyBlogPosts
{
public string FirstName => "Shane";
public string LastName => "O'Neill";
public string ShortBioOrTagLine => "DBA. Food, Coffee, Whiskey (not necessarily in that order)... ";
public string StateOrRegion => "Irela... | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class ShaneONeill : IAmACommunityMember, IFilterMyBlogPosts
{
public string FirstName => "Shane";
... |
Add test for new properties feature. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;
namespace Log4NetlyTesting {
class Program {
static void Main(string[] args) {
log4net.Config.XmlConfigurator.Configure();
var logger = LogManager.GetL... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;
using log4net.Core;
namespace Log4NetlyTesting {
class Program {
static void Main(string[] args) {
log4net.Config.XmlConfigurator.Configure();
var logg... |
Fix request failing due to parameters | // 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.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Rooms
{
public class JoinRoomRequest : APIRequest
{
... | // 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.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Rooms
{
public class JoinRoomRequest : APIRequest
{
... |
Enable automatic versioning and Nuget packaging of shippable Vipr binaries | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml.Linq;
using Vipr.Core;
namespace Vipr
{
internal c... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.IO;
namespace Vipr
{
internal class Program
{
private static void Main(string[] args)
{
... |
Use the RemoveVersion method to clean up the unnecessary first version | namespace Sitecore.FakeDb.Data.Engines.DataCommands
{
using System;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
public class CreateItemCommand : Sitecore.Data.Engines.DataCommands.CreateItemCommand
{
private readonly DataStorage dataStorage;
public CreateItemCommand(DataStorage dataStora... | namespace Sitecore.FakeDb.Data.Engines.DataCommands
{
using System;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Globalization;
public class CreateItemCommand : Sitecore.Data.Engines.DataCommands.CreateItemCommand
{
private readonly DataStorage dataStorage;
public CreateI... |
Reword xmldoc to make more sense | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Mods
{
/// <summary>
/// The usage of this mod to determine its playability.
/// </summary>
public enum ModUsage
{
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Mods
{
/// <summary>
/// The usage of this mod to determine whether it's playable in such context.
/// </summary>
public enum ... |
Remove method from interface because it's only useful for testing. Generates incorrect results if not used right | using System;
using System.Collections.Generic;
using System.Net.Http;
namespace Refit
{
public interface IRequestBuilder
{
IEnumerable<string> InterfaceHttpMethods { get; }
Func<object[], HttpRequestMessage> BuildRequestFactoryForMethod(string methodName, string basePath = "");
Func<Ht... | using System;
using System.Collections.Generic;
using System.Net.Http;
namespace Refit
{
public interface IRequestBuilder
{
IEnumerable<string> InterfaceHttpMethods { get; }
Func<HttpClient, object[], object> BuildRestResultFuncForMethod(string methodName);
}
interface IRequestBuilderF... |
Fix potential NRE in lucene index | using System;
using Lucene.Net.Documents;
using Orchard.Indexing;
namespace Lucene.Models {
public class LuceneSearchHit : ISearchHit {
private readonly Document _doc;
private readonly float _score;
public float Score { get { return _score; } }
public LuceneSearchHit(Document doc... | using System;
using Lucene.Net.Documents;
using Orchard.Indexing;
namespace Lucene.Models {
public class LuceneSearchHit : ISearchHit {
private readonly Document _doc;
private readonly float _score;
public float Score { get { return _score; } }
public LuceneSearchHit(Document doc... |
Apply same fix to legacy accuracy counter | // 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.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play;
using o... | // 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.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play;
using o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.