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 Preview 6 and .NET 8 Preview 7 #8675

Merged
merged 4 commits into from
Aug 9, 2023
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,26 @@
# API Difference 8.0-preview6 vs 8.0-preview7

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

* [Microsoft.AspNetCore.Antiforgery](8.0-preview7_Microsoft.AspNetCore.Antiforgery.md)
* [Microsoft.AspNetCore.Builder](8.0-preview7_Microsoft.AspNetCore.Builder.md)
* [Microsoft.AspNetCore.Components](8.0-preview7_Microsoft.AspNetCore.Components.md)
* [Microsoft.AspNetCore.Components.Binding](8.0-preview7_Microsoft.AspNetCore.Components.Binding.md)
* [Microsoft.AspNetCore.Components.Forms](8.0-preview7_Microsoft.AspNetCore.Components.Forms.md)
* [Microsoft.AspNetCore.Components.Forms.Mapping](8.0-preview7_Microsoft.AspNetCore.Components.Forms.Mapping.md)
* [Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure](8.0-preview7_Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.md)
* [Microsoft.AspNetCore.Components.Rendering](8.0-preview7_Microsoft.AspNetCore.Components.Rendering.md)
* [Microsoft.AspNetCore.Components.RenderTree](8.0-preview7_Microsoft.AspNetCore.Components.RenderTree.md)
* [Microsoft.AspNetCore.Components.Web.Virtualization](8.0-preview7_Microsoft.AspNetCore.Components.Web.Virtualization.md)
* [Microsoft.AspNetCore.Http](8.0-preview7_Microsoft.AspNetCore.Http.md)
* [Microsoft.AspNetCore.Http.Metadata](8.0-preview7_Microsoft.AspNetCore.Http.Metadata.md)
* [Microsoft.AspNetCore.Identity](8.0-preview7_Microsoft.AspNetCore.Identity.md)
* [Microsoft.AspNetCore.Identity.UI.Services](8.0-preview7_Microsoft.AspNetCore.Identity.UI.Services.md)
* [Microsoft.Extensions.DependencyInjection](8.0-preview7_Microsoft.Extensions.DependencyInjection.md)
* [Microsoft.Extensions.DependencyInjection.Extensions](8.0-preview7_Microsoft.Extensions.DependencyInjection.Extensions.md)
* [Microsoft.Extensions.Diagnostics.Metrics](8.0-preview7_Microsoft.Extensions.Diagnostics.Metrics.md)
* [Microsoft.Extensions.Hosting](8.0-preview7_Microsoft.Extensions.Hosting.md)
* [Microsoft.Extensions.Http.Logging](8.0-preview7_Microsoft.Extensions.Http.Logging.md)
* [Microsoft.Extensions.Options](8.0-preview7_Microsoft.Extensions.Options.md)

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

``` diff
namespace Microsoft.AspNetCore.Antiforgery {
+ public interface IAntiforgeryMetadata {
+ bool RequiresValidation { get; }
+ }
+ public interface IAntiforgeryValidationFeature {
+ Exception Error { get; }
+ bool IsValid { get; }
+ }
+ public class RequireAntiforgeryTokenAttribute : Attribute, IAntiforgeryMetadata {
+ public RequireAntiforgeryTokenAttribute(bool required = true);
+ public bool RequiresValidation { get; }
+ }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Builder {
+ public static class AntiforgeryApplicationBuilderExtensions {
+ public static IApplicationBuilder UseAntiforgery(this IApplicationBuilder builder);
+ }
public static class RoutingEndpointConventionBuilderExtensions {
+ public static TBuilder DisableAntiforgery<TBuilder>(this TBuilder builder) where TBuilder : IEndpointConventionBuilder;
}
public sealed class WebApplication : IApplicationBuilder, IAsyncDisposable, IDisposable, IEndpointRouteBuilder, IHost {
+ public static WebApplicationBuilder CreateEmptyBuilder(WebApplicationOptions options);
}
}
```

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

