Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Fix a unit test for new Delayer logic (immediate if possible) | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Mapsui.Geometries;
using Mapsui.Layers;
using Mapsui.Providers;
using NUnit.Framework;
namespace Mapsui.Tests.Fetcher
{
[TestFixture]
public class FeatureFetcherTests
{
[Test]
public void TestFeatureFetcher... | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Mapsui.Geometries;
using Mapsui.Layers;
using Mapsui.Providers;
using NUnit.Framework;
namespace Mapsui.Tests.Fetcher
{
[TestFixture]
public class FeatureFetcherTests
{
[Test]
public void TestFeatureFetcher... |
Fix binary GUIDs showing up in Mongo optionlists | // Copyright (c) 2016 SIL International
// This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
using System;
namespace LfMerge.LanguageForge.Model
{
public class LfOptionListItem
{
public Guid? Guid { get; set; }
public string Key { get; set; }
public string Value { get; set; ... | // Copyright (c) 2016 SIL International
// This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
using System;
namespace LfMerge.LanguageForge.Model
{
public class LfOptionListItem
{
[BsonRepresentation(BsonType.String... |
Change field to local variable | using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.IO;
namespace osu.Game.Tournament.Screens.Setup
{
internal class TournamentSwitcher : ActionableInfo
{
private OsuDropdown<string> dropdown;
private string startupTour... | using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.IO;
namespace osu.Game.Tournament.Screens.Setup
{
internal class TournamentSwitcher : ActionableInfo
{
private OsuDropdown<string> dropdown;
[Resolved]
private... |
Add note about toast height | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
namespace osu.Game.Overlays.OSD
{
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
namespace osu.Game.Overlays.OSD
{
... |
Use references in the documentation (this also removes the spelling warning). | // Copyright 2014 by PeopleWare n.v..
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law ... | // Copyright 2014 by PeopleWare n.v..
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law ... |
Change grouping title colours to match white background | // Copyright (c) 2007-2018 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;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Tournament.Screens.Ladder.Components
{
pu... | // Copyright (c) 2007-2018 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;
using osu.Game.Graphics.Sprites;
using OpenTK.Graphics;
namespace osu.Game.Tournament.Screens.Lad... |
Fix link to account page while in admin area | <div class="user-display">
@if (!User.Identity.IsAuthenticated)
{
string returnUrl = ViewData.ContainsKey(Constants.ReturnUrlViewDataKey) ? (string)ViewData[Constants.ReturnUrlViewDataKey] : Request.RawUrl;
<span class="welcome">
<a href="@Url.LogOn(returnUrl)" title="Register for a... | <div class="user-display">
@if (!User.Identity.IsAuthenticated)
{
string returnUrl = ViewData.ContainsKey(Constants.ReturnUrlViewDataKey) ? (string)ViewData[Constants.ReturnUrlViewDataKey] : Request.RawUrl;
<span class="welcome">
<a href="@Url.LogOn(returnUrl)" title="Register for a... |
Fix order of title/message in dialog | using Stylet;
using SyncTrayzor.Localization;
using SyncTrayzor.SyncThing;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace SyncTrayzor.Utils
{
public static class SafeSyncthingExtension... | using Stylet;
using SyncTrayzor.Localization;
using SyncTrayzor.SyncThing;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace SyncTrayzor.Utils
{
public static class SafeSyncthingExtension... |
Add DX11Layout and DX11Shader as dx resources | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX.Direct3D11;
using VVVV.PluginInterfaces.V1;
using FeralTic.DX11;
using FeralTic.DX11.Resources;
namespace VVVV.DX11
{
[Obsolete("This does access IPluginIO, which fails in case of multi core access, this will be ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX.Direct3D11;
using VVVV.PluginInterfaces.V1;
using FeralTic.DX11;
using FeralTic.DX11.Resources;
namespace VVVV.DX11
{
[Obsolete("This does access IPluginIO, which fails in case of multi core access, this will be ... |
Add sanity checking for AVPlayerLayer | using AVFoundation;
using Plugin.MediaManager.Abstractions;
using UIKit;
namespace Plugin.MediaManager.iOS
{
public class VideoSurface : UIView, IVideoSurface
{
public override void LayoutSubviews()
{
foreach (var layer in Layer.Sublayers)
{
var avPlayerLayer = layer as AVPlayerLayer;
if (a... | using System;
using AVFoundation;
using CoreGraphics;
using Foundation;
using Plugin.MediaManager.Abstractions;
using UIKit;
namespace Plugin.MediaManager.iOS
{
public class VideoSurface : UIView, IVideoSurface
{
public override void LayoutSubviews()
{
base.LayoutSubviews();
if (Layer.Sublayers == ... |
Fix user name detection for some regions | // Copyright (c) Gothos
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Tera.Game.Messages
{
public class LoginServerMessage : ParsedMessage
{
public EntityId Id { get; private set; }
public uint PlayerId { get; private set; }
... | // Copyright (c) Gothos
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Tera.Game.Messages
{
public class LoginServerMessage : ParsedMessage
{
public EntityId Id { get; private set; }
public uint PlayerId { get; private set; }
... |
Disable adjusting volume via "select next" and "select previous" as fallbacks | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Game.Input.Bindings;
namespace osu.Game.... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Game.Input.Bindings;
namespace osu.Game.... |
Create filter when -* is not included | using System.Collections.Generic;
using System.Linq;
namespace Giles.Core.Configuration
{
public class Filter
{
public Filter() { }
public Filter(string convertToFilter)
{
foreach (var entry in FilterLookUp.Where(entry => convertToFilter.Contains(entry.Key)))
{
... | using System.Collections.Generic;
using System.Linq;
namespace Giles.Core.Configuration
{
public class Filter
{
public Filter() { }
public Filter(string convertToFilter)
{
foreach (var entry in FilterLookUp.Where(entry => convertToFilter.Contains(entry.Key)))
{
... |
Fix message on project schedule not configured | using System.ComponentModel;
namespace JoinRpg.Web.Models.Schedules
{
public enum ScheduleConfigProblemsViewModel
{
//TODO поменять сообщение, когда сделаем настроечный экран
[Description("Расписание не настроено для этого проекта, обратитесь в техподдержку")]
FieldsNotSet,
[Des... | using System.ComponentModel;
namespace JoinRpg.Web.Models.Schedules
{
public enum ScheduleConfigProblemsViewModel
{
[Description("Расписание не настроено для этого проекта. Вам необходимо добавить поля для помещения и расписания.")]
FieldsNotSet,
[Description("У полей, привязанных к рас... |
Make comment ID public for test | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class CommentDel... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class CommentDel... |
Fix bug in PMs where incoming PM would cause a crash | using System;
using AutomaticTypeMapper;
using EOLib.Domain.Chat;
using EOLib.Domain.Login;
using EOLib.Net;
namespace EOLib.PacketHandlers.Chat
{
[AutoMappedType]
public class PrivateMessageHandler : PlayerChatByNameBase
{
private readonly IChatRepository _chatRepository;
public override... | using System;
using AutomaticTypeMapper;
using EOLib.Domain.Chat;
using EOLib.Domain.Login;
using EOLib.Net;
namespace EOLib.PacketHandlers.Chat
{
[AutoMappedType]
public class PrivateMessageHandler : PlayerChatByNameBase
{
private readonly IChatRepository _chatRepository;
public override... |
Change main to use test003 | using System;
using compiler.frontend;
namespace Program
{
class Program
{
//TODO: adjust main to use the parser when it is complete
static void Main(string[] args)
{
// using (Lexer l = new Lexer(@"../../testdata/big.txt"))
// {
// Token t;
// ... | using System;
using compiler.frontend;
namespace Program
{
class Program
{
//TODO: adjust main to use the parser when it is complete
static void Main(string[] args)
{
// using (Lexer l = new Lexer(@"../../testdata/big.txt"))
// {
// Token t;
// ... |
Fix context menu sub-menu display | // 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 osuTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Effects... | // 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 osuTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Effects... |
Fix e2e faild because api change | using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.OData.Extensions;
using WebStack.QA.Test.OData.SxS2.ODataV3.Extensions;
namespace WebStack.QA.Test.OData.SxS2.ODataV3
{
public static class ODataV3WebApiConfig
{
public static void Register(HttpConfiguration config)
... | using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.OData.Extensions;
using WebStack.QA.Test.OData.SxS2.ODataV3.Extensions;
namespace WebStack.QA.Test.OData.SxS2.ODataV3
{
public static class ODataV3WebApiConfig
{
public static void Register(HttpConfiguration config)
... |
Modify primitive driver to send x, y, and z linear effort values. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BadgerJaus.Services.Core;
using BadgerJaus.Messages.PrimitiveDriver;
using BadgerJaus.Util;
using BadgerControlModule.Models;
namespace BadgerControlModule.Utils
{
class Remote... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BadgerJaus.Services.Core;
using BadgerJaus.Messages.PrimitiveDriver;
using BadgerJaus.Util;
using BadgerControlModule.Models;
namespace BadgerControlModule.Utils
{
class Remote... |
Fix the speed of the canvas width scaling by left/right arrow keys | using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.UI;
public class CanvasWidthScalePresenter : MonoBehaviour
{
[SerializeField]
CanvasEvents canvasEvents;
[SerializeField]
Slider canvasWidthScaleController;
NotesEditorModel model;
void Awake()
{
model = Note... | using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.UI;
public class CanvasWidthScalePresenter : MonoBehaviour
{
[SerializeField]
CanvasEvents canvasEvents;
[SerializeField]
Slider canvasWidthScaleController;
NotesEditorModel model;
void Awake()
{
model = Note... |
Update unity networking for NETWORK_PHOTON. Updates for iTunes 1.2 build update. Advertiser id to vendor id for game analytics and update textures/showing fireworks/camera sorting. | using System.Collections;
using Engine;
using Engine.Data;
using Engine.Networking;
using Engine.Utility;
using UnityEngine;
namespace Engine.Game.Controllers {
[RequireComponent(typeof(ThirdPersonController))]
public class ThirdPersonPushBodies : BaseEngineBehavior {
public float pushPower = 0.5f;
... | using System.Collections;
using Engine;
using Engine.Data;
using Engine.Networking;
using Engine.Utility;
using UnityEngine;
namespace Engine.Game.Controllers {
#if NETWORK_PHOTON
[RequireComponent(typeof(ThirdPersonController))]
public class ThirdPersonPushBodies : BaseEngineBehavior {
public float pu... |
Use ExpectedConditions for element exists check | using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using System;
using TechTalk.SpecFlow;
using Xunit;
namespace Web.UI.Tests
{
[Binding]
public class WebBrowserWaitSteps : WebDriverStepsBase
{
[When("I wait for element with id (.*) to exist")]
public void IWaitForElementWithIdToExis... | using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using System;
using TechTalk.SpecFlow;
using Xunit;
namespace Web.UI.Tests
{
[Binding]
public class WebBrowserWaitSteps : WebDriverStepsBase
{
[When("I wait for element with id (.*) to exist")]
public void IWaitForElementWithIdToExis... |
Use new price providers and degare SmartBit | using NBitcoin;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
using WalletWasabi.Interfaces;
using WalletWasabi.Logging;
using WalletWasabi.WebClients.BlockchainInfo;
using WalletWasabi.WebClients.Coinbase;
using WalletWasabi.WebClients.Gemini;
using Wa... | using NBitcoin;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
using WalletWasabi.Interfaces;
using WalletWasabi.Logging;
using WalletWasabi.WebClients.BlockchainInfo;
using WalletWasabi.WebClients.Coinbase;
using WalletWasabi.WebClients.Gemini;
using Wa... |
Update Support's email address on contact page. Was breaking the world, so it had to be done. | @{
ViewBag.Title = "Contact";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.co... | @{
ViewBag.Title = "Contact";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@wechangedt... |
Use autogenerated prop for Random instance | using System;
namespace DiceApi.Core
{
public class Die
{
/// <summary>
/// Instance of Random that we'll instantiate with the die
/// and use within the Roll() method.
/// </summary>
private readonly Random rng;
/// <summary>
/// Initializes a new inst... | using System;
namespace DiceApi.Core
{
public class Die
{
/// <summary>
/// Initializes a new instance of <see cref="Die" /> with a
/// specified number of sides.
/// </summary>
/// <param name="sides">Number of sides on the die.</param>
public Die(int sides)
... |
Fix checkmark being hidden after clicking current waveform opacity setting | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Bindables;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Sc... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Bindables;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Sc... |
Update file version to 2.2.1.4 | using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2017";
public const string... | using System;
namespace Xamarin.Forms.GoogleMaps.Internals
{
internal class ProductInformation
{
public const string Author = "amay077";
public const string Name = "Xamarin.Forms.GoogleMaps";
public const string Copyright = "Copyright © amay077. 2016 - 2017";
public const string... |
Fix for search by rank | using BatteryCommander.Web.Models;
using BatteryCommander.Web.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = true)]
public class SSDCon... | using BatteryCommander.Web.Models;
using BatteryCommander.Web.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers
{
[Authorize, ApiExplorerSettings(IgnoreApi = true)]
public class SSDCon... |
Add IEndpoint restriction to RegisterEndpointDeliveryService. | using System;
using System.Collections.Generic;
using System.Linq;
namespace Verdeler
{
public class Distributor<TDistributable> : IDistributor<TDistributable> where TDistributable : IDistributable
{
private readonly List<IEndpointRepository> _endpointRepositories
= new List<IEndpointRepos... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Verdeler
{
public class Distributor<TDistributable> : IDistributor<TDistributable> where TDistributable : IDistributable
{
private readonly List<IEndpointRepository> _endpointRepositories
= new List<IEndpointRepos... |
Add copyright info in DLL properties. | 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("Eli... | 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("Eli... |
Support for basic auth in web api & odata | using System.Web.Http;
using Bit.WebApi.ActionFilters;
using Bit.WebApi.Contracts;
namespace Bit.WebApi.Implementations
{
public class GlobalHostAuthenticationFilterProvider : IWebApiConfigurationCustomizer
{
public virtual void CustomizeWebApiConfiguration(HttpConfiguration webApiConfiguration)
... | using System.Web.Http;
using Bit.WebApi.ActionFilters;
using Bit.WebApi.Contracts;
namespace Bit.WebApi.Implementations
{
public class GlobalHostAuthenticationFilterProvider : IWebApiConfigurationCustomizer
{
public virtual void CustomizeWebApiConfiguration(HttpConfiguration webApiConfiguration)
... |
Fix crash when creating a new project if osu!'s folder could not be found. | using Microsoft.Win32;
using System.IO;
namespace StorybrewEditor.Util
{
public static class OsuHelper
{
public static string GetOsuPath()
{
using (var registryKey = Registry.ClassesRoot.OpenSubKey("osu\\DefaultIcon"))
{
if (registryKey == null)
... | using Microsoft.Win32;
using System;
using System.IO;
namespace StorybrewEditor.Util
{
public static class OsuHelper
{
public static string GetOsuPath()
{
using (var registryKey = Registry.ClassesRoot.OpenSubKey("osu\\DefaultIcon"))
{
if (registryKey == ... |
Add version information and description to the 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("Pat... | 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("Pat... |
Change color to read to test sub-module. | using UnityEngine;
using System.Collections;
public class RandomColor : MonoBehaviour {
void Start () {
// var c = new Color(Random.value, Random.value, Random.value, 1f);
var c = new Color(0, 0, 1f, 1f);
GetComponent<Renderer>().material.color = c;
}
}
| using UnityEngine;
using System.Collections;
public class RandomColor : MonoBehaviour {
void Start () {
// var c = new Color(Random.value, Random.value, Random.value, 1f);
var c = new Color(1f, 0, 0f, 1f);
GetComponent<Renderer>().material.color = c;
}
}
|
Make sure required services are registered | using Glimpse.Agent;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Framework.OptionsModel;
using Glimpse.Server.Web;
using Glimpse.Web;
using Microsoft.Extensions.OptionsModel;
namespace Glimpse
{
public class GlimpseServerWebServices
{
public static IServiceCollection GetDefaultServ... | using Glimpse.Agent;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Framework.OptionsModel;
using Glimpse.Server.Web;
using Glimpse.Web;
using Microsoft.Extensions.OptionsModel;
namespace Glimpse
{
public class GlimpseServerWebServices
{
public static IServiceCollection GetDefaultServ... |
Update Create Comment Ajax Form | @model BlogSystem.Web.ViewModels.Comment.CommentViewModel
<h3>Leave a Comment</h3>
@if (User.Identity.IsAuthenticated)
{
using (Ajax.BeginForm("Create", "Comments", new { id = ViewData["id"].ToString() }, new AjaxOptions { HttpMethod = "Post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "comments", O... | @model BlogSystem.Web.ViewModels.Comment.CommentViewModel
<h3>Leave a Comment</h3>
@if (User.Identity.IsAuthenticated)
{
using (Ajax.BeginForm("Create", "Comments", new { id = ViewData["id"].ToString() }, new AjaxOptions { HttpMethod = "Post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "comments", O... |
Check the value length to avoid exceptions. | using System;
using System.Text;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Shared;
namespace Titanium.Web.Proxy.Extensions
{
internal static class HttpWebResponseExtensions
{
/// <summary>
/// Gets the character encoding of response from response headers
/// </summary>
... | using System;
using System.Text;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Shared;
namespace Titanium.Web.Proxy.Extensions
{
internal static class HttpWebResponseExtensions
{
/// <summary>
/// Gets the character encoding of response from response headers
/// </summary>
... |
Add Register*ChatMessage methods to interface | using ChessDotNet;
using ChessVariantsTraining.Models.Variant960;
namespace ChessVariantsTraining.MemoryRepositories.Variant960
{
public interface IGameRepoForSocketHandlers
{
Game Get(string id);
void RegisterMove(Game subject, Move move);
void RegisterGameOutcome(Game subject, stri... | using ChessDotNet;
using ChessVariantsTraining.Models.Variant960;
namespace ChessVariantsTraining.MemoryRepositories.Variant960
{
public interface IGameRepoForSocketHandlers
{
Game Get(string id);
void RegisterMove(Game subject, Move move);
void RegisterGameOutcome(Game subject, stri... |
Fix access denied issue when access process information in RemoteProcessService | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSocket.SocketServiceCore.Command;
using System.Diagnostics;
namespace RemoteProcessService.Command
{
public class LIST : ICommand<RemotePrcessSession>
{
#region ICommand<RemotePrcessSession> Mem... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSocket.SocketServiceCore.Command;
using System.Diagnostics;
namespace RemoteProcessService.Command
{
public class LIST : ICommand<RemotePrcessSession>
{
#region ICommand<RemotePrcessSession> Mem... |
Hide row when ColumnFilter is false | @using Mvc.JQuery.Datatables
@model DataTableVm
<table id="@Model.Id" class="display" >
<thead>
<tr>
@foreach (var column in Model.Columns)
{
<th>@column</th>
}
</tr>
<tr>
@foreach (var column in Model.Columns)
{
... | @using Mvc.JQuery.Datatables
@model DataTableVm
<table id="@Model.Id" class="display" >
<thead>
<tr>
@foreach (var column in Model.Columns)
{
<th>@column</th>
}
</tr>
@if (Model.ColumnFilter)
{
<tr>
@for... |
Fix incorrect formatting for switch/case | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Screens.Select.Leaderboards;
using osu.Framework.Graphics.... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Screens.Select.Leaderboards;
using osu.Framework.Graphics.... |
Add comments explaining behavior of DependencyContext.Default | using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.Extensions.DependencyModel;
namespace Serilog.Settings.Configuration.Assemblies
{
abstract class AssemblyFinder
{
public abstract IReadOnlyList<AssemblyName> FindAssembliesContainingName(string nameToFind);
... | using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.Extensions.DependencyModel;
namespace Serilog.Settings.Configuration.Assemblies
{
abstract class AssemblyFinder
{
public abstract IReadOnlyList<AssemblyName> FindAssembliesContainingName(string nameToFind);
... |
Make UserInputManager test much more simple | // 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;
using osu.Framework.Testing;
namespace osu.Framework.Tests.Platform
{
[TestFixture... | // 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... |
Remove unnecessary local definition of colour logic from taiko judgement | // 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.Rulesets.Objects.Drawables;
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Framework.Graphics;
usi... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Taiko.UI
{
/// <summary>
... |
Improve performance when getting a KH2 message | using OpenKh.Kh2;
using OpenKh.Kh2.Messages;
using System.Collections.Generic;
using System.Linq;
namespace OpenKh.Engine
{
public class Kh2MessageProvider : IMessageProvider
{
private List<Msg.Entry> _messages;
public IMessageEncoder Encoder { get; set; } = Encoders.InternationalSystem;
... | using OpenKh.Kh2;
using OpenKh.Kh2.Messages;
using System.Collections.Generic;
using System.Linq;
namespace OpenKh.Engine
{
public class Kh2MessageProvider : IMessageProvider
{
private Dictionary<int, byte[]> _messages = new Dictionary<int, byte[]>();
public IMessageEncoder Encoder { get; set... |
Add index to Action column | // 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.Input.Bindings;
using osu.Game.Rulesets;
using SQLite.Net.Attributes;
using SQLiteNetExtensions.Attributes;
namespace osu.Game.Input.Binding... | // 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.Input.Bindings;
using osu.Game.Rulesets;
using SQLite.Net.Attributes;
using SQLiteNetExtensions.Attributes;
namespace osu.Game.Input.Binding... |
Unify common options with CppSharp. | using CppSharp;
using CppSharp.Generators;
namespace MonoEmbeddinator4000
{
public enum CompilationTarget
{
SharedLibrary,
StaticLibrary,
Application
}
public class Options
{
public Options()
{
Project = new Project();
... | using CppSharp;
using CppSharp.Generators;
namespace MonoEmbeddinator4000
{
public enum CompilationTarget
{
SharedLibrary,
StaticLibrary,
Application
}
public class Options : DriverOptions
{
public Options()
{
Project = new Proje... |
Allow connections to MongoDB 1.5.2+ that now returns 'ok' in the status message as a boolean, not a decimal | using Norm.Configuration;
using Norm.BSON;
using System.Collections.Generic;
using System.Linq;
namespace Norm.Responses
{
/// <summary>
/// Represents a message with an Ok status
/// </summary>
public class BaseStatusMessage : IExpando
{
private Dictionary<string, object> _properties = new... | using Norm.Configuration;
using Norm.BSON;
using System.Collections.Generic;
using System.Linq;
namespace Norm.Responses
{
/// <summary>
/// Represents a message with an Ok status
/// </summary>
public class BaseStatusMessage : IExpando
{
private Dictionary<string, object> _properties = new... |
Load list of quotes into a dictionary | using System;
using System.Collections.Generic;
using System.IO;
namespace CreateXMLFile
{
internal static class Program
{
private static void Main()
{
const string fileName = "quotes.txt";
Dictionary<string, string> dicoQuotes = new Dictionary<string, string>();
List<string> quotesList ... | using System;
using System.Collections.Generic;
using System.IO;
namespace CreateXMLFile
{
internal static class Program
{
private static void Main()
{
const string fileName = "quotes.txt";
Dictionary<string, string> dicoQuotes = new Dictionary<string, string>();
List<string> quotesList ... |
Remove unused property from view locator | // Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Fluent
{
public clas... | // Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Fluent
{
public clas... |
Add TagsClient to GitHubClient inteface | using Octokit.Internal;
namespace Octokit
{
public interface IGitHubClient
{
IConnection Connection { get; }
IAuthorizationsClient Authorization { get; }
IIssuesClient Issue { get; }
IMiscellaneousClient Miscellaneous { get; }
IOrganizationsClient Organization { get; }... | using Octokit.Internal;
namespace Octokit
{
public interface IGitHubClient
{
IConnection Connection { get; }
IAuthorizationsClient Authorization { get; }
IIssuesClient Issue { get; }
IMiscellaneousClient Miscellaneous { get; }
IOrganizationsClient Organization { get; }... |
Fix dialog dangerous button being clickable at edges | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Ga... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Ga... |
Document room states and remove unnecessary WaitingForResults state | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
namespace osu.Game.Online.RealtimeMultiplayer
{
/// <summary>
/// The current overall state of a realtime multiplayer room.
/// </summary>
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
namespace osu.Game.Online.RealtimeMultiplayer
{
/// <summary>
/// The current overall state of a realtime multiplayer room.
/// </summary>
... |
Remove dots from built in variables | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Insula.Common;
namespace DeploymentCockpit.Common
{
public static class VariableHelper
{
public const string ProductVersionVariable = "ProductVersion";
public const string ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Insula.Common;
namespace DeploymentCockpit.Common
{
public static class VariableHelper
{
public const string ProductVersionVariable = "ProductVersion";
public const string ... |
Add extension methods for pinning to top and bottom layout guide | using System;
using UIKit;
namespace PureLayout.Net
{
public partial class UIViewPureLayout
{
public static NSLayoutConstraint[] AutoPinEdgesToSuperviewEdgesExcludingEdge(this UIView view, ALEdge excludingEdge)
{
return view.AutoPinEdgesToSuperviewEdgesExcludingEdge(ALHelpers.ALEdg... | using System;
using UIKit;
namespace PureLayout.Net
{
public partial class UIViewPureLayout
{
public static NSLayoutConstraint[] AutoPinEdgesToSuperviewEdgesExcludingEdge(this UIView view, ALEdge excludingEdge)
{
return view.AutoPinEdgesToSuperviewEdgesExcludingEdge(ALHelpers.ALEdg... |
Clean up whitespace and file header on type enumeration | /// <summary>
/// Credit card type.
/// </summary>
namespace CreditCardProcessing
{
using System.ComponentModel;
/// <summary>
/// Credit card type.
/// </summary>
public enum CreditCardType
{
/// <summary>
/// Unknown issuers.
/// </summary>
[Description("Unknown Issuer")]
Unknown,
/// ... | //-----------------------------------------------------------------------
// <copyright file="CreditCardType.cs" company="Colagioia Industries">
// Provided under the terms of the AGPL v3.
// </copyright>
//-----------------------------------------------------------------------
/// <summary>
/// Credit card type.
... |
Set default back to sqlite | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Composition;
using Microsoft.CodeAnalysis.Host.Mef;
... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Composition;
using Microsoft.CodeAnalysis.Host.Mef;
... |
Fix RavenConfiguration for Embedded mode. | using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using Raven.Client;
using Raven.Client.Embedded;
namespace CGO.Web.NinjectModules
{
public class RavenModule : NinjectModule
{
public override void Load()
{
Kernel.Bind<IDocumentStore>().ToMethod(_ => InitialiseDocume... | using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using Raven.Client;
using Raven.Client.Embedded;
namespace CGO.Web.NinjectModules
{
public class RavenModule : NinjectModule
{
public override void Load()
{
Kernel.Bind<IDocumentStore>().ToMethod(_ => InitialiseDocume... |
Fix "change password message" view | @model string
@section Title{
Message
}
<h2>@ViewBag.StatusMessage</h2>
| @model string
@section Title{
Message
}
<h2>@Model</h2>
|
Add expiration to token response | #region Copyright
// Copyright 2016 SnapMD, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by ap... | #region Copyright
// Copyright 2016 SnapMD, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by ap... |
Put back to match nhibernate in svn. | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Dialect;
namespace FluentNHibernate.Framework
{
public interface ISessionSource
{
ISession CreateSession();
void Build... | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
namespace FluentNHibernate.Framework
{
public interface ISessionSource
{
ISession CreateSession();
void BuildSchema();
Persiste... |
Leverage query syntax for cleaner Spawn implementation | #region Copyright (c) 2016 Atif Aziz. 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 by ap... | #region Copyright (c) 2016 Atif Aziz. 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 by ap... |
Fix Travis CI / AppVeyor | using System.Runtime.InteropServices;
namespace Evolve.Test.Utilities
{
public class PostgreSqlDockerContainer : IDockerContainer
{
private DockerContainer _container;
public string Id => _container.Id;
public string ExposedPort => "5432";
public string HostPort => RuntimeInfo... | using System.Runtime.InteropServices;
namespace Evolve.Test.Utilities
{
public class PostgreSqlDockerContainer : IDockerContainer
{
private DockerContainer _container;
public string Id => _container.Id;
public string ExposedPort => "5432";
public string HostPort => RuntimeInfo... |
Add Unit tests for IEnumerable<BranchTree>.GetAllChildren() | using System;
using System.Collections.Generic;
using Sep.Git.Tfs.Core.TfsInterop;
using Xunit;
namespace Sep.Git.Tfs.Test.Core.TfsInterop
{
public class BranchExtensionsTest
{
[Fact]
public void AllChildrenAlwaysReturnsAnEnumerable()
{
IEnumerable<BranchTree> result = ((Br... | using System;
using System.Collections.Generic;
using System.Linq;
using Rhino.Mocks;
using Sep.Git.Tfs.Core.TfsInterop;
using Xunit;
namespace Sep.Git.Tfs.Test.Core.TfsInterop
{
public class BranchExtensionsTest
{
[Fact]
public void AllChildrenAlwaysReturnsAnEnumerable()
{
... |
Remove dependency on admin url mapper | using Bugfree.Spo.Cqrs.Core.Utilities;
using Microsoft.Online.SharePoint.TenantAdministration;
using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Bugfree.Spo.Cqrs.Core.Queries
{
public class GetTenantSiteCollections : Query
{
public GetTen... | using Bugfree.Spo.Cqrs.Core.Utilities;
using Microsoft.Online.SharePoint.TenantAdministration;
using Microsoft.SharePoint.Client;
using System.Collections.Generic;
using System.Linq;
namespace Bugfree.Spo.Cqrs.Core.Queries
{
public class GetTenantSiteCollections : Query
{
public GetTenantSiteCollect... |
Correct the name of this test | using Rees.TangyFruitMapper.UnitTest.TestData;
using Xunit;
using Xunit.Abstractions;
namespace Rees.TangyFruitMapper.UnitTest
{
public class Scenario4_PropertiesWithBackingFieldAndUnderscorePrefix : MappingGeneratorScenarios<DtoType4, ModelType4_UnderscoreBackingField>
{
public Scenario4_PropertiesWi... | using Rees.TangyFruitMapper.UnitTest.TestData;
using Xunit;
using Xunit.Abstractions;
namespace Rees.TangyFruitMapper.UnitTest
{
public class Scenario4_PropertiesWithBackingFieldAndUnderscorePrefix : MappingGeneratorScenarios<DtoType4, ModelType4_UnderscoreBackingField>
{
public Scenario4_PropertiesWi... |
Add view for displaying event details | @model Samaritans.Models.EventViewModel
@{
ViewBag.Title = Model.Name;
}
<h2>@Model.Name</h2>
| @model Samaritans.Models.EventViewModel
@{
ViewBag.Title = Model.Name;
}
<article class="event">
<form>
<h2>@M<input type="type" name="name" value="odel.Name</h2>
<div>@Model.EventTime</div>
<div>@Model.Attendance</div>
<p>@Model.Purpose</p>
<h3>Bring:</h3>
@for (var i = 0; i < Model.Resources.Length... |
Increase thread pool min threads. | using System;
using MySql.Data.MySqlClient;
namespace SideBySide
{
public class DatabaseFixture : IDisposable
{
public DatabaseFixture()
{
var csb = AppConfig.CreateConnectionStringBuilder();
var connectionString = csb.ConnectionString;
var database = csb.Database;
csb.Database = "";
using (var d... | using System;
#if NETCOREAPP1_1_2
using System.Reflection;
#endif
using System.Threading;
using MySql.Data.MySqlClient;
namespace SideBySide
{
public class DatabaseFixture : IDisposable
{
public DatabaseFixture()
{
// increase the number of worker threads to reduce number of spurious failures from threadpool ... |
Make test base class abstract | using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.FeaturesTestFramework.Daemon;
using JetBrains.ReSharper.Psi;
namespace JetBrains.ReSharper.Plugins.Unity.Tests.CSharp.Daemon.Stages.Analysis
{
public class CSharpHighlightingTestBase<T> : CSharpHighl... | using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.FeaturesTestFramework.Daemon;
using JetBrains.ReSharper.Psi;
namespace JetBrains.ReSharper.Plugins.Unity.Tests.CSharp.Daemon.Stages.Analysis
{
public abstract class CSharpHighlightingTestBase<T> : CS... |
Check for uniqueness for the classes that come back. | using System.Collections.Generic;
using System.Linq;
using TTreeDataModel;
namespace TTreeParser.Tests
{
public static class TUtils
{
/// <summary>
/// Find a class in the list, return null if we can't find it.
/// </summary>
/// <param name="classes"></param>
... | using System.Collections.Generic;
using System.Linq;
using TTreeDataModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TTreeParser.Tests
{
public static class TUtils
{
/// <summary>
/// Find a class in the list, return null if we can't find it.
/// </summar... |
Support sending an empty body | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Reflection;
using Newtonsoft.Json;
namespace Rackspace.CloudOffice
{
internal static class BodyEncoder
{
public static string Encode(object data, string contentType)
{
switch (contentT... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Reflection;
using Newtonsoft.Json;
namespace Rackspace.CloudOffice
{
internal static class BodyEncoder
{
public static string Encode(object data, string contentType)
{
if (data == null... |
Revert "Make cookie valid for 30 days." | using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authentication;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Wukong.Models;
namespace Wukong.Controllers
{
[Route("oauth")]... | using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authentication;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Wukong.Models;
namespace Wukong.Controllers
{
... |
Send Account model back for validation | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using MediatR;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccount;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccountTransactions;
using S... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using MediatR;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccount;
using SFA.DAS.EmployerApprenticeshipsService.Application.Queries.GetEmployerAccountTransactions;
using S... |
Fix stray character in xmldoc | // 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.Bindables;
using osuTK;
namespace osu.Framework.Input.Handlers.Tablet
{
/// <summary>
/// An interface to access OpenTabletDriverHandler.
... | // 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.Bindables;
using osuTK;
namespace osu.Framework.Input.Handlers.Tablet
{
/// <summary>
/// An interface to access OpenTabletDriverHandler.
... |
Refactor how parameters are checked | using System;
using System.Linq;
using System.Reflection;
using GraphQL.Types;
namespace GraphQL.Resolvers
{
public class MethodModelBinderResolver<T> : IFieldResolver
{
private readonly IDependencyResolver _dependencyResolver;
private readonly MethodInfo _methodInfo;
private readonly ... | using System;
using System.Linq;
using System.Reflection;
using GraphQL.Types;
namespace GraphQL.Resolvers
{
public class MethodModelBinderResolver<T> : IFieldResolver
{
private readonly IDependencyResolver _dependencyResolver;
private readonly MethodInfo _methodInfo;
private readonly ... |
Fix ArgumentNullException configuring pools via Remoting | using MultiMiner.Utility.Serialization;
using System.Linq;
namespace MultiMiner.Win.Extensions
{
public static class ApplicationConfigurationExtensions
{
public static Remoting.Data.Transfer.Configuration.Application ToTransferObject(this Data.Configuration.Application modelObject)
{
... | using MultiMiner.Utility.Serialization;
using System.Linq;
namespace MultiMiner.Win.Extensions
{
public static class ApplicationConfigurationExtensions
{
public static Remoting.Data.Transfer.Configuration.Application ToTransferObject(this Data.Configuration.Application modelObject)
{
... |
Increment version number in assembly info | 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("Te... | 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("Te... |
Handle not having a current session | using BugsnagUnity.Payload;
namespace BugsnagUnity
{
public interface ISessionTracker
{
void StartSession();
Session CurrentSession { get; }
}
class SessionTracker : ISessionTracker
{
private IClient Client { get; }
private Session _currentSession;
public Session CurrentSession
{... | using BugsnagUnity.Payload;
namespace BugsnagUnity
{
public interface ISessionTracker
{
void StartSession();
Session CurrentSession { get; }
}
class SessionTracker : ISessionTracker
{
private IClient Client { get; }
private Session _currentSession;
public Session CurrentSession
{... |
Reduce temporary list of titles | namespace ACE.Network.GameEvent
{
public class GameEventCharacterTitle : GameEventPacket
{
public override GameEventOpcode Opcode { get { return GameEventOpcode.CharacterTitle; } }
public GameEventCharacterTitle(Session session) : base(session) { }
protected override void WriteEventBo... | namespace ACE.Network.GameEvent
{
public class GameEventCharacterTitle : GameEventPacket
{
public override GameEventOpcode Opcode { get { return GameEventOpcode.CharacterTitle; } }
public GameEventCharacterTitle(Session session) : base(session) { }
protected override void WriteEventBo... |
Fix silly mistake in DI configuration | using System;
using System.Web.Http;
using Agiil.Bootstrap.DiConfiguration;
using Autofac;
namespace Agiil.Web.App_Start
{
public static class ContainerFactoryProviderExtensions
{
public static IContainer GetContainer(this ContainerFactoryProvider provider, HttpConfiguration config)
{
if(provider ==... | using System;
using System.Web.Http;
using Agiil.Bootstrap.DiConfiguration;
using Autofac;
namespace Agiil.Web.App_Start
{
public static class ContainerFactoryProviderExtensions
{
public static IContainer GetContainer(this ContainerFactoryProvider provider, HttpConfiguration config)
{
if(provider ==... |
Move to modern nuget. Make Sprite compile by stubbing missing interface methods. | using System.Collections.Generic;
using AgateLib.Extensions.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace AgateLib.UnitTests.Extensions
{
[TestClass]
public class ListExtensions
{
[TestMethod]
public void SortPrimitives()
{
List<int> li = new List<int> ... | using System.Collections.Generic;
using AgateLib.Extensions.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace AgateLib.UnitTests.Extensions
{
[TestClass]
public class ListExtensions
{
[TestMethod]
public void SortPrimitives()
{
List<int> li = new List<int> ... |
Use var. Rider finally understands it here ;) | using System;
using System.Threading.Tasks;
using HelloCoreClrApp.Data;
using HelloCoreClrApp.WebApi.Messages;
using Serilog;
namespace HelloCoreClrApp.WebApi.Actions
{
public class SayHelloWorldAction : ISayHelloWorldAction
{
private static readonly ILogger Log = Serilog.Log.ForContext<SayHelloWorldAc... | using System.Threading.Tasks;
using HelloCoreClrApp.Data;
using HelloCoreClrApp.WebApi.Messages;
using Serilog;
namespace HelloCoreClrApp.WebApi.Actions
{
public class SayHelloWorldAction : ISayHelloWorldAction
{
private static readonly ILogger Log = Serilog.Log.ForContext<SayHelloWorldAction>();
... |
Fix Cake script not running tests from SimpSim.NET.Tests project. | #tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
//////... | #tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
//////... |
Add drop-down menu for concerts. | @functions {
private string GetCssClass(string actionName, string controllerName)
{
var currentControllerName = ViewContext.RouteData.Values["controller"].ToString();
var isCurrentController = currentControllerName == controllerName;
if (currentControllerName == "Home")
{
... | @functions {
private string GetCssClass(string actionName, string controllerName)
{
var currentControllerName = ViewContext.RouteData.Values["controller"].ToString();
var isCurrentController = currentControllerName == controllerName;
if (currentControllerName == "Home")
{
... |
Add the content type for notification attachments | using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Represents an email notification sent a user, employee, or administrator
/// </summary>
public class EmailNotification : Notification
{
public static String QueueName { get { return ... | using System;
using System.Collections.Generic;
namespace CertiPay.Common.Notifications
{
/// <summary>
/// Represents an email notification sent a user, employee, or administrator
/// </summary>
public class EmailNotification : Notification
{
public static String QueueName { get { return ... |
Return any assembly that match the name, do not look at version | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Nimrod
{
public static class AssemblyLocator
{
static ConcurrentDictionary<string, Assembly> assemblie... | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Nimrod
{
public static class AssemblyLocator
{
static ConcurrentDictionary<... |
Add a comment about the approach to loading topics | using System.Net;
using System.Configuration;
private static TraceWriter logger;
private static string[] LoadTopics()
{
string TopicsAndExperts = ConfigurationManager.AppSettings["EXPERTS_LIST"].ToString();
logger.Info($"Got TopicsAndExperts: {TopicsAndExperts}");
// split each topic and expert pa... | using System.Net;
using System.Configuration;
private static TraceWriter logger;
/// Extract the topics from the and topics and experts list so there is one master list
/// and topics and experts stay in sync.
private static string[] LoadTopics()
{
string TopicsAndExperts = ConfigurationManager.AppSettings["... |
Revert "Testing to see if the deploy is started when a test fails" | using System;
using Xunit;
namespace PagedList.Tests
{
public class PageMetadataTests
{
[Fact]
public void PageNumberIsZero_ArgumentOutOfRangeExceptionIsThrown()
{
Assert.True(false);
// Assert.Throws<ArgumentOutOfRangeException>(() => new PageMetadata(10, 0, 1))... | using System;
using Xunit;
namespace PagedList.Tests
{
public class PageMetadataTests
{
[Fact]
public void PageNumberIsZero_ArgumentOutOfRangeExceptionIsThrown()
{
Assert.Throws<ArgumentOutOfRangeException>(() => new PageMetadata(10, 0, 1));
}
[Fact]
... |
Write properties and constructor for server | // Server.cs
// <copyright file="Server.cs"> This code is protected under the MIT License. </copyright>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Networking
{
/// <summary>
/// A class that acts as a server for a networked game of tron.
/// </summary>
... | // Server.cs
// <copyright file="Server.cs"> This code is protected under the MIT License. </copyright>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace Networking
{
/// <summary>
/// A class that acts as a server for a... |
Fix startup import test waiting on potentially incorrect notification 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 System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Database;
using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Visual.Navigatio... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Overlays.Notifications;
using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Vi... |
Fix rendering of unreadable characters in map signs | using EOLib.IO.Map;
namespace EOLib.Domain.Map
{
public class Sign : ISign
{
public string Title { get; private set; }
public string Message { get; private set; }
public Sign(SignMapEntity sign)
{
Title = sign.Title;
Message = sign.Message;
}
... | using EOLib.IO.Map;
using System.Linq;
namespace EOLib.Domain.Map
{
public class Sign : ISign
{
public string Title { get; private set; }
public string Message { get; private set; }
public Sign(SignMapEntity sign)
{
Title = Filter(sign.Title);
Message ... |
Fix typo in MusicStore.Spa page | @{
ViewBag.Title = "Home Page";
ViewBag.ngApp = "MusicStore.Store";
Layout = "/Views/Shared/_Layout.cshtml";
}
@section NavBarItems {
<li app-genre-menu></li>
@*@Html.InlineData("GenreMenuList", "GenresApi")*@
}
<div ng-view></div>
@*@Html.InlineData("MostPopular", "AlbumsApi")*@
@section Scripts {
... | @{
ViewBag.Title = "Home Page";
ViewBag.ngApp = "MusicStore.Store";
Layout = "/Views/Shared/_Layout.cshtml";
}
@section NavBarItems {
<li app-genre-menu></li>
@*@Html.InlineData("GenreMenuList", "GenresApi")*@
}
<div ng-view></div>
@*@Html.InlineData("MostPopular", "AlbumsApi")*@
@section Scripts {
... |
Introduce a bug to prove out CI integration. | using System.Linq;
using Should;
namespace Parsley
{
public class GrammarRuleTests : Grammar
{
public void CanDefineMutuallyRecursiveRules()
{
var tokens = new CharLexer().Tokenize("(A)");
var expression = new GrammarRule<string>();
var alpha = new GrammarRu... | using System.Linq;
using Should;
namespace Parsley
{
public class GrammarRuleTests : Grammar
{
public void CanDefineMutuallyRecursiveRules()
{
var tokens = new CharLexer().Tokenize("(A)");
var expression = new GrammarRule<string>();
var alpha = new GrammarRu... |
Fix a bug about any roles attribute | using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.ViewFeatures;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.Mvc
{
public class AnyRolesAttribute : ActionFilterAttribute
... | using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.ViewFeatures;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.Mvc
{
public class AnyRolesAttribute : ActionFilterAttribute
... |
Remove link to guild list from GuildLayout. | @{
Layout = "_Layout";
ViewData["Title"] = "Guild";
}
<div class="row">
<nav class="col-md-3 col-xl-2">
<ul class="nav">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="GuildList" asp-action="Index">Übersicht</a>
</li>
<li class="nav-item">
<a class="nav-link text... | @{
Layout = "_Layout";
ViewData["Title"] = "Guild";
}
<div class="row">
<nav class="col-md-3 col-xl-2">
<ul class="nav">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Guild" asp-controller="Stats" asp-action="Index">Statistiken</a>
</li>
<li class="nav-item">
<a class="nav-link t... |
Fix Areas property is not deserialized, In the return value of the GetRichMenuListAsync method. | namespace Line.Messaging
{
/// <summary>
/// Rich menu response object.
/// https://developers.line.me/en/docs/messaging-api/reference/#rich-menu-response-object
/// </summary>
public class ResponseRichMenu : RichMenu
{
/// <summary>
/// Rich menu ID
/// </summary>
... | namespace Line.Messaging
{
/// <summary>
/// Rich menu response object.
/// https://developers.line.me/en/docs/messaging-api/reference/#rich-menu-response-object
/// </summary>
public class ResponseRichMenu : RichMenu
{
/// <summary>
/// Rich menu ID
/// </summary>
... |
Fix quick info to not generate models for invalid symbols | using NQuery.Language.Symbols;
namespace NQuery.Language.VSEditor
{
public sealed class QuickInfoModel
{
private readonly SemanticModel _semanticModel;
private readonly TextSpan _span;
private readonly NQueryGlyph _glyph;
private readonly SymbolMarkup _markup;
public Qu... | using NQuery.Language.Symbols;
namespace NQuery.Language.VSEditor
{
public sealed class QuickInfoModel
{
private readonly SemanticModel _semanticModel;
private readonly TextSpan _span;
private readonly NQueryGlyph _glyph;
private readonly SymbolMarkup _markup;
public Qu... |
Set a static value so my references quit freaking out. | using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Xwt")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: Assem... | using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Xwt")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: Assem... |
Call extension method as extension method. | using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using GitHub.Extensions;
using GitHub.Models;
using GitHub.Services;
using Microsoft.VisualStudio.TeamFoundation.Git.Extensibility;
namespace GitHub.VisualStudio.Base
{
[Export(typeof(IVSGitExt))]
[PartC... | using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using GitHub.Extensions;
using GitHub.Models;
using GitHub.Services;
using Microsoft.VisualStudio.TeamFoundation.Git.Extensibility;
namespace GitHub.VisualStudio.Base
{
[Export(typeof(IVSGitExt))]
[PartC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.