Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Update tests to pass with the new API. | using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using MonoTorrent.Client;
using System.Net;
using System.Net.Sockets;
namespace MonoTorrent.Client.Tests
{
[TestFixture]
public class ConnectionListenerTests
{
private SocketListener listener;
private ... | using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using MonoTorrent.Client;
using System.Net;
using System.Net.Sockets;
namespace MonoTorrent.Client.Tests
{
[TestFixture]
public class ConnectionListenerTests
{
//static void Main(string[] args)
//{
... |
Make Advanced context inherit from normal context | using System;
namespace RawRabbit.Context
{
public class AdvancedMessageContext : IAdvancedMessageContext
{
public Guid GlobalRequestId { get; set; }
public Action Nack { get; set; }
}
}
| using System;
namespace RawRabbit.Context
{
public class AdvancedMessageContext : MessageContext, IAdvancedMessageContext
{
public Action Nack { get; set; }
}
}
|
Fix hard crash due to spinner spin requirement being zero | // 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.Game.Beatmaps;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Rulesets.Osu.Objects
{
public cl... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Rulesets.Osu.Objects
{... |
Check for NullReference - CodeMashSettings. | using System;
using System.Collections.Generic;
using CodeMash.Interfaces;
namespace CodeMash.Notifications.Email
{
public class EmailService : IEmailService
{
public ICodeMashSettings CodeMashSettings { get; set; }
public bool SendMail(string[] recipients, string templateName, Dictio... | using System;
using System.Collections.Generic;
using CodeMash.Interfaces;
namespace CodeMash.Notifications.Email
{
public class EmailService : IEmailService
{
public ICodeMashSettings CodeMashSettings { get; set; }
public bool SendMail(string[] recipients, string templateName, Dictio... |
Change the QueueTime to an hour again | using Quartz;
using System;
using System.Threading.Tasks;
using Discord;
using Microsoft.Extensions.DependencyInjection;
using NLog;
namespace NoAdsHere.Services.Penalties
{
public static class JobQueue
{
private static IScheduler _scheduler;
public static Task Install(IServiceProvider provid... | using Quartz;
using System;
using System.Threading.Tasks;
using Discord;
using Microsoft.Extensions.DependencyInjection;
using NLog;
namespace NoAdsHere.Services.Penalties
{
public static class JobQueue
{
private static IScheduler _scheduler;
public static Task Install(IServiceProvider provid... |
Fix for Visual Studio 2008 | // Needed for NET40
using System;
using System.Collections;
using System.Collections.Generic;
using Theraot.Core;
namespace Theraot.Collections.Specialized
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "By Design")]
public... | // Needed for NET40
using System;
using System.Collections;
using System.Collections.Generic;
using Theraot.Core;
namespace Theraot.Collections.Specialized
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "By Design")]
public... |
Add Beta property on FleaHeader event | using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EDDiscovery.EliteDangerous.JournalEvents
{
public class JournalFileHeader : JournalEntry
{
public JournalFileHeader(JObject evt ) : base(evt, JournalTypeEnum.FileHeader)
... | using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EDDiscovery.EliteDangerous.JournalEvents
{
public class JournalFileHeader : JournalEntry
{
public JournalFileHeader(JObject evt ) : base(evt, JournalTypeEnum.FileHeader)
... |
Add method CancelTransaction to service interface | using Cielo.Requests;
using Cielo.Responses;
namespace Cielo
{
public interface ICieloService
{
CreateTransactionResponse CreateTransaction(CreateTransactionRequest request);
CheckTransactionResponse CheckTransaction(CheckTransactionRequest request);
}
} | using Cielo.Requests;
using Cielo.Responses;
namespace Cielo
{
public interface ICieloService
{
CreateTransactionResponse CreateTransaction(CreateTransactionRequest request);
CheckTransactionResponse CheckTransaction(CheckTransactionRequest request);
CancelTransactionResponse CancelTra... |
Correct errors in .cs file | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class MikeFRobbins : IAmAMicrosoftMVP, IFilterMyBlogPosts
{
public string FirstName => "Tommy";... | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class TommyMaynard : IAmACommunityMember
{
public string FirstName => "Tommy";
public ... |
Add impl method for Play. | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[RequireComponent(typeof(ObjectPool))]
public class AudioController : MonoBehaviour
{
#region Serialized Data
[SerializeField]
private GameObject _defaultPrefab;
#endregion
#region Private fields
... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[RequireComponent(typeof(ObjectPool))]
public class AudioController : MonoBehaviour
{
#region Serialized Data
[SerializeField]
private GameObject _defaultPrefab;
#endregion
#region Private fields
... |
Revert "Hack for new version of RunTextWithXmlResults which returns multiple results" | using System;
using System.Data.SqlClient;
namespace tSQLt.Client.Net.Gateways
{
public interface ISqlServerGateway
{
string RunWithXmlResult(string query);
void RunWithNoResult(string query);
}
public class SqlServerGateway : ISqlServerGateway
{
pri... | using System;
using System.Data.SqlClient;
namespace tSQLt.Client.Net.Gateways
{
public interface ISqlServerGateway
{
string RunWithXmlResult(string query);
void RunWithNoResult(string query);
}
public class SqlServerGateway : ISqlServerGateway
{
pri... |
Rename client trace to git-push-date. | using System;
namespace Kudu.TestHarness
{
public static class ApplicationManagerExtensions
{
public static GitDeploymentResult GitDeploy(this ApplicationManager appManager, string localRepoPath, string localBranchName = "master", string remoteBranchName = "master")
{
GitDeployment... | using System;
namespace Kudu.TestHarness
{
public static class ApplicationManagerExtensions
{
public static GitDeploymentResult GitDeploy(this ApplicationManager appManager, string localRepoPath, string localBranchName = "master", string remoteBranchName = "master")
{
GitDeployment... |
Read appSettings on construction to throw early. | using System;
using System.Configuration;
namespace librato4net
{
public class AppSettingsLibratoSettings : ILibratoSettings
{
// ReSharper disable once InconsistentNaming
private static readonly AppSettingsLibratoSettings settings = new AppSettingsLibratoSettings();
private const str... | using System;
using System.Configuration;
namespace librato4net
{
public class AppSettingsLibratoSettings : ILibratoSettings
{
private const string DefaultApiEndPoint = "https://metrics-api.librato.com/v1/";
public AppSettingsLibratoSettings()
{
var _ = Username;
... |
Use dynamic layout for simple app | using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Eto.Forms;
namespace Eto.Test.Android
{
[Activity(Label = "Eto.Test.Android", MainLauncher = true)]
public class MainActivity : Activity
{
public class SimpleApplicati... | using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Eto.Forms;
namespace Eto.Test.Android
{
[Activity(Label = "Eto.Test.Android", MainLauncher = true)]
public class MainActivity : Activity
{
public class SimpleApplicatio... |
Fix injection script loading from GUI. | using Infusion.Commands;
using Infusion.LegacyApi.Injection;
using InjectionScript.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Infusion.Injection.Avalonia.Scripts
{
public class ScriptServices : IScriptServices
{
private readonly InjectionRu... | using Infusion.Commands;
using Infusion.LegacyApi.Injection;
using InjectionScript.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Infusion.Injection.Avalonia.Scripts
{
public class ScriptServices : IScriptServices
{
private readonly InjectionRu... |
Introduce OnNext + push result in | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace rx
{
class Program
{
static void Main(string[] args)
{
var subject = new Subject<string>();
using (subject.Subscribe(result =>... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace rx
{
class Program
{
static void Main(string[] args)
{
var subject = new Subject<string>();
using (subject.Subscribe(result =>... |
Add a menu to make the dev tools not show up by default | using System;
using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using CefSharp;
using CefSharp.WinForms;
using Knockout.Binding.ExtensionMethods;
namespace Knockout.Binding.Sample
{
public partial class MainForm : Form
{
private readonly We... | using System;
using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using CefSharp;
using CefSharp.WinForms;
using Knockout.Binding.ExtensionMethods;
namespace Knockout.Binding.Sample
{
public partial class MainForm : Form
{
private readonly We... |
Add supression for generated xaml class | // This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in t... | // This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in t... |
Add default setting it's missing. | using System;
using System.Data.SqlClient;
using TeamTracker;
public partial class SettingsLogin : System.Web.UI.Page
{
//---------------------------------------------------------------------------
public static readonly string SES_SETTINGS_LOGGED_IN = "SesSettingsLoggedIn";
protected string DbConnectionStrin... | using System;
using System.Data.SqlClient;
using TeamTracker;
public partial class SettingsLogin : System.Web.UI.Page
{
//---------------------------------------------------------------------------
public static readonly string SES_SETTINGS_LOGGED_IN = "SesSettingsLoggedIn";
protected string DbConnectionStrin... |
Set error type depending on severity (squiggle color) | using jwldnr.VisualLinter.Linting;
using Microsoft.VisualStudio.Text.Adornments;
using Microsoft.VisualStudio.Text.Tagging;
namespace jwldnr.VisualLinter.Tagging
{
internal class LinterTag : IErrorTag
{
public string ErrorType { get; }
public object ToolTipContent { get; }
internal L... | using jwldnr.VisualLinter.Linting;
using Microsoft.VisualStudio.Text.Adornments;
using Microsoft.VisualStudio.Text.Tagging;
namespace jwldnr.VisualLinter.Tagging
{
internal class LinterTag : IErrorTag
{
public string ErrorType { get; }
public object ToolTipContent { get; }
internal L... |
Apply window placement second time to override possible WM_DPICHANGED reaction | using LordJZ.WinAPI;
namespace WindowPositions
{
public class WindowPosition
{
public string Title { get; set; }
public string ClassName { get; set; }
public WindowPlacement Placement { get; set; }
public bool Matches(WindowDTO dto)
{
if (this.Title != nu... | using LordJZ.WinAPI;
namespace WindowPositions
{
public class WindowPosition
{
public string Title { get; set; }
public string ClassName { get; set; }
public WindowPlacement Placement { get; set; }
public bool Matches(WindowDTO dto)
{
if (this.Title != nu... |
Fix region name and comments | #region Copyright © 2014 Ricardo Amaral
/*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
*/
#endregion
using CefSharp;
namespace SlackUI {
internal class BrowserMenuHandler : IMenuHandler {
#region Internal Methods
/*
* Handle... | #region Copyright © 2014 Ricardo Amaral
/*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
*/
#endregion
using CefSharp;
namespace SlackUI {
internal class BrowserMenuHandler : IMenuHandler {
#region Public Methods
/*
* Handler ... |
Add sample validation in dummy app | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Http;
namespace Swashbuckle.Dummy.Controllers
{
public class AnnotatedTypesController : ApiController
{
public int Create(Payment payment)
{
throw new NotImplementedExcepti... | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Http;
using System.Net.Http;
using System.Net;
namespace Swashbuckle.Dummy.Controllers
{
public class AnnotatedTypesController : ApiController
{
public int Create(Payment payment)
{
... |
Make it just 'sign in' instead of 'sign in / register' | <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)">Sign in / Register</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)">Sign in</a>
<... |
Fix for "PSInvalidOperationException: Nested pipeline should run only from a running pipeline." when using PowerShell v3 | using System;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
namespace PowerBridge.Internal
{
internal interface IPowerShellCommandParameterProvider
{
string[] GetDefaultParameterSetParameterNames(string command);
}
internal cl... | using System;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
namespace PowerBridge.Internal
{
internal interface IPowerShellCommandParameterProvider
{
string[] GetDefaultParameterSetParameterNames(string command);
}
internal cl... |
Revert "Fixed formatter which changes Uri to Url which was creating subject as a literal which made it difficult to do do related queries such as the following:" | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LinkedData.Helpers;
using Sitecore.Links;
using VDS.RDF;
namespace LinkedData.Formatters
{
public class UriToDynamicUrlFormatter : ITripleFormatter
{
public Triple FormatTriple(Tri... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LinkedData.Helpers;
using Sitecore.Links;
using VDS.RDF;
namespace LinkedData.Formatters
{
public class UriToDynamicUrlFormatter : ITripleFormatter
{
public Triple FormatTriple(Tri... |
Fix marshalling of Winstation name | // Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
namespace PInvoke
{
using System;
using System.Collections.Generic;
using System.L... | // Copyright (c) to owners found in https://github.com/AArnott/pinvoke/blob/master/COPYRIGHT.md. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
namespace PInvoke
{
using System;
using System.Collections.Generic;
using System.L... |
Fix for Dna parsing: line endings | using UnityEngine;
using System.Collections;
using Fukami.Helpers;
public class Seed : MonoBehaviour
{
public string Dna;
void Start(){
var dnaAsset = Resources.Load<TextAsset>("dna");
Dna = dnaAsset.text.Replace("\n","*");
}
void OnSeedDnaStringRequested (Wrap<string> dna)
{
dna.Value = Dna;
d... | using UnityEngine;
using System.Collections;
using Fukami.Helpers;
public class Seed : MonoBehaviour
{
public string Dna;
void Start(){
var dnaAsset = Resources.Load<TextAsset>("dna");
Dna = dnaAsset.text.Replace("\r\n","*");
}
void OnSeedDnaStringRequested (Wrap<string> dna)
{
dna.Value = Dna;
... |
Update assembly info for nuget 3.3 release | using System.Reflection;
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("Microsoft.Bot.Connector")]
[assembly: Ass... | using System.Reflection;
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("Microsoft.Bot.Connector")]
[assembly: Ass... |
Fix a problem with 'fixed' variables due to cleanup | // 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.InteropServices;
namespace Microsoft.Diagnostics.Runtime.Interop
{
[StructLayout(LayoutKi... | // 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.InteropServices;
namespace Microsoft.Diagnostics.Runtime.Interop
{
[StructLayout(LayoutKi... |
Add the guest system info as push action | namespace Espera.Network
{
public enum PushAction
{
UpdateAccessPermission = 0,
UpdateCurrentPlaylist = 1,
UpdatePlaybackState = 2,
UpdateRemainingVotes = 3,
UpdateCurrentPlaybackTime = 4
}
} | namespace Espera.Network
{
public enum PushAction
{
UpdateAccessPermission = 0,
UpdateCurrentPlaylist = 1,
UpdatePlaybackState = 2,
UpdateRemainingVotes = 3,
UpdateCurrentPlaybackTime = 4,
UpdateGuestSystemInfo = 5
}
} |
Move ignore up to fixture to kick off new full build for windows and mono. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Palaso.UI.WindowsForms.WritingSystems;
using Palaso.WritingSystems;
namespace PalasoUIWindowsForms.Tests.WritingSystems
{
[TestFixture]
public class WritingSystemTreeItemTests
{
[Test, Ignore("Not... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Palaso.UI.WindowsForms.WritingSystems;
using Palaso.WritingSystems;
namespace PalasoUIWindowsForms.Tests.WritingSystems
{
[TestFixture, Ignore("Not Yet")]
public class WritingSystemTreeItemTests
{
... |
Use AssemblyName constructor to retrieve assembly version | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace EvilDICOM.Core.Helpers
{
public static class Constants
{
public static string EVIL_DICOM_IMP_UID = "1.2.598.0.1.2851334.2.1865.1";
public static string EVIL_DICOM... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace EvilDICOM.Core.Helpers
{
public static class Constants
{
public static string EVIL_DICOM_IMP_UID = "1.2.598.0.1.2851334.2.1865.1";
public static string EVIL_DICOM... |
Handle empty properties on fallback | using System.Linq;
using EPiServer.Core;
namespace Meridium.EPiServer.Migration.Support {
public class SourcePage {
public string TypeName { get; set; }
public PropertyDataCollection Properties { get; set; }
public TValue GetValue<TValue>(string propertyName, TValue @default = default(TVal... | using System.Linq;
using EPiServer.Core;
namespace Meridium.EPiServer.Migration.Support {
public class SourcePage {
public string TypeName { get; set; }
public PropertyDataCollection Properties { get; set; }
public TValue GetValue<TValue>(string propertyName, TValue @default = default(TVal... |
Fix similar "can see but can't path" crash on sprinters. | using System;
using System.Collections.Generic;
using Magecrawl.Utilities;
namespace Magecrawl.GameEngine.Actors
{
internal class SprinterMonster : Monster
{
public SprinterMonster(string name, Point p, int maxHP, int vision, DiceRoll damage, double defense, double evade, double ctIncreaseModi... | using System;
using System.Collections.Generic;
using Magecrawl.Utilities;
namespace Magecrawl.GameEngine.Actors
{
internal class SprinterMonster : Monster
{
public SprinterMonster(string name, Point p, int maxHP, int vision, DiceRoll damage, double defense, double evade, double ctIncreaseModi... |
Use a different authentication type | using System;
using Hellang.Authentication.JwtBearer.Google;
using Microsoft.AspNetCore.Authentication.JwtBearer;
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection
{
public static class JwtBearerOptionsExtensions
{
public static JwtBearerOptions UseGoogle(this... | using System;
using Hellang.Authentication.JwtBearer.Google;
using Microsoft.AspNetCore.Authentication.JwtBearer;
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection
{
public static class JwtBearerOptionsExtensions
{
public static JwtBearerOptions UseGoo... |
Add comment about other calculation methods | using System.Collections.Generic;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType
{
/// <summary>
/// Deduction is taken as a percentage of the gross pay
/// </summary>
Pe... | using System.Collections.Generic;
namespace CertiPay.Payroll.Common
{
/// <summary>
/// Identifies the method to calculate the result
/// </summary>
public enum CalculationType
{
// TODO: We might implement some other calculation methods as needed?
// Percent of Special Earnings: S... |
Add the usage of the .net linked list as an example for comparison in the outcomes | using System;
using AlgorithmsAndDataStructures.LinkedList;
namespace AlgorithmsAndDataStructures
{
class Program
{
static void Main(string[] args)
{
// +-----+------+
// | 3 | null +
// +-----+------+
Node first = new Node {Value... | using System;
using AlgorithmsAndDataStructures.LinkedList;
namespace AlgorithmsAndDataStructures
{
class Program
{
static void Main(string[] args)
{
// AT FIRST USE THE .NET FRAMEWORK LINKEDLIST CLASS
System.Collections.Generic.LinkedList<int> list = new System.Collect... |
Add icon for needs measure | @model IEnumerable<ABCP>
<h2>ABCP @Html.ActionLink("Add New", "New", "ABCP", null, new { @class = "btn btn-default" })</h2>
<table class="table table-striped">
<thead>
<tr>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var model in Model)
{
<tr>
... | @model IEnumerable<ABCP>
<h2>ABCP @Html.ActionLink("Add New", "New", "ABCP", null, new { @class = "btn btn-default" })</h2>
<table class="table table-striped">
<thead>
<tr>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var model in Model)
{
<tr>
... |
Use yield return instead of allocating new list. | using Newtonsoft.Json;
using ReactiveUI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using WalletWasabi.Gui.ViewModels.Validation;
using WalletWasabi.Models;
namespace WalletWasabi.Gui.ViewModels
{
public class View... | using Newtonsoft.Json;
using ReactiveUI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using WalletWasabi.Gui.ViewModels.Validation;
using WalletWasabi.Models;
namespace WalletWasabi.Gui.ViewModels
{
public class View... |
Fix checkbox change not raising settings update | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using osu_StreamCompanion.Code.Core;
using osu_StreamCompanion.Code.Misc;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Tc... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using osu_StreamCompanion.Code.Core;
using osu_StreamCompanion.Code.Misc;
namespace osu_StreamCompanion.Code.Modules.MapDataGetters.Tc... |
Fix not compiling, missing import | using Oxide.Core;
using Oxide.Core.Plugins;
using Oxide.Game.HideHoldOut.Libraries;
namespace Oxide.Plugins
{
public abstract class HideHoldOutPlugin : CSharpPlugin
{
protected Command cmd;
protected HideHoldOut h2o;
public override void SetPluginInfo(string name, string path)
... | using System.Reflection;
using Oxide.Core;
using Oxide.Core.Plugins;
using Oxide.Game.HideHoldOut.Libraries;
namespace Oxide.Plugins
{
public abstract class HideHoldOutPlugin : CSharpPlugin
{
protected Command cmd;
protected HideHoldOut h2o;
public override void SetPluginInfo(string n... |
Make Params required (not default) | using CommandLine;
using CommandLine.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tailor
{
public class Options
{
[Option('a', "appDir", DefaultValue = "app", HelpText = "Directory app is placed in")]
public... | using CommandLine;
using CommandLine.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tailor
{
public class Options
{
[Option('a', "appDir", Required = true, HelpText = "Directory app is placed in")]
public stri... |
Add get best id method for user. | namespace TraktApiSharp.Objects.Get.Users
{
using Newtonsoft.Json;
using System;
public class TraktUser
{
[JsonProperty(PropertyName = "username")]
public string Username { get; set; }
[JsonProperty(PropertyName = "private")]
public bool? Private { get; set; }
... | namespace TraktApiSharp.Objects.Get.Users
{
using Newtonsoft.Json;
using System;
/// <summary>A Trakt user.</summary>
public class TraktUser
{
/// <summary>Gets or sets the user's username.</summary>
[JsonProperty(PropertyName = "username")]
public string Username { get; se... |
Make tags and fields more thread safe. | using System;
using System.Collections.Generic;
using System.Linq;
namespace Ocelog
{
public enum LogLevel
{
Info,
Warn,
Error
}
public class LogEvent
{
private List<string> _tags = new List<string>();
private List<object> _fields= new List<object>();
... | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
namespace Ocelog
{
public enum LogLevel
{
Info,
Warn,
Error
}
public class LogEvent
{
private ConcurrentQueue<string> _tags = new ConcurrentQueue<string>();
... |
Change section title to read better | // 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.Localisation;
using osu.Game.Rulesets;
namespace osu.Game.Screens.Edit.Setup
{
public abstract class RulesetSetupSection : SetupSection
{
... | // 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.Localisation;
using osu.Game.Rulesets;
namespace osu.Game.Screens.Edit.Setup
{
public abstract class RulesetSetupSection : SetupSection
{
... |
Switch failing test to passing tests (AppVeyor now successfully running xunit tests and failing the build on failing test) | using System;
using Xunit;
namespace ControlFlow.Test
{
public class TryTest
{
[Fact]
public void Fail()
{
throw new Exception();
}
}
}
| using System;
using Xunit;
namespace ControlFlow.Test
{
public class TryTest
{
[Fact]
public void Pass()
{
}
}
}
|
Implement parser to get tests passing | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Bugsnag.Common
{
public class StacktraceLineParser
{
public string ParseFile(string line)
{
throw new NotImplementedEx... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Bugsnag.Common
{
public class StacktraceLineParser
{
Regex _fileRegex = new Regex("\\) [^ ]+ (.+):");
public string ParseFile(stri... |
Set "isInitialized" to true, or we don't terminate the analytics | using System;
using System.Collections.Generic;
using Xamarin;
namespace Espera.Core.Analytics
{
internal class XamarinAnalyticsEndpoint : IAnalyticsEndpoint
{
private bool isInitialized;
public void Dispose()
{
// Xamarin Insights can only be terminated if it has been sta... | using System;
using System.Collections.Generic;
using Xamarin;
namespace Espera.Core.Analytics
{
internal class XamarinAnalyticsEndpoint : IAnalyticsEndpoint
{
private bool isInitialized;
public void Dispose()
{
// Xamarin Insights can only be terminated if it has been sta... |
Add an explanatory comment about why the AssemblyVersion and AssemblyFileVersion are different. | 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("icu.... | 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("icu.... |
Throw for negative count of marbles condition | using System;
using TechTalk.SpecFlow;
using Xunit;
namespace Web.UI.Tests
{
[Binding]
public class SimpleSteps
{
private static int MarblesCount;
[Given(@"I have (.*) marbles")]
public void GivenIHaveMarbles(int count)
{
MarblesCount = count;
}
... | using System;
using TechTalk.SpecFlow;
using Xunit;
namespace Web.UI.Tests
{
[Binding]
public class SimpleSteps
{
private static int MarblesCount;
[Given(@"I have (.*) marbles")]
public void GivenIHaveMarbles(int count)
{
MarblesCount = count;
}
... |
Add assertion covering free mod selection mod validity filter | // 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.Containers;
using osu.Game.Screens.OnlinePlay;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSce... | // 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.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Overlays.Mods;
using osu.Game.Screens.Onlin... |
Increase default receive high-water mark | using System;
using Abc.Zebus.Util;
namespace Abc.Zebus.Transport
{
public class ZmqSocketOptions
{
public ZmqSocketOptions()
{
ReadTimeout = 300.Milliseconds();
SendHighWaterMark = 20000;
SendTimeout = 100.Milliseconds();
SendRetriesBeforeSwitch... | using System;
using Abc.Zebus.Util;
namespace Abc.Zebus.Transport
{
public class ZmqSocketOptions
{
public ZmqSocketOptions()
{
ReadTimeout = 300.Milliseconds();
SendHighWaterMark = 20000;
SendTimeout = 100.Milliseconds();
SendRetriesBeforeSwitch... |
Add some robustness to FullName test | using Xunit;
using Xunit.Extensions;
namespace DotNext.RockAndRoll.UnitTests
{
public class MusicianTestCase
{
[Theory]
[InlineData("foo", "bar", "foo bar")]
[InlineData("bar", "baz", "bar baz")]
[InlineData("baz", "qux", "baz qux")]
public void FullName_Always_ShouldRe... | using Xunit;
using Xunit.Extensions;
namespace DotNext.RockAndRoll.UnitTests
{
public class MusicianTestCase
{
[Theory]
[InlineData("foo", "bar")]
[InlineData("bar", "baz")]
[InlineData("baz", "qux")]
public void FullName_Always_ShouldReturnConcatenationOfNames(
... |
Allow automatic migration with data loss for the metadata db. | // -----------------------------------------------------------------------
// <copyright file="Configuration.cs" company="">
// Copyright 2014 Alexander Soffronow Pagonidis
// </copyright>
// -----------------------------------------------------------------------
using System.Data.Entity.Migrations;
using System.Linq;... | // -----------------------------------------------------------------------
// <copyright file="Configuration.cs" company="">
// Copyright 2014 Alexander Soffronow Pagonidis
// </copyright>
// -----------------------------------------------------------------------
using System.Data.Entity.Migrations;
using System.Linq;... |
Revert "Making Adjustments for implementation" | using Calendar_Converter.ViewModel;
using MVVMObjectLibrary;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace ITATools.ViewModel
{
public class MainWindowViewModel : ViewM... | using Calendar_Converter.ViewModel;
using MVVMObjectLibrary;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace ITATools.ViewModel
{
public class MainWindowViewModel : ViewM... |
Fix unresolved reference to UpdaetManager in the documentation | // Copyright © Dominic Beger 2017
using System;
namespace nUpdate.UpdateEventArgs
{
/// <summary>
/// Provides data for the <see cref="UpdateManager.UpdateSearchFinished" />-event.
/// </summary>
public class UpdateSearchFinishedEventArgs : EventArgs
{
/// <summary>
/// In... | // Copyright © Dominic Beger 2017
using System;
using nUpdate.Updating;
namespace nUpdate.UpdateEventArgs
{
/// <summary>
/// Provides data for the <see cref="UpdateManager.UpdateSearchFinished" />-event.
/// </summary>
public class UpdateSearchFinishedEventArgs : EventArgs
{
/// <sum... |
Disable resharper suggestions for return | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
namespace HoloToolkit.Unity
{
/// <summary>
/// The purpose of this class is to provide a cached reference to the main camera. Calling Ca... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
namespace HoloToolkit.Unity
{
/// <summary>
/// The purpose of this class is to provide a cached reference to the main camera. Calling Ca... |
Change "Slideshow" "Max File Size" option default value | using System;
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.PictureSlideshow
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.Width = 384;
Style.Height = 216;
}
[Category(... | using System;
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.PictureSlideshow
{
public class Settings : WidgetSettingsBase
{
public Settings()
{
Style.Width = 384;
Style.Height = 216;
}
[Category(... |
Correct class name. Was Mapping | using System;
using NHibernate.Type;
namespace NHibernate.Engine {
/// <summary>
/// Defines operations common to "compiled" mappings (ie. <c>SessionFactory</c>) and
/// "uncompiled" mappings (ie <c>Configuration</c> that are used by implementors of <c>IType</c>
/// </summary>
public interface Mapping {
IType G... | using System;
using NHibernate.Type;
namespace NHibernate.Engine {
/// <summary>
/// Defines operations common to "compiled" mappings (ie. <c>SessionFactory</c>) and
/// "uncompiled" mappings (ie <c>Configuration</c> that are used by implementors of <c>IType</c>
/// </summary>
public interface IMapping {
IType ... |
Add button-primary-white class to button | <section class="sign-up-alert">
<form action="/subscribe?EmailAlertsTopicId=@ViewData["SignUpAlertsTopicIdTopicId"]" method="POST">
<label for="emailAddress">Sign up to receive our news and email alerts in your inbox</label>
<input type="email" name="emailAddress" id="emailAddress" placeholder="Ent... | <section class="sign-up-alert">
<form action="/subscribe?EmailAlertsTopicId=@ViewData["SignUpAlertsTopicIdTopicId"]" method="POST">
<label for="emailAddress">Sign up to receive our news and email alerts in your inbox</label>
<input type="email" name="emailAddress" id="emailAddress" placeholder="Ent... |
Add a specific user-agent to CoinChoose.com requests | using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net;
namespace MultiMiner.Coinchoose.Api
{
public static class ApiContext
{
public static List<CoinInformation> GetCoinInformation()
{
WebClient client = new WebClient();
string jso... | using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net;
namespace MultiMiner.Coinchoose.Api
{
public static class ApiContext
{
public static List<CoinInformation> GetCoinInformation()
{
WebClient client = new WebClient();
const stri... |
Move foo type to static member | using System;
using System.Collections.Generic;
using Xunit;
using Xunit.Extensions;
namespace AppHarbor.Tests
{
public class TypeNameMatcherTest
{
interface IFoo
{
}
class Foo : IFoo { }
[Fact]
public void ShouldThrowIfInitializedWithUnnasignableType()
{
var exception = Assert.Throws<ArgumentExc... | using System;
using System.Collections.Generic;
using Xunit;
using Xunit.Extensions;
namespace AppHarbor.Tests
{
public class TypeNameMatcherTest
{
interface IFoo
{
}
class Foo : IFoo { }
private static Type FooType = typeof(Foo);
[Fact]
public void ShouldThrowIfInitializedWithUnnasignableType()
... |
Add link to kendo grid title | @using Kendo.Mvc.UI
@using VotingSystem.Web.ViewModels.Polls
@model List<PublicActivePollsViewModel>
@{
ViewBag.Title = "All Public Polls";
}
<h1>@ViewBag.Title</h1>
@(Html.Kendo().Grid(Model)
.Name("pollGrid")
.Columns(col =>
{
col.Bound(poll => poll.Id).Hidden();
... | @using Kendo.Mvc.UI
@using VotingSystem.Web.ViewModels.Polls
@model List<PublicActivePollsViewModel>
@{
ViewBag.Title = "All Public Polls";
}
<h1>@ViewBag.Title</h1>
@(Html.Kendo().Grid(Model)
.Name("pollGrid")
.Columns(col =>
{
col.Bound(poll => poll.Id).Hidden();
... |
Add owner user id for bags | using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
namespace TheCollection.Business.Tea
{
[JsonConverter(typeof(SearchableConverter))]
public class Bag
{
[Key]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
[Searchable]
[... | using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
namespace TheCollection.Business.Tea
{
[JsonConverter(typeof(SearchableConverter))]
public class Bag
{
[Key]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
[JsonProperty(Property... |
Fix the solution for Ex05 | using System;
using System.Threading;
namespace Lurchsoft.ParallelWorkshop.Ex05DatedSerial.PossibleSolution
{
public class LazyDatedSerial
{
private Lazy<ThreadSafeSerial> serial = new Lazy<ThreadSafeSerial>(LazyThreadSafetyMode.ExecutionAndPublication);
public string GetNextSerial()
{... | using System;
using System.Threading;
namespace Lurchsoft.ParallelWorkshop.Ex05DatedSerial.PossibleSolution
{
public class LazyDatedSerial
{
private Lazy<ThreadSafeSerial> serial = new Lazy<ThreadSafeSerial>
(() => new ThreadSafeSerial(DateTime.Now.ToShortDateString()), LazyThreadSafetyMode... |
Remove now-redundant code previously used for dictionary support | // Copyright 2017 Google 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 by applic... | // Copyright 2017 Google 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 by applic... |
Reduce the amount of 'PersistedCityStatistics' | using System.Collections.Generic;
using System.Linq;
using Mirage.Urbanization.ZoneStatisticsQuerying;
using System.Collections.Immutable;
namespace Mirage.Urbanization.Simulation.Persistence
{
public class PersistedCityStatisticsCollection
{
private ImmutableQueue<PersistedCityStatisticsWithFinancialD... | using System.Collections.Generic;
using System.Linq;
using Mirage.Urbanization.ZoneStatisticsQuerying;
using System.Collections.Immutable;
namespace Mirage.Urbanization.Simulation.Persistence
{
public class PersistedCityStatisticsCollection
{
private ImmutableQueue<PersistedCityStatisticsWithFinancialD... |
Add GitHub auth. Hide option in UI | using System;
using System.IO;
using System.Net;
namespace SimpleWAWS.Authentication
{
public static class AuthUtilities
{
public static string GetContentFromUrl(string url)
{
var request = (HttpWebRequest)WebRequest.Create(url);
using (var response = request.GetRespons... | using System;
using System.IO;
using System.Net;
namespace SimpleWAWS.Authentication
{
public static class AuthUtilities
{
public static string GetContentFromUrl(string url, string method="GET", bool jsonAccept = false, bool addGitHubHeaders = false, string AuthorizationHeader ="")
{
... |
Add application title and copyright. | 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("dc... | 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("Di... |
Allow to set spawn interval public | using UnityEngine;
using System.Collections;
public class SpawnController : MonoBehaviour {
public GameObject enemiesFolder;
public GameObject originalEnemy;
public int enemiesToSpawn;
private int enemiesSpawned;
void Start () {
enemiesSpawned = 0;
InvokeRepeating("SpawnEnemy", 0, 2f);
}
... | using UnityEngine;
using System.Collections;
public class SpawnController : MonoBehaviour {
public GameObject enemiesFolder;
public GameObject originalEnemy;
public int enemiesToSpawn;
public float spawnInterval;
private int enemiesSpawned;
void Start () {
enemiesSpawned = 0;
InvokeRepeating("S... |
Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0. | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// 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.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... |
Remove TEAK_X_Y_OR_NEWER before adding them again so that in the case of SDK rollback defines are not left in | using UnityEditor;
using UnityEditor.Build;
#if UNITY_2018_1_OR_NEWER
using UnityEditor.Build.Reporting;
#endif
using UnityEngine;
using System.Collections.Generic;
class TeakPreProcessDefiner :
#if UNITY_2018_1_OR_NEWER
IPreprocessBuildWithReport
#else
IPreprocessBuild
#endif
{
public int callbackOrder {... | using UnityEditor;
using UnityEditor.Build;
#if UNITY_2018_1_OR_NEWER
using UnityEditor.Build.Reporting;
#endif
using UnityEngine;
using System.Collections.Generic;
class TeakPreProcessDefiner :
#if UNITY_2018_1_OR_NEWER
IPreprocessBuildWithReport
#else
IPreprocessBuild
#endif
{
public int callbackOrder {... |
Update image resolution to UHD | using System;
using System.IO;
namespace Kfstorm.BingWallpaper
{
public static class Constants
{
public static string DataPath
{
get
{
string path = Path.Combine(Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData), @... | using System;
using System.IO;
namespace Kfstorm.BingWallpaper
{
public static class Constants
{
public static string DataPath
{
get
{
string path = Path.Combine(Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData), @... |
Store ObjectHandle in LogicalCallContext and prevent cross AppDomain Activity usage | // 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.Remoting.Messaging;
using System.Security;
namespace System.Diagnostics
{
// this code is ... | // 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.Remoting;
using System.Runtime.Remoting.Messaging;
using System.Security;
namespace System.Dia... |
Add a control to permit rebase only when Working directory have no changes | using System;
using System.Collections.Generic;
using System.ComponentModel;
using NDesk.Options;
using Sep.Git.Tfs.Core;
using StructureMap;
namespace Sep.Git.Tfs.Commands
{
[Pluggable("pull")]
[Description("pull [options]")]
[RequiresValidGitRepository]
public class Pull : GitTfsCommand
{
... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using NDesk.Options;
using Sep.Git.Tfs.Core;
using StructureMap;
namespace Sep.Git.Tfs.Commands
{
[Pluggable("pull")]
[Description("pull [options]")]
[RequiresValidGitRepository]
public class Pull : GitTfsCommand
{
... |
Add multiplayer screen test steps. | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using osu.Game.Screens.Multi;
namespace osu.Game.Tests.Visual
{
[TestFixture]
public class TestCaseMultiScreen : OsuTestCase
{
... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using osu.Game.Screens.Multi;
namespace osu.Game.Tests.Visual
{
[TestFixture]
public class TestCaseMultiScreen : OsuTestCase
{
... |
Add license header to the new file | using System;
using System.Collections.Generic;
using System.Text;
namespace osu.Game.Graphics
{
public class DrawableJoinDate : DrawableDate
{
private readonly DateTimeOffset date;
public DrawableJoinDate(DateTimeOffset date) : base(date)
{
this.date = date;
}
... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Text;
namespace osu.Game.Graphics
{
public class DrawableJoinDate : DrawableDate
{
private... |
Switch remaining test back to NUnit | using Xunit;
using System;
using Cake.Core.IO;
using Cake.Xamarin.Build;
namespace Cake.Xamarin.Build.Tests.Fakes
{
public class DownloadFileTests : TestFixtureBase
{
[Fact]
public void Download_FacebookSDK ()
{
var url = "https://origincache.facebook.com/developers/resources/?id... | using System;
using Cake.Core.IO;
using Cake.Xamarin.Build;
using NUnit.Framework;
namespace Cake.Xamarin.Build.Tests.Fakes
{
public class DownloadFileTests : TestFixtureBase
{
[Test]
public void Download_FacebookSDK ()
{
var url = "https://origincache.facebook.com/developers/res... |
Disable NetworkPlayer extensions in WebGL | using UnityEngine;
namespace Extensions
{
/// <summary>
/// Extension methods for UnityEngine.NetworkPlayer.
/// </summary>
public static class NetworkPlayerExtensions
{
/// <summary>
/// Gets the numeric index of the network player.
/// </summary>
/// <param name="n... | #if !UNITY_WEBGL
using UnityEngine;
namespace Extensions
{
/// <summary>
/// Extension methods for UnityEngine.NetworkPlayer.
/// </summary>
public static class NetworkPlayerExtensions
{
/// <summary>
/// Gets the numeric index of the network player.
/// </summary>
... |
Simplify firefox title with version selector. | using System.Linq;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using AngleSharp;
using AngleSharp.Parser.Html;
namespace WebDriverManager.DriverConfigs.Impl
{
public class FirefoxConfig : IDriverConfig
{
public virtual string GetName()
{
... | using System.Linq;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using AngleSharp;
using AngleSharp.Parser.Html;
namespace WebDriverManager.DriverConfigs.Impl
{
public class FirefoxConfig : IDriverConfig
{
public virtual string GetName()
{
... |
Add check if data is null | using UnityEngine;
using System.Collections;
public class Wall : MonoBehaviour {
public Sprite dmgSprite;
public int hp = 4;
public AudioClip chopSound1;
public AudioClip chopSound2;
//hit points for the wall.
private SpriteRenderer spriteRenderer; //Store a component reference to the attached SpriteR... | using UnityEngine;
using System.Collections;
public class Wall : MonoBehaviour {
public Sprite dmgSprite;
public int hp = 4;
public AudioClip chopSound1;
public AudioClip chopSound2;
//hit points for the wall.
private SpriteRenderer spriteRenderer; //Store a component reference to the attached SpriteR... |
Fix possible exceptions in Reflection helper. | using System;
using System.Linq;
public static class ReflectionHelper
{
public static Type FindType(string fullName)
{
return AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes()).FirstOrDefault(t => t.FullName.Equals(fullName));
}
public static Type FindType(string fullName, ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
public static class ReflectionHelper
{
public static Type FindType(string fullName)
{
return AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetSafeTypes()).FirstOrDefault(t => t.FullName != null && t... |
Fix broken claims and characters filter | using System.Collections.Generic;
using JoinRpg.DataModel;
using JoinRpg.Services.Interfaces;
namespace JoinRpg.Services.Impl.ClaimProblemFilters
{
internal class BrokenClaimsAndCharacters : IClaimProblemFilter
{
public IEnumerable<ClaimProblem> GetProblems(Project project, Claim claim)
{
if (claim.... | using System.Collections.Generic;
using JoinRpg.DataModel;
using JoinRpg.Services.Interfaces;
namespace JoinRpg.Services.Impl.ClaimProblemFilters
{
internal class BrokenClaimsAndCharacters : IClaimProblemFilter
{
public IEnumerable<ClaimProblem> GetProblems(Project project, Claim claim)
{
if (claim.... |
Fix test, we have a custom Exception now that is public. | using AppSettingsByConvention;
using FluentAssertions;
using NUnit.Framework;
namespace AppSettingsByConventionTests
{
[TestFixture]
public class WhenAnalyzingExportedTypes
{
[Test]
public void ShouldMatchWhitelist()
{
var whiteList = new []
{
... | using System.Linq;
using AppSettingsByConvention;
using FluentAssertions;
using NUnit.Framework;
namespace AppSettingsByConventionTests
{
[TestFixture]
public class WhenAnalyzingExportedTypes
{
[Test]
public void ShouldMatchWhitelist()
{
var whiteList = new []
... |
Fix bug in SFML mouse wheel | using System;
using SFML.Graphics;
using SFML.Window;
using Point = SadRogue.Primitives.Point;
using SFMLMouse = SFML.Window.Mouse;
namespace SadConsole.Host
{
public class Mouse : SadConsole.Input.IMouseState
{
private int _mouseWheelValue;
private RenderWindow _window;
public Mouse(... | using System;
using SFML.Graphics;
using SFML.Window;
using Point = SadRogue.Primitives.Point;
using SFMLMouse = SFML.Window.Mouse;
namespace SadConsole.Host
{
public class Mouse : SadConsole.Input.IMouseState
{
private int _mouseWheelValue;
private RenderWindow _window;
public Mouse(... |
Format registration a bit better | using Glimpse;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;
namespace Glimpse
{
public class GlimpseServices
{
public static IEnumerable<IServiceDescriptor> Get... | using Glimpse;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;
using System;
using System.Reflection;
namespace Glimpse
{
public class GlimpseServices
{
public sta... |
Check the state before fetching the thread id | // 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;
using System.Collections.Generic;
namespace System.IO
{
// Abstract Iterator, borrowed from Linq. Used in anticipation of n... | // 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;
using System.Collections.Generic;
namespace System.IO
{
// Abstract Iterator, borrowed from Linq. Used in anticipation of n... |
Remove Down() from Migrator (it is not used by the engine) | using Microsoft.SharePoint.Client;
namespace IonFar.SharePoint.Migration
{
/// <summary>
/// Base class for code-based migrations.
/// </summary>
public abstract class Migration : IMigration
{
public abstract void Up(ClientContext clientContext, IUpgradeLog logger);
public virtual... | using Microsoft.SharePoint.Client;
namespace IonFar.SharePoint.Migration
{
/// <summary>
/// Base class for code-based migrations.
/// </summary>
public abstract class Migration : IMigration
{
public abstract void Up(ClientContext clientContext, IUpgradeLog logger);
protected stri... |
Add comments about relative Service address. | using System;
using System.ServiceModel;
using HelloIndigo;
namespace Host
{
class Program
{
static void Main()
{
using (
var host = new ServiceHost(typeof (HelloIndigoService),
new Uri("http://localhost:8000/HelloIndigo")))
{
... | using System;
using System.ServiceModel;
using HelloIndigo;
namespace Host
{
class Program
{
static void Main()
{
// A side effect (although perhaps documented) of supplying
// a Uri to the ServiceHost contstructor is that this Uri
// becomes the base addr... |
Fix nullRef when processing empty entities (imported from main endpoind to extended one) | using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
namespace PX.Api.ContractBased.Maintenance.Cli.Utils
{
static class Sorter
{
public static void Sort(this XDocument original)
{
XElement root = original.Elements().Single();
XNamespac... | using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
namespace PX.Api.ContractBased.Maintenance.Cli.Utils
{
static class Sorter
{
public static void Sort(this XDocument original)
{
XElement root = original.Elements().Single();
XNamespac... |
Add subtasks to main screen on tasks | @model IEnumerable<BatteryCommander.Common.Models.Qualification>
@using BatteryCommander.Common.Models;
@{
ViewBag.Title = "Qualifications";
}
<h2>@ViewBag.Title</h2>
<p>
@Html.ActionLink("Add New", "New")
</p>
<table class="table table-striped">
<tr>
<th>
@Html.DisplayNameFor(model... | @model IEnumerable<BatteryCommander.Common.Models.Qualification>
@using BatteryCommander.Common.Models;
@{
ViewBag.Title = "Qualifications";
}
<h2>@ViewBag.Title</h2>
<p>
@Html.ActionLink("Add New", "New")
</p>
<table class="table table-striped">
<tr>
<th>
@Html.DisplayNameFor(model... |
Add raw key blob formats | namespace NSec.Cryptography
{
public enum KeyBlobFormat
{
None,
}
}
| namespace NSec.Cryptography
{
public enum KeyBlobFormat
{
None = 0,
// --- Secret Key Formats ---
RawSymmetricKey = -1,
RawPrivateKey = -2,
// --- Public Key Formats ---
RawPublicKey = 1,
}
}
|
Add controller random sleep in Management sample | using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System.Threading;
using System;
namespace CloudFoundry.Controllers
{
public class HomeController : Controller
{
private readonly ILogger _logger;
public HomeController(ILogger<HomeController> logger)
{
... | using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System.Threading;
using System;
namespace CloudFoundry.Controllers
{
public class HomeController : Controller
{
private readonly ILogger _logger;
private readonly Random _random;
public HomeController(ILogger<Ho... |
Refactor the redisconnection factory slightly | using System;
using System.Configuration;
using System.Linq;
using Autofac;
using Autofac.Integration.Mvc;
using BookSleeve;
namespace Compilify.Web.Infrastructure.DependencyInjection
{
public class RedisModule : Module
{
protected override void Load(ContainerBuilder builder)
{
... | using System;
using System.Configuration;
using System.Linq;
using Autofac;
using Autofac.Integration.Mvc;
using BookSleeve;
namespace Compilify.Web.Infrastructure.DependencyInjection
{
public class RedisModule : Module
{
protected override void Load(ContainerBuilder builder)
{
... |
Fix asset usages for field, when script component is assigned to field in Inspector | using JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.DeferredCaches.AssetHierarchy.References;
namespace JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.DeferredCaches.AssetHierarchy.Elements
{
public interface IScriptComponentHierarchy : IHierarchyElement
{
ExternalReference ScriptReference { get; }
}
} | using JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.DeferredCaches.AssetHierarchy.References;
namespace JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.DeferredCaches.AssetHierarchy.Elements
{
public interface IScriptComponentHierarchy : IComponentHierarchy
{
ExternalReference ScriptReference { get; }
}
} |
Update assembly version to Silverlight 3 Beta version | /* ****************************************************************************
*
* Copyright (c) Microsoft Corporation.
*
* This source code is subject to terms and conditions of the Microsoft Public License. A
* copy of the license can be found in the License.html file at the root of this distribution. If
* ... | /* ****************************************************************************
*
* Copyright (c) Microsoft Corporation.
*
* This source code is subject to terms and conditions of the Microsoft Public License. A
* copy of the license can be found in the License.html file at the root of this distribution. If
* ... |
Make base class abstract and add documentation | // 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.Tests.Visual
{
public class TestCaseRateAdjustedBeatmap : ScreenTestCase
{
protected override void Update()
{
base.... | // 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.Tests.Visual
{
/// <summary>
/// Test case which adjusts the beatmap's rate to match any speed adjustments in visual tests.
/// </summary>
... |
Check if managed exception (Android) | using System;
using Android.Runtime;
namespace AI.XamarinSDK.Android
{
public class Utils
{
public Utils ()
{
}
public static bool IsManagedException(Exception exception){
// TODO: Check exception type (java.lang., android.) or exception source (entry assembly name) to determine whether the exception is... | using System;
using Android.Runtime;
namespace AI.XamarinSDK.Android
{
public class Utils
{
public static readonly string[] JAVA_EXCEPTION_PREFIXES = {"java.lang.", "android."};
public static bool IsManagedException(Exception exception){
string exceptionType = exception.GetBaseException ().GetType ().ToStri... |
Replace client.GetStringAsync(url) with better HttpClient code that also allows for compression | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace WienerLinien.Api
{
public class DefaultHttpClient : IHttpClient
{
public async Task<string> GetS... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace WienerLinien.Api
{
public class DefaultHttpClient : IHttpClient
{
public async... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.