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 GA and .NET 10 Preview1 #9718

Merged
merged 5 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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 C:\Users\calope\Downloads\refs\microsoft.aspnetcore.app.ref.9.0.0\ref\net9.0 vs C:\Users\calope\Downloads\refs\Microsoft.AspNetCore.App.Ref.10.0.0-preview.1.25103.6\ref\net10.0

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

* [Microsoft.AspNetCore.Components](10.0-preview1_Microsoft.AspNetCore.Components.md)
* [Microsoft.AspNetCore.Components.Routing](10.0-preview1_Microsoft.AspNetCore.Components.Routing.md)
* [Microsoft.AspNetCore.Connections.Features](10.0-preview1_Microsoft.AspNetCore.Connections.Features.md)
* [Microsoft.AspNetCore.Http](10.0-preview1_Microsoft.AspNetCore.Http.md)
* [Microsoft.AspNetCore.Http.HttpResults](10.0-preview1_Microsoft.AspNetCore.Http.HttpResults.md)
* [Microsoft.AspNetCore.Http.Metadata](10.0-preview1_Microsoft.AspNetCore.Http.Metadata.md)
* [Microsoft.AspNetCore.Mvc](10.0-preview1_Microsoft.AspNetCore.Mvc.md)
* [Microsoft.AspNetCore.Mvc.ApiExplorer](10.0-preview1_Microsoft.AspNetCore.Mvc.ApiExplorer.md)
* [Microsoft.Extensions.DependencyInjection](10.0-preview1_Microsoft.Extensions.DependencyInjection.md)

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

``` diff
namespace Microsoft.AspNetCore.Components.Routing {
public class Router : IComponent, IDisposable, IHandleAfterRender {
- [ObsoleteAttribute("This property is obsolete and configuring it has not effect.")]
- [ParameterAttribute]
- public bool PreferExactMatches { get; set; }
+ [ObsoleteAttribute("This property is obsolete and configuring it has no effect.")]
+ [ParameterAttribute]
+ public bool PreferExactMatches { get; set; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Components {
[AttributeUsageAttribute(4, AllowMultiple=true, Inherited=false)]
public sealed class RouteAttribute : Attribute {
- public RouteAttribute(string template);
+ public RouteAttribute([StringSyntaxAttribute("Route")] string template);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Connections.Features {
public interface ITlsHandshakeFeature {
- CipherAlgorithmType CipherAlgorithm { get; }
+ [ObsoleteAttribute("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+ CipherAlgorithmType CipherAlgorithm { get; }
- int CipherStrength { get; }
+ [ObsoleteAttribute("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+ int CipherStrength { get; }
- HashAlgorithmType HashAlgorithm { get; }
+ [ObsoleteAttribute("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+ HashAlgorithmType HashAlgorithm { get; }
- int HashStrength { get; }
+ [ObsoleteAttribute("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+ int HashStrength { get; }
- ExchangeAlgorithmType KeyExchangeAlgorithm { get; }
+ [ObsoleteAttribute("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+ ExchangeAlgorithmType KeyExchangeAlgorithm { get; }
- int KeyExchangeStrength { get; }
+ [ObsoleteAttribute("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+ int KeyExchangeStrength { get; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Http.HttpResults {
public sealed class RedirectHttpResult : IResult {
+ public static bool IsLocalUrl([NotNullWhenAttribute(true), StringSyntaxAttribute("Uri")] string? url);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Http.Metadata {
public interface IProducesResponseTypeMetadata {
+ string Description { get; }
- Type? Type { get; }
+ Type Type { get; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Http {
[DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed class ProducesResponseTypeMetadata : IProducesResponseTypeMetadata {
- public ProducesResponseTypeMetadata(int statusCode, Type? type = null, string[]? contentTypes = null);
+ public ProducesResponseTypeMetadata(int statusCode, Type type = null, string[]? contentTypes = null);
+ public string Description { get; set; }
- public Type? Type { get; }
+ public Type Type { get; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Mvc.ApiExplorer {
public class ApiResponseType {
+ public string Description { get; set; }
}
public interface IApiResponseMetadataProvider : IFilterMetadata {
+ string Description { get; }
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Mvc {
[AttributeUsageAttribute(68, AllowMultiple=false, Inherited=true)]
public class ProducesAttribute : Attribute, IApiResponseMetadataProvider, IFilterMetadata, IOrderedFilter, IResultFilter {
+ public string? Description { get; set; }
}
[AttributeUsageAttribute(64, AllowMultiple=false, Inherited=true)]
public sealed class ProducesDefaultResponseTypeAttribute : Attribute, IApiDefaultResponseMetadataProvider, IApiResponseMetadataProvider, IFilterMetadata {
+ public string? Description { get; set; }
}
[AttributeUsageAttribute(68, AllowMultiple=true, Inherited=true)]
public class ProducesResponseTypeAttribute : Attribute, IApiResponseMetadataProvider, IFilterMetadata {
+ public string? Description { get; set; }
}
}
```

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

