Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Update Container Host to only count running containers | using System;
using System.Threading;
using System.Threading.Tasks;
using Docker.DotNet;
using Docker.DotNet.Models;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Metrics;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace SharpLab.Container.Manager.A... | using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Docker.DotNet;
using Docker.DotNet.Models;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Metrics;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
nam... |
Add TODO reminder about ruleset reference transfer quirk | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Game.Database;
#nullable enable
namespace osu.Game.Rulesets
{
/// <summary>
/// A representation of a ruleset's metadata.
/// </summ... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Game.Database;
#nullable enable
namespace osu.Game.Rulesets
{
/// <summary>
/// A representation of a ruleset's metadata.
/// </summ... |
Change GetService calls to GetRequiredService | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Linq;
using System.Reflection;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.B... | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Linq;
using System.Reflection;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.B... |
Include common options in test | using System;
using System.Collections.Generic;
using System.IO;
using AppHarbor.Commands;
using Xunit;
namespace AppHarbor.Tests.Commands
{
public class HelpCommandTest
{
private static Type FooCommandType = typeof(FooCommand);
private static Type FooBarCommandType = typeof(FooBarCommand);
private static Typ... | using System;
using System.Collections.Generic;
using System.IO;
using AppHarbor.Commands;
using Xunit;
namespace AppHarbor.Tests.Commands
{
public class HelpCommandTest
{
private static Type FooCommandType = typeof(FooCommand);
private static Type FooBarCommandType = typeof(FooBarCommand);
private static Typ... |
Allow the json parser to deserialize non string values. | using System;
using System.Collections;
using System.Collections.Generic;
namespace Mindscape.Raygun4Net.Parsers
{
public class RaygunRequestDataJsonParser : IRaygunRequestDataParser
{
public IDictionary ToDictionary(string data)
{
try
{
return SimpleJson.DeserializeObject<Dictionary<s... | using System;
using System.Collections;
using System.Collections.Generic;
namespace Mindscape.Raygun4Net.Parsers
{
public class RaygunRequestDataJsonParser : IRaygunRequestDataParser
{
public IDictionary ToDictionary(string data)
{
try
{
return SimpleJson.DeserializeObject<Dictionary<s... |
Improve N1QL identifier escaping performance | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Couchbase.Linq.QueryGeneration
{
/// <summary>
/// Helpers for N1QL query generation
/// </summary>
public static class N1QlHelpers
{
/// <summary>
/// ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Couchbase.Linq.QueryGeneration
{
/// <summary>
/// Helpers for N1QL query generation
/// </summary>
public static class N1QlHelpers
{
/// <summary>
/// ... |
Change import of jquery files. | using System.Web;
using System.Web.Optimization;
namespace TwitterWebApplication
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add... | using System.Web;
using System.Web.Optimization;
namespace TwitterWebApplication
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add... |
Allow missing members without throwing exceptions | using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Modules.JsonNet
{
/// <summary>
/// IFormatter implementation based on Newtonsoft.Json serialization.
/// Requires the Serializable attr... | using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Modules.JsonNet
{
/// <summary>
/// IFormatter implementation based on Newtonsoft.Json serialization.
/// Requires the Serializable attr... |
Disable test to temp pass build | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.apa... | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.apa... |
Remove directives to expose assembly internals to now removed test projects | using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using TweetDuck;
// 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: As... | using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using TweetDuck;
// 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: Ass... |
Fix Cannot access a disposed object crash in LruCache.SizeOf method | using System;
using FFImageLoading.Drawables;
namespace FFImageLoading.Cache
{
public class LRUCache : Android.Util.LruCache
{
public LRUCache(int maxSize) : base(maxSize)
{
}
public event EventHandler<EntryRemovedEventArgs<Java.Lang.Object>> OnEntryRemoved;
protected... | using System;
using FFImageLoading.Drawables;
namespace FFImageLoading.Cache
{
public class LRUCache : Android.Util.LruCache
{
public LRUCache(int maxSize) : base(maxSize)
{
}
public event EventHandler<EntryRemovedEventArgs<Java.Lang.Object>> OnEntryRemoved;
protected... |
Change player count with both left shift or right shift + num key | using UnityEngine;
using System.Collections;
public class Menus : MonoBehaviour {
public enum MenuState
{
Starting = 0,
Playing = 1,
GameOver = 2
}
public GameLoopManager gameLoopManager;
public SpriteRenderer titleSprite;
public SpriteRenderer gameOverSprite... | using UnityEngine;
using System.Collections;
public class Menus : MonoBehaviour {
public enum MenuState
{
Starting = 0,
Playing = 1,
GameOver = 2
}
public GameLoopManager gameLoopManager;
public SpriteRenderer titleSprite;
public SpriteRenderer gameOverSpr... |
Update with LinkTarget.ArmV7s and frameworks. | using System;
using MonoTouch.ObjCRuntime;
[assembly: LinkWith ("libTTTAttributedLabel.a", LinkTarget.Simulator | LinkTarget.ArmV7, ForceLoad = true)]
| using System;
using MonoTouch.ObjCRuntime;
[assembly: LinkWith ("libTTTAttributedLabel.a", LinkTarget.Simulator | LinkTarget.ArmV7 | LinkTarget.ArmV7s, Frameworks = "CoreGraphics CoreText QuartzCore", ForceLoad = true)]
|
Clarify that your unit test runner will never speak with you again | using System;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows;
namespace Mahapps.Metro.Tests
{
/// <summary>
/// This class is the ultimate hack to work around that we can't
/// create more than one application in the same AppDomain
///
/// It is once in... | using System;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows;
namespace Mahapps.Metro.Tests
{
/// <summary>
/// This class is the ultimate hack to work around that we can't
/// create more than one application in the same AppDomain
///
/// It is initial... |
Remove TransfersMatching flag and use the new one at action level | using System.Threading.Tasks;
using System.Web.Mvc;
using SFA.DAS.Authorization.Mvc.Attributes;
using SFA.DAS.EmployerFinance.Web.Orchestrators;
namespace SFA.DAS.EmployerFinance.Web.Controllers
{
[DasAuthorize("EmployerFeature.TransfersMatching")]
[RoutePrefix("accounts/{HashedAccountId}")]
pub... | using System.Threading.Tasks;
using System.Web.Mvc;
using SFA.DAS.Authorization.Mvc.Attributes;
using SFA.DAS.EmployerFinance.Web.Orchestrators;
namespace SFA.DAS.EmployerFinance.Web.Controllers
{
[RoutePrefix("accounts/{HashedAccountId}")]
public class TransfersController : Controller
{
... |
Fix the social sample port. | using System;
using System.IO;
using System.Net;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.FileProviders;
namespace SocialSample
{
public static class Program
{
... | using System;
using System.IO;
using System.Net;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.FileProviders;
namespace SocialSample
{
public static class Program
{
... |
Call Draw on the output of Build | using System;
using System.IO;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
var game = new Game("HANG THE MAN");
string titleText = File.ReadAllText("title.txt");
object[] titleCell = {titleText, Cell.CentreAlign};
object[] titleRow = {titleCell}; ... | using System;
using System.IO;
namespace Hangman {
public class Hangman {
public static void Main(string[] args) {
var game = new Game("HANG THE MAN");
string titleText = File.ReadAllText("title.txt");
object[] titleCell = {titleText, Cell.CentreAlign};
object[] titleRow = {titleCell}; ... |
Move settings update to first line | using System;
using System.Windows.Forms;
using VigilantCupcake.OperatingSystemUtilities;
namespace VigilantCupcake {
internal static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main() {
... | using System;
using System.Windows.Forms;
using VigilantCupcake.OperatingSystemUtilities;
namespace VigilantCupcake {
internal static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main() {
... |
Check regex for only 1 match | using Albatross.Expression;
using System;
namespace RollGen.Domain
{
public class RandomDice : Dice
{
private readonly Random random;
public RandomDice(Random random)
{
this.random = random;
}
public override PartialRoll Roll(int quantity = 1)
{
... | using Albatross.Expression;
using System;
namespace RollGen.Domain
{
public class RandomDice : Dice
{
private readonly Random random;
public RandomDice(Random random)
{
this.random = random;
}
public override PartialRoll Roll(int quantity = 1)
{
... |
Fix exception with invalid mesh | using SRPCommon.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using System.Diagnostics.CodeAnalysis;
namespace SRPCommon.Scene
{
public class MeshInstancePrimitive : Primitive
{
public override PrimitiveType Type => PrimitiveType.MeshInstance;
public SceneMesh ... | using SRPCommon.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using System.Diagnostics.CodeAnalysis;
namespace SRPCommon.Scene
{
public class MeshInstancePrimitive : Primitive
{
public override PrimitiveType Type => PrimitiveType.MeshInstance;
public SceneMesh ... |
Add version and environment to completed/failed work item | using System;
namespace CertiPay.Common.WorkQueue
{
public class CompletedWorkItem<T>
{
public T WorkItem { get; set; }
public String Server { get; set; }
public DateTime CompletedAt { get; set; }
// TODO Version?
public CompletedWorkItem()
{
thi... | using System;
namespace CertiPay.Common.WorkQueue
{
public class CompletedWorkItem<T>
{
public T WorkItem { get; set; }
public String Server { get; set; }
public DateTime CompletedAt { get; set; }
public String Version { get; set; }
public EnvUtil.Environment Enviro... |
Fix Denver theme to point CSS to configured skin location | @using CkanDotNet.Web.Models.Helpers
@using System.Configuration
<!--v Denvergov:1of3(head) v-->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="Stylesheet" type="text/css" href="http://dgqa.denvergov.org/dgskin1/Scripts/Denvergov.style.skin.css... | @using CkanDotNet.Web.Models.Helpers
@using System.Configuration
<!--v Denvergov:1of3(head) v-->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="Stylesheet" type="text/css" href="@Url.Content(ConfigurationManager.AppSettings["Catalog.SkinLocatio... |
Add Authorize attributes to verify sample | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using UsageSampleMvc.AspNetCore.Models;
namespace UsageSampleMvc.AspNetCore.Controllers
{
public class HomeController : Controller
{
public IAction... | using System.Diagnostics;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using UsageSampleMvc.AspNetCore.Models;
namespace UsageSampleMvc.AspNetCore.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
... |
Put unhandled exception logging in to custom handler class. | using System.Net;
using System.Net.Http;
using System.Web.Http.ExceptionHandling;
using FluentValidation;
using NLog;
using SFA.DAS.Commitments.Application.Exceptions;
namespace SFA.DAS.Commitments.Api
{
public class CustomExceptionHandler : ExceptionHandler
{
private static readonly ILogger Logger = ... | using System.Net;
using System.Net.Http;
using System.Web.Http.ExceptionHandling;
using FluentValidation;
using NLog;
using SFA.DAS.Commitments.Application.Exceptions;
namespace SFA.DAS.Commitments.Api
{
public class CustomExceptionHandler : ExceptionHandler
{
private static readonly ILogger _logger =... |
Adjust column width on url part on the create household page | @model Vaskelista.Models.Household
@{
ViewBag.Title = "Create";
}
<h2>Velkommen til vaskelista</h2>
<p>Her kan du velge hva vaskelisten din skal hete:</p>
<div class="form-horizontal">
<div class="form-group">
<div class="col-md-2"><label>@Request.Url.ToString()</label></div>
... | @model Vaskelista.Models.Household
@{
ViewBag.Title = "Create";
}
<h2>Velkommen til vaskelista</h2>
<p>Her kan du velge hva vaskelisten din skal hete:</p>
<div class="form-horizontal">
<div class="form-group">
<div class="col-md-4"><label>@Request.Url.ToString()</label></div>
... |
Mark internal query builder non-browsable | namespace NRules.Fluent.Dsl
{
/// <summary>
/// Root of the query method chain.
/// </summary>
public interface IQuery
{
/// <summary>
/// Internal query builder.
/// This method is intended for framework use only.
/// </summary>
IQueryBuilder Builder { get; ... | using System.ComponentModel;
namespace NRules.Fluent.Dsl
{
/// <summary>
/// Root of the query method chain.
/// </summary>
public interface IQuery
{
/// <summary>
/// Internal query builder.
/// This method is intended for framework use only.
/// </summary>
... |
Check for a valid image handle when loading resources in the editor. | using System;
using Flood.GUI.Controls;
using Flood.GUI.Renderers;
using Flood.GUI.Skins;
namespace Flood.Editor.Client.Gui
{
public abstract class GuiWindow : IDisposable
{
/// <summary>
/// Native GUI window.
/// </summary>
public Window NativeWindow { get; set; }
/... | using System;
using Flood.GUI.Controls;
using Flood.GUI.Renderers;
using Flood.GUI.Skins;
namespace Flood.Editor.Client.Gui
{
public abstract class GuiWindow : IDisposable
{
/// <summary>
/// Native GUI window.
/// </summary>
public Window NativeWindow { get; set; }
/... |
Build fix? (not sure why travis doesn't see this file) | namespace FlatBuffers
{
public static class FieldTypeMetaData
{
public const string Index = "id";
public const string Required = "required";
}
} | namespace FlatBuffers
{
public static class FieldTypeMetaData
{
public const string Index = "id";
public const string Required = "required";
}
} |
Add base action property ordering | using System;
using System.ComponentModel;
using System.Windows;
using DesktopWidgets.Classes;
namespace DesktopWidgets.Actions
{
public abstract class ActionBase
{
[DisplayName("Delay")]
public TimeSpan Delay { get; set; } = TimeSpan.FromSeconds(0);
[DisplayName("Show Errors")]
... | using System;
using System.ComponentModel;
using System.Windows;
using DesktopWidgets.Classes;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Actions
{
public abstract class ActionBase
{
[PropertyOrder(0)]
[DisplayName("Delay")]
public TimeSpan Delay { get; s... |
Remove some methods to try get element, as if an element is not found, Direct2D only returns a zero pointer with a S_Ok hresult | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharpDX.Direct2D1
{
public partial class SvgDocument
{
/// <summary>
/// Finds an svg element by id
/// </summary>
/// <param name="id">Id to lookup for</param>
/// <returns>... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharpDX.Direct2D1
{
public partial class SvgDocument
{
/// <summary>
/// Finds an svg element by id
/// </summary>
/// <param name="id">Id to lookup for</param>
/// <returns>... |
Add ChessGame parameter to IsValidDestination | namespace ChessDotNet
{
public abstract class ChessPiece
{
public abstract Player Owner
{
get;
set;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(this, obj))
return true;
if (obj == null |... | namespace ChessDotNet
{
public abstract class ChessPiece
{
public abstract Player Owner
{
get;
set;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(this, obj))
return true;
if (obj == null |... |
Check for header before removing it | using System;
using System.IO;
using System.Linq;
namespace AutoHeader.Options
{
public class RemoveHeaderOption : Option
{
public override void Execute()
{
Console.WriteLine("Execute \'RemoveHeaderOption\': {0}", Arg);
if (!Directory.Exists(Arg))
{
... | using System;
using System.IO;
using System.Linq;
namespace AutoHeader.Options
{
public class RemoveHeaderOption : Option
{
public override void Execute()
{
Console.WriteLine("Execute \'RemoveHeaderOption\': {0}", Arg);
if (!Directory.Exists(Arg))
{
... |
Change color to be more visible | using System.Drawing;
using MonoHaven.Graphics;
using MonoHaven.Graphics.Text;
namespace MonoHaven.UI.Widgets
{
public class Progress : Widget
{
private readonly TextLine textLine;
private int value;
public Progress(Widget parent) : base(parent)
{
textLine = new TextLine(Fonts.LabelText);
textLine.Te... | using System.Drawing;
using MonoHaven.Graphics;
using MonoHaven.Graphics.Text;
namespace MonoHaven.UI.Widgets
{
public class Progress : Widget
{
private readonly TextLine textLine;
private int value;
public Progress(Widget parent) : base(parent)
{
textLine = new TextLine(Fonts.LabelText);
textLine.Te... |
Make sure Expiration field is also indexed in the db | using System;
using SQLite;
namespace Amica.vNext.SimpleCache
{
class CacheElement
{
[PrimaryKey]
public string Key { get; set; }
[Indexed]
public string TypeName { get; set; }
public byte[] Value { get; set; }
public DateTime? Expiration { get; set; }
public DateTimeOffset CreatedAt { get; set;... | using System;
using SQLite;
namespace Amica.vNext.SimpleCache
{
class CacheElement
{
[PrimaryKey]
public string Key { get; set; }
[Indexed]
public string TypeName { get; set; }
public byte[] Value { get; set; }
[Indexed]
public DateTime? Expiration { get; set; }
public DateTimeOffset CreatedAt ... |
Add App Package location sample code | using Xamarin.UITest;
namespace Xtc101.UITest
{
public class AppInitializer
{
public static IApp StartApp(Platform platform)
{
if (platform == Platform.Android)
{
return ConfigureApp
.Android
.PreferIdeSettings()
... | using Xamarin.UITest;
namespace Xtc101.UITest
{
public class AppInitializer
{
public static IApp StartApp(Platform platform)
{
if (platform == Platform.Android)
{
return ConfigureApp
.Android
// Run Release Android... |
Add ids from service endpoint | using System.Net;
using LtiLibrary.Core.Outcomes.v2;
namespace LtiLibrary.AspNet.Outcomes.v2
{
public class PutResultContext
{
public PutResultContext(LisResult result)
{
Result = result;
StatusCode = HttpStatusCode.OK;
}
public LisResult Result { get; ... | using System.Net;
using LtiLibrary.Core.Outcomes.v2;
namespace LtiLibrary.AspNet.Outcomes.v2
{
public class PutResultContext
{
public PutResultContext(string contextId, string lineItemId, string id, LisResult result)
{
ContextId = contextId;
LineItemId = lineItemId;
... |
Stop wrapping exceptions we don't know about and let them throw at the point of error. | using System;
using SevenDigital.Api.Wrapper.Exceptions;
namespace SevenDigital.Api.Wrapper.Utility.Serialization
{
public class ApiXmlDeSerializer<T> : IDeSerializer<T> where T : class
{
private readonly IDeSerializer<T> _deSerializer;
private readonly IXmlErrorHandler _xmlErrorHandler;
public Api... | namespace SevenDigital.Api.Wrapper.Utility.Serialization
{
public class ApiXmlDeSerializer<T> : IDeSerializer<T> where T : class
{
private readonly IDeSerializer<T> _deSerializer;
private readonly IXmlErrorHandler _xmlErrorHandler;
public ApiXmlDeSerializer(IDeSerializer<T> deSerializer, IXmlErrorHandl... |
Make avatars use a delayed load wrapper | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Users
{
/// <summary>
/// An avatar which can update to a ne... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Users
{
/// <summary>
/// An avatar which can update to a ne... |
Make attribute search more to the point | using System.Linq;
using UnityEngine;
using UnityEditor;
namespace EasyButtons
{
/// <summary>
/// Custom inspector for Object including derived classes.
/// </summary>
[CanEditMultipleObjects]
[CustomEditor(typeof(Object), true)]
public class ObjectEditor : Editor
{
public overrid... | using System.Linq;
using UnityEngine;
using UnityEditor;
namespace EasyButtons
{
/// <summary>
/// Custom inspector for Object including derived classes.
/// </summary>
[CanEditMultipleObjects]
[CustomEditor(typeof(Object), true)]
public class ObjectEditor : Editor
{
public overri... |
Use DeveloperExceptionPage only in DEV Enviroment | using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Shariff.Backend
{
public class Startup
{
public Startup(IHostingEnvironment env)
{
... | using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Shariff.Backend
{
public class Startup
{
public Startup(
IHostingEnvironment env)
... |
Fix to support virtual directories/folders in IIS. | using Glimpse.Core.Extensibility;
namespace Glimpse.Knockout
{
public sealed class ClientScript : IStaticClientScript
{
public ScriptOrder Order { get { return ScriptOrder.IncludeAfterClientInterfaceScript; } }
public string GetUri(string version)
{
return "/Script... | using Glimpse.Core.Extensibility;
namespace Glimpse.Knockout
{
public sealed class ClientScript : IStaticClientScript
{
public ScriptOrder Order { get { return ScriptOrder.IncludeAfterClientInterfaceScript; } }
public string GetUri(string version)
{
return System.W... |
Check when list is null and campaign details doesn't exist | namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
using System;
using System.Collections.Generic;
using S... | namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Models;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
using Syst... |
Add support for APP_IN_USE dependency change | using Mycroft.App;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mycroft.Cmd.App
{
class AppCommand : Command
{
/// <summary>
/// Parses JSON into App command objects
/// </summary>
/// <param name=... | using Mycroft.App;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mycroft.Cmd.App
{
class AppCommand : Command
{
/// <summary>
/// Parses JSON into App command objects
/// </summary>
/// <param name=... |
Fix reference plane rotation bug. | using UnityEngine;
using System;
namespace Starstrider42.CustomAsteroids {
/// <summary>Standard implementation of <see cref="ReferencePlane"/>.</summary>
internal class SimplePlane : ReferencePlane {
public string name { get; private set; }
/// <summary>Rotation used to implement toDefaultFrame.</summary>
pr... | using UnityEngine;
namespace Starstrider42.CustomAsteroids {
/// <summary>Standard implementation of <see cref="ReferencePlane"/>.</summary>
internal class SimplePlane : ReferencePlane {
public string name { get; private set; }
/// <summary>Rotation used to implement toDefaultFrame.</summary>
private readonly... |
Fix to ensure HTMLElement uses the Caption when loading up the actual HTML page. | using Android.App;
using Android.Content;
using Android.OS;
using Android.Views;
using Android.Webkit;
using Uri = Android.Net.Uri;
namespace MonoDroid.Dialog
{
public class HtmlElement : StringElement
{
// public string Value;
public HtmlElement(string caption, string url)
: ba... | using Android.App;
using Android.Content;
using Android.OS;
using Android.Views;
using Android.Webkit;
using Uri = Android.Net.Uri;
namespace MonoDroid.Dialog
{
public class HtmlElement : StringElement
{
// public string Value;
public HtmlElement(string caption, string url)
: ba... |
Fix a image naming bug. | using System;
using System.IO;
using System.Timers;
using Shell.Execute;
namespace PiDashcam
{
public class StillCam
{
Timer timer;
int imgcounter;
string folder;
public StillCam(string imageFolder)
{
folder = imageFolder;
if (!Directory.Exists(folder))
{
Directory.CreateDirectory(folder);
... | using System;
using System.IO;
using System.Timers;
using Shell.Execute;
namespace PiDashcam
{
public class StillCam
{
Timer timer;
int imgcounter;
string folder;
public StillCam(string imageFolder)
{
imgcounter = 1;
folder = imageFolder;
if (!Directory.Exists(folder))
{
Directory.CreateD... |
Change serialize/deserialize functions to abstract | using LiteNetLib.Utils;
namespace LiteNetLibHighLevel
{
public abstract class LiteNetLibMessageBase
{
public virtual void Deserialize(NetDataReader reader) { }
public virtual void Serialize(NetDataWriter writer) { }
}
}
| using LiteNetLib.Utils;
namespace LiteNetLibHighLevel
{
public abstract class LiteNetLibMessageBase
{
public abstract void Deserialize(NetDataReader reader);
public abstract void Serialize(NetDataWriter writer);
}
}
|
Add dbus-sharp-glib to friend assemblies | // Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System.Reflection;
using System.Runtime.CompilerServices;
//[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyTitle ("NDesk.DBus")]
[assembly: AssemblyDescription ("D-Bus IPC ... | // Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System.Reflection;
using System.Runtime.CompilerServices;
//[assembly: AssemblyVersion("0.0.0.*")]
[assembly: AssemblyTitle ("NDesk.DBus")]
[assembly: AssemblyDescription ("D-Bus IPC ... |
Add client_iden field to push requests | using System.Runtime.Serialization;
namespace PushbulletSharp.Models.Requests
{
[DataContract]
public abstract class PushRequestBase
{
/// <summary>
/// Gets or sets the device iden.
/// </summary>
/// <value>
/// The device iden.
/// </value>
[DataM... | using System.Runtime.Serialization;
namespace PushbulletSharp.Models.Requests
{
[DataContract]
public abstract class PushRequestBase
{
/// <summary>
/// Gets or sets the device iden.
/// </summary>
/// <value>
/// The device iden.
/// </value>
[DataM... |
Fix drawable mania judgement scene looking broken | // 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.Extensions;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mania.Scoring;
... | // 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.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Rulesets.Judgements;
using osu.... |
Bump version to v1.2.1, breaking change for Data.HashFunction.CRC only. | using System;
using System.Reflection;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Data.HashFunction Developers")]
[assembly: AssemblyCopyright("Copyright 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: CLSCompliant(false)]
[assembly: AssemblyVersion("1.1.1... | using System;
using System.Reflection;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Data.HashFunction Developers")]
[assembly: AssemblyCopyright("Copyright 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: CLSCompliant(false)]
[assembly: AssemblyVersion("1.2.1... |
Add helper methods to http descriptor. This provides a more fluent interface between setting name and description with actions. | using System;
using System.Linq.Expressions;
using RimDev.Descriptor.Generic;
namespace RimDev.Descriptor
{
public class HttpDescriptor<TClass> : Descriptor<TClass>
where TClass : class, new()
{
public HttpDescriptor<TClass> Action<TModel>(
Expression<Func<TClass, Func<TModel, obje... | using System;
using System.Linq.Expressions;
using RimDev.Descriptor.Generic;
namespace RimDev.Descriptor
{
public class HttpDescriptor<TClass> : Descriptor<TClass>
where TClass : class, new()
{
public HttpDescriptor(
string name = null,
string description = null,
... |
Fix "Popup" action "Text", "Title" default values | using System.ComponentModel;
using System.Windows;
namespace DesktopWidgets.Actions
{
internal class PopupAction : ActionBase
{
[DisplayName("Text")]
public string Text { get; set; }
[DisplayName("Title")]
public string Title { get; set; }
[DisplayName("Image")]
... | using System.ComponentModel;
using System.Windows;
namespace DesktopWidgets.Actions
{
internal class PopupAction : ActionBase
{
[DisplayName("Text")]
public string Text { get; set; } = "";
[DisplayName("Title")]
public string Title { get; set; } = "";
[DisplayName("Im... |
Improve error if github can't be reached. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Security.Cryptography;
using GistClient.FileSystem;
using RestSharp;
using RestSharp.Deserializers;
namespace GistClient.Client
{
public static class GistClient
{
private static rea... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Security.Cryptography;
using GistClient.FileSystem;
using RestSharp;
using RestSharp.Deserializers;
namespace GistClient.Client
{
public static class GistClient
{
private static rea... |
Support high DPI (96DPI, 120DPI tested) | /*
* 由SharpDevelop创建。
* 用户: imknown
* 日期: 2015/12/3 周四
* 时间: 上午 11:22
*
* 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
*/
using System;
using System.Windows.Forms;
namespace KeyFingerprintLooker
{
/// <summary>
/// Class with program entry point.
/// </summary>
internal sealed class Program
{
/// <summary>
/// Prog... | /*
* 由SharpDevelop创建。
* 用户: imknown
* 日期: 2015/12/3 周四
* 时间: 上午 11:22
*
* 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
*/
using System;
using System.Windows.Forms;
namespace KeyFingerprintLooker
{
/// <summary>
/// Class with program entry point.
/// </summary>
internal sealed class Program
{
/// <summary>
/// Prog... |
Fix stylecop issues in debugging project | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeGeneration.Debugging
{
class Program
{
static void Main(string[] args)
{
// This app is a dummy. But when it is debugged within VS, it builds the Tests
... | // Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
namespace CodeGeneration.Debugging
{
using System;
using System.Collections.Generic;
... |
Test even and odd tab settings. | using ColorProvider;
using Common;
namespace BoxBuilder
{
public sealed class BoxBuilderFactory
{
internal static IBoxPointGenerator GetBoxPointGenerator(ILogger Logger)
{
IPiecePointGenerator piecePointGen = new PiecePointGenerator();
IBoxPointGenerator pointGen = new ... | using ColorProvider;
using Common;
namespace BoxBuilder
{
public sealed class BoxBuilderFactory
{
internal static IBoxPointGenerator GetBoxPointGenerator(ILogger Logger)
{
IPiecePointGenerator piecePointGen = new PiecePointGenerator();
IBoxPointGenerator pointGen = new ... |
Add "now im in the cloud" |
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<body>
<div>
Hello people!
</div>
</body>
</html>
|
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<body>
<div>
Hello people!<br />
Now I'm in the CLOUDDDD
</div>
</body>
</html>
|
Add links to photo details and question details views. | @model QuestionIndexViewModel
@{
ViewBag.Title = "Question Index";
}
<h2>Question Index</h2>
@if (Model.Questions.SafeAny())
{
<table class="index">
<thead>
<tr>
<th>ID</th>
<th>Photo ID</th>
<th>Question</th>
<th>Sentence S... | @model QuestionIndexViewModel
@{
ViewBag.Title = "Question Index";
}
<h2>Question Index</h2>
@if (Model.Questions.SafeAny())
{
<table class="index">
<thead>
<tr>
<th>ID</th>
<th>Photo ID</th>
<th>Question</th>
<th>Sentence S... |
Comment is no longer reqired | using System.Data;
namespace NHibernate.Engine.Transaction
{
/// <summary>
/// Represents work that needs to be performed in a manner
/// which isolates it from any current application unit of
/// work transaction.
/// </summary>
public interface IIsolatedWork
{
/// <summary>
/// Perform the act... | using System.Data;
namespace NHibernate.Engine.Transaction
{
/// <summary>
/// Represents work that needs to be performed in a manner
/// which isolates it from any current application unit of
/// work transaction.
/// </summary>
public interface IIsolatedWork
{
/// <summary>
/// Perform the act... |
Add CFNetwork to list of Xamarin iOS dependencies, should fix Xamarin/iOS linking issues | using System.Reflection;
using System.Runtime.CompilerServices;
using ObjCRuntime;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("CartoMobileSDK.iOS")]
[assembly: AssemblyDescription ("Carto Mobile SDK for i... | using System.Reflection;
using System.Runtime.CompilerServices;
using ObjCRuntime;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("CartoMobileSDK.iOS")]
[assembly: AssemblyDescription ("Carto Mobile SDK for i... |
Create arango exception which consists only of message. | using System;
using System.Net;
namespace Arango.Client
{
public class ArangoException : Exception
{
/// <summary>
/// HTTP status code which caused the exception.
/// </summary>
public HttpStatusCode HttpStatusCode { get; set; }
/// <summary>
/// E... | using System;
using System.Net;
namespace Arango.Client
{
public class ArangoException : Exception
{
/// <summary>
/// HTTP status code which caused the exception.
/// </summary>
public HttpStatusCode HttpStatusCode { get; set; }
/// <summary>
/// E... |
Add correct defaults to domain subscriber | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aggregates.Contracts;
using Aggregates.Extensions;
using EventStore.ClientAPI;
using Newtonsoft.Json;
using NServiceBus;
using NServiceBus.Features;
using NServiceBus.Logging;
using NServiceBus.Mes... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aggregates.Contracts;
using Aggregates.Extensions;
using EventStore.ClientAPI;
using Newtonsoft.Json;
using NServiceBus;
using NServiceBus.Features;
using NServiceBus.Logging;
using NServiceBus.Mes... |
Remove property from ProductTestObjetBuilder that is left over from move of building with constructor feature to TestObjectBuilder class. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TestObjectBuilder;
namespace TestObjectBuilderTests
{
public class ProductTestObjectBuilder : TestObjBuilder<Product>
{
public ProductTestObjectBuilder()
{
this.FirstDependency = new DummyDe... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TestObjectBuilder;
namespace TestObjectBuilderTests
{
public class ProductTestObjectBuilder : TestObjBuilder<Product>
{
public ProductTestObjectBuilder()
{
this.FirstDependency = new DummyDe... |
Fix system web detection logic. | using System;
using System.Collections.Generic;
using Owin;
namespace JabbR.Infrastructure
{
public static class AppBuilderExtensions
{
private static readonly string SystemWebHostName = "System.Web 4.5, Microsoft.Owin.Host.SystemWeb 1.0.0.0";
public static bool IsRunningUnderSystemWeb(this I... | using System;
using System.Collections.Generic;
using Owin;
namespace JabbR.Infrastructure
{
public static class AppBuilderExtensions
{
private static readonly string SystemWebHostName = "System.Web 4.5, Microsoft.Owin.Host.SystemWeb 1.0.0.0";
public static bool IsRunningUnderSystemWeb(this I... |
Make sure we test across more than two lines. |
using System;
using System.IO;
using NUnit.Framework;
namespace Mango.Server.Tests
{
[TestFixture()]
public class HttpHeadersTest
{
[Test()]
public void TestMultilineParse ()
{
//
// multiline values are acceptable if the next
// line starts with spaces
//
string header = @"HeaderName: So... |
using System;
using System.IO;
using NUnit.Framework;
namespace Mango.Server.Tests
{
[TestFixture()]
public class HttpHeadersTest
{
[Test()]
public void TestMultilineParse ()
{
//
// multiline values are acceptable if the next
// line starts with spaces
//
string header = @"HeaderName: So... |
Change URL of initialization in integration tests | namespace CypherTwo.Tests
{
using System;
using System.Net.Http;
using CypherTwo.Core;
using NUnit.Framework;
[TestFixture]
public class IntegrationTests
{
private INeoClient neoClient;
private ISendRestCommandsToNeo neoApi;
private IJsonHttpClientWrapper httpCl... | namespace CypherTwo.Tests
{
using System;
using System.Net.Http;
using CypherTwo.Core;
using NUnit.Framework;
[TestFixture]
public class IntegrationTests
{
private INeoClient neoClient;
private ISendRestCommandsToNeo neoApi;
private IJsonHttpClientWrapper httpCl... |
Fix Object reference not set to an instance of an object. | using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
namespace Template10.Samples.SearchSample
{
sealed partial class App : Template10.Common.BootStrapper
{
public App()
{
InitializeComponent();
}
public override Task OnIn... | using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
namespace Template10.Samples.SearchSample
{
sealed partial class App : Template10.Common.BootStrapper
{
public App()
{
InitializeComponent();
}
public override Task OnIn... |
Switch over agent to using Agent bus | using Glimpse.Web;
using System;
namespace Glimpse.Agent.Web
{
public class AgentRuntime : IRequestRuntime
{
private readonly IMessagePublisher _messagePublisher;
public AgentRuntime(IMessagePublisher messagePublisher)
{
_messagePublisher = messagePublisher;
}
... | using Glimpse.Web;
using System;
namespace Glimpse.Agent.Web
{
public class AgentRuntime : IRequestRuntime
{
private readonly IMessageAgentBus _messageBus;
public AgentRuntime(IMessageAgentBus messageBus)
{
_messageBus = messageBus;
}
public void Begin(ICo... |
Use positive statement and let it return as soon as possible | using System;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Wangkanai.Detection.Models;
using Wangkanai.Detection.Services;
namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
[HtmlTargetElement(ElementName, Attributes = OnlyAttributeName, TagStructure = TagStructure.... | using System;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Wangkanai.Detection.Models;
using Wangkanai.Detection.Services;
namespace Microsoft.AspNetCore.Mvc.TagHelpers
{
[HtmlTargetElement(ElementName, Attributes = OnlyAttributeName, TagStructure = TagStructure.... |
Put auto focus on search too | @{
ViewBag.Title = "Search";
}
<div class="col">
<form asp-controller="Lab" asp-action="Search">
<div>
<div class="form-group">
<label class="control-label">Search By Id, Request Num, or Share Identifier</label>
<div>
<input id... | @{
ViewBag.Title = "Search";
}
<div class="col">
<form asp-controller="Lab" asp-action="Search">
<div>
<div class="form-group">
<label class="control-label">Search By Id, Request Num, or Share Identifier</label>
<div>
<input id... |
Add unit test for reading a project definition. | using System;
using Xunit;
using SolutionEdit;
namespace SolutionParserTest
{
public class ProjectTest
{
[Fact]
public void CreateNewDirectoryProject()
{
// Arrange.
var directoryName = "Test";
// Act.
var directoryProject = Project.NewDi... | using System;
using Xunit;
using SolutionEdit;
using System.IO;
namespace SolutionParserTest
{
public class ProjectTest
{
[Fact]
public void CreateNewDirectoryProject()
{
// Arrange.
var directoryName = "Test";
// Act.
var directoryProjec... |
Update product name in Assembly | 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("Ti... | 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("Ti... |
Change the feature define to be more uniform. | using Flood.RPC.Server;
using Flood.RPC.Transport;
namespace Flood.Server
{
public abstract class Server
{
public IDatabaseManager Database { get; set; }
public TSimpleServer RPCServer { get; set; }
public TServerSocket Socket { get; set; }
protected Server()
{
#if RA... | using Flood.RPC.Server;
using Flood.RPC.Transport;
namespace Flood.Server
{
public abstract class Server
{
public IDatabaseManager Database { get; set; }
public TSimpleServer RPCServer { get; set; }
public TServerSocket Socket { get; set; }
protected Server()
{
#if US... |
Add test URL to libvideo.debug | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YoutubeExtractor;
namespace VideoLibrary.Debug
{
class Program
{
static void Main(string[] args)
{
string[] queries =
{
... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YoutubeExtractor;
namespace VideoLibrary.Debug
{
class Program
{
static void Main(string[] args)
{
string[] queries =
{
... |
Add test ensuring that user id is copied from request if present | using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Security.Principal;
using System.ServiceModel;
namespace Microsoft.ApplicationInsights.Wcf.Tests
{
[TestClass]
public class UserTelemetryInitializerTests
{
[TestMethod]... | using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Security.Principal;
using System.ServiceModel;
namespace Microsoft.ApplicationInsights.Wcf.Tests
{
[TestClass]
public class UserTelemetryInitializerTests
{
[TestMethod]... |
Increase default count to 500 | using Azure.Test.PerfStress;
using CommandLine;
namespace Azure.Storage.Blobs.PerfStress.Core
{
public class CountOptions : PerfStressOptions
{
[Option('c', "count", Default = 100, HelpText = "Number of blobs")]
public int Count { get; set; }
}
}
| using Azure.Test.PerfStress;
using CommandLine;
namespace Azure.Storage.Blobs.PerfStress.Core
{
public class CountOptions : PerfStressOptions
{
[Option('c', "count", Default = 500, HelpText = "Number of blobs")]
public int Count { get; set; }
}
}
|
Use proper case for text showing the current VM operation | namespace AzureBot.Forms
{
using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Management.Models;
[Serializable]
public class VirtualMachineFormState
{
public VirtualMachineFormState(IEnumerable<VirtualMachine> availableVMs, Operations operation... | namespace AzureBot.Forms
{
using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Management.Models;
[Serializable]
public class VirtualMachineFormState
{
public VirtualMachineFormState(IEnumerable<VirtualMachine> availableVMs, Operations operation... |
Fix overkill and use `switch` statement | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Platform;
using osu.Framework.Platform.Linux;
using osu.Framework.Platform.MacOS;
using osu.Framework.Platform.Windows;
using System;
namespace osu.... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Platform;
using osu.Framework.Platform.Linux;
using osu.Framework.Platform.MacOS;
using osu.Framework.Platform.Windows;
using System;
namespace osu.... |
Fix bug which was making the app crash when clicking outside of the spoiler form | using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
using Abc.NCrafts.App.ViewModels;
namespace Abc.NCrafts.App.Views
{
/// <summary>
/// Interaction logic for GameView.xaml
/// </summary>
public partial class Performance2018GameView : ... | using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
using Abc.NCrafts.App.ViewModels;
namespace Abc.NCrafts.App.Views
{
/// <summary>
/// Interaction logic for GameView.xaml
/// </summary>
public partial class Performance2018GameView : ... |
Check digit: recognize infrastructural code and domain logic | namespace CheckDigit
{
class Program
{
static int GetControllDigit(long number)
{
int sum = 0;
bool isOddPos = true;
while (number > 0)
{
int digit = (int)(number % 10);
if (isOddPos)
{
... | namespace CheckDigit
{
class Program
{
static int GetControllDigit(long number)
{
int sum = 0;
bool isOddPos = true;
while (number > 0) // infrastructure
{
int digit = (int)(number % 10); // infrastructure
... |
Use imperative in help messages. | using System;
using CommandLine;
using CommandLine.Text;
namespace Mugo
{
/// <summary>
/// Command line options of the game.
/// </summary>
public class CommandLineOptions
{
[Option ('m', "noBackgroundMusic",
DefaultValue = false,
HelpText = "Disables background music. It can still be enabled via the ... | using System;
using CommandLine;
using CommandLine.Text;
namespace Mugo
{
/// <summary>
/// Command line options of the game.
/// </summary>
public class CommandLineOptions
{
[Option ('m', "noBackgroundMusic",
DefaultValue = false,
HelpText = "Disable background music. It can still be enabled via the m... |
Fix unhandled error causing crash | #region
using System.Windows;
using SteamAccountSwitcher.Properties;
#endregion
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnExit(ExitEventArgs e)
{
... | #region
using System.Windows;
using SteamAccountSwitcher.Properties;
#endregion
namespace SteamAccountSwitcher
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public App()
{
Dispatcher.UnhandledException +... |
Use the .After() method in NUnit instead of Thread.Sleep | using System;
using System.Threading;
using NUnit.Framework;
using SharpBrake;
using SharpBrake.Serialization;
namespace Tests
{
[TestFixture]
public class AirbrakeClientTests
{
#region Setup/Teardown
[SetUp]
public void SetUp()
{
this.client = new AirbrakeCli... | using System;
using NUnit.Framework;
using SharpBrake;
using SharpBrake.Serialization;
namespace Tests
{
[TestFixture]
public class AirbrakeClientTests
{
#region Setup/Teardown
[SetUp]
public void SetUp()
{
this.client = new AirbrakeClient();
}
... |
Use strongly typed ReaderProgress instead of object[] | using System;
namespace SharpCompress.Common
{
public class ReaderExtractionEventArgs<T> : EventArgs
{
internal ReaderExtractionEventArgs(T entry, params object[] paramList)
{
Item = entry;
ParamList = paramList;
}
public T Item { get; private set; }
... | using System;
using SharpCompress.Readers;
namespace SharpCompress.Common
{
public class ReaderExtractionEventArgs<T> : EventArgs
{
internal ReaderExtractionEventArgs(T entry, ReaderProgress readerProgress = null)
{
Item = entry;
ReaderProgress = readerProgress;
... |
Fix IPV6 issue with BindTest | using System.Net;
using System.Net.Sockets;
namespace Tgstation.Server.Host.Extensions
{
/// <summary>
/// Extension methods for the <see cref="Socket"/> <see langword="class"/>.
/// </summary>
static class SocketExtensions
{
/// <summary>
/// Attempt to exclusively bind to a given <paramref name="port"/>.
... | using System.Net;
using System.Net.Sockets;
namespace Tgstation.Server.Host.Extensions
{
/// <summary>
/// Extension methods for the <see cref="Socket"/> <see langword="class"/>.
/// </summary>
static class SocketExtensions
{
/// <summary>
/// Attempt to exclusively bind to a given <paramref name="port"/>.
... |
Improve performance counter test stability | using System.Diagnostics;
using FluentAssertions;
using Xunit;
namespace Okanshi.Test
{
public class PerformanceCounterTest
{
[Fact]
public void Performance_counter_without_instance_name()
{
var performanceCounter = new PerformanceCounter("Memory", "Available Bytes");
var monitor = new PerformanceCount... | using System.Diagnostics;
using FluentAssertions;
using Xunit;
namespace Okanshi.Test
{
public class PerformanceCounterTest
{
[Fact]
public void Performance_counter_without_instance_name()
{
var performanceCounter = new PerformanceCounter("Memory", "Available Bytes");
var monitor = new PerformanceCount... |
Fix error when deserializing response with BodySize set to null (tested with HAR file exported with Firefox). | using System.Collections.Generic;
namespace HarSharp
{
/// <summary>
/// A base class for HTTP messages.
/// </summary>
public abstract class MessageBase : EntityBase
{
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="MessageBas... | using System.Collections.Generic;
namespace HarSharp
{
/// <summary>
/// A base class for HTTP messages.
/// </summary>
public abstract class MessageBase : EntityBase
{
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="MessageBas... |
Add note about supported Visual Studio versions | Order: 30
Title: Visual Studio
Description: Extensions and supported features for Visual Studio
RedirectFrom: docs/editors/visualstudio
---
<p>
The <a href="https://marketplace.visualstudio.com/items?itemName=vs-publisher-1392591.CakeforVisualStudio" target="_blank">Cake extension for Visual Studio </a>
brings... | Order: 30
Title: Visual Studio
Description: Extensions and supported features for Visual Studio
RedirectFrom: docs/editors/visualstudio
---
<p>
The <a href="https://marketplace.visualstudio.com/items?itemName=vs-publisher-1392591.CakeforVisualStudio" target="_blank">Cake extension for Visual Studio </a>
brings... |
Adjust to new model. Provide change callback for task. | // SqliteNote.cs created with MonoDevelop
// User: calvin at 10:56 AM 2/12/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
namespace Tasque.Backends.Sqlite
{
public class SqliteNote : TaskNote
{
private int id;
private string text;
public SqliteNote (int id, string t... | // SqliteNote.cs created with MonoDevelop
// User: calvin at 10:56 AM 2/12/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
namespace Tasque.Backends.Sqlite
{
public class SqliteNote : TaskNote
{
public SqliteNote (int id, string text) : base (text)
{
Id... |
Normalize path so NuGet.Core's GetFiles(path) works correctly. | using System.Collections.Generic;
using System.IO;
using System.Runtime.Versioning;
namespace NuGet.Lucene
{
public class FastZipPackageFile : IPackageFile
{
private readonly IFastZipPackage fastZipPackage;
private readonly FrameworkName targetFramework;
internal FastZipPackageFile(IFa... | using System.Collections.Generic;
using System.IO;
using System.Runtime.Versioning;
namespace NuGet.Lucene
{
public class FastZipPackageFile : IPackageFile
{
private readonly IFastZipPackage fastZipPackage;
private readonly FrameworkName targetFramework;
internal FastZipPackageFile(IFa... |
Remove requirement on master branch existing | namespace GitVersion
{
using System.IO;
using System.Linq;
using GitVersion.VersionCalculation;
using LibGit2Sharp;
public class GitVersionFinder
{
public SemanticVersion FindVersion(GitVersionContext context)
{
Logger.WriteInfo(string.Format("Running against branch:... | namespace GitVersion
{
using System.IO;
using System.Linq;
using GitVersion.VersionCalculation;
using LibGit2Sharp;
public class GitVersionFinder
{
public SemanticVersion FindVersion(GitVersionContext context)
{
Logger.WriteInfo(string.Format("Running against branch:... |
Write arbitrary content to the repl | namespace Mages.Repl.Functions
{
using System;
sealed class ReplObject
{
public String Read()
{
return Console.ReadLine();
}
public void Write(String str)
{
Console.Write(str);
}
public void WriteLine(String str)
{
... | namespace Mages.Repl.Functions
{
using Mages.Core.Runtime;
using System;
sealed class ReplObject
{
public String Read()
{
return Console.ReadLine();
}
public void Write(Object value)
{
var str = Stringify.This(value);
Console... |
Change assemblyinfo for quartz package. | 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: AssemblyConfigurat... | 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("Abp... |
Fix for link sdk assemblies only on iOS | using System.ComponentModel;
using RoundedBoxView.Forms.Plugin.iOSUnified;
using RoundedBoxView.Forms.Plugin.iOSUnified.ExtensionMethods;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly:
ExportRenderer(typeof (RoundedBoxView.Forms.Plugin.Abstractions.RoundedBoxView), typeof (RoundedBoxViewRenderer)... | using System.ComponentModel;
using RoundedBoxView.Forms.Plugin.iOSUnified;
using RoundedBoxView.Forms.Plugin.iOSUnified.ExtensionMethods;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using Foundation;
using System;
[assembly:
ExportRenderer(typeof (RoundedBoxView.Forms.Plugin.Abstractions.RoundedBoxView),... |
Replace a string.Remove with slicing. | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
namespace osu.Framework.IO.Stores
{
public class NamespacedResourceStore<T> : ResourceStore<T>
where 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 System.Linq;
namespace osu.Framework.IO.Stores
{
public class NamespacedResourceStore<T> : ResourceStore<T>
where T ... |
Fix potential infinite loop in SkipWhitespace | using System;
using System.Text;
using DbUp.Support;
namespace DbUp.MySql
{
/// <summary>
/// Reads MySQL commands from an underlying text stream. Supports DELIMITED .. statement
/// </summary>
public class MySqlCommandReader : SqlCommandReader
{
const string DelimiterKeyword = "DELIMITER"... | using System;
using System.Text;
using DbUp.Support;
namespace DbUp.MySql
{
/// <summary>
/// Reads MySQL commands from an underlying text stream. Supports DELIMITED .. statement
/// </summary>
public class MySqlCommandReader : SqlCommandReader
{
const string DelimiterKeyword = "DELIMITER"... |
Implement fake tag parser to test integration | using System;
namespace FTF.Core.Notes
{
public class CreateNote
{
private readonly Func<int> _generateId;
private readonly Func<DateTime> _getCurrentDate;
private readonly Action<Note> _saveNote;
private readonly Action _saveChanges;
public CreateNote(Func<int> gene... | using System;
using System.Collections.Generic;
namespace FTF.Core.Notes
{
public class CreateNote
{
private readonly Func<int> _generateId;
private readonly Func<DateTime> _getCurrentDate;
private readonly Action<Note> _saveNote;
private readonly Action _saveChanges;
... |
Disable display test that is failing in CI build. | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AgateLib;
using AgateLib.Drivers;
using AgateLib.DisplayLib;
namespace AgateLib.UnitTests.DisplayTest
{
[TestClass]
public class DisplayTest
{
[TestMethod]
public void InitializeDisplay()
{
using (AgateSetup setup = new ... | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AgateLib;
using AgateLib.Drivers;
using AgateLib.DisplayLib;
namespace AgateLib.UnitTests.DisplayTest
{
[TestClass]
public class DisplayTest
{
/*
[TestMethod]
public void InitializeDisplay()
{
using (AgateSetup setup ... |
Add a comment for exported DefaultProperties. | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using UELib;
using UELib.Core;
namespace UELib.Core
{
public partial class UTextBuffer : UObject
{
public override string Decompile()
{
if( _bDeserializeOnDemand )
{
BeginDeserializing();... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using UELib;
using UELib.Core;
namespace UELib.Core
{
public partial class UTextBuffer : UObject
{
public override string Decompile()
{
if( _bDeserializeOnDemand )
{
BeginDeserializing();... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.