Skip to content

API diff between .NET 9 Preview 4 and .NET 9 Preview 5 #9352

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

Merged
merged 6 commits into from
Jul 10, 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,15 @@
# API Difference 9.0-preview4 vs 9.0-preview5

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

* [Microsoft.AspNetCore.Builder](9.0-preview5_Microsoft.AspNetCore.Builder.md)
* [Microsoft.AspNetCore.Components](9.0-preview5_Microsoft.AspNetCore.Components.md)
* [Microsoft.AspNetCore.Components.Authorization](9.0-preview5_Microsoft.AspNetCore.Components.Authorization.md)
* [Microsoft.AspNetCore.Components.Endpoints.Infrastructure](9.0-preview5_Microsoft.AspNetCore.Components.Endpoints.Infrastructure.md)
* [Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure](9.0-preview5_Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.md)
* [Microsoft.AspNetCore.Components.RenderTree](9.0-preview5_Microsoft.AspNetCore.Components.RenderTree.md)
* [Microsoft.AspNetCore.Mvc.Infrastructure](9.0-preview5_Microsoft.AspNetCore.Mvc.Infrastructure.md)
* [Microsoft.AspNetCore.Routing](9.0-preview5_Microsoft.AspNetCore.Routing.md)
* [Microsoft.AspNetCore.StaticAssets](9.0-preview5_Microsoft.AspNetCore.StaticAssets.md)
* [Microsoft.AspNetCore.StaticAssets.Infrastructure](9.0-preview5_Microsoft.AspNetCore.StaticAssets.Infrastructure.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Microsoft.AspNetCore.Builder

``` diff
namespace Microsoft.AspNetCore.Builder {
+ public static class StaticAssetsEndpointRouteBuilderExtensions {
+ public static StaticAssetsEndpointConventionBuilder MapStaticAssets(this IEndpointRouteBuilder endpoints, string? staticAssetsManifestPath = null);
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Authorization {
+ public class AuthenticationStateData {
+ public AuthenticationStateData();
+ public IList<KeyValuePair<string, string>> Claims { get; set; }
+ public string NameClaimType { get; set; }
+ public string RoleClaimType { get; set; }
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Microsoft.AspNetCore.Components.Endpoints.Infrastructure

``` diff
namespace Microsoft.AspNetCore.Components.Endpoints.Infrastructure {
public static class ComponentEndpointConventionBuilderHelper {
+ public static IEndpointRouteBuilder GetEndpointRouteBuilder(RazorComponentsEndpointConventionBuilder builder);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure

``` diff
namespace Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure {
public class StaticHtmlRenderer : Renderer {
+ protected internal override ComponentPlatform ComponentPlatform { get; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.RenderTree {
public abstract class Renderer : IAsyncDisposable, IDisposable {
+ protected internal virtual ComponentPlatform ComponentPlatform { get; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components {
public abstract class ComponentBase : IComponent, IHandleAfterRender, IHandleEvent {
+ protected IComponentRenderMode? AssignedRenderMode { get; }
+ protected ComponentPlatform Platform { get; }
}
+ public sealed class ComponentPlatform {
+ public ComponentPlatform(string platformName, bool isInteractive);
+ public bool IsInteractive { get; }
+ public string Name { get; }
+ }
public readonly struct RenderHandle {
+ public ComponentPlatform Platform { get; }
+ public IComponentRenderMode? RenderMode { get; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Mvc.Infrastructure {
+ public sealed class DefaultProblemDetailsFactory : ProblemDetailsFactory {
+ public DefaultProblemDetailsFactory(IOptions<ApiBehaviorOptions> options, IOptions<ProblemDetailsOptions>? problemDetailsOptions = null);
+ public override ProblemDetails CreateProblemDetails(HttpContext httpContext, int? statusCode = default(int?), string title = null, string type = null, string detail = null, string instance = null);
+ public override ValidationProblemDetails CreateValidationProblemDetails(HttpContext httpContext, ModelStateDictionary modelStateDictionary, int? statusCode = default(int?), string title = null, string type = null, string detail = null, string instance = null);
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Routing {
+ public sealed class ContentEncodingMetadata : INegotiateMetadata {
+ public ContentEncodingMetadata(string value, double quality);
+ public double Quality { get; }
+ public string Value { get; }
+ }
}
```

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

``` diff
+namespace Microsoft.AspNetCore.StaticAssets.Infrastructure {
+ public static class StaticAssetsEndpointDataSourceHelper {
+ public static bool IsStaticAssetsDataSource(EndpointDataSource dataSource, string? staticAssetsManifestPath = null);
+ }
+}
```

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

``` diff
+namespace Microsoft.AspNetCore.StaticAssets {
+ public sealed class StaticAssetsEndpointConventionBuilder : IEndpointConventionBuilder {
+ public void Add(Action<EndpointBuilder> convention);
+ public void Finally(Action<EndpointBuilder> convention);
+ }
+}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# API Difference 9.0-preview4 vs 9.0-preview5

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

* [System](9.0-preview5_System.md)
* [System.Collections.Frozen](9.0-preview5_System.Collections.Frozen.md)
* [System.ComponentModel](9.0-preview5_System.ComponentModel.md)
* [System.Diagnostics](9.0-preview5_System.Diagnostics.md)
`* [System.IO.Pipelines](9.0-preview5_System.IO.Pipelines.md)
* [System.Numerics](9.0-preview5_System.Numerics.md)
* [System.Reflection](9.0-preview5_System.Reflection.md)
* [System.Reflection.Metadata](9.0-preview5_System.Reflection.Metadata.md)
* [System.Runtime.CompilerServices](9.0-preview5_System.Runtime.CompilerServices.md)
* [System.Runtime.InteropServices](9.0-preview5_System.Runtime.InteropServices.md)
* [System.Runtime.Intrinsics](9.0-preview5_System.Runtime.Intrinsics.md)
* [System.Runtime.Intrinsics.Arm](9.0-preview5_System.Runtime.Intrinsics.Arm.md)
* [System.Text.Json](9.0-preview5_System.Text.Json.md)
* [System.Text.Json.Serialization](9.0-preview5_System.Text.Json.Serialization.md)
* [System.Text.Json.Serialization.Metadata](9.0-preview5_System.Text.Json.Serialization.Metadata.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# System.Collections.Frozen

``` diff
namespace System.Collections.Frozen {
public static class FrozenSet {
+ public static FrozenSet<T> Create<T>(IEqualityComparer<T>? equalityComparer, ReadOnlySpan<T> source);
+ public static FrozenSet<T> Create<T>(ReadOnlySpan<T> source);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# System.ComponentModel

``` diff
namespace System.ComponentModel {
public class ComponentResourceManager : ResourceManager {
+ public virtual void ApplyResourcesToRegisteredType(object value, string objectName, CultureInfo? culture);
}
public abstract class CustomTypeDescriptor : ICustomTypeDescriptor {
- protected CustomTypeDescriptor(ICustomTypeDescriptor parent);
+ protected CustomTypeDescriptor(ICustomTypeDescriptor? parent);
+ public virtual bool? RequireRegisteredTypes { get; }
- public virtual string GetClassName();
+ public virtual string? GetClassName();
- public virtual string GetComponentName();
+ public virtual string? GetComponentName();
- public virtual TypeConverter GetConverter();
+ public virtual TypeConverter? GetConverter();
+ public virtual TypeConverter? GetConverterFromRegisteredType();
- public virtual EventDescriptor GetDefaultEvent();
+ public virtual EventDescriptor? GetDefaultEvent();
- public virtual PropertyDescriptor GetDefaultProperty();
+ public virtual PropertyDescriptor? GetDefaultProperty();
+ public virtual EventDescriptorCollection GetEventsFromRegisteredType();
+ public virtual PropertyDescriptorCollection GetPropertiesFromRegisteredType();
- public virtual object GetPropertyOwner(PropertyDescriptor pd);
+ public virtual object? GetPropertyOwner(PropertyDescriptor? pd);
}
public interface ICustomTypeDescriptor {
+ bool? RequireRegisteredTypes { get; }
+ TypeConverter? GetConverterFromRegisteredType();
+ EventDescriptorCollection GetEventsFromRegisteredType();
+ PropertyDescriptorCollection GetPropertiesFromRegisteredType();
}
public abstract class PropertyDescriptor : MemberDescriptor {
+ public virtual TypeConverter ConverterFromRegisteredType { get; }
}
public abstract class TypeDescriptionProvider {
+ public virtual bool? RequireRegisteredTypes { get; }
+ public virtual ICustomTypeDescriptor GetExtendedTypeDescriptorFromRegisteredType(object instance);
+ public ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType(object instance);
+ public ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType(Type objectType);
+ public virtual ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType(Type objectType, object? instance);
+ public virtual bool IsRegisteredType(Type type);
+ public virtual void RegisterType<T>();
}
public sealed class TypeDescriptor {
+ public static TypeConverter GetConverterFromRegisteredType(object component);
+ public static TypeConverter GetConverterFromRegisteredType(Type type);
+ public static EventDescriptorCollection GetEventsFromRegisteredType(Type componentType);
+ public static PropertyDescriptorCollection GetPropertiesFromRegisteredType(object component);
+ public static PropertyDescriptorCollection GetPropertiesFromRegisteredType(Type componentType);
+ public static void RegisterType<T>();
}
}
```

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

``` diff
namespace System.Diagnostics {
public class Activity : IDisposable {
+ public Activity AddLink(ActivityLink link);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# System.IO.Pipelines

``` diff
+namespace System.IO.Pipelines {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to do anything special to indicate that these are existing APIs that have been part of the Microsoft.AspNetCore.App shared runtime since its inception and published as a NuGet even longer?

The only thing new about it is its inclusion in the Microsoft.NETCore.App shared runtime as well. The System.Text.Json changes look good though. @BrennanConroy

Copy link
Member Author

Choose a reason for hiding this comment

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

Just let me know and I can remove them. Is it the case for all the APIs in this namespace?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can address this in a separate PR. I'll merge this as is.

+ public struct FlushResult {
+ public FlushResult(bool isCanceled, bool isCompleted);
+ public bool IsCanceled { get; }
+ public bool IsCompleted { get; }
+ }
+ public interface IDuplexPipe {
+ PipeReader Input { get; }
+ PipeWriter Output { get; }
+ }
+ public sealed class Pipe {
+ public Pipe();
+ public Pipe(PipeOptions options);
+ public PipeReader Reader { get; }
+ public PipeWriter Writer { get; }
+ public void Reset();
+ }
+ public class PipeOptions {
+ public PipeOptions(MemoryPool<byte>? pool = null, PipeScheduler? readerScheduler = null, PipeScheduler? writerScheduler = null, long pauseWriterThreshold = (long)-1, long resumeWriterThreshold = (long)-1, int minimumSegmentSize = -1, bool useSynchronizationContext = true);
+ public static PipeOptions Default { get; }
+ public int MinimumSegmentSize { get; }
+ public long PauseWriterThreshold { get; }
+ public MemoryPool<byte> Pool { get; }
+ public PipeScheduler ReaderScheduler { get; }
+ public long ResumeWriterThreshold { get; }
+ public bool UseSynchronizationContext { get; }
+ public PipeScheduler WriterScheduler { get; }
+ }
+ public abstract class PipeReader {
+ protected PipeReader();
+ public abstract void AdvanceTo(SequencePosition consumed);
+ public abstract void AdvanceTo(SequencePosition consumed, SequencePosition examined);
+ public virtual Stream AsStream(bool leaveOpen = false);
+ public abstract void CancelPendingRead();
+ public abstract void Complete(Exception? exception = null);
+ public virtual ValueTask CompleteAsync(Exception? exception = null);
+ public virtual Task CopyToAsync(PipeWriter destination, CancellationToken cancellationToken = default(CancellationToken));
+ public virtual Task CopyToAsync(Stream destination, CancellationToken cancellationToken = default(CancellationToken));
+ public static PipeReader Create(ReadOnlySequence<byte> sequence);
+ public static PipeReader Create(Stream stream, StreamPipeReaderOptions? readerOptions = null);
+ public virtual void OnWriterCompleted(Action<Exception?, object?> callback, object? state);
+ public abstract ValueTask<ReadResult> ReadAsync(CancellationToken cancellationToken = default(CancellationToken));
+ public ValueTask<ReadResult> ReadAtLeastAsync(int minimumSize, CancellationToken cancellationToken = default(CancellationToken));
+ protected virtual ValueTask<ReadResult> ReadAtLeastAsyncCore(int minimumSize, CancellationToken cancellationToken);
+ public abstract bool TryRead(out ReadResult result);
+ }
+ public abstract class PipeScheduler {
+ protected PipeScheduler();
+ public static PipeScheduler Inline { get; }
+ public static PipeScheduler ThreadPool { get; }
+ public abstract void Schedule(Action<object?> action, object? state);
+ }
+ public abstract class PipeWriter : IBufferWriter<byte> {
+ protected PipeWriter();
+ public virtual bool CanGetUnflushedBytes { get; }
+ public virtual long UnflushedBytes { get; }
+ public abstract void Advance(int bytes);
+ public virtual Stream AsStream(bool leaveOpen = false);
+ public abstract void CancelPendingFlush();
+ public abstract void Complete(Exception? exception = null);
+ public virtual ValueTask CompleteAsync(Exception? exception = null);
+ protected internal virtual Task CopyFromAsync(Stream source, CancellationToken cancellationToken = default(CancellationToken));
+ public static PipeWriter Create(Stream stream, StreamPipeWriterOptions? writerOptions = null);
+ public abstract ValueTask<FlushResult> FlushAsync(CancellationToken cancellationToken = default(CancellationToken));
+ public abstract Memory<byte> GetMemory(int sizeHint = 0);
+ public abstract Span<byte> GetSpan(int sizeHint = 0);
+ public virtual void OnReaderCompleted(Action<Exception?, object?> callback, object? state);
+ public virtual ValueTask<FlushResult> WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken));
+ }
+ public readonly struct ReadResult {
+ public ReadResult(ReadOnlySequence<byte> buffer, bool isCanceled, bool isCompleted);
+ public ReadOnlySequence<byte> Buffer { get; }
+ public bool IsCanceled { get; }
+ public bool IsCompleted { get; }
+ }
+ public static class StreamPipeExtensions {
+ public static Task CopyToAsync(this Stream source, PipeWriter destination, CancellationToken cancellationToken = default(CancellationToken));
+ }
+ public class StreamPipeReaderOptions {
+ public StreamPipeReaderOptions(MemoryPool<byte>? pool, int bufferSize, int minimumReadSize, bool leaveOpen);
+ public StreamPipeReaderOptions(MemoryPool<byte>? pool = null, int bufferSize = -1, int minimumReadSize = -1, bool leaveOpen = false, bool useZeroByteReads = false);
+ public int BufferSize { get; }
+ public bool LeaveOpen { get; }
+ public int MinimumReadSize { get; }
+ public MemoryPool<byte> Pool { get; }
+ public bool UseZeroByteReads { get; }
+ }
+ public class StreamPipeWriterOptions {
+ public StreamPipeWriterOptions(MemoryPool<byte>? pool = null, int minimumBufferSize = -1, bool leaveOpen = false);
+ public bool LeaveOpen { get; }
+ public int MinimumBufferSize { get; }
+ public MemoryPool<byte> Pool { get; }
+ }
+}
```

Loading