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 and .NET 9 Preview 1 #9176

Merged
merged 8 commits into from
Feb 21, 2024
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,14 @@
# API Difference 8.0-GA vs 9.0-preview1

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

* [Microsoft.AspNetCore.Antiforgery](9.0-preview1_Microsoft.AspNetCore.Antiforgery.md)
* [Microsoft.AspNetCore.Builder](9.0-preview1_Microsoft.AspNetCore.Builder.md)
* [Microsoft.AspNetCore.Mvc](9.0-preview1_Microsoft.AspNetCore.Mvc.md)
* [Microsoft.AspNetCore.Routing](9.0-preview1_Microsoft.AspNetCore.Routing.md)
* [Microsoft.Extensions.Caching.Memory](9.0-preview1_Microsoft.Extensions.Caching.Memory.md)
* [Microsoft.Extensions.DependencyInjection](9.0-preview1_Microsoft.Extensions.DependencyInjection.md)
* [Microsoft.Extensions.FileProviders.Physical](9.0-preview1_Microsoft.Extensions.FileProviders.Physical.md)
* [Microsoft.JSInterop](9.0-preview1_Microsoft.JSInterop.md)

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

``` diff
namespace Microsoft.AspNetCore.Antiforgery {
public class AntiforgeryOptions {
+ public bool SuppressReadingTokenFromFormBody { 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 RateLimiterServiceCollectionExtensions {
+ public static IServiceCollection AddRateLimiter(this IServiceCollection services);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Mvc {
public abstract class ControllerBase {
- public virtual ObjectResult Problem(string? detail = null, string? instance = null, int? statusCode = default(int?), string? title = null, string? type = null);
+ public virtual ObjectResult Problem(string? detail, string? instance, int? statusCode, string? title, string? type);
+ public virtual ObjectResult Problem(string? detail = null, string? instance = null, int? statusCode = default(int?), string? title = null, string? type = null, IDictionary<string, object?>? extensions = null);
- public virtual ActionResult ValidationProblem(string? detail = null, string? instance = null, int? statusCode = default(int?), string? title = null, string? type = null, ModelStateDictionary? modelStateDictionary = null);
+ public virtual ActionResult ValidationProblem(string? detail, string? instance, int? statusCode, string? title, string? type, ModelStateDictionary? modelStateDictionary);
+ public virtual ActionResult ValidationProblem(string? detail = null, string? instance = null, int? statusCode = default(int?), string? title = null, string? type = null, ModelStateDictionary? modelStateDictionary = null, IDictionary<string, object?>? extensions = null);
}
}
```

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

``` diff
namespace Microsoft.AspNetCore.Routing {
public static class RouteHandlerServices {
+ public static RouteHandlerBuilder Map(IEndpointRouteBuilder endpoints, string pattern, Delegate handler, IEnumerable<string>? httpMethods, Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> createRequestDelegate, MethodInfo methodInfo);
}
}
```

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

``` diff
namespace Microsoft.Extensions.Caching.Memory {
public static class CacheExtensions {
+ public static TItem? GetOrCreate<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, TItem> factory, MemoryCacheEntryOptions? createOptions);
+ public static Task<TItem?> GetOrCreateAsync<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory, MemoryCacheEntryOptions? createOptions);
}
public class MemoryCache : IDisposable, IMemoryCache {
+ public IEnumerable<object> Keys { get; }
}
}
```

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

``` diff
namespace Microsoft.Extensions.DependencyInjection {
public static class HttpLoggingServicesExtensions {
+ public static IServiceCollection AddHttpLogging(this IServiceCollection services);
}
}
```

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