``` diff
-namespace Microsoft.AspNetCore.Components.Binding {
{
- public sealed class CascadingFormModelBindingProvider : CascadingModelBindingProvider {
{
- public CascadingFormModelBindingProvider(IFormValueSupplier formValueSupplier);

- protected internal override bool AreValuesFixed { get; }

- protected internal override bool CanSupplyValue(ModelBindingContext? bindingContext, in CascadingParameterInfo parameterInfo);

- protected internal override object? GetCurrentValue(ModelBindingContext? bindingContext, in CascadingParameterInfo parameterInfo);

- protected internal override bool SupportsCascadingParameterAttributeType(Type attributeType);

- protected internal override bool SupportsParameterType(Type type);

- }
- public abstract class CascadingModelBindingProvider {
{
- protected CascadingModelBindingProvider();

- protected internal abstract bool AreValuesFixed { get; }

- protected internal abstract bool CanSupplyValue(ModelBindingContext? bindingContext, in CascadingParameterInfo parameterInfo);

- protected internal abstract object? GetCurrentValue(ModelBindingContext? bindingContext, in CascadingParameterInfo parameterInfo);

- protected internal virtual void Subscribe(ComponentState subscriber);

- protected internal abstract bool SupportsCascadingParameterAttributeType(Type attributeType);

- protected internal abstract bool SupportsParameterType(Type parameterType);

- protected internal virtual void Unsubscribe(ComponentState subscriber);

- }
- public sealed class CascadingQueryModelBindingProvider : CascadingModelBindingProvider, IDisposable {
{
- public CascadingQueryModelBindingProvider(NavigationManager navigationManager);

- protected internal override bool AreValuesFixed { get; }

- protected internal override bool CanSupplyValue(ModelBindingContext? bindingContext, in CascadingParameterInfo parameterInfo);

- protected internal override object? GetCurrentValue(ModelBindingContext? bindingContext, in CascadingParameterInfo parameterInfo);

- protected internal override void Subscribe(ComponentState subscriber);

- protected internal override bool SupportsCascadingParameterAttributeType(Type attributeType);

- protected internal override bool SupportsParameterType(Type type);

- void IDisposable.Dispose();

- protected internal override void Unsubscribe(ComponentState subscriber);

- }
- public class FormValueSupplierContext {
{
- public FormValueSupplierContext(string formName, Type valueType, string parameterName);

- public string FormName { get; }

- public Action<string, object>? MapErrorToContainer { get; set; }

- public Action<string, FormattableString, string?>? OnError { get; set; }

- public string ParameterName { get; }

- public object? Result { get; }

- public Type ValueType { get; }

- public void SetResult(object? result);

- }
- public interface IFormValueSupplier {
{
- void Bind(FormValueSupplierContext context);

- bool CanBind(Type valueType, string? formName = null);

- }
-}
```

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