``` diff
namespace Microsoft.Extensions.DependencyInjection {
- public delegate T ObjectFactory<T>(IServiceProvider serviceProvider, object?[]? arguments);
+ public delegate T ObjectFactory<out T>(IServiceProvider serviceProvider, object?[]? arguments);
public static class ServiceProviderKeyedServiceExtensions {
+ public static object? GetKeyedService(this IServiceProvider provider, Type serviceType, object? serviceKey);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# API Difference C:\Users\calope\Downloads\refs\microsoft.netcore.app.ref.9.0.0\ref\net9.0 vs C:\Users\calope\Downloads\refs\Microsoft.NETCore.App.Ref.10.0.0-preview.1.25080.5\ref\net10.0

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

* [System](10.0-preview1_System.md)
* [System.Collections.Generic](10.0-preview1_System.Collections.Generic.md)
* [System.Collections.Immutable](10.0-preview1_System.Collections.Immutable.md)
* [System.Collections.ObjectModel](10.0-preview1_System.Collections.ObjectModel.md)
* [System.Collections.Specialized](10.0-preview1_System.Collections.Specialized.md)
* [System.Diagnostics.CodeAnalysis](10.0-preview1_System.Diagnostics.CodeAnalysis.md)
* [System.Formats.Asn1](10.0-preview1_System.Formats.Asn1.md)
* [System.Globalization](10.0-preview1_System.Globalization.md)
* [System.IO](10.0-preview1_System.IO.md)
* [System.Linq](10.0-preview1_System.Linq.md)
* [System.Net](10.0-preview1_System.Net.md)
* [System.Net.Quic](10.0-preview1_System.Net.Quic.md)
* [System.Net.Security](10.0-preview1_System.Net.Security.md)
* [System.Numerics](10.0-preview1_System.Numerics.md)
* [System.Reflection](10.0-preview1_System.Reflection.md)
* [System.Reflection.Emit](10.0-preview1_System.Reflection.Emit.md)
* [System.Reflection.Metadata](10.0-preview1_System.Reflection.Metadata.md)
* [System.Runtime.ExceptionServices](10.0-preview1_System.Runtime.ExceptionServices.md)
* [System.Runtime.InteropServices](10.0-preview1_System.Runtime.InteropServices.md)
* [System.Runtime.Intrinsics](10.0-preview1_System.Runtime.Intrinsics.md)
* [System.Runtime.Intrinsics.X86](10.0-preview1_System.Runtime.Intrinsics.X86.md)
* [System.Security.Authentication](10.0-preview1_System.Security.Authentication.md)
* [System.Security.Cryptography](10.0-preview1_System.Security.Cryptography.md)
* [System.Security.Cryptography.X509Certificates](10.0-preview1_System.Security.Cryptography.X509Certificates.md)
* [System.Text.Json](10.0-preview1_System.Text.Json.md)
* [System.Text.Json.Nodes](10.0-preview1_System.Text.Json.Nodes.md)
* [System.Text.Json.Serialization](10.0-preview1_System.Text.Json.Serialization.md)
* [System.Threading](10.0-preview1_System.Threading.md)
* [System.Threading.Tasks](10.0-preview1_System.Threading.Tasks.md)
* [System.Xml](10.0-preview1_System.Xml.md)

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

``` diff
namespace System.Collections.Generic {
public static class CollectionExtensions {
+ public static ReadOnlySet<T> AsReadOnly<T>(this ISet<T> @set);
}
public class OrderedDictionary<TKey, TValue> : ICollection, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, IDictionary<TKey, TValue>, IEnumerable, IEnumerable<KeyValuePair<TKey, TValue>>, IList, IList<KeyValuePair<TKey, TValue>>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IReadOnlyDictionary<TKey, TValue>, IReadOnlyList<KeyValuePair<TKey, TValue>> {
+ public bool TryAdd(TKey key, TValue value, out int index);
+ public bool TryGetValue(TKey key, [MaybeNullWhenAttribute(false)] out TValue value, out int index);
}
public class PriorityQueue<TElement, TPriority> {
+ public int Capacity { get; }
}
}
```

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

``` diff
namespace System.Collections.Immutable {
public static class ImmutableArray {
- public static ImmutableArray<T> Create<T>(Span<T> items);
+ [OverloadResolutionPriorityAttribute(-1)]
+ public static ImmutableArray<T> Create<T>(Span<T> items);
- public static ImmutableArray<T> ToImmutableArray<T>(this Span<T> items);
+ [OverloadResolutionPriorityAttribute(-1)]
+ public static ImmutableArray<T> ToImmutableArray<T>(this Span<T> items);
}
}
```

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

``` diff
namespace System.Collections.ObjectModel {
+ public static class ReadOnlyCollection {
+ public static ReadOnlyCollection<T> CreateCollection<T>([ParamCollectionAttribute, ScopedRefAttribute] ReadOnlySpan<T> values);
+ public static ReadOnlySet<T> CreateSet<T>([ParamCollectionAttribute, ScopedRefAttribute] ReadOnlySpan<T> values);
+ }
- public class ReadOnlyCollection<T> : ICollection, ICollection<T>, IEnumerable, IEnumerable<T>, IList, IList<T>, IReadOnlyCollection<T>, IReadOnlyList<T>
+ [CollectionBuilderAttribute(typeof(ReadOnlyCollection), "CreateCollection")]
+ public class ReadOnlyCollection<T> : ICollection, ICollection<T>, IEnumerable, IEnumerable<T>, IList, IList<T>, IReadOnlyCollection<T>, IReadOnlyList<T>
- public class ReadOnlySet<T> : ICollection, ICollection<T>, IEnumerable, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlySet<T>, ISet<T>
+ [CollectionBuilderAttribute(typeof(ReadOnlyCollection), "CreateSet")]
+ public class ReadOnlySet<T> : ICollection, ICollection<T>, IEnumerable, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlySet<T>, ISet<T>
}
```

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

``` diff
namespace System.Collections.Specialized {
public class StringCollection : ICollection, IEnumerable, IList {
- public void AddRange(string[] value);
+ public void AddRange(string?[] value);
- public void CopyTo(string[] array, int index);
+ public void CopyTo(string?[] array, int index);
}
}
```

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

``` diff
namespace System.Diagnostics.CodeAnalysis {
[FlagsAttribute]
public enum DynamicallyAccessedMemberTypes {
+ AllConstructors = 1064967,
+ AllEvents = 530432,
+ AllFields = 65632,
+ AllMethods = 32792,
+ AllNestedTypes = 2228608,
+ AllProperties = 263680,
+ NonPublicConstructorsWithInherited = 16388,
+ NonPublicEventsWithInherited = 528384,
+ NonPublicFieldsWithInherited = 65600,
+ NonPublicMethodsWithInherited = 32784,
+ NonPublicNestedTypesWithInherited = 131328,
+ NonPublicPropertiesWithInherited = 263168,
+ PublicConstructorsWithInherited = 1048579,
+ PublicNestedTypesWithInherited = 2097280,
}
[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Module | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false)]
public sealed class ExperimentalAttribute : Attribute {
+ public string Message { get; set; }
- public string? UrlFormat { get; set; }
+ public string UrlFormat { get; set; }
}
}
```

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

``` diff
namespace System.Formats.Asn1 {
public sealed class AsnWriter {
+ public TReturn Encode<TReturn>(Func<ReadOnlySpan<byte>, TReturn> encodeCallback);
+ public TReturn Encode<TState, TReturn>(TState state, Func<TState, ReadOnlySpan<byte>, TReturn> encodeCallback);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# System.Globalization

``` diff
namespace System.Globalization {
[FlagsAttribute]
public enum CompareOptions {
+ NumericOrdering = 32,
}
public static class ISOWeek {
+ public static int GetWeekOfYear(DateOnly date);
+ public static int GetYear(DateOnly date);
+ public static DateOnly ToDateOnly(int year, int week, DayOfWeek dayOfWeek);
}
}
```

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

``` diff
namespace System.IO {
public class BinaryReader : IDisposable {
+ public virtual void ReadExactly(Span<byte> buffer);
}
public class StreamReader : TextReader {
- public StreamReader(Stream stream, Encoding encoding);
+ public StreamReader(Stream stream, Encoding? encoding);
- public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks);
+ public StreamReader(Stream stream, Encoding? encoding, bool detectEncodingFromByteOrderMarks);
- public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize);
+ public StreamReader(Stream stream, Encoding? encoding, bool detectEncodingFromByteOrderMarks, int bufferSize);
- public StreamReader(string path, Encoding encoding);
+ public StreamReader(string path, Encoding? encoding);
- public StreamReader(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks);
+ public StreamReader(string path, Encoding? encoding, bool detectEncodingFromByteOrderMarks);
- public StreamReader(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize);
+ public StreamReader(string path, Encoding? encoding, bool detectEncodingFromByteOrderMarks, int bufferSize);
- public StreamReader(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, FileStreamOptions options);
+ public StreamReader(string path, Encoding? encoding, bool detectEncodingFromByteOrderMarks, FileStreamOptions options);
}
public class StreamWriter : TextWriter {
- public StreamWriter(Stream stream, Encoding encoding);
+ public StreamWriter(Stream stream, Encoding? encoding);
- public StreamWriter(Stream stream, Encoding encoding, int bufferSize);
+ public StreamWriter(Stream stream, Encoding? encoding, int bufferSize);
- public StreamWriter(string path, bool append, Encoding encoding);
+ public StreamWriter(string path, bool append, Encoding? encoding);
- public StreamWriter(string path, bool append, Encoding encoding, int bufferSize);
+ public StreamWriter(string path, bool append, Encoding? encoding, int bufferSize);
- public StreamWriter(string path, Encoding encoding, FileStreamOptions options);
+ public StreamWriter(string path, Encoding? encoding, FileStreamOptions options);
}
}
```

Loading