Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Mark settings as read only | using System.Configuration;
namespace Signatory
{
public static class Settings
{
public static string Authority = ConfigurationManager.AppSettings["Authority"];
public static string GitHubKey = ConfigurationManager.AppSettings["GitHubKey"];
public static string GitHubSecret = Configura... | using System.Configuration;
namespace Signatory
{
public static class Settings
{
public static readonly string Authority = ConfigurationManager.AppSettings["Authority"];
public static readonly string GitHubKey = ConfigurationManager.AppSettings["GitHubKey"];
public static readonly stri... |
Remove NUnit attribute accidently left on a class. The attribute is pointless because the class has no tests. | using NUnit.Framework;
using System;
using System.Collections;
using Symbooglix;
using Microsoft.Boogie;
using Microsoft.Basetypes;
namespace ExprBuilderTests
{
[TestFixture()]
public class ConstantFoldingExprBuilderTests : SimpleExprBuilderTestBase
{
protected Tuple<SimpleExprBuilder, ConstantFol... | using NUnit.Framework;
using System;
using System.Collections;
using Symbooglix;
using Microsoft.Boogie;
using Microsoft.Basetypes;
namespace ExprBuilderTests
{
public class ConstantFoldingExprBuilderTests : SimpleExprBuilderTestBase
{
protected Tuple<SimpleExprBuilder, ConstantFoldingExprBuilder> Get... |
Fix job cancelled showing up as State = Unknown | using System;
using System.Collections.Generic;
using System.Linq;
namespace Contract.Models
{
public class FfmpegJobModel
{
public FfmpegJobModel()
{
Tasks = new List<FfmpegTaskModel>();
}
public Guid JobCorrelationId { get; set; }
public TranscodingJobSta... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Contract.Models
{
public class FfmpegJobModel
{
public FfmpegJobModel()
{
Tasks = new List<FfmpegTaskModel>();
}
public Guid JobCorrelationId { get; set; }
public TranscodingJobSta... |
Change the way characters are recognized. | using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using VRGIN.Core;
using VRGIN.Helpers;
namespace HoneySelectVR
{
internal class HoneyInterpreter : GameInterpreter
{
public HScene Scene;
private IList<IActor> _Actors = new Li... | using Manager;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using VRGIN.Core;
using VRGIN.Helpers;
using System.Linq;
namespace HoneySelectVR
{
internal class HoneyInterpreter : GameInterpreter
{
public HScene Scene;
priv... |
Build script now creates individual zip file packages to align with the NuGet packages and semantic versioning. | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... |
Add instructions for using UITest REPL. | using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Queries;
namespace MyTrips.UITests
{
[TestFixture(Platform.iOS)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
... | using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Queries;
namespace MyTrips.UITests
{
[TestFixture(Platform.iOS)]
public class Tests
{
IApp app;
Platform platform;
public Tests(Platform platform)
{
... |
Enable setters and initialize lists from constructor (again) | using System;
using System.Collections.Generic;
namespace Arkivverket.Arkade.Core
{
public class ArchiveMetadata
{
public string ArchiveDescription { get; set; }
public string AgreementNumber { get; set; }
public List<MetadataEntityInformationUnit> ArchiveCreators { get; } = new List<M... | using System;
using System.Collections.Generic;
namespace Arkivverket.Arkade.Core
{
public class ArchiveMetadata
{
public string ArchiveDescription { get; set; }
public string AgreementNumber { get; set; }
public List<MetadataEntityInformationUnit> ArchiveCreators { get; set; }
... |
Add collection resolver to container | using System;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
namespace AppHarbor
{
public class AppHarborInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(Component
... | using System;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Castle.MicroKernel.Resolvers.SpecializedResolvers;
namespace AppHarbor
{
public class AppHarborInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfi... |
Fix Azure host silo startup | using System;
using Conreign.Cluster;
using Microsoft.WindowsAzure.ServiceRuntime;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.Host;
namespace Conreign.Host.Azure
{
public class SiloRole : RoleEntryPoint
{
private AzureSilo _silo;
public override void Run()
{
... | using System;
using Conreign.Cluster;
using Microsoft.WindowsAzure.ServiceRuntime;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.Host;
namespace Conreign.Host.Azure
{
public class SiloRole : RoleEntryPoint
{
private AzureSilo _silo;
public override void Run()
{
... |
Write PBoolean and PInteger values. | #region License
/*********************************************************************************
* CompactSettingWriter.cs
*
* Copyright (c) 2004-2018 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ... | #region License
/*********************************************************************************
* CompactSettingWriter.cs
*
* Copyright (c) 2004-2018 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ... |
Include timestamp in generated logs | //-----------------------------------------------------------------------
// <copyright file="Program.cs" company="SonarSource SA and Microsoft Corporation">
// (c) SonarSource SA and Microsoft Corporation. All rights reserved.
// </copyright>
//----------------------------------------------------------------------... | //-----------------------------------------------------------------------
// <copyright file="Program.cs" company="SonarSource SA and Microsoft Corporation">
// (c) SonarSource SA and Microsoft Corporation. All rights reserved.
// </copyright>
//----------------------------------------------------------------------... |
Increase node agent version in preperation for the release | 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("Str... | 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("Str... |
Fix unit tests, not sure why file paths have changed? | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AxeSoftware.Quest;
namespace EditorControllerTests
{
[TestClass]
public class TemplateTests
{
[TestMethod]
public void TestTemplates(... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AxeSoftware.Quest;
namespace EditorControllerTests
{
[TestClass]
public class TemplateTests
{
[TestMethod]
public void TestTemplates(... |
Put download stream in using statement (doesn't seem to have any effect though). | using System.IO;
using System.Threading.Tasks;
namespace TestCaseAutomator.TeamFoundation
{
/// <summary>
/// Represents a TFS source controlled file.
/// </summary>
public class TfsFile : TfsSourceControlledItem
{
/// <summary>
/// Initializes a new <see cref="TfsFile"/>.
/// </summary>
/// <param name="... | using System.IO;
using System.Threading.Tasks;
namespace TestCaseAutomator.TeamFoundation
{
/// <summary>
/// Represents a TFS source controlled file.
/// </summary>
public class TfsFile : TfsSourceControlledItem
{
/// <summary>
/// Initializes a new <see cref="TfsFile"/>.
/// </summary>
/// <param name="... |
Set the DB Context to rebuild database when a model change is detected. Dangerous times for data =O | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
namespace MakerFarm.Models
{
public class MakerfarmDBContext : DbContext
{
public MakerfarmDBContext() : base("DefaultConnection")
{
//Database.SetInitializer<MakerfarmDBC... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
namespace MakerFarm.Models
{
public class MakerfarmDBContext : DbContext
{
public MakerfarmDBContext() : base("DefaultConnection")
{
Database.SetInitializer<MakerfarmDBCon... |
Change intro test to test full intro 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 System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphic... | // 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.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Contain... |
Use EndsWith - nicer than LastIndexOf... | using System;
using System.Linq;
public class Bob
{
public string Hey(string input)
{
if (IsSilence(input))
{
return "Fine. Be that way!";
}
else if (IsShouting(input))
{
return "Whoa, chill out!";
}
else if (IsQuestion(input))
... | using System.Linq;
public class Bob
{
public string Hey(string input)
{
if (IsSilence(input))
{
return "Fine. Be that way!";
}
else if (IsShouting(input))
{
return "Whoa, chill out!";
}
else if (IsQuestion(input))
{
... |
Update logging service area name | using Microsoft.SharePoint.Administration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SPMin
{
public class SPMinLoggingService : SPDiagnosticsServiceBase
{
private static string AreaName = "Mavention";
private static SPMinLoggingService _ins... | using Microsoft.SharePoint.Administration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SPMin
{
public class SPMinLoggingService : SPDiagnosticsServiceBase
{
private static string AreaName = "SPMin";
private static SPMinLoggingService _instanc... |
Add points to front and only add if moved a little bit | using System.Collections;
using UnityEngine;
namespace TrailAdvanced.PointSource {
public class ObjectPointSource : AbstractPointSource {
public Transform objectToFollow;
protected override void Update() {
base.Update();
points.AddToBack(objectToFollow.position);
}
}
} | using System.Collections;
using UnityEngine;
namespace TrailAdvanced.PointSource {
public class ObjectPointSource : AbstractPointSource {
public Transform objectToFollow;
private Vector3 _lastPosition;
protected override void Start() {
base.Start();
_lastPosition = objectToFollow.position;
}
prote... |
Handle parenthese in method name. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SourceBrowser.Search.ViewModels
{
public struct TokenViewModel
{
public string Id { get; }
public string Path { get; }
public string Username { get; }
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SourceBrowser.Search.ViewModels
{
public struct TokenViewModel
{
public string Id { get; }
public string Path { get; }
public string Username { get; }
... |
Change way how benchmarks are discovered/executed | using System;
using BenchmarkDotNet.Running;
namespace LanguageExt.Benchmarks
{
class Program
{
static void Main(string[] args)
{
var summary1 = BenchmarkRunner.Run<HashMapAddBenchmark>();
Console.Write(summary1);
var summary2 = BenchmarkRunner.Run<HashMapR... | using BenchmarkDotNet.Running;
namespace LanguageExt.Benchmarks
{
class Program
{
static void Main(string[] args) =>
BenchmarkSwitcher
.FromAssembly(typeof(Program).Assembly)
.Run(args);
}
}
|
Fix default schema rule message. | using System.Collections.Generic;
namespace Dictator
{
public class Rule
{
public string FieldPath { get; set; }
public Constraint Constraint { get; set; }
public List<object> Parameters { get; set; }
public bool IsViolated { get; set; }
public string Message { get; set... | using System.Collections.Generic;
namespace Dictator
{
public class Rule
{
string _message = null;
public string FieldPath { get; set; }
public Constraint Constraint { get; set; }
public List<object> Parameters { get; set; }
public bool IsViolated { get; set; }... |
Rename queue to stack to reflect its actual type | using System.Collections.Concurrent;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Abc.NCrafts.Quizz.Performance.Questions._021
{
public class Answer2
{
public static void Run()
{
var queue = new ConcurrentStack<int>();
// begin
... | using System.Collections.Concurrent;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Abc.NCrafts.Quizz.Performance.Questions._021
{
public class Answer2
{
public static void Run()
{
var stack = new ConcurrentStack<int>();
// begin
... |
Modify routing initialization logic to pass test case. | namespace Nancy.AttributeRouting
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;
/// <inheritdoc/>
public class AttributeRoutingRegistration : IRegistrations
{
static AttributeRouti... | namespace Nancy.AttributeRouting
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;
/// <inheritdoc/>
public class AttributeRoutingRegistration : IRegistrations
{
static AttributeRouti... |
Fix shadow bug with mines exploding | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[RequireComponent(typeof(SpriteRenderer))]
public class SpriteShadow : MonoBehaviour
{
public Sprite ShadowSprite;
public float ShadowDist = 0.1f;
public bool UseParentSpr = true;
public Transform MyTr { get; private set; }
... | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[RequireComponent(typeof(SpriteRenderer))]
public class SpriteShadow : MonoBehaviour
{
public Sprite ShadowSprite;
public float ShadowDist = 0.1f;
public bool UseParentSpr = true;
public Transform MyTr { get; private set; }
... |
Use sbyte in integer index | namespace Codestellation.Pulsar.Cron
{
public struct IntegerIndex
{
public const int NotFound = -1;
private readonly int[] _indexArray;
public IntegerIndex(SimpleCronField field)
{
_indexArray = new int[field.Settings.MaxValue + 1];
for (int i = 0; i < ... | namespace Codestellation.Pulsar.Cron
{
public struct IntegerIndex
{
public const sbyte NotFound = -1;
private readonly sbyte[] _indexArray;
public IntegerIndex(SimpleCronField field)
{
_indexArray = new sbyte[field.Settings.MaxValue + 1];
for (int i = 0... |
Increment version number to 1.3.5.1 | namespace formulate.meta
{
/// <summary>
/// Constants relating to Formulate itself (i.e., does not
/// include constants used by Formulate).
/// </summary>
public class Constants
{
/// <summary>
/// This is the version of Formulate. It is used on
/// assemblies and du... | namespace formulate.meta
{
/// <summary>
/// Constants relating to Formulate itself (i.e., does not
/// include constants used by Formulate).
/// </summary>
public class Constants
{
/// <summary>
/// This is the version of Formulate. It is used on
/// assemblies and du... |
Make tab colors work and stuff | @using StackExchange.Opserver.Models
@using StackExchange.Profiling
@{
Layout = null;
}
@helper RenderTab(TopTab tab)
{
if (tab.IsEnabled)
{
// Optimism!
using (MiniProfiler.Current.Step("Render Tab: " + tab.Name))
{
var status = tab.GetMonitorStatus?.Invoke() ?? Monitor... | @using StackExchange.Opserver.Models
@using StackExchange.Profiling
@{
Layout = null;
}
@helper RenderTab(TopTab tab)
{
if (tab.IsEnabled)
{
// Optimism!
using (MiniProfiler.Current.Step("Render Tab: " + tab.Name))
{
var status = tab.GetMonitorStatus?.Invoke() ?? Monitor... |
Fix EnablePart is not threadsafe | using System;
using System.Collections.Generic;
namespace MuffinFramework
{
public abstract class LayerBase<TArgs> : ILayerBase<TArgs>
{
private readonly object _lockObj = new object();
private readonly List<ILayerBase<TArgs>> _parts = new List<ILayerBase<TArgs>>();
private TArgs _arg... | using System;
using System.Collections.Generic;
namespace MuffinFramework
{
public abstract class LayerBase<TArgs> : ILayerBase<TArgs>
{
private readonly object _lockObj = new object();
private readonly List<ILayerBase<TArgs>> _parts = new List<ILayerBase<TArgs>>();
private TArgs _arg... |
Disable tinting option on iOS | using CrossPlatformTintedImage;
using CrossPlatformTintedImage.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly:ExportRendererAttribute(typeof(TintedImage), typeof(TintedImageRenderer))]
namespace CrossPlatformTintedImage.iOS
{
public class TintedImageRenderer : ImageRenderer
{
p... | using CrossPlatformTintedImage;
using CrossPlatformTintedImage.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly:ExportRendererAttribute(typeof(TintedImage), typeof(TintedImageRenderer))]
namespace CrossPlatformTintedImage.iOS
{
public class TintedImageRenderer : ImageRenderer
{
p... |
Remove the 'lib' prefix for the native lib. | namespace QtWebKit {
using Qyoto;
using System;
using System.Runtime.InteropServices;
public class InitQtWebKit {
[DllImport("libqtwebkit-sharp", CharSet=CharSet.Ansi)]
static extern void Init_qtwebkit();
public static void InitSmoke() {
Init_qtwebkit();
}
}
}
| namespace QtWebKit {
using Qyoto;
using System;
using System.Runtime.InteropServices;
public class InitQtWebKit {
[DllImport("qtwebkit-sharp", CharSet=CharSet.Ansi)]
static extern void Init_qtwebkit();
public static void InitSmoke() {
Init_qtwebkit();
}
}
}
|
Fix skinned taiko hit explosions not being removed on rewind | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Rulesets.Taiko.Skinning
{
public class LegacyHitExplosion : CompositeDrawab... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Rulesets.Taiko.Skinning
{
public class LegacyHitExplosion : CompositeDrawab... |
Fix (from SearchBox): Hotkeys are cleared constantly | using EarTrumpet.Extensions;
using System;
using System.Windows;
using System.Windows.Controls;
namespace EarTrumpet.UI.Behaviors
{
public class TextBoxEx
{
// ClearText: Clear TextBox or the parent ComboBox.
public static bool GetClearText(DependencyObject obj) => (bool)obj.GetValue(ClearText... | using EarTrumpet.Extensions;
using System;
using System.Windows;
using System.Windows.Controls;
namespace EarTrumpet.UI.Behaviors
{
public class TextBoxEx
{
// ClearText: Clear TextBox or the parent ComboBox.
public static bool GetClearText(DependencyObject obj) => (bool)obj.GetValue(ClearText... |
Change IViewModelGenerator implementation registration type from Transient to Singleton. | using Microsoft.Extensions.DependencyInjection;
namespace MicroNetCore.Rest.Models.ViewModels.Extensions
{
public static class ConfigurationExtensions
{
public static IServiceCollection AddViewModels(this IServiceCollection services)
{
services.AddSingleton<IViewModelTypeProvider, ... | using Microsoft.Extensions.DependencyInjection;
namespace MicroNetCore.Rest.Models.ViewModels.Extensions
{
public static class ConfigurationExtensions
{
public static IServiceCollection AddViewModels(this IServiceCollection services)
{
services.AddSingleton<IViewModelTypeProvider, ... |
Add count to loading components logging | // 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.Development;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Framework.Lists;
namespace osu.Framework.Logging
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Development;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Framework.Lists;
namespace osu... |
Make sure bootstrapper runs pre application start | using System.Web.Routing;
using SignalR;
[assembly: WebActivator.PostApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")]
namespace ConsolR.Hosting
{
public static class Bootstrapper
{
public static void PreApplicationStart()
{
var routes = RouteTable.Routes;
routes.MapHt... | using System.Web.Routing;
using SignalR;
[assembly: WebActivator.PreApplicationStartMethod(typeof(ConsolR.Hosting.Bootstrapper), "PreApplicationStart")]
namespace ConsolR.Hosting
{
public static class Bootstrapper
{
public static void PreApplicationStart()
{
var routes = RouteTable.Routes;
routes.MapHtt... |
Implement all properties for collector settings | namespace SurveyMonkey.RequestSettings
{
public class CreateCollectorSettings
{
public enum TypeOption
{
Weblink,
Email
}
public TypeOption Type { get; set; }
public string Name { get; set; }
}
} | using System;
using SurveyMonkey.Containers;
namespace SurveyMonkey.RequestSettings
{
public class CreateCollectorSettings
{
public Collector.CollectorType Type { get; set; }
public string Name { get; set; }
public string ThankYouMessage { get; set; }
public string Disqualifica... |
Make some changes by the solution | using System;
//Problem 15.* Age after 10 Years
//Write a program to read your birthday from the console and print how old you are now and how old you will be after 10 years.
class AgeAfter10Years
{
public static int yearsNow;
static void Main(string[] args)
{
Console.Write("Enter birtday year:"... | using System;
//Problem 15.* Age after 10 Years
//Write a program to read your birthday from the console and print how old you are now and how old you will be after 10 years.
class AgeAfter10Years
{
public static int yearsNow;
static void Main(string[] args)
{
Console.Write("Enter birtday year:"... |
Fix the singleton instance field. | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;
namespace TTMouseclickSimulator.Core.ToontownRewritten.Environment
{
/// <summary>
/// Environment interface for Toontow... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TTMouseclickSimulator.Core.Environment;
namespace TTMouseclickSimulator.Core.ToontownRewritten.Environment
{
/// <summary>
/// Environment interface for Toontow... |
Update file version to 2.2.1.6 | using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2017";
public const string... | using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2017";
public const string... |
Use manual xml parsing for fast start-up | using System.IO;
using System.Reflection;
using System.Xml.Serialization;
namespace IncrementalCompiler
{
public class Settings
{
public DebugSymbolFileType DebugSymbolFile;
public PrebuiltOutputReuseType PrebuiltOutputReuse;
public static Settings Default = new Settings
{
... | using System;
using System.IO;
using System.Reflection;
using System.Xml.Linq;
namespace IncrementalCompiler
{
public class Settings
{
public DebugSymbolFileType DebugSymbolFile;
public PrebuiltOutputReuseType PrebuiltOutputReuse;
public static Settings Default = new Settings
... |
Remove comment no longer needed. | using Glimpse.Web;
using Microsoft.Framework.Logging;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Web
{
public class AgentProfiler : IRequestProfiler
{
private readonly string _requestIdKey = "RequestId";
private readonly IAgentBroker _messageBus;
public AgentP... | using Glimpse.Web;
using Microsoft.Framework.Logging;
using System;
using System.Threading.Tasks;
namespace Glimpse.Agent.Web
{
public class AgentProfiler : IRequestProfiler
{
private readonly string _requestIdKey = "RequestId";
private readonly IAgentBroker _messageBus;
public AgentP... |
Change port number 8888 to 8898 | namespace Nancy.Demo.Hosting.Self
{
using System;
using System.Diagnostics;
using Nancy.Hosting.Self;
class Program
{
static void Main()
{
using (var nancyHost = new NancyHost(new Uri("http://localhost:8888/nancy/"), new Uri("http://127.0.0.1:8888/nancy/"), ... | namespace Nancy.Demo.Hosting.Self
{
using System;
using System.Diagnostics;
using Nancy.Hosting.Self;
class Program
{
static void Main()
{
using (var nancyHost = new NancyHost(new Uri("http://localhost:8888/nancy/"), new Uri("http://127.0.0.1:8898/nancy/"), ... |
Remove Guid, fix typo and change to allowed seperator character | using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PerfIt
{
[EventSource(Name = "PerIt!Instrumentation", Guid = "{010380F8-40A7-45C3-B87B-FD4C6CC8700A}")]
public class InstrumentationEventSource : Even... | using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PerfIt
{
[EventSource(Name = "PerfIt-Instrumentation")]
public class InstrumentationEventSource : EventSource
{
public static readonly Ins... |
Rename "Total Tips" to "Tips" | @model Tipage.Web.Models.ViewModels.ShiftListViewModel
@{
ViewData["Title"] = "Shifts";
}
<h2>Shifts</h2>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.TotalTips) @Html.DisplayFor(model => model.TotalTips)</h3>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.AverageHourlyWage) @Html.DisplayF... | @model Tipage.Web.Models.ViewModels.ShiftListViewModel
@{
ViewData["Title"] = "Shifts";
}
<h2>Shifts</h2>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.TotalTips) @Html.DisplayFor(model => model.TotalTips)</h3>
<h3 class="total-tip">@Html.DisplayNameFor(model => model.AverageHourlyWage) @Html.DisplayF... |
Change LabelUrl property from string to List<String> | using System;
using Newtonsoft.Json;
namespace Shippo {
[JsonObject (MemberSerialization.OptIn)]
public class Batch : ShippoId {
[JsonProperty (PropertyName = "object_status")]
public string ObjectStatus { get; set; }
[JsonProperty (PropertyName = "object_created")]
public stri... | using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Shippo {
[JsonObject (MemberSerialization.OptIn)]
public class Batch : ShippoId {
[JsonProperty (PropertyName = "object_status")]
public string ObjectStatus { get; set; }
[JsonProperty (PropertyName = "obj... |
Refactor Log objects to class DTOs. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Eff.Core
{
public struct ExceptionLog
{
public string CallerMemberName;
public string CallerFilePath;
public int CallerLineNumber;
public Exception Exce... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Eff.Core
{
public class ExceptionLog
{
public string CallerMemberName { get; set; }
public string CallerFilePath { get; set; }
public int CallerLineNumber { get... |
Remove STAThread from main function | using System;
using System.Drawing;
namespace TriDevs.TriCraftClassic
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
Window window = new Window(1280, 720);
window.Run(60.0);
}
}
}
| using System;
using System.Drawing;
namespace TriDevs.TriCraftClassic
{
class Program
{
public static void Main(string[] args)
{
Window window = new Window(1280, 720);
window.Run(60.0);
}
}
}
|
Use field for metadata to prevent reloading every time a term is read | using KenticoInspector.Core.Models;
using KenticoInspector.Core.Services.Interfaces;
using System;
using System.Collections.Generic;
namespace KenticoInspector.Core
{
public abstract class AbstractReport<T> : IReport, IWithMetadata<T> where T : new()
{
protected readonly IReportMetadataService reportM... | using KenticoInspector.Core.Models;
using KenticoInspector.Core.Services.Interfaces;
using System;
using System.Collections.Generic;
namespace KenticoInspector.Core
{
public abstract class AbstractReport<T> : IReport, IWithMetadata<T> where T : new()
{
private ReportMetadata<T> metadata;
prote... |
Make wind down max value 200% | // 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.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
namespace osu.Game.Rulesets.Mods
{
... | // 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.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
namespace osu.Game.Rulesets.Mods
{
... |
Allow converting integers (UNIX timestamps) to DateTime instances. | using System;
public static class IntegerExtensions
{
public static TimeSpan Days(this Int32 integer)
{
return TimeSpan.FromDays(integer);
}
public static TimeSpan Hours(this Int32 integer)
{
return TimeSpan.FromHours(integer);
}
public static TimeSpan Milliseconds(this Int32 integer)
{
... | using System;
public static class IntegerExtensions
{
private static readonly DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public static TimeSpan Days(this Int32 integer)
{
return TimeSpan.FromDays(integer);
}
public static TimeSpan Hours(this Int32 integer)
{
re... |
Rename F grade to D | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"F")]
F,
[Description(@"F")]
D,... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.ComponentModel;
namespace osu.Game.Scoring
{
public enum ScoreRank
{
[Description(@"D")]
F,
[Description(@"D")]
D,... |
Correct version, managed by build script | using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")] | using System.Reflection;
[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyInformationalVersion("0.0.0.*")] |
Fix bug in "where" if-statement | using System;
using System.Text;
using NHibernate.Util;
namespace NHibernate.Sql {
/// <summary>
/// An SQL <c>DELETE</c> statement
/// </summary>
public class Delete {
private string tableName;
private string[] primaryKeyColumnNames;
private string versionColumnName;
private string where;
public Delet... | using System;
using System.Text;
using NHibernate.Util;
namespace NHibernate.Sql {
/// <summary>
/// An SQL <c>DELETE</c> statement
/// </summary>
public class Delete {
private string tableName;
private string[] primaryKeyColumnNames;
private string versionColumnName;
private string where;
public Delet... |
Add links and more info | @using Newtonsoft.Json;
@{
string dataFile = Server.MapPath("~/App_Data/data.json");
string json = File.ReadAllText(dataFile);
var data = (IEnumerable<dynamic>)JsonConvert.DeserializeObject(json);
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Forum ... | @using Newtonsoft.Json;
@{
string dataFile = Server.MapPath("~/App_Data/data.json");
string json = File.ReadAllText(dataFile);
var data = (IEnumerable<dynamic>)JsonConvert.DeserializeObject(json);
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Forum ... |
Add the same to the _viewimports file for the dotnet new template | @using Umbraco.Web.UI.NetCore
@using Umbraco.Extensions
@using Umbraco.Web.PublishedModels
@using Umbraco.Cms.Core.Models.PublishedContent
@using Microsoft.AspNetCore.Html
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
| @using Umbraco.Web.UI.NetCore
@using Umbraco.Extensions
@using Umbraco.Web.PublishedModels
@using Umbraco.Cms.Core.Models.PublishedContent
@using Microsoft.AspNetCore.Html
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Smidge
@inject Smidge.SmidgeHelper SmidgeHelper |
Make the login URL configurable. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dolstagis.Web.Lifecycle
{
public class LoginHandler : ILoginHandler
{
public object GetLogin(IHttpContext context)
{
return new RedirectResult("... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dolstagis.Web.Lifecycle
{
public class LoginHandler : ILoginHandler
{
public string LoginUrl { get; set; }
public LoginHandler()
{
Lo... |
Add output abbreviation text for named pipe relay client to service dispatcher to match the service proxy. | using hase.DevLib.Contract.FileSystemQuery;
using hase.DevLib.Service.FileSystemQuery;
using ProtoBuf;
using System;
using System.IO.Pipes;
namespace hase.DevLib.Service
{
public class ServiceDispatcher
{
private static readonly string pipeName = nameof(FileSystemQueryService);
private NamedPi... | using hase.DevLib.Contract.FileSystemQuery;
using hase.DevLib.Service.FileSystemQuery;
using ProtoBuf;
using System;
using System.IO.Pipes;
namespace hase.DevLib.Service
{
public class ServiceDispatcher
{
private static readonly string pipeName = nameof(FileSystemQueryService);
private NamedPi... |
Check if resx file exists | using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Resources;
using System.Text;
namespace AzureFunctions.ResxConvertor
{
public class ResxConvertor
{
public void SaveResxAsTypeScriptFile(string[] resxFiles, string outputTSFilePAth)
{
var sb = new Stri... | using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.IO;
using System.Resources;
using System.Text;
namespace AzureFunctions.ResxConvertor
{
public class ResxConvertor
{
public void SaveResxAsTypeScriptFile(string[] resxFiles, string outputTSFilePAth)
{
... |
Update webhook test page design | @model EditWebhookViewModel
@using BTCPayServer.Client.Models;
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Test Webhook", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<form method="post">
<h4 class=... | @model EditWebhookViewModel
@using BTCPayServer.Client.Models;
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Send a test event to a webhook endpoint", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<form method="po... |
Handle closed /proc/self/fd/ in stream encode. | using System.Collections.Generic;
using System.IO;
using System.Linq;
using Buzzbox_Common;
using Buzzbox_Common.Encoders;
namespace Buzzbox_Stream
{
class StreamEncode
{
public bool LoopForever;
public bool ShuffleFields;
private MtgEncodeFormatEncoder _encoder;
priva... | using System;
using System.CodeDom;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Buzzbox_Common;
using Buzzbox_Common.Encoders;
namespace Buzzbox_Stream
{
class StreamEncode
{
public bool LoopForever;
public bool ShuffleFields;
private MtgEncodeFormatEnc... |
Update how byte[] is mapped. | using System;
using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Mapping;
using UCDArch.Core.DomainModel;
namespace Commencement.Core.Domain
{
public class Attachment : DomainObject
{
public Attachment()
{
PublicGuid = Guid.NewGuid();
}
... | using System;
using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Mapping;
using UCDArch.Core.DomainModel;
namespace Commencement.Core.Domain
{
public class Attachment : DomainObject
{
public Attachment()
{
PublicGuid = Guid.NewGuid();
}
... |
Fix editor not showing sign when time goes negative | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using System;
using osu.Framework.Allocation;
using osu.Game.Graphics;
namespace osu.Game.Screens.Edit.Co... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using System;
using osu.Framework.Allocation;
using osu.Game.Graphics;
namespace osu.Game.Screens.Edit.Co... |
Add proper transaction rollback logic on exception | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using Microsoft.EntityFrameworkCore.Storage;
namespace osu.Game.Database
{
public class DatabaseWriteUsage : IDisposable
{
public readonl... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using Microsoft.EntityFrameworkCore.Storage;
namespace osu.Game.Database
{
public class DatabaseWriteUsage : IDisposable
{
public readonl... |
Replace Send with ToJson so the library is independent from how you send it | using System;
using Newtonsoft.Json;
using RestSharp;
namespace Rollbar {
public class RollbarPayload {
public RollbarPayload(string accessToken, RollbarData data) {
if (string.IsNullOrWhiteSpace(accessToken)) {
throw new ArgumentNullException("accessToken");
}
... | using System;
using Newtonsoft.Json;
namespace Rollbar {
public class RollbarPayload {
public RollbarPayload(string accessToken, RollbarData data) {
if (string.IsNullOrWhiteSpace(accessToken)) {
throw new ArgumentNullException("accessToken");
}
if (data ... |
Reduce number of function calls. | using System;
using System.Diagnostics;
using System.Text;
using ReClassNET.Util;
namespace ReClassNET.MemorySearcher.Comparer
{
public class StringMemoryComparer : IMemoryComparer
{
public SearchCompareType CompareType => SearchCompareType.Equal;
public bool CaseSensitive { get; }
public Encoding Encoding { ... | using System;
using System.Diagnostics;
using System.Text;
using ReClassNET.Util;
namespace ReClassNET.MemorySearcher.Comparer
{
public class StringMemoryComparer : IMemoryComparer
{
public SearchCompareType CompareType => SearchCompareType.Equal;
public bool CaseSensitive { get; }
public Encoding Encoding { ... |
Fix namespace for Clear extension. | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Http.Features;
namespace Microsoft.AspNet.Http.Extensions
{
public static class ResponseExtensions
{
... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Http.Features;
namespace Microsoft.AspNet.Http
{
public static class ResponseExtensions
{
public ... |
Remove unnecessary enumerator.Reset() from foreach() handling -- causes problems with IEnumerable created from LINQ | #region using
using Irony.Compiler;
using System.Collections;
using ScriptNET.Runtime;
using System;
#endregion
namespace ScriptNET.Ast
{
/// <summary>
/// ForEachStatement
/// </summary>
internal class ScriptForEachStatement : ScriptStatement
{
private Token name;
private ScriptExpr expr;
priva... | #region using
using Irony.Compiler;
using System.Collections;
using ScriptNET.Runtime;
using System;
#endregion
namespace ScriptNET.Ast
{
/// <summary>
/// ForEachStatement
/// </summary>
internal class ScriptForEachStatement : ScriptStatement
{
private Token name;
private ScriptExpr expr;
priva... |
Remove some forgotten debugging code | using System;
using System.IO;
using System.Linq;
namespace DotVVM.Compiler
{
public static class Program
{
private static void PrintHelp(TextWriter? writer = null)
{
var executableName = Path.GetFileNameWithoutExtension(Environment.GetCommandLineArgs()[0]);
writer ??= C... | using System;
using System.IO;
using System.Linq;
namespace DotVVM.Compiler
{
public static class Program
{
private static void PrintHelp(TextWriter? writer = null)
{
var executableName = Path.GetFileNameWithoutExtension(Environment.GetCommandLineArgs()[0]);
writer ??= C... |
Fix the wrong conditional statement. | using NuGet.OutputWindowConsole;
using NuGetConsole;
namespace NuGet.Dialog.PackageManagerUI {
internal class SmartOutputConsoleProvider : IOutputConsoleProvider {
private readonly IOutputConsoleProvider _baseProvider;
private bool _isFirstTime = true;
public SmartOutputConsoleP... | using NuGet.OutputWindowConsole;
using NuGetConsole;
namespace NuGet.Dialog.PackageManagerUI {
internal class SmartOutputConsoleProvider : IOutputConsoleProvider {
private readonly IOutputConsoleProvider _baseProvider;
private bool _isFirstTime = true;
public SmartOutputConsoleP... |
Change the sort text based on if there's a term or not | @model PackageListViewModel
@{
ViewBag.Title = String.IsNullOrWhiteSpace(Model.SearchTerm) ? "Packages" : "Packages matching " + Model.SearchTerm;
ViewBag.Tab = "Packages";
}
<div class="search">
@if (!String.IsNullOrEmpty(Model.SearchTerm))
{
<h1>Search for <i>@Model.SearchTerm</i> returned @... | @model PackageListViewModel
@{
ViewBag.Title = String.IsNullOrWhiteSpace(Model.SearchTerm) ? "Packages" : "Packages matching " + Model.SearchTerm;
ViewBag.SortText = String.IsNullOrWhiteSpace(Model.SearchTerm) ? "recent installs" : "relevance";
ViewBag.Tab = "Packages";
}
<div class="search">
@if (!St... |
Replace app name for special cases in team city check | using System.Linq;
using System.Text;
using TeamCitySharp;
using TeamCitySharp.Locators;
namespace DTMF.Logic
{
public class TeamCity
{
public static bool IsRunning(StringBuilder sb, string appName)
{
//skip if not configured
if (System.Configuration.ConfigurationManage... | using System.Linq;
using System.Text;
using TeamCitySharp;
using TeamCitySharp.Locators;
namespace DTMF.Logic
{
public class TeamCity
{
public static bool IsRunning(StringBuilder sb, string appName)
{
//remove prefix and suffixes from app names so same app can go to multiple places... |
Fix a bug in the 'ret void' implementation | using System;
using Flame.Compiler;
using LLVMSharp;
using static LLVMSharp.LLVM;
namespace Flame.LLVM.Codegen
{
/// <summary>
/// A code block implementation that returns a value from a method.
/// </summary>
public sealed class ReturnBlock : CodeBlock
{
public ReturnBlock(
LL... | using System;
using Flame.Compiler;
using LLVMSharp;
using static LLVMSharp.LLVM;
namespace Flame.LLVM.Codegen
{
/// <summary>
/// A code block implementation that returns a value from a method.
/// </summary>
public sealed class ReturnBlock : CodeBlock
{
public ReturnBlock(
LL... |
Make ToString() short and provide Details() | using System;
namespace ShadowsOfShadows.Items
{
public abstract class Item
{
protected String Name { get; set; }
protected String StatsString { get; set; }
public Item(String name, String stats)
{
Name = name;
StatsString = stats;
}
public overri... | using System;
namespace ShadowsOfShadows.Items
{
public abstract class Item
{
protected string Name { get; set; }
protected string StatsString { get; set; }
public Item(string name, string stats)
{
Name = name;
StatsString = stats;
... |
Fix bug causing incorrect results when dateTime was >= dateTime.Now + 363d | #region Using
using System;
#endregion
namespace PortableExtensions
{
/// <summary>
/// Class containing some extension methods for <see cref="DateTime" />.
/// </summary>
public static partial class DateTimeEx
{
/// <summary>
/// Calculates the difference between the yea... | #region Using
using System;
#endregion
namespace PortableExtensions
{
/// <summary>
/// Class containing some extension methods for <see cref="DateTime" />.
/// </summary>
public static partial class DateTimeEx
{
/// <summary>
/// Calculates the difference between the yea... |
Add the GetEnumeratorOfCopy extension method. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ChamberLib
{
public static class Collection
{
public static void AddRange<T>(ICollection<T> collection, IEnumerable<T> items)
{
foreach (T item in items)
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ChamberLib
{
public static class Collection
{
public static void AddRange<T>(ICollection<T> collection, IEnumerable<T> items)
{
foreach (T item in items)
{
... |
Fix exception not recording topic name. | using System;
using System.Collections.Concurrent;
using System.Linq;
using KafkaNet.Model;
using KafkaNet.Protocol;
namespace KafkaNet
{
public class DefaultPartitionSelector : IPartitionSelector
{
private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDictionary<... | using System;
using System.Collections.Concurrent;
using System.Linq;
using KafkaNet.Model;
using KafkaNet.Protocol;
namespace KafkaNet
{
public class DefaultPartitionSelector : IPartitionSelector
{
private readonly ConcurrentDictionary<string, Partition> _roundRobinTracker = new ConcurrentDictionary<... |
Throw when error form account service. | using System;
using ServiceStack;
using ServiceStack.Logging;
namespace DiscourseAutoApprove.ServiceInterface
{
public interface IServiceStackAccountClient
{
UserServiceResponse GetUserSubscription(string emailAddress);
}
public class ServiceStackAccountClient : IServiceStackAccountClient
... | using System;
using ServiceStack;
using ServiceStack.Logging;
namespace DiscourseAutoApprove.ServiceInterface
{
public interface IServiceStackAccountClient
{
UserServiceResponse GetUserSubscription(string emailAddress);
}
public class ServiceStackAccountClient : IServiceStackAccountClient
... |
Add "None" snap type to fix flags not working correctly | // 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;
namespace osu.Game.Rulesets.Edit
{
[Flags]
public enum SnapType
{
NearbyObjects = 0,
Grids = 1,
All = NearbyObjects | 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 System;
namespace osu.Game.Rulesets.Edit
{
[Flags]
public enum SnapType
{
None = 0,
NearbyObjects = 1 << 0,
Grids = 1 << 1,
... |
Update default build for .NET Core. | using System;
using System.Linq;
using Nuke.Common;
using Nuke.Common.Git;
using Nuke.Common.Tools.GitVersion;
using Nuke.Core;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Core.IO.FileSystemTasks;
using static Nuke.Core.IO.PathConstruction;
using static Nuke.Core.EnvironmentInfo;
class Build ... | using System;
using System.Linq;
using Nuke.Common;
using Nuke.Common.Git;
using Nuke.Common.Tools.GitVersion;
using Nuke.Core;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Core.IO.FileSystemTasks;
using static Nuke.Core.IO.PathConstruction;
using static Nuke.Core.EnvironmentInfo;
class Build ... |
Make if block more readable | // 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;
namespace osu.Framework.Configuration
{
public abstract class BindableNumberWithPrecision<T> : BindableNumber<T>
where T : ... | // 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;
namespace osu.Framework.Configuration
{
public abstract class BindableNumberWithPrecision<T> : BindableNumber<T>
where T : ... |
Add method to return a header value from a HTTP response | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace Codenesium.DataConversionExtensions
{
public static class HTTPResponseHelper
{
public static HttpRe... | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace Codenesium.DataConversionExtensions
{
public static class HTTPResponseHelper
{
public static HttpRe... |
Add Pow to MathF compat file. | // 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.Runtime.CompilerServices;
namespace System
{
// MathF emulation on platforms which don't support ... | // 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.Runtime.CompilerServices;
namespace System
{
// MathF emulation on platforms which don't support ... |
Fix the syntax error Travis works :D | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Spacecraft : MonoBehaviour {
}
SYNTAX ERROR :D | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Spacecraft : MonoBehaviour {
} |
Fix possible race condition in the Upgrade Callback | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace IceBuilder
{
public interface UpgradeProgressCallback
{
bool Canceled { get; ... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace IceBuilder
{
public interface UpgradeProgressCallback
{
bool Canceled { get; ... |
Move the replace filter to internal | // stylecop.header
using Strinken.Parser;
namespace Strinken.Filters
{
/// <summary>
/// This filter takes some couples of arguments, and replace each occurrence of each first argument by the second.
/// </summary>
public class ReplaceFilter : IFilter
{
/// <inheritdoc/>
public str... | // stylecop.header
using Strinken.Parser;
namespace Strinken.Filters
{
/// <summary>
/// This filter takes some couples of arguments, and replace each occurrence of each first argument by the second.
/// </summary>
internal class ReplaceFilter : IFilter
{
/// <inheritdoc/>
public s... |
Make PowerShellScripts class static per review. | namespace NuGet.VisualStudio {
public class PowerShellScripts {
public static readonly string Install = "install.ps1";
public static readonly string Uninstall = "uninstall.ps1";
public static readonly string Init = "init.ps1";
}
}
| namespace NuGet.VisualStudio {
public static class PowerShellScripts {
public static readonly string Install = "install.ps1";
public static readonly string Uninstall = "uninstall.ps1";
public static readonly string Init = "init.ps1";
}
}
|
Revert AssemblyVersion to 2.1.0 because there are no breaking changes in this version | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Traffic Manager Management Libra... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Traffic Manager Management Libra... |
Add hold note tick judgement. | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Rulesets.Mania.Judgements
{
public class HoldNoteTickJudgement : ManiaJudgement
{
}
} | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Rulesets.Mania.Judgements
{
public class HoldNoteTickJudgement : ManiaJudgement
{
public override int NumericResultForScore(Man... |
Make sure that authorization of TraktCalendarUserDVDMoviesRequest is required | namespace TraktApiSharp.Tests.Experimental.Requests.Calendars.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Calendars.OAuth;
using TraktApiSharp.Objects.Get.Calendars;
[TestClass]
public class TraktCalendarUserDVDM... | namespace TraktApiSharp.Tests.Experimental.Requests.Calendars.OAuth
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Calendars.OAuth;
using TraktApiSharp.Objects.Get.Calendars;
using TraktApiSharp.Requests;
[TestClass]
... |
Fix crash error when login state is invalid | using System;
using Agiil.Domain.Auth;
using Agiil.Web.Models.Shared;
using CSF.ORM;
namespace Agiil.Web.Services.Auth
{
public class LoginStateReader
{
readonly IIdentityReader userReader;
readonly IEntityData data;
public LoginStateModel GetLoginState()
{
var use... | using System;
using Agiil.Domain.Auth;
using Agiil.Web.Models.Shared;
using CSF.ORM;
namespace Agiil.Web.Services.Auth
{
public class LoginStateReader
{
readonly IIdentityReader userReader;
readonly IEntityData data;
public LoginStateModel GetLoginState()
{
var use... |
Add sticky note 'GC Handicapping System' | <div class="sticky-notes">
</div> | <div class="sticky-notes">
<div class="sticky-note">
<i class="pin"></i>
<div class="content green">
<h1>
GC Handicapping System
</h1>
<p>
New <a href="/disciplines/golf-croquet/resources">GC Handicapping System</a> comes into effe... |
Fix tests: difference was that the db was initialized in local and "/app/ensureBasicUser" is now "/ensureBasicUser". | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebApp.Tests
{
static class WebAppUrl
{
public const string EnsureBasicUser = "/app/ensureBasicUser";
public const string StartLoginUri = "/.webfront/c/startLogin";
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebApp.Tests
{
static class WebAppUrl
{
public const string EnsureBasicUser = "/ensureBasicUser";
public const string StartLoginUri = "/.webfront/c/startLogin";
... |
Fix test for GT_INDEX_ADDR to forcibly compile with minopts | // 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;
// GitHub 20040: operand ordering bug with GT_INDEX_ADDR
// Requires minopts/tier0 to repro
namespac... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.CompilerServices;
// GitHub 20040: operand ordering bug with GT_INDEX_ADDR
// Re... |
Add route for updating caches via fragment traversal | using Data;
using Ninject;
using Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace LCAToolAPI.API
{
public class FragmentTraversalController : ApiController
{
[Inject]
private readonly IFragmen... | using Data;
using Ninject;
using Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace LCAToolAPI.API
{
public class FragmentTraversalController : ApiController
{
[Inject]
private readonly IFragmen... |
Fix compilation on Unity < 5.3. | #if !NO_UNITY
using System;
using UnityEngine;
using UnityEngine.Events;
namespace FullSerializer {
partial class fsConverterRegistrar {
// Disable the converter for the time being. Unity's JsonUtility API cannot be called from
// within a C# ISerializationCallbackReceiver callback.
// pub... | #if !NO_UNITY && UNITY_5_3_OR_NEWER
using System;
using UnityEngine;
using UnityEngine.Events;
namespace FullSerializer {
partial class fsConverterRegistrar {
// Disable the converter for the time being. Unity's JsonUtility API cannot be called from
// within a C# ISerializationCallbackReceiver cal... |
Disable locally failiny npm command test | //*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 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,... | //*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 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,... |
Change from Redirect to Proxy downloads | using System.Web.Mvc;
using Cake.Web.Core.Content;
namespace Cake.Web.Controllers
{
public class DownloadController : Controller
{
private readonly PackagesConfigContent _content;
public DownloadController(PackagesConfigContent content)
{
_content = content;
}
... | using System.Web.Mvc;
using Cake.Web.Core.Content;
namespace Cake.Web.Controllers
{
public class DownloadController : Controller
{
private readonly PackagesConfigContent _content;
public DownloadController(PackagesConfigContent content)
{
_content = content;
}
... |
Make sure the MainThreadScheduler is set properly | /// <summary>
/// Used by the ModuleInit. All code inside the Initialize method is ran as soon as the assembly is loaded.
/// </summary>
public static class ModuleInitializer
{
/// <summary>
/// Initializes the module.
/// </summary>
public static void Initialize()
{
}
} | using System.Reactive.Concurrency;
using ReactiveUI;
/// <summary>
/// Used by the ModuleInit. All code inside the Initialize method is ran as soon as the assembly is loaded.
/// </summary>
public static class ModuleInitializer
{
/// <summary>
/// Initializes the module.
/// </summary>
public static v... |
Add insulation bootstrapper to jobs. | using System;
using Exceptionless.Core.Extensions;
using Exceptionless.Core.Utility;
using Foundatio.ServiceProvider;
using SimpleInjector;
namespace Exceptionless.Core.Jobs {
public class JobBootstrapper : BootstrappedServiceProviderBase {
public override IServiceProvider Bootstrap() {
var co... | using System;
using System.Reflection;
using Exceptionless.Core.Extensions;
using Exceptionless.Core.Utility;
using Foundatio.ServiceProvider;
using NLog.Fluent;
using SimpleInjector;
namespace Exceptionless.Core.Jobs {
public class JobBootstrapper : BootstrappedServiceProviderBase {
public override IServ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.