Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Use custom string comparer for RangeSortedDictionary | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsQuery.Implementation
{
public class TrueStringComparer : IComparer<string>, IEqualityComparer<string>
{
public int Compare(string x, string y)
{
int pos =... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsQuery.Implementation
{
public class TrueStringComparer : IComparer<string>, IEqualityComparer<string>
{
public int Compare(string x, string y)
{
int pos =... |
Add field names in returned tuple of EnumerateItemAndIfIsLast() | using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Sakuno.Collections
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class EnumerableExtensions
{
public static bool AnyNull<T>(this IEnumerable<T> source) where T : class
{
... | using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Sakuno.Collections
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class EnumerableExtensions
{
public static bool AnyNull<T>(this IEnumerable<T> source) where T : class
{
... |
Correct ordering of method arguments. | namespace OpenRealEstate.Services
{
public interface ITransmorgrifier
{
/// <summary>
/// Converts some given data into a listing instance.
/// </summary>
/// <param name="data">some data source, like Xml data or json data.</param>
/// <param name="isClearAllIsMo... | namespace OpenRealEstate.Services
{
public interface ITransmorgrifier
{
/// <summary>
/// Converts some given data into a listing instance.
/// </summary>
/// <param name="data">some data source, like Xml data or json data.</param>
/// <param name="areBadCharacte... |
Set default values to sync field attribute | using LiteNetLib;
using System;
namespace LiteNetLibManager
{
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class SyncFieldAttribute : Attribute
{
/// <summary>
/// Sending method type
/// </summary>
public DeliveryMethod deliveryM... | using LiteNetLib;
using System;
namespace LiteNetLibManager
{
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class SyncFieldAttribute : Attribute
{
/// <summary>
/// Sending method type
/// </summary>
public DeliveryMethod deliveryM... |
Fix Windows-style path separators not being migrated on Unix systems | using System;
using Microsoft.EntityFrameworkCore.Migrations;
using System.IO;
namespace osu.Game.Migrations
{
public partial class StandardizePaths : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
string sanitized = Path.DirectorySeparatorChar.ToString... | using System;
using Microsoft.EntityFrameworkCore.Migrations;
using System.IO;
namespace osu.Game.Migrations
{
public partial class StandardizePaths : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
string windowsStyle = @"\";
string standard... |
Add one overload for Nullable<T>.SelectMany. | // Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.
namespace Narvalo.Applicative
{
using System;
using Narvalo;
// Query Expression Pattern for nullables.
public static class Qullable
{
public static TResult? Select<TSource, TR... | // Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.
namespace Narvalo.Applicative
{
using System;
using Narvalo;
// Query Expression Pattern for nullables.
public static class Qullable
{
public static TResult? Select<TSource, TR... |
Add a comma to the MvcTurbine filters, which will prevent MvcTurbine from being included but not block out MvcTurbine.*. | namespace MvcTurbine.ComponentModel {
using System;
/// <summary>
/// Defines common assemblies to filter. These assemblies are:
/// System, mscorlib, Microsoft, WebDev, CppCodeProvider).
/// </summary>
[Serializable]
public class CommonAssemblyFilter : AssemblyFilter {
... | namespace MvcTurbine.ComponentModel {
using System;
/// <summary>
/// Defines common assemblies to filter. These assemblies are:
/// System, mscorlib, Microsoft, WebDev, CppCodeProvider).
/// </summary>
[Serializable]
public class CommonAssemblyFilter : AssemblyFilter {
... |
Fix issue with null values returned by Memory provider | using System.Collections.Generic;
using TechSmith.Hyde.Table.Azure;
namespace TechSmith.Hyde.Table.Memory
{
internal class DynamicMemoryQuery : AbstractMemoryQuery<dynamic>
{
public DynamicMemoryQuery( IEnumerable<GenericTableEntity> entities )
: base( entities )
{
}
private Dy... | using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using TechSmith.Hyde.Table.Azure;
namespace TechSmith.Hyde.Table.Memory
{
internal class DynamicMemoryQuery : AbstractMemoryQuery<dynamic>
{
public DynamicMemoryQuery( IEnumerable<GenericTableEntity> entit... |
Add trivial history programming to overlay window to clear each turn | using Hearthstone_Deck_Tracker;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace OptionsDisplay
{
class HearthWindow : InfoWindow
{
private HearthstoneTextBlock info;
public HearthWind... | using Hearthstone_Deck_Tracker;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace OptionsDisplay
{
class HearthWindow : InfoWindow
{
private HearthstoneTextBlock info;
public HearthWind... |
Remove unnecessary null coalescing operator | namespace NetIRC.Messages
{
public class PingMessage : IRCMessage, IServerMessage
{
public string Target { get; }
public PingMessage(ParsedIRCMessage parsedMessage)
{
Target = parsedMessage.Trailing ?? parsedMessage.Parameters[0];
}
}
}
| namespace NetIRC.Messages
{
public class PingMessage : IRCMessage, IServerMessage
{
public string Target { get; }
public PingMessage(ParsedIRCMessage parsedMessage)
{
Target = parsedMessage.Trailing;
}
}
}
|
Apply changes to AllowScreenSuspension bindable | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Diagnostics;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using os... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Platform;
nam... |
Use float instead of int | using System;
namespace FalconUDP
{
internal static class FalconHelper
{
internal static unsafe void WriteFalconHeader(byte[] dstBuffer,
int dstIndex,
PacketType type,
SendOptions opts,
ushort seq,
ushort payloadSize)
{
... | using System;
namespace FalconUDP
{
internal static class FalconHelper
{
internal static unsafe void WriteFalconHeader(byte[] dstBuffer,
int dstIndex,
PacketType type,
SendOptions opts,
ushort seq,
ushort payloadSize)
{
... |
Change MembershipIdentity so it is not an abstract class. bugid: 153 | using System;
using System.Security.Principal;
using Csla.Serialization;
using System.Collections.Generic;
using Csla.Core.FieldManager;
using System.Runtime.Serialization;
using Csla.DataPortalClient;
using Csla.Silverlight;
using Csla.Core;
namespace Csla.Security
{
public abstract partial class Membe... | using System;
using System.Security.Principal;
using Csla.Serialization;
using System.Collections.Generic;
using Csla.Core.FieldManager;
using System.Runtime.Serialization;
using Csla.DataPortalClient;
using Csla.Silverlight;
using Csla.Core;
namespace Csla.Security
{
public partial class MembershipIden... |
Add missing enums for File purpose | namespace Stripe
{
public static class FilePurpose
{
public const string AdditionalVerification = "additional_verification";
public const string BusinessIcon = "business_icon";
public const string BusinessLogo = "business_logo";
public const string CustomerSignature = "custome... | namespace Stripe
{
public static class FilePurpose
{
public const string AccountRequirement = "account_requirement";
public const string AdditionalVerification = "additional_verification";
public const string BusinessIcon = "business_icon";
public const string BusinessLogo = "... |
Add disableOnPlay option to changeOrderInLayer | using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class ChangeOrderInLayer : MonoBehaviour
{
#pragma warning disable 0649
[SerializeField]
private Renderer _renderer;
[SerializeField]
private int orderInLayer;
#pragma warning restore 0649
void Start()
{
if (_renderer ... | using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class ChangeOrderInLayer : MonoBehaviour
{
[SerializeField]
private Renderer _renderer;
[SerializeField]
private int orderInLayer;
[SerializeField]
private string sortingLayer = "Default";
[SerializeField]
private ... |
Use Be instead of BeEquivalentTo | using FluentAssertions;
using FluentAssertions.Execution;
namespace Bearded.Utilities.Testing
{
public sealed class MaybeAssertions<T>
{
private readonly Maybe<T> subject;
public MaybeAssertions(Maybe<T> instance) => subject = instance;
[CustomAssertion]
public void Be... | using FluentAssertions;
using FluentAssertions.Execution;
namespace Bearded.Utilities.Testing
{
public sealed class MaybeAssertions<T>
{
private readonly Maybe<T> subject;
public MaybeAssertions(Maybe<T> instance) => subject = instance;
[CustomAssertion]
public void Be... |
Fix certificate generation not refreshing test | using System.Security.Cryptography.X509Certificates;
using NUnit.Framework;
using Procon.Service.Shared;
using Procon.Setup.Models;
namespace Procon.Setup.Test.Models {
[TestFixture]
public class CertificateModelTest {
/// <summary>
/// Tests a certificate will be generated and can be read by ... | using System.Security.Cryptography.X509Certificates;
using NUnit.Framework;
using Procon.Service.Shared;
using Procon.Setup.Models;
namespace Procon.Setup.Test.Models {
[TestFixture]
public class CertificateModelTest {
/// <summary>
/// Tests a certificate will be generated and can be read by ... |
Fix the help message of output_pattern | namespace BigEgg.Tools.JsonComparer.Parameters
{
using BigEgg.Tools.ConsoleExtension.Parameters;
[Command("split", "Split the big JSON file to multiple small files.")]
public class SplitParameter
{
[StringProperty("input", "i", "The path of JSON file to split.", Required = true)]
publi... | namespace BigEgg.Tools.JsonComparer.Parameters
{
using BigEgg.Tools.ConsoleExtension.Parameters;
[Command("split", "Split the big JSON file to multiple small files.")]
public class SplitParameter
{
[StringProperty("input", "i", "The path of JSON file to split.", Required = true)]
publi... |
Improve how much space we reserve for tag changes | using System.IO;
using System.Linq;
using SpotifyRecorder.Core.Abstractions.Entities;
using SpotifyRecorder.Core.Abstractions.Services;
using TagLib;
using TagLib.Id3v2;
using File = TagLib.File;
namespace SpotifyRecorder.Core.Implementations.Services
{
public class ID3TagService : IID3TagService
{
pu... | using System.IO;
using System.Linq;
using SpotifyRecorder.Core.Abstractions.Entities;
using SpotifyRecorder.Core.Abstractions.Services;
using TagLib;
using TagLib.Id3v2;
using File = TagLib.File;
namespace SpotifyRecorder.Core.Implementations.Services
{
public class ID3TagService : IID3TagService
{
pu... |
Remove extra char that sneaked onto XML comment | using System.Collections.Generic;
using Autofac.Core;
namespace Autofac
{
/// <summary>
/// The details of an individual request to resolve a service.
/// </summary>
public class ResolveRequest
{
/// <summary>
/// Initializes a new instance of the <see cref="ResolveRequest"/> class... | using System.Collections.Generic;
using Autofac.Core;
namespace Autofac
{
/// <summary>
/// The details of an individual request to resolve a service.
/// </summary>
public class ResolveRequest
{
/// <summary>
/// Initializes a new instance of the <see cref="ResolveRequest"/> class... |
Set RenderProcessMessageHandler and LoadHandler to null on Dispose Reoder so they match the order in IWebBrowser so they're easier to compare | // Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using CefSharp.Internals;
namespace CefSharp
{
internal static class InternalWebBrowserExtensions
{
internal static void SetHandl... | // Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using CefSharp.Internals;
namespace CefSharp
{
internal static class InternalWebBrowserExtensions
{
internal static void SetHandl... |
Fix revision number of support libraries to 0 | /*
Copyright 2015 Google 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 applicable law or agreed to in writing, software
dist... | /*
Copyright 2015 Google 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 applicable law or agreed to in writing, software
dist... |
Stop filtering out stop words in package ids and titles. | using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
namespace NuGetGallery
{
public class PerFieldAnalyzer : PerFieldAnalyzerWrapper
{
public PerFieldAnalyzer()
: base(new StandardAnalyzer... | using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
namespace NuGetGallery
{
public class PerFieldAnalyzer : PerFieldAnalyzerWrapper
{
public PerFieldAnalyzer()
: base(new StandardAnalyzer... |
Implement transform to tree for option as skeleton only | using slang.Lexing.Rules.Extensions;
using slang.Lexing.Trees.Nodes;
namespace slang.Lexing.Trees.Transformers
{
public static class OptionRuleExtensions
{
public static Node Transform (this Option rule, Node parent)
{
var option = rule.Value.Transform (parent);
return ... | using slang.Lexing.Rules.Extensions;
using slang.Lexing.Trees.Nodes;
namespace slang.Lexing.Trees.Transformers
{
public static class OptionRuleExtensions
{
public static Tree Transform (this Option rule, Node parent)
{
return new Tree ();
}
}
}
|
Test that finds members with "admin" in username now works when there's more than one. | using NUnit.Framework;
namespace VersionOne.SDK.APIClient.Tests.QueryTests
{
[TestFixture]
public class QueryFindTester
{
private EnvironmentContext _context;
[TestFixtureSetUp]
public void TestFixtureSetup()
{
_context = new EnvironmentContext();
}
... | using NUnit.Framework;
namespace VersionOne.SDK.APIClient.Tests.QueryTests
{
[TestFixture]
public class QueryFindTester
{
private EnvironmentContext _context;
[TestFixtureSetUp]
public void TestFixtureSetup()
{
_context = new EnvironmentContext();
}
... |
Mark field as const instead of static readonly | using System;
using System.IO;
using System.Windows;
using System.Windows.Threading;
using Pingy.Common;
namespace Pingy.Gui
{
public partial class App : Application
{
private readonly static string defaultDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
private re... | using System;
using System.IO;
using System.Windows;
using System.Windows.Threading;
using Pingy.Common;
namespace Pingy.Gui
{
public partial class App : Application
{
private static readonly string defaultDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
private co... |
Reposition taiko playfield to be closer to the top of the screen | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics;
using osu.Game.Rulesets.UI;
using osuTK;
namespace osu.Game.Rulesets.Taiko.UI
{
public class TaikoPlayfieldAdjustmentCont... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics;
using osu.Game.Rulesets.UI;
using osuTK;
namespace osu.Game.Rulesets.Taiko.UI
{
public class TaikoPlayfieldAdjustmentCont... |
Make the green slightly darker, so that the text is readable. | namespace NuGetPackageVisualizer
{
public class DgmlColorConfiguration : IColorConfiguration
{
public string VersionMismatchPackageColor
{
get { return "#FF0000"; }
}
public string PackageHasDifferentVersionsColor
{
get { return "#FCE4... | namespace NuGetPackageVisualizer
{
public class DgmlColorConfiguration : IColorConfiguration
{
public string VersionMismatchPackageColor
{
get { return "#FF0000"; }
}
public string PackageHasDifferentVersionsColor
{
get { return "#FCE4... |
Disable logging so the performance profiling is more accurate. | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Logging;
using Slp.Evi.Storage;
using Slp.Evi.Storage.Bootstrap;
using Slp.Evi.Storage.Database;
namespace Slp.Evi.Test.System.Sparql
{
public abstract class SparqlFixture
{
... | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Logging;
using Slp.Evi.Storage;
using Slp.Evi.Storage.Bootstrap;
using Slp.Evi.Storage.Database;
namespace Slp.Evi.Test.System.Sparql
{
public abstract class SparqlFixture
{
... |
Test can get by LINQ statement | using LazyLibrary.Storage;
using LazyLibrary.Storage.Memory;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Linq;
namespace LazyLibrary.Tests.Storage.Memory
{
[TestClass]
public class MemoryRepositoryTests
{
[TestMethod]
public void CanAdd()
{
... | using LazyLibrary.Storage;
using LazyLibrary.Storage.Memory;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Linq;
namespace LazyLibrary.Tests.Storage.Memory
{
[TestClass]
public class MemoryRepositoryTests
{
[TestMethod]
public void CanAdd()
{
... |
Add test explicitly checking recursion | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using NUnit.Framework.Constraints;
namespace NUnit.Framework.Api
{
[TestFixture]
public class NUnitIssue52
{
class SelfContainer : IEnumerable
{
public IEnumera... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using NUnit.Framework.Constraints;
namespace NUnit.Framework.Api
{
[TestFixture]
public class NUnitIssue52
{
[TestCaseSource(nameof(GetTestCa... |
Add docs re wrapped stream ownership |
namespace Serilog
{
using System.IO;
/// <summary>
/// Enables hooking into log file lifecycle events
/// </summary>
public abstract class FileLifecycleHooks
{
/// <summary>
/// Wraps <paramref name="sourceStream"/> in another stream, such as a GZipStream, then returns the wrap... |
namespace Serilog
{
using System.IO;
/// <summary>
/// Enables hooking into log file lifecycle events
/// </summary>
public abstract class FileLifecycleHooks
{
/// <summary>
/// Wraps <paramref name="underlyingStream"/> in another stream, such as a GZipStream, then returns the ... |
Raise authentication server prerelease version number. | using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("Affecto Authentication Server")]
[assembly: AssemblyProduct("Affecto Authentication Server")]
[assembly: AssemblyCompany("Affecto")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: A... | using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("Affecto Authentication Server")]
[assembly: AssemblyProduct("Affecto Authentication Server")]
[assembly: AssemblyCompany("Affecto")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: A... |
Move settings menu to the "Edit" category | /*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distrib... | /*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distrib... |
Refactor notification object and add methods for static property changed event | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace SnowyImageCopy.Common
{
public abstract class NotificationObject : INotifyPropert... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace SnowyImageCopy.Common
{
public abstract class NotificationObject : INotifyPropertyChanged
{
public event Pro... |
Allow multiple files on the command line. | // -----------------------------------------------------------------------
// <copyright file="Program.cs" company="(none)">
// Copyright © 2013 John Gietzen. All Rights Reserved.
// This source is subject to the MIT license.
// Please see license.txt for more information.
// </copyright>
// -------------------... | // -----------------------------------------------------------------------
// <copyright file="Program.cs" company="(none)">
// Copyright © 2013 John Gietzen. All Rights Reserved.
// This source is subject to the MIT license.
// Please see license.txt for more information.
// </copyright>
// -------------------... |
Make var name more descriptive | using UnityEngine;
using System.Collections;
using ArabicSupport;
public class FixArabic3DText : MonoBehaviour {
public bool showTashkeel = true;
public bool useHinduNumbers = true;
// Use this for initialization
void Start () {
TextMesh textMesh = gameObject.GetComponent<TextMesh>();
... | using UnityEngine;
using System.Collections;
using ArabicSupport;
public class FixArabic3DText : MonoBehaviour {
public bool showTashkeel = true;
public bool useHinduNumbers = true;
// Use this for initialization
void Start () {
TextMesh textMesh = gameObject.GetComponent<TextMesh>();
... |
Rename file to .css for new stream | using PvcCore;
using System.Collections.Generic;
using System.IO;
namespace PvcPlugins
{
public class PvcLess : PvcPlugin
{
public override string[] SupportedTags
{
get
{
return new string[] { ".less" };
}
}
public override I... | using PvcCore;
using System.Collections.Generic;
using System.IO;
namespace PvcPlugins
{
public class PvcLess : PvcPlugin
{
public override string[] SupportedTags
{
get
{
return new string[] { ".less" };
}
}
public override I... |
Replace reflection to call API. | using System.Linq;
using System.Reflection;
namespace Abp.Reflection
{
public static class ProxyHelper
{
/// <summary>
/// Returns dynamic proxy target object if this is a proxied object, otherwise returns the given object.
/// </summary>
public static object UnProxy(object ob... | using Castle.DynamicProxy;
namespace Abp.Reflection
{
public static class ProxyHelper
{
/// <summary>
/// Returns dynamic proxy target object if this is a proxied object, otherwise returns the given object.
/// </summary>
public static object UnProxy(object obj)
{
... |
Change the default font for the header. | using System;
using System.Drawing;
namespace DrawIt
{
public static class FontHelpers
{
public static Font GetHeaderFont()
{
float fontSize = Configuration.GetSettingOrDefault<float>(Constants.Application.Header.FontSize, float.TryParse, Constants.Application.Defaults.HeaderTextSi... | using System;
using System.Drawing;
namespace DrawIt
{
public static class FontHelpers
{
public static Font GetHeaderFont()
{
float fontSize = Configuration.GetSettingOrDefault<float>(Constants.Application.Header.FontSize, float.TryParse, Constants.Application.Defaults.HeaderTextSi... |
Fix to not use a test filter in NUnit when no filters has been declared in Giles. This was causing NUnit to not run the tests | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Giles.Core.Runners;
using Giles.Core.Utility;
using NUnit.Core;
using NUnit.Core.Filters;
namespace Giles.Runner.NUnit
{
public class NUnitRunner : IFrameworkRunner
{
IEnumerable<string> filte... | using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Giles.Core.Runners;
using NUnit.Core;
using NUnit.Core.Filters;
namespace Giles.Runner.NUnit
{
public class NUnitRunner : IFrameworkRunner
{
IEnumerable<string> filters;
public SessionResults RunAs... |
Use name only for reporting missing file | using System.Collections.Generic;
using System.Linq;
namespace Arkivverket.Arkade.Core.Base
{
public class ArchiveXmlUnit
{
public ArchiveXmlFile File { get; }
public List<ArchiveXmlSchema> Schemas { get; }
public ArchiveXmlUnit(ArchiveXmlFile file, List<ArchiveXmlSchema> schemas)
... | using System.Collections.Generic;
using System.Linq;
namespace Arkivverket.Arkade.Core.Base
{
public class ArchiveXmlUnit
{
public ArchiveXmlFile File { get; }
public List<ArchiveXmlSchema> Schemas { get; }
public ArchiveXmlUnit(ArchiveXmlFile file, List<ArchiveXmlSchema> schemas)
... |
Tweak for .net Standard 1.1 compatibility | using System;
using System.ComponentModel;
using System.Reflection;
namespace MarkEmbling.Utils.Extensions {
public static class EnumExtensions {
/// <summary>
/// Gets the description of a field in an enumeration. If there is no
/// description attribute, the raw name of the field is prov... | using System;
using System.ComponentModel;
using System.Reflection;
namespace MarkEmbling.Utils.Extensions {
public static class EnumExtensions {
/// <summary>
/// Gets the description of a field in an enumeration. If there is no
/// description attribute, the raw name of the field is prov... |
Test receive and send message | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Vikekh.Stepbot
{
class Program
{
static void Main(string[] args)
{
}
}
}
| using SlackAPI;
using System;
using System.Threading;
namespace Vikekh.Stepbot
{
class Program
{
static void Main(string[] args)
{
var botAuthToken = "";
var userAuthToken = "";
var name = "@stepdot";
var age = (new DateTime(2017, 1, 18) - DateTime.Now).Days / 365.0;
var ageString ... |
Add additional functional test cases. | using System;
using System.Collections.Generic;
using TimeSeries;
using TimeSeriesService.Client.TimeSeriesReference;
namespace TimeSeriesService.Client
{
class Program
{
static void Main()
{
var proxy = new TimeSeriesServiceClient();
var oneDataPoint = new List<DataPoi... | using System;
using System.Collections.Generic;
using TimeSeries;
using TimeSeriesService.Client.TimeSeriesReference;
namespace TimeSeriesService.Client
{
class Program
{
static void Main()
{
var proxy = new TimeSeriesServiceClient();
var oneDataPoint = new List<DataPoi... |
Remove redundant LINQ method call | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Thinktecture.IdentityServer.Core.Services;
namespace Thinktecture.IdentityServer.Core.EntityFramework
{
public class ScopeStore : IScopeStore
{
private readonly string _connectionString;
public ScopeStore... | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Thinktecture.IdentityServer.Core.Services;
namespace Thinktecture.IdentityServer.Core.EntityFramework
{
public class ScopeStore : IScopeStore
{
private readonly string _connectionString;
public ScopeStore... |
Fix small offset in low quality minimap image | namespace Mappy.Util.ImageSampling
{
using System.Drawing;
public class NearestNeighbourWrapper : IPixelImage
{
private readonly IPixelImage source;
public NearestNeighbourWrapper(IPixelImage source, int width, int height)
{
this.source = source;
... | namespace Mappy.Util.ImageSampling
{
using System.Drawing;
public class NearestNeighbourWrapper : IPixelImage
{
private readonly IPixelImage source;
public NearestNeighbourWrapper(IPixelImage source, int width, int height)
{
this.source = source;
... |
Fix stress test not creating v2 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NiceIO;
using NUnit.Framework;
using SaferMutex.Tests.BaseSuites;
namespace SaferMutex.Tests.FileBased
{
[TestFixture]
public class ThreadedStressTestsV2 : BaseThreadedStressTests
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NiceIO;
using NUnit.Framework;
using SaferMutex.Tests.BaseSuites;
namespace SaferMutex.Tests.FileBased
{
[TestFixture]
public class ThreadedStressTestsV2 : BaseThreadedStressTests
{
... |
Change ApiKey to AppId add RequireApiAuthToken | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Hanc.AspNetAPI
{
/// <summary>
/// The options pattern uses custom options classes to represent a group of related settings.
/// See Startup.cs and ValuesController.cs for implimentation code
///... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Hanc.AspNetAPI
{
/// <summary>
/// The options pattern uses custom options classes to represent a group of related settings.
/// See Startup.cs and ValuesController.cs for implimentation code
///... |
Make the designer work in the sandbox project. | using Avalonia;
namespace Sandbox
{
public class Program
{
static void Main(string[] args)
{
AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace()
.StartWithClassicDesktopLifetime(args);
}
}
}
| using Avalonia;
namespace Sandbox
{
public class Program
{
static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
public static AppBuilder BuildAvaloniaApp() =>
AppBuilder.Configure<App>()
.UsePlatformDetect()
... |
Add GET All Names endpoint | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
using DataReader.BusinessLogic;
using DataReader.Models;
namespace DataReader.Controllers
{
[RoutePrefix("api")]
public class NameQueryController : ApiCon... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
using DataReader.BusinessLogic;
using DataReader.Models;
namespace DataReader.Controllers
{
[RoutePrefix("api")]
public class NameQueryController : ApiCon... |
Add TODO on fake CallNumber | using System;
using System.Linq;
using Microsoft.Practices.ObjectBuilder2;
namespace SignInCheckIn.Models.DTO
{
public class ParticipantDto
{
public int EventParticipantId { get; set; }
public int ParticipantId { get; set; }
public int ContactId { get; set; }
public int Househo... | using System;
using System.Linq;
using Microsoft.Practices.ObjectBuilder2;
namespace SignInCheckIn.Models.DTO
{
public class ParticipantDto
{
public int EventParticipantId { get; set; }
public int ParticipantId { get; set; }
public int ContactId { get; set; }
public int Househo... |
Improve TCP reading code to read more than 4096 bytes if available | using MultiMiner.Xgminer.Api.Parsers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace MultiMiner.Xgminer.Api
{
public class ApiContext
{
private TcpClient tcpClient;
public ApiContext(int po... | using MultiMiner.Xgminer.Api.Parsers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace MultiMiner.Xgminer.Api
{
public class ApiContext
{
private TcpClient tcpClient;
public ApiContext(int po... |
Add Rotate methods contributed by CLA signers | namespace Mapsui;
public class MPoint2
{
public double X { get; set; }
public double Y { get; set; }
}
| using Mapsui.Utilities;
namespace Mapsui;
public class MPoint2
{
public double X { get; set; }
public double Y { get; set; }
/// <summary>
/// Calculates a new point by rotating this point clockwise about the specified center point
/// </summary>
/// <param name="degrees">Angle to rotate... |
Update the version number to 1.4.0 | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="Version.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complianc... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="Version.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complianc... |
Check background job worker before using that in jobs info controller | using System;
using System.Threading;
using System.Threading.Tasks;
using Bit.Core.Contracts;
using Bit.Core.Models;
using Bit.Model.Dtos;
namespace Bit.OData.ODataControllers
{
public class JobsInfoController : DtoController<JobInfoDto>
{
public virtual IBackgroundJobWorker BackgroundJobWorker { get;... | using Bit.Core.Contracts;
using Bit.Core.Models;
using Bit.Model.Dtos;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Bit.OData.ODataControllers
{
public class JobsInfoController : DtoController<JobInfoDto>
{
public virtual IBackgroundJobWorker BackgroundJobWorker { get;... |
Add xml comment on namespace. | using System.Windows;
namespace Kinugasa.UI
{
/// <summary>
/// Proxy class for binding sorce.
/// </summary>
public class BindingProxy : Freezable
{
/// <summary>
/// Define dependencyProperty.
/// </summary>
public static readonly DependencyProperty DataProperty =... | using System.Windows;
/// <summary>
/// Provide userinterface components.
/// </summary>
namespace Kinugasa.UI
{
/// <summary>
/// Proxy class for binding sorce.
/// </summary>
public class BindingProxy : Freezable
{
/// <summary>
/// Define dependencyProperty.
/// </summar... |
Check IsTogglePatternAvailable insted of using ControlType | namespace Winium.Desktop.Driver.CommandExecutors
{
#region using
using System.Windows.Automation;
using Winium.Cruciatus.Extensions;
using Winium.StoreApps.Common;
#endregion
internal class IsElementSelectedExecutor : CommandExecutorBase
{
#region Methods
protected over... | namespace Winium.Desktop.Driver.CommandExecutors
{
#region using
using System.Windows.Automation;
using Winium.Cruciatus.Exceptions;
using Winium.Cruciatus.Extensions;
using Winium.StoreApps.Common;
#endregion
internal class IsElementSelectedExecutor : CommandExecutorBase
{
... |
Update AssemblyInfo to reference Couchbase as owner / copyright | using System.Runtime.InteropServices;
using System.Reflection;
#if DEBUG
[assembly: AssemblyProduct("MeepMeep (Debug)")]
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyProduct("MeepMeep (Release)")]
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyDescription("MeepMeep - A ... | using System.Reflection;
#if DEBUG
[assembly: AssemblyProduct("MeepMeep (Debug)")]
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyProduct("MeepMeep (Release)")]
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyDescription("MeepMeep - A super simple workload utility for the ... |
Update catalog list item style | @model List<Catalog>
<div class="am-panel-hd">Catalog</div>
<div class="am-panel-bd">
@foreach (var catalog in Model)
{
<a asp-controller="Home" asp-action="Catalog" asp-route-title="@catalog.Url">
@catalog.Title
<span class="am-badge am-badge-secondary am-round">@catalog.Posts... | @model List<Catalog>
<div class="am-panel-hd">Catalog</div>
<div class="am-panel-bd">
@foreach (var catalog in Model)
{
<a asp-controller="Home" asp-action="Catalog" asp-route-title="@catalog.Url">
@catalog.Title
<span class="am-badge am-badge-success am-round">@catalog.Posts.C... |
Return whether the target has any dispellable debuff | using Buddy.Swtor.Objects;
namespace DefaultCombat.Extensions
{
public static class TorCharacterExtensions
{
public static bool ShouldDispel(this TorCharacter target, string debuffName)
{
if (target == null)
return false;
return target.HasDebuff(debuffN... | using System.Collections.Generic;
using System.Linq;
using Buddy.Swtor.Objects;
namespace DefaultCombat.Extensions
{
public static class TorCharacterExtensions
{
private static readonly IReadOnlyList<string> _dispellableDebuffs = new List<string>
{
"Hunting Trap",
"Burn... |
Use new ActionLink extension method. | @using Orchard.ContentManagement.MetaData.Models
@{
var containerId = (int) Model.ContainerId;
var itemContentTypes = (IList<ContentTypeDefinition>)Model.ItemContentTypes;
}
<div class="item-properties actions">
<p>
@Html.ActionLink(T("{0} Properties", Html.Raw((string)Model.ContainerDisplay... | @using Orchard.ContentManagement.MetaData.Models
@{
var containerId = (int) Model.ContainerId;
var itemContentTypes = (IList<ContentTypeDefinition>)Model.ItemContentTypes;
}
<div class="item-properties actions">
<p>
@Html.ActionLink(T("{0} Properties", (string)Model.ContainerDisplayName), "E... |
Update package version to 0.1.1 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("FakeHttpContext.Tests")]
[assembly: AssemblyTitle("FakeHttpContext")]
[assembly: AssemblyDescription("Unit testing utilite for simulate HttpContext.Current.")]
[assembly: AssemblyConfi... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("FakeHttpContext.Tests")]
[assembly: AssemblyTitle("FakeHttpContext")]
[assembly: AssemblyDescription("Unit testing utilite for simulate HttpContext.Current.")]
[assembly: AssemblyConfi... |
Fix create smtpclient with UseDefaultCredentials | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Threading.Tasks;
namespace Postal.AspNetCore
{
public class EmailServiceOptions
{
public EmailServiceOptions()
{
CreateSmtpClient = () => new SmtpClient(Host, Po... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Threading.Tasks;
namespace Postal.AspNetCore
{
public class EmailServiceOptions
{
public EmailServiceOptions()
{
CreateSmtpClient = () => new SmtpClient(Host, Po... |
Add helper functions for ApiKind | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Microsoft.Cci.Extensions
{
public static class ApiKindExtensions
{
public s... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Microsoft.Cci.Extensions
{
public static class ApiKindExtensions
{
public s... |
Add under load sample module | namespace Nancy.JohnnyFive.Sample
{
using System.Collections.Generic;
using System.IO;
using Circuits;
public class SampleModule : NancyModule
{
public SampleModule()
{
Get["/"] = _ =>
{
this.CanShortCircuit(new NoContentOnErrorCircuit()
... | namespace Nancy.JohnnyFive.Sample
{
using System;
using System.Collections.Generic;
using System.IO;
using Circuits;
public class SampleModule : NancyModule
{
public SampleModule()
{
Get["/"] = _ =>
{
this.CanShortCircuit(new NoContentOnE... |
Allow mirror to accept parameters to specify what to mount and where | using System;
using DokanNet;
namespace DokanNetMirror
{
internal class Program
{
private static void Main(string[] args)
{
try
{
bool unsafeReadWrite = args.Length > 0 && args[0].Equals("-unsafe", StringComparison.OrdinalIgnoreCase);
Con... | using System;
using System.Linq;
using DokanNet;
namespace DokanNetMirror
{
internal class Program
{
private const string MirrorKey = "-what";
private const string MountKey = "-where";
private const string UseUnsafeKey = "-unsafe";
private static void Main(string[] args)
... |
Add prototype movement for MetallKefer | using UnityEngine;
using System.Collections;
public class MetallKeferController : MonoBehaviour {
public GameObject gameControllerObject;
private GameController gameController;
private GameObject[] towerBasesBuildable;
void Start () {
this.gameController = this.gameControllerObject.GetComponent<GameController... | using UnityEngine;
using System.Collections;
public class MetallKeferController : MonoBehaviour {
public GameObject gameControllerObject;
private GameController gameController;
private GameObject[] towerBasesBuildable;
private GameObject nextWaypiont;
private int currentWaypointIndex = 0;
private int movementS... |
Add lock around Get in session cache, and add default "unknown" username. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace pGina.Plugin.MySqlLogger
{
class SessionCache
{
private Dictionary<int, string> m_cache;
public SessionCache()
{
m_cache = new Dictionary<int, string>();
}
publ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace pGina.Plugin.MySqlLogger
{
class SessionCache
{
private Dictionary<int, string> m_cache;
public SessionCache()
{
m_cache = new Dictionary<int, string>();
}
publ... |
Add order constructor and Payment | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Shop.Core.BaseObjects;
using Shop.Core.Interfaces;
namespace Shop.Core.Entites
{
public class Order : LifetimeBase, IReferenceable<Order>
{
[Key]
public int OrderId { get; set; }
public string OrderRef... | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Shop.Core.BaseObjects;
using Shop.Core.Interfaces;
namespace Shop.Core.Entites
{
public class Order : LifetimeBase, IReferenceable<Order>
{
[Key]
public int OrderId { get; set; }
public string OrderRef... |
Make DllImport exclusive to iOS | using UnityEngine;
using System;
using System.Runtime.InteropServices;
#if UNITY_EDITOR
using UnityEditor;
#endif
public static class UniVersionManager
{
[DllImport("__Internal")]
private static extern string GetVersionName_();
[DllImport("__Internal")]
private static extern string GetBuildVersionNam... | using UnityEngine;
using System;
using System.Runtime.InteropServices;
#if UNITY_EDITOR
using UnityEditor;
#endif
public static class UniVersionManager
{
#if UNITY_IOS
[DllImport("__Internal")]
private static extern string GetVersionName_();
[DllImport("__Internal")]
private static extern string GetB... |
Split tests and deduplicated code | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DesignPatternsExercise.CreationalPatterns.FactoryMethod.Mocks;
namespace DesignPatternsExercise.CreationalPatterns.FactoryMethod
{
[TestClass]
public class FactoryMethodTest
{
[TestMethod]
public void TestProduction()
... | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DesignPatternsExercise.CreationalPatterns.FactoryMethod.Mocks;
using System.Collections.Generic;
namespace DesignPatternsExercise.CreationalPatterns.FactoryMethod
{
[TestClass]
public class FactoryMethodTest
{
private Dictiona... |
Create JSon Reader command is ready | using System;
using System.Collections.Generic;
using MovieTheater.Framework.Core.Commands.Contracts;
namespace MovieTheater.Framework.Core.Commands
{
public class CreateJsonReaderCommand : ICommand
{
public string Execute(List<string> parameters)
{
throw new NotImplementedExceptio... | using System.Collections.Generic;
using MovieTheater.Framework.Core.Commands.Contracts;
using MovieTheater.Framework.Core.Providers;
using MovieTheater.Framework.Core.Providers.Contracts;
namespace MovieTheater.Framework.Core.Commands
{
public class CreateJsonReaderCommand : ICommand
{
private IReader... |
Remove extra `public`s from interface | using StardewValley;
namespace TehPers.FishingOverhaul.Api.Effects
{
/// <summary>
/// An effect that can be applied while fishing.
/// </summary>
public interface IFishingEffect
{
/// <summary>
/// Applies this effect.
/// </summary>
/// <param name="fishingInfo">I... | using StardewValley;
namespace TehPers.FishingOverhaul.Api.Effects
{
/// <summary>
/// An effect that can be applied while fishing.
/// </summary>
public interface IFishingEffect
{
/// <summary>
/// Applies this effect.
/// </summary>
/// <param name="fishingInfo">I... |
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major. | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Extras.DynamicProxy2")]
[assembly: AssemblyDescription("Autofac Castle.DynamicProxy2 Integration")]
[assembly: ComVisible(false)] | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Extras.DynamicProxy2")]
[assembly: ComVisible(false)] |
Add webhooks to the client interface. | namespace SparkPost
{
/// <summary>
/// Provides access to the SparkPost API.
/// </summary>
public interface IClient
{
/// <summary>
/// Gets or sets the key used for requests to the SparkPost API.
/// </summary>
string ApiKey { get; set; }
/// <summary>
... | namespace SparkPost
{
/// <summary>
/// Provides access to the SparkPost API.
/// </summary>
public interface IClient
{
/// <summary>
/// Gets or sets the key used for requests to the SparkPost API.
/// </summary>
string ApiKey { get; set; }
/// <summary>
... |
Sort battle roster by group, then by position desc | using BatteryCommander.Common;
using BatteryCommander.Common.Models;
using BatteryCommander.Web.Models;
using Microsoft.AspNet.Identity;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Mvc;
namespace BatteryCommander.Web.Controllers
{
public class BattleRosterController... | using BatteryCommander.Common;
using BatteryCommander.Common.Models;
using BatteryCommander.Web.Models;
using Microsoft.AspNet.Identity;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Mvc;
namespace BatteryCommander.Web.Controllers
{
public class BattleRosterController... |
Return ShaderContent for built-in shader stages. | using System;
using ChamberLib.Content;
namespace ChamberLib.OpenTK
{
public class BuiltinShaderImporter
{
public BuiltinShaderImporter(ShaderImporter next, ShaderStageImporter next2)
{
if (next == null) throw new ArgumentNullException("next");
if (next2 == null) throw ... | using System;
using ChamberLib.Content;
namespace ChamberLib.OpenTK
{
public class BuiltinShaderImporter
{
public BuiltinShaderImporter(ShaderImporter next, ShaderStageImporter next2)
{
if (next == null) throw new ArgumentNullException("next");
if (next2 == null) throw ... |
Add Public to build target | using UnrealBuildTool;
public class GenericGraphEditor : ModuleRules
{
public GenericGraphEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
bLegacyPublicIncludePaths = false;
ShadowVariableWarningLevel = WarningLevel.Error;
PublicIncludePaths.AddRa... | using UnrealBuildTool;
public class GenericGraphEditor : ModuleRules
{
public GenericGraphEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
bLegacyPublicIncludePaths = false;
ShadowVariableWarningLevel = WarningLevel.Error;
PublicIncludePaths.AddRa... |
Support listing charges by PaymentIntent id | namespace Stripe
{
using Newtonsoft.Json;
public class ChargeListOptions : ListOptionsWithCreated
{
[JsonProperty("customer")]
public string CustomerId { get; set; }
[JsonProperty("source")]
public ChargeSourceListOptions Source { get; set; }
}
}
| namespace Stripe
{
using System;
using Newtonsoft.Json;
public class ChargeListOptions : ListOptionsWithCreated
{
/// <summary>
/// Only return charges for the customer specified by this customer ID.
/// </summary>
[JsonProperty("customer")]
public string Custome... |
Extend test for Jobs list | using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TMDbLib.Objects.General;
namespace TMDbLibTests
{
[TestClass]
public class ClientJobTests
{
private TestConfig _config;
/// <summary>
/// Run once, on every test
... | using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TMDbLib.Objects.General;
namespace TMDbLibTests
{
[TestClass]
public class ClientJobTests
{
private TestConfig _config;
/// <summary>
/// Run once, on every test
... |
Revert "Update comment to reflect possible config.json path" | using System;
using Common.Logging;
using Noobot.Core;
using Noobot.Core.Configuration;
using Noobot.Core.DependencyResolution;
namespace Noobot.Runner
{
/// <summary>
/// NoobotHost is required due to TopShelf.
/// </summary>
public class NoobotHost
{
private readonly IConfigReader _confi... | using System;
using Common.Logging;
using Noobot.Core;
using Noobot.Core.Configuration;
using Noobot.Core.DependencyResolution;
namespace Noobot.Runner
{
/// <summary>
/// NoobotHost is required due to TopShelf.
/// </summary>
public class NoobotHost
{
private readonly IConfigReader _confi... |
Make CatchStacker testcase more useful | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
[Ignor... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
[Ignor... |
Remove the nuget environment variable. | using System;
using System.Linq;
using System.Threading.Tasks;
using Kudu.Contracts.Tracing;
using Kudu.Core.Infrastructure;
namespace Kudu.Core.Deployment
{
public abstract class MsBuildSiteBuilder : ISiteBuilder
{
private const string NuGetCachePathKey = "NuGetCachePath";
private readonly E... | using System;
using System.Linq;
using System.Threading.Tasks;
using Kudu.Contracts.Tracing;
using Kudu.Core.Infrastructure;
namespace Kudu.Core.Deployment
{
public abstract class MsBuildSiteBuilder : ISiteBuilder
{
private const string NuGetCachePathKey = "NuGetCachePath";
private readonly E... |
Fix header behavior for the fixed length types | namespace FlatFile.FixedLength.Attributes.Infrastructure
{
using System;
using System.Linq;
using FlatFile.Core;
using FlatFile.Core.Attributes.Extensions;
using FlatFile.Core.Attributes.Infrastructure;
using FlatFile.Core.Base;
public class FixedLayoutDescriptorProvider : ILayoutDescriptor... | namespace FlatFile.FixedLength.Attributes.Infrastructure
{
using System;
using System.Linq;
using FlatFile.Core;
using FlatFile.Core.Attributes.Extensions;
using FlatFile.Core.Attributes.Infrastructure;
using FlatFile.Core.Base;
public class FixedLayoutDescriptorProvider : ILayoutDescriptor... |
Clean up type checking code | using System.Collections.Generic;
using System.Linq;
namespace Stratis.Bitcoin.Builder.Feature
{
/// <summary>
/// Extensions to features collection.
/// </summary>
public static class FeaturesExtensions
{
/// <summary>
/// Ensures a dependency feature type is present in the featur... | using System.Collections.Generic;
using System.Linq;
namespace Stratis.Bitcoin.Builder.Feature
{
/// <summary>
/// Extensions to features collection.
/// </summary>
public static class FeaturesExtensions
{
/// <summary>
/// Ensures a dependency feature type is present in the featur... |
Improve Beam-weapon toString to include rating value | // <copyright file="BeamBatterySystem.cs" company="Patrick Maughan">
// Copyright (c) Patrick Maughan. All rights reserved.
// </copyright>
namespace FireAndManeuver.GameModel
{
using System.Xml.Serialization;
public class BeamBatterySystem : ArcWeaponSystem
{
[XmlIgnore]
privat... | // <copyright file="BeamBatterySystem.cs" company="Patrick Maughan">
// Copyright (c) Patrick Maughan. All rights reserved.
// </copyright>
namespace FireAndManeuver.GameModel
{
using System.Xml.Serialization;
public class BeamBatterySystem : ArcWeaponSystem
{
[XmlIgnore]
privat... |
Bump to v0.9 - this is going to be the beta for 1.0 | #region License
/*
Copyright 2011 Andrew Davey
This file is part of Cassette.
Cassette is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
... | #region License
/*
Copyright 2011 Andrew Davey
This file is part of Cassette.
Cassette is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
... |
Add a default value for changeset.workitems. | using System.Collections.Generic;
namespace Sep.Git.Tfs.Core
{
public class TfsChangesetInfo
{
public IGitTfsRemote Remote { get; set; }
public long ChangesetId { get; set; }
public string GitCommit { get; set; }
public IEnumerable<ITfsWorkitem> Workitems { get; set; }
}
}
| using System.Collections.Generic;
using System.Linq;
namespace Sep.Git.Tfs.Core
{
public class TfsChangesetInfo
{
public IGitTfsRemote Remote { get; set; }
public long ChangesetId { get; set; }
public string GitCommit { get; set; }
public IEnumerable<ITfsWorkitem> Workitems { g... |
Improve handling of bad format for intervals | using NBi.Core.ResultSet;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NBi.Core.Scalar.Interval;
using NBi.Core.Scalar.Caster;
namespace NBi.Core.Calculation.Predicate.Numeric
{
class NumericWithinRange : Abst... | using NBi.Core.ResultSet;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NBi.Core.Scalar.Interval;
using NBi.Core.Scalar.Caster;
namespace NBi.Core.Calculation.Predicate.Numeric
{
class NumericWithinRange : Abst... |
Remove custom SQL CE checks from IsConnectionStringConfigured | // Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
using System.IO;
using System.Linq;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration;
namespace Umbraco.Extensions
{
public static class ConfigConnectionStringExtensions
{
public static bool IsConnectionStringConfigur... | // Copyright (c) Umbraco.
// See LICENSE for more details.
using Umbraco.Cms.Core.Configuration;
namespace Umbraco.Extensions
{
public static class ConfigConnectionStringExtensions
{
public static bool IsConnectionStringConfigured(this ConfigConnectionString databaseSettings)
=> databaseSe... |
Remove type constraint for ChildrenOfType<T> | // 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 osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Framework.Testing
{
public static class Testin... | // 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 osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Framework.Testing
{
public static class Testin... |
Add <exception> tags to CreateReader. | using System;
namespace AsmResolver.IO
{
/// <summary>
/// Provides members for creating new binary streams.
/// </summary>
public interface IBinaryStreamReaderFactory : IDisposable
{
/// <summary>
/// Gets the maximum length a single binary stream reader produced by this factory ca... | using System;
using System.IO;
namespace AsmResolver.IO
{
/// <summary>
/// Provides members for creating new binary streams.
/// </summary>
public interface IBinaryStreamReaderFactory : IDisposable
{
/// <summary>
/// Gets the maximum length a single binary stream reader produced b... |
Allow replace separator in crypt helper | using System.Security.Cryptography;
using System.Text;
namespace BuildingBlocks.CopyManagement
{
public static class CryptHelper
{
public static string ToFingerPrintMd5Hash(this string value)
{
var cryptoProvider = new MD5CryptoServiceProvider();
var encoding =... | using System.Security.Cryptography;
using System.Text;
namespace BuildingBlocks.CopyManagement
{
public static class CryptHelper
{
public static string ToFingerPrintMd5Hash(this string value, char? separator = '-')
{
var cryptoProvider = new MD5CryptoServiceProvider();
... |
Add Options setup registration in DI container | using Glimpse.Agent;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System;
using System.Collections.Generic;
using Glimpse.Agent.Web.Options;
namespace Glimpse
{
public class GlimpseAgentWebServices
{
public static IEnumerable<IServiceDescriptor> Ge... | using Glimpse.Agent;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System;
using System.Collections.Generic;
using Glimpse.Agent.Web;
using Glimpse.Agent.Web.Options;
using Microsoft.Framework.OptionsModel;
namespace Glimpse
{
public class GlimpseAgentWebServic... |
Fix typo in Model-Repositories Service Register | using Api.Repositories;
using Microsoft.Extensions.DependencyInjection;
namespace Api.DIServiceRegister {
public class Repositories
{
public static void Register(IServiceCollection services) {
services.AddSingleton<IAdministratorsRepository, AdministratorsRepository>();
servic... | using Api.Repositories;
using Microsoft.Extensions.DependencyInjection;
namespace Api.DIServiceRegister {
public class ModelRepositories
{
public static void Register(IServiceCollection services) {
services.AddScoped<IAdministratorsRepository, AdministratorsRepository>();
serv... |
Add documentation and remove unused using statements | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Facile.Core
{
public class ExecutionResult
{
public bool Success { get; set; }
public IEnumerable<ValidationResult> Errors ... | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Facile.Core
{
/// <summary>
/// Defines the result of a command's execution
/// </summary>
public class ExecutionResult
{
public bool Success { get; set; }
public IEnumerable<ValidationResult> ... |
Add TODO to handle serialization for null key | using MbDotNet.Models.Stubs;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace MbDotNet.Models.Imposters
{
public class HttpsImposter : Imposter
{
[JsonProperty("stubs")]
public ICollection<HttpStub> Stubs { get; private set; }
[JsonProperty("key")]
p... | using MbDotNet.Models.Stubs;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace MbDotNet.Models.Imposters
{
public class HttpsImposter : Imposter
{
[JsonProperty("stubs")]
public ICollection<HttpStub> Stubs { get; private set; }
// TODO Need to not include key... |
Remove a redundant ToArray call | using SonyMediaPlayerXLib;
using SonyVzProperty;
using System;
using System.Data.OleDb;
using System.IO;
using System.Linq;
namespace NowPlayingLib.SonyDatabase
{
/// <summary>
/// x-アプリのデータベースから曲情報を取得します。
/// </summary>
public class MediaManager
{
/// <summary>
/// データベースのパス。
... | using SonyMediaPlayerXLib;
using SonyVzProperty;
using System;
using System.Data.OleDb;
using System.IO;
using System.Linq;
namespace NowPlayingLib.SonyDatabase
{
/// <summary>
/// x-アプリのデータベースから曲情報を取得します。
/// </summary>
public class MediaManager
{
/// <summary>
/// データベースのパス。
... |
Fix the proxy test, why the body was even there? | using System;
using System.Net;
using NUnit.Framework;
using RestSharp.Tests.Shared.Fixtures;
namespace RestSharp.IntegrationTests
{
[TestFixture]
public class ProxyTests
{
class RequestBodyCapturer
{
public const string RESOURCE = "Capture";
}
[Test]
p... | using System;
using System.Net;
using NUnit.Framework;
using RestSharp.Tests.Shared.Fixtures;
namespace RestSharp.IntegrationTests
{
[TestFixture]
public class ProxyTests
{
[Test]
public void Set_Invalid_Proxy_Fails()
{
using var server = HttpServerFixture.StartServer((... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.