Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Clarify the apparently unused generic type parameter. | namespace Cassette.Configuration
{
public interface IFileSearchModifier<T>
{
void Modify(FileSearch fileSearch);
}
} | namespace Cassette.Configuration
{
// ReSharper disable UnusedTypeParameter
// The T type parameter makes it easy to distinguish between file search modifiers for the different type of bundles
public interface IFileSearchModifier<T>
where T : Bundle
// ReSharper restore UnusedTypeParameter
{
... |
Add option for allowed user roles | using System;
namespace Glimpse.Server
{
public class GlimpseServerWebOptions
{
public bool AllowRemote { get; set; }
}
} | using System;
using System.Collections.Generic;
namespace Glimpse.Server
{
public class GlimpseServerWebOptions
{
public GlimpseServerWebOptions()
{
AllowedUserRoles = new List<string>();
}
public bool AllowRemote { get; set; }
public IList<string> Allowed... |
Disable optimisations validator (in line with framework project) | // 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 BenchmarkDotNet.Running;
namespace osu.Game.Benchmarks
{
public static class Program
{
public static void Main(string[] args)
{
... | // 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 BenchmarkDotNet.Configs;
using BenchmarkDotNet.Running;
namespace osu.Game.Benchmarks
{
public static class Program
{
public static void Main(stri... |
Remove misplaced access modifier in interface specification | // 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.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Rulesets;
using osu.Game.Users;
namespace osu.Game.Scoring
{
public interface IScoreIn... | // 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.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Rulesets;
using osu.Game.Users;
namespace osu.Game.Scoring
{
public interface IScoreIn... |
Declare storage permission at assembly level | // 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.Runtime.CompilerServices;
// We publish our internal attributes to other sub-projects of the framework.
// Note, that we omit visual tests as they are mean... | // 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.Runtime.CompilerServices;
using Android.App;
// We publish our internal attributes to other sub-projects of the framework.
// Note, that we omit visual tes... |
Fix mistake in registration (method not on interface) | using System;
namespace CSF.Screenplay.Scenarios
{
/// <summary>
/// Builder service which assists in the creation of service registrations.
/// </summary>
public interface IServiceRegistryBuilder
{
/// <summary>
/// Registers a service which will be used across all scenarios within a test run.
/... | using System;
namespace CSF.Screenplay.Scenarios
{
/// <summary>
/// Builder service which assists in the creation of service registrations.
/// </summary>
public interface IServiceRegistryBuilder
{
/// <summary>
/// Registers a service which will be used across all scenarios within a test run.
/... |
Upgrade OData WebAPI Version to 5.6.0 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
#if !BUILD_GENERATED_VERSION
[assembly: AssemblyCompany("... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
#if !BUILD_GENERATED_VERSION
[assembly: AssemblyCompany("... |
Fix ctor, we must use initWithCoder when loading from a storyboard | using System;
using CoreGraphics;
using Foundation;
using UIKit;
namespace TextKitDemo
{
public partial class CollectionViewCell : UICollectionViewCell
{
public CollectionViewCell (IntPtr handle) : base (handle)
{
BackgroundColor = UIColor.DarkGray;
Layer.CornerRadius = 5;
UIApplication.Notifications.... | using System;
using CoreGraphics;
using Foundation;
using UIKit;
namespace TextKitDemo
{
public partial class CollectionViewCell : UICollectionViewCell
{
public CollectionViewCell (IntPtr handle) : base (handle)
{
Initialize ();
}
[Export ("initWithCoder:")]
public CollectionViewCell (NSCoder coder) :... |
Change to call new API | using System.Threading.Tasks;
using MediatR;
using SFA.DAS.EmployerAccounts.Configuration;
using SFA.DAS.EmployerAccounts.Interfaces;
namespace SFA.DAS.EmployerAccounts.Commands.UnsubscribeProviderEmail
{
public class UnsubscribeProviderEmailQueryHandler : AsyncRequestHandler<UnsubscribeProviderEmailQuery>
{
... | using System.Threading.Tasks;
using MediatR;
using SFA.DAS.EmployerAccounts.Configuration;
using SFA.DAS.EmployerAccounts.Interfaces;
namespace SFA.DAS.EmployerAccounts.Commands.UnsubscribeProviderEmail
{
public class UnsubscribeProviderEmailQueryHandler : AsyncRequestHandler<UnsubscribeProviderEmailQuery>
{
... |
Allow the status to be any object instead of just a string. | using System;
namespace Dotnet.Microservice.Health
{
/// <summary>
/// Represents a health check response
/// </summary>
public struct HealthResponse
{
public readonly bool IsHealthy;
public readonly string Message;
private HealthResponse(bool isHealthy, string statusMessa... | using System;
namespace Dotnet.Microservice.Health
{
/// <summary>
/// Represents a health check response
/// </summary>
public struct HealthResponse
{
public readonly bool IsHealthy;
public readonly object Response;
private HealthResponse(bool isHealthy, object statusObje... |
Fix path to SPARQL test suite files | using System.IO;
using NUnit.Framework;
namespace BrightstarDB.InternalTests
{
internal static class TestPaths
{
public static string DataPath => Path.Combine(TestContext.CurrentContext.TestDirectory, "..\\..\\..\\BrightstarDB.Tests\\Data\\");
}
}
| using System.IO;
using NUnit.Framework;
namespace BrightstarDB.InternalTests
{
internal static class TestPaths
{
public static string DataPath => Path.Combine(TestContext.CurrentContext.TestDirectory, "..\\..\\..\\..\\BrightstarDB.Tests\\Data\\");
}
}
|
Move initialization logic to ctor | using System;
using Newtonsoft.Json;
namespace BmpListener.Bmp
{
public class BmpHeader
{
public BmpHeader(byte[] data)
{
ParseBytes(data);
}
public byte Version { get; private set; }
[JsonIgnore]
public uint Length { get; private set; }
p... | using System;
using Newtonsoft.Json;
using System.Linq;
using BmpListener;
namespace BmpListener.Bmp
{
public class BmpHeader
{
public BmpHeader(byte[] data)
{
Version = data.First();
//if (Version != 3)
//{
// throw new Exception("invalid BMP... |
Add xmldoc mention of valid `OnlineID` values | // 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
namespace osu.Game.Database
{
public interface IHasOnlineID
{
/// <summary>
/// The server-side ID representing this instance, i... | // 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
namespace osu.Game.Database
{
public interface IHasOnlineID
{
/// <summary>
/// The server-side ID representing this instance, i... |
Fix for blinking tests issue | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NSuperTest.Registration
{
public class RegistrationDiscoverer
{
public IEnumerable<IRegisterServers> FindRegistrations()
{
var type = typeof(IRegisterServers);
va... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace NSuperTest.Registration
{
public static class AssemblyExtensions
{
public static IEnumerable<Type> GetLoadableTypes(this Assembly assembly)
{
try
... |
Improve documentation of 0100664 mode usage | namespace LibGit2Sharp
{
/// <summary>
/// Git specific modes for entries.
/// </summary>
public enum Mode
{
// Inspired from http://stackoverflow.com/a/8347325/335418
/// <summary>
/// 000000 file mode (the entry doesn't exist)
/// </summary>
Nonexisten... | namespace LibGit2Sharp
{
/// <summary>
/// Git specific modes for entries.
/// </summary>
public enum Mode
{
// Inspired from http://stackoverflow.com/a/8347325/335418
/// <summary>
/// 000000 file mode (the entry doesn't exist)
/// </summary>
Nonexisten... |
Add method to get a computer’s printers | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
using PrintNodeNet.Http;
namespace PrintNodeNet
{
public sealed class PrintNodeComputer
{
[JsonProperty("id")]
public long Id { get; set; }
[JsonProper... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
using PrintNodeNet.Http;
namespace PrintNodeNet
{
public sealed class PrintNodeComputer
{
[JsonProperty("id")]
public long Id { get; set; }
[JsonProper... |
Build edit page for enabled RPs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Thinktecture.IdentityServer.Web.ViewModels
{
public class RelyingPartyViewModel
{
public int ID { get; set; }
public string DisplayName { get; set; }
}
} | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Thinktecture.IdentityServer.Web.ViewModels
{
public class RelyingPartyViewModel
{
public string ID { get; set; }
public string DisplayName { get; set; }
public bool Enabled { get; set; }
... |
Update in creation of table | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace dbms_objects_data
{
class Table
{
public DataTable table = new DataTable();
public Table()
{
}
public bool insertRows(str... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace dbms_objects_data
{
class Table
{
public DataTable table = new DataTable();
public Table()
{
}
public bool insertRows(str... |
Add expiration to client secret | /*
* Copyright 2014 Dominick Baier, Brock Allen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | /*
* Copyright 2014 Dominick Baier, Brock Allen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... |
Create test for inherited private validator function | using UnityEngine;
namespace NaughtyAttributes.Test
{
public class ValidateInputTest : MonoBehaviour
{
[ValidateInput("NotZero0", "int0 must not be zero")]
public int int0;
private bool NotZero0(int value)
{
return value != 0;
}
public ValidateInputNest1 nest1;
}
[System.Seriali... | using UnityEngine;
namespace NaughtyAttributes.Test
{
public class ValidateInputTest : MonoBehaviour
{
[ValidateInput("NotZero0", "int0 must not be zero")]
public int int0;
private bool NotZero0(int value)
{
return value != 0;
}
public ValidateInputNest1 nest1;
public ValidateInp... |
Add unqualified name lookup to the MissingMemberName test | using static System.Console;
public class Counter
{
public Counter() { }
public int Count;
public Counter Increment()
{
Count++;
return this;
}
}
public static class Program
{
public static readonly Counter printCounter = new Counter();
public static void Main()
{
... | using static System.Console;
public class Counter
{
public Counter() { }
public int Count;
public Counter Increment()
{
Count++;
return this;
}
}
public static class Program
{
public static readonly Counter printCounter = new Counter();
public static void Main()
{
... |
Test for sequence in JSON | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace Xtrmstep.Extractor.Core.Tests
{
public class FileReaderTests
{
const string testDataFolder = @"f:\TestData\";
[Fact(DisplayName = "Read JSON Files / One e... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace Xtrmstep.Extractor.Core.Tests
{
public class FileReaderTests
{
const string testDataFolder = @"c:\TestData\";
[Fact(DisplayName = "Read JSON Files / One e... |
Revert "Force fix for new databases" | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Newtonsoft.Json;
using VotingApplication.Data.Context;
using VotingApplicati... | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Newtonsoft.Json;
using VotingApplication.Data.Context;
using VotingApplicati... |
Add recurring job for reading status | using Hangfire;
using StructureMap;
using SupportManager.Control.Infrastructure;
using Topshelf;
namespace SupportManager.Control
{
public class SupportManagerService : ServiceControl
{
private readonly IContainer container;
private BackgroundJobServer jobServer;
public SupportManagerS... | using Hangfire;
using StructureMap;
using SupportManager.Contracts;
using SupportManager.Control.Infrastructure;
using Topshelf;
namespace SupportManager.Control
{
public class SupportManagerService : ServiceControl
{
private readonly IContainer container;
private BackgroundJobServer jobServer;... |
Fix converter for possible null values. | using DocumentFormat.OpenXml;
namespace ClosedXML.Utils
{
internal static class OpenXmlHelper
{
public static BooleanValue GetBooleanValue(bool value, bool defaultValue)
{
return value == defaultValue ? null : new BooleanValue(value);
}
public static bool GetBoolea... | using DocumentFormat.OpenXml;
namespace ClosedXML.Utils
{
internal static class OpenXmlHelper
{
public static BooleanValue GetBooleanValue(bool value, bool defaultValue)
{
return value == defaultValue ? null : new BooleanValue(value);
}
public static bool GetBoolea... |
Move away from v0 approach. | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sketchball.Elements
{
public class Ball : PinballElement, IPhysics
{
private Vector2 v;
private Vector2 v0;
long t = 0;
public V... | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sketchball.Elements
{
public class Ball : PinballElement, IPhysics
{
public Vector2 Velocity
{
get;
set;
}
... |
Make the custom action not have to use Debugger.Launch to prove that it works. | using System;
using Microsoft.Deployment.WindowsInstaller;
namespace Wix.CustomActions
{
using System.IO;
using System.Diagnostics;
public class CustomActions
{
[CustomAction]
public static ActionResult CloseIt(Session session)
{
try
{
... | using Microsoft.Deployment.WindowsInstaller;
using System;
using System.IO;
namespace Wix.CustomActions
{
public class CustomActions
{
[CustomAction]
public static ActionResult CloseIt(Session session)
{
try
{
string fileFullPath = Path.Combine(E... |
Add change handling for difficulty section | // 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.Bindables;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Timing
{
internal class Difficu... | // 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.Bindables;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Timing
{
internal class Difficu... |
Fix assertion, need to check if it's not null first. | namespace NEventStore
{
using FluentAssertions;
using NEventStore.Persistence.AcceptanceTests;
using NEventStore.Persistence.AcceptanceTests.BDD;
using System;
using Xunit;
public class DefaultSerializationWireupTests
{
public class when_building_an_event_store_without_an_explicit_... | namespace NEventStore
{
using FluentAssertions;
using NEventStore.Persistence.AcceptanceTests;
using NEventStore.Persistence.AcceptanceTests.BDD;
using System;
using Xunit;
public class DefaultSerializationWireupTests
{
public class when_building_an_event_store_without_an_explicit_... |
Change library command line option | namespace SnappyMap.CommandLine
{
using System.Collections.Generic;
using global::CommandLine;
using global::CommandLine.Text;
public class Options
{
[Option('s', "size", DefaultValue = "8x8", HelpText = "Set the size of the output map.")]
public string Size { get; set; ... | namespace SnappyMap.CommandLine
{
using System.Collections.Generic;
using global::CommandLine;
using global::CommandLine.Text;
public class Options
{
[Option('s', "size", DefaultValue = "8x8", HelpText = "Set the size of the output map.")]
public string Size { get; set; ... |
Update assembly to version 0. | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Si... | 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("Si... |
Change parsing to only trigger on changed lines. | using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using TodoPad.Models;
using TodoPad.Task_Parser;
namespace TodoPad.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public par... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using TodoPad.Models;
using TodoPad.Task_Parser;
namespace TodoPad.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
///... |
Add category to test run | using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
namespace MvvmLightBindings.UITest
{
[TestFixture(Platform.Android)]
[TestFixture(Platform.iOS)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
this.platfor... | using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
namespace MvvmLightBindings.UITest
{
[TestFixture(Platform.Android)]
[TestFixture(Platform.iOS)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
this.platfor... |
Add support for fixed structures | using System;
namespace SPAD.neXt.Interfaces.SimConnect
{
public interface IDataItemAttributeBase
{
int ItemIndex
{
get;
set;
}
int ItemSize
{
get;
set;
}
float ItemEpsilon
{
get;
... | using System;
namespace SPAD.neXt.Interfaces.SimConnect
{
public interface IDataItemAttributeBase
{
int ItemIndex
{
get;
set;
}
int ItemSize
{
get;
set;
}
float ItemEpsilon
{
get;
... |
Add descriptor to IgnoreCase for parsing of enum | using System;
using Digipost.Api.Client.Domain.Enums;
namespace Digipost.Api.Client.Domain.Identify
{
public class IdentificationById : IIdentification
{
public IdentificationById(IdentificationType identificationType, string value)
{
IdentificationType = identificationType;
... | using System;
using Digipost.Api.Client.Domain.Enums;
namespace Digipost.Api.Client.Domain.Identify
{
public class IdentificationById : IIdentification
{
public IdentificationById(IdentificationType identificationType, string value)
{
IdentificationType = identificationType;
... |
Correct action for send log in link form | @model SendLogInLinkModel
@{
ViewBag.Title = "Send Log In Link";
}
<div class="jumbotron">
<div class="row">
<div class="col-lg-6">
<h1>Welcome to Secret Santa!</h1>
@using (Html.BeginForm("LogIn", "Account", FormMethod.Post, new { role = "form", @class = "form-horizontal" }))... | @model SendLogInLinkModel
@{
ViewBag.Title = "Send Log In Link";
}
<div class="jumbotron">
<div class="row">
<div class="col-lg-6">
<h1>Welcome to Secret Santa!</h1>
@using (Html.BeginForm("SendLogInLink", "Account", FormMethod.Post, new { role = "form", @class = "form-horizon... |
Add Tests For DateTime Extensions | using System;
using FluentAssertions;
using NUnit.Framework;
using Withings.NET.Client;
namespace Withings.Specifications
{
[TestFixture]
public class DateTimeExtensionsTests
{
[Test]
public void DoubleFromUnixTimeTest()
{
((double)1491934309).FromUnixTime().Date.Should(... | using System;
using FluentAssertions;
using NUnit.Framework;
using Withings.NET.Client;
namespace Withings.Specifications
{
[TestFixture]
public class DateTimeExtensionsTests
{
[Test]
public void DoubleFromUnixTimeTest()
{
((double)1491934309).FromUnixTime().Date.Should(... |
Fix usage of deprecated Action.BeginInvoke() | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Threading;
using NUnit.Framework;
using osu.Framework.Platform;
namespace osu.Framework.Tests.Platform
{
[TestFixture]
pub... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
using osu.Framework.Platform;
namespace osu.Framework.Tests.Platfo... |
Fix "welcome" intro test failure due to no wait logic | // 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.Screens;
using osu.Game.Screens.Menu;
namespace osu.Game.Tests.Visual.Menus
{
[TestFixture]
public class TestSceneInt... | // 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.Audio.Track;
using osu.Framework.Screens;
using osu.Game.Screens.Menu;
namespace osu.Game.Tests.Visual.Menus
{
[TestFixtu... |
Revert last commit since it is currently not possible. | using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Permissions;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("MongoDBDriver")]
[assembly: AssemblyDescripti... | using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Permissions;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("MongoDBDriver")]
[assembly: AssemblyDescripti... |
Add method to parse ints and throw exception on failure. | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace SGEnviro.Utilities
{
public class NumberParseException : Exception
{
public NumberParseException(string message) { }
}
public class Parsing
{
public static v... | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace SGEnviro.Utilities
{
public class NumberParseException : Exception
{
public NumberParseException(string message) { }
}
public class Parsing
{
public static v... |
Add max length to parrot | using System;
using System.Collections.Generic;
namespace WendySharp
{
class Parrot : Command
{
public Parrot()
{
Match = new List<string>
{
"parrot"
};
Usage = "<text>";
ArgumentMatch = "(?<text>.+)$";
Hel... | using System;
using System.Collections.Generic;
namespace WendySharp
{
class Parrot : Command
{
public Parrot()
{
Match = new List<string>
{
"parrot"
};
Usage = "<text>";
ArgumentMatch = "(?<text>.+)$";
Hel... |
Disable Raven's Embedded HTTP server | using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using Raven.Client;
using Raven.Client.Embedded;
namespace CGO.Web.NinjectModules
{
public class RavenModule : NinjectModule
{
public override void Load()
{
Kernel.Bind<IDocumentStore>().ToMethod(_ => InitialiseDocume... | using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using Raven.Client;
using Raven.Client.Embedded;
namespace CGO.Web.NinjectModules
{
public class RavenModule : NinjectModule
{
public override void Load()
{
Kernel.Bind<IDocumentStore>().ToMethod(_ => InitialiseDocume... |
Use for loop to avoid nested unregister case | // 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.Statistics;
using System;
using System.Collections.Generic;
using osu.Framework.Audio;
namespace osu.Framework.Threading
{
public class AudioThr... | // 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.Statistics;
using System;
using System.Collections.Generic;
using osu.Framework.Audio;
namespace osu.Framework.Threading
{
public class AudioThr... |
Add BGP and BMP message lengths to JSON | using System.Collections.Generic;
namespace BmpListener.Serialization.Models
{
public class UpdateModel
{
public PeerHeaderModel Peer { get; set; }
public string Origin { get; set; }
public IList<int> AsPath { get; set; }
public IList<AnnounceModel> Announce { get; set; }
... | using System.Collections.Generic;
namespace BmpListener.Serialization.Models
{
public class UpdateModel
{
public int BmpMsgLength { get; set; }
public int BgpMsgLength { get; set; }
public PeerHeaderModel Peer { get; set; }
public string Origin { get; set; }
public ILis... |
Fix "double question mark" bug in UriBuilder | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Raven.Contrib.AspNet.Demo.Extensions
{
public static class UriExtensions
{
public static Uri AddQueryParameter(this Uri uri, KeyValuePair<string, string> pair)
{
return uri.AddQueryParame... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Raven.Contrib.AspNet.Demo.Extensions
{
public static class UriExtensions
{
public static Uri AddQueryParameter(this Uri uri, KeyValuePair<string, string> pair)
{
return uri.AddQueryParame... |
Increase length of benchmark algorithm | using System.Collections.Generic;
using System.Linq;
using QuantConnect.Data;
namespace QuantConnect.Algorithm.CSharp.Benchmarks
{
public class EmptyMinute400EquityAlgorithm : QCAlgorithm
{
public override void Initialize()
{
SetStartDate(2015, 09, 28);
SetEndDate(2015,... | using System.Collections.Generic;
using System.Linq;
using QuantConnect.Data;
namespace QuantConnect.Algorithm.CSharp.Benchmarks
{
public class EmptyMinute400EquityAlgorithm : QCAlgorithm
{
public override void Initialize()
{
SetStartDate(2015, 09, 28);
SetEndDate(2015,... |
Use new author var for posts too | <?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text"><?cs var:title ?></title>
<subtitle type="text"><?cs var:title ?></subtitle>
<id><?cs var:url ?>/</id>
<link rel="self" href="<?cs var:url ?><?cs var:CGI.RequestURI ?>" />
<link rel="alternate" type="text/html" hre... | <?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text"><?cs var:title ?></title>
<subtitle type="text"><?cs var:title ?></subtitle>
<id><?cs var:url ?>/</id>
<link rel="self" href="<?cs var:url ?><?cs var:CGI.RequestURI ?>" />
<link rel="alternate" type="text/html" hre... |
Change to show alert if Secrets.cs is not edited | using System;
using Prism.Mvvm;
using Prism.Navigation;
using Reactive.Bindings;
namespace BlueMonkey.ViewModels
{
/// <summary>
/// ViewModel for MainPage.
/// </summary>
public class MainPageViewModel : BindableBase
{
/// <summary>
/// NavigationService
/// </summary>
... | using System;
using Prism.Mvvm;
using Prism.Navigation;
using Prism.Services;
using Reactive.Bindings;
namespace BlueMonkey.ViewModels
{
/// <summary>
/// ViewModel for MainPage.
/// </summary>
public class MainPageViewModel : BindableBase
{
/// <summary>
/// NavigationService
... |
Use newly created vector object | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool
// Changes to this file will be lost if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using ... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool
// Changes to this file will be lost if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using ... |
Test fix for appveyor CS0840 | using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace ZendeskApi_v2.Models.Targets
{
public class BaseTarget
{
[JsonProperty("id")]
public long? Id { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("type")... | using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace ZendeskApi_v2.Models.Targets
{
public class BaseTarget
{
[JsonProperty("id")]
public long? Id { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("type")... |
Fix issue of file opened via Finder doesn't always display. | using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using NLog;
using Radish.Support;
using System.IO;
namespace Radish
{
public partial class AppDelegate : NSApplicationDelegate
{
private static Logger logger = LogManager.GetCurrentClassLogger();
MainW... | using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using NLog;
using Radish.Support;
using System.IO;
namespace Radish
{
public partial class AppDelegate : NSApplicationDelegate
{
private static Logger logger = LogManager.GetCurrentClassLogger();
priva... |
Add action type for status | using System.Xml.Serialization;
namespace DevelopmentInProgress.DipState
{
public enum DipStateActionType
{
[XmlEnum("1")]
Entry,
[XmlEnum("2")]
Exit
}
}
| using System.Xml.Serialization;
namespace DevelopmentInProgress.DipState
{
public enum DipStateActionType
{
[XmlEnum("1")]
Status,
[XmlEnum("2")]
Entry,
[XmlEnum("3")]
Exit
}
}
|
Test target framework written as expected (characterise current lack of validation) | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Moq;
using NuGet.Common;
using NuGet.Extensions.Nuspec;
using NUnit.Framework;
namespace NuGet.Extensions.Tests.Nuspec
{
[TestFixture]
public class NuspecBuilderTests
{
[Test]
publi... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Moq;
using NuGet.Common;
using NuGet.Extensions.Nuspec;
using NuGet.Extensions.Tests.MSBuild;
using NUnit.Framework;
namespace NuGet.Extensions.Tests.Nuspec
{
[TestFixture]
public class NuspecBuilderTe... |
Fix bug in fixture with unescaped underscore in username | using System;
using System.Linq;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
namespace Telegram.Bot.Tests.Integ.Framework
{
internal static class Extensions
{
public static User GetUser(this Update update)
{
switch (update.Type)
{
case Updat... | using System;
using System.Linq;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
namespace Telegram.Bot.Tests.Integ.Framework
{
internal static class Extensions
{
public static User GetUser(this Update update)
{
switch (update.Type)
{
case Updat... |
Improve network game object detection codes | using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Networking;
public static class UnityUtils
{
public static bool IsAnyKeyUp(KeyCode[] keys)
{
foreach (KeyCode key in keys)
{
if (Input.GetKeyUp(key))
return true;
}
return false;
}
... | using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Networking;
public static class UnityUtils
{
public static bool IsAnyKeyUp(KeyCode[] keys)
{
foreach (KeyCode key in keys)
{
if (Input.GetKeyUp(key))
return true;
}
return false;
}
... |
Change samples to use PostApplicationStart instead of pre. | using System;
using System.Diagnostics;
using System.Threading;
using System.Web.Routing;
using SignalR.Hosting.AspNet.Routing;
using SignalR.Samples.App_Start;
using SignalR.Samples.Hubs.DemoHub;
[assembly: WebActivator.PreApplicationStartMethod(typeof(Startup), "Start")]
namespace SignalR.Samples.App_Start
{
p... | using System;
using System.Diagnostics;
using System.Threading;
using System.Web.Routing;
using SignalR.Hosting.AspNet.Routing;
using SignalR.Samples.App_Start;
using SignalR.Samples.Hubs.DemoHub;
[assembly: WebActivator.PostApplicationStartMethod(typeof(Startup), "Start")]
namespace SignalR.Samples.App_Start
{
... |
Remove range constraint in destiny tuner | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JLChnToZ.LuckyPlayer {
public class DestinyTuner<T> {
static DestinyTuner<T> defaultInstance;
public static DestinyTuner<T> Default {
get {
if(d... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JLChnToZ.LuckyPlayer {
public class DestinyTuner<T> {
static DestinyTuner<T> defaultInstance;
public static DestinyTuner<T> Default {
get {
if(d... |
Make model to text asset so it can be loaded just like everything else | using System;
using System.Collections.Generic;
using UnityEngine;
using CNTK;
using UnityEngine.Events;
using System.Threading;
using UnityEngine.Assertions;
namespace UnityCNTK
{
/// <summary>
/// the non-generic base class for all model
/// only meant to be used for model management and GUI s... | using System;
using System.Collections.Generic;
using UnityEngine;
using CNTK;
using UnityEngine.Events;
using System.Threading;
using UnityEngine.Assertions;
namespace UnityCNTK
{
/// <summary>
/// the non-generic base class for all model
/// only meant to be used for model management and GUI s... |
Build script, no dep on branch for now | public class BuildConfig
{
private const string Version = "0.3.0";
public readonly string SrcDir = "./src/";
public readonly string OutDir = "./build/";
public string Target { get; private set; }
public string SemVer { get; private set; }
public string BuildProfile { get; private set; ... | public class BuildConfig
{
private const string Version = "0.4.0";
private const bool IsPreRelease = true;
public readonly string SrcDir = "./src/";
public readonly string OutDir = "./build/";
public string Target { get; private set; }
public string SemVer { get; private set; }
pub... |
Fix crash on super high bpm kiai sections | // 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.Audio.Track;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.Contain... | // 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.Audio.Track;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Gr... |
Add whitespace to type enum definitions | using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public string Middle... | using System.Collections.Generic;
using System.Net.Mail;
namespace StressMeasurementSystem.Models
{
public class Patient
{
#region Structs
public struct Name
{
public string Prefix { get; set; }
public string First { get; set; }
public string Middle... |
Fix incorrect default value in interface. | //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
namespace osu.Framework.Graphics.Transformations
{
public interface ITransform
{
double Duration { get; }
bool ... | //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
namespace osu.Framework.Graphics.Transformations
{
public interface ITransform
{
double Duration { get; }
bool ... |
Fix typo in exception message | namespace CommonDomain.Core
{
using System.Globalization;
internal static class ExtensionMethods
{
public static string FormatWith(this string format, params object[] args)
{
return string.Format(CultureInfo.InvariantCulture, format ?? string.Empty, args);
}
public static void ThrowHandlerNotFound(this ... | namespace CommonDomain.Core
{
using System.Globalization;
internal static class ExtensionMethods
{
public static string FormatWith(this string format, params object[] args)
{
return string.Format(CultureInfo.InvariantCulture, format ?? string.Empty, args);
}
public static void ThrowHandlerNotFound(this ... |
Change the switch to set/update key to "/newkey:" | using System;
using System.IO;
using System.Linq;
using System.Reflection;
namespace PCSBingMapKeyManager
{
class Program
{
private const string NewKeySwitch = "/a:";
static void Main(string[] args)
{
if (args.Length > 1 || args.Any() && !args[0].StartsWith(NewKeySwitch))
... | using System;
using System.IO;
using System.Linq;
using System.Reflection;
namespace PCSBingMapKeyManager
{
class Program
{
private const string NewKeySwitch = "/newkey:";
static void Main(string[] args)
{
if (args.Length > 1 || args.Any() && !args[0].StartsWith(NewKeySwit... |
Use NaturalStringComparer to compare titles | using NMaier.sdlna.Server;
namespace NMaier.sdlna.FileMediaServer.Comparers
{
class TitleComparer : IItemComparer
{
public virtual string Description
{
get { return "Sort alphabetically"; }
}
public virtual string Name
{
get { return "title"; }
}
public virtual int Com... | using System;
using System.Collections;
using NMaier.sdlna.Server;
using NMaier.sdlna.Util;
namespace NMaier.sdlna.FileMediaServer.Comparers
{
class TitleComparer : IItemComparer, IComparer
{
private static StringComparer comp = new NaturalStringComparer();
public virtual string Description
{
get... |
Make IEnumerable.IsNullOrEmpty extension method generic | //
// EnumerableExtensions.cs
//
// Author:
// Roman M. Yagodin <roman.yagodin@gmail.com>
//
// Copyright (c) 2016 Roman M. Yagodin
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software F... | //
// EnumerableExtensions.cs
//
// Author:
// Roman M. Yagodin <roman.yagodin@gmail.com>
//
// Copyright (c) 2016 Roman M. Yagodin
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software F... |
Update MarkdownSnippets API to use new DirectoryMarkdownProcessor | using MarkdownSnippets;
using Xunit;
public class DocoUpdater
{
[Fact]
public void Run()
{
GitHubMarkdownProcessor.RunForFilePath();
}
} | using MarkdownSnippets;
using Xunit;
public class DocoUpdater
{
[Fact]
public void Run()
{
DirectoryMarkdownProcessor.RunForFilePath();
}
} |
Return result when dispatch a command | using Bartender.Tests.Context;
using Moq;
using Xunit;
namespace Bartender.Tests
{
public class AsyncCommandDispatcherTests : DispatcherTests
{
[Fact]
public async void ShouldHandleCommandOnce_WhenCallDispatchAsyncMethod()
{
await AsyncCommandDispatcher.DispatchAsync<Command... | using Bartender.Tests.Context;
using Moq;
using Shouldly;
using Xunit;
namespace Bartender.Tests
{
public class AsyncCommandDispatcherTests : DispatcherTests
{
[Fact]
public async void ShouldHandleCommandOnce_WhenCallDispatchAsyncMethod()
{
await AsyncCommandDispatcher.Dispa... |
Load comparer assembly from bytes | using System;
using System.IO;
using System.Reflection;
namespace Blueprint41.Modeller.Schemas
{
public abstract class DatastoreModelComparer
{
static public DatastoreModelComparer Instance { get { return instance.Value; } }
static private Lazy<DatastoreModelComparer> instance = new Lazy<Datas... | using System;
using System.IO;
using System.Linq;
using System.Reflection;
namespace Blueprint41.Modeller.Schemas
{
public abstract class DatastoreModelComparer
{
public static DatastoreModelComparer Instance { get { return instance.Value; } }
private static Lazy<DatastoreModelComparer> instan... |
Use MSBuild for Build and Pack | using System.Xml.Linq;
var target = Argument<string>("target", "Default");
var configuration = Argument<string>("configuration", "Release");
var projectName = "WeakEvent";
var libraryProject = $"./{projectName}/{projectName}.csproj";
var testProject = $"./{projectName}.Tests/{projectName}.Tests.csproj";
var outDir = ... | using System.Xml.Linq;
var target = Argument<string>("target", "Default");
var configuration = Argument<string>("configuration", "Release");
var projectName = "WeakEvent";
var solution = $"{projectName}.sln";
var libraryProject = $"./{projectName}/{projectName}.csproj";
var testProject = $"./{projectName}.Tests/{proj... |
Fix formatting / usings 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.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Framework.Platform;
namespace osu.Framework.Tests.Visual.Plat... | // 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.Bindables;
using osu.Framework.Platform;
namespace osu.Framework.Tests.Visual.Platform
{
public class TestSceneAl... |
Set default values for filter model | namespace Interapp.Services.Common
{
public class FilterModel
{
public string OrderBy { get; set; }
public string Order { get; set; }
public int Page { get; set; }
public int PageSize { get; set; }
public string Filter { get; set; }
}
}
| namespace Interapp.Services.Common
{
public class FilterModel
{
public FilterModel()
{
this.Page = 1;
this.PageSize = 10;
}
public string OrderBy { get; set; }
public string Order { get; set; }
public int Page { get; set; }
... |
Use XUnit v2 runner in Cake instead of XUnit v1 | #tool "nuget:?package=xunit.runners&version=1.9.2"
var config = Argument("configuration", "Release");
var runEnvironment = Argument("runenv", "local");
var buildDir = Directory("./Titan/bin/") + Directory(config);
var testDir = Directory("./TitanTest/bin/") + Directory(config);
Task("Clean")
.Does(() =>
{
Cl... | #tool "nuget:?package=xunit.runner.console"
var config = Argument("configuration", "Release");
var runEnvironment = Argument("runenv", "local");
var buildDir = Directory("./Titan/bin/") + Directory(config);
var testDir = Directory("./TitanTest/bin/") + Directory(config);
Task("Clean")
.Does(() =>
{
CleanDire... |
Increase toleranceSeconds in SafeWait_Timeout test | using System;
using System.Threading;
using NUnit.Framework;
namespace Atata.WebDriverExtras.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.None)]
public class SafeWaitTests
{
private SafeWait<object> wait;
[SetUp]
public void SetUp()
{
wait = new Safe... | using System;
using System.Threading;
using NUnit.Framework;
namespace Atata.WebDriverExtras.Tests
{
[TestFixture]
[Parallelizable(ParallelScope.None)]
public class SafeWaitTests
{
private SafeWait<object> wait;
[SetUp]
public void SetUp()
{
wait = new Safe... |
Add IsDependent and GuardianId to patient profile | #region Copyright
// Copyright 2016 SnapMD, Inc.
// 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 ap... | #region Copyright
// Copyright 2016 SnapMD, Inc.
// 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 ap... |
Make parallax container work with global mouse state (so it ignores bounds checks). | using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics;
using osu.Framework.Input;
using OpenTK;
using osu.Framework;
using osu.Framework.Allocation;
namespace osu.Game.Graphics.Containers
{
class ParallaxContainer : Container
{
public float ParallaxAmount = 0.02f;
... | using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics;
using osu.Framework.Input;
using OpenTK;
using osu.Framework;
using osu.Framework.Allocation;
namespace osu.Game.Graphics.Containers
{
class ParallaxContainer : Container
{
public float ParallaxAmount = 0.02f;
... |
Reorder screen tab control items | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
namespace osu.Game.Screens.Edit.Screens
{
public enum EditorScreenMode
{
[Description("compose")]
Compos... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
namespace osu.Game.Screens.Edit.Screens
{
public enum EditorScreenMode
{
[Description("setup")]
SongSetu... |
Update metadata resource to use callback instead of console.log | using System.Collections.Generic;
using System.Linq;
using Glimpse.Core2.Extensibility;
using Glimpse.Core2.Framework;
using Glimpse.Core2.ResourceResult;
namespace Glimpse.Core2.Resource
{
public class Metadata : IResource
{
internal const string InternalName = "metadata.js";
private const int... | using System.Collections.Generic;
using System.Linq;
using Glimpse.Core2.Extensibility;
using Glimpse.Core2.Framework;
using Glimpse.Core2.ResourceResult;
namespace Glimpse.Core2.Resource
{
public class Metadata : IResource
{
internal const string InternalName = "metadata.js";
private const int... |
Fix "Countdown" widget "EndDateTime" read only | using System;
using DesktopWidgets.Classes;
namespace DesktopWidgets.Widgets.CountdownClock
{
public class Settings : WidgetClockSettingsBase
{
public DateTime EndDateTime { get; } = DateTime.Now;
}
} | using System;
using DesktopWidgets.Classes;
namespace DesktopWidgets.Widgets.CountdownClock
{
public class Settings : WidgetClockSettingsBase
{
public DateTime EndDateTime { get; set; } = DateTime.Now;
}
} |
Add default database names to connectionfactory.cs | using System;
using System.Data;
using System.IO;
namespace Tests.Daterpillar.Helper
{
public static class ConnectionFactory
{
public static IDbConnection CreateMySQLConnection(string database = null)
{
var connStr = new MySql.Data.MySqlClient.MySqlConnectionStringBuilder("");
... | using System;
using System.Data;
using System.IO;
namespace Tests.Daterpillar.Helper
{
public static class ConnectionFactory
{
public static IDbConnection CreateSQLiteConnection(string filePath = "")
{
if (!File.Exists(filePath))
{
filePath = Path.Combin... |
Fix test scene using local beatmap | // 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.Allocation;
using osu.Framework.Testing;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.IO.Archives;
using osu.G... | // 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.Allocation;
using osu.Framework.Testing;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.IO.Archives;
using osu.G... |
Fix potential crash in tests when attempting to lookup key bindings in cases the lookup is not available | // 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.Platform;
using osu.Framework.Testing;
namespace osu.Game.Configuration
{
[ExcludeFromDynamicCompile]
public class DevelopmentOsuConfigManage... | // 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.Platform;
using osu.Framework.Testing;
namespace osu.Game.Configuration
{
[ExcludeFromDynamicCompile]
public class DevelopmentOsuConfigManage... |
Change StatusUpdater job to run every hour. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Common.Log;
using CompetitionPlatform.Data.AzureRepositories.Log;
using Quartz;
using Quartz.Impl;
namespace CompetitionPlatform.ScheduledJobs
{
public static class JobScheduler
{
public static async... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Common.Log;
using CompetitionPlatform.Data.AzureRepositories.Log;
using Quartz;
using Quartz.Impl;
namespace CompetitionPlatform.ScheduledJobs
{
public static class JobScheduler
{
public static async... |
Fix new office name clearing after adding | using RealEstateAgencyFranchise.Database;
using Starcounter;
namespace RealEstateAgencyFranchise
{
partial class CorporationJson : Json
{
static CorporationJson()
{
DefaultTemplate.Offices.ElementType.InstanceType = typeof(AgencyOfficeJson);
}
void Handle(Input.Save... | using RealEstateAgencyFranchise.Database;
using Starcounter;
namespace RealEstateAgencyFranchise
{
partial class CorporationJson : Json
{
static CorporationJson()
{
DefaultTemplate.Offices.ElementType.InstanceType = typeof(AgencyOfficeJson);
}
void Handle(Input.Save... |
Apply SerializableAttribute to custom exception | using System;
namespace Silverpop.Client
{
public class TransactClientException : Exception
{
public TransactClientException()
{
}
public TransactClientException(string message)
: base(message)
{
}
public TransactClientException(string mess... | using System;
namespace Silverpop.Client
{
[Serializable]
public class TransactClientException : Exception
{
public TransactClientException()
{
}
public TransactClientException(string message)
: base(message)
{
}
public TransactClientEx... |
Use NDes.options for binarycache test executable | using System;
using System.Diagnostics;
using Dependencies.ClrPh;
namespace Dependencies
{
namespace Test
{
class Program
{
static void Main(string[] args)
{
// always the first call to make
Phlib.InitializePhLib();
// Re... | using System;
using System.Diagnostics;
using System.Collections.Generic;
using Dependencies.ClrPh;
using NDesk.Options;
namespace Dependencies
{
namespace Test
{
class Program
{
static void ShowHelp(OptionSet p)
{
Console.WriteLine("Usage: binarycache ... |
Make sure multi-line output works when invoked with <<...>> output templates. | using System.Collections.Generic;
using CuttingEdge.Conditions;
namespace ZimmerBot.Core
{
public class Request
{
public enum EventEnum { Welcome }
public string Input { get; set; }
public Dictionary<string, string> State { get; set; }
public string SessionId { get; set; }
p... | using System.Collections.Generic;
using CuttingEdge.Conditions;
namespace ZimmerBot.Core
{
public class Request
{
public enum EventEnum { Welcome }
public string Input { get; set; }
public Dictionary<string, string> State { get; set; }
public string SessionId { get; set; }
p... |
Fix : Un-Stealth rogues for this quest otherwise the mobs arent aggroed. | WoWUnit unit = ObjectManager.GetNearestWoWUnit(ObjectManager.GetWoWUnitByEntry(questObjective.Entry, questObjective.IsDead), questObjective.IgnoreNotSelectable, questObjective.IgnoreBlackList,
questObjective.AllowPlayerControlled);
if (unit.IsValid && unit.Position.DistanceTo(questObjective.Position) <=8)
{
Movemen... | WoWUnit unit = ObjectManager.GetNearestWoWUnit(ObjectManager.GetWoWUnitByEntry(questObjective.Entry, questObjective.IsDead), questObjective.IgnoreNotSelectable, questObjective.IgnoreBlackList,
questObjective.AllowPlayerControlled);
ObjectManager.Me.UnitAura(115191).TryCancel(); //Remove Stealth from rogue
if (unit.... |
Change indent to 2 spaces | using System;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
// char key = Console.ReadKey(true).KeyChar;
// var game = new Game("HANG THE MAN");
// bool wasCorrect = game.GuessLetter(key);
// Console.WriteLine(wasCorrect.ToString());
// var ou... | using System;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
// char key = Console.ReadKey(true).KeyChar;
// var game = new Game("HANG THE MAN");
// bool wasCorrect = game.GuessLetter(key);
// Console.WriteLine(wasCorrect.ToString());
// var ou... |
Add conditional business rule execution based on successful validation rule execution | using Peasy;
using Peasy.Core;
using Orders.com.BLL.DataProxy;
namespace Orders.com.BLL.Services
{
public abstract class OrdersDotComServiceBase<T> : BusinessServiceBase<T, long> where T : IDomainObject<long>, new()
{
public OrdersDotComServiceBase(IOrdersDotComDataProxy<T> dataProxy) : base(dataProxy... | using Peasy;
using Peasy.Core;
using Orders.com.BLL.DataProxy;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace Orders.com.BLL.Services
{
public abstract class OrdersDotComServiceBase<T> : BusinessServiceBase<T, long> where T... |
Remove trailing slashes when creating LZMAs | // 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.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Microsoft.DotNet.Archive;
namespace RepoTasks
{
public cla... | // 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.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Microsoft.DotNet.Archive;
namespace RepoTasks
{
public cla... |
Put custom uploaders in same dir as other plugins | using System;
using System.Diagnostics;
using System.IO;
namespace HolzShots.IO
{
public static class HolzShotsPaths
{
private static readonly string SystemAppDataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
private static readonly string UserPicturesDirecto... | using System;
using System.Diagnostics;
using System.IO;
namespace HolzShots.IO
{
public static class HolzShotsPaths
{
private static readonly string SystemAppDataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
private static readonly string UserPicturesDirecto... |
Check isLocal using Uri.TryCreate. It is possible in case we have only absolute url. | namespace Nancy.Extensions
{
using System;
using System.Linq;
/// <summary>
/// Containing extensions for the <see cref="Request"/> object
/// </summary>
public static class RequestExtensions
{
/// <summary>
/// An extension method making it easy to check if the ... | namespace Nancy.Extensions
{
using System;
using System.Linq;
/// <summary>
/// Containing extensions for the <see cref="Request"/> object
/// </summary>
public static class RequestExtensions
{
/// <summary>
/// An extension method making it easy to check if the ... |
Fix a dumb bug in the interface generator | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Refit.Generator
{
class Program
{
static void Main(string[] args)
{
var generator = new InterfaceStubGenerator();... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Refit.Generator
{
class Program
{
static void Main(string[] args)
{
// NB: @Compile passes us a list of files rel... |
Implement humanize test localization for current culture. | using System.Globalization;
using Abp.Configuration.Startup;
using Abp.Extensions;
using Abp.Logging;
namespace Abp.Localization
{
public static class LocalizationSourceHelper
{
public static string ReturnGivenNameOrThrowException(ILocalizationConfiguration configuration, string sourceName, string nam... | using System.Globalization;
using Abp.Configuration.Startup;
using Abp.Extensions;
using Abp.Logging;
namespace Abp.Localization
{
public static class LocalizationSourceHelper
{
public static string ReturnGivenNameOrThrowException(ILocalizationConfiguration configuration, string sourceName, string nam... |
Include id and title on package version history items. | using System;
using AspNet.WebApi.HtmlMicrodataFormatter;
namespace NuGet.Lucene.Web.Models
{
public class PackageVersionSummary
{
private readonly StrictSemanticVersion version;
private readonly DateTimeOffset lastUpdated;
private readonly int versionDownloadCount;
private read... | using System;
using AspNet.WebApi.HtmlMicrodataFormatter;
namespace NuGet.Lucene.Web.Models
{
public class PackageVersionSummary
{
private readonly string id;
private readonly string title;
private readonly StrictSemanticVersion version;
private readonly DateTimeOffset lastUpdat... |
Create private and public key when saving a new product | using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplicatio... | using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplicatio... |
Fix web request failing if password is null | // 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
{
... |
Fix fleet ship list not update | using DynamicData;
using DynamicData.Aggregation;
using ReactiveUI;
using Sakuno.ING.Game.Models;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
namespace Sakuno.ING.ViewModels.Homeport
{
public sealed class FleetViewModel : ReactiveObject, IHomeportTabViewModel
{
pub... | using DynamicData;
using DynamicData.Aggregation;
using DynamicData.Binding;
using ReactiveUI;
using Sakuno.ING.Game.Models;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
namespace Sakuno.ING.ViewModels.Homeport
{
public sealed class FleetViewModel : ReactiveObject, IHomeportTab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.