Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Reset commit to not break backwards compatibility mode | namespace Umbraco.Core.Models
{
public enum TagCacheStorageType
{
Json,
Csv
}
}
| namespace Umbraco.Core.Models
{
public enum TagCacheStorageType
{
Csv,
Json
}
} |
Fix bug where quest NPC dialog caused a crash because the requested NPC was never set | using AutomaticTypeMapper;
using EOLib.Domain.NPC;
using EOLib.IO.Repositories;
using EOLib.Net;
using EOLib.Net.Communication;
namespace EOLib.Domain.Interact
{
[AutoMappedType]
public class MapNPCActions : IMapNPCActions
{
private readonly IPacketSendService _packetSendService;
private r... | using AutomaticTypeMapper;
using EOLib.Domain.Interact.Quest;
using EOLib.Domain.NPC;
using EOLib.IO.Repositories;
using EOLib.Net;
using EOLib.Net.Communication;
namespace EOLib.Domain.Interact
{
[AutoMappedType]
public class MapNPCActions : IMapNPCActions
{
private readonly IPacketSendService _p... |
Switch the load order so that metadata comes first in the dom | namespace Glimpse.Core2.Extensibility
{
public enum ScriptOrder
{
IncludeBeforeClientInterfaceScript,
ClientInterfaceScript,
IncludeAfterClientInterfaceScript,
IncludeBeforeRequestDataScript,
RequestDataScript,
RequestMetadataScript,
IncludeAfterRequestD... | namespace Glimpse.Core2.Extensibility
{
public enum ScriptOrder
{
IncludeBeforeClientInterfaceScript,
ClientInterfaceScript,
IncludeAfterClientInterfaceScript,
IncludeBeforeRequestDataScript,
RequestMetadataScript,
RequestDataScript,
IncludeAfterRequestD... |
Make the FNF exception light up more robust | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Reflection;
namespace Roslyn.Utilities
{
/// <summary>
/// This is a bridge for APIs that are only available on Desktop
... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Reflection;
namespace Roslyn.Utilities
{
/// <summary>
/// This is a bridge for APIs that are only available on Desktop
... |
Fix bug: Clearing the cache says "All items have been cleared from the recent packages list." Work items: 986 | using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using NuGet.VisualStudio;
namespace NuGet.Options {
public partial class GeneralOptionControl : UserControl {
private IRecentPackageRepository _recentPackageRepository;
private IProductUpdateSettings _p... | using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using NuGet.VisualStudio;
namespace NuGet.Options {
public partial class GeneralOptionControl : UserControl {
private IRecentPackageRepository _recentPackageRepository;
private IProductUpdateSettings _p... |
Change a-Z to a-zA-Z as reccomended | namespace dotless.Core.Parser.Tree
{
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Infrastructure;
using Infrastructure.Nodes;
using Utils;
using Exceptions;
public class Url : Node
{
public Node Value { get; set; }
... | namespace dotless.Core.Parser.Tree
{
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Infrastructure;
using Infrastructure.Nodes;
using Utils;
using Exceptions;
public class Url : Node
{
public Node Value { get; set; }
... |
Comment out the environment message for the time being | using System;
using Glimpse.Agent.AspNet.Messages;
using Glimpse.Agent.Inspectors;
using Microsoft.AspNet.Http;
namespace Glimpse.Agent.AspNet.Internal.Inspectors.AspNet
{
public class EnvironmentInspector : Inspector
{
private readonly IAgentBroker _broker;
private EnvironmentMessage _message... | using System;
using Glimpse.Agent.AspNet.Messages;
using Glimpse.Agent.Inspectors;
using Microsoft.AspNet.Http;
namespace Glimpse.Agent.AspNet.Internal.Inspectors.AspNet
{
public class EnvironmentInspector : Inspector
{
private readonly IAgentBroker _broker;
private EnvironmentMessage _message... |
Fix unit test by making the Data property writable | using System.Collections.Generic;
namespace RestSharp.Portable.Test.HttpBin
{
public class HttpBinResponse
{
public Dictionary<string, string> Args { get; set; }
public Dictionary<string, string> Form { get; set; }
public Dictionary<string, string> Headers { get; set; }
publ... | using System.Collections.Generic;
namespace RestSharp.Portable.Test.HttpBin
{
public class HttpBinResponse
{
public Dictionary<string, string> Args { get; set; }
public Dictionary<string, string> Form { get; set; }
public Dictionary<string, string> Headers { get; set; }
publ... |
Drop in a note for later. | using System;
using System.Globalization;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace SparkPost.RequestSenders
{
public class AsyncRequestSender : IRequestSender
{
private readonly IClient client;
public AsyncRequestSender(IClient client)
... | using System;
using System.Globalization;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace SparkPost.RequestSenders
{
public class AsyncRequestSender : IRequestSender
{
private readonly IClient client;
public AsyncRequestSender(IClient client)
... |
Implement GetSchedule functionality for Rooms | using System;
using System.Collections.Generic;
using System.Linq;
using ISTS.Domain.Rooms;
using ISTS.Domain.Schedules;
namespace ISTS.Infrastructure.Repository
{
public class RoomRepository : IRoomRepository
{
public Room Get(Guid id)
{
return null;
}
public Room... | using System;
using System.Collections.Generic;
using System.Linq;
using ISTS.Domain.Rooms;
using ISTS.Domain.Schedules;
using ISTS.Infrastructure.Model;
namespace ISTS.Infrastructure.Repository
{
public class RoomRepository : IRoomRepository
{
private readonly IstsContext _context;
public Ro... |
Add invalid message + aria tags to login | <div class="grid-row">
<div class="column-half">
<h1 class="heading-large">Sign in</h1>
<form method="post">
@Html.AntiForgeryToken()
<div class="form-group">
<label class="form-label" for="email-address">Email address</label>
<input cl... | @model bool
@{
var invalidAttributes = Model ? "aria-invalid=\"true\" aria-labeledby=\"invalidMessage\"" : "";
}
<div class="grid-row">
<div class="column-half">
<h1 class="heading-large">Sign in</h1>
@if (Model)
{
<div class="error" style="margin-bottom: 10px;" i... |
Improve debug string representation of MacroDefinition. | namespace CppSharp.AST
{
public enum MacroLocation
{
Unknown,
ClassHead,
ClassBody,
FunctionHead,
FunctionParameters,
FunctionBody,
};
/// <summary>
/// Base class that describes a preprocessed entity, which may
/// be a preprocessor directive or... | namespace CppSharp.AST
{
public enum MacroLocation
{
Unknown,
ClassHead,
ClassBody,
FunctionHead,
FunctionParameters,
FunctionBody,
};
/// <summary>
/// Base class that describes a preprocessed entity, which may
/// be a preprocessor directive or... |
Add more unit test filestorage | using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
namespace LiteDB.Tests
{
[TestClass]
public class FileStorage_Test
{
[TestMethod]
public void FileStorage_InsertDelete()
{
// create a dump file
File.WriteAllText("Core.dll", "FileCoreConte... | using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System.Linq;
using System.Text;
namespace LiteDB.Tests
{
[TestClass]
public class FileStorage_Test
{
[TestMethod]
public void FileStorage_InsertDelete()
{
// create a dump file
File.W... |
Fix serialization of the zoneemphasis | using Newtonsoft.Json;
namespace OfficeDevPnP.Core.Pages
{
public class ClientSideSectionEmphasis
{
[JsonIgnore]
public int ZoneEmphasis
{
get
{
if (!string.IsNullOrWhiteSpace(ZoneEmphasisString) && int.TryParse(ZoneEmphasisString, out int result... | using Newtonsoft.Json;
namespace OfficeDevPnP.Core.Pages
{
public class ClientSideSectionEmphasis
{
[JsonProperty(PropertyName = "zoneEmphasis", NullValueHandling = NullValueHandling.Ignore)]
public int ZoneEmphasis
{
get
{
if (!string.IsNullOrWh... |
Add http path under http.uri tag | using System;
using Microsoft.AspNetCore.Builder;
using Criteo.Profiling.Tracing;
using Criteo.Profiling.Tracing.Utils;
namespace Criteo.Profiling.Tracing.Middleware
{
public static class TracingMiddleware
{
public static void UseTracing(this IApplicationBuilder app, string serviceName)
{
... | using System;
using Microsoft.AspNetCore.Builder;
using Criteo.Profiling.Tracing;
using Criteo.Profiling.Tracing.Utils;
namespace Criteo.Profiling.Tracing.Middleware
{
public static class TracingMiddleware
{
public static void UseTracing(this IApplicationBuilder app, string serviceName)
{
... |
Refactor Divide Doubles operation to use GetValues and CloneWithValues | namespace TensorSharp.Operations
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class DivideDoubleDoubleOperation : IBinaryOperation<double, double, double>
{
public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<double> ... | namespace TensorSharp.Operations
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class DivideDoubleDoubleOperation : IBinaryOperation<double, double, double>
{
public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<double> ... |
Add IRequestTarget.Cast instead of BoundActorTarget.* | namespace Akka.Interfaced
{
public static class InterfacedActorRefExtensions
{
// Cast (not type-safe)
public static TRef Cast<TRef>(this InterfacedActorRef actorRef)
where TRef : InterfacedActorRef, new()
{
if (actorRef == null)
return null;
... | namespace Akka.Interfaced
{
public static class InterfacedActorRefExtensions
{
// Cast (not type-safe)
public static TRef Cast<TRef>(this InterfacedActorRef actorRef)
where TRef : InterfacedActorRef, new()
{
if (actorRef == null)
return null;
... |
Add error checking to basic auth header | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.Net.Http.Headers;
using System.Text;
namespace System.Net.Http
{
public class BasicAuthenticationHeaderValue : Authenticatio... | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.Net.Http.Headers;
using System.Text;
namespace System.Net.Http
{
public class BasicAuthenticationHeaderValue : Authenticatio... |
Fix for get current user on anon page | using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BatteryCommander.Web.Models;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
namespace BatteryCommander.Web.Queries
{
public class GetCurrentUser : IRequest<Soldier>
{
private class Hand... | using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BatteryCommander.Web.Models;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
namespace BatteryCommander.Web.Queries
{
public class GetCurrentUser : IRequest<Soldier>
{
private class Hand... |
Update enum for VS 2017 | // 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.
namespace Cake.Common.Tools.NuGet
{
/// <summary>
/// NuGet MSBuild version
/// </summary>
public e... | // 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.
namespace Cake.Common.Tools.NuGet
{
/// <summary>
/// NuGet MSBuild version
/// </summary>
public e... |
Fix spelling of SuccessfulShards in CatSnapshots | using System.Runtime.Serialization;
using Elasticsearch.Net.Utf8Json;
namespace Nest
{
[DataContract]
public class CatSnapshotsRecord : ICatRecord
{
[DataMember(Name ="duration")]
public Time Duration { get; set; }
[DataMember(Name ="end_epoch")]
[JsonFormatter(typeof(StringLongFormatter))]
public long ... | using System.Runtime.Serialization;
using Elasticsearch.Net.Utf8Json;
namespace Nest
{
[DataContract]
public class CatSnapshotsRecord : ICatRecord
{
[DataMember(Name ="duration")]
public Time Duration { get; set; }
[DataMember(Name ="end_epoch")]
[JsonFormatter(typeof(StringLongFormatter))]
public long ... |
Comment code that should be commented | namespace JetBrains.ReSharper.Koans.Editing
{
// Smart Completion
//
// Narrows candidates to those that best suit the current context
//
// Ctrl+Alt+Space (VS)
// Ctrl+Shift+Space (IntelliJ)
public class SmartCompletion
{
// 1. Start typing: string s =
// Automatic... | namespace JetBrains.ReSharper.Koans.Editing
{
// Smart Completion
//
// Narrows candidates to those that best suit the current context
//
// Ctrl+Alt+Space (VS)
// Ctrl+Shift+Space (IntelliJ)
public class SmartCompletion
{
// 1. Start typing: string s =
// Automatic... |
Adjust namespaces for Data.NHibernate4 unit tests. | using System;
using System.Data;
using System.Linq;
using Cobweb.Data;
using Cobweb.Data.NHibernate;
using NHibernate;
namespace Data.NHibernate.Tests {
/// <summary>
/// These tests are not executed by NUnit. They are here for compile-time checking. 'If it builds, ship it.'
/// </summary>
public ... | using System;
using System.Data;
using System.Linq;
using NHibernate;
namespace Cobweb.Data.NHibernate.Tests {
/// <summary>
/// These tests are not executed by NUnit. They are here for compile-time checking. 'If it builds, ship it.'
/// </summary>
public class CompileTests {
internal clas... |
Extend the boxing/unboxing test with a primitive value unbox | using System;
public struct Foo : ICloneable
{
public int CloneCounter { get; private set; }
public object Clone()
{
CloneCounter++;
return this;
}
}
public static class Program
{
public static ICloneable BoxAndCast<T>(T Value)
{
return (ICloneable)Value;
}
pu... | using System;
public struct Foo : ICloneable
{
public int CloneCounter { get; private set; }
public object Clone()
{
CloneCounter++;
return this;
}
}
public static class Program
{
public static ICloneable BoxAndCast<T>(T Value)
{
return (ICloneable)Value;
}
pu... |
Fix issue with test class | using System.Data;
using System.Data.SQLite;
using System.Reflection;
using FakeItEasy;
using FakeItEasy.Core;
using SimpleMigrations;
using SimpleMigrations.VersionProvider;
using Smoother.IoC.Dapper.Repository.UnitOfWork.Data;
using Smoother.IoC.Dapper.Repository.UnitOfWork.UoW;
namespace Smoother.IoC.Dapper.FastCR... | using System.Data;
using System.Data.SQLite;
using System.Reflection;
using FakeItEasy;
using FakeItEasy.Core;
using SimpleMigrations;
using SimpleMigrations.VersionProvider;
using Smoother.IoC.Dapper.Repository.UnitOfWork.Data;
using Smoother.IoC.Dapper.Repository.UnitOfWork.UoW;
namespace Smoother.IoC.Dapper.FastCR... |
Repair error in Console Writeline | using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, C#!");
}
}
| using System;
class Program
{
static void Main()
{
Console.WriteLine(DateTime.Now);
}
}
|
Add remarks about non-UI thread | using System;
using System.ComponentModel;
using GitHub.Models;
namespace GitHub.Services
{
/// <summary>
/// Responsible for watching the active repository in Team Explorer.
/// </summary>
/// <remarks>
/// A <see cref="PropertyChanged"/> event is fired when moving to a new repository.
/// A ... | using System;
using System.ComponentModel;
using GitHub.Models;
namespace GitHub.Services
{
/// <summary>
/// Responsible for watching the active repository in Team Explorer.
/// </summary>
/// <remarks>
/// A <see cref="PropertyChanged"/> event is fired when moving to a new repository.
/// A ... |
Add bindings in settings viewmodel for user alert | using System;
using System.Collections.ObjectModel;
using System.Windows.Input;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using twitch_tv_viewer.Repositories;
namespace twitch_tv_viewer.ViewModels
{
internal class SettingsViewModel : ViewModelBase
{
private ObservableCollection<strin... | using System;
using System.Collections.ObjectModel;
using System.Windows.Input;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using twitch_tv_viewer.Repositories;
namespace twitch_tv_viewer.ViewModels
{
internal class SettingsViewModel : ViewModelBase
{
private ObservableCollection<strin... |
Use regular test steps rather than one-time set up and scheduling | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Screens.R... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Screens.R... |
Make global categories colors are display only | @using Microsoft.AspNetCore.Builder
@using Microsoft.Extensions.Options
@model IEnumerable<Category>
@inject IOptions<RequestLocalizationOptions> LocOptions
@{
var cultures = LocOptions.Value.SupportedUICultures
.Skip(1)
.Select(culture => new { Culture = culture.Name, Name = culture.EnglishName }... | @using Microsoft.AspNetCore.Builder
@using Microsoft.Extensions.Options
@model IEnumerable<Category>
@inject IOptions<RequestLocalizationOptions> LocOptions
@{
var cultures = LocOptions.Value.SupportedUICultures
.Skip(1)
.Select(culture => new { Culture = culture.Name, Name = culture.EnglishName }... |
Add new plugin repository URL | using FogCreek.Plugins;
[assembly: AssemblyFogCreekPluginId("FBExtendedEvents@goit.io")]
[assembly: AssemblyFogCreekMajorVersion(3)]
[assembly: AssemblyFogCreekMinorVersionMin(5)]
[assembly: AssemblyFogCreekEmailAddress("jozef.izso@gmail.com")]
[assembly: AssemblyFogCreekWebsite("https://github.com/jozefizso/FBExtend... | using FogCreek.Plugins;
[assembly: AssemblyFogCreekPluginId("FBExtendedEvents@goit.io")]
[assembly: AssemblyFogCreekMajorVersion(3)]
[assembly: AssemblyFogCreekMinorVersionMin(5)]
[assembly: AssemblyFogCreekEmailAddress("jozef.izso@gmail.com")]
[assembly: AssemblyFogCreekWebsite("https://github.com/jozefizso/FogBugz-... |
Add simple JSON endpoint for soldiers with access | using BatteryCommander.Web.Models;
using FluentScheduler;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.IO;
namespace BatteryCommander.Web.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
public class AdminController : Controller
{
// Adm... | using BatteryCommander.Web.Models;
using FluentScheduler;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
using System.Threading.Tasks;
namespace BatteryCommander.Web.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
public class AdminController : Controller
{
// Admin Tasks:
// Ad... |
Fix of not unsubscribing to characteristics on disconnect | using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Devices.Bluetooth;
using Windows.Devices.Bluetooth.GenericAttributeProfile;
using Windows.Foundation;
namespace BleLab.Services
{
public class CharacteristicSubscriptionService
{
private readonly Dictionary<Guid, GattChar... | using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Devices.Bluetooth;
using Windows.Devices.Bluetooth.GenericAttributeProfile;
using Windows.Foundation;
namespace BleLab.Services
{
public class CharacteristicSubscriptionService
{
private readonly Dictionary<Guid, GattChar... |
Switch direct handling by a syncrhonous dispatching in console sample | using System;
using Bartender;
using ConsoleApplication.Domain.Personne.Create;
using ConsoleApplication.Domain.Personne.Read;
using ConsoleApplication.Registries;
using StructureMap;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
var registry = ne... | using System;
using Bartender;
using ConsoleApplication.Domain.Personne.Create;
using ConsoleApplication.Domain.Personne.Read;
using ConsoleApplication.Registries;
using StructureMap;
namespace ConsoleApplication
{
class Program
{
static void Main()
{
var registry = new Registry();... |
Add agent to the web middleware | using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet.Framework;
namespace Glimpse.Host.Web.AspNet
{
public class GlimpseMiddleware
{
private readonly RequestDelegate _innerNext;
public GlimpseMiddleware(RequestDelegate innerNext)
{
_i... | using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Glimpse.Host.Web.AspNet.Framework;
using Glimpse.Agent.Web;
namespace Glimpse.Host.Web.AspNet
{
public class GlimpseMiddleware
{
private readonly RequestDelegate _innerNext;
private readonly WebAgentRuntime _runtime;
... |
Adjust paddings to feel better now that backgrounds are visible of toolboxes | // 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 disable
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers;
using osuTK;
namespace osu.Game.Rulesets.Edit
{
... | // 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 disable
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers;
using osuTK;
namespace osu.Game.Rulesets.Edit
{
... |
Add link to MemoryStream.CopyToAsync source link. | using System.IO;
namespace AWTY.Http.IntegrationTests
{
/// <summary>
/// A non-optimised version of <see cref="MemoryStream"/> for use in tests.
/// </summary>
/// <remarks>
/// <see cref="MemoryStream"/> performs a bunch of optimisations unless subclassed.
///
/// Unfortunate... | using System.IO;
namespace AWTY.Http.IntegrationTests
{
/// <summary>
/// A non-optimised version of <see cref="MemoryStream"/> for use in tests.
/// </summary>
/// <remarks>
/// <see cref="MemoryStream"/>'s CopyToAsync performs a bunch of optimisations unless subclassed.
/// https:... |
Initialize git repo on startup. | // -----------------------------------------------------------------------
// <copyright file="Global.asax.cs" company="(none)">
// Copyright © 2015 John Gietzen. All Rights Reserved.
// This source is subject to the MIT license.
// Please see license.md for more information.
// </copyright>
// -----------------... | // -----------------------------------------------------------------------
// <copyright file="Global.asax.cs" company="(none)">
// Copyright © 2015 John Gietzen. All Rights Reserved.
// This source is subject to the MIT license.
// Please see license.md for more information.
// </copyright>
// -----------------... |
Remove Canadian Styling of bool | @using CRP.Controllers
@using Microsoft.Web.Mvc
@model IEnumerable<CRP.Core.Domain.Transaction>
<div class="tab-pane active" id="Transactions">
<table id="table-Transactions">
<thead>
<tr>
<th></th>
<th>Transaction</th>
<th>Quantity... | @using CRP.Controllers
@using Microsoft.Web.Mvc
@model IEnumerable<CRP.Core.Domain.Transaction>
<div class="tab-pane active" id="Transactions">
<table id="table-Transactions">
<thead>
<tr>
<th></th>
<th>Transaction</th>
<th>Quantity... |
Add new user constructor tests | using Microsoft.AspNet.Identity.EntityFramework;
using NUnit.Framework;
using ZobShop.Models;
namespace ZobShop.Tests.Models.UserTests
{
[TestFixture]
public class UserConstructorTests
{
[Test]
public void Constructor_Should_InitializeUserCorrectly()
{
var user = new Us... | using Microsoft.AspNet.Identity.EntityFramework;
using NUnit.Framework;
using ZobShop.Models;
namespace ZobShop.Tests.Models.UserTests
{
[TestFixture]
public class UserConstructorTests
{
[Test]
public void Constructor_Should_InitializeUserCorrectly()
{
var user = new Us... |
Fix issue where the file name wasn't getting specified. | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="BackupMessageHandler.cs" company="Naos">
// Copyright 2015 Naos
// </copyright>
// ----------------------------------------------------------------------------------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="BackupMessageHandler.cs" company="Naos">
// Copyright 2015 Naos
// </copyright>
// ----------------------------------------------------------------------------------------------... |
Add method to subtract points from player | using System;
using System.Runtime.InteropServices;
namespace PlayerRank
{
public class PlayerScore
{
public string Name { get; set; }
public Points Points { get; internal set; }
public PlayerScore(string name)
{
Name = name;
Points = new Points... | using System;
using System.Runtime.InteropServices;
namespace PlayerRank
{
public class PlayerScore
{
public string Name { get; set; }
public Points Points { get; internal set; }
public PlayerScore(string name)
{
Name = name;
Points = new Points... |
Disable test parallelization for PerfView tests | 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("Pe... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Xunit;
// 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: Asse... |
Handle system wide installs of chrome | using System;
using System.Diagnostics;
using Microsoft.Win32;
namespace Admo.Utilities
{
public class SoftwareUtils
{
public static string GetChromeVersion()
{
var path = Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe", "", nu... | using System;
using System.Diagnostics;
using Microsoft.Win32;
namespace Admo.Utilities
{
public class SoftwareUtils
{
public static string GetChromeVersion()
{
//Handle both system wide and user installs of chrome
var pathLocal = Registry.GetValue(@"HKEY_CURRENT_USER\... |
Remove fileStream used for debugging | using System;
using System.IO;
using Compilify.Models;
namespace Compilify.Services
{
public class CSharpExecutor
{
public CSharpExecutor()
: this(new CSharpCompilationProvider()) { }
public CSharpExecutor(ICSharpCompilationProvider compilationProvider)
{
... | using System;
using System.IO;
using Compilify.Models;
namespace Compilify.Services
{
public class CSharpExecutor
{
public CSharpExecutor()
: this(new CSharpCompilationProvider()) { }
public CSharpExecutor(ICSharpCompilationProvider compilationProvider)
{
... |
Remove second parameter, bug not picked up by compiler | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Owin;
namespace JSNLog
{
public static class AppBuilderExtensions
{
public static void UseJSNLog(this IAppBuilder app, string loggerUrlRegex = null)
{
app.Use<JsnlogMiddlewareComponent>(logg... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Owin;
namespace JSNLog
{
public static class AppBuilderExtensions
{
public static void UseJSNLog(this IAppBuilder app)
{
app.Use<JsnlogMiddlewareComponent>();
}
}
}
|
Set nuget package version to 1.0.0 | using System.Reflection;
// 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("CakeMail.RestClient")]
[assembly: AssemblyDescription("CakeMail.RestClient is a... | using System.Reflection;
// 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("CakeMail.RestClient")]
[assembly: AssemblyDescription("CakeMail.RestClient is a... |
Load Confirmation plugin in PageBuilder | @Scripts.Render("~/Resources/JavaScript/Bootstrap")
@Scripts.Render("~/Resources/JavaScript/Bootstrap/Popover")
@Scripts.Render("~/Resources/JavaScript/Framework")
@if (UserHelper.IsAdmin)
{
@Scripts.Render("~/Resources/JavaScript/Bootstrap/Tour")
@Scripts.Render("~/Resources/JavaScript/Bootstrap/Confirmation... | @Scripts.Render("~/Resources/JavaScript/Bootstrap")
@Scripts.Render("~/Resources/JavaScript/Bootstrap/Confirmation")
@Scripts.Render("~/Resources/JavaScript/Bootstrap/Popover")
@Scripts.Render("~/Resources/JavaScript/Framework")
@if (UserHelper.IsAdmin)
{
@Scripts.Render("~/Resources/JavaScript/Bootstrap/Tour")
} |
Add benchmark of updating transforms when none are added | // 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 disable
using BenchmarkDotNet.Attributes;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osuTK;
namespac... | // 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 disable
using BenchmarkDotNet.Attributes;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osuTK;
namespac... |
Fix node lookup not adding saved computers to dict | using Hacknet;
using HarmonyLib;
using Pathfinder.Util;
namespace Pathfinder.BaseGameFixes.Performance
{
[HarmonyPatch]
internal static class NodeLookup
{
[HarmonyPostfix]
[HarmonyPatch(typeof(ComputerLoader), nameof(ComputerLoader.loadComputer))]
internal static void PopulateOnCom... | using Hacknet;
using HarmonyLib;
using Pathfinder.Event;
using Pathfinder.Event.Loading;
using Pathfinder.Util;
namespace Pathfinder.BaseGameFixes.Performance
{
[HarmonyPatch]
internal static class NodeLookup
{
[Util.Initialize]
internal static void Initialize()
{
Event... |
Fix hitcircle selections not responding to stacking changes | // 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.Game.Rulesets.Edit;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
namespace osu.Game.Rule... | // 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.Game.Rulesets.Edit;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
namespace osu.Game.Rule... |
Put MD5CryptoServiceProvider into using clause | using System;
using System.Text;
using System.Security.Cryptography;
using System.IO;
namespace FFImageLoading.Helpers
{
public class MD5Helper : IMD5Helper
{
public string MD5(Stream stream)
{
var hashProvider = new MD5CryptoServiceProvider();
var bytes = hashProvider.... | using System;
using System.Text;
using System.Security.Cryptography;
using System.IO;
namespace FFImageLoading.Helpers
{
public class MD5Helper : IMD5Helper
{
public string MD5(Stream stream)
{
using (var hashProvider = new MD5CryptoServiceProvider())
{
... |
Update code references: extension -> contact | using System.Collections.Generic;
public class Person
{
//---------------------------------------------------------------------------
public int Id { get; set; }
public string Name { get; set; }
public string Extension { get; set; }
public List<Status> Status { get; set; }
//----------------------------... | using System.Collections.Generic;
public class Person
{
//---------------------------------------------------------------------------
public int Id { get; set; }
public string Name { get; set; }
public string Contact { get; set; }
public List<Status> Status { get; set; }
//------------------------------... |
Return empty result when there are no credentials on the system. | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.InteropServices;
namespace poshring
{
public class CredentialsManager
{
public IEnumerable<Credential> GetCredentials()
{
int count;
IntPtr ptr;
... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.InteropServices;
namespace poshring
{
public class CredentialsManager
{
public IEnumerable<Credential> GetCredentials()
{
int count;
IntPtr ptr;
... |
Fix Module1 to run as independent app | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace Module1
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Modules;
namespace Module1
{
public class Program
{
public static void Main(s... |
CLean a potential hole in entityliving | using Voxalia.ServerGame.WorldSystem;
namespace Voxalia.ServerGame.EntitySystem
{
public abstract class EntityLiving: PhysicsEntity, EntityDamageable
{
public EntityLiving(Region tregion, bool ticks, float maxhealth)
: base(tregion, ticks)
{
MaxHealth = maxhealth;
... | using System;
using Voxalia.ServerGame.WorldSystem;
namespace Voxalia.ServerGame.EntitySystem
{
public abstract class EntityLiving: PhysicsEntity, EntityDamageable
{
public EntityLiving(Region tregion, bool ticks, float maxhealth)
: base(tregion, ticks)
{
MaxHealth = ma... |
Throw error if installer returns a non-zero exist code. | using AppGet.Commands.Install;
using AppGet.Commands.Uninstall;
using AppGet.Manifests;
using AppGet.Processes;
using NLog;
namespace AppGet.Installers
{
public abstract class InstallerWhispererBase : IInstallerWhisperer
{
private readonly IProcessController _processController;
private readonl... | using System.ComponentModel;
using AppGet.Commands.Install;
using AppGet.Commands.Uninstall;
using AppGet.Exceptions;
using AppGet.Manifests;
using AppGet.Processes;
using NLog;
namespace AppGet.Installers
{
public abstract class InstallerWhispererBase : IInstallerWhisperer
{
private readonly IProcess... |
Enable offline mode by default. | using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
public class NetworkManager : MonoBehaviour {
public List<string> ChatMessages;
// Goal #1: Create a reasonable chat system using the NEW UI System
public void AddChatMessage(string message) {
PhotonView.Get(this)... | using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
public class NetworkManager : MonoBehaviour {
public List<string> ChatMessages;
public bool IsOfflineMode;
// Goal #1: Create a reasonable chat system using the NEW UI System
public void AddChatMessage(string message)... |
Add extra properties to experience model | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CareerHub.Client.API.Students.Experiences {
public class ExperienceModel {
public int ID { get; set; }
public string Title { get; set; }
public string Organisation { get; set; }
public s... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CareerHub.Client.API.Students.Experiences {
public class ExperienceModel {
public int ID { get; set; }
public string Title { get; set; }
public string Organisation { get; set; }
public s... |
Add global exception handle, not enable. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Phoebe.Base;
using Phoebe.Common;
using Phoebe.Model;
namespace Phoebe.FormClient
{
static class Program
{
/// <summary>
/// 全局操作
/// </summary>
pu... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Phoebe.Base;
using Phoebe.Common;
using Phoebe.Model;
namespace Phoebe.FormClient
{
static class Program
{
/// <summary>
/// 全局操作
/// </summary>
pu... |
Clarify FudgeDie special case's formatting | using UnityEngine;
public class RollFudgeDie : RollSpecialDie
{
public override string Examine(Vector3 worldPos = default)
{
return $"It is showing side {GetFudgeMessage()}";
}
protected override string GetMessage()
{
return $"The {dieName} lands a {GetFudgeMessage()}";
}
private string GetFudgeMessage()
... | using UnityEngine;
public class RollFudgeDie : RollSpecialDie
{
public override string Examine(Vector3 worldPos = default)
{
return $"It is showing {GetFudgeMessage()}";
}
protected override string GetMessage()
{
return $"The {dieName} lands {GetFudgeMessage()}";
}
private string GetFudgeMessage()
{
//... |
Simplify file enumeration and correctly handle path too long exceptions when enumerating sub directories | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Framework.Logging;
namespace OmniSharp.Utilities
{
public class DirectoryEnumerator
{
private ILogger _logger;
public DirectoryEnumerator(ILoggerFactory loggerFactory)
{
_lo... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Framework.Logging;
namespace OmniSharp.Utilities
{
public class DirectoryEnumerator
{
private ILogger _logger;
public DirectoryEnumerator(ILoggerFactory loggerFactory)
{
_lo... |
Use separate task to queue sound effects so they can be played when they're loaded | using System;
using System.IO;
using MonoHaven.Resources;
using MonoHaven.Resources.Layers;
using MonoHaven.Utils;
using NVorbis.OpenTKSupport;
using OpenTK.Audio;
namespace MonoHaven
{
public class Audio : IDisposable
{
private readonly AudioContext context;
private readonly OggStreamer streamer;
public Aud... | using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using MonoHaven.Resources;
using MonoHaven.Resources.Layers;
using MonoHaven.Utils;
using NVorbis.OpenTKSupport;
using OpenTK.Audio;
namespace MonoHaven
{
public class Audio : IDisposable
{
private readonly AudioContext conte... |
Add mock changes to new Venmo class | using System;
namespace Braintree
{
public class VenmoAccount : PaymentMethod
{
public string Token { get; protected set; }
public string Username { get; protected set; }
public string VenmoUserId { get; protected set; }
public string SourceDescription { get; protected set; }
... | using System;
namespace Braintree
{
public class VenmoAccount : PaymentMethod
{
public string Token { get; protected set; }
public string Username { get; protected set; }
public string VenmoUserId { get; protected set; }
public string SourceDescription { get; protected set; }
... |
Remove underscore from parameter name | namespace ChessDotNet
{
public enum Event
{
Check,
Checkmate,
Stalemate,
Draw,
Custom,
Resign,
VariantEnd, // to be used for chess variants, which can be derived from ChessGame
None
}
public class GameStatus
{
public Event ... | namespace ChessDotNet
{
public enum Event
{
Check,
Checkmate,
Stalemate,
Draw,
Custom,
Resign,
VariantEnd, // to be used for chess variants, which can be derived from ChessGame
None
}
public class GameStatus
{
public Event ... |
Add basic blocking migration, move not copy | // 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.Logging;
using osu.Framework.Platform;
using osu.Game.Configuration;
namespace osu.Game.IO
{
public class OsuStorage : WrappedStorage
{
... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.IO;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Game.Configuration;
namespace osu.Game.IO
{
public class OsuStora... |
Make test run multiple times | // 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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osuTK;
namespa... | // 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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osuTK;
namespa... |
Change namespace to avoid conflict | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace System.IO.Pipelines
{
public class DuplexPipe : IDuplexPipe
{
public DuplexPipe(PipeReader reader, PipeWriter writer)
... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO.Pipelines;
namespace Microsoft.AspNetCore.Sockets
{
public class DuplexPipe : IDuplexPipe
{
public DuplexPipe(PipeRead... |
Fix bug not able to install packages to JS Metro project. Work items: 1986 | using System.IO;
using EnvDTE;
namespace NuGet.VisualStudio
{
/// <summary>
/// This project system represents the JavaScript Metro project in Windows8
/// </summary>
public class JsProjectSystem : VsProjectSystem
{
public JsProjectSystem(Project project, IFileSystemProvider fileS... | using System.IO;
using EnvDTE;
namespace NuGet.VisualStudio
{
/// <summary>
/// This project system represents the JavaScript Metro project in Windows8
/// </summary>
public class JsProjectSystem : VsProjectSystem
{
public JsProjectSystem(Project project, IFileSystemProvider fileS... |
Make published books "motion book"s | using System.Collections.Generic;
using System.Xml.Serialization;
namespace PhotoStoryToBloomConverter.BloomModel.BloomHtmlModel
{
public class Body
{
[XmlAttribute("bookcreationtype")]
public string BookCreationType;
[XmlAttribute("class")]
public string Class;
[XmlEle... | using System.Collections.Generic;
using System.Xml.Serialization;
namespace PhotoStoryToBloomConverter.BloomModel.BloomHtmlModel
{
public class Body
{
// REVIEW: I don't think these two are necessary/useful
[XmlAttribute("bookcreationtype")]
public string BookCreationType;
[XmlAttrib... |
Add deprecated 'tree list' type to formatter, because that's what __base templates still is :) | using System;
using System.Collections.Generic;
using Rainbow.Model;
using Sitecore.Data;
namespace Rainbow.Formatting.FieldFormatters
{
public class MultilistFormatter : FieldTypeBasedFormatter
{
public override string[] SupportedFieldTypes
{
get
{
return new[] { "Checklist", "Multilist", "Multilist ... | using System;
using System.Collections.Generic;
using Rainbow.Model;
using Sitecore.Data;
namespace Rainbow.Formatting.FieldFormatters
{
public class MultilistFormatter : FieldTypeBasedFormatter
{
public override string[] SupportedFieldTypes
{
get
{
return new[] { "Checklist", "Multilist", "Multilist ... |
Correct test client endpoint address. It worked! |
using System;
using System.Diagnostics;
using System.ServiceModel;
using NUnit.Framework;
using TechTalk.SpecFlow;
namespace Host.Specs
{
/// <summary>
/// An **copy** of the interface specifying the contract for this service.
/// </summary>
[ServiceContract(
Namespace = "http://www.thatindig... |
using System;
using System.Diagnostics;
using System.ServiceModel;
using NUnit.Framework;
using TechTalk.SpecFlow;
namespace Host.Specs
{
/// <summary>
/// An **copy** of the interface specifying the contract for this service.
/// </summary>
[ServiceContract(
Namespace = "http://www.thatindig... |
Remove underline from breadcrumb 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 osu.Game.Graphics.UserInterface;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Overlays
{
public class OverlayH... | // 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.Graphics.UserInterface;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Overlays
{
public class OverlayH... |
Fix button colors in beatmap options 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.ComponentModel;
using osu.Framework.Graphics.Sprites;
using osu.Game.Screens.Select.Options;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual.SongSele... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.ComponentModel;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Screens.Select.Options;
namespace osu.Game.Tests.Visual.SongS... |
Fix migration test - use correct database from v2 fixture. | namespace SqlStreamStore
{
using System.Threading;
using System.Threading.Tasks;
using Shouldly;
using SqlStreamStore.Streams;
using Xunit;
public class MigrationTests
{
[Fact]
public async Task Can_migrate()
{
// Set up an old schema + data.
... | namespace SqlStreamStore
{
using System.Threading;
using System.Threading.Tasks;
using Shouldly;
using SqlStreamStore.Streams;
using Xunit;
public class MigrationTests
{
[Fact]
public async Task Can_migrate()
{
// Set up an old schema + data.
... |
Disable "select all mods" button if all are selected | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Graphics.UserInterface;
using osu.Game.Localisation;
using... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Inp... |
Fix build error with mirroring | // 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.
namespace System
{
public readonly partial struct DateTime
{
public static DateTime UtcNow
{... | // 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.
namespace System
{
public readonly partial struct DateTime
{
public static DateTime UtcNow
{... |
Check voor CLS-compliante code verwijderd uit project CodeProject.Data | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("CodeProject - EF Library")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("AREBIS")]
[assembly: AssemblyProduct("CodeProject - ... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("CodeProject - EF Library")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("AREBIS")]
[assembly: AssemblyProduct("CodeProject - ... |
Update Json tests to reflect change to IEnumerable | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using Zermelo.API.Services;
namespace Zermelo.API.Tests.Services
{
public class JsonServiceTests
{
[Fact]
public void ShouldDes... | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using Zermelo.API.Services;
namespace Zermelo.API.Tests.Services
{
public class JsonServiceTests
{
[Fact]
public void ShouldDes... |
Extend character set of function names (including ".") | using System;
using System.Linq;
using System.Text.RegularExpressions;
namespace ExcelDna.IntelliSense
{
static class FormulaParser
{
// Set from IntelliSenseDisplay.Initialize
public static char ListSeparator = ',';
internal static bool TryGetFormulaInfo(string formulaPrefix, out stri... | using System;
using System.Linq;
using System.Text.RegularExpressions;
namespace ExcelDna.IntelliSense
{
static class FormulaParser
{
// Set from IntelliSenseDisplay.Initialize
public static char ListSeparator = ',';
internal static bool TryGetFormulaInfo(string formulaPrefix, out stri... |
Fix the problem that the web request is displayed twice when -Verbosity is set to detailed. |
namespace NuGet.Common
{
public class CommandLineRepositoryFactory : PackageRepositoryFactory
{
public static readonly string UserAgent = "NuGet Command Line";
private readonly IConsole _console;
public CommandLineRepositoryFactory(IConsole console)
{
_... |
using System.Windows;
namespace NuGet.Common
{
public class CommandLineRepositoryFactory : PackageRepositoryFactory, IWeakEventListener
{
public static readonly string UserAgent = "NuGet Command Line";
private readonly IConsole _console;
public CommandLineRepositoryFactor... |
Make the application and its window come in front when launched | using System;
using MonoMac.AppKit;
namespace macdoc
{
public class AppleDocWizardDelegate : NSApplicationDelegate
{
AppleDocWizardController wizard;
public override bool ApplicationShouldOpenUntitledFile (NSApplication sender)
{
return false;
}
public override void DidFinishLaunching (MonoMac.Fou... | using System;
using MonoMac.AppKit;
namespace macdoc
{
public class AppleDocWizardDelegate : NSApplicationDelegate
{
AppleDocWizardController wizard;
public override bool ApplicationShouldOpenUntitledFile (NSApplication sender)
{
return false;
}
public override void DidFinishLaunching (MonoMac.Fou... |
Use SetAnchorPreset instead of manually setting each anchor | using Content.Client.GameObjects.Components.Construction;
using Robust.Client.Interfaces.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
namespace Content.Client.Construction
{
public class ConstructionButton : Button
{
private readonly IDis... | using Content.Client.GameObjects.Components.Construction;
using Robust.Client.Interfaces.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
namespace Content.Client.Construction
{
public class ConstructionButton : Button
{
private readonly IDi... |
Handle PS3 covers with no text | using System.Linq;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
namespace PhotoStoryToBloomConverter.PS3Model
{
[XmlRoot("MSPhotoStoryProject", Namespace="MSPhotoStory")]
public class PhotoStoryProject
{
[XmlAttribute("schemaVersion")]
public string SchemaVersion;
... | using System.Linq;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
namespace PhotoStoryToBloomConverter.PS3Model
{
[XmlRoot("MSPhotoStoryProject", Namespace="MSPhotoStory")]
public class PhotoStoryProject
{
[XmlAttribute("schemaVersion")]
public string SchemaVersion;
... |
Add test for returning empty list from script | using System.Linq;
using NUnit.Framework;
namespace Rant.Tests.Richard
{
[TestFixture]
public class Lists
{
private readonly RantEngine rant = new RantEngine();
[Test]
public void ListInitBare()
{
Assert.AreEqual("5", rant.Do("[@ x = 1, 2, 3, 4, 5; x.length ]"... | using System.Linq;
using NUnit.Framework;
namespace Rant.Tests.Richard
{
[TestFixture]
public class Lists
{
private readonly RantEngine rant = new RantEngine();
[Test]
public void ListInitBare()
{
Assert.AreEqual("5", rant.Do("[@ x = 1, 2, 3, 4, 5; x.length ]"... |
Print results of running tests | using System;
namespace TDDUnit {
class TestTestCase : TestCase {
public TestTestCase(string name) : base(name) {
}
public void TestTemplateMethod() {
WasRunObj test = new WasRunObj("TestMethod");
test.Run();
Assert.That(test.Log == "SetUp TestMethod TearDown ");
}
public voi... | using System;
namespace TDDUnit {
class TestTestCase : TestCase {
public TestTestCase(string name) : base(name) {
}
public void TestTemplateMethod() {
WasRunObj test = new WasRunObj("TestMethod");
test.Run();
Assert.That(test.Log == "SetUp TestMethod TearDown ");
}
public voi... |
Add a bracket that somehow did not get comitted | // 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.Graphics;
using osu.Framework.Platform;
using osu.Framework.Testing;
namespace osu.Framework.Tests.Platform
{
[TestFixture... |
Fix missing API key error on AppVeyor | using System.Collections.Generic;
using Stormpath.Configuration.Abstractions;
using Stormpath.Owin.Abstractions.Configuration;
namespace Stormpath.Owin.UnitTest
{
public static class ConfigurationHelper
{
public static IntegrationConfiguration CreateFakeConfiguration(StormpathConfiguration config)
... | using System.Collections.Generic;
using Stormpath.Configuration.Abstractions;
using Stormpath.Owin.Abstractions.Configuration;
namespace Stormpath.Owin.UnitTest
{
public static class ConfigurationHelper
{
public static IntegrationConfiguration CreateFakeConfiguration(StormpathConfiguration config)
... |
Remove dependency of home controller since it is no longer needed | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using Oogstplanner.Common;
using Oogstplanner.Models;
using Oogstplanner.Services;
namespace Oogstplanner.Web.Controllers
{
[AllowAnonymous]
public class HomeController : Controller
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using Oogstplanner.Common;
using Oogstplanner.Models;
using Oogstplanner.Services;
namespace Oogstplanner.Web.Controllers
{
[AllowAnonymous]
public class HomeController : Controller
{
... |
Make sure that the stream passed in ctor can be seeked and read | using System;
using System.IO;
using System.Linq;
namespace Mlabs.Ogg
{
public class OggReader
{
private readonly Stream m_fileStream;
private readonly bool m_owns;
public OggReader(string fileName)
{
if (fileName == null) throw new ArgumentNullException("fileName"... | using System;
using System.IO;
using System.Linq;
namespace Mlabs.Ogg
{
public class OggReader
{
private readonly Stream m_fileStream;
private readonly bool m_owns;
public OggReader(string fileName)
{
if (fileName == null) throw new ArgumentNullException("fileName"... |
Add ToString to help with debuggign... :-) | using System;
using LinqToTTreeInterfacesLib;
using LINQToTTreeLib.Utils;
namespace LINQToTTreeLib.Variables
{
/// <summary>
/// A simple variable (like int, etc.).
/// </summary>
public class VarSimple : IVariable
{
public string VariableName { get; private set; }
publ... | using System;
using LinqToTTreeInterfacesLib;
using LINQToTTreeLib.Utils;
namespace LINQToTTreeLib.Variables
{
/// <summary>
/// A simple variable (like int, etc.).
/// </summary>
public class VarSimple : IVariable
{
public string VariableName { get; private set; }
publ... |
Add protected copy constructor to avoid breaking changes | // 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.Framework.Localisation
{
/// <summary>
/// A set of parameters that control the way strings are localised.
/// </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.Framework.Localisation
{
/// <summary>
/// A set of parameters that control the way strings are localised.
/// </summary>
... |
Check if there are any Clients on the list page | @model IEnumerable<BankingManagementClient.ProjectionStore.Projections.Client.ClientProjection>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.ElementAt(0)
... | @model IEnumerable<BankingManagementClient.ProjectionStore.Projections.Client.ClientProjection>
@{
ViewBag.Title = "Index";
}
<h2>Clients</h2>
@if (Model.Any())
{
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.ElementAt(0)
.ClientI... |
Handle null arrays when MSBuild doesn't initialize task properties | using System.IO;
using ApiContractGenerator.AssemblyReferenceResolvers;
using ApiContractGenerator.MetadataReferenceResolvers;
using ApiContractGenerator.Source;
using Microsoft.Build.Framework;
namespace ApiContractGenerator.MSBuild
{
public sealed class GenerateApiContract : ITask
{
public IBuildEngi... | using System.IO;
using ApiContractGenerator.AssemblyReferenceResolvers;
using ApiContractGenerator.MetadataReferenceResolvers;
using ApiContractGenerator.Source;
using Microsoft.Build.Framework;
namespace ApiContractGenerator.MSBuild
{
public sealed class GenerateApiContract : ITask
{
public IBuildEngi... |
Change "Countdown" "End Sync" properties order | using System;
using System.Collections.Generic;
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
namespace DesktopWidgets.Widgets.CountdownClock
{
public class Settings : WidgetClockSettingsBase
{
public Settings()
{
DateTimeFormat = new List<string> {"{dd}d {... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using DesktopWidgets.WidgetBase.Settings;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace DesktopWidgets.Widgets.CountdownClock
{
public class Settings : WidgetClockSettingsBase
{
public Settings()
{
... |
Fix cref attribute in XML comment | using Abp.Authorization.Users;
using Abp.MultiTenancy;
using Abp.NHibernate.EntityMappings;
namespace Abp.Zero.NHibernate.EntityMappings
{
/// <summary>
/// Base class to map classes derived from <see cref="AbpTenant{TTenant,TUser}"/>
/// </summary>
/// <typeparam name="TTenant">Tenant type</typeparam>... | using Abp.Authorization.Users;
using Abp.MultiTenancy;
using Abp.NHibernate.EntityMappings;
namespace Abp.Zero.NHibernate.EntityMappings
{
/// <summary>
/// Base class to map classes derived from <see cref="AbpTenant{TUser}"/>
/// </summary>
/// <typeparam name="TTenant">Tenant type</typeparam>
///... |
Update Assert call and mute the test | using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Octokit.Reactive;
using Xunit;
namespace Octokit.Tests.Integration
{
public class ObservableRepositoriesClientTests
{
public class TheGetMethod
{
[IntegrationTest]
public async Task Retur... | using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Octokit.Reactive;
using Xunit;
namespace Octokit.Tests.Integration
{
public class ObservableRepositoriesClientTests
{
public class TheGetMethod
{
[IntegrationTest]
public async Task Retur... |
Add mutability test to StripNamespaces | using System.Xml.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Tyrrrz.Extensions.Tests
{
[TestClass]
public class XmlTests
{
[TestMethod]
public void StripNamespacesTest()
{
var ns = XNamespace.Get("http://schemas.domain.com/orders");
v... | using System.Xml.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Tyrrrz.Extensions.Tests
{
[TestClass]
public class XmlTests
{
[TestMethod]
public void StripNamespacesTest()
{
var ns = XNamespace.Get("http://schemas.domain.com/orders");
v... |
Add basic integration test skeleton | //-----------------------------------------------------------------------
// <copyright file="Program.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace LockSample
{
using Syste... | //-----------------------------------------------------------------------
// <copyright file="Program.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace LockSample
{
using Syste... |
Return 403 instead of 401 | using System;
using System.Net;
using CVaS.Shared.Exceptions;
using CVaS.Web.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
namespace CVaS.Web.Filters
{
/// <summary>
/// Exception filter that catch exception of known type
/// and transform them into specific HTTP status c... | using System;
using System.Net;
using CVaS.Shared.Exceptions;
using CVaS.Web.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
namespace CVaS.Web.Filters
{
/// <summary>
/// Exception filter that catch exception of known type
/// and transform them into specific HTTP status c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.