Merge branch 'master' into merge/release/3.1-to-master\n\nCommit migrated from ab0fceeb06
This commit is contained in:
commit
b183be06fe
|
|
@ -20,10 +20,10 @@ namespace Microsoft.Extensions.Configuration.KeyPerFile
|
|||
public partial class KeyPerFileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource
|
||||
{
|
||||
public KeyPerFileConfigurationSource() { }
|
||||
public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.Func<string, bool> IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public System.Func<string, bool> IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ namespace Microsoft.Extensions.Configuration.KeyPerFile
|
|||
public partial class KeyPerFileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource
|
||||
{
|
||||
public KeyPerFileConfigurationSource() { }
|
||||
public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.Func<string, bool> IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public System.Func<string, bool> IgnoreCondition { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public string IgnorePrefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public bool Optional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Microsoft.Extensions.FileProviders
|
|||
public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root) { }
|
||||
public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, System.DateTimeOffset lastModified) { }
|
||||
public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, string manifestName, System.DateTimeOffset lastModified) { }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) { throw null; }
|
||||
public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) { throw null; }
|
||||
public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) { throw null; }
|
||||
|
|
@ -30,9 +30,9 @@ namespace Microsoft.Extensions.FileProviders.Embedded
|
|||
public EmbeddedResourceFileInfo(System.Reflection.Assembly assembly, string resourcePath, string name, System.DateTimeOffset lastModified) { }
|
||||
public bool Exists { get { throw null; } }
|
||||
public bool IsDirectory { get { throw null; } }
|
||||
public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public long Length { get { throw null; } }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string PhysicalPath { get { throw null; } }
|
||||
public System.IO.Stream CreateReadStream() { throw null; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Microsoft.Extensions.FileProviders
|
|||
public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root) { }
|
||||
public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, System.DateTimeOffset lastModified) { }
|
||||
public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, string manifestName, System.DateTimeOffset lastModified) { }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) { throw null; }
|
||||
public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) { throw null; }
|
||||
public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) { throw null; }
|
||||
|
|
@ -30,9 +30,9 @@ namespace Microsoft.Extensions.FileProviders.Embedded
|
|||
public EmbeddedResourceFileInfo(System.Reflection.Assembly assembly, string resourcePath, string name, System.DateTimeOffset lastModified) { }
|
||||
public bool Exists { get { throw null; } }
|
||||
public bool IsDirectory { get { throw null; } }
|
||||
public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.DateTimeOffset LastModified { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public long Length { get { throw null; } }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string PhysicalPath { get { throw null; } }
|
||||
public System.IO.Stream CreateReadStream() { throw null; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public sealed partial class HealthCheckContext
|
||||
{
|
||||
public HealthCheckContext() { }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
public sealed partial class HealthCheckRegistration
|
||||
{
|
||||
|
|
@ -15,9 +15,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public HealthCheckRegistration(string name, System.Func<System.IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string> tags) { }
|
||||
public HealthCheckRegistration(string name, System.Func<System.IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string> tags, System.TimeSpan? timeout) { }
|
||||
public System.Func<System.IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> Factory { get { throw null; } set { } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public string Name { get { throw null; } set { } }
|
||||
public System.Collections.Generic.ISet<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.ISet<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.TimeSpan Timeout { get { throw null; } set { } }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
|
|
@ -26,10 +26,10 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
private object _dummy;
|
||||
private int _dummyPrimitive;
|
||||
public HealthCheckResult(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Degraded(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Healthy(string description = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
|
|
@ -37,9 +37,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public sealed partial class HealthReport
|
||||
{
|
||||
public HealthReport(System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReportEntry> entries, System.TimeSpan totalDuration) { }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReportEntry> Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReportEntry> Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct HealthReportEntry
|
||||
|
|
@ -48,12 +48,12 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
private int _dummyPrimitive;
|
||||
public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary<string, object> data) { throw null; }
|
||||
public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary<string, object> data, System.Collections.Generic.IEnumerable<string> tags = null) { throw null; }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IEnumerable<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Collections.Generic.IEnumerable<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
public enum HealthStatus
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public sealed partial class HealthCheckContext
|
||||
{
|
||||
public HealthCheckContext() { }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
public sealed partial class HealthCheckRegistration
|
||||
{
|
||||
|
|
@ -15,9 +15,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public HealthCheckRegistration(string name, System.Func<System.IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string> tags) { }
|
||||
public HealthCheckRegistration(string name, System.Func<System.IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string> tags, System.TimeSpan? timeout) { }
|
||||
public System.Func<System.IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> Factory { get { throw null; } set { } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public string Name { get { throw null; } set { } }
|
||||
public System.Collections.Generic.ISet<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.ISet<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.TimeSpan Timeout { get { throw null; } set { } }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
|
|
@ -26,10 +26,10 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
private object _dummy;
|
||||
private int _dummyPrimitive;
|
||||
public HealthCheckResult(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Degraded(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Healthy(string description = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy(string description = null, System.Exception exception = null, System.Collections.Generic.IReadOnlyDictionary<string, object> data = null) { throw null; }
|
||||
|
|
@ -37,9 +37,9 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public sealed partial class HealthReport
|
||||
{
|
||||
public HealthReport(System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReportEntry> entries, System.TimeSpan totalDuration) { }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReportEntry> Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReportEntry> Entries { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.TimeSpan TotalDuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct HealthReportEntry
|
||||
|
|
@ -48,12 +48,12 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
private int _dummyPrimitive;
|
||||
public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary<string, object> data) { throw null; }
|
||||
public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary<string, object> data, System.Collections.Generic.IEnumerable<string> tags = null) { throw null; }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IEnumerable<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.IReadOnlyDictionary<string, object> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string Description { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.TimeSpan Duration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Collections.Generic.IEnumerable<string> Tags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
public enum HealthStatus
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="HealthStatus"/> representing the aggregate status of all the health checks. The value of <see cref="Status"/>
|
||||
/// will be the most servere status reported by a health check. If no checks were executed, the value is always <see cref="HealthStatus.Healthy"/>.
|
||||
/// will be the most severe status reported by a health check. If no checks were executed, the value is always <see cref="HealthStatus.Healthy"/>.
|
||||
/// </summary>
|
||||
public HealthStatus Status { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public HealthCheckPublisherOptions() { }
|
||||
public System.TimeSpan Delay { get { throw null; } set { } }
|
||||
public System.TimeSpan Period { get { throw null; } set { } }
|
||||
public System.Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration, bool> Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration, bool> Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
public abstract partial class HealthCheckService
|
||||
{
|
||||
|
|
@ -54,6 +54,6 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public sealed partial class HealthCheckServiceOptions
|
||||
{
|
||||
public HealthCheckServiceOptions() { }
|
||||
public System.Collections.Generic.ICollection<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration> Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.ICollection<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration> Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public HealthCheckPublisherOptions() { }
|
||||
public System.TimeSpan Delay { get { throw null; } set { } }
|
||||
public System.TimeSpan Period { get { throw null; } set { } }
|
||||
public System.Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration, bool> Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration, bool> Predicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public System.TimeSpan Timeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
public abstract partial class HealthCheckService
|
||||
{
|
||||
|
|
@ -54,6 +54,6 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
public sealed partial class HealthCheckServiceOptions
|
||||
{
|
||||
public HealthCheckServiceOptions() { }
|
||||
public System.Collections.Generic.ICollection<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration> Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Collections.Generic.ICollection<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration> Registrations { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
});
|
||||
}
|
||||
|
||||
[Fact] // see: https://github.com/aspnet/Extensions/issues/639
|
||||
[Fact] // see: https://github.com/dotnet/extensions/issues/639
|
||||
public void AddHealthChecks_RegistersPublisherService_WhenOtherHostedServicesRegistered()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<Project>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>@dotnet/jsinterop</PackageId>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsTestProject>false</IsTestProject>
|
||||
<IsShipping>true</IsShipping>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
||||
</Project>
|
||||
<Project>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>@microsoft/dotnet-js-interop</PackageId>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsTestProject>false</IsTestProject>
|
||||
<IsShipping>true</IsShipping>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,348 +1,348 @@
|
|||
{
|
||||
"name": "@dotnet/jsinterop",
|
||||
"version": "3.0.0-dev",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"dev": true
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"babel-code-frame": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^1.1.3",
|
||||
"esutils": "^2.0.2",
|
||||
"js-tokens": "^3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^2.0.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"supports-color": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"builtin-modules": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
|
||||
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"dev": true
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"esprima": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||
"dev": true
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||
"dev": true
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||
"dev": true
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.12.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz",
|
||||
"integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"dev": true
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
|
||||
"integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
|
||||
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.5"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
|
||||
"dev": true
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||
"dev": true
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||
"dev": true
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
|
||||
"dev": true
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.12.1",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.12.1.tgz",
|
||||
"integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.22.0",
|
||||
"builtin-modules": "^1.1.1",
|
||||
"chalk": "^2.3.0",
|
||||
"commander": "^2.12.1",
|
||||
"diff": "^3.2.0",
|
||||
"glob": "^7.1.1",
|
||||
"js-yaml": "^3.7.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.3.0",
|
||||
"tslib": "^1.8.0",
|
||||
"tsutils": "^2.27.2"
|
||||
}
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "2.29.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
|
||||
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
|
||||
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
|
||||
"dev": true
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "@microsoft/dotnet-js-interop",
|
||||
"version": "5.0.0-dev",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"dev": true
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"babel-code-frame": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^1.1.3",
|
||||
"esutils": "^2.0.2",
|
||||
"js-tokens": "^3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^2.0.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"supports-color": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"builtin-modules": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
|
||||
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"dev": true
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"esprima": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||
"dev": true
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||
"dev": true
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||
"dev": true
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.12.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz",
|
||||
"integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"dev": true
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
|
||||
"integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
|
||||
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.5"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
|
||||
"dev": true
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||
"dev": true
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||
"dev": true
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
|
||||
"dev": true
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.12.1",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.12.1.tgz",
|
||||
"integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.22.0",
|
||||
"builtin-modules": "^1.1.1",
|
||||
"chalk": "^2.3.0",
|
||||
"commander": "^2.12.1",
|
||||
"diff": "^3.2.0",
|
||||
"glob": "^7.1.1",
|
||||
"js-yaml": "^3.7.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.3.0",
|
||||
"tslib": "^1.8.0",
|
||||
"tsutils": "^2.27.2"
|
||||
}
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "2.29.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
|
||||
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
|
||||
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
|
||||
"dev": true
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@dotnet/jsinterop",
|
||||
"version": "3.0.0-dev",
|
||||
"name": "@microsoft/dotnet-js-interop",
|
||||
"version": "5.0.0-dev",
|
||||
"description": "Provides abstractions and features for interop between .NET and JavaScript code.",
|
||||
"main": "dist/Microsoft.JSInterop.js",
|
||||
"types": "dist/Microsoft.JSInterop.d.js",
|
||||
|
|
@ -12,14 +12,14 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/aspnet/Extensions.git"
|
||||
"url": "git+https://github.com/dotnet/extensions.git"
|
||||
},
|
||||
"author": "Microsoft",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/aspnet/Extensions/issues"
|
||||
"url": "https://github.com/dotnet/extensions/issues"
|
||||
},
|
||||
"homepage": "https://github.com/aspnet/Extensions/tree/master/src/JSInterop#readme",
|
||||
"homepage": "https://github.com/dotnet/extensions/tree/master/src/JSInterop#readme",
|
||||
"files": [
|
||||
"dist/**"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ namespace Microsoft.JSInterop
|
|||
{
|
||||
public JSInvokableAttribute() { }
|
||||
public JSInvokableAttribute(string identifier) { }
|
||||
public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
public abstract partial class JSRuntime : Microsoft.JSInterop.IJSRuntime
|
||||
{
|
||||
protected JSRuntime() { }
|
||||
protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
protected abstract void BeginInvokeJS(long taskId, string identifier, string argsJson);
|
||||
protected internal abstract void EndInvokeDotNet(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, in Microsoft.JSInterop.Infrastructure.DotNetInvocationResult invocationResult);
|
||||
public System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue>(string identifier, object[] args) { throw null; }
|
||||
|
|
@ -82,10 +82,10 @@ namespace Microsoft.JSInterop.Infrastructure
|
|||
private readonly object _dummy;
|
||||
private readonly int _dummyPrimitive;
|
||||
public DotNetInvocationInfo(string assemblyName, string methodIdentifier, long dotNetObjectId, string callId) { throw null; }
|
||||
public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public readonly partial struct DotNetInvocationResult
|
||||
|
|
@ -94,9 +94,9 @@ namespace Microsoft.JSInterop.Infrastructure
|
|||
private readonly int _dummyPrimitive;
|
||||
public DotNetInvocationResult(System.Exception exception, string errorKind) { throw null; }
|
||||
public DotNetInvocationResult(object result) { throw null; }
|
||||
public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ namespace Microsoft.JSInterop
|
|||
{
|
||||
public JSInvokableAttribute() { }
|
||||
public JSInvokableAttribute(string identifier) { }
|
||||
public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
public abstract partial class JSRuntime : Microsoft.JSInterop.IJSRuntime
|
||||
{
|
||||
protected JSRuntime() { }
|
||||
protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
protected System.TimeSpan? DefaultAsyncTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
protected abstract void BeginInvokeJS(long taskId, string identifier, string argsJson);
|
||||
protected internal abstract void EndInvokeDotNet(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, in Microsoft.JSInterop.Infrastructure.DotNetInvocationResult invocationResult);
|
||||
public System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue>(string identifier, object[] args) { throw null; }
|
||||
|
|
@ -82,10 +82,10 @@ namespace Microsoft.JSInterop.Infrastructure
|
|||
private readonly object _dummy;
|
||||
private readonly int _dummyPrimitive;
|
||||
public DotNetInvocationInfo(string assemblyName, string methodIdentifier, long dotNetObjectId, string callId) { throw null; }
|
||||
public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string AssemblyName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string CallId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public long DotNetObjectId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string MethodIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public readonly partial struct DotNetInvocationResult
|
||||
|
|
@ -94,9 +94,9 @@ namespace Microsoft.JSInterop.Infrastructure
|
|||
private readonly int _dummyPrimitive;
|
||||
public DotNetInvocationResult(System.Exception exception, string errorKind) { throw null; }
|
||||
public DotNetInvocationResult(object result) { throw null; }
|
||||
public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string ErrorKind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public object Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public bool Success { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function synchronously.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>An instance of <typeparamref name="T"/> obtained by JSON-deserializing the return value.</returns>
|
||||
T Invoke<T>(string identifier, params object[] args);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Microsoft.JSInterop
|
|||
/// </para>
|
||||
/// </summary>
|
||||
/// <typeparam name="TValue">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>An instance of <typeparamref name="TValue"/> obtained by JSON-deserializing the return value.</returns>
|
||||
ValueTask<TValue> InvokeAsync<TValue>(string identifier, object[] args);
|
||||
|
|
@ -28,7 +28,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function asynchronously.
|
||||
/// </summary>
|
||||
/// <typeparam name="TValue">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="cancellationToken">
|
||||
/// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts
|
||||
/// (<see cref="JSRuntime.DefaultAsyncTimeout"/>) from being applied.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function synchronously.
|
||||
/// </summary>
|
||||
/// <typeparam name="TValue">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>An instance of <typeparamref name="TValue"/> obtained by JSON-deserializing the return value.</returns>
|
||||
public TValue Invoke<TValue>(string identifier, params object[] args)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function synchronously.
|
||||
/// </summary>
|
||||
/// <param name="jsRuntime">The <see cref="IJSInProcessRuntime"/>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
public static void InvokeVoid(this IJSInProcessRuntime jsRuntime, string identifier, params object[] args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace Microsoft.JSInterop
|
|||
/// </para>
|
||||
/// </summary>
|
||||
/// <typeparam name="TValue">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>An instance of <typeparamref name="TValue"/> obtained by JSON-deserializing the return value.</returns>
|
||||
public ValueTask<TValue> InvokeAsync<TValue>(string identifier, object[] args)
|
||||
|
|
@ -76,7 +76,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function asynchronously.
|
||||
/// </summary>
|
||||
/// <typeparam name="TValue">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="cancellationToken">
|
||||
/// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts
|
||||
/// (<see cref="JSRuntime.DefaultAsyncTimeout"/>) from being applied.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>A <see cref="ValueTask"/> that represents the asynchronous invocation operation.</returns>
|
||||
public static async ValueTask InvokeVoidAsync(this IJSRuntime jsRuntime, string identifier, params object[] args)
|
||||
|
|
@ -38,7 +38,7 @@ namespace Microsoft.JSInterop
|
|||
/// </summary>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
|
||||
/// <typeparam name="TValue">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>An instance of <typeparamref name="TValue"/> obtained by JSON-deserializing the return value.</returns>
|
||||
public static ValueTask<TValue> InvokeAsync<TValue>(this IJSRuntime jsRuntime, string identifier, params object[] args)
|
||||
|
|
@ -56,7 +56,7 @@ namespace Microsoft.JSInterop
|
|||
/// </summary>
|
||||
/// <typeparam name="TValue">The JSON-serializable return type.</typeparam>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="cancellationToken">
|
||||
/// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts
|
||||
/// (<see cref="JSRuntime.DefaultAsyncTimeout"/>) from being applied.
|
||||
|
|
@ -77,7 +77,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="cancellationToken">
|
||||
/// A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts
|
||||
/// (<see cref="JSRuntime.DefaultAsyncTimeout"/>) from being applied.
|
||||
|
|
@ -98,7 +98,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="timeout">The duration after which to cancel the async operation. Overrides default timeouts (<see cref="JSRuntime.DefaultAsyncTimeout"/>).</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>A <see cref="ValueTask"/> that represents the asynchronous invocation operation.</returns>
|
||||
|
|
@ -120,7 +120,7 @@ namespace Microsoft.JSInterop
|
|||
/// Invokes the specified JavaScript function asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <code>"someScope.someFunction"</code> will invoke the function <code>window.someScope.someFunction</code>.</param>
|
||||
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
|
||||
/// <param name="timeout">The duration after which to cancel the async operation. Overrides default timeouts (<see cref="JSRuntime.DefaultAsyncTimeout"/>).</param>
|
||||
/// <param name="args">JSON-serializable arguments.</param>
|
||||
/// <returns>A <see cref="ValueTask"/> that represents the asynchronous invocation operation.</returns>
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ namespace Microsoft.JSInterop.Infrastructure
|
|||
Assert.Equal(expected, ex.Message);
|
||||
}
|
||||
|
||||
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/12357")]
|
||||
[Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/12357")]
|
||||
public void EndInvoke_AfterCancel()
|
||||
{
|
||||
// Arrange
|
||||
|
|
@ -527,7 +527,7 @@ namespace Microsoft.JSInterop.Infrastructure
|
|||
Assert.False(jsRuntime.LastCompletionResult.Success); // Fails
|
||||
|
||||
// Make sure the method that threw the exception shows up in the call stack
|
||||
// https://github.com/aspnet/AspNetCore/issues/8612
|
||||
// https://github.com/dotnet/aspnetcore/issues/8612
|
||||
Assert.Contains(nameof(ThrowingClass.ThrowingMethod), jsRuntime.LastCompletionResult.Exception.ToString());
|
||||
}
|
||||
|
||||
|
|
@ -549,7 +549,7 @@ namespace Microsoft.JSInterop.Infrastructure
|
|||
Assert.False(jsRuntime.LastCompletionResult.Success); // Fails
|
||||
|
||||
// Make sure the method that threw the exception shows up in the call stack
|
||||
// https://github.com/aspnet/AspNetCore/issues/8612
|
||||
// https://github.com/dotnet/aspnetcore/issues/8612
|
||||
Assert.Contains(nameof(ThrowingClass.AsyncThrowingMethod), jsRuntime.LastCompletionResult.Exception.ToString());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
@ECHO OFF
|
||||
|
||||
%~dp0..\..\startvs.cmd %~dp0JSInterop.slnf
|
||||
|
|
@ -8,8 +8,6 @@ namespace Microsoft.Extensions.Localization
|
|||
Microsoft.Extensions.Localization.LocalizedString this[string name] { get; }
|
||||
Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get; }
|
||||
System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures);
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture);
|
||||
}
|
||||
public partial interface IStringLocalizerFactory
|
||||
{
|
||||
|
|
@ -24,10 +22,10 @@ namespace Microsoft.Extensions.Localization
|
|||
public LocalizedString(string name, string value) { }
|
||||
public LocalizedString(string name, string value, bool resourceNotFound) { }
|
||||
public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) { }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public static implicit operator string (Microsoft.Extensions.Localization.LocalizedString localizedString) { throw null; }
|
||||
public override string ToString() { throw null; }
|
||||
}
|
||||
|
|
@ -43,7 +41,5 @@ namespace Microsoft.Extensions.Localization
|
|||
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } }
|
||||
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
|
||||
public System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public virtual Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ namespace Microsoft.Extensions.Localization
|
|||
Microsoft.Extensions.Localization.LocalizedString this[string name] { get; }
|
||||
Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get; }
|
||||
System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures);
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture);
|
||||
}
|
||||
public partial interface IStringLocalizerFactory
|
||||
{
|
||||
|
|
@ -24,10 +22,10 @@ namespace Microsoft.Extensions.Localization
|
|||
public LocalizedString(string name, string value) { }
|
||||
public LocalizedString(string name, string value, bool resourceNotFound) { }
|
||||
public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) { }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public static implicit operator string (Microsoft.Extensions.Localization.LocalizedString localizedString) { throw null; }
|
||||
public override string ToString() { throw null; }
|
||||
}
|
||||
|
|
@ -43,7 +41,5 @@ namespace Microsoft.Extensions.Localization
|
|||
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } }
|
||||
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
|
||||
public System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public virtual Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,13 +35,5 @@ namespace Microsoft.Extensions.Localization
|
|||
/// </param>
|
||||
/// <returns>The strings.</returns>
|
||||
IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="IStringLocalizer"/> for a specific <see cref="CultureInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="culture">The <see cref="CultureInfo"/> to use.</param>
|
||||
/// <returns>A culture-specific <see cref="IStringLocalizer"/>.</returns>
|
||||
[Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
IStringLocalizer WithCulture(CultureInfo culture);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,10 +29,6 @@ namespace Microsoft.Extensions.Localization
|
|||
_localizer = factory.Create(typeof(TResourceSource));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public virtual IStringLocalizer WithCulture(CultureInfo culture) => _localizer.WithCulture(culture);
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual LocalizedString this[string name]
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ namespace Microsoft.Extensions.Localization
|
|||
public partial class LocalizationOptions
|
||||
{
|
||||
public LocalizationOptions() { }
|
||||
public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
|
||||
public partial class ResourceLocationAttribute : System.Attribute
|
||||
{
|
||||
public ResourceLocationAttribute(string resourceLocation) { }
|
||||
public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
public partial class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer
|
||||
{
|
||||
|
|
@ -36,8 +36,6 @@ namespace Microsoft.Extensions.Localization
|
|||
public virtual System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
|
||||
protected System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) { throw null; }
|
||||
protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) { throw null; }
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; }
|
||||
}
|
||||
public partial class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory
|
||||
{
|
||||
|
|
@ -52,14 +50,6 @@ namespace Microsoft.Extensions.Localization
|
|||
protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) { throw null; }
|
||||
protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; }
|
||||
}
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public partial class ResourceManagerWithCultureStringLocalizer : Microsoft.Extensions.Localization.ResourceManagerStringLocalizer
|
||||
{
|
||||
public ResourceManagerWithCultureStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, System.Globalization.CultureInfo culture, Microsoft.Extensions.Logging.ILogger logger) : base (default(System.Resources.ResourceManager), default(System.Reflection.Assembly), default(string), default(Microsoft.Extensions.Localization.IResourceNamesCache), default(Microsoft.Extensions.Logging.ILogger)) { }
|
||||
public override Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } }
|
||||
public override Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
|
||||
public override System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
|
||||
}
|
||||
public partial class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache
|
||||
{
|
||||
public ResourceNamesCache() { }
|
||||
|
|
@ -69,7 +59,7 @@ namespace Microsoft.Extensions.Localization
|
|||
public partial class RootNamespaceAttribute : System.Attribute
|
||||
{
|
||||
public RootNamespaceAttribute(string rootNamespace) { }
|
||||
public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Extensions.Localization.Internal
|
||||
|
|
@ -77,7 +67,7 @@ namespace Microsoft.Extensions.Localization.Internal
|
|||
public partial class AssemblyWrapper
|
||||
{
|
||||
public AssemblyWrapper(System.Reflection.Assembly assembly) { }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public virtual string FullName { get { throw null; } }
|
||||
public virtual System.IO.Stream GetManifestResourceStream(string name) { throw null; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ namespace Microsoft.Extensions.Localization
|
|||
public partial class LocalizationOptions
|
||||
{
|
||||
public LocalizationOptions() { }
|
||||
public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public string ResourcesPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
|
||||
public partial class ResourceLocationAttribute : System.Attribute
|
||||
{
|
||||
public ResourceLocationAttribute(string resourceLocation) { }
|
||||
public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string ResourceLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
public partial class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer
|
||||
{
|
||||
|
|
@ -36,8 +36,6 @@ namespace Microsoft.Extensions.Localization
|
|||
public virtual System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
|
||||
protected System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) { throw null; }
|
||||
protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) { throw null; }
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public Microsoft.Extensions.Localization.IStringLocalizer WithCulture(System.Globalization.CultureInfo culture) { throw null; }
|
||||
}
|
||||
public partial class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory
|
||||
{
|
||||
|
|
@ -52,14 +50,6 @@ namespace Microsoft.Extensions.Localization
|
|||
protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) { throw null; }
|
||||
protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; }
|
||||
}
|
||||
[System.ObsoleteAttribute("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public partial class ResourceManagerWithCultureStringLocalizer : Microsoft.Extensions.Localization.ResourceManagerStringLocalizer
|
||||
{
|
||||
public ResourceManagerWithCultureStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, System.Globalization.CultureInfo culture, Microsoft.Extensions.Logging.ILogger logger) : base (default(System.Resources.ResourceManager), default(System.Reflection.Assembly), default(string), default(Microsoft.Extensions.Localization.IResourceNamesCache), default(Microsoft.Extensions.Logging.ILogger)) { }
|
||||
public override Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } }
|
||||
public override Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
|
||||
public override System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
|
||||
}
|
||||
public partial class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache
|
||||
{
|
||||
public ResourceNamesCache() { }
|
||||
|
|
@ -69,7 +59,7 @@ namespace Microsoft.Extensions.Localization
|
|||
public partial class RootNamespaceAttribute : System.Attribute
|
||||
{
|
||||
public RootNamespaceAttribute(string rootNamespace) { }
|
||||
public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Extensions.Localization.Internal
|
||||
|
|
@ -77,7 +67,7 @@ namespace Microsoft.Extensions.Localization.Internal
|
|||
public partial class AssemblyWrapper
|
||||
{
|
||||
public AssemblyWrapper(System.Reflection.Assembly assembly) { }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public virtual string FullName { get { throw null; } }
|
||||
public virtual System.IO.Stream GetManifestResourceStream(string name) { throw null; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,30 +146,6 @@ namespace Microsoft.Extensions.Localization
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ResourceManagerStringLocalizer"/> for a specific <see cref="CultureInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="culture">The <see cref="CultureInfo"/> to use.</param>
|
||||
/// <returns>A culture-specific <see cref="ResourceManagerStringLocalizer"/>.</returns>
|
||||
[Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public IStringLocalizer WithCulture(CultureInfo culture)
|
||||
{
|
||||
return culture == null
|
||||
? new ResourceManagerStringLocalizer(
|
||||
_resourceManager,
|
||||
_resourceStringProvider,
|
||||
_resourceBaseName,
|
||||
_resourceNamesCache,
|
||||
_logger)
|
||||
: new ResourceManagerWithCultureStringLocalizer(
|
||||
_resourceManager,
|
||||
_resourceStringProvider,
|
||||
_resourceBaseName,
|
||||
_resourceNamesCache,
|
||||
culture,
|
||||
_logger);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) =>
|
||||
GetAllStrings(includeParentCultures, CultureInfo.CurrentUICulture);
|
||||
|
|
|
|||
|
|
@ -101,9 +101,8 @@ namespace Microsoft.Extensions.Localization
|
|||
else
|
||||
{
|
||||
// This expectation is defined by dotnet's automatic resource storage.
|
||||
// We have to conform to "{RootNamespace}.{ResourceLocation}.{FullTypeName - AssemblyName}".
|
||||
var assemblyName = new AssemblyName(typeInfo.Assembly.FullName).Name;
|
||||
return baseNamespace + "." + resourcesRelativePath + TrimPrefix(typeInfo.FullName, assemblyName + ".");
|
||||
// We have to conform to "{RootNamespace}.{ResourceLocation}.{FullTypeName - RootNamespace}".
|
||||
return baseNamespace + "." + resourcesRelativePath + TrimPrefix(typeInfo.FullName, baseNamespace + ".");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -267,4 +266,4 @@ namespace Microsoft.Extensions.Localization
|
|||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,165 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using Microsoft.Extensions.Localization.Internal;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Microsoft.Extensions.Localization
|
||||
{
|
||||
/// <summary>
|
||||
/// An <see cref="IStringLocalizer"/> that uses the <see cref="ResourceManager"/> and
|
||||
/// <see cref="ResourceReader"/> to provide localized strings for a specific <see cref="CultureInfo"/>.
|
||||
/// </summary>
|
||||
[Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")]
|
||||
public class ResourceManagerWithCultureStringLocalizer : ResourceManagerStringLocalizer
|
||||
{
|
||||
private readonly string _resourceBaseName;
|
||||
private readonly CultureInfo _culture;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ResourceManagerWithCultureStringLocalizer"/>.
|
||||
/// </summary>
|
||||
/// <param name="resourceManager">The <see cref="ResourceManager"/> to read strings from.</param>
|
||||
/// <param name="resourceStringProvider">The <see cref="IResourceStringProvider"/> that can find the resources.</param>
|
||||
/// <param name="baseName">The base name of the embedded resource that contains the strings.</param>
|
||||
/// <param name="resourceNamesCache">Cache of the list of strings for a given resource assembly name.</param>
|
||||
/// <param name="culture">The specific <see cref="CultureInfo"/> to use.</param>
|
||||
/// <param name="logger">The <see cref="ILogger"/>.</param>
|
||||
internal ResourceManagerWithCultureStringLocalizer(
|
||||
ResourceManager resourceManager,
|
||||
IResourceStringProvider resourceStringProvider,
|
||||
string baseName,
|
||||
IResourceNamesCache resourceNamesCache,
|
||||
CultureInfo culture,
|
||||
ILogger logger)
|
||||
: base(resourceManager, resourceStringProvider, baseName, resourceNamesCache, logger)
|
||||
{
|
||||
if (resourceManager == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(resourceManager));
|
||||
}
|
||||
|
||||
if (resourceStringProvider == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(resourceStringProvider));
|
||||
}
|
||||
|
||||
if (baseName == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(baseName));
|
||||
}
|
||||
|
||||
if (resourceNamesCache == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(resourceNamesCache));
|
||||
}
|
||||
|
||||
if (culture == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(culture));
|
||||
}
|
||||
|
||||
if (logger == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
_resourceBaseName = baseName;
|
||||
_culture = culture;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ResourceManagerWithCultureStringLocalizer"/>.
|
||||
/// </summary>
|
||||
/// <param name="resourceManager">The <see cref="ResourceManager"/> to read strings from.</param>
|
||||
/// <param name="resourceAssembly">The <see cref="Assembly"/> that contains the strings as embedded resources.</param>
|
||||
/// <param name="baseName">The base name of the embedded resource that contains the strings.</param>
|
||||
/// <param name="resourceNamesCache">Cache of the list of strings for a given resource assembly name.</param>
|
||||
/// <param name="culture">The specific <see cref="CultureInfo"/> to use.</param>
|
||||
/// <param name="logger">The <see cref="ILogger"/>.</param>
|
||||
public ResourceManagerWithCultureStringLocalizer(
|
||||
ResourceManager resourceManager,
|
||||
Assembly resourceAssembly,
|
||||
string baseName,
|
||||
IResourceNamesCache resourceNamesCache,
|
||||
CultureInfo culture,
|
||||
ILogger logger)
|
||||
: base(resourceManager, resourceAssembly, baseName, resourceNamesCache, logger)
|
||||
{
|
||||
if (resourceManager == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(resourceManager));
|
||||
}
|
||||
|
||||
if (resourceAssembly == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(resourceAssembly));
|
||||
}
|
||||
|
||||
if (baseName == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(baseName));
|
||||
}
|
||||
|
||||
if (resourceNamesCache == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(resourceNamesCache));
|
||||
}
|
||||
|
||||
if (culture == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(culture));
|
||||
}
|
||||
|
||||
if (logger == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
_resourceBaseName = baseName;
|
||||
_culture = culture;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override LocalizedString this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
}
|
||||
|
||||
var value = GetStringSafely(name, _culture);
|
||||
|
||||
return new LocalizedString(name, value ?? name, resourceNotFound: value == null, searchedLocation: _resourceBaseName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override LocalizedString this[string name, params object[] arguments]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
}
|
||||
|
||||
var format = GetStringSafely(name, _culture);
|
||||
var value = string.Format(_culture, format ?? name, arguments);
|
||||
|
||||
return new LocalizedString(name, value, resourceNotFound: format == null, searchedLocation: _resourceBaseName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) =>
|
||||
GetAllStrings(includeParentCultures, _culture);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
using System.Reflection;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
[assembly: ResourceLocation("Resources")]
|
||||
[assembly: RootNamespace("LocalizationTest.Abc")]
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace LocalizationTest.Abc.Controllers
|
||||
{
|
||||
public class ValuesController
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net472</TargetFrameworks>
|
||||
<RootNamespace>LocalizationTest.Abc</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="NewFolder\**" />
|
||||
<EmbeddedResource Remove="NewFolder\**" />
|
||||
<None Remove="NewFolder\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Extensions.Localization.Abstractions" />
|
||||
<Reference Include="Microsoft.Extensions.Localization" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Testing" />
|
||||
<Reference Include="Microsoft.Extensions.Options" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="ValuesController.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>ValuesController.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="String1" xml:space="preserve">
|
||||
<value>ValFromResource</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// 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 LocalizationTest.Abc.Controllers;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.Extensions.Localization.RootNamespace.Tests
|
||||
{
|
||||
public class StringLocalizerOfTRootNamespaceTest
|
||||
{
|
||||
[Fact]
|
||||
public void RootNamespace()
|
||||
{
|
||||
var locOptions = new LocalizationOptions();
|
||||
var options = new Mock<IOptions<LocalizationOptions>>();
|
||||
options.Setup(o => o.Value).Returns(locOptions);
|
||||
var factory = new ResourceManagerStringLocalizerFactory(options.Object, NullLoggerFactory.Instance);
|
||||
|
||||
var valuesLoc = factory.Create(typeof(ValuesController));
|
||||
Assert.Equal("ValFromResource", valuesLoc["String1"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// This namespace for test resources with alternative RootNamespace
|
||||
namespace MyNamespace
|
||||
{
|
||||
public class Model
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ using System.Reflection;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MyNamespace;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
|
|
@ -132,7 +133,7 @@ namespace Microsoft.Extensions.Localization.Tests
|
|||
var loggerFactory = NullLoggerFactory.Instance;
|
||||
|
||||
var resourcePath = Path.Combine("My", "Resources");
|
||||
var rootNamespace = "MyNamespace";
|
||||
var rootNamespace = nameof(MyNamespace);
|
||||
var rootNamespaceAttribute = new RootNamespaceAttribute(rootNamespace);
|
||||
|
||||
var typeFactory = new TestResourceManagerStringLocalizerFactory(
|
||||
|
|
@ -141,12 +142,13 @@ namespace Microsoft.Extensions.Localization.Tests
|
|||
rootNamespaceAttribute: rootNamespaceAttribute,
|
||||
loggerFactory: loggerFactory);
|
||||
|
||||
var type = typeof(ResourceManagerStringLocalizerFactoryTest);
|
||||
var type = typeof(Model);
|
||||
|
||||
// Act
|
||||
typeFactory.Create(type);
|
||||
|
||||
// Assert
|
||||
Assert.Equal($"Microsoft.Extensions.Localization.Tests.ResourceManagerStringLocalizerFactoryTest", typeFactory.BaseName);
|
||||
Assert.Equal($"{rootNamespace}.{nameof(Model)}", typeFactory.BaseName);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -159,7 +161,7 @@ namespace Microsoft.Extensions.Localization.Tests
|
|||
var loggerFactory = NullLoggerFactory.Instance;
|
||||
|
||||
var resourcePath = Path.Combine("My", "Resources");
|
||||
var rootNamespace = "MyNamespace";
|
||||
var rootNamespace = nameof(MyNamespace);
|
||||
var resourceLocationAttribute = new ResourceLocationAttribute(resourcePath);
|
||||
var rootNamespaceAttribute = new RootNamespaceAttribute(rootNamespace);
|
||||
|
||||
|
|
@ -169,12 +171,13 @@ namespace Microsoft.Extensions.Localization.Tests
|
|||
rootNamespaceAttribute,
|
||||
loggerFactory);
|
||||
|
||||
var type = typeof(ResourceManagerStringLocalizerFactoryTest);
|
||||
var type = typeof(Model);
|
||||
|
||||
// Act
|
||||
typeFactory.Create(type);
|
||||
|
||||
// Assert
|
||||
Assert.Equal($"MyNamespace.My.Resources.ResourceManagerStringLocalizerFactoryTest", typeFactory.BaseName);
|
||||
Assert.Equal($"{rootNamespace}.My.Resources.{nameof(Model)}", typeFactory.BaseName);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -33,28 +33,6 @@ namespace Microsoft.Extensions.Localization
|
|||
factory.Verify(mock => mock.Create(typeof(object)), Times.Once());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WithCulture_InvokesWithCultureFromInnerLocalizer()
|
||||
{
|
||||
// Arrange
|
||||
var factory = new Mock<IStringLocalizerFactory>();
|
||||
var innerLocalizer = new Mock<IStringLocalizer>();
|
||||
factory.Setup(mock => mock.Create(typeof(object)))
|
||||
.Returns(innerLocalizer.Object);
|
||||
|
||||
var localizer = new StringLocalizer<object>(factory.Object);
|
||||
|
||||
// Act
|
||||
#pragma warning disable CS0618
|
||||
localizer.WithCulture(CultureInfo.GetCultureInfo("fr-FR"));
|
||||
#pragma warning restore CS0618
|
||||
|
||||
// Assert
|
||||
#pragma warning disable CS0618
|
||||
innerLocalizer.Verify(mock => mock.WithCulture(CultureInfo.GetCultureInfo("fr-FR")), Times.Once());
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Indexer_ThrowsAnExceptionForNullName()
|
||||
{
|
||||
|
|
@ -3,4 +3,4 @@ Localization
|
|||
|
||||
These projects provide abstractions for localizing resources in .NET applications.
|
||||
|
||||
The ASP.NET Core implementation of localization can be found in https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/Localization.
|
||||
The ASP.NET Core implementation of localization can be found in https://github.com/dotnet/aspnetcore/tree/master/src/Middleware/Localization.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Microsoft.Extensions.ObjectPool
|
|||
public partial class DefaultObjectPoolProvider : Microsoft.Extensions.ObjectPool.ObjectPoolProvider
|
||||
{
|
||||
public DefaultObjectPoolProvider() { }
|
||||
public int MaximumRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public int MaximumRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public override Microsoft.Extensions.ObjectPool.ObjectPool<T> Create<T>(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<T> policy) { throw null; }
|
||||
}
|
||||
public partial class DefaultObjectPool<T> : Microsoft.Extensions.ObjectPool.ObjectPool<T> where T : class
|
||||
|
|
@ -68,8 +68,8 @@ namespace Microsoft.Extensions.ObjectPool
|
|||
public partial class StringBuilderPooledObjectPolicy : Microsoft.Extensions.ObjectPool.PooledObjectPolicy<System.Text.StringBuilder>
|
||||
{
|
||||
public StringBuilderPooledObjectPolicy() { }
|
||||
public int InitialCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public int MaximumRetainedCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public int InitialCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public int MaximumRetainedCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public override System.Text.StringBuilder Create() { throw null; }
|
||||
public override bool Return(System.Text.StringBuilder obj) { throw null; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace Microsoft.Extensions.ObjectPool
|
||||
|
|
@ -19,7 +19,7 @@ namespace Microsoft.Extensions.ObjectPool
|
|||
/// Runs some processing when an object was returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to return to the pool.</param>
|
||||
/// <returns><code>true</code> if the object should be returned to the pool. <code>false</code> if it's not possible/desirable for the pool to keep the object.</returns>
|
||||
/// <returns><see langword="true" /> if the object should be returned to the pool. <see langword="false" /> if it's not possible/desirable for the pool to keep the object.</returns>
|
||||
bool Return(T obj);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ namespace BenchmarkDotNet.Attributes
|
|||
.With(CsProjCoreToolchain.From(new NetCoreAppSettings("netcoreapp3.0", null, ".NET Core 3.0")))
|
||||
#elif NETCOREAPP3_1
|
||||
.With(CsProjCoreToolchain.From(new NetCoreAppSettings("netcoreapp3.1", null, ".NET Core 3.1")))
|
||||
#elif NETCOREAPP5_0
|
||||
.With(CsProjCoreToolchain.From(new NetCoreAppSettings("netcoreapp5.0", null, ".NET Core 5.0")))
|
||||
#else
|
||||
#error Target frameworks need to be updated.
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -26,10 +26,13 @@ namespace Microsoft.Extensions.CommandLineUtils
|
|||
// options.
|
||||
private readonly bool _continueAfterUnexpectedArg;
|
||||
|
||||
public CommandLineApplication(bool throwOnUnexpectedArg = true, bool continueAfterUnexpectedArg = false)
|
||||
private readonly bool _treatUnmatchedOptionsAsArguments;
|
||||
|
||||
public CommandLineApplication(bool throwOnUnexpectedArg = true, bool continueAfterUnexpectedArg = false, bool treatUnmatchedOptionsAsArguments = false)
|
||||
{
|
||||
_throwOnUnexpectedArg = throwOnUnexpectedArg;
|
||||
_continueAfterUnexpectedArg = continueAfterUnexpectedArg;
|
||||
_treatUnmatchedOptionsAsArguments = treatUnmatchedOptionsAsArguments;
|
||||
Options = new List<CommandOption>();
|
||||
Arguments = new List<CommandArgument>();
|
||||
Commands = new List<CommandLineApplication>();
|
||||
|
|
@ -136,6 +139,7 @@ namespace Microsoft.Extensions.CommandLineUtils
|
|||
CommandLineApplication command = this;
|
||||
CommandOption option = null;
|
||||
IEnumerator<CommandArgument> arguments = null;
|
||||
var argumentsAssigned = false;
|
||||
|
||||
for (var index = 0; index < args.Length; index++)
|
||||
{
|
||||
|
|
@ -161,6 +165,25 @@ namespace Microsoft.Extensions.CommandLineUtils
|
|||
var longOptionName = longOption[0];
|
||||
option = command.GetOptions().SingleOrDefault(opt => string.Equals(opt.LongName, longOptionName, StringComparison.Ordinal));
|
||||
|
||||
if (option == null && _treatUnmatchedOptionsAsArguments)
|
||||
{
|
||||
if (arguments == null)
|
||||
{
|
||||
arguments = new CommandArgumentEnumerator(command.Arguments.GetEnumerator());
|
||||
}
|
||||
if (arguments.MoveNext())
|
||||
{
|
||||
processed = true;
|
||||
arguments.Current.Values.Add(arg);
|
||||
argumentsAssigned = true;
|
||||
continue;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// argumentsAssigned = false;
|
||||
//}
|
||||
}
|
||||
|
||||
if (option == null)
|
||||
{
|
||||
var ignoreContinueAfterUnexpectedArg = false;
|
||||
|
|
@ -221,6 +244,25 @@ namespace Microsoft.Extensions.CommandLineUtils
|
|||
processed = true;
|
||||
option = command.GetOptions().SingleOrDefault(opt => string.Equals(opt.ShortName, shortOption[0], StringComparison.Ordinal));
|
||||
|
||||
if (option == null && _treatUnmatchedOptionsAsArguments)
|
||||
{
|
||||
if (arguments == null)
|
||||
{
|
||||
arguments = new CommandArgumentEnumerator(command.Arguments.GetEnumerator());
|
||||
}
|
||||
if (arguments.MoveNext())
|
||||
{
|
||||
processed = true;
|
||||
arguments.Current.Values.Add(arg);
|
||||
argumentsAssigned = true;
|
||||
continue;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// argumentsAssigned = false;
|
||||
//}
|
||||
}
|
||||
|
||||
// If not a short option, try symbol option
|
||||
if (option == null)
|
||||
{
|
||||
|
|
@ -278,7 +320,7 @@ namespace Microsoft.Extensions.CommandLineUtils
|
|||
option = null;
|
||||
}
|
||||
|
||||
if (!processed && arguments == null)
|
||||
if (!processed && !argumentsAssigned)
|
||||
{
|
||||
var currentCommand = command;
|
||||
foreach (var subcommand in command.Commands)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Microsoft.Extensions.Internal
|
||||
{
|
||||
internal class TypeNameHelper
|
||||
internal static class TypeNameHelper
|
||||
{
|
||||
private const char DefaultNestedTypeDelimiter = '+';
|
||||
|
||||
|
|
|
|||
|
|
@ -1166,5 +1166,59 @@ Examples:
|
|||
|
||||
Assert.Equal($"Unrecognized option '{inputOption}'", exception.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TreatUnmatchedOptionsAsArguments()
|
||||
{
|
||||
CommandArgument first = null;
|
||||
CommandArgument second = null;
|
||||
|
||||
CommandOption firstOption = null;
|
||||
CommandOption secondOption = null;
|
||||
|
||||
var firstUnmatchedOption = "-firstUnmatchedOption";
|
||||
var firstActualOption = "-firstActualOption";
|
||||
var seconUnmatchedOption = "--secondUnmatchedOption";
|
||||
var secondActualOption = "--secondActualOption";
|
||||
|
||||
var app = new CommandLineApplication(treatUnmatchedOptionsAsArguments: true);
|
||||
|
||||
app.Command("test", c =>
|
||||
{
|
||||
firstOption = c.Option("-firstActualOption", "first option", CommandOptionType.NoValue);
|
||||
secondOption = c.Option("--secondActualOption", "second option", CommandOptionType.NoValue);
|
||||
|
||||
first = c.Argument("first", "First argument");
|
||||
second = c.Argument("second", "Second argument");
|
||||
c.OnExecute(() => 0);
|
||||
});
|
||||
|
||||
app.Execute("test", firstUnmatchedOption, firstActualOption, seconUnmatchedOption, secondActualOption);
|
||||
|
||||
Assert.Equal(firstUnmatchedOption, first.Value);
|
||||
Assert.Equal(seconUnmatchedOption, second.Value);
|
||||
|
||||
Assert.Equal(firstActualOption, firstOption.Template);
|
||||
Assert.Equal(secondActualOption, secondOption.Template);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ThrowExceptionWhenUnmatchedOptionAndTreatUnmatchedOptionsAsArgumentsIsFalse()
|
||||
{
|
||||
CommandArgument first = null;
|
||||
|
||||
var firstOption = "-firstUnmatchedOption";
|
||||
|
||||
var app = new CommandLineApplication(treatUnmatchedOptionsAsArguments: false);
|
||||
app.Command("test", c =>
|
||||
{
|
||||
first = c.Argument("first", "First argument");
|
||||
c.OnExecute(() => 0);
|
||||
});
|
||||
|
||||
var exception = Assert.Throws<CommandParsingException>(() => app.Execute("test", firstOption));
|
||||
|
||||
Assert.Equal($"Unrecognized option '{firstOption}'", exception.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,12 @@ namespace Microsoft.AspNetCore.Testing
|
|||
return Path.Combine(baseDirectory, assembly.GetName().Name, attribute.TargetFramework);
|
||||
}
|
||||
|
||||
public static bool GetPreserveExistingLogsInOutput(Assembly assembly)
|
||||
{
|
||||
var attribute = assembly.GetCustomAttributes().OfType<TestOutputDirectoryAttribute>().FirstOrDefault();
|
||||
return attribute.PreserveExistingLogsInOutput;
|
||||
}
|
||||
|
||||
public static string GetTestClassName(Type type)
|
||||
{
|
||||
var shortNameAttribute =
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@ namespace Microsoft.AspNetCore.Testing
|
|||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = true)]
|
||||
public class TestOutputDirectoryAttribute : Attribute
|
||||
{
|
||||
public TestOutputDirectoryAttribute(string targetFramework, string baseDirectory = null)
|
||||
public TestOutputDirectoryAttribute(string preserveExistingLogsInOutput, string targetFramework, string baseDirectory = null)
|
||||
{
|
||||
TargetFramework = targetFramework;
|
||||
BaseDirectory = baseDirectory;
|
||||
PreserveExistingLogsInOutput = bool.Parse(preserveExistingLogsInOutput);
|
||||
}
|
||||
|
||||
public string BaseDirectory { get; }
|
||||
public string TargetFramework { get; }
|
||||
public bool PreserveExistingLogsInOutput { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System.IO;
|
|||
|
||||
namespace Microsoft.AspNetCore.Testing
|
||||
{
|
||||
[Obsolete("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")]
|
||||
[Obsolete("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/dotnet/extensions/issues/1697 for details.")]
|
||||
public class TestPathUtilities
|
||||
{
|
||||
public static string GetRepoRootDirectory()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Testing
|
|||
/// properties. Once these traits are applied, build scripts can include/exclude tests based on them.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// All flakiness-related traits start with <code>Flaky:</code> and are grouped first by the process running the tests: Azure Pipelines (AzP) or Helix.
|
||||
/// All flakiness-related traits start with <c>Flaky:</c> and are grouped first by the process running the tests: Azure Pipelines (AzP) or Helix.
|
||||
/// Then there is a segment specifying the "selector" which indicates where the test is flaky. Finally a segment specifying the value of that selector.
|
||||
/// The value of these traits is always either "true" or the trait is not present. We encode the entire selector in the name of the trait because xUnit.net only
|
||||
/// provides "==" and "!=" operators for traits, there is no way to check if a trait "contains" or "does not contain" a value. VSTest does support "contains" checks
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.AspNetCore.Testing
|
||||
{
|
||||
/// <summary>
|
||||
/// Skips a test if the OS is the given type (Windows) and the OS version is greater than specified.
|
||||
/// E.g. Specifying Window 8 skips on Win 10, but not on Linux. Combine with OSSkipConditionAttribute as needed.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)]
|
||||
public class MaximumOSVersionAttribute : Attribute, ITestCondition
|
||||
{
|
||||
private readonly OperatingSystems _targetOS;
|
||||
private readonly Version _maxVersion;
|
||||
private readonly OperatingSystems _currentOS;
|
||||
private readonly Version _currentVersion;
|
||||
private readonly bool _skip;
|
||||
|
||||
public MaximumOSVersionAttribute(OperatingSystems operatingSystem, string maxVersion) :
|
||||
this(operatingSystem, Version.Parse(maxVersion), GetCurrentOS(), GetCurrentOSVersion())
|
||||
{
|
||||
}
|
||||
|
||||
// to enable unit testing
|
||||
internal MaximumOSVersionAttribute(OperatingSystems targetOS, Version maxVersion, OperatingSystems currentOS, Version currentVersion)
|
||||
{
|
||||
if (targetOS != OperatingSystems.Windows)
|
||||
{
|
||||
throw new NotImplementedException("Max version support is only implemented for Windows.");
|
||||
}
|
||||
_targetOS = targetOS;
|
||||
_maxVersion = maxVersion;
|
||||
_currentOS = currentOS;
|
||||
// We drop the 4th field because it is not significant and it messes up the comparisons.
|
||||
_currentVersion = new Version(currentVersion.Major, currentVersion.Minor,
|
||||
// Major and Minor are required by the parser, but if Build isn't specified then it returns -1
|
||||
// which the constructor rejects.
|
||||
currentVersion.Build == -1 ? 0 : currentVersion.Build);
|
||||
|
||||
// Do not skip other OS's, Use OSSkipConditionAttribute or a separate MaximumOsVersionAttribute for that.
|
||||
_skip = _targetOS == _currentOS && _maxVersion < _currentVersion;
|
||||
SkipReason = $"This test requires {_targetOS} {_maxVersion} or earlier.";
|
||||
}
|
||||
|
||||
// Since a test would be executed only if 'IsMet' is true, return false if we want to skip
|
||||
public bool IsMet => !_skip;
|
||||
|
||||
public string SkipReason { get; set; }
|
||||
|
||||
private static OperatingSystems GetCurrentOS()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return OperatingSystems.Windows;
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
return OperatingSystems.Linux;
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
return OperatingSystems.MacOSX;
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
static private Version GetCurrentOSVersion()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return Environment.OSVersion.Version;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not implemented, but this will still be called before the OS check happens so don't throw.
|
||||
return new Version(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.AspNetCore.Testing
|
||||
|
|
@ -12,46 +10,31 @@ namespace Microsoft.AspNetCore.Testing
|
|||
public class OSSkipConditionAttribute : Attribute, ITestCondition
|
||||
{
|
||||
private readonly OperatingSystems _excludedOperatingSystem;
|
||||
private readonly IEnumerable<string> _excludedVersions;
|
||||
private readonly OperatingSystems _osPlatform;
|
||||
private readonly string _osVersion;
|
||||
|
||||
public OSSkipConditionAttribute(OperatingSystems operatingSystem, params string[] versions) :
|
||||
this(
|
||||
operatingSystem,
|
||||
GetCurrentOS(),
|
||||
GetCurrentOSVersion(),
|
||||
versions)
|
||||
public OSSkipConditionAttribute(OperatingSystems operatingSystem) :
|
||||
this(operatingSystem, GetCurrentOS())
|
||||
{
|
||||
}
|
||||
|
||||
[Obsolete("Use the Minimum/MaximumOSVersionAttribute for version checks.", error: true)]
|
||||
public OSSkipConditionAttribute(OperatingSystems operatingSystem, params string[] versions) :
|
||||
this(operatingSystem, GetCurrentOS())
|
||||
{
|
||||
}
|
||||
|
||||
// to enable unit testing
|
||||
internal OSSkipConditionAttribute(
|
||||
OperatingSystems operatingSystem, OperatingSystems osPlatform, string osVersion, params string[] versions)
|
||||
internal OSSkipConditionAttribute(OperatingSystems operatingSystem, OperatingSystems osPlatform)
|
||||
{
|
||||
_excludedOperatingSystem = operatingSystem;
|
||||
_excludedVersions = versions ?? Enumerable.Empty<string>();
|
||||
_osPlatform = osPlatform;
|
||||
_osVersion = osVersion;
|
||||
}
|
||||
|
||||
public bool IsMet
|
||||
{
|
||||
get
|
||||
{
|
||||
var currentOSInfo = new OSInfo()
|
||||
{
|
||||
OperatingSystem = _osPlatform,
|
||||
Version = _osVersion,
|
||||
};
|
||||
|
||||
var skip = (_excludedOperatingSystem & currentOSInfo.OperatingSystem) == currentOSInfo.OperatingSystem;
|
||||
if (_excludedVersions.Any())
|
||||
{
|
||||
skip = skip
|
||||
&& _excludedVersions.Any(ex => _osVersion.StartsWith(ex, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
var skip = (_excludedOperatingSystem & _osPlatform) == _osPlatform;
|
||||
// Since a test would be excuted only if 'IsMet' is true, return false if we want to skip
|
||||
return !skip;
|
||||
}
|
||||
|
|
@ -75,25 +58,5 @@ namespace Microsoft.AspNetCore.Testing
|
|||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
static private string GetCurrentOSVersion()
|
||||
{
|
||||
// currently not used on other OS's
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return Environment.OSVersion.Version.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
private class OSInfo
|
||||
{
|
||||
public OperatingSystems OperatingSystem { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// 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;
|
||||
|
||||
namespace Microsoft.AspNetCore.Testing
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -10,6 +12,7 @@ namespace Microsoft.AspNetCore.Testing
|
|||
{
|
||||
public const string Win7 = "6.1";
|
||||
|
||||
[Obsolete("Use Win7 instead.", error: true)]
|
||||
public const string Win2008R2 = Win7;
|
||||
|
||||
public const string Win8 = "6.2";
|
||||
|
|
@ -23,14 +26,24 @@ namespace Microsoft.AspNetCore.Testing
|
|||
/// </summary>
|
||||
public const string Win10_RS4 = "10.0.17134";
|
||||
|
||||
/// <summary>
|
||||
/// 1809, RS5, 17763
|
||||
/// </summary>
|
||||
public const string Win10_RS5 = "10.0.17763";
|
||||
|
||||
/// <summary>
|
||||
/// 1903, 19H1, 18362
|
||||
/// </summary>
|
||||
public const string Win10_19H1 = "10.0.18362";
|
||||
|
||||
/// <summary>
|
||||
/// 1909, 19H2, 18363
|
||||
/// </summary>
|
||||
public const string Win10_19H2 = "10.0.18363";
|
||||
|
||||
/// <summary>
|
||||
/// _, 20H2, 18990
|
||||
/// 2004, 20H1, 19033
|
||||
/// </summary>
|
||||
public const string Win10_20H1 = "10.0.18990";
|
||||
public const string Win10_20H1 = "10.0.19033";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Testing
|
||||
{
|
||||
public class MaximumOSVersionAttributeTest
|
||||
{
|
||||
[Fact]
|
||||
public void Linux_ThrowsNotImplemeneted()
|
||||
{
|
||||
Assert.Throws<NotImplementedException>(() => new MaximumOSVersionAttribute(OperatingSystems.Linux, "2.5"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Mac_ThrowsNotImplemeneted()
|
||||
{
|
||||
Assert.Throws<NotImplementedException>(() => new MaximumOSVersionAttribute(OperatingSystems.MacOSX, "2.5"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WindowsOrLinux_ThrowsNotImplemeneted()
|
||||
{
|
||||
Assert.Throws<NotImplementedException>(() => new MaximumOSVersionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, "2.5"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoesNotSkip_ShortVersions()
|
||||
{
|
||||
var osSkipAttribute = new MaximumOSVersionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.5"),
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.0"));
|
||||
|
||||
Assert.True(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoesNotSkip_EarlierVersions()
|
||||
{
|
||||
var osSkipAttribute = new MaximumOSVersionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.5.9"),
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.0.10.12"));
|
||||
|
||||
Assert.True(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoesNotSkip_SameVersion()
|
||||
{
|
||||
var osSkipAttribute = new MaximumOSVersionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.5.10"),
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.5.10.12"));
|
||||
|
||||
Assert.True(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Skip_LaterVersion()
|
||||
{
|
||||
var osSkipAttribute = new MaximumOSVersionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.5.11"),
|
||||
OperatingSystems.Windows,
|
||||
new Version("3.0.10.12"));
|
||||
|
||||
Assert.False(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoesNotSkip_WhenOnlyVersionsMatch()
|
||||
{
|
||||
var osSkipAttribute = new MaximumOSVersionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
new Version("2.5.10.12"),
|
||||
OperatingSystems.Linux,
|
||||
new Version("2.5.10.12"));
|
||||
|
||||
Assert.True(osSkipAttribute.IsMet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Testing
|
||||
{
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public class MaximumOSVersionTest
|
||||
{
|
||||
[ConditionalFact]
|
||||
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
|
||||
public void RunTest_Win7DoesRunOnWin7()
|
||||
{
|
||||
Assert.True(
|
||||
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
|
||||
Environment.OSVersion.Version.ToString().StartsWith("6.1"),
|
||||
"Test should only be running on Win7 or Win2008R2.");
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
|
||||
[InlineData(1)]
|
||||
public void RunTheory_Win7DoesRunOnWin7(int arg)
|
||||
{
|
||||
Assert.True(
|
||||
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
|
||||
Environment.OSVersion.Version.ToString().StartsWith("6.1"),
|
||||
"Test should only be running on Win7 or Win2008R2.");
|
||||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_RS4)]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public void RunTest_Win10_RS4()
|
||||
{
|
||||
Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
|
||||
var versionKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
|
||||
Assert.NotNull(versionKey);
|
||||
var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber");
|
||||
Assert.NotNull(currentVersion);
|
||||
Assert.True(17134 >= int.Parse(currentVersion));
|
||||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_19H2)]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public void RunTest_Win10_19H2()
|
||||
{
|
||||
Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
|
||||
var versionKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
|
||||
Assert.NotNull(versionKey);
|
||||
var currentVersion = (string)versionKey.GetValue("CurrentBuildNumber");
|
||||
Assert.NotNull(currentVersion);
|
||||
Assert.True(18363 >= int.Parse(currentVersion));
|
||||
}
|
||||
}
|
||||
|
||||
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public class OSMaxVersionClassTest
|
||||
{
|
||||
[ConditionalFact]
|
||||
public void TestSkipClass_Win7DoesRunOnWin7()
|
||||
{
|
||||
Assert.True(
|
||||
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
|
||||
Environment.OSVersion.Version.ToString().StartsWith("6.1"),
|
||||
"Test should only be running on Win7 or Win2008R2.");
|
||||
}
|
||||
}
|
||||
|
||||
// Let this one run cross plat just to check the constructor logic.
|
||||
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
|
||||
public class OSMaxVersionCrossPlatTest
|
||||
{
|
||||
[ConditionalFact]
|
||||
public void TestSkipClass_Win7DoesRunOnWin7()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
Assert.True(Environment.OSVersion.Version.ToString().StartsWith("6.1"),
|
||||
"Test should only be running on Win7 or Win2008R2.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,13 +10,12 @@ namespace Microsoft.AspNetCore.Testing
|
|||
public class OSSkipConditionAttributeTest
|
||||
{
|
||||
[Fact]
|
||||
public void Skips_WhenOnlyOperatingSystemIsSupplied()
|
||||
public void Skips_WhenOperatingSystemMatches()
|
||||
{
|
||||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
OperatingSystems.Windows,
|
||||
"2.5");
|
||||
OperatingSystems.Windows);
|
||||
|
||||
// Assert
|
||||
Assert.False(osSkipAttribute.IsMet);
|
||||
|
|
@ -28,77 +27,18 @@ namespace Microsoft.AspNetCore.Testing
|
|||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(
|
||||
OperatingSystems.Linux,
|
||||
OperatingSystems.Windows,
|
||||
"2.5");
|
||||
OperatingSystems.Windows);
|
||||
|
||||
// Assert
|
||||
Assert.True(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoesNotSkip_WhenVersionsDoNotMatch()
|
||||
{
|
||||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
OperatingSystems.Windows,
|
||||
"2.5",
|
||||
"10.0");
|
||||
|
||||
// Assert
|
||||
Assert.True(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoesNotSkip_WhenOnlyVersionsMatch()
|
||||
{
|
||||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(
|
||||
OperatingSystems.Linux,
|
||||
OperatingSystems.Windows,
|
||||
"2.5",
|
||||
"2.5");
|
||||
|
||||
// Assert
|
||||
Assert.True(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("2.5", "2.5")]
|
||||
[InlineData("blue", "Blue")]
|
||||
public void Skips_WhenVersionsMatches(string currentOSVersion, string skipVersion)
|
||||
{
|
||||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
OperatingSystems.Windows,
|
||||
currentOSVersion,
|
||||
skipVersion);
|
||||
|
||||
// Assert
|
||||
Assert.False(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Skips_WhenVersionsMatchesOutOfMultiple()
|
||||
{
|
||||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(
|
||||
OperatingSystems.Windows,
|
||||
OperatingSystems.Windows,
|
||||
"2.5",
|
||||
"10.0", "3.4", "2.5");
|
||||
|
||||
// Assert
|
||||
Assert.False(osSkipAttribute.IsMet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Skips_BothMacOSXAndLinux()
|
||||
{
|
||||
// Act
|
||||
var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.Linux, string.Empty);
|
||||
var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.MacOSX, string.Empty);
|
||||
var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.Linux);
|
||||
var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.MacOSX, OperatingSystems.MacOSX);
|
||||
|
||||
// Assert
|
||||
Assert.False(osSkipAttributeLinux.IsMet);
|
||||
|
|
@ -109,8 +49,8 @@ namespace Microsoft.AspNetCore.Testing
|
|||
public void Skips_BothMacOSXAndWindows()
|
||||
{
|
||||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.Windows, string.Empty);
|
||||
var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.MacOSX, string.Empty);
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.Windows);
|
||||
var osSkipAttributeMacOSX = new OSSkipConditionAttribute(OperatingSystems.Windows | OperatingSystems.MacOSX, OperatingSystems.MacOSX);
|
||||
|
||||
// Assert
|
||||
Assert.False(osSkipAttribute.IsMet);
|
||||
|
|
@ -121,8 +61,8 @@ namespace Microsoft.AspNetCore.Testing
|
|||
public void Skips_BothWindowsAndLinux()
|
||||
{
|
||||
// Act
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Windows, string.Empty);
|
||||
var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Linux, string.Empty);
|
||||
var osSkipAttribute = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Windows);
|
||||
var osSkipAttributeLinux = new OSSkipConditionAttribute(OperatingSystems.Linux | OperatingSystems.Windows, OperatingSystems.Linux);
|
||||
|
||||
// Assert
|
||||
Assert.False(osSkipAttribute.IsMet);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Xunit;
|
||||
|
||||
|
|
@ -27,16 +26,6 @@ namespace Microsoft.AspNetCore.Testing
|
|||
"Test should not be running on MacOSX.");
|
||||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, WindowsVersions.Win2008R2)]
|
||||
public void RunTest_DoesNotRunOnWin7OrWin2008R2()
|
||||
{
|
||||
Assert.False(
|
||||
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
|
||||
Environment.OSVersion.Version.ToString().StartsWith("6.1"),
|
||||
"Test should not be running on Win7 or Win2008R2.");
|
||||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Windows)]
|
||||
public void TestSkipWindows()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Testing
|
|||
{
|
||||
public class TestPathUtilitiesTest
|
||||
{
|
||||
// Entire test pending removal - see https://github.com/aspnet/Extensions/issues/1697
|
||||
// Entire test pending removal - see https://github.com/dotnet/extensions/issues/1697
|
||||
#pragma warning disable 0618
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.Extensions.WebEncoders
|
|||
public sealed partial class WebEncoderOptions
|
||||
{
|
||||
public WebEncoderOptions() { }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Extensions.WebEncoders.Testing
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.Extensions.WebEncoders
|
|||
public sealed partial class WebEncoderOptions
|
||||
{
|
||||
public WebEncoderOptions() { }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Extensions.WebEncoders.Testing
|
||||
|
|
|
|||
Loading…
Reference in New Issue