Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add cinsole coloring for server URL | #region
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Owin.Hosting;
using Owin;
using Saturn72.Core;
using Saturn72.Core.Configuration;
using Saturn72.Core.Extensibility;
using Saturn72.Extensions;
#endregion
namespace Saturn72.Module.Owin
{
public... | #region
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Owin.Hosting;
using Owin;
using Saturn72.Core;
using Saturn72.Core.Configuration;
using Saturn72.Core.Extensibility;
using Saturn72.Extensions;
#endregion
namespace Saturn72.Module.Owin
{
public... |
Use configured base url for swagger test | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace Nethe... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace Nethe... |
Fix `MultiplayerMatchFooter` test crash due to missing `PopoverContainer` | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
namespace osu.Game.Tes... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
namespace osu.Game.Tests.V... |
Exclude git specific files from beeing resolved. | using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Documents;
using System.Windows.Media.Media3D;
using Common.Logging;
using NCmdLiner.SolutionCreator.Library.Common;
namespace NCmdLiner.SolutionCreator.Library.Services
{
public class FolderResolver : IFolderResolver
{... | using System.IO;
using System.Linq;
using Common.Logging;
namespace NCmdLiner.SolutionCreator.Library.Services
{
public class FolderResolver : IFolderResolver
{
private readonly ITextResolver _textResolver;
private readonly IFileResolver _fileResolver;
private readonly ILog _logger;
... |
Disable Entity Framework Lazy Loading | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeploymentCockpit.Interfaces;
namespace DeploymentCockpit.Data
{
public class UnitOfWorkFactory : IUnitOfWorkFactory
{
public IUnitOfWork Create()
{
return new ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeploymentCockpit.Interfaces;
namespace DeploymentCockpit.Data
{
public class UnitOfWorkFactory : IUnitOfWorkFactory
{
public IUnitOfWork Create()
{
var ctx = n... |
Set default tile size to 32. Change it via config. | using System;
using Memoria.Prime.Ini;
namespace Memoria
{
public sealed partial class Configuration
{
private sealed class GraphicsSection : IniSection
{
public readonly IniValue<Int32> BattleFPS;
public readonly IniValue<Int32> MovieFPS;
public readonly Ini... | using System;
using Memoria.Prime.Ini;
namespace Memoria
{
public sealed partial class Configuration
{
private sealed class GraphicsSection : IniSection
{
public readonly IniValue<Int32> BattleFPS;
public readonly IniValue<Int32> MovieFPS;
public readonly Ini... |
Revert "Height and width should be optional according to the spec." | using Digirati.IIIF.Model.JsonLD;
using Digirati.IIIF.Serialisation;
using Newtonsoft.Json;
namespace Digirati.IIIF.Model.Types.ImageApi
{
// Also known as an "info.json"
public class ImageService : JSONLDBase, IImageService, IHasService
{
// Allow additional context
//public override dyna... | using Digirati.IIIF.Model.JsonLD;
using Digirati.IIIF.Serialisation;
using Newtonsoft.Json;
namespace Digirati.IIIF.Model.Types.ImageApi
{
// Also known as an "info.json"
public class ImageService : JSONLDBase, IImageService, IHasService
{
// Allow additional context
//public override dyna... |
Fix crash when starting administrative by typo in filename | using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading;
namespace HotChocolatey.Administrative
{
public class AdministrativeCommanderProvider
{
private Process administrativeProcess;
public AdministrativeCommander Create(Action<string> outputL... | using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading;
namespace HotChocolatey.Administrative
{
public class AdministrativeCommanderProvider
{
private Process administrativeProcess;
public AdministrativeCommander Create(Action<string> outputL... |
Add AssemblyFileVersion attribute to assembly | // -----------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Zack Loveless">
// Copyright (c) Zack Loveless. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------------
using System.Refl... | // -----------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Zack Loveless">
// Copyright (c) Zack Loveless. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------------
using System.Refl... |
Add observable that fires when a section view is about to be created | using System;
using System.Reactive.Disposables;
using SolidWorks.Interop.sldworks;
namespace SolidworksAddinFramework
{
public static class ModelViewManagerExtensions
{
public static IDisposable CreateSectionView(this IModelViewManager modelViewManager, Action<SectionViewData> config)
{
... | using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using SolidWorks.Interop.sldworks;
namespace SolidworksAddinFramework
{
public static class ModelViewManagerExtensions
{
private static readonly ISubject<SectionViewData> _CreateSectionViewObser... |
Resolve ambiguity by using HTTP verbs. |
using System.Web.Mvc;
namespace OdeToFood.Controllers
{
public class CuisineController : Controller
{
//
// GET: /Cuisine/
// Without HTTP verbs, invoking search is ambiguous. (Note that the
// MVC framework finds the request ambiguous even though R#
// reports that t... |
using System.Web.Mvc;
namespace OdeToFood.Controllers
{
public class CuisineController : Controller
{
//
// GET: /Cuisine/
// Using HTTP verbs allows the framework to resolve the ambiguity.
[HttpPost]
public ActionResult Search(string name = "french")
{
... |
Allow API beatmap requests using interface type | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapRequest : APIRequest<APIBeatm... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
#nullable enable
namespace osu.Game.Online.API.Requests
{
public class GetBeatmapRequest : A... |
Add new block types to the enum | using System;
namespace ValveResourceFormat
{
public enum BlockType
{
#pragma warning disable 1591
RERL = 1,
REDI,
NTRO,
DATA,
VBIB,
VXVS,
SNAP,
#pragma warning restore 1591
}
}
| using System;
namespace ValveResourceFormat
{
public enum BlockType
{
#pragma warning disable 1591
RERL = 1,
REDI,
NTRO,
DATA,
VBIB,
VXVS,
SNAP,
CTRL,
MDAT,
MBUF,
ANIM,
ASEQ,
AGRP,
PHYS,
#pragma warn... |
Rename "Latency Monitor" widget to "Network Monitor" | namespace DesktopWidgets.Widgets.LatencyMonitor
{
public static class Metadata
{
public const string FriendlyName = "Latency Monitor";
}
} | namespace DesktopWidgets.Widgets.LatencyMonitor
{
public static class Metadata
{
public const string FriendlyName = "Network Monitor";
}
} |
Fix poison and short term effects that weren't working due to missing call to effectResult on DecreaseCT. | using System;
using System.Xml;
using Magecrawl.GameEngine.Effects.EffectResults;
namespace Magecrawl.GameEngine.Effects
{
internal class ShortTermEffect : StatusEffect
{
public ShortTermEffect()
{
CTLeft = 0;
m_effectResult = null;
}
publi... | using System;
using System.Xml;
using Magecrawl.GameEngine.Effects.EffectResults;
namespace Magecrawl.GameEngine.Effects
{
internal class ShortTermEffect : StatusEffect
{
public ShortTermEffect()
{
CTLeft = 0;
m_effectResult = null;
}
publi... |
Add Documents property to the user model. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CompetitionPlatform.Models
{
public class AuthenticateModel
{
public string FullName { get; set; }
public string Password { get; set; }
}
public class CompetitionPlatformUser
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CompetitionPlatform.Models
{
public class AuthenticateModel
{
public string FullName { get; set; }
public string Password { get; set; }
}
public class CompetitionPlatformUser
... |
Add test settings loading from enviroment for appVeyor. | using System;
using System.IO;
using Newtonsoft.Json;
namespace VimeoDotNet.Tests.Settings
{
internal class SettingsLoader
{
private const string SETTINGS_FILE = "vimeoSettings.json";
public static VimeoApiTestSettings LoadSettings()
{
if (!File.Exists(SETTINGS_FILE))
... | using System;
using System.IO;
using Newtonsoft.Json;
namespace VimeoDotNet.Tests.Settings
{
internal class SettingsLoader
{
private const string SETTINGS_FILE = "vimeoSettings.json";
public static VimeoApiTestSettings LoadSettings()
{
if (!File.Exists(SETTINGS_FILE))
... |
Use Substitution character instead of question mark | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="Octet.cs" company="Steven Liekens">
// The MIT License (MIT)
// </copyright>
// <summary>
//
// </summary>
// ----------------------------------------------------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="Octet.cs" company="Steven Liekens">
// The MIT License (MIT)
// </copyright>
// <summary>
//
// </summary>
// ----------------------------------------------------------------... |
Simplify finding the last completed attempt | using LiveSplit.Options;
using System;
using System.Linq;
namespace LiveSplit.Model.Comparisons
{
public class LastCompletedRunComparisonGenerator : IComparisonGenerator
{
public IRun Run { get; set; }
public const string ComparisonName = "Last Completed Run";
public const string Short... | using LiveSplit.Options;
using System;
using System.Linq;
namespace LiveSplit.Model.Comparisons
{
public class LastCompletedRunComparisonGenerator : IComparisonGenerator
{
public IRun Run { get; set; }
public const string ComparisonName = "Last Completed Run";
public const string Short... |
Make the devtools controller Admin | using System.Web.Mvc;
using Orchard.DevTools.Models;
using Orchard.Localization;
using Orchard.Mvc.ViewModels;
using Orchard.Themes;
using Orchard.UI.Notify;
namespace Orchard.DevTools.Controllers {
[Themed]
public class HomeController : Controller {
private readonly INotifier _notifier;
... | using System.Web.Mvc;
using Orchard.DevTools.Models;
using Orchard.Localization;
using Orchard.Mvc.ViewModels;
using Orchard.Themes;
using Orchard.UI.Notify;
using Orchard.UI.Admin;
namespace Orchard.DevTools.Controllers {
[Themed]
[Admin]
public class HomeController : Controller {
priv... |
Enable internal PDF viewer in WPF project | using System.Windows;
namespace CefSharp.MinimalExample.Wpf
{
public partial class App : Application
{
public App()
{
//Perform dependency check to make sure all relevant resources are in our output directory.
Cef.Initialize(new CefSettings(), shutdownOnProcessExit: tru... | using System.Windows;
namespace CefSharp.MinimalExample.Wpf
{
public partial class App : Application
{
public App()
{
//Perform dependency check to make sure all relevant resources are in our output directory.
var settings = new CefSettings();
settings.Enabl... |
Disable SQL test for nano | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Xunit;
namespace System.Data.SqlClient.Tests
{
public class SqlConnectionBasicTests
{
[Fac... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Xunit;
namespace System.Data.SqlClient.Tests
{
public class SqlConnectionBasicTests
{
[Fac... |
Add property to report deltas | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Input;
namespace MouseRx2Wpf
{
public class EventsExtension<TElement> where TElement : UIElement
{
public TElement Target { get; }
public IObservable<IObser... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Input;
namespace MouseRx2Wpf
{
public class EventsExtension<TElement> where TElement : UIElement
{
public TElement Target { get; }
public IObservable<IObse... |
Add fix: use StopWatch instead of DateTime | namespace DotNetRu.Clients.UI.Pages
{
using System;
using DotNetRu.Clients.Portable.Interfaces;
using DotNetRu.Clients.Portable.Model;
using Xamarin.Forms;
public abstract class BasePage : ContentPage, IProvidePageInfo
{
private DateTime appeared;
public abstract AppPage Pag... | using System.Diagnostics;
namespace DotNetRu.Clients.UI.Pages
{
using System;
using DotNetRu.Clients.Portable.Interfaces;
using DotNetRu.Clients.Portable.Model;
using Xamarin.Forms;
public abstract class BasePage : ContentPage, IProvidePageInfo
{
private Stopwatch appeared;
... |
Refactor artwork clean up code | using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Storage;
using Audiotica.Core.Extensions;
using Audiotica.Core.Windows.Helpers;
using Audiotica.Database.Services.Interfaces;
using Audiotica.Windows.Services.Interfaces;
using Autofac;
namespace Audiotica.Windows.AppEngine.Bootstrppers
... | using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Storage;
using Audiotica.Core.Extensions;
using Audiotica.Core.Windows.Helpers;
using Audiotica.Database.Services.Interfaces;
using Audiotica.Windows.Services.Interfaces;
using Autofac;
namespace Audiotica.Windows.AppEngine.Bootstrppers
... |
Use route handler defined for instance | using System.Web.Mvc;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Mapper()
{
_routeHandler = new MvcRouteHandler();
}
protected Route GenerateRoute(string path, string controller, string action, string[] h... | using System.Web.Mvc;
using System.Web.Routing;
namespace RestfulRouting
{
public abstract class Mapper
{
private readonly IRouteHandler _routeHandler;
protected Mapper()
{
_routeHandler = new MvcRouteHandler();
}
protected Route GenerateRoute(string path, string controller, string action, string[] h... |
Fix Less compiler unit tests to expect filename in error messages. | using Should;
using Xunit;
namespace Cassette.Less
{
public class LessCompiler_Compile
{
[Fact]
public void Compile_converts_LESS_into_CSS()
{
var compiler = new LessCompiler(_ => @"@color: #4d926f; #header { color: @color; }");
var css = compiler.Com... | using Should;
using Xunit;
namespace Cassette.Less
{
public class LessCompiler_Compile
{
[Fact]
public void Compile_converts_LESS_into_CSS()
{
var compiler = new LessCompiler(_ => @"@color: #4d926f; #header { color: @color; }");
var css = compiler.Com... |
Add light theme setting support | using Microsoft.Win32;
namespace EarTrumpet.Services
{
public static class UserSystemPreferencesService
{
public static bool IsTransparencyEnabled
{
get
{
using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64))
... | using Microsoft.Win32;
namespace EarTrumpet.Services
{
public static class UserSystemPreferencesService
{
public static bool IsTransparencyEnabled
{
get
{
using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64))
... |
Fix .NET Standard assembly assets path. | using System;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public static class PackageExporter
{
[MenuItem("Tools/Export Unitypackage")]
public static void Export()
{
// configure
var root = "Scripts/MagicOnion";
var exportPath = "./MagicOnion.Client.Un... | using System;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public static class PackageExporter
{
[MenuItem("Tools/Export Unitypackage")]
public static void Export()
{
// configure
var root = "Scripts/MagicOnion";
var exportPath = "./MagicOnion.Client.Un... |
Change MaxDocs from int to long | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nest
{
[JsonObject(MemberSerialization.OptIn)]
[JsonConverter(typeof(ReadAsTypeJsonConverter<RolloverConditions>))]
public interface IRolloverConditions
{
[JsonPro... | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nest
{
[JsonObject(MemberSerialization.OptIn)]
[JsonConverter(typeof(ReadAsTypeJsonConverter<RolloverConditions>))]
public interface IRolloverConditions
{
[JsonPro... |
Replace parantheses with nullable-bool equality operation | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Beatmaps
{
public static class BeatSyncProviderExtensions
{
/// <summary>
/// Check whether beat sync is currently available.
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Beatmaps
{
public static class BeatSyncProviderExtensions
{
/// <summary>
/// Check whether beat sync is currently available.
... |
Add "Ranked & Approved Beatmaps" section | // 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.Game.Online.API.Requests;
using osu.Game.Overlays.Profile.Sections.Beatmaps;
namespace osu.Game.Overlays.Profile.Sections
{
public class Beatmaps... | // 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.Game.Online.API.Requests;
using osu.Game.Overlays.Profile.Sections.Beatmaps;
namespace osu.Game.Overlays.Profile.Sections
{
public class Beatmaps... |
Update Console Program with the Repository call - Add the GetRoleMessageForNoneTest test method to test the None case | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Training.CSharpWorkshop.Tests
{
[TestClass]
public class ProgramTests
{
[Ignore]
[TestMethod]
public void IgnoreTest()
{
Assert.Fail();
}
[TestMethod()]
public v... | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Training.CSharpWorkshop.Tests
{
[TestClass]
public class ProgramTests
{
[Ignore]
[TestMethod]
public void IgnoreTest()
{
Assert.Fail();
}
[TestMethod()]
public v... |
Standardize JSON date/time values on UTC | using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Totem.Runtime.Json
{
/// <summary>
/// Settings used when serializing and deserializing objects in the Totem runtime
/// </summary>
public class TotemSerializerSettings : JsonSeria... | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Totem.Runtime.Json
{
/// <summary>
/// Settings used when serializing and deserializing objects in the Totem runtime
/// </summary>
public class TotemSe... |
Add missing xmldoc to interface class | // 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.Input.StateChanges.Events;
namespace osu.Framework.Input.StateChanges
{
public interface ISourcedFromTouch
{
TouchStateChangeEvent To... | // 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.Input.StateChanges.Events;
namespace osu.Framework.Input.StateChanges
{
/// <summary>
/// Denotes an input which was sourced from a touch eve... |
Fix for superclass properties (NH-3318) | using System.Reflection;
namespace NHibernate.Mapping.ByCode.Impl.CustomizersImpl
{
public class ComposedIdCustomizer<TEntity> : PropertyContainerCustomizer<TEntity>, IComposedIdMapper<TEntity> where TEntity : class
{
public ComposedIdCustomizer(IModelExplicitDeclarationsHolder explicitDeclarationsHolder, IC... | using System.Reflection;
namespace NHibernate.Mapping.ByCode.Impl.CustomizersImpl
{
public class ComposedIdCustomizer<TEntity> : PropertyContainerCustomizer<TEntity>, IComposedIdMapper<TEntity> where TEntity : class
{
public ComposedIdCustomizer(IModelExplicitDeclarationsHolder explicitDeclarationsHolder, IC... |
Update assembly version to v1.99 to prepare for v2.0 release | using System.Reflection;
[assembly: AssemblyCompany("Picoe Software Solutions Inc.")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("(c) 2010-2014 by Curtis Wensley, 2012-2014 by Vivek Jhaveri and contributors")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersi... | using System.Reflection;
[assembly: AssemblyCompany("Picoe Software Solutions Inc.")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("(c) 2010-2014 by Curtis Wensley, 2012-2014 by Vivek Jhaveri and contributors")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersi... |
Add link to where the async relay command is from | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace AutoReservation.Ui.ViewModels
{
public class AsyncRelayCommand : ICommand
{
protected readonly Predicate<object> _canExecute;
protected Func... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace AutoReservation.Ui.ViewModels
{
/**
* From: http://blog.mycupof.net/2012/08/23/mvvm-asyncdelegatecommand-what-asyncawait-can-do-for-uidevelopment/
*/
... |
Allow for blank status description | using System;
using System.Web;
namespace WebServer
{
public class StatusCode : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string statusCodeString = context.Request.QueryString["statuscode"];
string statusDescription = context.Request.QueryString["... | using System;
using System.Web;
namespace WebServer
{
public class StatusCode : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string statusCodeString = context.Request.QueryString["statuscode"];
string statusDescription = context.Request.QueryString["... |
Fix bug from 1 to 3 | //We are given numbers N and M and the following operations:
// * `N = N+1`
// * `N = N+2`
// * `N = N*2`
// - Write a program that finds the shortest sequence of operations from the list above that starts from `N` and finishes in `M`.
// - _Hint_: use a queue.
// - Example: `N = 5`, `M = 16`
// - Sequence: 5 ... | //We are given numbers N and M and the following operations:
// * `N = N+1`
// * `N = N+2`
// * `N = N*2`
// - Write a program that finds the shortest sequence of operations from the list above that starts from `N` and finishes in `M`.
// - _Hint_: use a queue.
// - Example: `N = 5`, `M = 16`
// - Sequence: 5 ... |
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... |
Revert "Add test trying to recreate the issue" | using Xunit;
using Unity.SolrNetCloudIntegration;
using Unity;
namespace SolrNet.Cloud.Tests
{
public class UnityTests
{
private IUnityContainer Setup() {
return new SolrNetContainerConfiguration().ConfigureContainer(
new FakeProvider(),
new UnityContainer()... | using Xunit;
using Unity.SolrNetCloudIntegration;
using Unity;
namespace SolrNet.Cloud.Tests
{
public class UnityTests
{
private IUnityContainer Setup() {
return new SolrNetContainerConfiguration().ConfigureContainer(
new FakeProvider(),
new UnityContainer()... |
Fix Environment Variable check for TeamCity Log | using System;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Module.Shared;
using CakeBuildLog = Cake.Core.Diagnostics.CakeBuildLog;
namespace Cake.TeamCity.Module
{
public class TeamCityLog : ICakeLog
{
public TeamCityLog(IConsole console, Verbosity verbosity = Verbosity.Normal)
{
... | using System;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Module.Shared;
using CakeBuildLog = Cake.Core.Diagnostics.CakeBuildLog;
namespace Cake.TeamCity.Module
{
public class TeamCityLog : ICakeLog
{
public TeamCityLog(IConsole console, Verbosity verbosity = Verbosity.Normal)
{
... |
Remove service event source for now | using System;
using System.Threading.Tasks;
using Messages_Stateless;
using NServiceBus;
namespace Back_Stateless
{
public class SubmitOrderHandler : IHandleMessages<SubmitOrder>
{
private OrderContext orderContext;
public SubmitOrderHandler(OrderContext orderContext)
{
... | using System;
using System.Threading.Tasks;
using Messages_Stateless;
using NServiceBus;
namespace Back_Stateless
{
public class SubmitOrderHandler : IHandleMessages<SubmitOrder>
{
private OrderContext orderContext;
public SubmitOrderHandler(OrderContext orderContext)
{
... |
Allow to run build even if git repo informations are not available | #tool "nuget:?package=GitVersion.CommandLine"
#addin "Cake.Yaml"
public class ContextInfo
{
public string NugetVersion { get; set; }
public string AssemblyVersion { get; set; }
public GitVersion Git { get; set; }
public string BuildVersion
{
get { return NugetVersion + "-" + Git.Sha; }
... | #tool "nuget:?package=GitVersion.CommandLine"
#addin "Cake.Yaml"
public class ContextInfo
{
public string NugetVersion { get; set; }
public string AssemblyVersion { get; set; }
public GitVersion Git { get; set; }
public string BuildVersion
{
get { return NugetVersion + "-" + Git.Sha; }
... |
Add tests to check if contracts are working (currently disabled) | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RazorEngine;
using NUnit.Framework;
namespace Test.RazorEngine
{
/// <summary>
/// Various general tests.
/// </summary>
[TestFixture]
public class VariousTestsFixture
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RazorEngine;
using NUnit.Framework;
namespace Test.RazorEngine
{
/// <summary>
/// Various general tests.
/// </summary>
[TestFixture]
public class VariousTestsFixture
{
... |
Fix nullability mismatch on partial declarations | // 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.Collections.Generic
{
/// <summary>
/// These publ... | // 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.
#nullable enable
using System.Runtime.CompilerServices;
namespace System.Collections.Generic
{
/// <summary>
... |
Read panorama name entries into a list | using System;
using System.IO;
using System.Text;
namespace ValveResourceFormat.ResourceTypes
{
public class Panorama : Blocks.ResourceData
{
public byte[] Data { get; private set; }
public uint Crc32 { get; private set; }
public override void Read(BinaryReader reader, Resource resour... | using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace ValveResourceFormat.ResourceTypes
{
public class Panorama : Blocks.ResourceData
{
public class NameEntry
{
public string Name { get; set; }
public uint CRC32 { get; set; } // T... |
Update stack trace decoding to match Java | // Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... | // Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
Use an extension to parse the RTE macros into rendered macros | using Umbraco.Core;
using Archetype.Umbraco.Models;
namespace Archetype.Umbraco.Extensions
{
public static class Extensions
{
//lifted from the core as it is marked 'internal'
public static bool DetectIsJson(this string input)
{
input = input.Trim();
return inpu... | using System;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using Umbraco.Core;
using Umbraco.Web;
using Archetype.Umbraco.Models;
namespace Archetype.Umbraco.Extensions
{
public static class Extensions
{
//lifted from the core as it is ma... |
Fix click on item event after adding header wrapper | using System;
using System.Linq;
using Android.OS;
using Android.Views;
using Android.Widget;
using Toggl.Joey.UI.Adapters;
using ListFragment = Android.Support.V4.App.ListFragment;
namespace Toggl.Joey.UI.Fragments
{
public class RecentTimeEntriesListFragment : ListFragment
{
public override void OnV... | using System;
using System.Linq;
using Android.OS;
using Android.Views;
using Android.Widget;
using Toggl.Joey.UI.Adapters;
using ListFragment = Android.Support.V4.App.ListFragment;
namespace Toggl.Joey.UI.Fragments
{
public class RecentTimeEntriesListFragment : ListFragment
{
public override void OnV... |
Add user beatmap availability property | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System;
using Newtonsoft.Json;
using osu.Game.Users;
namespace osu.Game.Online.Multiplayer
{
[Serializable]
public class MultiplayerRoomU... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System;
using Newtonsoft.Json;
using osu.Game.Online.Rooms;
using osu.Game.Users;
namespace osu.Game.Online.Multiplayer
{
[Serializable]
... |
Fix regression (unit tests were failing because of this) | using System.Collections.Generic;
using System.Linq;
using FastMember;
using Newtonsoft.Json;
namespace MyAccounts.Business.Extensions
{
public static class ObjectExtensions
{
public static IDictionary<string, string> ToRawMembersDictionary(this object obj)
{
var accessor = TypeAcc... | using System.Collections.Generic;
using System.Linq;
using FastMember;
using Newtonsoft.Json;
namespace MyAccounts.Business.Extensions
{
public static class ObjectExtensions
{
public static IDictionary<string, string> ToRawMembersDictionary(this object obj)
{
var accessor = TypeAcc... |
Fix imported images being scaled on some systems. | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
namespace PixelPet.Commands {
internal class ImportBitmapCmd : CliCommand {
public ImportBitmapCmd()
: base ("Import-Bitmap",... | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
namespace PixelPet.Commands {
internal class ImportBitmapCmd : CliCommand {
public ImportBitmapCmd()
: base ("Import-Bitmap",... |
Make internals of Taut visible to Taut.Test. | using System.Resources;
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.
[ass... | using System.Resources;
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.
[ass... |
Reword exception to be more descriptive | // 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.Framework.Localisation
{
/// <summary>
/// Indicates that the members of an enum can be localised.
/// </summary>
[AttributeU... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Extensions.TypeExtensions;
namespace osu.Framework.Localisation
{
/// <summary>
/// Indicates that the members of an enum can b... |
Reset cookies before setting (otherwise merges existing with new) | namespace AngleSharp.Services.Default
{
using System;
using System.Net;
/// <summary>
/// Represents the default cookie service. This class can be inherited.
/// </summary>
public class MemoryCookieService : ICookieService
{
readonly CookieContainer _container;
/// <summar... | namespace AngleSharp.Services.Default
{
using System;
using System.Net;
/// <summary>
/// Represents the default cookie service. This class can be inherited.
/// </summary>
public class MemoryCookieService : ICookieService
{
readonly CookieContainer _container;
/// <summar... |
Fix error with fastest lap ranking | using ErgastApi.Client.Attributes;
using ErgastApi.Responses;
using ErgastApi.Responses.Models;
namespace ErgastApi.Requests
{
public abstract class StandardRequest<TResponse> : ErgastRequest<TResponse> where TResponse : ErgastResponse
{
[UrlSegment("constructors")]
public virtual string Constr... | using ErgastApi.Client.Attributes;
using ErgastApi.Responses;
using ErgastApi.Responses.Models;
namespace ErgastApi.Requests
{
public abstract class StandardRequest<TResponse> : ErgastRequest<TResponse> where TResponse : ErgastResponse
{
[UrlSegment("constructors")]
public virtual string Constr... |
Remove permission request to storage | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// 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... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// 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... |
Fix main window not displaying map difficulty when watching | using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfeaces;
using osu_StreamCompanion.Code.Windows;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window
{
public class WindowDataGetter :IModule,IMapDataGetter,IMainWindowUpdater
{
private MainWindowUpdater _ma... | using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfeaces;
using osu_StreamCompanion.Code.Windows;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Window
{
public class WindowDataGetter :IModule,IMapDataGetter,IMainWindowUpdater
{
private MainWindowUpdater _ma... |
Fix macOS plataform Unit Testing | using System;
using System.IO;
namespace Hangfire.LiteDB.Test.Utils
{
#pragma warning disable 1591
public static class ConnectionUtils
{
private const string Ext = "db";
private static string GetConnectionString()
{
return Path.GetFullPath(string.Format("Hangfire-L... | using System;
using System.IO;
namespace Hangfire.LiteDB.Test.Utils
{
#pragma warning disable 1591
public static class ConnectionUtils
{
private const string Ext = "db";
private static string GetConnectionString()
{
var pathDb = Path.GetFullPath(string.Format("Hang... |
Fix my idiotic Coroutine firing | using System;
using System.Collections;
using UnityEngine;
public class ClockText : MonoBehaviour
{
private TextMesh _textMesh = null;
private void Awake()
{
_textMesh = GetComponent<TextMesh>();
}
private void Update()
{
StartCoroutine(UpdatePerSecond());
}
private ... | using System;
using System.Collections;
using UnityEngine;
public class ClockText : MonoBehaviour
{
private TextMesh _textMesh = null;
private void Awake()
{
_textMesh = GetComponent<TextMesh>();
}
private void OnEnable()
{
StartCoroutine(UpdatePerSecond());
}
privat... |
Add logging to home controller. | using Akka.Actor;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace TrivialWebApiWithActor.Web
{
public class GreetController
: Controller
{
readonly IActorRef _greeter;
public GreetController(IActorRef greeter)
{
_greeter = greeter;
}
... | using Akka.Actor;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;
namespace TrivialWebApiWithActor.Web
{
public class GreetController
: Controller
{
readonly IActorRef _greeter;
public GreetController(ILogger<GreetController> logger, IA... |
Add a test helper that allows marking spans in the query text | using System;
using NQuery.Data.Samples;
namespace NQuery.Authoring.UnitTests
{
internal static class CompilationFactory
{
private static readonly DataContext DataContext = DataContextFactory.CreateNorthwind();
public static Compilation CreateQuery(string query)
{
int posi... | using System;
using NQuery.Data.Samples;
using NQuery.Text;
namespace NQuery.Authoring.UnitTests
{
internal static class CompilationFactory
{
private static readonly DataContext DataContext = DataContextFactory.CreateNorthwind();
public static Compilation CreateQuery(string query)
{
... |
Set obsolete Bus.Defer extension methods to error rather than warn. We'll remove these shortly. | using System;
using System.Threading.Tasks;
using Nimbus.MessageContracts;
namespace Nimbus
{
public static class BackwardCompatibilityAdaptorExtensions
{
[Obsolete("Deprecated in favour of .SendAt(...) and .SendAfter(...) methods. This adaptor method will be removed in a future release.")]
pu... | using System;
using System.Threading.Tasks;
using Nimbus.MessageContracts;
namespace Nimbus
{
public static class BackwardCompatibilityAdaptorExtensions
{
[Obsolete("Deprecated in favour of .SendAt(...) and .SendAfter(...) methods. This adaptor method will be removed in a future release.", true)]
... |
Fix bug: delete likes to the calendar with the specified id | using System;
using System.Collections.Generic;
using System.Linq;
using Oogstplanner.Data;
using Oogstplanner.Models;
namespace Oogstplanner.Services
{
public class CalendarLikingService : ServiceBase, ICalendarLikingService
{
readonly IUserService userService;
public CalendarLikingService(... | using System;
using System.Collections.Generic;
using System.Linq;
using Oogstplanner.Data;
using Oogstplanner.Models;
namespace Oogstplanner.Services
{
public class CalendarLikingService : ServiceBase, ICalendarLikingService
{
readonly IUserService userService;
public CalendarLikingService(... |
Remove expression type (not supported in unity) | using System.Collections.Generic;
using HarryPotterUnity.Cards.Interfaces;
using JetBrains.Annotations;
using UnityEngine;
namespace HarryPotterUnity.Cards.Generic
{
[UsedImplicitly]
public class Lesson : GenericCard, IPersistentCard {
public enum LessonTypes
{
Creatures = 0, Char... | using System.Collections.Generic;
using HarryPotterUnity.Cards.Interfaces;
using JetBrains.Annotations;
using UnityEngine;
namespace HarryPotterUnity.Cards.Generic
{
[UsedImplicitly]
public class Lesson : GenericCard, IPersistentCard {
public enum LessonTypes
{
Creatures = 0, Char... |
Use faster polling for handling dashboard buttons. | using Microsoft.Azure.Jobs.Host.Bindings;
using Microsoft.Azure.Jobs.Host.Executors;
using Microsoft.Azure.Jobs.Host.Indexers;
using Microsoft.Azure.Jobs.Host.Listeners;
using Microsoft.Azure.Jobs.Host.Loggers;
using Microsoft.WindowsAzure.Storage.Queue;
namespace Microsoft.Azure.Jobs.Host.Queues.Listeners
{
inte... | using System;
using Microsoft.Azure.Jobs.Host.Bindings;
using Microsoft.Azure.Jobs.Host.Executors;
using Microsoft.Azure.Jobs.Host.Indexers;
using Microsoft.Azure.Jobs.Host.Listeners;
using Microsoft.Azure.Jobs.Host.Loggers;
using Microsoft.WindowsAzure.Storage.Queue;
namespace Microsoft.Azure.Jobs.Host.Queues.Listen... |
Send data back to client. | using ML.TypingClassifier.Models;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace ML.TypingClassifier.Controllers
{
[RoutePrefix("sink")]
public class SinkController : ... | using ML.TypingClassifier.Models;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace ML.TypingClassifier.Controllers
{
[RoutePrefix("sink")]
public class SinkController : ... |
Add very basic REST methods for todomvc using in-memory list | using System;
using System.Collections.Generic;
using System.Linq;
using NServiceMVC;
using AttributeRouting;
namespace NServiceMVC.Examples.Todomvc.Controllers
{
public class TodosController : ServiceController
{
[GET("todos")]
public IEnumerable<Models.Todo> Index()
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using NServiceMVC;
using AttributeRouting;
using System.ComponentModel;
namespace NServiceMVC.Examples.Todomvc.Controllers
{
public class TodosController : ServiceController
{
private static IList<Models.Todo> Todos; // in-m... |
Add tracks for Twitter crawler | using System.Collections.Generic;
namespace Twitter.Streaming.Configurations
{
public interface ITwitterListnerConfiguration
{
ITwitterCredential Credentials { get; }
IEnumerable<string> Tracks { get; }
IEnumerable<int> Languages { get; }
}
public class TwitterListnerConfigu... | using System.Collections.Generic;
namespace Twitter.Streaming.Configurations
{
public interface ITwitterListnerConfiguration
{
ITwitterCredential Credentials { get; }
IEnumerable<string> Tracks { get; }
IEnumerable<int> Languages { get; }
}
public class TwitterListnerConfigu... |
Use the fully qualified name when searching for complete declarations. | using System;
using CppSharp.Types;
namespace CppSharp.Passes
{
public class ResolveIncompleteDeclsPass : TranslationUnitPass
{
public ResolveIncompleteDeclsPass()
{
}
public override bool VisitClassDecl(Class @class)
{
if (@class.Ignore)
re... | using System;
using CppSharp.Types;
namespace CppSharp.Passes
{
public class ResolveIncompleteDeclsPass : TranslationUnitPass
{
public ResolveIncompleteDeclsPass()
{
}
public override bool VisitClassDecl(Class @class)
{
if (@class.Ignore)
re... |
Add comment about checking for PowerShell DLL loaded. | using System;
using System.Diagnostics;
using O365.Security.ETW;
namespace hiddentreasure_etw_demo
{
public static class PowerShellImageLoad
{
public static UserTrace CreateTrace()
{
var filter = new EventFilter(Filter
.EventIdIs(5)
.And(UnicodeStrin... | using System;
using System.Diagnostics;
using O365.Security.ETW;
namespace hiddentreasure_etw_demo
{
public static class PowerShellImageLoad
{
public static UserTrace CreateTrace()
{
// Unfortunately, this detection won't work for
// processes that *already* have System... |
Change log level from warning to information | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;
using IdentityServer4.Models;
namespace IdentityServer4.Validation
{
//... | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;
using IdentityServer4.Models;
namespace IdentityServer4.Validation
{
//... |
Fix unit link for vehicles | @model IEnumerable<Unit>
<div class="page-header">
<h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default btn-xs" })</h1>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th>
<t... | @model IEnumerable<Unit>
<div class="page-header">
<h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default btn-xs" })</h1>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th>
<t... |
Add constructors to WebHost settings. | using System.IO;
using System.Web.Hosting;
namespace NuGet.Lucene.Web
{
public class NuGetWebApiWebHostSettings : NuGetWebApiSettings
{
protected override string MapPathFromAppSetting(string key, string defaultValue)
{
var path = base.GetAppSetting(key, defaultValue);
i... | using System.Collections.Specialized;
using System.IO;
using System.Web.Hosting;
namespace NuGet.Lucene.Web
{
public class NuGetWebApiWebHostSettings : NuGetWebApiSettings
{
public NuGetWebApiWebHostSettings(string prefix) : base(prefix)
{
}
public NuGetWebApiWebHostSettings(s... |
Support binding as the parameter value | using Sakuno.UserInterface.ObjectOperations;
using System;
using System.Windows.Markup;
namespace Sakuno.UserInterface.Commands
{
public class InvokeMethodExtension : MarkupExtension
{
string r_Method;
object r_Parameter;
public InvokeMethodExtension(string rpMethod) : this(rpMethod,... | using Sakuno.UserInterface.ObjectOperations;
using System;
using System.Windows.Data;
using System.Windows.Markup;
namespace Sakuno.UserInterface.Commands
{
public class InvokeMethodExtension : MarkupExtension
{
string r_Method;
object r_Parameter;
public InvokeMethodExtension(string... |
Add auth endpoint to API | using BatteryCommander.Web.Models;
using BatteryCommander.Web.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using System.Net;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers.API
{
public class UsersController : ApiController
{
private rea... | using BatteryCommander.Web.Models;
using BatteryCommander.Web.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using System;
using System.Net;
using System.Net.Http;
using System.Tex... |
Add url short format uniqueness | using System;
using System.Collections.Generic;
using System.Linq;
using UrlShortenerApi.Data;
using UrlShortenerApi.Models;
namespace UrlShortenerApi.Repositories
{
public class UrlRepository : IUrlRepository
{
ApplicationDbContext _context;
public UrlRepository(ApplicationDbContext context)
... | using System;
using System.Collections.Generic;
using System.Linq;
using UrlShortenerApi.Data;
using UrlShortenerApi.Models;
namespace UrlShortenerApi.Repositories
{
public class UrlRepository : IUrlRepository
{
ApplicationDbContext _context;
public UrlRepository(ApplicationDbContext context)
... |
Add debug info for failed import. |
using System.Collections.Generic;
using DataHelpers.Contracts;
namespace DataHelpers {
/// <summary>
/// Base class validator. All validators should be derived from this class.
/// </summary>
public class ValidationRunner {
/// <summary>
/// Check to see if the current valida... |
using System.Collections.Generic;
using DataHelpers.Contracts;
namespace DataHelpers {
/// <summary>
/// Base class validator. All validators should be derived from this class.
/// </summary>
public class ValidationRunner {
/// <summary>
/// Check to see if the current v... |
Fix a Bug where Merging Sections causes Problems | using System.Linq;
using GekkoAssembler.IntermediateRepresentation;
namespace GekkoAssembler.Optimizers
{
public class WriteDataOptimizer : IOptimizer
{
public IRCodeBlock Optimize(IRCodeBlock block)
{
var units = block.Units;
var replaced = true;
while (re... | using System.Linq;
using GekkoAssembler.IntermediateRepresentation;
namespace GekkoAssembler.Optimizers
{
public class WriteDataOptimizer : IOptimizer
{
public IRCodeBlock Optimize(IRCodeBlock block)
{
var units = block.Units;
var replaced = true;
while (re... |
Add playlist tags hidden property | using System.Xml.Serialization;
namespace SevenDigital.Api.Schema.Playlists.Response.Endpoints
{
public class PlaylistTag
{
[XmlElement("name")]
public string Name { get; set; }
}
} | using System.Xml.Serialization;
namespace SevenDigital.Api.Schema.Playlists.Response.Endpoints
{
public class PlaylistTag
{
[XmlElement("name")]
public string Name { get; set; }
[XmlElement("hidden")]
public bool Hidden { get; set; }
}
} |
Support for Inno Setup 6 | using System.IO;
using Microsoft.Win32;
namespace Cosmos.Build.Builder.Services
{
internal class InnoSetupService : IInnoSetupService
{
private const string InnoSetupRegistryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1";
public string GetInnoSetupInstallationPa... | using System.IO;
using Microsoft.Win32;
namespace Cosmos.Build.Builder.Services
{
internal class InnoSetupService : IInnoSetupService
{
private const string InnoSetupRegistryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 6_is1";
public string GetInnoSetupInstallationPa... |
Test only on same thread. Multi-threaded test needs to be platform-specific. | using System;
using NUnit.Framework;
using Realms;
using System.Threading;
using System.IO;
namespace IntegrationTests.Shared
{
[TestFixture]
public class NotificationTests
{
private string _databasePath;
private Realm _realm;
private void WriteOnDifferentThread(Action<Realm> acti... | using System;
using NUnit.Framework;
using Realms;
using System.Threading;
using System.IO;
namespace IntegrationTests.Shared
{
[TestFixture]
public class NotificationTests
{
private string _databasePath;
private Realm _realm;
[SetUp]
public void Setup()
{
... |
Use GetRandomFileName when a specific extension is needed | using System;
using System.IO;
namespace NuGetPe
{
public sealed class TemporaryFile : IDisposable
{
public TemporaryFile(Stream stream, string? extension = null)
{
if (stream == null)
throw new ArgumentNullException(nameof(stream));
if (string.IsNullOr... | using System;
using System.IO;
namespace NuGetPe
{
public sealed class TemporaryFile : IDisposable
{
public TemporaryFile(Stream stream, string? extension = null)
{
if (stream == null)
throw new ArgumentNullException(nameof(stream));
if (string.IsNullOr... |
Refactor to not use unity's lifecycle event as a method directly | using UnityEngine;
using System.Collections;
public class DamageDealer : MonoBehaviour {
public float damageToDeal = 1;
// Use this for initialization
void OnCollisionStay2D(Collision2D col)
{
OnTriggerEnter2D(col.collider);
}
void OnTriggerStay2D(Collider2D col)
{
OnTrigger... | using UnityEngine;
using System.Collections;
public class DamageDealer : MonoBehaviour {
public float damageToDeal = 1;
void OnCollisionStay2D(Collision2D col)
{
handleCollision(col.collider);
}
void OnTriggerStay2D(Collider2D col)
{
handleCollision(col);
}
void OnCollisionEnte... |
Update GetCustomAttribute extensions to support taking in type. | namespace EPPlusEnumerable
{
using System;
using System.Reflection;
internal static class Extensions
{
public static T GetCustomAttribute<T>(this MemberInfo element, bool inherit) where T : Attribute
{
return (T)Attribute.GetCustomAttribute(element, typeof(T), inherit);
... | namespace EPPlusEnumerable
{
using System;
using System.Reflection;
internal static class Extensions
{
public static T GetCustomAttribute<T>(this MemberInfo element, Type type, bool inherit) where T : Attribute
{
var attr = (T)Attribute.GetCustomAttribute(element, typeof(T)... |
Add copyright header, make property readonly | using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.CodeAnalysis.Editor.UnitTests
{
internal static class TextEditorFactoryExtensions
{
publi... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using System;
namespace Microsoft.CodeAnalysis.Editor.UnitTests
{
internal ... |
Rework tests to not be visual and use headless game host | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Input;
using osu.Framework.Testing;
namespace osu.Framework.Tests.Platform
{
[TestFixture]
public class UserInputManag... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Platform;
namespace osu.Framework.Tests.Platform
{
[TestFixture]
public class UserInputM... |
Move exception handling below all the cases | // 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.Graphics;
using osuTK.Graphics;
namespace osu.Game.Overlays.Home.Friends
{
public class FriendsOnlineStatusItem : OverlayUpdateStreamIt... | // 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.Graphics;
using osuTK.Graphics;
namespace osu.Game.Overlays.Home.Friends
{
public class FriendsOnlineStatusItem : OverlayUpdateStreamIt... |
Fix mania not getting its own selection handler | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Edit.Blueprints;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using 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 System.Collections.Generic;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Edit.Blueprints;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.... |
Fix the bug that the config for NUnit was not in the correct folder | using System;
using System.IO;
using System.Linq;
namespace NBi.Service.RunnerConfig
{
class NUnitRunnerConfigBuilder : AbstractRunnerConfigBuilder
{
public NUnitRunnerConfigBuilder()
: base("NBi.config", "NUnit.nunit")
{
}
public NUnitRunnerConfigBu... | using System;
using System.IO;
using System.Linq;
namespace NBi.Service.RunnerConfig
{
class NUnitRunnerConfigBuilder : AbstractRunnerConfigBuilder
{
public NUnitRunnerConfigBuilder()
: base("NBi.config", "NUnit.nunit")
{
}
public NUnitRunnerConfigBu... |
Clear heart on returned heartbeat | using System;
using System.Threading;
using System.Threading.Tasks;
using Knapcode.CheckRepublic.Logic.Entities;
using Microsoft.EntityFrameworkCore;
namespace Knapcode.CheckRepublic.Logic.Business
{
public class HeartbeatService : IHeartbeatService
{
private readonly CheckContext _context;
p... | using System;
using System.Threading;
using System.Threading.Tasks;
using Knapcode.CheckRepublic.Logic.Entities;
using Microsoft.EntityFrameworkCore;
namespace Knapcode.CheckRepublic.Logic.Business
{
public class HeartbeatService : IHeartbeatService
{
private readonly CheckContext _context;
p... |
Update script injection tags to match what the scripts are expecting | using System;
using Glimpse.Common;
using Glimpse.Initialization;
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace Glimpse.Agent.Razor
{
[HtmlTargetElement("body")]
public class ScriptInjector : TagHelper
{
private readonly Guid _requestId;
private readonly ScriptOptions _scriptOp... | using System;
using Glimpse.Common;
using Glimpse.Initialization;
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace Glimpse.Agent.Razor
{
[HtmlTargetElement("body")]
public class ScriptInjector : TagHelper
{
private readonly Guid _requestId;
private readonly ScriptOptions _scriptOp... |
Add namespace for Response.Write extension. | using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Microsoft.AspNet.Mvc
{
public class SmartJsonResult : ActionResult
{
public SmartJsonResult() : base()
{
}
public JsonSerializerSettings Settings { get; set; }
public object Data... | using System;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Newtonsoft.Json;
namespace Microsoft.AspNet.Mvc
{
public class SmartJsonResult : ActionResult
{
public SmartJsonResult() : base()
{
}
public JsonSerializerSettings Settings { get; set; ... |
Update so it's once again in line with the interface and preferred paradigm (RegisterTrigger). | using System.Collections.Generic;
// Using directives for plugin use.
using MeidoCommon;
using System.ComponentModel.Composition;
[Export(typeof(IMeidoHook))]
public class MyClass : IMeidoHook
{
readonly IIrcComm irc;
public string Prefix { get; set; }
public string Name
{
get { return "MyCla... | using System.Collections.Generic;
// Using directives for plugin use.
using MeidoCommon;
using System.ComponentModel.Composition;
// IMeidoHook wants you to implement `Name`, `Version`, `Help` and the `Stop` method.
[Export(typeof(IMeidoHook))]
public class MyClass : IMeidoHook
{
public string Name
{
g... |
Revert "CV-500 Added ApprenticeshipCompleted to UserAction" | using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Messages.Events
{
public class EntityStateChangedEvent
{
public Guid CorrelationId { get; set; }
public UserAction StateChangeType { get; set; }
public string EntityType { get; set; }
public long E... | using System;
using SFA.DAS.CommitmentsV2.Types;
namespace SFA.DAS.CommitmentsV2.Messages.Events
{
public class EntityStateChangedEvent
{
public Guid CorrelationId { get; set; }
public UserAction StateChangeType { get; set; }
public string EntityType { get; set; }
public long E... |
Change ctor parameter from byte to ArraySegment<byte> | using System;
using System.Net;
namespace BmpListener.Bgp
{
public class IPAddrPrefix
{
public IPAddrPrefix(byte[] data, AddressFamily afi = AddressFamily.IP)
{
DecodeFromBytes(data, afi);
}
public byte Length { get; private set; }
public IPAddress Prefix {... | using System;
using System.Net;
namespace BmpListener.Bgp
{
public class IPAddrPrefix
{
public IPAddrPrefix(ArraySegment<byte> data, AddressFamily afi = AddressFamily.IP)
{
Length = data.Array[data.Offset];
var ipBytes = new byte[ByteLength - 1];
Array.Copy(... |
Remove hard coded variable name. | using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
namespace Junctionizer.UI.Columns
{
public partial class DependentOnFinalSizeColumn
{
public DependentOnFinalSizeColumn()
{
InitializeComponent();
}
public override BindingBase Binding
... | using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using Junctionizer.Model;
namespace Junctionizer.UI.Columns
{
public partial class DependentOnFinalSizeColumn
{
public DependentOnFinalSizeColumn()
{
InitializeComponent();
}
public ov... |
Use assignment instead of binding | // 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 osu.Framework.Graphics;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Shapes;
using osu.Framework.All... | // 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 osu.Framework.Graphics;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Shapes;
using osu.Framework.All... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.