``` diff
namespace Microsoft.Extensions.FileProviders.Physical {
- public class PhysicalDirectoryInfo : IFileInfo {
+ public class PhysicalDirectoryInfo : IDirectoryContents, IEnumerable, IEnumerable<IFileInfo>, IFileInfo {
+ public IEnumerator<IFileInfo> GetEnumerator();
+ IEnumerator IEnumerable.GetEnumerator();
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Microsoft.JSInterop

``` diff
namespace Microsoft.JSInterop {
- public interface IJSUnmarshalledObjectReference : IAsyncDisposable, IDisposable, IJSInProcessObjectReference, IJSObjectReference {
{
- TResult InvokeUnmarshalled<T0, T1, T2, TResult>(string identifier, T0 arg0, T1 arg1, T2 arg2);

- TResult InvokeUnmarshalled<T0, T1, TResult>(string identifier, T0 arg0, T1 arg1);

- TResult InvokeUnmarshalled<T0, TResult>(string identifier, T0 arg0);

- TResult InvokeUnmarshalled<TResult>(string identifier);

- }
- public interface IJSUnmarshalledRuntime {
{
- TResult InvokeUnmarshalled<T0, T1, T2, TResult>(string identifier, T0 arg0, T1 arg1, T2 arg2);

- TResult InvokeUnmarshalled<T0, T1, TResult>(string identifier, T0 arg0, T1 arg1);

- TResult InvokeUnmarshalled<T0, TResult>(string identifier, T0 arg0);

- TResult InvokeUnmarshalled<TResult>(string identifier);

- }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# API Difference 8.0-GA vs 9.0-preview1

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

* [System](9.0-preview1_System.md)
* [System.Buffers](9.0-preview1_System.Buffers.md)
* [System.Collections.Generic](9.0-preview1_System.Collections.Generic.md)
* [System.IO](9.0-preview1_System.IO.md)
* [System.Linq](9.0-preview1_System.Linq.md)
* [System.Net](9.0-preview1_System.Net.md)
* [System.Net.Quic](9.0-preview1_System.Net.Quic.md)
* [System.Net.Security](9.0-preview1_System.Net.Security.md)
* [System.Reflection.Emit](9.0-preview1_System.Reflection.Emit.md)
* [System.Reflection.PortableExecutable](9.0-preview1_System.Reflection.PortableExecutable.md)
* [System.Runtime.CompilerServices](9.0-preview1_System.Runtime.CompilerServices.md)
* [System.Runtime.InteropServices](9.0-preview1_System.Runtime.InteropServices.md)
* [System.Runtime.InteropServices.Marshalling](9.0-preview1_System.Runtime.InteropServices.Marshalling.md)
* [System.Runtime.InteropServices.Swift](9.0-preview1_System.Runtime.InteropServices.Swift.md)
* [System.Runtime.Intrinsics](9.0-preview1_System.Runtime.Intrinsics.md)
* [System.Runtime.Intrinsics.X86](9.0-preview1_System.Runtime.Intrinsics.X86.md)
* [System.Security.Cryptography](9.0-preview1_System.Security.Cryptography.md)
* [System.Text](9.0-preview1_System.Text.md)
* [System.Text.Json](9.0-preview1_System.Text.Json.md)
* [System.Text.Json.Serialization](9.0-preview1_System.Text.Json.Serialization.md)
* [System.Threading](9.0-preview1_System.Threading.md)
* [System.Threading.Tasks](9.0-preview1_System.Threading.Tasks.md)
* [System.Timers](9.0-preview1_System.Timers.md)

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

``` diff
namespace System.Buffers {
public static class SearchValues {
+ public static SearchValues<String> Create(ReadOnlySpan<string> values, StringComparison comparisonType);
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved
}
}
```

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

``` diff
namespace System.Collections.Generic {
public class Dictionary<TKey, TValue> : ICollection, ICollection<KeyValuePair<TKey, TValue>>, IDeserializationCallback, IDictionary, IDictionary<TKey, TValue>, IEnumerable, IEnumerable<KeyValuePair<TKey, TValue>>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IReadOnlyDictionary<TKey, TValue>, ISerializable {
+ public int Capacity { get; }
}
public class HashSet<T> : ICollection<T>, IDeserializationCallback, IEnumerable, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlySet<T>, ISerializable, ISet<T> {
+ public int Capacity { get; }
+ public void TrimExcess(int capacity);
}
public class PriorityQueue<TElement, TPriority> {
+ public bool Remove(TElement element, out TElement removedElement, out TPriority priority, IEqualityComparer<TElement>? equalityComparer = null);
public sealed class UnorderedItemsCollection : ICollection, IEnumerable, IEnumerable<(TElement, TPriority)>, IReadOnlyCollection<(TElement, TPriority)> {
- IEnumerator<(TElement Element, TPriority Priority)> IEnumerable<(TElement, TPriority)>.GetEnumerator();

+ IEnumerator<(TElement Element, TPriority Priority)> IEnumerable<(TElement, TPriority)>.GetEnumerator();
public struct Enumerator : IDisposable, IEnumerator, IEnumerator<(TElement, TPriority)> {
- (TElement Element, TPriority Priority) IEnumerator<(TElement, TPriority)>.Current { get; }

+ (TElement Element, TPriority Priority) IEnumerator<(TElement, TPriority)>.Current { get; }
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
public class Queue<T> : ICollection, IEnumerable, IEnumerable<T>, IReadOnlyCollection<T> {
+ public int Capacity { get; }
+ public void TrimExcess(int capacity);
}
public class Stack<T> : ICollection, IEnumerable, IEnumerable<T>, IReadOnlyCollection<T> {
+ public int Capacity { get; }
+ public void TrimExcess(int capacity);
}
}
```

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

``` diff
namespace System.IO {
public sealed class DirectoryInfo : FileSystemInfo {
- public override string ToString();

}
public static class File {
+ public static void AppendAllBytes(string path, byte[] bytes);
+ public static Task AppendAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken = default(CancellationToken));
}
public abstract class TextWriter : MarshalByRefObject, IAsyncDisposable, IDisposable {
+ public static TextWriter CreateBroadcasting(params TextWriter[] writers);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# System.Linq

``` diff
namespace System.Linq {
public static class Enumerable {
+ public static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer = null);
+ public static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer = null);
+ public static IEnumerable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer = null);
+ public static IEnumerable<(int Index, TSource Item)> Index<TSource>(this IEnumerable<TSource> source);
}
public static class Queryable {
+ public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, TAccumulate>> seedSelector, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null);
+ public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null);
+ public static IQueryable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer = null);
+ public static IQueryable<(int Index, TSource Item)> Index<TSource>(this IQueryable<TSource> source);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# System.Net.Quic
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved

