Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API diff between .NET 9 Preview 6 and .NET 9 Preview 7 #9450

Merged
merged 5 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# API Difference 9.0-preview6 vs 9.0-preview7

API listing follows standard diff formatting.
Lines preceded by a '+' are additions and a '-' indicates removal.

* [Microsoft.AspNetCore.Builder](9.0-preview7_Microsoft.AspNetCore.Builder.md)
* [Microsoft.AspNetCore.Components.Authorization](9.0-preview7_Microsoft.AspNetCore.Components.Authorization.md)
* [Microsoft.AspNetCore.DataProtection.KeyManagement](9.0-preview7_Microsoft.AspNetCore.DataProtection.KeyManagement.md)
* [Microsoft.AspNetCore.DataProtection.Repositories](9.0-preview7_Microsoft.AspNetCore.DataProtection.Repositories.md)
* [Microsoft.AspNetCore.Http](9.0-preview7_Microsoft.AspNetCore.Http.md)
* [Microsoft.AspNetCore.Http.Features](9.0-preview7_Microsoft.AspNetCore.Http.Features.md)
* [Microsoft.AspNetCore.Http.Metadata](9.0-preview7_Microsoft.AspNetCore.Http.Metadata.md)
* [Microsoft.AspNetCore.Http.Timeouts](9.0-preview7_Microsoft.AspNetCore.Http.Timeouts.md)
* [Microsoft.AspNetCore.Mvc.ApiExplorer](9.0-preview7_Microsoft.AspNetCore.Mvc.ApiExplorer.md)
* [Microsoft.AspNetCore.Mvc.ModelBinding](9.0-preview7_Microsoft.AspNetCore.Mvc.ModelBinding.md)
* [Microsoft.AspNetCore.Server.Kestrel](9.0-preview7_Microsoft.AspNetCore.Server.Kestrel.md)
* [Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes](9.0-preview7_Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.md)
* [Microsoft.Extensions.Caching.Distributed](9.0-preview7_Microsoft.Extensions.Caching.Distributed.md)
* [Microsoft.Extensions.Caching.Hybrid](9.0-preview7_Microsoft.Extensions.Caching.Hybrid.md)
* [Microsoft.Extensions.DependencyInjection](9.0-preview7_Microsoft.Extensions.DependencyInjection.md)
* [Microsoft.Extensions.Logging.Abstractions](9.0-preview7_Microsoft.Extensions.Logging.Abstractions.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Microsoft.AspNetCore.Builder

``` diff
namespace Microsoft.AspNetCore.Builder {
public class ExceptionHandlerOptions {
+ public Func<Exception, int>? StatusCodeSelector { get; set; }
}
+ public static class HttpMetricsEndpointConventionBuilderExtensions {
+ public static TBuilder DisableHttpMetrics<TBuilder>(this TBuilder builder) where TBuilder : IEndpointConventionBuilder;
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Microsoft.AspNetCore.Components.Authorization

``` diff
namespace Microsoft.AspNetCore.Components.Authorization {
public class AuthenticationStateData {
- public IList<KeyValuePair<string, string>> Claims { get; set; }
+ public IList<ClaimData> Claims { get; set; }
}
+ public readonly struct ClaimData {
+ public ClaimData(Claim claim);
+ [JsonConstructorAttribute]
+ public ClaimData(string type, string value);
+ public string Type { get; }
+ public string Value { get; }
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Microsoft.AspNetCore.DataProtection.KeyManagement

``` diff
namespace Microsoft.AspNetCore.DataProtection.KeyManagement {
+ public interface IDeletableKeyManager : IKeyManager {
+ bool CanDeleteKeys { get; }
+ bool DeleteKeys(Func<IKey, bool> shouldDelete);
+ }
public sealed class XmlKeyManager : IInternalXmlKeyManager, IKeyManager {
+ public bool CanDeleteKeys { get; }
+ public bool DeleteKeys(Func<IKey, bool> shouldDelete);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Microsoft.AspNetCore.DataProtection.Repositories

``` diff
namespace Microsoft.AspNetCore.DataProtection.Repositories {
- public class FileSystemXmlRepository : IXmlRepository {
+ public class FileSystemXmlRepository : IDeletableXmlRepository, IXmlRepository {
+ public virtual bool DeleteElements(Action<IReadOnlyCollection<IDeletableElement>> chooseElements);
}
+ public interface IDeletableElement {
+ int? DeletionOrder { get; set; }
+ XElement Element { get; }
+ }
+ public interface IDeletableXmlRepository : IXmlRepository {
+ bool DeleteElements(Action<IReadOnlyCollection<IDeletableElement>> chooseElements);
+ }
- [SupportedOSPlatformAttribute("windows")]
- public class RegistryXmlRepository : IXmlRepository {
+ [SupportedOSPlatformAttribute("windows")]
+ public class RegistryXmlRepository : IDeletableXmlRepository, IXmlRepository {
+ public virtual bool DeleteElements(Action<IReadOnlyCollection<IDeletableElement>> chooseElements);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Microsoft.AspNetCore.Http.Features

``` diff
namespace Microsoft.AspNetCore.Http.Features {
public interface IHttpMetricsTagsFeature {
+ bool MetricsDisabled { get; set; }
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Microsoft.AspNetCore.Http.Metadata

``` diff
namespace Microsoft.AspNetCore.Http.Metadata {
+ public interface IDisableHttpMetricsMetadata
+ public interface IParameterBindingMetadata {
+ bool HasBindAsync { get; }
+ bool HasTryParse { get; }
+ bool IsOptional { get; }
+ string Name { get; }
+ ParameterInfo ParameterInfo { get; }
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Microsoft.AspNetCore.Http.Timeouts

``` diff
namespace Microsoft.AspNetCore.Http.Timeouts {
- [AttributeUsageAttribute(68)]
- public sealed class DisableRequestTimeoutAttribute : Attribute {
+ [AttributeUsageAttribute(68)]
+ [DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed class DisableRequestTimeoutAttribute : Attribute {
+ public override string ToString();
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Microsoft.AspNetCore.Http

``` diff
namespace Microsoft.AspNetCore.Http {
+ [AttributeUsageAttribute(68)]
+ [DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed class DisableHttpMetricsAttribute : Attribute, IDisableHttpMetricsMetadata {
+ public DisableHttpMetricsAttribute();
+ public override string ToString();
+ }
public class HttpValidationProblemDetails : ProblemDetails {
+ public HttpValidationProblemDetails(IEnumerable<KeyValuePair<string, string[]>> errors);
}
public static class OpenApiRouteHandlerBuilderExtensions {
+ public static TBuilder ProducesProblem<TBuilder>(this TBuilder builder, int statusCode, string? contentType = null) where TBuilder : IEndpointConventionBuilder;
+ public static TBuilder ProducesValidationProblem<TBuilder>(this TBuilder builder, int statusCode = 400, string? contentType = null) where TBuilder : IEndpointConventionBuilder;
}
public static class Results {
- public static IResult Problem(string detail = null, string instance = null, int? statusCode = default(int?), string title = null, string type = null, IDictionary<string, object?>? extensions = null);
+ public static IResult Problem(string detail, string instance, int? statusCode, string title, string type, IDictionary<string, object?>? extensions);
+ public static IResult Problem(string detail = null, string instance = null, int? statusCode = default(int?), string title = null, string type = null, IEnumerable<KeyValuePair<string, object?>>? extensions = null);
- public static IResult ValidationProblem(IDictionary<string, string[]> errors, string detail = null, string instance = null, int? statusCode = default(int?), string title = null, string type = null, IDictionary<string, object?>? extensions = null);
+ public static IResult ValidationProblem(IDictionary<string, string[]> errors, string detail, string instance, int? statusCode, string title, string type, IDictionary<string, object?>? extensions);
+ public static IResult ValidationProblem(IEnumerable<KeyValuePair<string, string[]>> errors, string detail = null, string instance = null, int? statusCode = default(int?), string title = null, string type = null, IEnumerable<KeyValuePair<string, object?>>? extensions = null);
}
public static class TypedResults {
- public static ProblemHttpResult Problem(string detail = null, string instance = null, int? statusCode = default(int?), string title = null, string type = null, IDictionary<string, object?>? extensions = null);
+ public static ProblemHttpResult Problem(string detail, string instance, int? statusCode, string title, string type, IDictionary<string, object?>? extensions);
+ public static ProblemHttpResult Problem(string detail = null, string instance = null, int? statusCode = default(int?), string title = null, string type = null, IEnumerable<KeyValuePair<string, object?>>? extensions = null);
- public static ValidationProblem ValidationProblem(IDictionary<string, string[]> errors, string detail = null, string instance = null, string title = null, string type = null, IDictionary<string, object?>? extensions = null);
+ public static ValidationProblem ValidationProblem(IDictionary<string, string[]> errors, string detail, string instance, string title, string type, IDictionary<string, object?>? extensions);
+ public static ValidationProblem ValidationProblem(IEnumerable<KeyValuePair<string, string[]>> errors, string detail = null, string instance = null, string title = null, string type = null, IEnumerable<KeyValuePair<string, object?>>? extensions = null);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Microsoft.AspNetCore.Mvc.ApiExplorer

``` diff
namespace Microsoft.AspNetCore.Mvc.ApiExplorer {
- public class DefaultApiDescriptionProvider : IApiDescriptionProvider
+ [RequiresUnreferencedCodeAttribute("DefaultApiDescriptionProvider is used by MVC which does not currently support trimming or native AOT.", Url="https://aka.ms/aspnet/trimming")]
+ public class DefaultApiDescriptionProvider : IApiDescriptionProvider
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Microsoft.AspNetCore.Mvc.ModelBinding

``` diff
namespace Microsoft.AspNetCore.Mvc.ModelBinding {
[DebuggerDisplayAttribute("{DebuggerToString(),nq}")]
public abstract class ModelMetadata : IEquatable<ModelMetadata?>, IModelMetadataProvider {
- public Type ElementType { get; }
+ public Type ElementType { [RequiresUnreferencedCodeAttribute("Resolving this property is not compatible with trimming, as it requires dynamic access to code that is not referenced statically.")] get; }
- public bool IsCollectionType { get; }
+ public bool IsCollectionType { [RequiresUnreferencedCodeAttribute("Resolving this property is not compatible with trimming, as it requires dynamic access to code that is not referenced statically.")] get; }
- public bool IsComplexType { get; }
+ public bool IsComplexType { [RequiresUnreferencedCodeAttribute("Resolving this property is not compatible with trimming, as it requires dynamic access to code that is not referenced statically.")] get; }
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes

``` diff
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes {
+ public sealed class CreateNamedPipeServerStreamContext {
+ public CreateNamedPipeServerStreamContext();
+ public required NamedPipeEndPoint NamedPipeEndPoint { get; set; }
+ public required PipeOptions PipeOptions { get; set; }
+ public PipeSecurity? PipeSecurity { get; set; }
+ }
public sealed class NamedPipeTransportOptions {
+ public Func<CreateNamedPipeServerStreamContext, NamedPipeServerStream> CreateNamedPipeServerStream { get; set; }
+ public static NamedPipeServerStream CreateDefaultNamedPipeServerStream(CreateNamedPipeServerStreamContext context);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Microsoft.AspNetCore.Server.Kestrel

``` diff
namespace Microsoft.AspNetCore.Server.Kestrel {
public class KestrelConfigurationLoader {
+ public KestrelConfigurationLoader NamedPipeEndpoint(string pipeName);
+ public KestrelConfigurationLoader NamedPipeEndpoint(string pipeName, Action<ListenOptions> configure);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Microsoft.Extensions.Caching.Distributed

``` diff
namespace Microsoft.Extensions.Caching.Distributed {
+ public interface IBufferDistributedCache : IDistributedCache {
+ void Set(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options);
+ ValueTask SetAsync(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken));
+ bool TryGet(string key, IBufferWriter<byte> destination);
+ ValueTask<bool> TryGetAsync(string key, IBufferWriter<byte> destination, CancellationToken token = default(CancellationToken));
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Microsoft.Extensions.Caching.Hybrid

``` diff
+namespace Microsoft.Extensions.Caching.Hybrid {
+ public abstract class HybridCache {
+ protected HybridCache();
+ public ValueTask<T> GetOrCreateAsync<T>(string key, Func<CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default(CancellationToken));
+ public abstract ValueTask<T> GetOrCreateAsync<TState, T>(string key, TState state, Func<TState, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default(CancellationToken));
+ public virtual ValueTask RemoveAsync(IEnumerable<string> keys, CancellationToken cancellationToken = default(CancellationToken));
+ public abstract ValueTask RemoveAsync(string key, CancellationToken cancellationToken = default(CancellationToken));
+ public virtual ValueTask RemoveByTagAsync(IEnumerable<string> tags, CancellationToken cancellationToken = default(CancellationToken));
+ public abstract ValueTask RemoveByTagAsync(string tag, CancellationToken cancellationToken = default(CancellationToken));
+ public abstract ValueTask SetAsync<T>(string key, T value, HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+ [FlagsAttribute]
+ public enum HybridCacheEntryFlags {
+ DisableCompression = 32,
+ DisableDistributedCache = 12,
+ DisableDistributedCacheRead = 4,
+ DisableDistributedCacheWrite = 8,
+ DisableLocalCache = 3,
+ DisableLocalCacheRead = 1,
+ DisableLocalCacheWrite = 2,
+ DisableUnderlyingData = 16,
+ None = 0,
+ }
+ public sealed class HybridCacheEntryOptions {
+ public HybridCacheEntryOptions();
+ public TimeSpan? Expiration { get; set; }
+ public HybridCacheEntryFlags? Flags { get; set; }
+ public TimeSpan? LocalCacheExpiration { get; set; }
+ }
+ public interface IHybridCacheSerializer<T> {
+ T Deserialize(ReadOnlySequence<byte> source);
+ void Serialize(T value, IBufferWriter<byte> target);
+ }
+ public interface IHybridCacheSerializerFactory {
+ bool TryCreateSerializer<T>([NotNullWhenAttribute(true)] out IHybridCacheSerializer<T>? serializer);
+ }
+}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Microsoft.Extensions.DependencyInjection

``` diff
namespace Microsoft.Extensions.DependencyInjection {
public static class HttpClientBuilderExtensions {
+ public static IHttpClientBuilder AddAsKeyed(this IHttpClientBuilder builder, ServiceLifetime lifetime = ServiceLifetime.Scoped);
+ public static IHttpClientBuilder RemoveAsKeyed(this IHttpClientBuilder builder);
}
public static class MvcApiExplorerMvcCoreBuilderExtensions {
- public static IMvcCoreBuilder AddApiExplorer(this IMvcCoreBuilder builder);
+ [RequiresUnreferencedCodeAttribute("MVC does not currently support trimming or native AOT.", Url="https://aka.ms/aspnet/trimming")]
+ public static IMvcCoreBuilder AddApiExplorer(this IMvcCoreBuilder builder);
}
public static class SignalRDependencyInjectionExtensions {
- [RequiresUnreferencedCodeAttribute("SignalR does not currently support trimming or native AOT.", Url="https://aka.ms/aspnet/trimming")]
- public static ISignalRServerBuilder AddSignalR(this IServiceCollection services);
+ public static ISignalRServerBuilder AddSignalR(this IServiceCollection services);
- [RequiresUnreferencedCodeAttribute("SignalR does not currently support trimming or native AOT.", Url="https://aka.ms/aspnet/trimming")]
- public static ISignalRServerBuilder AddSignalR(this IServiceCollection services, Action<HubOptions> configure);
+ public static ISignalRServerBuilder AddSignalR(this IServiceCollection services, Action<HubOptions> configure);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Microsoft.Extensions.Logging.Abstractions

``` diff
namespace Microsoft.Extensions.Logging.Abstractions {
+ public abstract class BufferedLogRecord {
+ protected BufferedLogRecord();
+ public virtual ActivitySpanId? ActivitySpanId { get; }
+ public virtual ActivityTraceId? ActivityTraceId { get; }
+ public virtual IReadOnlyList<KeyValuePair<string, object?>> Attributes { get; }
+ public abstract EventId EventId { get; }
+ public virtual string Exception { get; }
+ public virtual string FormattedMessage { get; }
+ public abstract LogLevel LogLevel { get; }
+ public virtual int? ManagedThreadId { get; }
+ public virtual string MessageTemplate { get; }
+ public abstract DateTimeOffset Timestamp { get; }
+ }
+ public interface IBufferedLogger {
+ void LogRecords(IEnumerable<BufferedLogRecord> records);
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# API Difference 9.0-preview6 vs 9.0-preview7

API listing follows standard diff formatting.
Lines preceded by a '+' are additions and a '-' indicates removal.

* [System](9.0-preview7_System.md)
* [System.Data](9.0-preview7_System.Data.md)
* [System.Diagnostics](9.0-preview7_System.Diagnostics.md)
* [System.Diagnostics.Metrics](9.0-preview7_System.Diagnostics.Metrics.md)
* [System.Formats.Tar](9.0-preview7_System.Formats.Tar.md)
* [System.Net.Http](9.0-preview7_System.Net.Http.md)
* [System.Net.Quic](9.0-preview7_System.Net.Quic.md)
* [System.Numerics](9.0-preview7_System.Numerics.md)
* [System.Runtime.InteropServices](9.0-preview7_System.Runtime.InteropServices.md)
* [System.Runtime.Intrinsics](9.0-preview7_System.Runtime.Intrinsics.md)
* [System.Runtime.Intrinsics.Arm](9.0-preview7_System.Runtime.Intrinsics.Arm.md)
* [System.Security.Cryptography](9.0-preview7_System.Security.Cryptography.md)
* [System.Security.Cryptography.X509Certificates](9.0-preview7_System.Security.Cryptography.X509Certificates.md)
* [System.Text.Json](9.0-preview7_System.Text.Json.md)
* [System.Text.Json.Schema](9.0-preview7_System.Text.Json.Schema.md)
* [System.Text.Json.Serialization](9.0-preview7_System.Text.Json.Serialization.md)
* [System.Threading](9.0-preview7_System.Threading.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# System.Data

``` diff
namespace System.Data {
public enum SqlDbType {
+ Json = 35,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saurabh500 for the JSON changes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm for SqlDbType

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# System.Diagnostics.Metrics

``` diff
namespace System.Diagnostics.Metrics {
public readonly struct Measurement<T> where T : struct {
+ public Measurement(T value, in TagList tags);
}
}
```

Loading
Loading