This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xunit; | |
namespace Autofac.Test.Features.OpenGenerics | |
{ | |
public class OpenGenericCovariantTests | |
{ | |
private interface INotificationHandler<TNotification> | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Default arguments in interfaces. | |
// If you call the interface method, the passed value will be "interface". | |
// If you call the object method, the passed value will be "method". | |
// Should the compiler error? | |
public interface IPipelineBuilder | |
{ | |
void AddStage(IPipelineStage stage, string mode = "interface"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AutoStep.Extensions; | |
using Microsoft.Extensions.DependencyModel; | |
using NuGet.Common; | |
using NuGet.Configuration; | |
using NuGet.Frameworks; | |
using NuGet.Packaging; | |
using NuGet.Packaging.Core; | |
using NuGet.Packaging.Signing; | |
using NuGet.Protocol.Core.Types; | |
using NuGet.Resolver; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task<PackageIdentity> GetPackageIdentity( | |
ExtensionConfiguration extConfig, SourceCacheContext cache, ILogger nugetLogger, | |
IEnumerable<SourceRepository> repositories, CancellationToken cancelToken) | |
{ | |
// Go through each repository. | |
// If a repository contains only pre-release packages (e.g. AutoStep CI), and | |
// the configuration doesn't permit pre-release versions, | |
// the search will look at other ones (e.g. NuGet). | |
foreach (var sourceRepository in repositories) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Represents the configuration for a single extension to install. | |
/// </summary> | |
public class ExtensionConfiguration | |
{ | |
public string Package { get; set; } | |
public string Version { get; set; } | |
public bool PreRelease { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Riffing on https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-3.1&tabs=visual-studio | |
public class TimedHostedService : IHostedService, IDisposable | |
{ | |
private readonly ILogger<TimedHostedService> _logger; | |
private readonly IServiceProvider _provider; | |
private Timer _timer; | |
public TimedHostedService(IServiceProvider provider, ILogger<TimedHostedService> logger) | |
{ | |
_provider = provider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Riffing on https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-3.1&tabs=visual-studio | |
public class TimedHostedService : IHostedService, IDisposable | |
{ | |
private readonly ILogger<TimedHostedService> _logger; | |
private readonly IServiceProvider _provider; | |
private Timer _timer; | |
public TimedHostedService(IServiceProvider provider, ILogger<TimedHostedService> logger) | |
{ | |
_provider = provider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Autofac; | |
using Autofac.Core; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using Xunit; | |
namespace PreventDuplicateSingletons | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This parser rule is only used for line tokenisation | |
// it doesn't natively understand more context than a single line. | |
// It is also more forgiving than the normal parser. | |
onlyLine: WS? TAG lineTerm #lineTag | |
| WS? OPTION lineTerm #lineOpt | |
| WS? STEP_DEFINE DEF_WS? stepDeclaration? lineTerm #lineStepDefine | |
| WS? FEATURE WS? text? lineTerm #lineFeature | |
| WS? BACKGROUND lineTerm #lineBackground | |
| WS? SCENARIO WS? text? lineTerm #lineScenario | |
| WS? SCENARIO_OUTLINE WS? text? lineTerm #lineScenarioOutline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "monaco-blazor-editor", | |
"version": "1.0.0", | |
"description": "", | |
"private": true, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"build-dev": "npx webpack --config webpack.dev.js", | |
"build": "npx webpack --config webpack.dev.js", | |
"build-prod": "npx webpack --config webpack.prod.js" |
NewerOlder