``` diff
namespace System.Net.Quic {
public abstract class QuicConnectionOptions {
+ public TimeSpan HandshakeTimeout { get; set; }
+ public QuicReceiveWindowSizes InitialReceiveWindowSizes { get; set; }
+ public TimeSpan KeepAliveInterval { get; set; }
}
+ public sealed class QuicReceiveWindowSizes {
+ public QuicReceiveWindowSizes();
+ public int Connection { get; set; }
+ public int LocallyInitiatedBidirectionalStream { get; set; }
+ public int RemotelyInitiatedBidirectionalStream { get; set; }
+ public int UnidirectionalStream { get; set; }
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# System.Net.Security
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved

``` diff
namespace System.Net.Security {
public sealed class NegotiateAuthentication : IDisposable {
+ public void ComputeIntegrityCheck(ReadOnlySpan<byte> message, IBufferWriter<byte> signatureWriter);
+ public bool VerifyIntegrityCheck(ReadOnlySpan<byte> message, ReadOnlySpan<byte> signature);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# System.Net
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved

``` diff
namespace System.Net {
public sealed class HttpListenerRequest {
- public string UserAgent { get; }
+ public string? UserAgent { get; }
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# System.Reflection.Emit
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved

``` diff
namespace System.Reflection.Emit {
public abstract class AssemblyBuilder : Assembly {
+ public static AssemblyBuilder DefinePersistedAssembly(AssemblyName name, Assembly coreAssembly, IEnumerable<CustomAttributeBuilder>? assemblyAttributes = null);
+ public void Save(Stream stream);
+ public void Save(string assemblyFileName);
+ protected virtual void SaveCore(Stream stream);
}
public abstract class ILGenerator {
+ protected static Label CreateLabel(int id);
}
public readonly struct Label : IEquatable<Label> {
+ public int Id { get; }
}
- public sealed class LocalBuilder : LocalVariableInfo {
+ public abstract class LocalBuilder : LocalVariableInfo {
+ protected LocalBuilder();
}
public readonly struct OpCode : IEquatable<OpCode> {
+ public int EvaluationStackDelta { get; }
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# System.Reflection.PortableExecutable

``` diff
namespace System.Reflection.PortableExecutable {
public enum Machine : ushort {
+ RiscV128 = (ushort)20776,
+ RiscV32 = (ushort)20530,
+ RiscV64 = (ushort)20580,
}
}
```

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

``` diff
namespace System.Runtime.CompilerServices {
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved
+ public class CallConvSwift {
+ public CallConvSwift();
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# System.Runtime.InteropServices.Marshalling

``` diff
namespace System.Runtime.InteropServices.Marshalling {
+ public struct ComVariant : IDisposable {
+ public static ComVariant Null { get; }
+ public VarEnum VarType { get; }
+ public T? As<T>();
+ public static ComVariant Create<T>(T value);
+ public static ComVariant CreateRaw<T>(VarEnum vt, T rawValue) where T : struct;
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved
+ public void Dispose();
+ public ref T GetRawDataRef<T>() where T : struct;
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved
+ }
+ public static class ComVariantMarshaller {
+ public static object ConvertToManaged(ComVariant unmanaged);
+ public static ComVariant ConvertToUnmanaged(object managed);
+ public static void Free(ComVariant unmanaged);
+ public struct RefPropagate {
+ public void Free();
+ public void FromManaged(object managed);
+ public void FromUnmanaged(ComVariant unmanaged);
+ public object ToManaged();
+ public ComVariant ToUnmanaged();
+ }
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# System.Runtime.InteropServices.Swift

``` diff
+namespace System.Runtime.InteropServices.Swift {
+ public readonly struct SwiftError {
+ public unsafe SwiftError(void* value);
+ public unsafe void* Value { get; }
+ }
+ public readonly struct SwiftSelf {
+ public unsafe SwiftSelf(void* value);
+ public unsafe void* Value { get; }
+ }
+}
```

Loading
Loading