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 8.0 Preview 3 and .NET 8 Preview 4 #8469

Merged
merged 9 commits into from
Jun 15, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# API Difference 8.0-preview3 vs 8.0-preview4

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

* [Microsoft.AspNetCore.Authentication.BearerToken](8.0-preview4_Microsoft.AspNetCore.Authentication.BearerToken.md)
* [Microsoft.AspNetCore.Builder](8.0-preview4_Microsoft.AspNetCore.Builder.md)
* [Microsoft.AspNetCore.Components](8.0-preview4_Microsoft.AspNetCore.Components.md)
* [Microsoft.AspNetCore.Components.Endpoints](8.0-preview4_Microsoft.AspNetCore.Components.Endpoints.md)
* [Microsoft.AspNetCore.Components.Forms](8.0-preview4_Microsoft.AspNetCore.Components.Forms.md)
* [Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure](8.0-preview4_Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.md)
* [Microsoft.AspNetCore.Components.Rendering](8.0-preview4_Microsoft.AspNetCore.Components.Rendering.md)
* [Microsoft.AspNetCore.Components.RenderTree](8.0-preview4_Microsoft.AspNetCore.Components.RenderTree.md)
* [Microsoft.AspNetCore.Components.Routing](8.0-preview4_Microsoft.AspNetCore.Components.Routing.md)
* [Microsoft.AspNetCore.Components.Sections](8.0-preview4_Microsoft.AspNetCore.Components.Sections.md)
* [Microsoft.AspNetCore.Components.Web](8.0-preview4_Microsoft.AspNetCore.Components.Web.md)
* [Microsoft.AspNetCore.Components.Web.HtmlRendering](8.0-preview4_Microsoft.AspNetCore.Components.Web.HtmlRendering.md)
* [Microsoft.AspNetCore.Connections.Features](8.0-preview4_Microsoft.AspNetCore.Connections.Features.md)
* [Microsoft.AspNetCore.DataProtection.XmlEncryption](8.0-preview4_Microsoft.AspNetCore.DataProtection.XmlEncryption.md)
* [Microsoft.AspNetCore.Hosting](8.0-preview4_Microsoft.AspNetCore.Hosting.md)
* [Microsoft.AspNetCore.Http](8.0-preview4_Microsoft.AspNetCore.Http.md)
* [Microsoft.AspNetCore.Http.Features](8.0-preview4_Microsoft.AspNetCore.Http.Features.md)
* [Microsoft.AspNetCore.Http.Metadata](8.0-preview4_Microsoft.AspNetCore.Http.Metadata.md)
* [Microsoft.AspNetCore.HttpLogging](8.0-preview4_Microsoft.AspNetCore.HttpLogging.md)
* [Microsoft.AspNetCore.Identity](8.0-preview4_Microsoft.AspNetCore.Identity.md)
* [Microsoft.AspNetCore.Mvc.Infrastructure](8.0-preview4_Microsoft.AspNetCore.Mvc.Infrastructure.md)
* [Microsoft.AspNetCore.Routing](8.0-preview4_Microsoft.AspNetCore.Routing.md)
* [Microsoft.AspNetCore.Routing.Patterns](8.0-preview4_Microsoft.AspNetCore.Routing.Patterns.md)
* [Microsoft.AspNetCore.SignalR](8.0-preview4_Microsoft.AspNetCore.SignalR.md)
* [Microsoft.Extensions.Configuration](8.0-preview4_Microsoft.Extensions.Configuration.md)
* [Microsoft.Extensions.Configuration.Xml](8.0-preview4_Microsoft.Extensions.Configuration.Xml.md)
* [Microsoft.Extensions.DependencyInjection](8.0-preview4_Microsoft.Extensions.DependencyInjection.md)
* [Microsoft.Extensions.Hosting](8.0-preview4_Microsoft.Extensions.Hosting.md)
* [System.Diagnostics.Eventing.Reader](8.0-preview4_System.Diagnostics.Eventing.Reader.md)
* [System.Security.Cryptography.Xml](8.0-preview4_System.Security.Cryptography.Xml.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Microsoft.AspNetCore.Authentication.BearerToken

``` diff
+namespace Microsoft.AspNetCore.Authentication.BearerToken {
+ public static class BearerTokenDefaults {
+ public const string AuthenticationScheme = "BearerToken";
+ }
+ public class BearerTokenEvents {
+ public BearerTokenEvents();
+ public Func<MessageReceivedContext, Task> OnMessageReceived { get; set; }
+ public virtual Task MessageReceived(MessageReceivedContext context);
+ }
+ public sealed class BearerTokenOptions : AuthenticationSchemeOptions {
+ public BearerTokenOptions();
+ public TimeSpan BearerTokenExpiration { get; set; }
+ public ISecureDataFormat<AuthenticationTicket>? BearerTokenProtector { get; set; }
+ public new BearerTokenEvents Events { get; set; }
+ }
+ public class MessageReceivedContext : ResultContext<BearerTokenOptions> {
+ public MessageReceivedContext(HttpContext context, AuthenticationScheme scheme, BearerTokenOptions options);
+ public string Token { get; set; }
+ }
+}
```

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 HttpLoggingEndpointConventionBuilderExtensions {
+ public static TBuilder WithHttpLogging<TBuilder>(this TBuilder builder, HttpLoggingFields loggingFields, int requestBodyLogLimit = -1, int responseBodyLogLimit = -1) where TBuilder : IEndpointConventionBuilder;
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Endpoints {
public class RazorComponentResult : IResult {
+ public bool PreventStreamingRendering { get; set; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Forms {
public sealed class EditContext {
+ public bool ShouldUseFieldIdentifiers { get; set; }
- [IteratorStateMachineAttribute(typeof(EditContext.<GetValidationMessages>d__23))]
- public IEnumerable<string> GetValidationMessages();
+ [IteratorStateMachineAttribute(typeof(EditContext.<GetValidationMessages>d__27))]
+ public IEnumerable<string> GetValidationMessages();
- [IteratorStateMachineAttribute(typeof(EditContext.<GetValidationMessages>d__24))]
- public IEnumerable<string> GetValidationMessages(FieldIdentifier fieldIdentifier);
+ [IteratorStateMachineAttribute(typeof(EditContext.<GetValidationMessages>d__28))]
+ public IEnumerable<string> GetValidationMessages(FieldIdentifier fieldIdentifier);
}
public class EditForm : ComponentBase {
+ [CascadingParameterAttribute]
+ public ModelBindingContext BindingContext { get; set; }
+ [ParameterAttribute]
+ public string FormHandlerName { get; set; }
}
+ public abstract class FormDataProvider {
+ protected FormDataProvider();
+ public abstract IReadOnlyDictionary<string, StringValues> Entries { get; }
+ public bool IsFormDataAvailable { get; }
+ public abstract string? Name { get; }
+ }
+ public interface IHostEnvironmentFormDataProvider {
+ void SetFormData(string name, IReadOnlyDictionary<string, StringValues> formData);
+ }
public abstract class InputBase<TValue> : ComponentBase, IDisposable {
+ protected string NameAttributeValue { get; }
}
}
```

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

``` diff
+namespace Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure {
+ public class StaticHtmlRenderer : Renderer {
+ public StaticHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory);
+ public override Dispatcher Dispatcher { get; }
+ public HtmlRootComponent BeginRenderingComponent(Type componentType, ParameterView initialParameters);
+ protected override void HandleException(Exception exception);
+ protected override Task UpdateDisplayAsync(in RenderBatch renderBatch);
+ protected internal virtual void WriteComponentHtml(int componentId, TextWriter output);
+ }
+}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.RenderTree {
public abstract class Renderer : IAsyncDisposable, IDisposable {
+ protected virtual void AddPendingTask(ComponentState? componentState, Task task);
+ protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState);
+ public virtual Task DispatchEventAsync(ulong eventHandlerId, EventFieldInfo? fieldInfo, EventArgs eventArgs, bool quiesce);
+ protected ComponentState GetComponentState(int componentId);
+ protected internal virtual bool ShouldTrackNamedEventHandlers();
+ protected internal virtual void TrackNamedEventId(ulong eventHandlerId, int componentId, string eventHandlerName);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Rendering {
+ [DebuggerDisplayAttribute("{GetDebuggerDisplay(),nq}")]
+ public class ComponentState : IDisposable {
+ public ComponentState(Renderer renderer, int componentId, IComponent component, ComponentState? parentComponentState);
+ public IComponent Component { get; }
+ public int ComponentId { get; }
+ public ComponentState? ParentComponentState { get; }
+ public void Dispose();
+ }
public sealed class RenderTreeBuilder : IDisposable {
+ public void SetEventHandlerName(string eventHandlerName);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Routing {
+ public interface IScrollToLocationHash {
+ Task RefreshScrollPositionForHash(string locationAbsolute);
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Sections {
- public sealed class SectionOutlet : IComponent, IDisposable, ISectionContentSubscriber
+ [StreamRenderingAttribute(true)]
+ public sealed class SectionOutlet : IComponent, IDisposable, ISectionContentSubscriber {
+ }
}
```

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

``` diff
+namespace Microsoft.AspNetCore.Components.Web.HtmlRendering {
+ public readonly struct HtmlRootComponent {
+ public int ComponentId { get; }
+ public Task QuiescenceTask { get; }
+ public string ToHtmlString();
+ public void WriteHtmlTo(TextWriter output);
+ }
+}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Web {
- public sealed class HtmlComponent {
- public static HtmlComponent Empty { get; }
- public string ToHtmlString();
- public Task WaitForQuiescenceAsync();
- public void WriteHtmlTo(TextWriter output);
- }
public sealed class HtmlRenderer : IAsyncDisposable, IDisposable {
- public HtmlComponent BeginRenderingComponent(Type componentType);
+ public HtmlRootComponent BeginRenderingComponent(Type componentType);
- public HtmlComponent BeginRenderingComponent(Type componentType, ParameterView parameters);
+ public HtmlRootComponent BeginRenderingComponent(Type componentType, ParameterView parameters);
- public HtmlComponent BeginRenderingComponent<TComponent>() where TComponent : IComponent;
+ public HtmlRootComponent BeginRenderingComponent<TComponent>() where TComponent : IComponent;
- public HtmlComponent BeginRenderingComponent<TComponent>(ParameterView parameters) where TComponent : IComponent;
+ public HtmlRootComponent BeginRenderingComponent<TComponent>(ParameterView parameters) where TComponent : IComponent;
- public Task<HtmlComponent> RenderComponentAsync(Type componentType);
+ public Task<HtmlRootComponent> RenderComponentAsync(Type componentType);
- public Task<HtmlComponent> RenderComponentAsync(Type componentType, ParameterView parameters);
+ public Task<HtmlRootComponent> RenderComponentAsync(Type componentType, ParameterView parameters);
- public Task<HtmlComponent> RenderComponentAsync<TComponent>() where TComponent : IComponent;
+ public Task<HtmlRootComponent> RenderComponentAsync<TComponent>() where TComponent : IComponent;
- public Task<HtmlComponent> RenderComponentAsync<TComponent>(ParameterView parameters) where TComponent : IComponent;
+ public Task<HtmlRootComponent> RenderComponentAsync<TComponent>(ParameterView parameters) where TComponent : IComponent;
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components {
+ public sealed class CascadingModelBinder : IComponent, IDisposable {
+ public CascadingModelBinder();
+ [ParameterAttribute]
+ public RenderFragment<ModelBindingContext> ChildContent { get; set; }
+ [ParameterAttribute]
+ public bool IsFixed { get; set; }
+ [ParameterAttribute]
+ public string Name { get; set; }
+ void IComponent.Attach(RenderHandle renderHandle);
+ Task IComponent.SetParametersAsync(ParameterView parameters);
+ void IDisposable.Dispose();
+ }
+ public sealed class ModelBindingContext {
+ public string BindingContextId { get; }
+ public string Name { get; }
+ }
+ [AttributeUsageAttribute(4, AllowMultiple=false)]
+ public class StreamRenderingAttribute : Attribute {
+ public StreamRenderingAttribute(bool enabled);
+ public bool Enabled { get; }
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Connections.Features {
+ public interface IConnectionMetricsTagsFeature {
+ ICollection<KeyValuePair<string, object?>> Tags { get; }
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.DataProtection.XmlEncryption {
public sealed class EncryptedXmlDecryptor : IInternalEncryptedXmlDecryptor, IXmlDecryptor {
- public XElement Decrypt(XElement encryptedElement);
+ [UnconditionalSuppressMessageAttribute("AOT", "IL3050:RequiresDynamicCode", Justification="Only XSLTs require dynamic code. The usage of EncryptedXml doesn't use XSLTs.")]
+ public XElement Decrypt(XElement encryptedElement);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Hosting {
public static class WebHostBuilderKestrelExtensions {
+ public static IWebHostBuilder UseKestrelCore(this IWebHostBuilder hostBuilder);
+ public static IWebHostBuilder UseKestrelHttpsConfiguration(this IWebHostBuilder hostBuilder);
}
}
```

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 {
+ ICollection<KeyValuePair<string, object?>> Tags { get; }
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Http.Metadata {
+ public interface IRouteDiagnosticsMetadata {
+ string Route { get; }
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Http {
public static class HttpResponseJsonExtensions {
- public static Task WriteAsJsonAsync(this HttpResponse response, object? value, Type type, CancellationToken cancellationToken = default(CancellationToken));
+ [RequiresUnreferencedCodeAttribute("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ public static Task WriteAsJsonAsync(this HttpResponse response, object? value, Type type, CancellationToken cancellationToken = default(CancellationToken));
- public static Task WriteAsJsonAsync<TValue>(this HttpResponse response, TValue value, CancellationToken cancellationToken = default(CancellationToken));
+ [RequiresUnreferencedCodeAttribute("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ public static Task WriteAsJsonAsync<TValue>(this HttpResponse response, TValue value, CancellationToken cancellationToken = default(CancellationToken));
}
public sealed class ProblemDetailsContext {
+ public Exception? Exception { get; set; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.HttpLogging {
+ [AttributeUsageAttribute(68, AllowMultiple=false, Inherited=true)]
+ public sealed class HttpLoggingAttribute : Attribute {
+ public HttpLoggingAttribute(HttpLoggingFields loggingFields, int requestBodyLogLimit = -1, int responseBodyLogLimit = -1);
+ public HttpLoggingFields LoggingFields { get; }
+ public int RequestBodyLogLimit { get; }
+ public int ResponseBodyLogLimit { get; }
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Identity {
+ public static class IdentityApiEndpointsIdentityBuilderExtensions {
+ public static IdentityBuilder AddApiEndpoints(this IdentityBuilder builder);
+ }
public class IdentityConstants {
+ public static readonly string BearerScheme;
}
}
```

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 class AmbiguousActionException : InvalidOperationException {
- protected AmbiguousActionException(SerializationInfo info, StreamingContext context);
+ [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+ protected AmbiguousActionException(SerializationInfo info, StreamingContext context);
}
}
```

Loading