Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add XML documentation to extension method HttpRequestBase.GetOriginalUrl() and make the method public. | using System;
using System.Web;
namespace Canonicalize
{
internal static class HttpRequestBaseExtensions
{
public static Uri GetOriginalUrl(this HttpRequestBase request)
{
if (request.Url == null || request.Headers == null)
{
return request.Ur... | using System;
using System.Web;
namespace Canonicalize
{
/// <summary>
/// Adds extension methods on <see cref="HttpRequestBase"/>.
/// </summary>
public static class HttpRequestBaseExtensions
{
/// <summary>
/// Gets the original URL requested by the client, without art... |
Add routing rules for profile | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace JabberBCIT {
public class RouteConfig {
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
... | using System.Web.Mvc;
using System.Web.Routing;
namespace JabberBCIT
{
public class RouteConfig {
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "EditProfile",
url... |
Add tests for sameness in DateTimeFormatInfo | // 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.Collections.Generic;
using Xunit;
namespace System.Globalization.Tests
{
public class DateTimeForm... | // 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.Collections.Generic;
using Xunit;
namespace System.Globalization.Tests
{
public class DateTimeForm... |
Fix running test multiple times in same .NET runtime instance | using System;
using FullSerializer.Internal;
using NUnit.Framework;
using System.Collections.Generic;
namespace FullSerializer.Tests {
[fsObject(Converter = typeof(MyConverter))]
public class MyModel {
}
public class MyConverter : fsConverter {
public static bool DidSerialize = false;
... | using System;
using FullSerializer.Internal;
using NUnit.Framework;
using System.Collections.Generic;
namespace FullSerializer.Tests {
[fsObject(Converter = typeof(MyConverter))]
public class MyModel {
}
public class MyConverter : fsConverter {
public static bool DidSerialize = false;
... |
Add Customer filter when listing CreditNote | namespace Stripe
{
using Newtonsoft.Json;
public class CreditNoteListOptions : ListOptions
{
/// <summary>
/// ID of the invoice.
/// </summary>
[JsonProperty("invoice")]
public string InvoiceId { get; set; }
}
}
| namespace Stripe
{
using Newtonsoft.Json;
public class CreditNoteListOptions : ListOptions
{
/// <summary>
/// ID of the customer.
/// </summary>
[JsonProperty("customer")]
public string CustomerId { get; set; }
/// <summary>
/// ID of the invoice.
... |
Make string format optional if no trace listener is attached | using System;
namespace MQTTnet.Core.Diagnostics
{
public static class MqttTrace
{
public static event EventHandler<MqttTraceMessagePublishedEventArgs> TraceMessagePublished;
public static void Verbose(string source, string message)
{
Publish(source, MqttTraceLevel.Verbose... | using System;
namespace MQTTnet.Core.Diagnostics
{
public static class MqttTrace
{
public static event EventHandler<MqttTraceMessagePublishedEventArgs> TraceMessagePublished;
public static void Verbose(string source, string message)
{
Publish(source, MqttTraceLevel.Verbose... |
Add rationale for exit status codes to comments. | using System;
namespace Sep.Git.Tfs
{
public static class GitTfsExitCodes
{
public const int OK = 0;
public const int Help = 1;
public const int InvalidArguments = 2;
public const int ForceRequired = 3;
public const int ExceptionThrown = Byte.MaxValue - 1;
}
}
| using System;
namespace Sep.Git.Tfs
{
/// <summary>
/// Collection of exit codes used by git-tfs.
/// </summary>
/// <remarks>
/// For consistency across all running environments, both various
/// Windows - shells (powershell.exe, cmd.exe) and UNIX - like environments
//... |
Improve exception handling when function does not exist | using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using CroquetAustralia.Domain.Data;
using CroquetAustralia.Domain.Features.TournamentEntry.Commands;
namespace CroquetAustralia.DownloadTournamentEntries.ReadModels
{
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Local")]
publ... | using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using CroquetAustralia.Domain.Data;
using CroquetAustralia.Domain.Features.TournamentEntry.Commands;
namespace CroquetAustralia.DownloadTournamentEntries.ReadModels
{
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Local")]
publ... |
Update Ensure calls to use full path | using Microsoft.Extensions.Options;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration.Models;
using Umbraco.Core.IO;
namespace Umbraco.Core.Runtime
{
public class CoreInitialComponent : IComponent
{
private readonly IIOHelper _ioHelper;
private readonly GlobalSettings _globalSetti... | using Microsoft.Extensions.Options;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration.Models;
using Umbraco.Core.Hosting;
using Umbraco.Core.IO;
namespace Umbraco.Core.Runtime
{
public class CoreInitialComponent : IComponent
{
private readonly IIOHelper _ioHelper;
private readonly... |
Fix test, mine block with transaction | namespace BlockchainSharp.Tests.Processors
{
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using BlockchainSharp.Stores;
using BlockchainSharp.Processors;
using BlockchainSharp.Tests.TestUtils;
using BlockchainSharp.Core;
[TestClass]
public class MinerProc... | namespace BlockchainSharp.Tests.Processors
{
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using BlockchainSharp.Stores;
using BlockchainSharp.Processors;
using BlockchainSharp.Tests.TestUtils;
using BlockchainSharp.Core;
[TestClass]
public class MinerProc... |
Add a safety check for when Authors is null, which shouldn't happen in the first place. Work items: 1727, 1728 | using System;
using System.Collections.Generic;
using System.Windows.Data;
namespace NuGet.Dialog.PackageManagerUI
{
public class StringCollectionsToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo cu... | using System;
using System.Collections.Generic;
using System.Windows.Data;
namespace NuGet.Dialog.PackageManagerUI
{
public class StringCollectionsToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo cultur... |
Fix - Cambiata chiave degli eventi da id richiesta a codice | using MongoDB.Driver;
using Persistence.MongoDB;
using SO115App.API.Models.Classi.Soccorso;
using SO115App.API.Models.Classi.Soccorso.Eventi;
using SO115App.API.Models.Servizi.CQRS.Queries.ListaEventi;
using SO115App.Models.Servizi.Infrastruttura.GetListaEventi;
using System;
using System.Collections.Generic;
using Sy... | using MongoDB.Driver;
using Persistence.MongoDB;
using SO115App.API.Models.Classi.Soccorso;
using SO115App.API.Models.Classi.Soccorso.Eventi;
using SO115App.API.Models.Servizi.CQRS.Queries.ListaEventi;
using SO115App.Models.Servizi.Infrastruttura.GetListaEventi;
using System;
using System.Collections.Generic;
using Sy... |
Revert "[DEVOPS-245] verify test failure" | using NUnit.Framework;
using System;
namespace Sailthru.Tests
{
[TestFixture()]
public class Test
{
[Test()]
public void TestCase()
{
Assert.Fail();
}
}
}
| using NUnit.Framework;
using System;
namespace Sailthru.Tests
{
[TestFixture()]
public class Test
{
[Test()]
public void TestCase()
{
}
}
}
|
Enable NH-315 fixture since it works now | using System;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH315
{
/// <summary>
/// Summary description for Fixture.
/// </summary>
[TestFixture]
[Ignore("Not working, see http://jira.nhibernate.org/browse/NH-315")]
public class Fixture : TestCase
{
protected override string MappingsAssem... | using System;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH315
{
/// <summary>
/// Summary description for Fixture.
/// </summary>
[TestFixture]
public class Fixture : BugTestCase
{
public override string BugNumber
{
get { return "NH315"; }
}
[Test]
public void SaveClient()
... |
Fix missed view model reference | 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... | using RealEstateAgencyFranchise.Database;
using RealEstateAgencyFranchise.ViewModels;
using Starcounter;
using System.Linq;
namespace RealEstateAgencyFranchise.Controllers
{
internal class OfficeController
{
public Json Get(ulong officeObjectNo)
{
return Db.Scope(() =>
... |
Change time type to long | using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
namespace LiteNetLibManager
{
public struct ServerTimeMessage : INetSerializable
{
public int serverUnixTime;
public void Deserialize(NetDataReader reader)
{
serverUnixTime = reader.GetPack... | using System.Collections;
using System.Collections.Generic;
using LiteNetLib.Utils;
namespace LiteNetLibManager
{
public struct ServerTimeMessage : INetSerializable
{
public long serverUnixTime;
public void Deserialize(NetDataReader reader)
{
serverUnixTime = reader.GetPac... |
Fix `TemplateGame.iOS` failing to build | // 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 UIKit;
namespace TemplateGame.iOS
{
public static class Application
{
public static void Main(string[] args)
{
UIApplication.M... | // 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.iOS;
using UIKit;
namespace TemplateGame.iOS
{
public static class Application
{
public static void Main(string[] args)
{
... |
Fix build failure from the merge to master. | using System;
using System.Globalization;
namespace Avalonia.Utilities
{
#if !BUILDTASK
public
#endif
static class StyleClassParser
{
public static ReadOnlySpan<char> ParseStyleClass(this ref CharacterReader r)
{
if (IsValidIdentifierStart(r.Peek))
{
... | using System;
using System.Globalization;
namespace Avalonia.Utilities
{
#if !BUILDTASK
public
#endif
static class StyleClassParser
{
public static ReadOnlySpan<char> ParseStyleClass(this ref CharacterReader r)
{
if (IsValidIdentifierStart(r.PeekOneOrThrow))
{
... |
Fix casting error in WhenAny shim | using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Windows;
namespace ReactiveUIMicro
{
public static class WhenAnyShim
{
public static IObservable<TVal> WhenAny<TSender, TTarget, TVal>(this TSen... | using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Windows;
namespace ReactiveUIMicro
{
public static class WhenAnyShim
{
public static IObservable<TVal> WhenAny<TSender, TTarget, TVal>(this TSen... |
Add support for nested properties access in GetElementAttribute command using dot separated syntax | namespace WindowsUniversalAppDriver.InnerServer.Commands
{
using System.Reflection;
using WindowsUniversalAppDriver.Common;
internal class GetElementAttributeCommand : CommandBase
{
#region Public Properties
public string ElementId { get; set; }
#endregion
#region P... | namespace WindowsUniversalAppDriver.InnerServer.Commands
{
using System;
using System.Reflection;
using WindowsUniversalAppDriver.Common;
internal class GetElementAttributeCommand : CommandBase
{
#region Public Properties
public string ElementId { get; set; }
#endregion
... |
Remove stray space in 404 page | @using StackExchange.DataExplorer
@{this.SetPageTitle("Page not found - Stack Exchange Data Explorer");}
<div class="subheader">
<h2>Page Not Found</h2>
</div>
<div style="width:400px; float:left;">
<p>Sorry we could not find the page requested. However, we did find a picture of <a href="http://en.wiki... | @using StackExchange.DataExplorer
@{this.SetPageTitle("Page not found - Stack Exchange Data Explorer");}
<div class="subheader">
<h2>Page Not Found</h2>
</div>
<div style="width:400px; float:left;">
<p>Sorry we could not find the page requested. However, we did find a picture of <a href="http://en.wiki... |
Set the last activity on creation so sql doesn't blow up. | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace JabbR.Models
{
public class ChatRoom
{
[Key]
public int Key { get; set; }
public DateTime LastActivity { get; set; }
public DateTime? LastNudged { get; set; }
public ... | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace JabbR.Models
{
public class ChatRoom
{
[Key]
public int Key { get; set; }
public DateTime LastActivity { get; set; }
public DateTime? LastNudged { get; set; }
public ... |
Fix refactor fail and add book reference | using System;
namespace BitCommitment
{
/// <summary>
/// A class to perform bit commitment. It does not care what the input is; it's just a
/// facility for exchanging bit commitment messages. Based on Bruce Schneier's RandBytes1-way
/// function method for committing bits
/// </summary>
pu... | using System;
namespace BitCommitment
{
/// <summary>
/// A class to perform bit commitment. It does not care what the input is; it's just a
/// facility for exchanging bit commitment messages. Based on Bruce Schneier's one-way
/// function method for committing bits. See p.87 of `Applied Cryptograp... |
Change domain id to new naming format | using System.Collections.Generic;
using System.Linq;
using TeaCommerce.Api.Infrastructure.Caching;
using Umbraco.Core;
namespace TeaCommerce.Umbraco.Configuration.Compatibility {
public static class Domain {
private const string CacheKey = "Domains";
public static umbraco.cms.businesslogic.web.Domain[] Ge... | using System.Collections.Generic;
using System.Linq;
using TeaCommerce.Api.Infrastructure.Caching;
using Umbraco.Core;
namespace TeaCommerce.Umbraco.Configuration.Compatibility {
public static class Domain {
private const string CacheKey = "Domains";
public static umbraco.cms.businesslogic.web.Domain[] Ge... |
Edit assembly description to make xml compliant for nuspec output. | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Crosscutter")]
[assembly: AssemblyDescrip... | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Crosscutter")]
[assembly: AssemblyDescrip... |
Change FilterNumber to PhoneNumber so that it has the same name as the database field | using System.Runtime.Serialization;
namespace PS.Mothership.Core.Common.Rellaid.Dto
{
[DataContract]
public class InboundQueueDistributorDto
{
[DataMember]
public string FilterNumber { get; set; }
[DataMember]
public int RungCount { get; set; }
}
}
| using System.Runtime.Serialization;
namespace PS.Mothership.Core.Common.Rellaid.Dto
{
[DataContract]
public class InboundQueueDistributorDto
{
[DataMember]
public string PhoneNumber { get; set; }
[DataMember]
public int RungCount { get; set; }
}
}
|
Fix for NoVehicleUsage flag doing nothing | using System.Collections.Generic;
using Rocket.Unturned.Player;
using RocketRegions.Util;
using SDG.Unturned;
using UnityEngine;
namespace RocketRegions.Model.Flag.Impl
{
public class NoVehiclesUsageFlag : BoolFlag
{
public override string Description => "Allow/Disallow usage of vehicles in region";
... | using System.Collections.Generic;
using Rocket.Unturned.Player;
using RocketRegions.Util;
using SDG.Unturned;
using UnityEngine;
namespace RocketRegions.Model.Flag.Impl
{
public class NoVehiclesUsageFlag : BoolFlag
{
public override string Description => "Allow/Disallow usage of vehicles in region";
... |
Delete null check codes, it is not necessary because set owner object function bugs was solved. | using System.Collections.Generic;
using UnityEngine;
namespace LiteNetLibManager
{
public class DefaultInterestManager : BaseInterestManager
{
[Tooltip("Update every ? seconds")]
public float updateInterval = 1f;
private float updateCountDown = 0f;
private void Update()
... | using System.Collections.Generic;
using UnityEngine;
namespace LiteNetLibManager
{
public class DefaultInterestManager : BaseInterestManager
{
[Tooltip("Update every ? seconds")]
public float updateInterval = 1f;
private float updateCountDown = 0f;
private void Update()
... |
Rename recommended mSpec convention to MspecExample for consistency | using Machine.Specifications;
namespace TestingFxTests
{
[Subject("Booleans")]
public class When_comparing_booleans
{
private static bool Subject;
private Establish context = () => Subject = false;
private Because of = () => Subject = true;
private It should_be_true = () =... | using Machine.Specifications;
namespace TestingFxTests
{
[Subject("Mspec")]
public class MspecExample
{
private static bool Subject;
private Establish context = () => Subject = false;
private Because of = () => Subject = true;
private It should_be_true = () => Subject.Shou... |
Copy in Proxy code from ProxyMiddleware.cs, | using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Tiesmaster.Dcc
{
public class Startup
{
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF... | using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Tiesmaster.Dcc
{
public class Startup
{
public void Configure(IApplicationBuilder a... |
Add one more discovery test | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using IdentityModel.Client;
using IdentityServer4.IntegrationTests.Clients;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.T... | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using FluentAssertions;
using IdentityModel.Client;
using IdentityServer4.IntegrationTests.Clients;
using Microsoft.AspNetCore.Hosting;
usin... |
Change File Info repository save method, file info can now be updated. | using System.Threading.Tasks;
using AzureStorage.Tables;
using Microsoft.WindowsAzure.Storage.Table;
namespace CompetitionPlatform.Data.AzureRepositories.Project
{
public class ProjectFileInfoEntity : TableEntity, IProjectFileInfoData
{
public static string GeneratePartitionKey()
{
... | using System.Threading.Tasks;
using AzureStorage.Tables;
using Microsoft.WindowsAzure.Storage.Table;
namespace CompetitionPlatform.Data.AzureRepositories.Project
{
public class ProjectFileInfoEntity : TableEntity, IProjectFileInfoData
{
public static string GeneratePartitionKey()
{
... |
Change name of daabase for IoC | using NUnit.Framework;
namespace Smooth.IoC.Dapper.FastCRUD.Repository.UnitOfWork.Tests.TestHelpers
{
public class MyDatabaseSettings : IMyDatabaseSettings
{
public string ConnectionString { get; } = $@"Data Source={TestContext.CurrentContext.TestDirectory}\Tests.db;Version=3;New=True;BinaryGUID=False... | using NUnit.Framework;
namespace Smooth.IoC.Dapper.FastCRUD.Repository.UnitOfWork.Tests.TestHelpers
{
public class MyDatabaseSettings : IMyDatabaseSettings
{
public string ConnectionString { get; } = $@"Data Source={TestContext.CurrentContext.TestDirectory}\IoCTests.db;Version=3;New=True;BinaryGUID=Fa... |
Add useful overload for instruction remover | using Mono.Cecil;
using Mono.Cecil.Cil;
using System.Linq;
namespace Injector
{
public class InstructionRemover
{
public InstructionRemover(ModuleDefinition targetModule)
{
_targetModule = targetModule;
}
ModuleDefinition _targetModule;
public void Replace... | using Mono.Cecil;
using Mono.Cecil.Cil;
using System.Linq;
namespace Injector
{
public class InstructionRemover
{
public InstructionRemover(ModuleDefinition targetModule)
{
_targetModule = targetModule;
}
ModuleDefinition _targetModule;
public void Replace... |
Fix connection bug for fresh environments | using Microsoft.Data.Tools.Schema.Sql.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Data;
using System.Data.SqlClient;
using System.Transactions;
namespace Daves.DeepDataDuplicator.IntegrationTests
{
[TestClass]
public class SqlDatabaseSetup
{
public static readonly... | using Microsoft.Data.Tools.Schema.Sql.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Data;
using System.Data.SqlClient;
using System.Transactions;
namespace Daves.DeepDataDuplicator.IntegrationTests
{
[TestClass]
public class SqlDatabaseSetup
{
[AssemblyInitialize]
... |
Update "Insert Include Field" example | using Aspose.Words.Fields;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Fields
{
class InsertIncludeFieldWithoutDocumentBuilder
{
public static void Run()
... | using Aspose.Words.Fields;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Fields
{
class InsertIncludeFieldWithoutDocumentBuilder
{
public static void Run()
... |
Add the track number to the song | using System;
namespace Espera.Network
{
public class NetworkSong
{
public string Album { get; set; }
public string Artist { get; set; }
public TimeSpan Duration { get; set; }
public string Genre { get; set; }
public Guid Guid { get; set; }
public NetworkSo... | using System;
namespace Espera.Network
{
public class NetworkSong
{
public string Album { get; set; }
public string Artist { get; set; }
public TimeSpan Duration { get; set; }
public string Genre { get; set; }
public Guid Guid { get; set; }
public NetworkSo... |
Add filter property to most played shows request. | namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base.Get;
using Enums;
using Objects.Basic;
using Objects.Get.Shows.Common;
using System.Collections.Generic;
internal class TraktShowsMostPlayedRequest : TraktGetRequest<TraktPaginationListResult<TraktMostPlayedShow>, TraktMos... | namespace TraktApiSharp.Requests.WithoutOAuth.Shows.Common
{
using Base;
using Base.Get;
using Enums;
using Objects.Basic;
using Objects.Get.Shows.Common;
using System.Collections.Generic;
internal class TraktShowsMostPlayedRequest : TraktGetRequest<TraktPaginationListResult<TraktMostPlaye... |
Remove editor completely when adding a fieldset to the layout editor. | using Orchard.Layouts.Helpers;
using Orchard.Layouts.Elements;
namespace Orchard.DynamicForms.Elements {
public class Fieldset : Container {
public override string Category {
get { return "Forms"; }
}
public string Legend {
get { return this.Retrieve(f => f.Legend)... | using Orchard.Layouts.Helpers;
using Orchard.Layouts.Elements;
namespace Orchard.DynamicForms.Elements {
public class Fieldset : Container {
public override string Category {
get { return "Forms"; }
}
public override bool HasEditor {
get { return false; }
}... |
Convert scrap errors to warnings | using System;
using System.IO;
using System.Management.Automation;
namespace Microsoft.PowerShell.CrossCompatibility.Commands
{
internal static class CommandUtilities
{
private const string COMPATIBILITY_ERROR_ID = "CompatibilityAnalysisError";
public const string MODULE_PREFIX = "PSCompatibil... | using System;
using System.IO;
using System.Management.Automation;
namespace Microsoft.PowerShell.CrossCompatibility.Commands
{
internal static class CommandUtilities
{
private const string COMPATIBILITY_ERROR_ID = "CompatibilityAnalysisError";
public const string MODULE_PREFIX = "PSCompatibil... |
Check associated object parameter for null. Throw ArgumentNullException if it is null | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Windows.UI.Xaml;
namespace Microsoft.Xaml.Interactivity
{
/// <summary>
/// A base class for behaviors, implementing the basic plumbing of IBehavior
... | // 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 Windows.UI.Xaml;
namespace Microsoft.Xaml.Interactivity
{
/// <summary>
/// A base class for behaviors, implementing the basic plumbing of... |
Fix default value in settings window. | using Fiddler;
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace VCSJones.FiddlerCert
{
public class SettingsModel : INotifyPropertyChanged
{
private bool _checkForUpdates;
private RelayCommand _saveCommand, _cancelCommand;
public ... | using Fiddler;
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace VCSJones.FiddlerCert
{
public class SettingsModel : INotifyPropertyChanged
{
private bool _checkForUpdates;
private RelayCommand _saveCommand, _cancelCommand;
public ... |
Make addin version assembly to 0.1. | using Mono.Addins;
using Mono.Addins.Description;
[assembly: Addin(
Id = "jzeferino.XSAddin",
Namespace = "jzeferino.XSAddin",
Version = "0.0.1"
)]
[assembly: AddinName("jzeferino.XSAddin")]
[assembly: AddinCategory("IDE extensions")]
[assembly: AddinDescription("This add-in let you create a Xamarin Cros... | using Mono.Addins;
using Mono.Addins.Description;
[assembly: Addin(
Id = "jzeferino.XSAddin",
Namespace = "jzeferino.XSAddin",
Version = "0.1"
)]
[assembly: AddinName("jzeferino.XSAddin")]
[assembly: AddinCategory("IDE extensions")]
[assembly: AddinDescription("This add-in let you create a Xamarin Cross ... |
Fix MemberwiseClone calls being generated for .GetEnumerator() on dictionary keys/values collections. | using System;
using System.Collections;
using System.Collections.Generic;
using JSIL.Meta;
using JSIL.Proxy;
namespace JSIL.Proxies {
[JSProxy(
new[] {
"System.Collections.ArrayList",
"System.Collections.Hashtable",
"System.Collections.Generic.List`1",
"Syst... | using System;
using System.Collections;
using System.Collections.Generic;
using JSIL.Meta;
using JSIL.Proxy;
namespace JSIL.Proxies {
[JSProxy(
new[] {
"System.Collections.ArrayList",
"System.Collections.Hashtable",
"System.Collections.Generic.List`1",
"Syst... |
Change artist in tags test | using System.Linq;
using NUnit.Framework;
using SevenDigital.Api.Schema.Tags;
namespace SevenDigital.Api.Wrapper.Integration.Tests.EndpointTests.TagsEndpoint
{
[TestFixture]
public class ArtistTagsTests
{
[Test]
public void Can_hit_endpoint()
{
ArtistTags tags = Api<ArtistTags>.Create
.WithParame... | using System.Linq;
using NUnit.Framework;
using SevenDigital.Api.Schema.Tags;
namespace SevenDigital.Api.Wrapper.Integration.Tests.EndpointTests.TagsEndpoint
{
[TestFixture]
public class ArtistTagsTests
{
[Test]
public void Can_hit_endpoint()
{
ArtistTags tags = Api<ArtistTags>.Create
.WithParame... |
Make beauty to extensions API | using Photosphere.Mapping.Static;
namespace Photosphere.Mapping.Extensions
{
public static class MappingObjectExtensions
{
/// <summary> Map from source to existent object target</summary>
public static void MapTo<TSource, TTarget>(this TSource source, TTarget target)
where TTarget... | using Photosphere.Mapping.Static;
namespace Photosphere.Mapping.Extensions
{
public static class MappingObjectExtensions
{
/// <summary> Map from source to existent object target</summary>
public static void MapTo<TSource, TTarget>(this TSource source, TTarget target)
where TTarget... |
Update the validation messages for uln and cost | using FluentValidation;
using SFA.DAS.ProviderApprenticeshipsService.Web.Models;
namespace SFA.DAS.ProviderApprenticeshipsService.Web.Validation
{
public sealed class ApprenticeshipViewModelValidator : AbstractValidator<ApprenticeshipViewModel>
{
public ApprenticeshipViewModelValidator()
{
... | using FluentValidation;
using SFA.DAS.ProviderApprenticeshipsService.Web.Models;
namespace SFA.DAS.ProviderApprenticeshipsService.Web.Validation
{
public sealed class ApprenticeshipViewModelValidator : AbstractValidator<ApprenticeshipViewModel>
{
public ApprenticeshipViewModelValidator()
{
... |
Add InsightsApiKey to conf file. | using System;
namespace Toggl.Phoebe
{
public static class Build
{
#warning Please fill in build settings and make git assume this file is unchanged.
#region Phoebe build config
public static readonly Uri ApiUrl = new Uri ("https://toggl.com/api/");
public static readonly Uri ReportsAp... | using System;
namespace Toggl.Phoebe
{
public static class Build
{
#warning Please fill in build settings and make git assume this file is unchanged.
#region Phoebe build config
public static readonly Uri ApiUrl = new Uri ("https://toggl.com/api/");
public static readonly Uri ReportsAp... |
Add precision and scale to avatar zoom scale | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace GRA.Data.Model
{
public class AvatarLayer : Abstract.BaseDbEntity
{
[Required]
public int SiteId { get; set; }
[Required]
[MaxLength(255)]
public string Name { get; set; }
... | using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GRA.Data.Model
{
public class AvatarLayer : Abstract.BaseDbEntity
{
[Required]
public int SiteId { get; set; }
[Required]
[MaxLength(255... |
Test requires longer to run on slower aws build agents | using System;
using Amazon.SQS.Model;
using JustEat.Testing;
using NSubstitute;
using NUnit.Framework;
namespace AwsTools.UnitTests.SqsNotificationListener
{
public class WhenThereAreExceptionsInSqsCalling : BaseQueuePollingTest
{
private int _sqsCallCounter;
protected override void Given()
... | using System;
using Amazon.SQS.Model;
using JustEat.Testing;
using NSubstitute;
using NUnit.Framework;
namespace AwsTools.UnitTests.SqsNotificationListener
{
public class WhenThereAreExceptionsInSqsCalling : BaseQueuePollingTest
{
private int _sqsCallCounter;
protected override void Given()
... |
Use lambda spec for method | // 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 System.Linq;
using JetBrains.Annotations;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framewor... | // 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 System.Linq;
using JetBrains.Annotations;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framewor... |
Remove dot net core dependency | using Microsoft.AspNetCore.Mvc;
namespace SFA.DAS.CommitmentsV2.Api.Types.Requests
{
public class GetApprenticeshipRequest
{
[FromQuery]
public long? AccountId { get; set; }
[FromQuery]
public long? ProviderId { get; set; }
[FromQuery]
public int PageNumber { ge... |
namespace SFA.DAS.CommitmentsV2.Api.Types.Requests
{
public class GetApprenticeshipRequest
{
public long? AccountId { get; set; }
public long? ProviderId { get; set; }
public int PageNumber { get; set; }
public int PageItemCount { get; set; }
public string SortField { g... |
Move REcttransform scaler into mrtk namespace | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
/// <summary>
/// RectTransforms do not scale 3d objects (such as unit cubes) to fit within their bounds.
/// This helper class will apply a scal... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
/// <summary>
/// RectTransforms do not scale 3d objects (such as unit cubes) to fit... |
Fix bug with query after json ignoring user doc contact challenges. | using System;
using System.Linq;
using System.Threading.Tasks;
using ArangoDB.Client;
using EventSourced.Net.ReadModel.Users.Internal.Documents;
namespace EventSourced.Net.ReadModel.Users.Internal.Queries
{
public class UserDocumentByContactChallengeCorrelationId : IQuery<Task<UserDocument>>
{
public Guid Cor... | using System;
using System.Linq;
using System.Threading.Tasks;
using ArangoDB.Client;
using EventSourced.Net.ReadModel.Users.Internal.Documents;
namespace EventSourced.Net.ReadModel.Users.Internal.Queries
{
public class UserDocumentByContactChallengeCorrelationId : IQuery<Task<UserDocument>>
{
public Guid Cor... |
Add a missing event type | using Newtonsoft.Json;
namespace SyncTrayzor.Syncthing.ApiClient
{
[JsonConverter(typeof(DefaultingStringEnumConverter))]
public enum EventType
{
Unknown,
Starting,
StartupComplete,
Ping,
DeviceDiscovered,
DeviceConnected,
DeviceDisconnected,
... | using Newtonsoft.Json;
namespace SyncTrayzor.Syncthing.ApiClient
{
[JsonConverter(typeof(DefaultingStringEnumConverter))]
public enum EventType
{
Unknown,
Starting,
StartupComplete,
Ping,
DeviceDiscovered,
DeviceConnected,
DeviceDisconnected,
... |
Add limiter to JsonArrayField min and max properties | namespace Gigobyte.Mockaroo.Fields
{
public partial class JSONArrayField
{
public int Min { get; set; } = 1;
public int Max { get; set; } = 5;
public override string ToJson()
{
return $"{base.BaseJson()},\"minItems\":{Min},\"maxItems\":{Max}}}";
}
}
} | namespace Gigobyte.Mockaroo.Fields
{
public partial class JSONArrayField
{
public int Min
{
get { return _min; }
set { _min = value.Between(0, 100); }
}
public int Max
{
get { return _max; }
set { _max = value.Between(0, 1... |
Add edit / remove buttons to each file on experience page | @model Badges.Models.Shared.ExperienceViewModel
<div id="work-container" class="container work">
<div class="row">
@foreach (var work in @Model.SupportingWorks)
{
@* <div class="col-md-4"> *@
<div class="@work.Type work-item-box">
@Html.Partial("_View... | @model Badges.Models.Shared.ExperienceViewModel
<div id="work-container" class="container work">
<div class="row">
@foreach (var work in @Model.SupportingWorks)
{
@* <div class="col-md-4"> *@
<div class="@work.Type work-item-box">
@Html.Partial("_View... |
Make Shuffle() returns IList to avoid delayed execution. | //
// ShuffleExtensions.cs
//
// Copyright (c) 2017 Takashi OTSUKI
//
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
using System;
using System.Collections.Generic;
using System.Linq;
namespace AIWolf.Lib
{
#if JHELP
/// <summary>
/// IEnumerableインターフ... | //
// ShuffleExtensions.cs
//
// Copyright (c) 2017 Takashi OTSUKI
//
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
using System;
using System.Collections.Generic;
using System.Linq;
namespace AIWolf.Lib
{
#if JHELP
/// <summary>
/// IEnumerableインターフ... |
Add comments for internal API. | #region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2010 FUJIWARA, Yusuke
//
// 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... | #region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2010 FUJIWARA, Yusuke
//
// 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... |
Move all Eco setting types to the Eco namespace | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Eco;
// 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: Assemb... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Eco;
// 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: Assemb... |
Add support for Authenticated on 3DS Charges | namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity
{
[JsonProperty("succeeded")]
public bool Succeeded { get; set; }
[JsonProperty("version")]
public string Version { get; set; }
... | namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity
{
/// <summary>
/// Whether or not authentication was performed. 3D Secure will succeed without
/// authentication when the card is not e... |
Update assembly copyright notice to 2017 | using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyProduct("Hangfire")]
[assembly: AssemblyCopyright("Copyright © 2013-2015 Sergey Odinokov, Adam Barclay")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
// Don't edit manuall... | using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyProduct("Hangfire")]
[assembly: AssemblyCopyright("Copyright © 2013-2017 Sergey Odinokov, Adam Barclay")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
// Don't edit manuall... |
Add automatic placement for Prizes. | using UnityEngine;
using System.Collections;
using Matcha.Game.Tweens;
public class InteractiveEntity : MonoBehaviour
{
public enum EntityType { none, prize, weapon };
public EntityType entityType;
[HideInInspector]
public bool alreadyCollided = false;
public bool disableIfOffScreen = true;
... | using UnityEngine;
using System;
using System.Collections;
using Matcha.Game.Tweens;
public class InteractiveEntity : MonoBehaviour
{
public enum EntityType { none, prize, weapon };
public EntityType entityType;
[HideInInspector]
public bool alreadyCollided = false;
public bool disableIfOffScree... |
Make sure a ball can't happen while a goal has already happened! | using System;
using Client.Common;
using Client.Game;
using UnityEngine;
namespace Client.Controllers
{
// Create a ball. Once there is a Goal, create a new
// ball at the given time frame.
public class BallController : MonoBehaviour
{
[SerializeField]
[Tooltip("The soccer ball prefab"... | using System;
using Client.Common;
using Client.Game;
using UnityEngine;
namespace Client.Controllers
{
// Create a ball. Once there is a Goal, create a new
// ball at the given time frame.
public class BallController : MonoBehaviour
{
[SerializeField]
[Tooltip("The soccer ball prefab"... |
Fix issues with wordwrap string extension method | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExoMail.Smtp.Extensions
{
public static class StringExtensions
{
public static Stream ToStream(this string str)
{
return new MemoryStream(E... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExoMail.Smtp.Extensions
{
public static class StringExtensions
{
public static Stream ToStream(this string str)
{
return new MemoryStream(E... |
Set AssemblyVersion and AssemblyFileVersion to 1.0.0.0 | 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("Tr... | 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("Tr... |
Add using for db context | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelAgency.Data;
using TravelAgency.Data.Migrations;
using TravelAgency.MongoDbExtractor;
namespace TravelAgency.Client
{
public class Startup
{
public... | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelAgency.Data;
using TravelAgency.Data.Migrations;
using TravelAgency.MongoDbExtractor;
namespace TravelAgency.Client
{
public class Startup
{
public... |
Add Chroma keying to the background of the showcase video. | // 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.Tournament.Components;
namespace osu.Game.Tournament.Screens.Showcase
{
public class Sho... | // 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.Tournament.Components;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
namespace ... |
Update usages to consume `IRulesetStore` | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
namespace osu.Game.Scoring.Legacy
{
/// <summary>
/// A <see cref="LegacyScoreDecoder"/> which retrieves the a... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
namespace osu.Game.Scoring.Legacy
{
/// <summary>
/// A <see cref="LegacyScoreDecoder"/> which retrieves the a... |
Update spacing for project consistency | using System;
using System.Web;
namespace RollbarSharp
{
public class RollbarHttpModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.Error += SendError;
}
public void Dispose()
{
}
private void SendError(object sender, EventArgs e)
{
var applica... | using System;
using System.Web;
namespace RollbarSharp
{
public class RollbarHttpModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.Error += SendError;
}
public void Dispose()
{
}
private static void S... |
Define and evaluate function, using defn defined in core.clj | namespace ClojSharp.Core.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Forms;
using ClojSharp.Core.Language;
using ClojSharp.Core.SpecialForms;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestC... | namespace ClojSharp.Core.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Compiler;
using ClojSharp.Core.Forms;
using ClojSharp.Core.Language;
using ClojSharp.Core.SpecialForms;
using Microsoft.VisualStudio.... |
Fix issue where RegisterScript did not load file in a IIS Virtual App environment | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.UI;
using System.Web.WebPages;
using DotNetNuke.Web.Client;
using DotNetNuke.Web.Client.ClientResourceManagement;
namespace Satrabel.OpenContent.Components
{
public abstract... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.UI;
using System.Web.WebPages;
using DotNetNuke.Web.Client;
using DotNetNuke.Web.Client.ClientResourceManagement;
namespace Satrabel.OpenContent.Components
{
public abstract... |
Remove display name for Negotiate and Ntlm | // 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.Collections.Generic;
using Microsoft.AspNet.Http.Authentication;
namespace Microsoft.AspNet.IISPlatformHandler
{
public class IISPlat... | // 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.Collections.Generic;
using Microsoft.AspNet.Http.Authentication;
namespace Microsoft.AspNet.IISPlatformHandler
{
public class IISPlat... |
Create 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 database abstraction test to use correct table name, etc. | namespace StraightSql.Test
{
using System;
using System.Threading.Tasks;
using Xunit;
public class DatabaseAbstractionTest
{
[Fact]
public async Task DatabaseAbstractionTestAsync()
{
var queryDispatcher = new QueryDispatcher(new ConnectionFactory(ConnectionString.Default));
var database =... | namespace StraightSql.Test
{
using System;
using System.Threading.Tasks;
using Xunit;
public class DatabaseAbstractionTest
{
[Fact]
public async Task DatabaseAbstractionTestAsync()
{
var queryDispatcher = new QueryDispatcher(new ConnectionFactory(ConnectionString.Default));
var database =... |
Add more precision to aspnet_start reported times. | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace aspnet_start
{
public class Startup
{
publ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace aspnet_start
{
public class Startup
{
publ... |
Convert source to Hello World. | using System;
using System.Runtime.InteropServices;
namespace TimeToMain
{
public static class Program
{
[DllImport("libnative.so")]
private static extern void write_marker(string name);
public static void Main(string[] args)
{
write_marker("/function/main");
... | using System;
using System.Runtime.InteropServices;
namespace TimeToMain
{
public static class Program
{
[DllImport("libnative.so")]
private static extern void write_marker(string name);
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
... |
Allow Models Builder to have correct type | using System;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
namespace Our.Umbraco.OpeningHours.Converters
{
[PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)]
public class OpeningHoursValueConverter : Prope... | using System;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
using Our.Umbraco.OpeningHours.Model;
namespace Our.Umbraco.OpeningHours.Converters
{
[PropertyValueType(typeof(OpeningHours))]
[PropertyValueCache(PropertyCacheValue.A... |
Fix AW error - creating new phone number | using NakedObjects;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace AdventureWorksModel
{
public partial class PersonPhone {
#region Injected Services
public IDomainObjectContainer Container { set; protected get; }
#endregion
... | using NakedObjects;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace AdventureWorksModel
{
public partial class PersonPhone {
#region Injected Services
public IDomainObjectContainer Container { set; protected get; }
#endregion
... |
Fix osu!catch catcher not scaling down correctly | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.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.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Rulesets... |
Add "x-delayed-message" as valid exchange type | using System;
using System.Collections.Generic;
namespace EasyNetQ.Management.Client.Model
{
public class ExchangeInfo
{
public string Type { get; private set; }
public bool AutoDelete { get; private set; }
public bool Durable { get; private set; }
public bool Internal { get; p... | using System;
using System.Collections.Generic;
namespace EasyNetQ.Management.Client.Model
{
public class ExchangeInfo
{
public string Type { get; private set; }
public bool AutoDelete { get; private set; }
public bool Durable { get; private set; }
public bool Internal { get; p... |
Add an area for errors | using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
public class PublishWindow : EditorWindow
{
private const string PublishTitle = "Publish this repository to GitHub";
private string repoName = "";
private string repoDescription = "";
private int selectedOrg = 0;
... | using UnityEditor;
using UnityEngine;
namespace GitHub.Unity
{
public class PublishWindow : EditorWindow
{
private const string PublishTitle = "Publish this repository to GitHub";
private string repoName = "";
private string repoDescription = "";
private int selectedOrg = 0;
... |
Bump up new version for assemblyinfor file | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Consumption Management Library"... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Consumption Management Library"... |
Fix incorrect version number displayed when deployed | #region
using System;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
namespace DesktopWidgets.Classes
{
internal static class AssemblyInfo
{
public static Version Version { get; } = Assembly.GetExecutingAssembly().GetName().Version;
public static string Copyright {... | #region
using System;
using System.Deployment.Application;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
namespace DesktopWidgets.Classes
{
internal static class AssemblyInfo
{
public static Version Version { get; } = (ApplicationDeployment.IsNetworkDeployed
?... |
Update server side API for single multiple answer question | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _dbContex... | using System.Collections.Generic;
using Promact.Trappist.DomainModel.Models.Question;
using System.Linq;
using Promact.Trappist.DomainModel.DbContext;
namespace Promact.Trappist.Repository.Questions
{
public class QuestionRepository : IQuestionRespository
{
private readonly TrappistDbContext _dbContex... |
Fix formatting and add some constructor overloads | // 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.Editor
{
internal struct CodeDefinitionWindowLocation
{
public string DisplayName { get; }
... | // 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.CodeAnalysis.Text;
namespace Microsoft.CodeAnalysis.Editor
{
internal struct CodeDefinitionWindowLocation
{
public string Di... |
Add more properties found in Twitter V2 Url | using Newtonsoft.Json;
namespace Tweetinvi.Models.V2
{
public class UrlV2
{
/// <summary>
/// The URL as displayed in the Twitter client.
/// </summary>
[JsonProperty("display_url")] public string DisplayUrl { get; set; }
/// <summary>
/// The end position (zero... | using Newtonsoft.Json;
namespace Tweetinvi.Models.V2
{
public class UrlV2
{
/// <summary>
/// The URL as displayed in the Twitter client.
/// </summary>
[JsonProperty("display_url")] public string DisplayUrl { get; set; }
/// <summary>
/// The end position (zero... |
Use my enumerable in a loop | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodePlayground
{
class Program
{
static void Main(string[] args)
{
// This doesn't change (yet):
foreach (var item in GeneratedStrings())
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodePlayground
{
class Program
{
static void Main(string[] args)
{
// This doesn't change (yet):
foreach (var item in GeneratedStrings())
... |
Make sure window is visible. | //------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2008, mEthLab Interactive
//------------------------------------------------------------------------------
//--------------------------------------------------------------------------... | //------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright (C) 2008, mEthLab Interactive
//------------------------------------------------------------------------------
//--------------------------------------------------------------------------... |
Add basic test for ParallelFireworkAlgorithm. | using FireworksNet.Algorithm;
using FireworksNet.Algorithm.Implementation;
using FireworksNet.Problems;
using FireworksNet.StopConditions;
using System;
using Xunit;
namespace FireworksNet.Tests.Algorithm
{
public class ParallelFireworkAlgorithmTests : AlgorithmTestDataSource
{
}
}
| using FireworksNet.Algorithm;
using FireworksNet.Algorithm.Implementation;
using FireworksNet.Problems;
using FireworksNet.StopConditions;
using System;
using Xunit;
namespace FireworksNet.Tests.Algorithm
{
public class ParallelFireworkAlgorithmTests : AlgorithmTestDataSource
{
[Theory]
[Member... |
Fix health not being calculated in osu! mode (regression). | // 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.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game.Modes... | // 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.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Scoring;
using osu.Game.Modes... |
Add new overload to Compare method | namespace Gigobyte.Daterpillar.Management
{
public interface ISchemaComparer : System.IDisposable
{
SchemaDiscrepancy Compare(ISchemaAggregator source, ISchemaAggregator target);
}
} | using Gigobyte.Daterpillar.Transformation;
namespace Gigobyte.Daterpillar.Management
{
public interface ISchemaComparer : System.IDisposable
{
SchemaDiscrepancy Compare(Schema source, Schema target);
SchemaDiscrepancy Compare(ISchemaAggregator source, ISchemaAggregator target);
}
} |
Test that nameof nag is ignored in | namespace Gu.Analyzers.Test.GU0006UseNameofTests
{
using System.Threading.Tasks;
using NUnit.Framework;
internal class HappyPath : HappyPathVerifier<GU0006UseNameof>
{
[Test]
public async Task WhenThrowingArgumentException()
{
var testCode = @"
using System;
... | namespace Gu.Analyzers.Test.GU0006UseNameofTests
{
using System.Threading.Tasks;
using NUnit.Framework;
internal class HappyPath : HappyPathVerifier<GU0006UseNameof>
{
[Test]
public async Task WhenThrowingArgumentException()
{
var testCode = @"
using System;
... |
Revert "give compilation error instead of warning or exception at runtime" | using System;
namespace BenchmarkDotNet.Diagnostics
{
[Obsolete("The \"GCDiagnoser\" has been renamed, please use the \"MemoryDiagnoser\" instead (it has the same functionality)", true)]
public class GCDiagnoser
{
}
}
| using System;
using System.Collections.Generic;
using System.Diagnostics;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
namespace BenchmarkDotNet.Diagnostics.Windows
{
[Obsolete(message)]
public cla... |
Install all indexes by scanning assembly | using System.ComponentModel.Composition.Hosting;
using Raven.Client;
using Raven.Client.Indexes;
namespace Snittlistan.Infrastructure.Indexes
{
public static class IndexCreator
{
public static void CreateIndexes(IDocumentStore store)
{
var typeCatalog = new TypeCatalog(typeof(Matches_PlayerStats), ... | using System.ComponentModel.Composition.Hosting;
using System.Linq;
using System.Reflection;
using Raven.Client;
using Raven.Client.Indexes;
namespace Snittlistan.Infrastructure.Indexes
{
public static class IndexCreator
{
public static void CreateIndexes(IDocumentStore store)
{
var indexes = fro... |
Add explanatory text comment for person-prisoner example | namespace PersonPrisoner
{
class Program
{
static void Main(string[] args)
{
Person person = new Prisoner();
person.WalkEast(5);
}
}
}
| namespace PersonPrisoner
{
class Program
{
static void Main(string[] args)
{
Person person = new Prisoner();
person.WalkEast(5);
}
}
#region Explanation
// At a first glance, it would be pretty obvious to make the prisoner derive from person class.
// Ju... |
Fix IsUpdatesChannel missing from ToApi() | using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Models
{
/// <inheritdoc />
public sealed class ChatChannel : Api.Models.ChatChannel
{
/// <summary>
/// The row Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// The <see cref="Api.Models.Internal.ChatBot.Id"/>
/// </... | using Tgstation.Server.Api.Models;
namespace Tgstation.Server.Host.Models
{
/// <inheritdoc />
public sealed class ChatChannel : Api.Models.ChatChannel
{
/// <summary>
/// The row Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// The <see cref="Api.Models.Internal.ChatBot.Id"/>
/// </... |
Throw exceptions returned by service context. | using System;
using Castle.DynamicProxy;
using Dargon.Services.PortableObjects;
using Dargon.Services.Utilities;
namespace Dargon.Services.Client {
public class ServiceInvocationInterceptor : IInterceptor {
private readonly IServiceContext serviceContext;
public ServiceInvocationInterceptor(IServiceCon... | using System;
using Castle.DynamicProxy;
using Dargon.Services.PortableObjects;
using Dargon.Services.Utilities;
namespace Dargon.Services.Client {
public class ServiceInvocationInterceptor : IInterceptor {
private readonly IServiceContext serviceContext;
public ServiceInvocationInterceptor(IServiceCon... |
Create application when executing create command | using System;
namespace AppHarbor.Commands
{
public class CreateCommand : ICommand
{
private readonly AppHarborApi _appHarborApi;
public CreateCommand(AppHarborApi appHarborApi)
{
_appHarborApi = appHarborApi;
}
public void Execute(string[] arguments)
{
throw new NotImplementedException();
}
... | using System;
namespace AppHarbor.Commands
{
public class CreateCommand : ICommand
{
private readonly AppHarborApi _appHarborApi;
public CreateCommand(AppHarborApi appHarborApi)
{
_appHarborApi = appHarborApi;
}
public void Execute(string[] arguments)
{
var result = _appHarborApi.CreateApplicati... |
Add Audio properties to IAudiomanagement | namespace Vlc.DotNet.Core
{
public interface IAudioManagement
{
IAudioOutputsManagement Outputs { get; }
}
}
| namespace Vlc.DotNet.Core
{
public interface IAudioManagement
{
IAudioOutputsManagement Outputs { get; }
bool IsMute { get; set; }
void ToggleMute();
int Volume { get; set; }
ITracksManagement Tracks { get; }
int Channel { get; set; }
long Delay { g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.