Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Use new "RuntimeDependencies" UBT feature to get our DLLs in place. | using UnrealBuildTool;
using System.IO;
public class OSVRClientKit : ModuleRules
{
private string ModulePath
{
get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name)); }
}
public OSVRClientKit(TargetInfo Target)
{
Type = ModuleType.Ext... | using UnrealBuildTool;
using System.IO;
public class OSVRClientKit : ModuleRules
{
private string ModulePath
{
get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name)); }
}
public OSVRClientKit(TargetInfo Target)
{
Type = ModuleType.Ext... |
Add Initial User API tests | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace Nether.Web.IntegrationTests.Identity
{
public class UserApiTests : WebTestBase
{
private HttpClient _client;
//[Fact]
//publ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace Nether.Web.IntegrationTests.Identity
{
public class UserApiTests : WebTestBase
{
private HttpClient _client;
[Fact]
public a... |
Set default trivia timeout to match help text. | using CommandLine;
using NadekoBot.Core.Common;
namespace NadekoBot.Core.Modules.Games.Common.Trivia
{
public class TriviaOptions : INadekoCommandOptions
{
[Option('p', "pokemon", Required = false, Default = false, HelpText = "Whether it's 'Who's that pokemon?' trivia.")]
public bool IsPokemon... | using CommandLine;
using NadekoBot.Core.Common;
namespace NadekoBot.Core.Modules.Games.Common.Trivia
{
public class TriviaOptions : INadekoCommandOptions
{
[Option('p', "pokemon", Required = false, Default = false, HelpText = "Whether it's 'Who's that pokemon?' trivia.")]
public bool IsPokemon... |
Add support for `confirmation_method` on `PaymentIntent` | namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
public class PaymentIntentCreateOptions : PaymentIntentSharedOptions
{
[JsonProperty("capture_method")]
public string CaptureMethod { get; set; }
[JsonProperty("confirm")]
public bool? Confirm {... | namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
public class PaymentIntentCreateOptions : PaymentIntentSharedOptions
{
[JsonProperty("capture_method")]
public string CaptureMethod { get; set; }
[JsonProperty("confirm")]
public bool? Confirm {... |
Fix bug when pre-registered activator is instance | using System;
using System.Linq;
namespace Orleankka.Cluster
{
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
static class ServiceCollectionExtensions
{
public static void Decorate<T>(this IServiceCollection services, Func<T, T> deco... | using System;
using System.Linq;
namespace Orleankka.Cluster
{
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
static class ServiceCollectionExtensions
{
public static void Decorate<T>(this IServiceCollection services, Func<T, T> deco... |
Expand mania to fit vertical screen bounds | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Game.Rulesets.UI;
using osuTK;
namespace osu.Game.Rulesets.Mania.UI
{
public class ManiaPlayfieldAdjustmentContainer : Playfi... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Mania.UI
{
public class ManiaPlayfieldAdjustmentContainer : PlayfieldAdjustment... |
Read data from underlying stream in chunks if it does not return everything to us in one go. | using System;
using System.Threading;
using System.Threading.Tasks;
using WebSocket.Portable.Interfaces;
namespace WebSocket.Portable.Internal
{
internal static class DataLayerExtensions
{
public static Task<byte[]> ReadAsync(this IDataLayer layer, int length, CancellationToken cancellationToken)
... | using System.Threading;
using System.Threading.Tasks;
using WebSocket.Portable.Interfaces;
namespace WebSocket.Portable.Internal
{
internal static class DataLayerExtensions
{
public static Task<byte[]> ReadAsync(this IDataLayer layer, int length, CancellationToken cancellationToken)
{
... |
Add exec method to js regexp | #region License
//-----------------------------------------------------------------------
// <copyright>
// The MIT License (MIT)
//
// Copyright (c) 2014 Kirk S Woll
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Softwar... | #region License
//-----------------------------------------------------------------------
// <copyright>
// The MIT License (MIT)
//
// Copyright (c) 2014 Kirk S Woll
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Softwar... |
Fix IsMoyaTestRunner to check for correct interface to implement. | namespace Moya.Utility
{
using System;
using Exceptions;
using Extensions;
using Runners;
public class Guard
{
public static void IsMoyaAttribute(Type type)
{
if (!Reflection.TypeIsMoyaAttribute(type))
{
throw new MoyaException("{0} is no... | namespace Moya.Utility
{
using System;
using Exceptions;
using Extensions;
using Runners;
public class Guard
{
public static void IsMoyaAttribute(Type type)
{
if (!Reflection.TypeIsMoyaAttribute(type))
{
throw new MoyaException("{0} is no... |
Fix scraper to scrape pick a brick facets correctly | using LegoSharp;
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace Scraper
{
class Scraper
{
static async Task Main(string[] args)
{
foreach (var entry in await (new FacetScraper<ProductSearchQuery, ProductSearchResult>(new List<ProductSearchQu... | using LegoSharp;
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace Scraper
{
class Scraper
{
static async Task Main(string[] args)
{
foreach (var entry in await (new FacetScraper<ProductSearchQuery, ProductSearchResult>(new List<ProductSearchQu... |
Add background to rankings header | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Bindables;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets;
using osu.Game.Users;
namespace osu.Game.Ov... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Bindables;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets;
using osu.Game.Users;
namespace osu.Game.Ov... |
Fix compile error by commenting out offending code. | using System.Collections.Concurrent;
using LunaClient.Base;
using LunaClient.Base.Interface;
using LunaCommon.Message.Data.Vessel;
using LunaCommon.Message.Interface;
namespace LunaClient.Systems.VesselFlightStateSys
{
public class VesselFlightStateMessageHandler : SubSystem<VesselFlightStateSystem>, IMessageHand... | using System.Collections.Concurrent;
using LunaClient.Base;
using LunaClient.Base.Interface;
using LunaCommon.Message.Data.Vessel;
using LunaCommon.Message.Interface;
namespace LunaClient.Systems.VesselFlightStateSys
{
public class VesselFlightStateMessageHandler : SubSystem<VesselFlightStateSystem>, IMessageHand... |
Delete unused experiment names added in merge. | // 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.Composition;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
namespace Microsoft.CodeAnalysis.Experiments
{
inter... | // 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.Composition;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
namespace Microsoft.CodeAnalysis.Experiments
{
inter... |
Use uint instead of Uint32 for consistency (even though they're exactly the same) | // Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
namespace CefSharp
{
[Flags]
public enum DragOperationsMask : uint
{
None = 0,
Copy = 1,
Link ... | // Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
namespace CefSharp
{
[Flags]
public enum DragOperationsMask : uint
{
None = 0,
Copy = 1,
Link ... |
Add NotNull to Predicate setter. | // 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 System;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.Builder.Extensions
{
/// <summ... | // 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 System;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNe... |
Add Admin user in Seed method | namespace StudentSystem.Data.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
public sealed class Configuration : DbMigrationsConfiguration<ApplicationDbContext>
{
public Configuration()
{
this.AutomaticMigr... | namespace StudentSystem.Data.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using StudentSystem.Models;
public sealed class Configuration : DbM... |
Test for default plex path before checking for registry key. | using System;
using Microsoft.Win32;
namespace PlexServiceCommon {
public static class PlexDirHelper {
/// <summary>
/// Returns the full path and filename of the plex media server executable
/// </summary>
/// <returns></returns>
public static string GetPlexDataDir()
{
var result = string.Empty;
/... | using System;
using System.IO;
using Microsoft.Win32;
namespace PlexServiceCommon {
public static class PlexDirHelper {
/// <summary>
/// Returns the full path and filename of the plex media server executable
/// </summary>
/// <returns></returns>
public static string GetPlexDataDir()
{
var result = En... |
Add Join extension for strings | using System.Globalization;
namespace GoldenAnvil.Utility
{
public static class StringUtility
{
public static string FormatInvariant(this string format, params object[] args)
{
return string.Format(CultureInfo.InvariantCulture, format, args);
}
}
}
| using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace GoldenAnvil.Utility
{
public static class StringUtility
{
public static string FormatInvariant(this string format, params object[] args)
{
return string.Format(CultureInfo.InvariantCulture, format, args);
}
public... |
Enable UpnEndpointIdentity tests on UWP | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.ServiceModel;
using Infrastructure.Common;
using Xunit;
public static class UpnEndpoin... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.ServiceModel;
using Infrastructure.Common;
using Xunit;
public static class UpnEndpoin... |
Add note about action type | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Input.Bindings
{
/// <summary>
/// A binding of a <see cref="Bindings.KeyCombination"/> to an action.
/// </summary>
public interf... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Framework.Input.Bindings
{
/// <summary>
/// A binding of a <see cref="Bindings.KeyCombination"/> to an action.
/// </summary>
public interf... |
Fix issue with readonly RedirectUri | using Microsoft.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Provider;
namespace Auth0.Owin
{
/// <summary>
/// Context passed when the redirect_uri is generated during the token exchange.
/// </summary>
public class Auth0CustomizeTokenExchangeRedirectUriContext : BaseContext<Au... | using Microsoft.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Provider;
namespace Auth0.Owin
{
/// <summary>
/// Context passed when the redirect_uri is generated during the token exchange.
/// </summary>
public class Auth0CustomizeTokenExchangeRedirectUriContext : BaseContext<Au... |
Add unit tests for PEHeaderBuilder factory methods | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Xunit;
namespace System.Reflection.PortableExecutable.Tests
{
public class PEHeaderBuilderTests
{
... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Xunit;
namespace System.Reflection.PortableExecutable.Tests
{
public class PEHeaderBuilderTests
{
... |
Make components of IRequestContext independently injectable. | using Dolstagis.Web.Auth;
using Dolstagis.Web.Lifecycle;
using Dolstagis.Web.Lifecycle.ResultProcessors;
using Dolstagis.Web.Sessions;
using Dolstagis.Web.Static;
using Dolstagis.Web.Views;
namespace Dolstagis.Web
{
internal class CoreServices : Feature
{
public CoreServices()
{
... | using Dolstagis.Web.Auth;
using Dolstagis.Web.Http;
using Dolstagis.Web.Lifecycle;
using Dolstagis.Web.Lifecycle.ResultProcessors;
using Dolstagis.Web.Sessions;
using Dolstagis.Web.Static;
using Dolstagis.Web.Views;
namespace Dolstagis.Web
{
internal class CoreServices : Feature
{
public C... |
Fix test broken by e771e78 | using System.Linq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Web.UI.JavaScript;
namespace Umbraco.Tests.Web.AngularIntegration
{
[TestFixture]
public class JsInitializationTests
{
[Test]
public void Get_Default_Init()
{
var init = JsInitialization.GetDef... | using System.Linq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Web.UI.JavaScript;
namespace Umbraco.Tests.Web.AngularIntegration
{
[TestFixture]
public class JsInitializationTests
{
[Test]
public void Get_Default_Init()
{
var init = JsInitialization.GetDef... |
Allow mixed path references and url transforms | using System.Web;
using System.Web.Optimization;
using wwwplatform.Models;
using wwwplatform.Models.Support;
namespace wwwplatform
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCol... | using System.Web;
using System.Web.Optimization;
using wwwplatform.Models;
using wwwplatform.Models.Support;
namespace wwwplatform
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCol... |
Add test coverage of animation restarting | // 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... |
Fix for missing correlationId preventing startup of EAS | using System;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using Dapper;
using SFA.DAS.EAS.Domain.Configuration;
using SFA.DAS.EAS.Domain.Data.Repositories;
using SFA.DAS.EAS.Domain.Models.UserProfile;
using SFA.DAS.Sql.Client;
using SFA.DAS.NLog.Logger;
na... | using System;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using Dapper;
using SFA.DAS.EAS.Domain.Configuration;
using SFA.DAS.EAS.Domain.Data.Repositories;
using SFA.DAS.EAS.Domain.Models.UserProfile;
using SFA.DAS.Sql.Client;
using SFA.DAS.NLog.Logger;
na... |
Add received timestamp and basic xmldoc for header class | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
namespace osu.Game.Onli... | // 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 Newtonsoft.Json;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
namespace osu.Game.Onli... |
Use version parser instead of string.split | using System;
using System.Threading.Tasks;
using Windows.ApplicationModel;
using Windows.System;
namespace EarTrumpet.Services
{
public static class WhatsNewDisplayService
{
internal static void ShowIfAppropriate()
{
if (App.HasIdentity())
{
var current... | using System;
using System.Threading.Tasks;
using Windows.ApplicationModel;
using Windows.System;
namespace EarTrumpet.Services
{
public static class WhatsNewDisplayService
{
internal static void ShowIfAppropriate()
{
if (App.HasIdentity())
{
var current... |
Remove CIV.Ccs reference from CIV.Hml | using System;
using System.Collections.Generic;
using System.Linq;
using CIV.Ccs;
using CIV.Common;
namespace CIV.Hml
{
class BoxFormula : HmlLabelFormula
{
protected override string BuildRepr() => $"[{String.Join(",", Label)}]{Inner}";
protected override bool CheckStrategy(IEnumerable<IProce... | using System;
using System.Collections.Generic;
using System.Linq;
using CIV.Common;
namespace CIV.Hml
{
class BoxFormula : HmlLabelFormula
{
protected override string BuildRepr() => $"[{String.Join(",", Label)}]{Inner}";
protected override bool CheckStrategy(IEnumerable<IProcess> processes)
... |
Use a fix that's closer to the Mongo 2.0 driver's way of doing things | using System;
namespace RightpointLabs.Pourcast.Infrastructure.Persistence.Repositories
{
using System.Collections.Generic;
using System.Linq;
using RightpointLabs.Pourcast.Domain.Models;
using RightpointLabs.Pourcast.Domain.Repositories;
using RightpointLabs.Pourcast.Infrastructure.Persistence.C... | using System;
namespace RightpointLabs.Pourcast.Infrastructure.Persistence.Repositories
{
using System.Collections.Generic;
using System.Linq;
using RightpointLabs.Pourcast.Domain.Models;
using RightpointLabs.Pourcast.Domain.Repositories;
using RightpointLabs.Pourcast.Infrastructure.Persistence.C... |
Add pictures count of category | @model PagedList.IPagedList<AstroPhotoGallery.Models.Category>
@using PagedList.Mvc;
@using System.Linq;
@{
ViewBag.Title = "List";
}
<link href="~/Content/PagedList.css" rel="stylesheet" />
<div class="container">
<h2 class="text-center">Browse by categories</h2>
<br/>
@foreach (var category in Model... | @model PagedList.IPagedList<AstroPhotoGallery.Models.Category>
@using PagedList.Mvc;
@using System.Linq;
@{
ViewBag.Title = "List";
}
<link href="~/Content/PagedList.css" rel="stylesheet" />
<div class="container">
<h2 class="text-center">Browse by categories</h2>
<br/>
@foreach (var category in Model... |
Update test methods for DbContextFactory | using System;
using Aliencube.EntityContextLibrary.Interfaces;
using FluentAssertions;
using NUnit.Framework;
namespace Aliencube.EntityContextLibrary.Tests
{
[TestFixture]
public class DbContextFactoryTest
{
private IDbContextFactory _factory;
[SetUp]
public void Init()
{... | using System;
using Aliencube.EntityContextLibrary.Interfaces;
using FluentAssertions;
using NUnit.Framework;
namespace Aliencube.EntityContextLibrary.Tests
{
/// <summary>
/// This represents the test entity for the <see cref="DbContextFactory{TContext}" /> class.
/// </summary>
[TestFixture]
... |
Check we have a message as well when checking the flashmessage view model | @using SFA.DAS.EmployerApprenticeshipsService.Web
@using SFA.DAS.EmployerApprenticeshipsService.Web.Models
@model dynamic
@{
var viewModel = Model as OrchestratorResponse;
}
@if (viewModel?.FlashMessage != null)
{
<div class="grid-row">
<div class="column-full">
<div class="@viewModel... | @using SFA.DAS.EmployerApprenticeshipsService.Web
@using SFA.DAS.EmployerApprenticeshipsService.Web.Models
@model dynamic
@{
var viewModel = Model as OrchestratorResponse;
}
@if (!string.IsNullOrEmpty(viewModel?.FlashMessage?.Message))
{
<div class="grid-row">
<div class="column-full">
... |
Simplify the Expression<Func<>> specimen building | namespace Ploeh.AutoFixture
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Kernel;
public class LambdaExpressionGenerator : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
... | namespace Ploeh.AutoFixture
{
using System;
using System.Linq;
using System.Linq.Expressions;
using Kernel;
public class LambdaExpressionGenerator : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
var requestType = request as Type... |
Add image for a hovered state in image button | using System;
using System.Drawing;
using MonoHaven.Graphics;
using MonoHaven.Utils;
using OpenTK.Input;
namespace MonoHaven.UI
{
public class ImageButton : Widget
{
private bool isPressed;
public ImageButton(Widget parent)
: base(parent)
{
IsFocusable = true;
}
public event EventHandler Clicked;
... | using System;
using System.Drawing;
using MonoHaven.Graphics;
using MonoHaven.Utils;
using OpenTK.Input;
namespace MonoHaven.UI
{
public class ImageButton : Widget
{
private bool isPressed;
public ImageButton(Widget parent)
: base(parent)
{
IsFocusable = true;
}
public event EventHandler Clicked;
... |
Change source code as Nintendo updates SplatNet (bug fix). | using System.Threading.Tasks;
using Mntone.NintendoNetworkHelper;
using Mntone.SplatoonClient.Internal;
namespace Mntone.SplatoonClient
{
public static class SplatoonContextFactory
{
public static async Task<SplatoonContext> GetContextAsync(string username, string password)
{
var authorizer = new NintendoNet... | using System.Threading.Tasks;
using Mntone.NintendoNetworkHelper;
using Mntone.SplatoonClient.Internal;
namespace Mntone.SplatoonClient
{
public static class SplatoonContextFactory
{
public static async Task<SplatoonContext> GetContextAsync(string username, string password)
{
var authorizer = new NintendoNet... |
Check that it can work with nullables too. | using System;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH1119
{
[TestFixture]
public class Fixture : BugTestCase
{
public override string BugNumber
{
get { return "NH1119"; }
}
[Test]
public void SelectMinFromEmptyTable()
{
using (ISession s = OpenSession())... | using System;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH1119
{
[TestFixture]
public class Fixture : BugTestCase
{
public override string BugNumber
{
get { return "NH1119"; }
}
[Test]
public void SelectMinFromEmptyTable()
{
using (ISession s = OpenSession())... |
Remove [AllowAnonymous] since added by default | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
using BlogTemplate.Models;
using Microsoft.AspNetCore.Mvc;
using System.Xml;
using System.Xml.Linq;
using Microsoft.AspNetCore.Authorization;
namespace BlogTemplate.Pa... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
using BlogTemplate.Models;
using Microsoft.AspNetCore.Mvc;
using System.Xml;
using System.Xml.Linq;
using Microsoft.AspNetCore.Authorization;
namespace BlogTemplate.Pa... |
Fix all violations of SA1127 | namespace Tvl.VisualStudio.InheritanceMargin
{
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Tagging;
using Microsoft.VisualStudio.Utilities;
using I... | namespace Tvl.VisualStudio.InheritanceMargin
{
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Tagging;
using Microsoft.VisualStudio.Utilities;
using I... |
Improve the test in regards to \r\n | using System.Linq;
using System.Text;
using NUnit.Framework;
namespace ValveKeyValue.Test
{
class CommentOnEndOfTheLine
{
[Test]
public void CanHandleCommentOnEndOfTheLine()
{
var text = new StringBuilder();
text.AppendLine(@"""test_kv""");
text.Appe... | using System.Linq;
using System.Text;
using NUnit.Framework;
namespace ValveKeyValue.Test
{
class CommentOnEndOfTheLine
{
[Test]
public void CanHandleCommentOnEndOfTheLine()
{
var text = new StringBuilder();
text.Append(@"""test_kv""" + "\n");
text.A... |
Revert "Fix up for 16.11" | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Composition;
using Microsoft.CodeAnalysis.ExternalAc... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Composition;
using Microsoft.CodeAnalysis.ExternalAc... |
Fix order of route registration. | using System.Net.Http.Formatting;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using WebApiContrib.Formatting.Jsonp;
using WebContribContrib.Formatting.Jsonp.SampleWebHost.App_Start;
namespace WebContr... | using System.Net.Http.Formatting;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using WebApiContrib.Formatting.Jsonp;
using WebContribContrib.Formatting.Jsonp.SampleWebHost.App_Start;
namespace WebContr... |
Tweak in Console VS Project Template. | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="ConsoleAbstraction.cs" company="Naos Project">
// Copyright (c) Naos Project 2019. All rights reserved.
// </copyright>
// -----------------------------------------------------... | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="ConsoleAbstraction.cs" company="Naos Project">
// Copyright (c) Naos Project 2019. All rights reserved.
// </copyright>
// -----------------------------------------------------... |
Sort usings in gotodef exports. | // 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.ComponentModel.Composition;
using Microsoft.VisualStudio.LiveShare.LanguageServices;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.Visual... | // 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.ComponentModel.Composition;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.VisualStudio.LanguageServer.Protocol;
using Micro... |
Include a codebase for System.IO.FileSystem | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.VisualStudio.Shell;
using Roslyn.VisualStudio.Setup;
[assembly: ProvideRoslynBindingRedirection("Microsoft.CodeAnalysis.Scripting.dll")]
[as... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.VisualStudio.Shell;
using Roslyn.VisualStudio.Setup;
[assembly: ProvideRoslynBindingRedirection("Microsoft.CodeAnalysis.Scripting.dll")]
[as... |
Check if using SelectedItem pattern first | namespace Winium.Desktop.Driver.CommandExecutors
{
#region using
using System.Windows.Automation;
using Winium.Cruciatus.Exceptions;
using Winium.Cruciatus.Extensions;
using Winium.StoreApps.Common;
#endregion
internal class IsElementSelectedExecutor : CommandExecutorBase
{
... | namespace Winium.Desktop.Driver.CommandExecutors
{
#region using
using System.Windows.Automation;
using Winium.Cruciatus.Exceptions;
using Winium.Cruciatus.Extensions;
using Winium.StoreApps.Common;
#endregion
internal class IsElementSelectedExecutor : CommandExecutorBase
{
... |
Update Metatogger default install path | #r "C:\Program Files (x86)\Luminescence Software\Metatogger 5.8\Metatogger.exe"
using System.Collections.Generic;
using Metatogger.Data;
IEnumerable<AudioFile> files = new List<AudioFile>(); // list of checked audio files in the workspace | #r "C:\Program Files (x86)\Luminescence Software\Metatogger 5.9\Metatogger.exe"
using System.Collections.Generic;
using Metatogger.Data;
IEnumerable<AudioFile> files = new List<AudioFile>(); // list of checked audio files in the workspace |
Fix bug: Searching too fast in dialog returns no results when enter is pressed Work items: 598 | using System;
using System.Linq;
using Microsoft.VisualStudio.ExtensionsExplorer;
namespace NuGet.Dialog.Providers {
internal class PackagesSearchNode : PackagesTreeNodeBase {
private string _searchText;
private readonly PackagesTreeNodeBase _baseNode;
public PackagesTreeNodeB... | using System;
using System.Linq;
using Microsoft.VisualStudio.ExtensionsExplorer;
namespace NuGet.Dialog.Providers {
internal class PackagesSearchNode : PackagesTreeNodeBase {
private string _searchText;
private readonly PackagesTreeNodeBase _baseNode;
public PackagesTreeNodeB... |
Make generic for local and production | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Configuration;
namespace Microsoft.Azure.WebJobs
{
/// <summary>
/// Abstraction ... | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Configuration;
namespace Microsoft.Azure.WebJobs
{
/// <summary>
/// Abstraction ... |
Allow PlatformSpecific on a class | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using Xunit.Sdk;
namespace Xunit
{
/// <summary>
/// Apply this attribute to your test method to specify this is a platform specific test.
/... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using Xunit.Sdk;
namespace Xunit
{
/// <summary>
/// Apply this attribute to your test method to specify this is a platform specific test.
/... |
Apply rendering code, now need to test | using UnityEngine;
using UniRx;
namespace Reduxity.Example.PlayerMovementLook {
[RequireComponent(typeof(Camera))]
public class MoveCamera : MonoBehaviour {
private Camera camera_;
private void Awake() {
camera_ = GetComponent<Camera>();
}
void Start() {
... | using UnityEngine;
using UniRx;
namespace Reduxity.Example.PlayerMovementLook {
[RequireComponent(typeof(Camera))]
public class MoveCamera : MonoBehaviour {
private Camera camera_;
private void Awake() {
camera_ = GetComponent<Camera>();
}
void Start() {
... |
Revert "Added ability to have more than one dynamic placeholder in the same rendering" | using System.Linq;
using Sitecore.Mvc.Helpers;
using Sitecore.Mvc.Presentation;
using System.Collections.Generic;
using System.Web;
namespace DynamicPlaceholders.Mvc.Extensions
{
public static class SitecoreHelperExtensions
{
public static List<string> DynamicPlaceholders = new List<string>();
public static Ht... | using Sitecore.Mvc.Helpers;
using Sitecore.Mvc.Presentation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace DynamicPlaceholders.Mvc.Extensions
{
public static class SitecoreHelperExtensions
{
public static HtmlString ... |
Add test owner to FqdnTag test | // ----------------------------------------------------------------------------------
//
// 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 ordering of views so the ordering is the same as v8 | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.Options;
namespace Umbraco.Cms.Web.Website.ViewEngines
{
/// <summary>
/// Configure view engine locations for front-end rendering
/// </summary>
public class RenderRazorV... | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.Options;
namespace Umbraco.Cms.Web.Website.ViewEngines
{
/// <summary>
/// Configure view engine locations for front-end rendering
/// </summary>
public class RenderRazorV... |
Add material mappings to eth1. | // This script is executed on the server
$MAP_ROOT = "ethernet/maps/eth1/";
$sgLightEditor::lightDBPath = $MAP_ROOT @ "lights/";
$sgLightEditor::filterDBPath = $MAP_ROOT @ "filters/";
sgLoadDataBlocks($sgLightEditor::lightDBPath);
sgLoadDataBlocks($sgLightEditor::filterDBPath);
//exec("./difs/propertymap.cs");
//exe... | // This script is executed on the server
$MAP_ROOT = "ethernet/maps/eth1/";
$sgLightEditor::lightDBPath = $MAP_ROOT @ "lights/";
$sgLightEditor::filterDBPath = $MAP_ROOT @ "filters/";
sgLoadDataBlocks($sgLightEditor::lightDBPath);
sgLoadDataBlocks($sgLightEditor::filterDBPath);
//---------------------------... |
Update device creation to just return the raw token | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using RightpointLabs.ConferenceRoom.Domain.Models;
using RightpointLabs.ConferenceRoom.Domain.Models.Entities;
using RightpointLabs.ConferenceRoom.Domain.Repositories;
using RightpointLabs... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web.Http;
using RightpointLabs.ConferenceRoom.Domain.Models;
using RightpointLabs.ConferenceRoom.Domain.Models.Entities;
using RightpointLabs.ConferenceRoom.Domain.Repositories;
u... |
Create mapping from NotificationOption to EditorConfig severity string. | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.CodeAnalysis.CodeStyle
{
internal static class NotificationOptionExtensions
{
public static string ToEditorConfigString(t... | // 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 Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CodeStyle
{
internal static class NotificationOptionExtensions
{
public static strin... |
Support visual debugging of enum masks. | using System;
using Entitas;
using UnityEditor;
namespace Entitas.Unity.VisualDebugging {
public class EnumTypeDrawer : ITypeDrawer {
public bool HandlesType(Type type) {
return type.IsEnum;
}
public object DrawAndGetNewValue(Type memberType, string memberName, object value, En... | using System;
using Entitas;
using UnityEditor;
namespace Entitas.Unity.VisualDebugging {
public class EnumTypeDrawer : ITypeDrawer {
public bool HandlesType(Type type) {
return type.IsEnum;
}
public object DrawAndGetNewValue(Type memberType, string memberName, object value, En... |
Make sure the departure airport gets filled correctly. | using System;
using System.Collections.Generic;
using System.Linq;
using OpenQA.Selenium;
namespace Diskordia.Columbus.Bots.Host.Services.SingaporeAirlines.PageObjects
{
public class FareDealsSectionComponent
{
private readonly IWebDriver driver;
private readonly IWebElement element;
public FareDealsSectionC... | using System;
using System.Collections.Generic;
using System.Linq;
using OpenQA.Selenium;
namespace Diskordia.Columbus.Bots.Host.Services.SingaporeAirlines.PageObjects
{
public class FareDealsSectionComponent
{
private readonly IWebDriver driver;
private readonly IWebElement element;
public FareDealsSectionC... |
Throw on null syntax or errors. | #region License
/*********************************************************************************
* RootJsonSyntax.cs
*
* Copyright (c) 2004-2019 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... | #region License
/*********************************************************************************
* RootJsonSyntax.cs
*
* Copyright (c) 2004-2019 Henk Nicolai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... |
Tweak to use typed GetCustomAttributes from field | using System;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
namespace CertiPay.Common
{
public static class ExtensionMethods
{
/// <summary>
/// Trims the string of any whitestace and leaves null if there is no content.
/// </summary>
public static Strin... | using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
namespace CertiPay.Common
{
public static class ExtensionMethods
{
/// <summary>
/// Trims the string of any whitestace and leaves null if there is no content.
/// </summary>
... |
Allow .mustache extension as well for Nustache views | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using global::Nustache.Core;
namespace Dolstagis.Web.Views.Nustache
{
public class NustacheViewEngine : ViewEngineBase
{
private static readonly string[] _extensions = new[] {... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using global::Nustache.Core;
namespace Dolstagis.Web.Views.Nustache
{
public class NustacheViewEngine : ViewEngineBase
{
private static readonly string[] _extensions = new[] {... |
Add string based YAML tasks. | // Copyright Matthias Koch 2017.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.IO;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.IO;
using Nuke.Core.Execution;
using Nuke.Core.Tooling;
using YamlDotNet.Serialization;
usin... | // Copyright Matthias Koch 2017.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.IO;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.IO;
using Nuke.Core.Execution;
using Nuke.Core.Tooling;
using YamlDotNet.Serialization;
usin... |
Change ASP.NET tool version to reflect project format. | // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.ProjectJsonMigration
{
internal class ConstantPackageVersions
{
public const string AspNetToolsVersion... | // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.ProjectJsonMigration
{
internal class ConstantPackageVersions
{
public const string AspNetToolsVersion... |
Add unit test for analyzing class without imported namespace. | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TestHelper;
namespace DebuggerStepThroughRemover.Test
{
[TestClass]
public class AnalyzerTests : DiagnosticVerifier
{
[TestMethod]
public void WithEmptySourceF... | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TestHelper;
namespace DebuggerStepThroughRemover.Test
{
[TestClass]
public class AnalyzerTests : DiagnosticVerifier
{
[TestMethod]
public void WithEmptySourceF... |
Remove code to trigger expiry of funds processing until fix has been implemented for the calculation | using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs
{
public class ExpireFundsJob
{
private readonly IMessageSession _messageSession;
... | using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using NServiceBus;
using SFA.DAS.EmployerFinance.Messages.Commands;
namespace SFA.DAS.EmployerFinance.Jobs.ScheduledJobs
{
public class ExpireFundsJob
{
private readonly IMessageSession _messageSession;
... |
Fix peer up port decoding bug | using System;
using System.Net;
using BmpListener.Bgp;
using System.Linq;
using BmpListener.MiscUtil.Conversion;
namespace BmpListener.Bmp
{
public class PeerUpNotification : BmpMessage
{
public IPAddress LocalAddress { get; private set; }
public int LocalPort { get; private set; }
pub... | using System;
using System.Net;
using BmpListener.Bgp;
using System.Linq;
using BmpListener.MiscUtil.Conversion;
namespace BmpListener.Bmp
{
public class PeerUpNotification : BmpMessage
{
public IPAddress LocalAddress { get; private set; }
public int LocalPort { get; private set; }
pub... |
Test coverage for validation of the --report command line option. | namespace Fixie.Tests.Execution
{
using System;
using Fixie.Cli;
using Fixie.Execution;
public class OptionsTests
{
public void DemandsAssemblyPathProvided()
{
var options = new Options(null);
Action validate = options.Validate;
validate.Should... | namespace Fixie.Tests.Execution
{
using System;
using Fixie.Cli;
using Fixie.Execution;
public class OptionsTests
{
public void DemandsAssemblyPathProvided()
{
var options = new Options(null);
Action validate = options.Validate;
validate.Should... |
Use Crockford Base32 by default. | using System.Security.Cryptography;
using DeviceId.Encoders;
using DeviceId.Formatters;
namespace DeviceId
{
/// <summary>
/// Provides access to some of the default formatters.
/// </summary>
public static class DeviceIdFormatters
{
/// <summary>
/// Returns the default formatter ... | using System.Security.Cryptography;
using DeviceId.Encoders;
using DeviceId.Formatters;
namespace DeviceId
{
/// <summary>
/// Provides access to some of the default formatters.
/// </summary>
public static class DeviceIdFormatters
{
/// <summary>
/// Returns the default formatter ... |
Add Needed Vm properties and cmds | using System;
using System.Collections.Generic;
using System.Text;
using GalaSoft.MvvmLight.Views;
using ToxRt.Helpers;
using ToxRt.Model;
using ToxRt.NavigationService;
namespace ToxRt.ViewModel
{
public class LoadProfileViewModel : NavigableViewModelBase
{
#region Fields
#endregion
... | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Views;
using ToxRt.Helpers;
using ToxRt.Model;
using ToxRt.NavigationService;
namespace ToxRt.ViewModel
{
public class LoadProfileViewModel : Navigabl... |
Update to consume framework fixes | // 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.Specialized;
using System.Linq;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Gam... | // 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.Specialized;
using System.Linq;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Gam... |
Make GetAllStubs return a List<string> instead of immediately writing the output to console | using System;
using System.Collections.Generic;
using System.Reflection;
using JAGBE.Attributes;
namespace JAGBE.Stats
{
internal static class AttributeReflector
{
/// <summary>
/// Gets the methods of <paramref name="type"/> with the <see cref="Attribute"/> of type
/// <paramref name=... | using System;
using System.Collections.Generic;
using System.Reflection;
using JAGBE.Attributes;
namespace JAGBE.Stats
{
internal static class AttributeReflector
{
/// <summary>
/// Gets the methods of <paramref name="type"/> with the <see cref="Attribute"/> of type
/// <paramref name=... |
Add source of script and remove unnecessary usings | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StretchScript : MonoBehaviour {
public float orthographicSize = 4;
public float aspect = 0.6f;
void Start()
{
Camera.main.projectionMatrix = Matrix4x4.Ortho(
-orthographicSize * aspect... | using UnityEngine;
// Source: http://answers.unity3d.com/questions/464487/windowed-game-to-fullscreen.html
public class StretchScript : MonoBehaviour {
public float orthographicSize = 4;
public float aspect = 0.6f;
void Start()
{
Camera.main.projectionMatrix = Matrix4x4.Ortho(
... |
Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0. | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... |
Fix for stringize when values contain single quotes. | using System;
using System.Web;
namespace VersionOne.SDK.APIClient {
internal class ValueStringizer {
private readonly string valueWrapper;
public ValueStringizer(string valueWrapper = "'") {
this.valueWrapper = valueWrapper;
}
public string Stringize(object value) {
... | using System;
using System.Web;
namespace VersionOne.SDK.APIClient {
internal class ValueStringizer {
private readonly string valueWrapper;
public ValueStringizer(string valueWrapper = "'") {
this.valueWrapper = valueWrapper;
}
public string Stringize(object value) {
... |
Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0. | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... |
Add drone to the right og 10x | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
public class Team : MonoBehaviour {
//public List<Drone> team = new List<Drone>();
public ArrayList team = new ArrayList();
public GameObject DronePrefab;
public void addDrone(Drone drone){
team.Add(drone);
... | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
public class Team : MonoBehaviour {
//public List<Drone> team = new List<Drone>();
public ArrayList team = new ArrayList();
public GameObject DronePrefab;
public void addDrone(Drone drone){
team.Add(drone);
... |
Add some new map code | using UnityEngine;
using System.Collections;
namespace ecorealms.map {
public class MapPresenter : MonoBehaviour {
private int sizeX;
private int sizeY;
private GameObject rootObject;
private Transform root;
public Mesh mesh;
public Material material;
public void Setup(int sizeX, int sizeY) {
thi... | using UnityEngine;
using System.Collections;
namespace ecorealms.map {
public class MapPresenter : MonoBehaviour {
private int sizeX;
private int sizeY;
private GameObject rootObject;
private Transform root;
public Mesh mesh;
public Material material;
private Tile[] tiles;
public void Setup(int s... |
Remove obsolete chain to base ctor | using MyCouch.Extensions;
using Newtonsoft.Json.Serialization;
namespace MyCouch.Serialization
{
public class SerializationContractResolver : DefaultContractResolver
{
public SerializationContractResolver() : base(true) { }
protected override string ResolvePropertyName(string propertyName)
... | using MyCouch.Extensions;
using Newtonsoft.Json.Serialization;
namespace MyCouch.Serialization
{
public class SerializationContractResolver : DefaultContractResolver
{
protected override string ResolvePropertyName(string propertyName)
{
return base.ResolvePropertyName(propertyName.... |
Update IActionViewMessage message to remove verb | using System.Collections.Generic;
namespace Glimpse.Agent.AspNet.Mvc.Messages
{
public interface IActionViewFoundMessage
{
string ActionId { get; set; }
string ViewName { get; set; }
bool DidFind { get; set; }
ViewResult ViewData { get; set; }
}
} | using System.Collections.Generic;
namespace Glimpse.Agent.AspNet.Mvc.Messages
{
public interface IActionViewMessage
{
string ActionId { get; set; }
string ViewName { get; set; }
bool DidFind { get; set; }
ViewResult ViewData { get; set; }
}
} |
Improve readability of previous implementation. | // 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;
using System.IO;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Input.Events;
using osu.Framework.Ext... | // 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;
using System.IO;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Input.Events;
using osu.Framework.Ext... |
Fix console color staying red after unrecognized game error. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TextPet.Commands {
/// <summary>
/// A command line interface command that sets the current active game.
/// </summary>
internal class GameCommand : CliCommand {
public override string Name => "game";
public overri... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TextPet.Commands {
/// <summary>
/// A command line interface command that sets the current active game.
/// </summary>
internal class GameCommand : CliCommand {
public override string Name => "game";
public overri... |
Add an extra catch to handle incorrect paths | using System;
using System.IO;
using System.Xml;
using System.Xml.Linq;
namespace IvionSoft
{
public abstract class XmlConfig
{
public XElement Config { get; private set; }
public XmlConfig(string file)
{
try
{
Config = XElement.Load(fil... | using System;
using System.IO;
using System.Xml;
using System.Xml.Linq;
namespace IvionSoft
{
public abstract class XmlConfig
{
public XElement Config { get; private set; }
public XmlConfig(string file)
{
try
{
Config = XElement.Load(fil... |
Add comment to execution options class | using System;
namespace Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution
{
public enum ExecutionPriority
{
Normal,
Next,
}
public record ExecutionOptions
{
public static ExecutionOptions Default = new()
{
Priority = ExecutionPriority.No... | using System;
namespace Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution
{
public enum ExecutionPriority
{
Normal,
Next,
}
// Some of the fields of this class are not orthogonal,
// so it's possible to construct self-contradictory execution options.
// We shou... |
Tweak eval due email for thru and last update dates | @model IEnumerable<BatteryCommander.Web.Models.Evaluation>
<h1>Past Due and Upcoming Evaluations</h1>
<table border="1">
<thead>
<tr>
<th>Ratee</th>
<th>Rater</th>
<th>Senior Rater</th>
<th>Due Date</th>
<th>Status</th>
<th>Last Updat... | @model IEnumerable<BatteryCommander.Web.Models.Evaluation>
<h1>Past Due and Upcoming Evaluations</h1>
<table border="1">
<thead>
<tr>
<th>Ratee</th>
<th>Rater</th>
<th>Senior Rater</th>
<th>Due Date</th>
<th>Status</th>
<th>Last Updat... |
Correct broken test - wrong exception | using MVVM.HTML.Core.V8JavascriptObject;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MVVM.HTML.Core.Infra;
using MVVM.HTML.Core.Exceptions;
namespace MVVM.HTML.Core.Binding
{
public static class IJavascriptObjectFactory_CreateEnum_exte... | using MVVM.HTML.Core.V8JavascriptObject;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MVVM.HTML.Core.Infra;
using MVVM.HTML.Core.Exceptions;
namespace MVVM.HTML.Core.Binding
{
public static class IJavascriptObjectFactory_CreateEnum_exte... |
Trim search strings in deskapp. | using Chalmers.ILL.Members;
using Chalmers.ILL.Models.Page;
using Chalmers.ILL.OrderItems;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Mvc;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
namespace Chalmers.ILL.Co... | using Chalmers.ILL.Members;
using Chalmers.ILL.Models.Page;
using Chalmers.ILL.OrderItems;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Mvc;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
namespace Chalmers.ILL.Co... |
Include Förlorad and Förlorad? in disk page. | using Chalmers.ILL.Members;
using Chalmers.ILL.Models.Page;
using Chalmers.ILL.OrderItems;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Mvc;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
namespace Chalmers.ILL.Co... | using Chalmers.ILL.Members;
using Chalmers.ILL.Models.Page;
using Chalmers.ILL.OrderItems;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Mvc;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
namespace Chalmers.ILL.Co... |
Initialize TextInfo's m_textInfoName in stubbed out globalization | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics.Contracts;
using System.Text;
namespace System.Globalization
{
public partial class TextInfo
{
////////////////////////////////... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics.Contracts;
using System.Text;
namespace System.Globalization
{
public partial class TextInfo
{
////////////////////////////////... |
Fix handling empty values collection | using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using VanillaTransformer.Core.Utility;
namespace VanillaTransformer.Core.ValuesProviders
{
public class XmlInlineConfigurationValuesProvider:IValuesProvider
{
private readonly XElement inlineValues;
p... | using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using VanillaTransformer.Core.Utility;
namespace VanillaTransformer.Core.ValuesProviders
{
public class XmlInlineConfigurationValuesProvider:IValuesProvider
{
private readonly XElement inlineValues;
p... |
Remove currently not used signal r documentation | namespace NuGet.Lucene.Web.Extension.Controllers
{
#region Usings
using AspNet.WebApi.HtmlMicrodataFormatter;
using NuGet.Lucene.Web.DataServices;
using NuGet.Lucene.Web.Hubs;
#endregion
/// <summary>
/// Provides documentation and semantic information about various
/// reso... | namespace NuGet.Lucene.Web.Extension.Controllers
{
#region Usings
using AspNet.WebApi.HtmlMicrodataFormatter;
using NuGet.Lucene.Web.DataServices;
using NuGet.Lucene.Web.Hubs;
#endregion
/// <summary>
/// Provides documentation and semantic information about various
/// reso... |
Fix screen breadcrumb control updating on click | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Screens;
namespace osu.Game.Graphics.UserInterface
{
/// <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.
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Screens;
namespace osu.Game.Gra... |
Rearrange values in numeric order. | using System;
namespace MySql.Data.MySqlClient
{
public enum MySqlDbType
{
Decimal,
Byte,
Int16,
Int24 = 9,
Int32 = 3,
Int64 = 8,
Float = 4,
Double,
Timestamp = 7,
Date = 10,
Time,
DateTime,
[Obsolete("The Datetime enum value is obsolete. Please use DateTime.")]
Datetime = 12,
Year,
... | using System;
namespace MySql.Data.MySqlClient
{
public enum MySqlDbType
{
Decimal,
Byte,
Int16,
Int32,
Float,
Double,
Timestamp = 7,
Int64,
Int24,
Date,
Time,
DateTime,
[Obsolete("The Datetime enum value is obsolete. Please use DateTime.")]
Datetime = 12,
Year,
Newdate,
VarString,... |
Remove votes when changing poll type | using System;
using System.Linq;
using System.Net;
using System.Web.Http;
using VotingApplication.Data.Context;
using VotingApplication.Data.Model;
using VotingApplication.Web.Api.Models.DBViewModels;
namespace VotingApplication.Web.Api.Controllers
{
public class ManagePollTypeController : WebApiController
{
... | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web.Http;
using VotingApplication.Data.Context;
using VotingApplication.Data.Model;
using VotingApplication.Web.Api.Models.DBViewModels;
namespace VotingApplication.Web.Api.Controllers
{
pub... |
Clean up type scanner and remove lazy initialization of assembly types | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace Conventional
{
public class TypeScanner : ITypeScanner
{
private readonly ITypeSource _typeSource;
private readonly IList<IConvention> _conventions = new List<IConvention>();
public Typ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace Conventional
{
public class TypeScanner : ITypeScanner
{
private readonly ITypeSource _typeSource;
private readonly IList<IConvention> _conventions = new List<IConvention>();
public Typ... |
Fix navigation to Overview after deleting LocalClient. | using Neptuo.Observables.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebCamImageCollector.RemoteControl.Services;
using WebCamImageCollector.RemoteControl.Views;
namespace WebCamImageCollector.RemoteControl.ViewModels.Com... | using Neptuo.Observables.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebCamImageCollector.RemoteControl.Services;
using WebCamImageCollector.RemoteControl.Views;
namespace WebCamImageCollector.RemoteControl.ViewModels.Com... |
Use MainAsync instead of Main | namespace Sandbox
{
public class Program
{
public static void Main()
{
}
}
} | using System.Threading.Tasks;
namespace Sandbox
{
public class Program
{
public static void Main() => new Program().MainAsync().GetAwaiter().GetResult();
private async Task MainAsync()
{
}
}
} |
Fix bug in the StringCollection converter when DataServicePackage.Authors is a simple string. | using System;
using System.Collections.Generic;
using System.Windows.Data;
namespace NuPack.Dialog.PackageManagerUI {
public class StringCollectionsToStringConverter : IValueConverter {
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo cultur... | using System;
using System.Collections.Generic;
using System.Windows.Data;
namespace NuPack.Dialog.PackageManagerUI {
public class StringCollectionsToStringConverter : IValueConverter {
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo cultur... |
Add method to add paragraph to section | using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace SharpLayout
{
public class Section
{
public PageSettings PageSettings { get; }
public List<Table> Tables { get; } = new List<Table>();
public Section(PageSettings pageSettings)
{
Pag... | using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace SharpLayout
{
public class Section
{
public PageSettings PageSettings { get; }
public List<Table> Tables { get; } = new List<Table>();
public Section(PageSettings pageSettings)
{
Pag... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.