``` diff
+namespace Microsoft.AspNetCore.Components.Forms.Mapping {
+ public class FormMappingError {
+ public string? AttemptedValue { get; }
+ public object Container { get; internal set; }
+ public IReadOnlyList<FormattableString> ErrorMessages { get; }
+ public string Name { get; }
+ public string Path { get; }
+ }
+ public class FormValueMappingContext {
+ public FormValueMappingContext(string acceptMappingScopeName, string? acceptFormName, Type valueType, string parameterName);
+ public string? AcceptFormName { get; }
+ public string AcceptMappingScopeName { get; }
+ public Action<string, object>? MapErrorToContainer { get; set; }
+ public Action<string, FormattableString, string?>? OnError { get; set; }
+ public string ParameterName { get; }
+ public object? Result { get; }
+ public Type ValueType { get; }
+ public void SetResult(object? result);
+ }
+ public interface IFormValueMapper {
+ bool CanMap(Type valueType, string scopeName, string? formName);
+ void Map(FormValueMappingContext context);
+ }
+ public static class SupplyParameterFromFormServiceCollectionExtensions {
+ public static IServiceCollection AddSupplyValueFromFormProvider(this IServiceCollection serviceCollection);
+ }
+}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Forms {
+ public class AntiforgeryRequestToken {
+ public AntiforgeryRequestToken(string value, string formFieldName);
+ public string FormFieldName { get; }
+ public string Value { get; }
+ }
+ public abstract class AntiforgeryStateProvider {
+ protected AntiforgeryStateProvider();
+ public abstract AntiforgeryRequestToken? GetAntiforgeryToken();
+ }
+ public class AntiforgeryToken : IComponent {
+ public AntiforgeryToken();
+ void Microsoft.AspNetCore.Components.IComponent.Attach(RenderHandle renderHandle);
+ Task Microsoft.AspNetCore.Components.IComponent.SetParametersAsync(ParameterView parameters);
+ }
public class EditForm : ComponentBase {
- public ModelBindingContext BindingContext { get; set; }

- public string FormHandlerName { get; set; }

+ public string FormName { get; set; }
}
+ public abstract class Editor<T> : ComponentBase, ICascadingValueSupplier {
+ protected Editor();
+ public T Value { get; set; }
+ public EventCallback<T> ValueChanged { get; set; }
+ public Expression<Func<T>> ValueExpression { get; set; }
+ protected string NameFor(LambdaExpression expression);
+ protected override void OnParametersSet();
+ }
- public abstract class FormDataProvider {
{
- protected FormDataProvider();

- public abstract IReadOnlyDictionary<string, StringValues> Entries { get; }

- public bool IsFormDataAvailable { get; }

- public abstract string? Name { get; }

- }
+ public sealed class FormMappingContext {
+ public string MappingScopeName { get; }
+ public IEnumerable<FormMappingError> GetAllErrors();
+ public IEnumerable<FormMappingError> GetAllErrors(string formName);
+ public string? GetAttemptedValue(string key);
+ public string? GetAttemptedValue(string formName, string key);
+ public FormMappingError? GetErrors(string key);
+ public FormMappingError? GetErrors(string formName, string key);
+ }
+ public sealed class FormMappingScope : ICascadingValueSupplier, IComponent {
+ public FormMappingScope();
+ public RenderFragment<FormMappingContext> ChildContent { get; set; }
+ public string Name { get; set; }
+ void IComponent.Attach(RenderHandle renderHandle);
+ Task IComponent.SetParametersAsync(ParameterView parameters);
+ }
- public interface IHostEnvironmentFormDataProvider {
{
- void SetFormData(string name, IReadOnlyDictionary<string, StringValues> formData);

- }
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure {
public class StaticHtmlRenderer : Renderer {
+ protected virtual void RenderChildComponent(TextWriter output, ref RenderTreeFrame componentFrame);
+ protected bool TryCreateScopeQualifiedEventName(int componentId, string assignedEventName, out string? scopeQualifiedEventName);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.RenderTree {
+ public readonly struct NamedEventChange {
+ public NamedEventChange(NamedEventChangeType changeType, int componentId, int frameIndex, string eventType, string assignedName);
+ public string AssignedName { get; }
+ public NamedEventChangeType ChangeType { get; }
+ public int ComponentId { get; }
+ public string EventType { get; }
+ public int FrameIndex { get; }
+ }
+ public enum NamedEventChangeType {
+ Added = 0,
+ Removed = 1,
+ }
public readonly struct RenderBatch {
+ public ArrayRange<NamedEventChange>? NamedEventChanges { get; }
}
public abstract class Renderer : IAsyncDisposable, IDisposable {
- public virtual Task DispatchEventAsync(ulong eventHandlerId, EventFieldInfo? fieldInfo, EventArgs eventArgs, bool quiesce);
+ public virtual Task DispatchEventAsync(ulong eventHandlerId, EventFieldInfo? fieldInfo, EventArgs eventArgs, bool waitForQuiescence);
- protected internal virtual bool ShouldTrackNamedEventHandlers();

- protected internal virtual void TrackNamedEventId(ulong eventHandlerId, int componentId, string eventHandlerName);

}
public struct RenderTreeFrame {
+ public string NamedEventAssignedName { get; }
+ public string NamedEventType { get; }
}
public enum RenderTreeFrameType : short {
+ NamedEvent = (short)10,
}
public abstract class WebRenderer : Renderer {
+ protected virtual int GetWebRendererId();
+ protected virtual void UpdateRootComponents(string operationsJson);
- public Task WaitUntilAttachedAsync();

}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Rendering {
public sealed class RenderTreeBuilder : IDisposable {
+ public void AddNamedEvent(int sequence, string eventType, string assignedName);
- public void SetEventHandlerName(string eventHandlerName);

}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components.Web.Virtualization {
public sealed class Virtualize<TItem> : ComponentBase, IAsyncDisposable, IVirtualizeJsCallbacks {
+ public RenderFragment? EmptyContent { get; set; }
}
}
```

Loading
Loading