Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add room name to settings | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using osu.Game.Online.API;
namespace osu.Game.Online.Re... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using osu.Game.Online.API;
namespace osu.Game.Online.Re... |
Add missing bootstrap reference (after removing bootswatch) | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - Calendar Proxy</title>
<link href="~/Content/iCalStyles.min.css" rel="stylesheet" />
<link href="~/Content/timer.min.css" rel="stylesheet" />
<li... | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - Calendar Proxy</title>
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/iCalStyles.min.css" rel="stylesheet" />
... |
Add Cygwin path replacement for Rename/Override | namespace OmniSharp.Rename
{
public class ModifiedFileResponse
{
public ModifiedFileResponse() {}
public ModifiedFileResponse(string fileName, string buffer) {
this.FileName = fileName;
this.Buffer = buffer;
}
public string FileName { get; set; }
... | using OmniSharp.Solution;
namespace OmniSharp.Rename
{
public class ModifiedFileResponse
{
private string _fileName;
public ModifiedFileResponse() {}
public ModifiedFileResponse(string fileName, string buffer) {
this.FileName = fileName;
this.Buffer = buffer;
... |
Revert "Added 5 tests for Length and a test for Time" | namespace Gu.Units.Tests
{
using NUnit.Framework;
public class UnitParserTests
{
[TestCase("1m", 1)]
[TestCase("-1m", -1)]
[TestCase("1e3m", 1e3)]
[TestCase("1e+3m", 1e+3)]
[TestCase("-1e+3m", -1e+3)]
[TestCase("1e-3m", 1e-3)]
[TestCase("-1e-3m", -1e... | namespace Gu.Units.Tests
{
using NUnit.Framework;
public class UnitParserTests
{
[TestCase("1m", 1)]
[TestCase("-1m", 1)]
[TestCase("1e3m", 1e3)]
[TestCase("1e+3m", 1e+3)]
[TestCase("1e-3m", 1e-3)]
[TestCase(" 1m", 1)]
[TestCase("1 m", 1)]
[T... |
Rework login partial to BS4 | @using Microsoft.AspNetCore.Identity
@using mvc_individual_authentication.Models
@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager
@if (SignInManager.IsSignedIn(User))
{
<form asp-area="" asp-controller="Account" asp-action="Logout" method="post" id="log... | @using Microsoft.AspNetCore.Identity
@using mvc_individual_authentication.Models
@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager
@if (SignInManager.IsSignedIn(User))
{
<form asp-area="" asp-controller="Account" asp-action="Logout" method="post" class="... |
Set specific version for Microsoft.DirectX.dll. | using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
using System;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft.DirectX")]
[assembly: AssemblyDescr... | using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
using System;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft.DirectX")]
[assembly: AssemblyDescr... |
Use ToString instead of Enum.GetName | // Copyright 2013 J.C. Moyer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | // Copyright 2013 J.C. Moyer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
Add a bunch of junk you might find in a top-level program | using System;
Console.WriteLine("Hello World!");
| using System;
using System.Linq.Expressions;
using ExpressionToCodeLib;
const int SomeConst = 27;
var myVariable = "implicitly closed over";
var withImplicitType = new {
A = "ImplicitTypeMember",
};
Console.WriteLine(ExpressionToCode.ToCode(() => myVariable));
new InnerClass().DoIt();
LocalFunction(123... |
Remove unused depedency from test | using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using Ploeh.AutoFixture.NUnit3;
using SlackConnector.Connections;
using SlackConnector.Connections.Clients.Channel;
using SlackConnector.Connections.Models;
using SlackConnector.Connections.Sockets;
using SlackConnector.Connections.Sockets.Messages.Outbou... | using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using Ploeh.AutoFixture.NUnit3;
using SlackConnector.Connections;
using SlackConnector.Connections.Sockets;
using SlackConnector.Connections.Sockets.Messages.Outbound;
using SlackConnector.Models;
namespace SlackConnector.Tests.Unit.SlackConnectionTests
... |
Expand interface to be more testable. So methods must have a session (i.e. not null) and add a generic for session when no session is needed. | using System.Collections.Generic;
using System.Threading.Tasks;
using Smooth.IoC.Dapper.Repository.UnitOfWork.Data;
namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Repo
{
public interface IRepository<TEntity, TPk>
where TEntity : class
{
TEntity GetKey(TPk key, ISession session);
Tas... | using System.Collections.Generic;
using System.Threading.Tasks;
using Smooth.IoC.Dapper.Repository.UnitOfWork.Data;
namespace Smooth.IoC.Dapper.Repository.UnitOfWork.Repo
{
public interface IRepository<TEntity, TPk>
where TEntity : class
{
TEntity GetKey(TPk key, ISession session);
TEn... |
Convert FormattingKeyword enum to it class name counterparts | namespace Glimpse.Core.Plugin.Assist
{
public static class FormattingKeywords
{
public const string Error = "error";
public const string Fail = "fail";
public const string Info = "info";
public const string Loading = "loading";
public const string Ms = "ms";
publ... | namespace Glimpse.Core.Plugin.Assist
{
public static class FormattingKeywords
{
public const string Error = "error";
public const string Fail = "fail";
public const string Info = "info";
public const string Loading = "loading";
public const string Ms = "ms";
publ... |
Load OIDC configuration from root of Authority | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.IdentityModel.Protocols;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
namespace Auth0.AuthenticationApi
{
internal class OpenIdConfigurationCache
... | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.IdentityModel.Protocols;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
namespace Auth0.AuthenticationApi
{
internal class OpenIdConfigurationCache
... |
Fix OsuGame test case not working | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Screens;
us... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;... |
Fix TryGetRawMetadata to return false when the assembly is not a RuntimeAssembly | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace System.Reflection.Metadata
{
public static class Asse... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace System.Reflection.Metadata
{
public static class Asse... |
Test parsing valid absolute URI | using System;
using Xunit;
namespace FromString.Tests
{
public class ParsedTTests
{
[Fact]
public void CanParseAnInt()
{
var parsedInt = new Parsed<int>("123");
Assert.True(parsedInt.HasValue);
Assert.Equal(123, parsedInt.Value);
}
... | using System;
using Xunit;
namespace FromString.Tests
{
public class ParsedTTests
{
[Fact]
public void CanParseAnInt()
{
var parsedInt = new Parsed<int>("123");
Assert.True(parsedInt.HasValue);
Assert.Equal(123, parsedInt.Value);
}
... |
Remove running benchmarks on .NET Core 2.1 | using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
using SwissArmyKnife.Benchmarks.Benches.Extensions;
using System;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Toolchains.CsProj;
namespace SwissArmyKnife.Benchmarks
{
class Program
{
private static vo... | using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
using SwissArmyKnife.Benchmarks.Benches.Extensions;
using System;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Toolchains.CsProj;
namespace SwissArmyKnife.Benchmarks
{
class Program
{
private static vo... |
Fix labels not appearing on BucketMonitorWidget | using System;
using BudgetAnalyser.Engine.Annotations;
namespace BudgetAnalyser.Engine.Widgets
{
public sealed class BudgetBucketMonitorWidget : RemainingBudgetBucketWidget, IUserDefinedWidget
{
private readonly string disabledToolTip;
private string doNotUseId;
public Budge... | using System;
using BudgetAnalyser.Engine.Annotations;
namespace BudgetAnalyser.Engine.Widgets
{
public sealed class BudgetBucketMonitorWidget : RemainingBudgetBucketWidget, IUserDefinedWidget
{
private readonly string disabledToolTip;
private string doNotUseId;
public Budge... |
Add missing Commit, when game starts. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TicTacToe.Core;
using TicTacToe.Web.Data;
using TicTacToe.Web.ViewModels;
namespace TicTacToe.Controllers
{
public class GameController : Controller
{
private ApplicationDbContext context;
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TicTacToe.Core;
using TicTacToe.Web.Data;
using TicTacToe.Web.ViewModels;
namespace TicTacToe.Controllers
{
public class GameController : Controller
{
private ApplicationDbContext context;
... |
Add negative test for the registration source. | using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
namespace Autofac.Test.Features.OpenGenerics
{
public class OpenGenericDelegateTests
{
private interface IInterfaceA<T>
{
}
private class ImplementationA<T> : IInterfaceA<T>
{
}
... | using System;
using System.Collections.Generic;
using System.Text;
using Autofac.Core;
using Autofac.Core.Registration;
using Xunit;
namespace Autofac.Test.Features.OpenGenerics
{
public class OpenGenericDelegateTests
{
private interface IInterfaceA<T>
{
}
private interface II... |
Test coverage for unparseable string -> DateTime conversion | namespace AgileObjects.AgileMapper.UnitTests.SimpleTypeConversion
{
using System;
using TestClasses;
using Xunit;
public class WhenMappingToDateTimes
{
[Fact]
public void ShouldMapANullableDateTimeToADateTime()
{
var source = new PublicProperty<DateTime?> { Valu... | namespace AgileObjects.AgileMapper.UnitTests.SimpleTypeConversion
{
using System;
using Shouldly;
using TestClasses;
using Xunit;
public class WhenMappingToDateTimes
{
[Fact]
public void ShouldMapANullableDateTimeToADateTime()
{
var source = new PublicProper... |
Use Count instead of Count() | using System;
using System.Collections.Generic;
using System.Linq;
using WalletWasabi.Bases;
using WalletWasabi.Coins;
namespace WalletWasabi.BlockchainAnalysis
{
public class Cluster : NotifyPropertyChangedBase
{
private List<SmartCoin> Coins { get; set; }
private string _labels;
public Cluster(params Smart... | using System;
using System.Collections.Generic;
using System.Linq;
using WalletWasabi.Bases;
using WalletWasabi.Coins;
namespace WalletWasabi.BlockchainAnalysis
{
public class Cluster : NotifyPropertyChangedBase
{
private List<SmartCoin> Coins { get; set; }
private string _labels;
public Cluster(params Smart... |
Update server side API for single multiple answer question | using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepository ... | using Microsoft.AspNetCore.Mvc;
using Promact.Trappist.DomainModel.Models.Question;
using Promact.Trappist.Repository.Questions;
using System;
namespace Promact.Trappist.Core.Controllers
{
[Route("api/question")]
public class QuestionsController : Controller
{
private readonly IQuestionRepository ... |
Fix a build warning for missing blank line at end of file | // Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace NOpenCL.Test
{
internal static class TestCategories
{
public const string RequireGpu = nameof(RequireGpu);
}
} | // Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace NOpenCL.Test
{
internal static class TestCategories
{
public const string RequireGpu = nameof(RequireGpu);
}
}
|
Replace another Task.Yield with Task.CompletedTask. | using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
namespace Sample
{
sealed partial class App : Template10.Common.BootStrapper
{
public App()
{
InitializeComponent();
}
public override async Task OnStartAsync(StartKind startKind, IActivatedEve... | using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
namespace Sample
{
sealed partial class App : Template10.Common.BootStrapper
{
public App()
{
InitializeComponent();
}
public override Task OnStartAsync(StartKind startKind, IActivatedEventArgs... |
Change text from favorites to "My Agenda" | @page "{id}"
@model SessionModel
<ol class="breadcrumb">
<li><a asp-page="/Index">Agenda</a></li>
<li><a asp-page="/Index" asp-route-day="@Model.DayOffset">Day @(Model.DayOffset + 1)</a></li>
<li class="active">@Model.Session.Title</li>
</ol>
<h1>@Model.Session.Title</h1>
<span class="label label-default"... | @page "{id}"
@model SessionModel
<ol class="breadcrumb">
<li><a asp-page="/Index">Agenda</a></li>
<li><a asp-page="/Index" asp-route-day="@Model.DayOffset">Day @(Model.DayOffset + 1)</a></li>
<li class="active">@Model.Session.Title</li>
</ol>
<h1>@Model.Session.Title</h1>
<span class="label label-default"... |
Remove interface mapping from role mapper | using System;
using System.Collections.Generic;
using System.Linq;
using Affecto.IdentityManagement.ApplicationServices.Model;
using Affecto.IdentityManagement.Interfaces.Model;
using Affecto.Mapping.AutoMapper;
using AutoMapper;
namespace Affecto.IdentityManagement.ApplicationServices.Mapping
{
internal class Ro... | using System.Collections.Generic;
using System.Linq;
using Affecto.IdentityManagement.ApplicationServices.Model;
using Affecto.Mapping.AutoMapper;
using AutoMapper;
namespace Affecto.IdentityManagement.ApplicationServices.Mapping
{
internal class RoleMapper : OneWayMapper<Querying.Data.Role, Role>
{
p... |
Fix Autofac crash due to linker stripping out a function used by reflection only | using System;
using Autofac;
namespace AGS.Engine.IOS
{
public class AGSEngineIOS
{
private static IOSAssemblies _assembly;
public static void Init()
{
OpenTK.Toolkit.Init();
var device = new IOSDevice(_assembly);
AGSGame.Device = device;
... | using System;
using Autofac;
namespace AGS.Engine.IOS
{
public class AGSEngineIOS
{
private static IOSAssemblies _assembly;
public static void Init()
{
// On IOS, when the mono linker is enabled (and it's enabled by default) it strips out all parts of
// the fr... |
Make sure we read the backing store name properly. | using System;
using System.IO;
using Newtonsoft.Json;
namespace Scanner
{
using System.Collections.Generic;
public class BackingStore
{
private string backingStoreName;
public BackingStore(string backingStoreName)
{
this.backingStoreName = backingStoreName;
}
... | using System;
using System.IO;
using Newtonsoft.Json;
namespace Scanner
{
using System.Collections.Generic;
public class BackingStore
{
private string backingStoreName;
public BackingStore(string backingStoreName)
{
this.backingStoreName = backingStoreName;
}
... |
Add 0.6 seconds preview time for spells | using System.Collections;
using System.Collections.Generic;
using HarryPotterUnity.Tween;
using HarryPotterUnity.Utils;
using JetBrains.Annotations;
using UnityEngine;
namespace HarryPotterUnity.Cards.Generic
{
public abstract class GenericSpell : GenericCard {
private static readonly Vector3 SpellOffset... | using System.Collections;
using System.Collections.Generic;
using HarryPotterUnity.Tween;
using HarryPotterUnity.Utils;
using JetBrains.Annotations;
using UnityEngine;
namespace HarryPotterUnity.Cards.Generic
{
public abstract class GenericSpell : GenericCard {
private static readonly Vector3 SpellOffset... |
Add message id to storage convert process | using Microsoft.Azure.ServiceBus;
using System;
using System.Collections.Generic;
using QueueMessage = Storage.Net.Messaging.QueueMessage;
namespace Storage.Net.Microsoft.Azure.ServiceBus
{
static class Converter
{
public static Message ToMessage(QueueMessage message)
{
if(message == null)
... | using Microsoft.Azure.ServiceBus;
using System;
using System.Collections.Generic;
using QueueMessage = Storage.Net.Messaging.QueueMessage;
namespace Storage.Net.Microsoft.Azure.ServiceBus
{
static class Converter
{
public static Message ToMessage(QueueMessage message)
{
if(message == null)
... |
Switch to StringBuilder for speed. | using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using ClientSamples.CachingTools;
namespace Tavis.PrivateCache
{
public class CacheEntry
{
public PrimaryCacheKey Key { get; private set; }
public HttpHeaderValueCollection<string> VaryHeaders { get; private... | using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using ClientSamples.CachingTools;
namespace Tavis.PrivateCache
{
public class CacheEntry
{
public PrimaryCacheKey Key { get; private set; }
public HttpHeaderValueCollection<string> VaryHead... |
Fix some xml parsing issues | using NBi.Core.Evaluate;
using NBi.Core.ResultSet;
using NBi.Core.Transformation;
using NBi.Xml.Variables;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace NBi.Xml.Items.Calculatio... | using NBi.Core.Evaluate;
using NBi.Core.ResultSet;
using NBi.Core.Transformation;
using NBi.Xml.Variables;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace NBi.Xml.Items.Calculatio... |
Update new test to use UsePerRequestServices | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;
namespace TagHelpersWebSite
{
public class Startup... | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNet.Builder;
using Microsoft.Framework.DependencyInjection;
namespace TagHelpersWebSite
{
public class Startup... |
Reduce information displayed in about box | using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace VigilantCupcake.SubForms {
partial class AboutBox : Form {
public AboutBox() {
InitializeComponent();
Text = $"About {AssemblyTitle}";
labelProductName.Text = AssemblyTitle;
... | using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace VigilantCupcake.SubForms {
partial class AboutBox : Form {
public AboutBox() {
InitializeComponent();
Text = $"About {AssemblyTitle}";
labelProductName.Text = AssemblyTitle;
... |
Fix wrong attribute for about box | using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace VigilantCupcake.SubForms {
partial class AboutBox : Form {
public AboutBox() {
InitializeComponent();
Text = $"About {AssemblyTitle}";
labelProductName.Text = AssemblyTitle;
... | using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace VigilantCupcake.SubForms {
partial class AboutBox : Form {
public AboutBox() {
InitializeComponent();
Text = $"About {AssemblyTitle}";
labelProductName.Text = AssemblyTitle;
... |
Add license info in assembly. | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Di... | 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... |
Use the correct Accept type for json requests | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using Newtonsoft.Json;
namespace osu.Framework.IO.Network
{
/// <summary>
/// A web request with a specific JSON response forma... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Net;
using Newtonsoft.Json;
namespace osu.Framework.IO.Network
{
/// <summary>
/// A web request with a specific ... |
Add TLS change to make the call to the Audit api work | using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(SFA.DAS.EmployerUsers.Api.Startup))]
namespace SFA.DAS.EmployerUsers.Api
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
} | using System.Net;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(SFA.DAS.EmployerUsers.Api.Startup))]
namespace SFA.DAS.EmployerUsers.Api
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ServicePointManager.SecurityProtocol |= Security... |
Revert "keep username only in sinin cookie" | using Microsoft.AspNetCore.Http;
using Obsidian.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Authentication;
using Obsidian.Application.OAuth20;
namespace Obsidian.Services
{
public class Sign... | using Microsoft.AspNetCore.Http;
using Obsidian.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Authentication;
using Obsidian.Application.OAuth20;
namespace Obsidian.Services
{
public class Sign... |
Improve naming of tests to clearly indicate the feature to be tested | #region Copyright and license
// // <copyright file="AlwaysTests.cs" company="Oliver Zick">
// // Copyright (c) 2016 Oliver Zick. All rights reserved.
// // </copyright>
// // <author>Oliver Zick</author>
// // <license>
// // Licensed under the Apache License, Version 2.0 (the "License");
// // you may no... | #region Copyright and license
// // <copyright file="AlwaysTests.cs" company="Oliver Zick">
// // Copyright (c) 2016 Oliver Zick. All rights reserved.
// // </copyright>
// // <author>Oliver Zick</author>
// // <license>
// // Licensed under the Apache License, Version 2.0 (the "License");
// // you may no... |
Reduce concurrency (not eliminate) in integration tests so that starting up a test suite run doesn't soak up all the threads in our thread pool. | using NUnit.Framework;
[assembly: Category("IntegrationTest")]
[assembly: Parallelizable(ParallelScope.Fixtures)]
[assembly: LevelOfParallelism(32)] | using NUnit.Framework;
[assembly: Category("IntegrationTest")]
[assembly: Parallelizable(ParallelScope.Fixtures)]
[assembly: LevelOfParallelism(2)] |
Use same url Facebook uses to download bits | void DownloadAudienceNetwork (Artifact artifact)
{
var podSpec = artifact.PodSpecs [0];
var id = podSpec.Name;
var version = podSpec.Version;
var url = $"https://origincache.facebook.com/developers/resources/?id={id}-{version}.zip";
var basePath = $"./externals/{id}";
DownloadFile (url, $"{basePath}.zip", new Cak... | void DownloadAudienceNetwork (Artifact artifact)
{
var podSpec = artifact.PodSpecs [0];
var id = podSpec.Name;
var version = podSpec.Version;
var url = $"https://developers.facebook.com/resources/{id}-{version}.zip";
var basePath = $"./externals/{id}";
DownloadFile (url, $"{basePath}.zip", new Cake.Xamarin.Build.... |
Fix check so file extension is preserved | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NuGet.Packaging;
namespace PackageExplorerViewModel.Utilities
{
public class TemporaryFile : IDisposable
{
public TemporaryFile(Stream stream, string extension)
... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NuGet.Packaging;
namespace PackageExplorerViewModel.Utilities
{
public class TemporaryFile : IDisposable
{
public TemporaryFile(Stream stream, string extension)
... |
Add message to press enter when sample App execution is complete | using System.Threading;
using System.Threading.Tasks;
using Console = System.Console;
namespace ConsoleWritePrettyOneDay.App
{
class Program
{
static void Main(string[] args)
{
Spinner.Wait(() => Thread.Sleep(5000), "waiting for sleep");
var task = Task.Run... | using System.Threading;
using System.Threading.Tasks;
using Console = System.Console;
namespace ConsoleWritePrettyOneDay.App
{
class Program
{
static void Main(string[] args)
{
Spinner.Wait(() => Thread.Sleep(5000), "waiting for sleep");
var task = Task.Run... |
Add config to the dependency flags. | using System;
namespace uSync8.Core.Dependency
{
[Flags]
public enum DependencyFlags
{
None = 0,
IncludeChildren = 2,
IncludeAncestors = 4,
IncludeDependencies = 8,
IncludeViews = 16,
IncludeMedia = 32,
IncludeLinked = 64,
IncludeMediaFiles =... | using System;
namespace uSync8.Core.Dependency
{
[Flags]
public enum DependencyFlags
{
None = 0,
IncludeChildren = 2,
IncludeAncestors = 4,
IncludeDependencies = 8,
IncludeViews = 16,
IncludeMedia = 32,
IncludeLinked = 64,
IncludeMediaFiles =... |
Handle paths on Windows properly | using System;
namespace Mammoth.Couscous.java.net {
internal class URI {
private readonly Uri _uri;
internal URI(string uri) {
try {
_uri = new Uri(uri, UriKind.RelativeOrAbsolute);
} catch (UriFormatException exception) {
throw new U... | using System;
namespace Mammoth.Couscous.java.net {
internal class URI {
private readonly Uri _uri;
internal URI(string uri) {
try {
_uri = new Uri(uri, UriKind.RelativeOrAbsolute);
} catch (UriFormatException exception) {
throw new U... |
Debug mode: Show the number of garbage collections | // Copyright (c) the authors of nanoGames. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt in the project root.
using NanoGames.Engine;
using System.Collections.Generic;
using System.Diagnostics;
namespace NanoGames.Application
{
/// <summary>
/// A view that measures and draws the cu... | // Copyright (c) the authors of nanoGames. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt in the project root.
using NanoGames.Engine;
using System.Collections.Generic;
using System.Diagnostics;
namespace NanoGames.Application
{
/// <summary>
/// A view that measures and draws the cu... |
Fix rounding error in numbers exercise | public static class AssemblyLine
{
private const int ProductionRatePerHourForDefaultSpeed = 221;
public static double ProductionRatePerHour(int speed) =>
ProductionRatePerHourForSpeed(speed) * SuccessRate(speed);
private static int ProductionRatePerHourForSpeed(int speed) =>
ProductionRate... | public static class AssemblyLine
{
private const int ProductionRatePerHourForDefaultSpeed = 221;
public static double ProductionRatePerHour(int speed) =>
ProductionRatePerHourForSpeed(speed) * SuccessRate(speed);
private static int ProductionRatePerHourForSpeed(int speed) =>
ProductionRate... |
Fix explosion reading out time values from wrong clock | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Skinning.Default;
using osu.Game.Rulesets.Objects.Pooling;
using osu.Game.Skin... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Skinning.Default;
using osu.Game.Rulesets.Objects.Pooling;
using osu.Game.Skin... |
Switch Guid implementation temporarily to avoid compile time error | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Input.Bindings;
using osu.Game.Database;
using Realms;
namespace osu.Game.Input.Bindings
{
[MapTo(nameof(KeyBinding))]
public c... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Input.Bindings;
using osu.Game.Database;
using Realms;
namespace osu.Game.Input.Bindings
{
[MapTo(nameof(KeyBinding))]
public c... |
Fix ordering bug when chaining Tweens | using UnityEngine;
using System.Collections;
using System;
public class AnimateToPoint : MonoBehaviour {
private SimpleTween tween;
private Vector3 sourcePos;
private Vector3 targetPos;
private Action onComplete;
private float timeScale;
private float timer;
public void Trigger(SimpleTween tween, Vector3 poin... | using UnityEngine;
using System.Collections;
using System;
public class AnimateToPoint : MonoBehaviour {
private SimpleTween tween;
private Vector3 sourcePos;
private Vector3 targetPos;
private Action onComplete;
private float timeScale;
private float timer;
public void Trigger(SimpleTween tween, Vector3 poin... |
Change message to indicate player is freed from track | using UnityEngine;
using System.Collections;
public class AdminModeMessageWindow : MonoBehaviour {
private const float WINDOW_WIDTH = 300;
private const float WINDOW_HEIGHT = 120;
private const float MESSAGE_HEIGHT = 60;
private const float BUTTON_HEIGHT = 30;
private const float BUTTON_WIDTH = 40;... | using UnityEngine;
using System.Collections;
public class AdminModeMessageWindow : MonoBehaviour {
private const float WINDOW_WIDTH = 300;
private const float WINDOW_HEIGHT = 120;
private const float MESSAGE_HEIGHT = 60;
private const float BUTTON_HEIGHT = 30;
private const float BUTTON_WIDTH = 40;... |
Handle optional version and fallback | using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Okanshi.Dashboard.Models;
namespace Okanshi.Dashboard
{
public interface IGetMetrics
{
IEnumerable<Metric> Deserialize(string response);
}
public class GetMetrics : IGetMetrics
{
public IEnumerable<Metric> Deserialize(string r... | using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Okanshi.Dashboard.Models;
namespace Okanshi.Dashboard
{
public interface IGetMetrics
{
IEnumerable<Metric> Deserialize(string response);
}
public class GetMetrics : IGetMetrics
{
publi... |
Fix the query string stuff | // ==========================================================================
// SingleUrlsMiddleware.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==================================================... | // ==========================================================================
// SingleUrlsMiddleware.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==================================================... |
Fix Fault; Incorrect check in ctor | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SceneJect.Common
{
public abstract class DepedencyInjectionFactoryService
{
/// <summary>
/// Service for resolving dependencies.
/// </summary>
protected IResolver resolverService { get; }
/// <summary>
///... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SceneJect.Common
{
public abstract class DepedencyInjectionFactoryService
{
/// <summary>
/// Service for resolving dependencies.
/// </summary>
protected IResolver resolverService { get; }
/// <summary>
///... |
Fix logic to use the new task based async pattern | using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace WootzJs.Mvc
{
public class ControllerActionInvoker : IActionInvoker
{
public Task<ActionResult> InvokeAction(ControllerContext context, MethodInfo action)
{
var parameters = action.Get... | using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace WootzJs.Mvc
{
public class ControllerActionInvoker : IActionInvoker
{
public Task<ActionResult> InvokeAction(ControllerContext context, MethodInfo action)
{
var parameters = action.Get... |
Fix registration to send nightly | using FluentScheduler;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Logging;
using System;
namespace BatteryCommander.Web.Jobs
{
internal static class JobHandler
{
public static void WithScheduler(this IApplicationBuilder app, ILoggerFactory loggerFactory)
{
var l... | using FluentScheduler;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Logging;
using System;
namespace BatteryCommander.Web.Jobs
{
internal static class JobHandler
{
public static void WithScheduler(this IApplicationBuilder app, ILoggerFactory loggerFactory)
{
var l... |
Fix code coverage - exclude remote-only class | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... |
Revert "added try catch, test commit" | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Core.CrossDomainImagesWeb
{
public partial class Default : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Core.CrossDomainImagesWeb
{
public partial class Default : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
... |
Apply hang mitigating timeout in VerifyOpen and VerifyClosed | // 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.Threading;
namespace Microsoft.VisualStudio.IntegrationTest.Utilities.OutOfProcess
{
public class Dialog_OutOfProc : OutOfPro... | // 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.Threading;
namespace Microsoft.VisualStudio.IntegrationTest.Utilities.OutOfProcess
{
public class Dialog_OutOfProc : OutOfPro... |
Update history list to also sort by gameplay order | // 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.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Rooms;
using osuTK;
nam... | // 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.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Rooms;
using osuTK;
nam... |
Comment out batchSize for now as not used | using System;
using System.Data;
using NHibernate.Engine;
namespace NHibernate.Impl
{
/// <summary>
/// Summary description for BatchingBatcher.
/// </summary>
internal class BatchingBatcher : BatcherImpl
{
private int batchSize;
private int[] expectedRowCounts;
/// <summary>
///
/// </summary>
/// ... | using System;
using System.Data;
using NHibernate.Engine;
namespace NHibernate.Impl
{
/// <summary>
/// Summary description for BatchingBatcher.
/// </summary>
internal class BatchingBatcher : BatcherImpl
{
//private int batchSize;
private int[] expectedRowCounts;
/// <summary>
///
/// </summary>
//... |
Fix the sample to await when writing directly to the output stream in a controller. | using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
using MvcSample.Web.Models;
namespace MvcSample.Web.RandomNameSpace
{
public class Home2Controller
{
private User _user = new User() { Name = "User Name", Address = "Home Address" };
[Activate]
public HttpResponse Response
... | using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
using MvcSample.Web.Models;
namespace MvcSample.Web.RandomNameSpace
{
public class Home2Controller
{
private User _user = new User() { Name = "User Name", Address = "Home Address" };
[Activate]
publi... |
Validate existence of x-pack-core for 6.2.4+ | using System;
using System.Linq;
using Nest;
using Tests.Framework.ManagedElasticsearch.Nodes;
using Tests.Framework.ManagedElasticsearch.Plugins;
namespace Tests.Framework.ManagedElasticsearch.Tasks.ValidationTasks
{
public class ValidatePluginsTask : NodeValidationTaskBase
{
public override void Validate(IElasti... | using System;
using System.Linq;
using Nest;
using Tests.Document.Multiple.UpdateByQuery;
using Tests.Framework.ManagedElasticsearch.Nodes;
using Tests.Framework.ManagedElasticsearch.Plugins;
namespace Tests.Framework.ManagedElasticsearch.Tasks.ValidationTasks
{
public class ValidatePluginsTask : NodeValidationTaskBa... |
Rewrite with expression bodies properties syntax. | using System.Reflection;
using P2E.Interfaces.DataObjects;
namespace P2E.DataObjects
{
public class ApplicationInformation : IApplicationInformation
{
public string Name { get; }
public string Version { get; }
public ApplicationInformation()
{
Name = Assembly.GetEn... | using System.Reflection;
using P2E.Interfaces.DataObjects;
namespace P2E.DataObjects
{
public class ApplicationInformation : IApplicationInformation
{
public string Name => Assembly.GetEntryAssembly().GetName().Name;
public string Version => Assembly.GetEntryAssembly().GetName().Version.ToStri... |
Use correct URL for help | using System;
using System.Collections.Generic;
using System.Text;
namespace BitDiffer.Common.Misc
{
public class Constants
{
public const string ProductName = "BitDiffer";
public const string ProductSubTitle = "Assembly Comparison Tool";
public const string HelpUrl = "https://github.com/grennis/bitdiffe... | using System;
using System.Collections.Generic;
using System.Text;
namespace BitDiffer.Common.Misc
{
public class Constants
{
public const string ProductName = "BitDiffer";
public const string ProductSubTitle = "Assembly Comparison Tool";
public const string HelpUrl = "https://github.com/bitdiffer/bitdi... |
Bump assembly info for 1.3.0 release | 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("Su... | 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("Su... |
Add checks in product rating service | using ZobShop.Data.Contracts;
using ZobShop.Factories;
using ZobShop.Models;
using ZobShop.Services.Contracts;
namespace ZobShop.Services
{
public class ProductRatingService : IProductRatingService
{
private readonly IRepository<User> userRepository;
private readonly IRepository<ProductRating>... | using System;
using ZobShop.Data.Contracts;
using ZobShop.Factories;
using ZobShop.Models;
using ZobShop.Services.Contracts;
namespace ZobShop.Services
{
public class ProductRatingService : IProductRatingService
{
private readonly IRepository<User> userRepository;
private readonly IRepository<... |
Improve translation when removing strings from names! |
namespace LINQToTreeHelpers
{
public static class Utils
{
/// <summary>
/// Write out an object. Eventually, with ROOTNET improvements this will work better and perahps
/// won't be needed!
/// </summary>
/// <param name="obj"></param>
/// <param name=... |
namespace LINQToTreeHelpers
{
public static class Utils
{
/// <summary>
/// Write out an object. Eventually, with ROOTNET improvements this will work better and perahps
/// won't be needed!
/// </summary>
/// <param name="obj"></param>
/// <param name=... |
Make sure NONEXISTENT_CELLS is serialized into nonexistentCells | // #[license]
// SmartsheetClient SDK for C#
// %%
// Copyright (C) 2014 SmartsheetClient
// %%
// 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
//
// ... | // #[license]
// SmartsheetClient SDK for C#
// %%
// Copyright (C) 2014 SmartsheetClient
// %%
// 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
//
// ... |
Revert "remove unused private setters" | using System;
namespace FilterLists.Agent.Entities
{
public class ListInfo
{
public int Id { get; }
public Uri ViewUrl { get; }
}
} | using System;
namespace FilterLists.Agent.Entities
{
public class ListInfo
{
public int Id { get; private set; }
public Uri ViewUrl { get; private set; }
}
} |
Destroy bullets on trigger event | using UnityEngine;
using System.Collections;
public class Bullet : MonoBehaviour {
public int bulletSpeed = 715;
void Start () {
GetComponent<Rigidbody>().AddRelativeForce(Vector3.forward * bulletSpeed);
}
}
| using UnityEngine;
using System.Collections;
public class Bullet : MonoBehaviour {
public int bulletSpeed = 715;
void Start() {
GetComponent<Rigidbody>().AddRelativeForce(Vector3.forward * bulletSpeed);
}
void OnTriggerEnter(Collider other) {
Destroy(gameObject);
}
}
|
Apply force unbold to dropdown options | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DropdownLanguageFontUpdater : MonoBehaviour
{
[SerializeField]
private Text textComponent;
void Start ()
{
Font overrideFont = LocalizationManager.instance.getAllLanguages()[transfor... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DropdownLanguageFontUpdater : MonoBehaviour
{
[SerializeField]
private Text textComponent;
void Start ()
{
var language = LocalizationManager.instance.getAllLanguages()[transform.Get... |
Load the precompilation type from the loaded assembly | // 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;
using System.IO;
using System.Reflection;
using System.Runtime.Loader;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
namespace Micros... | // 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;
using System.IO;
using System.Reflection;
using System.Runtime.Loader;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
namespace Micros... |
Remove empty method checked in by mistake | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Elasticsearch.Net;
using FluentAssertions;
using Nest;
using Nest.Tests.MockData.Domain;
using NUnit.Framework;
namespace Nest.Tests.Unit.ObjectInitializer.Index
{
[TestFixture]
public class IndexReq... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Elasticsearch.Net;
using FluentAssertions;
using Nest;
using Nest.Tests.MockData.Domain;
using NUnit.Framework;
namespace Nest.Tests.Unit.ObjectInitializer.Index
{
[TestFixture]
public class IndexReq... |
Fix wrong mapping for Translation, should be mapped as a property instead of Component | // Copyright 2017 by PeopleWare n.v..
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | // Copyright 2017 by PeopleWare n.v..
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
Fix check not accounting for mods not existing in certain rulesets | // 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 System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Rulesets.Mods;
namespace osu.Ga... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Tests.Visual.Ga... |
Enable debug by default in scenario tests | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apa... | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apa... |
Fix category of revision log RSS feeds. | <?xml version="1.0"?>
<!-- RSS generated by Trac v<?cs var:trac.version ?> on <?cs var:trac.time ?> -->
<rss version="2.0">
<channel><?cs
if:project.name_encoded ?>
<title><?cs var:project.name_encoded ?>: Revisions of <?cs var:log.path ?></title><?cs
else ?>
<title>Revisions of <?cs var:log.path ?></title... | <?xml version="1.0"?>
<!-- RSS generated by Trac v<?cs var:trac.version ?> on <?cs var:trac.time ?> -->
<rss version="2.0">
<channel><?cs
if:project.name_encoded ?>
<title><?cs var:project.name_encoded ?>: Revisions of <?cs var:log.path ?></title><?cs
else ?>
<title>Revisions of <?cs var:log.path ?></title... |
Update spelling mistake in api types | using System.ComponentModel;
namespace SFA.DAS.EAS.Account.Api.Types
{
public enum EmployerAgreementStatus
{
[Description("Not signed")]
Pending = 1,
[Description("Signed")]
Signed = 2,
[Description("Expired")]
Expired = 3,
[Description("Super... | using System.ComponentModel;
namespace SFA.DAS.EAS.Account.Api.Types
{
public enum EmployerAgreementStatus
{
[Description("Not signed")]
Pending = 1,
[Description("Signed")]
Signed = 2,
[Description("Expired")]
Expired = 3,
[Description("Super... |
Add a list focus call | using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
namespace Countdown.Views
{
internal class ScrollTo
{
public static void SetItem(UIElement element, object value)
{
element.SetValue(ItemProperty, value);
}
public st... | using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
namespace Countdown.Views
{
internal class ScrollTo
{
public static void SetItem(UIElement element, object value)
{
element.SetValue(ItemProperty, value);
}
public st... |
Make sure to take into account completed when looking at ALL | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace BatteryCommander.Web.Models
{
public class EvaluationListViewModel
{
public IEnumerable<Evaluation> Evaluations { get; set; } = Enumerable.Empty<Evaluation>();
[Display(Na... | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace BatteryCommander.Web.Models
{
public class EvaluationListViewModel
{
public IEnumerable<Evaluation> Evaluations { get; set; } = Enumerable.Empty<Evaluation>();
[Display(Na... |
Fix bug in the Sql Server implementation | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Luval.Common;
namespace Luval.Orm
{
public class SqlServerLanguageProvider : AnsiSqlLanguageProvider
{
public SqlServerLanguageProvider() : this(DbConfiguration.Get<ISqlExpressionP... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Luval.Common;
namespace Luval.Orm
{
public class SqlServerLanguageProvider : AnsiSqlLanguageProvider
{
public SqlServerLanguageProvider() : this(DbConfiguration.Get<ISqlExpressionP... |
Use list-group instead of a table. | @model IEnumerable<Discord.WebSocket.SocketGuild>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayName("GuildId")
</th>
<th>
@Html.DisplayName("GuildName")
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach(var guild in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => gui... | @model IEnumerable<Discord.WebSocket.SocketGuild>
<div class="list-group">
@foreach(var guild in Model) {
<a class="list-group-item list-group-item-action" asp-area="Guild" asp-controller="Stats" asp-action="Index" asp-route-guildId="@guild.Id">@guild.Name</a>
}
</div> |
Throw HttpException when trying to resolve unknown controller | using System;
using System.Web.Mvc;
using System.Web.Routing;
using Castle.MicroKernel;
namespace SnittListan.IoC
{
public class WindsorControllerFactory : DefaultControllerFactory
{
private readonly IKernel kernel;
public WindsorControllerFactory(IKernel kernel)
{
this.kernel = kernel;
}
... | using System;
using System.Web.Mvc;
using System.Web.Routing;
using Castle.MicroKernel;
using System.Web;
namespace SnittListan.IoC
{
public class WindsorControllerFactory : DefaultControllerFactory
{
private readonly IKernel kernel;
public WindsorControllerFactory(IKernel kernel)
{
this.ker... |
Use collection of certificates to parse pkcs7 | using System.Security.Cryptography.X509Certificates;
using PeNet.Structures;
namespace PeNet.Parser
{
internal class PKCS7Parser : SafeParser<X509Certificate2>
{
private readonly WIN_CERTIFICATE _winCertificate;
internal PKCS7Parser(WIN_CERTIFICATE winCertificate)
: base(null, 0)
... | using System.Security.Cryptography.X509Certificates;
using PeNet.Structures;
namespace PeNet.Parser
{
internal class PKCS7Parser : SafeParser<X509Certificate2>
{
private readonly WIN_CERTIFICATE _winCertificate;
internal PKCS7Parser(WIN_CERTIFICATE winCertificate)
: base(null, 0)
... |
Change return type of script engine | using System;
using Microsoft.CodeAnalysis.Scripting;
using Microsoft.CodeAnalysis.CSharp.Scripting;
namespace ScriptSharp.ScriptEngine
{
public class CSharpScriptEngine
{
private static ScriptState<object> scriptState = null;
public static object Execute(string code)
{
... | using System;
using Microsoft.CodeAnalysis.Scripting;
using Microsoft.CodeAnalysis.CSharp.Scripting;
namespace ScriptSharp.ScriptEngine
{
public class CSharpScriptEngine
{
private static ScriptState<object> scriptState = null;
public static object Execute(string code)
{
... |
Implement getting data for office details | using Starcounter;
using System;
namespace RealEstateAgencyFranchise.Controllers
{
internal class OfficeController
{
public Json Get(long officeObjectNo)
{
throw new NotImplementedException();
}
}
}
| using RealEstateAgencyFranchise.Database;
using Starcounter;
using System.Linq;
namespace RealEstateAgencyFranchise.Controllers
{
internal class OfficeController
{
public Json Get(ulong officeObjectNo)
{
return Db.Scope(() =>
{
var offices = Db.SQL<Offic... |
Change time utils visibility from internal to public | using System;
namespace Criteo.Profiling.Tracing.Utils
{
internal static class TimeUtils
{
private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public static DateTime UtcNow
{
get
{
return HighResolution... | using System;
namespace Criteo.Profiling.Tracing.Utils
{
public static class TimeUtils
{
private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public static DateTime UtcNow
{
get
{
return HighResolutionDa... |
Fix bug with DFS when some vertices painted in gray twice | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpGraphEditor.Graph.Core.Elements;
namespace SharpGraphEditor.Graph.Core.Algorithms
{
public class DepthFirstSearchAlgorithm : IAlgorithm
{
public string Name => "Depth first search";
public string... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpGraphEditor.Graph.Core.Elements;
namespace SharpGraphEditor.Graph.Core.Algorithms
{
public class DepthFirstSearchAlgorithm : IAlgorithm
{
public string Name => "Depth first search";
public string... |
Build script now writes the package name and version into the AssemblyDescription attibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major. | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Extras.AggregateService")]
[assembly: AssemblyDescription("Autofac Aggregate Service Module")]
[assembly: ComVisible(false)] | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Autofac.Extras.AggregateService")]
[assembly: ComVisible(false)] |
Change httpclientwrapper to return the content as string async. | using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NLog;
using SFA.DAS.EmployerApprenticeshipsService.Domain.Configuration;
using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces;
namespace SFA.DAS.EmployerApprenticeshipsService.Infrastructure.Ser... | using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NLog;
using SFA.DAS.EmployerApprenticeshipsService.Domain.Configuration;
using SFA.DAS.EmployerApprenticeshipsService.Domain.Interfaces;
namespace SFA.DAS.EmployerApprenticeshipsService.Infrastructure.Ser... |
Fix bug with double serialization | using System;
using RestSharp;
using Newtonsoft.Json;
using RestSharp.Portable;
using RestSharp.Portable.Authenticators;
using RestSharp.Portable.HttpClient;
namespace AsterNET.ARI.Middleware.Default
{
public class Command : IRestCommand
{
internal RestClient Client;
internal RestRequest Reques... | using System;
using RestSharp.Portable;
using RestSharp.Portable.Authenticators;
using RestSharp.Portable.HttpClient;
namespace AsterNET.ARI.Middleware.Default
{
public class Command : IRestCommand
{
internal RestClient Client;
internal RestRequest Request;
public Command(StasisEndpoin... |
Remove unnecessary usings in example script | using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Random = UnityEngine.Random;
using Object = UnityEngine.Object;
[CreateAssetMenu(fileName = "Example.asset", menuName = "New Example ScriptableObject")]
public class ScriptableObjectExample : Scriptab... | using UnityEngine;
[CreateAssetMenu(fileName = "Example.asset", menuName = "New Example ScriptableObject")]
public class ScriptableObjectExample : ScriptableObject
{
[EasyButtons.Button]
public void SayHello()
{
Debug.Log("Hello");
}
}
|
Rearrange test to better self-document what currently works and what does not. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using ExpressionToCodeLib;
using Xunit;
namespace ExpressionToCodeTest {
public class ValueTupleTests {
[Fact]
public void ExpressionCompil... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using ExpressionToCodeLib;
using Xunit;
namespace ExpressionToCodeTest {
public class ValueTupleTests {
[Fact]
public void ExpressionWithVa... |
Make spinners easier for now | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Database;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Rulesets.Osu.Objects
{
public cl... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Database;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Rulesets.Osu.Objects
{
public cl... |
Clean up mac completion broker. | // 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;
using Microsoft.VisualStudio.Editor.Razor;
using Microsoft.VisualStudio.Text.Editor;
using MonoDevelop.Ide.CodeCompletion;
namespace Mic... | // 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;
using Microsoft.VisualStudio.Editor.Razor;
using Microsoft.VisualStudio.Text.Editor;
using MonoDevelop.Ide.CodeCompletion;
namespace Mic... |
Add null handling for editorinterface settings | using Contentful.Core.Configuration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace Contentful.Core.Models.Management
{
[JsonConverter(typeof(EditorInterfaceControlJsonConverter))]
public class EditorInterfaceControl
{
public string FieldId { ge... | using Contentful.Core.Configuration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace Contentful.Core.Models.Management
{
[JsonConverter(typeof(EditorInterfaceControlJsonConverter))]
public class EditorInterfaceControl
{
public string FieldId { ge... |
Update mscorlib assembly name to match eventual module name | // AssemblyInfo.cs
// Script#/Libraries/CoreLib
// This source code is subject to terms and conditions of the Apache License, Version 2.0.
//
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("mscorlib")]
[assembly: AssemblyDescription("Script# Core Assembly")]
[a... | // AssemblyInfo.cs
// Script#/Libraries/CoreLib
// This source code is subject to terms and conditions of the Apache License, Version 2.0.
//
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("mscorlib")]
[assembly: AssemblyDescription("Script# Core Assembly")]
[a... |
Remove binding redirects for missing assemblies | // 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 Microsoft.VisualStudio.Shell;
// Add binding redirects for each assembly we ship in VS. This is required so that these assemblies show
// up in ... | // 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 Microsoft.VisualStudio.Shell;
// Add binding redirects for each assembly we ship in VS. This is required so that these assemblies show
// up in ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.