Skip to content

Commit

Permalink
add api diff for preview5 (#6330)
Browse files Browse the repository at this point in the history
* add api diff for preview5

* removing changes where we make the crypto ref as part of ref pack
  • Loading branch information
Anipik authored Jun 8, 2021
1 parent f25694d commit 2f31567
Show file tree
Hide file tree
Showing 32 changed files with 1,168 additions and 0 deletions.
24 changes: 24 additions & 0 deletions release-notes/6.0/preview/api-diff/preview5/.Net/6.0-preview5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# API Difference 6.0.0-preview4 vs 6.0.0-preview5

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

* [System](6.0-preview5_System.md)
* [System.Diagnostics.CodeAnalysis](6.0-preview5_System.Diagnostics.CodeAnalysis.md)
* [System.Diagnostics.Metrics](6.0-preview5_System.Diagnostics.Metrics.md)
* [System.IO](6.0-preview5_System.IO.md)
* [System.Net.Http.Json](6.0-preview5_System.Net.Http.Json.md)
* [System.Net.Quic](6.0-preview5_System.Net.Quic.md)
* [System.Net.Sockets](6.0-preview5_System.Net.Sockets.md)
* [System.Net.WebSockets](6.0-preview5_System.Net.WebSockets.md)
* [System.Numerics](6.0-preview5_System.Numerics.md)
* [System.Runtime.CompilerServices](6.0-preview5_System.Runtime.CompilerServices.md)
* [System.Runtime.InteropServices](6.0-preview5_System.Runtime.InteropServices.md)
* [System.Runtime.InteropServices.ObjectiveC](6.0-preview5_System.Runtime.InteropServices.ObjectiveC.md)
* [System.Runtime.Versioning](6.0-preview5_System.Runtime.Versioning.md)
* [System.Security.Cryptography](6.0-preview5_System.Security.Cryptography.md)
* [System.Text.Json.Node](6.0-preview5_System.Text.Json.Node.md)
* [System.Text.Json.Nodes](6.0-preview5_System.Text.Json.Nodes.md)
* [System.Text.Json.Serialization](6.0-preview5_System.Text.Json.Serialization.md)
* [System.Text.Json.Serialization.Metadata](6.0-preview5_System.Text.Json.Serialization.Metadata.md)

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

``` diff
namespace System.Diagnostics.CodeAnalysis {
public enum DynamicallyAccessedMemberTypes {
+ Interfaces = 8192,
}
}
```

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

``` diff
+namespace System.Diagnostics.Metrics {
+ public sealed class Counter<T> : Instrument<T> where T : struct {
+ public void Add(T delta);
+ public void Add(T delta, KeyValuePair<string, object> tag);
+ public void Add(T delta, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2);
+ public void Add(T delta, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2, KeyValuePair<string, object> tag3);
+ public void Add(T delta, params KeyValuePair<string, object>[] tags);
+ public void Add(T delta, ReadOnlySpan<KeyValuePair<string, object>> tags);
+ }
+ public sealed class Histogram<T> : Instrument<T> where T : struct {
+ public void Record(T value);
+ public void Record(T value, KeyValuePair<string, object> tag);
+ public void Record(T value, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2);
+ public void Record(T value, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2, KeyValuePair<string, object> tag3);
+ public void Record(T value, params KeyValuePair<string, object>[] tags);
+ public void Record(T value, ReadOnlySpan<KeyValuePair<string, object>> tags);
+ }
+ public abstract class Instrument {
+ protected Instrument(Meter meter, string name, string unit, string description);
+ public string Description { get; }
+ public bool Enabled { get; }
+ public virtual bool IsObservable { get; }
+ public Meter Meter { get; }
+ public string Name { get; }
+ public string Unit { get; }
+ protected void Publish();
+ }
+ public abstract class Instrument<T> : Instrument where T : struct {
+ protected Instrument(Meter meter, string name, string unit, string description);
+ protected void RecordMeasurement(T measurement);
+ protected void RecordMeasurement(T measurement, KeyValuePair<string, object> tag);
+ protected void RecordMeasurement(T measurement, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2);
+ protected void RecordMeasurement(T measurement, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2, KeyValuePair<string, object> tag3);
+ protected void RecordMeasurement(T measurement, ReadOnlySpan<KeyValuePair<string, object>> tags);
+ }
+ public readonly struct Measurement<T> where T : struct {
+ public Measurement(T value);
+ public Measurement(T value, IEnumerable<KeyValuePair<string, object>> tags);
+ public Measurement(T value, params KeyValuePair<string, object>[] tags);
+ public Measurement(T value, ReadOnlySpan<KeyValuePair<string, object>> tags);
+ public ReadOnlySpan<KeyValuePair<string, object>> Tags { get; }
+ public T Value { get; }
+ }
+ public delegate void MeasurementCallback<T>(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string, object>> tags, object state);
+ public class Meter : IDisposable {
+ public Meter(string name);
+ public Meter(string name, string version);
+ public string Name { get; }
+ public string Version { get; }
+ public Counter<T> CreateCounter<T>(string name, string unit = null, string description = null) where T : struct;
+ public Histogram<T> CreateHistogram<T>(string name, string unit = null, string description = null) where T : struct;
+ public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string unit = null, string description = null) where T : struct;
+ public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<Measurement<T>> observeValue, string unit = null, string description = null) where T : struct;
+ public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<T> observeValue, string unit = null, string description = null) where T : struct;
+ public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string unit = null, string description = null) where T : struct;
+ public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<Measurement<T>> observeValue, string unit = null, string description = null) where T : struct;
+ public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<T> observeValue, string unit = null, string description = null) where T : struct;
+ public void Dispose();
+ }
+ public sealed class MeterListener : IDisposable {
+ public MeterListener();
+ public Action<Instrument, MeterListener> InstrumentPublished { get; set; }
+ public Action<Instrument, object> MeasurementsCompleted { get; set; }
+ public object DisableMeasurementEvents(Instrument instrument);
+ public void Dispose();
+ public void EnableMeasurementEvents(Instrument instrument, object state = null);
+ public void RecordObservableInstruments();
+ public void SetMeasurementEventCallback<T>(MeasurementCallback<T> measurementCallback) where T : struct;
+ public void Start();
+ }
+ public sealed class ObservableCounter<T> : ObservableInstrument<T> where T : struct {
+ protected override IEnumerable<Measurement<T>> Observe();
+ }
+ public sealed class ObservableGauge<T> : ObservableInstrument<T> where T : struct {
+ protected override IEnumerable<Measurement<T>> Observe();
+ }
+ public abstract class ObservableInstrument<T> : Instrument where T : struct {
+ protected ObservableInstrument(Meter meter, string name, string unit, string description);
+ public override bool IsObservable { get; }
+ protected abstract IEnumerable<Measurement<T>> Observe();
+ }
+}
```

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

``` diff
namespace System.IO {
public class FileStream : Stream {
+ public FileStream(string path, FileStreamOptions options);
}
+ public sealed class FileStreamOptions {
+ public FileStreamOptions();
+ public FileAccess Access { get; set; }
+ public FileMode Mode { get; set; }
+ public FileOptions Options { get; set; }
+ public long PreallocationSize { get; set; }
+ public FileShare Share { get; set; }
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# System.Net.Http.Json

``` diff
namespace System.Net.Http.Json {
public static class HttpClientJsonExtensions {
+ public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default(CancellationToken));
+ public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default(CancellationToken));
+ public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default(CancellationToken));
+ public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default(CancellationToken));
}
}
```

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

``` diff
namespace System.Net.Quic {
public sealed class QuicListener : IDisposable {
- public void Close();

- public void Start();

}
public sealed class QuicStream : Stream {
+ public ValueTask ShutdownCompleted(CancellationToken cancellationToken = default(CancellationToken));
}
}
```

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

``` diff
namespace System.Net.Sockets {
public class Socket : IDisposable {
+ public ValueTask DisconnectAsync(bool reuseSocket, CancellationToken cancellationToken = default(CancellationToken));
+ public int ReceiveFrom(Span<byte> buffer, ref EndPoint remoteEP);
+ public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, ref EndPoint remoteEP);
+ public ValueTask SendFileAsync(string fileName, ReadOnlyMemory<byte> preBuffer, ReadOnlyMemory<byte> postBuffer, TransmitFileOptions flags, CancellationToken cancellationToken = default(CancellationToken));
+ public ValueTask SendFileAsync(string fileName, CancellationToken cancellationToken = default(CancellationToken));
+ public int SendTo(ReadOnlySpan<byte> buffer, EndPoint remoteEP);
+ public int SendTo(ReadOnlySpan<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# System.Net.WebSockets

``` diff
namespace System.Net.WebSockets {
public sealed class ClientWebSocketOptions {
+ public WebSocketDeflateOptions DangerousDeflateOptions { get; set; }
}
public abstract class WebSocket : IDisposable {
+ public static WebSocket CreateFromStream(Stream stream, WebSocketCreationOptions options);
+ public virtual ValueTask SendAsync(ReadOnlyMemory<byte> buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken);
}
+ public sealed class WebSocketCreationOptions {
+ public WebSocketCreationOptions();
+ public WebSocketDeflateOptions DangerousDeflateOptions { get; set; }
+ public bool IsServer { get; set; }
+ public TimeSpan KeepAliveInterval { get; set; }
+ public string SubProtocol { get; set; }
+ }
+ public sealed class WebSocketDeflateOptions {
+ public WebSocketDeflateOptions();
+ public bool ClientContextTakeover { get; set; }
+ public int ClientMaxWindowBits { get; set; }
+ public bool ServerContextTakeover { get; set; }
+ public int ServerMaxWindowBits { get; set; }
+ }
+ public enum WebSocketMessageFlags {
+ DisableCompression = 2,
+ EndOfMessage = 1,
+ None = 0,
+ }
}
```

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

``` diff
namespace System.Numerics {
- public struct Complex : IEquatable<Complex>, IFormattable
+ public readonly struct Complex : IEquatable<Complex>, IFormattable
public static class Vector {
+ public static Vector<IntPtr> AsVectorNInt<T>(Vector<T> value) where T : struct;
+ public static Vector<UIntPtr> AsVectorNUInt<T>(Vector<T> value) where T : struct;
}
public struct Vector<T> : IEquatable<Vector<T>>, IFormattable where T : struct {
+ public static explicit operator Vector<IntPtr> (Vector<T> value);
+ public static explicit operator Vector<UIntPtr> (Vector<T> value);
}
}
```

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

``` diff
namespace System.Runtime.CompilerServices {
public static class RuntimeFeature {
+ public const string VirtualStaticsInInterfaces = "VirtualStaticsInInterfaces";
}
}
```

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

``` diff
+namespace System.Runtime.InteropServices.ObjectiveC {
+ public static class ObjectiveCMarshal {
+ public static GCHandle CreateReferenceTrackingHandle(object obj, out Span<IntPtr> taggedMemory);
+ public unsafe static void Initialize(function void () beginEndCallback, function int (IntPtr) isReferencedCallback, function void (IntPtr) trackedObjectEnteredFinalization, ObjectiveCMarshal.UnhandledExceptionPropagationHandler unhandledExceptionPropagationHandler);
+ public static void SetMessageSendCallback(ObjectiveCMarshal.MessageSendFunction msgSendFunction, IntPtr func);
+ public static void SetMessageSendPendingException(Exception exception);
+ public enum MessageSendFunction {
+ MsgSend = 0,
+ MsgSendFpret = 1,
+ MsgSendStret = 2,
+ MsgSendSuper = 3,
+ MsgSendSuperStret = 4,
+ }
+ public unsafe delegate function void (IntPtr) UnhandledExceptionPropagationHandler(Exception exception, RuntimeMethodHandle lastMethod, out IntPtr context);
+ }
+ public sealed class ObjectiveCTrackedTypeAttribute : Attribute {
+ public ObjectiveCTrackedTypeAttribute();
+ }
+}
```

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

``` diff
namespace System.Runtime.InteropServices {
- public struct ArrayWithOffset
+ public readonly struct ArrayWithOffset
public static class Marshal {
+ public static int GetLastPInvokeError();
+ public static int GetLastSystemError();
+ public static void SetLastPInvokeError(int error);
+ public static void SetLastSystemError(int error);
}
}
```

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

``` diff
namespace System.Runtime.Versioning {
+ public sealed class RequiresPreviewFeaturesAttribute : Attribute {
+ public RequiresPreviewFeaturesAttribute();
+ }
+ public sealed class SupportedOSPlatformGuardAttribute : OSPlatformAttribute {
+ public SupportedOSPlatformGuardAttribute(string platformName);
+ }
+ public sealed class UnsupportedOSPlatformGuardAttribute : OSPlatformAttribute {
+ public UnsupportedOSPlatformGuardAttribute(string platformName);
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# System.Security.Cryptography

``` diff
namespace System.Security.Cryptography {
public sealed class AesCcm : IDisposable {
+ public static bool IsSupported { get; }
}
public sealed class AesGcm : IDisposable {
+ public static bool IsSupported { get; }
}
+ public sealed class ChaCha20Poly1305 : IDisposable {
+ public ChaCha20Poly1305(byte[] key);
+ public ChaCha20Poly1305(ReadOnlySpan<byte> key);
+ public static bool IsSupported { get; }
+ public void Decrypt(byte[] nonce, byte[] ciphertext, byte[] tag, byte[] plaintext, byte[] associatedData = null);
+ public void Decrypt(ReadOnlySpan<byte> nonce, ReadOnlySpan<byte> ciphertext, ReadOnlySpan<byte> tag, Span<byte> plaintext, ReadOnlySpan<byte> associatedData = default(ReadOnlySpan<byte>));
+ public void Dispose();
+ public void Encrypt(byte[] nonce, byte[] plaintext, byte[] ciphertext, byte[] tag, byte[] associatedData = null);
+ public void Encrypt(ReadOnlySpan<byte> nonce, ReadOnlySpan<byte> plaintext, Span<byte> ciphertext, Span<byte> tag, ReadOnlySpan<byte> associatedData = default(ReadOnlySpan<byte>));
+ }
}
```

Loading

0 comments on commit 2f31567

Please sign in to comment.