From d632c888568e2d2d36491dfe3adac731c04d6dea Mon Sep 17 00:00:00 2001 From: Radu Oancea Date: Wed, 23 Oct 2024 16:04:25 +0300 Subject: [PATCH 1/4] Uploaded API from Revamp PR - commit 6b263e6 --- UiPath.Ipc.net6.0-windows.received.txt | 264 +++++++++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 UiPath.Ipc.net6.0-windows.received.txt diff --git a/UiPath.Ipc.net6.0-windows.received.txt b/UiPath.Ipc.net6.0-windows.received.txt new file mode 100644 index 00000000..c99c698a --- /dev/null +++ b/UiPath.Ipc.net6.0-windows.received.txt @@ -0,0 +1,264 @@ +[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/UiPath/coreipc.git")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Playground")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.CoreIpc.BackCompat")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.CoreIpc.Tests")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.Ipc.TV")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.Ipc.Tests")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows7.0")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName=".NET 6.0")] +[assembly: System.Runtime.Versioning.TargetPlatform("Windows7.0")] +namespace UiPath.Ipc +{ + public readonly struct CallInfo + { + public CallInfo(bool newConnection, System.Reflection.MethodInfo method, object?[] arguments) { } + public object?[] Arguments { get; } + public System.Reflection.MethodInfo Method { get; } + public bool NewConnection { get; } + } + public sealed class ClientConfig : UiPath.Ipc.EndpointConfig, System.IEquatable + { + public ClientConfig() { } + public string DebugName { get; set; } + public UiPath.Ipc.ISerializer? Serializer { get; set; } + public System.Func? BeforeCall { get; init; } + public System.Func? BeforeConnect { get; init; } + public UiPath.Ipc.EndpointCollection? Callbacks { get; init; } + public Microsoft.Extensions.Logging.ILogger? Logger { get; init; } + public System.Threading.Tasks.TaskScheduler? Scheduler { get; init; } + public System.IServiceProvider? ServiceProvider { get; init; } + } + public abstract class ClientTransport : System.IEquatable + { + protected ClientTransport() { } + public abstract UiPath.Ipc.IClientState CreateState(); + public abstract void Validate(); + } + public class EndpointCollection : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + public EndpointCollection() { } + public void Add(System.Type type) { } + public void Add(UiPath.Ipc.EndpointSettings endpointSettings) { } + public void Add(System.Type contractType, object? instance) { } + public System.Collections.Generic.IEnumerator GetEnumerator() { } + } + public abstract class EndpointConfig : System.IEquatable + { + protected EndpointConfig() { } + public System.TimeSpan RequestTimeout { get; init; } + } + [System.Serializable] + public sealed class EndpointNotFoundException : System.ArgumentOutOfRangeException + { + public EndpointNotFoundException(string paramName, string serverDebugName, string endpointName) { } + public string EndpointName { get; } + public string ServerDebugName { get; } + } + public class EndpointSettings : System.IEquatable + { + public EndpointSettings(System.Type contractType, System.IServiceProvider serviceProvider) { } + public EndpointSettings(System.Type contractType, object? serviceInstance = null) { } + public System.Func? BeforeCall { get; set; } + public System.Type ContractType { get; } + public System.Threading.Tasks.TaskScheduler? Scheduler { get; set; } + public object? ServiceInstance { get; } + public System.IServiceProvider? ServiceProvider { get; } + public void Validate() { } + public virtual UiPath.Ipc.EndpointSettings WithServiceProvider(System.IServiceProvider? serviceProvider) { } + } + public sealed class EndpointSettings : UiPath.Ipc.EndpointSettings, System.IEquatable> + where TContract : class + { + public EndpointSettings(System.IServiceProvider serviceProvider) { } + public EndpointSettings(TContract? serviceInstance = null) { } + public override UiPath.Ipc.EndpointSettings WithServiceProvider(System.IServiceProvider? serviceProvider) { } + } + [System.Serializable] + public class Error : System.IEquatable + { + public Error(string Message, string StackTrace, string Type, UiPath.Ipc.Error? InnerError) { } + public UiPath.Ipc.Error? InnerError { get; init; } + public string Message { get; init; } + public string StackTrace { get; init; } + public string Type { get; init; } + public override string ToString() { } + [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("exception")] + public static UiPath.Ipc.Error? FromException(System.Exception? exception) { } + } + public interface IClient + { + TCallbackInterface GetCallback() + where TCallbackInterface : class; + void Impersonate(System.Action action); + } + public interface IClientState : System.IDisposable + { + System.IO.Stream? Network { get; } + System.Threading.Tasks.ValueTask Connect(UiPath.Ipc.IpcClient client, System.Threading.CancellationToken ct); + bool IsConnected(); + } + public static class IOHelpers + { + public static System.IO.Pipes.PipeSecurity Allow(this System.IO.Pipes.PipeSecurity pipeSecurity, System.Security.Principal.IdentityReference sid, System.IO.Pipes.PipeAccessRights pipeAccessRights) { } + public static System.IO.Pipes.PipeSecurity Allow(this System.IO.Pipes.PipeSecurity pipeSecurity, System.Security.Principal.WellKnownSidType sid, System.IO.Pipes.PipeAccessRights pipeAccessRights) { } + public static System.IO.Pipes.PipeSecurity AllowCurrentUser(this System.IO.Pipes.PipeSecurity pipeSecurity, bool onlyNonAdmin = false) { } + public static System.IO.Pipes.PipeSecurity Deny(this System.IO.Pipes.PipeSecurity pipeSecurity, System.Security.Principal.IdentityReference sid, System.IO.Pipes.PipeAccessRights pipeAccessRights) { } + public static System.IO.Pipes.PipeSecurity Deny(this System.IO.Pipes.PipeSecurity pipeSecurity, System.Security.Principal.WellKnownSidType sid, System.IO.Pipes.PipeAccessRights pipeAccessRights) { } + public static System.IO.Pipes.PipeSecurity LocalOnly(this System.IO.Pipes.PipeSecurity pipeSecurity) { } + public static bool PipeExists(string pipeName, int timeout = 1) { } + } + public interface ISerializer + { + object? Deserialize(string json, System.Type type); + System.Threading.Tasks.ValueTask DeserializeAsync(System.IO.Stream json, Microsoft.Extensions.Logging.ILogger? logger); + string Serialize(object? obj); + void Serialize(object? obj, System.IO.Stream stream); + } + public sealed class IpcClient + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public IpcClient() { } + public UiPath.Ipc.ClientConfig Config { get; init; } + public UiPath.Ipc.ClientTransport Transport { get; init; } + public TProxy GetProxy() + where TProxy : class { } + } + public class IpcProxy : System.Reflection.DispatchProxy, System.IDisposable + { + public IpcProxy() { } + public System.IO.Stream? Network { get; } + public event System.EventHandler ConnectionClosed; + public System.Threading.Tasks.ValueTask CloseConnection() { } + public void Dispose() { } + protected override object? Invoke(System.Reflection.MethodInfo? targetMethod, object?[]? args) { } + } + public sealed class IpcServer : System.IAsyncDisposable + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public IpcServer() { } + public UiPath.Ipc.EndpointCollection Endpoints { get; init; } + public System.Collections.Generic.IReadOnlyList Listeners { get; init; } + public System.Threading.Tasks.TaskScheduler? Scheduler { get; init; } + public System.IServiceProvider ServiceProvider { get; init; } + public System.Threading.Tasks.ValueTask DisposeAsync() { } + public void Start() { } + public System.Threading.Tasks.Task WaitForStart() { } + public System.Threading.Tasks.Task WaitForStop() { } + } + public abstract class ListenerConfig : UiPath.Ipc.EndpointConfig, System.IEquatable + { + protected ListenerConfig() { } + public System.Security.Cryptography.X509Certificates.X509Certificate? Certificate { get; init; } + public int ConcurrentAccepts { get; init; } + public byte MaxReceivedMessageSizeInMegabytes { get; init; } + } + public class Message + { + public Message() { } + [Newtonsoft.Json.JsonIgnore] + public UiPath.Ipc.IClient Client { get; set; } + [Newtonsoft.Json.JsonIgnore] + public System.TimeSpan RequestTimeout { get; set; } + public TCallbackInterface GetCallback() + where TCallbackInterface : class { } + public void ImpersonateClient(System.Action action) { } + } + public class Message : UiPath.Ipc.Message + { + public Message(TPayload payload) { } + public TPayload Payload { get; } + } + [System.Serializable] + public class RemoteException : System.Exception + { + public RemoteException(UiPath.Ipc.Error error) { } + public UiPath.Ipc.RemoteException? InnerException { get; } + public override string StackTrace { get; } + public string Type { get; } + public bool Is() + where TException : System.Exception { } + public override string ToString() { } + } +} +namespace UiPath.Ipc.Extensibility +{ + public interface IListenerConfig + where TSelf : UiPath.Ipc.ListenerConfig, UiPath.Ipc.Extensibility.IListenerConfig + where TListenerState : System.IAsyncDisposable + { + System.Threading.Tasks.ValueTask AwaitConnection(TListenerState listenerState, TConnectionState connectionState, System.Threading.CancellationToken ct); + TConnectionState CreateConnectionState(UiPath.Ipc.IpcServer server, TListenerState listenerState); + TListenerState CreateListenerState(UiPath.Ipc.IpcServer server); + System.Collections.Generic.IEnumerable Validate(); + } +} +namespace UiPath.Ipc.Transport.NamedPipe +{ + public sealed class NamedPipeListener : UiPath.Ipc.ListenerConfig, System.IEquatable, UiPath.Ipc.Extensibility.IListenerConfig + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public NamedPipeListener() { } + [Newtonsoft.Json.JsonIgnore] + public System.Action? AccessControl { get; init; } + public string PipeName { get; init; } + public string ServerName { get; init; } + public override string ToString() { } + } + public sealed class NamedPipeTransport : UiPath.Ipc.ClientTransport, System.IEquatable + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public NamedPipeTransport() { } + public bool AllowImpersonation { get; init; } + public string PipeName { get; init; } + public string ServerName { get; init; } + public override UiPath.Ipc.IClientState CreateState() { } + public override string ToString() { } + public override void Validate() { } + } +} +namespace UiPath.Ipc.Transport.Tcp +{ + public sealed class TcpListener : UiPath.Ipc.ListenerConfig, System.IEquatable, UiPath.Ipc.Extensibility.IListenerConfig + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public TcpListener() { } + public System.Net.IPEndPoint EndPoint { get; init; } + public override string ToString() { } + } + public sealed class TcpTransport : UiPath.Ipc.ClientTransport, System.IEquatable + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public TcpTransport() { } + public System.Net.IPEndPoint EndPoint { get; init; } + public override UiPath.Ipc.IClientState CreateState() { } + public override string ToString() { } + public override void Validate() { } + } +} +namespace UiPath.Ipc.Transport.WebSocket +{ + public sealed class WebSocketListener : UiPath.Ipc.ListenerConfig, System.IEquatable, UiPath.Ipc.Extensibility.IListenerConfig + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public WebSocketListener() { } + public System.Func> Accept { get; init; } + public override string ToString() { } + } + public sealed class WebSocketTransport : UiPath.Ipc.ClientTransport, System.IEquatable + { + [System.Obsolete("Constructors of types with required members are not supported in this version of " + + "your compiler.", true)] + public WebSocketTransport() { } + public System.Uri Uri { get; init; } + public override UiPath.Ipc.IClientState CreateState() { } + public override string ToString() { } + public override void Validate() { } + } +} \ No newline at end of file From af72ff8c406c63b2569dfc294fe1f3544c5485bb Mon Sep 17 00:00:00 2001 From: Eduard Dumitru Date: Tue, 26 Nov 2024 16:02:41 +0100 Subject: [PATCH 2/4] taking shape --- UiPath.Ipc.net6.0-windows.received.txt | 123 ++++++++----------------- 1 file changed, 40 insertions(+), 83 deletions(-) diff --git a/UiPath.Ipc.net6.0-windows.received.txt b/UiPath.Ipc.net6.0-windows.received.txt index c99c698a..8cfda51b 100644 --- a/UiPath.Ipc.net6.0-windows.received.txt +++ b/UiPath.Ipc.net6.0-windows.received.txt @@ -1,8 +1,8 @@ [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/UiPath/coreipc.git")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Playground")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.CoreIpc.BackCompat")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.CoreIpc.Extensions.Abstractions")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.CoreIpc.Tests")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.Ipc.TV")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UiPath.Ipc.Tests")] [assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows7.0")] [assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName=".NET 6.0")] @@ -16,23 +16,9 @@ namespace UiPath.Ipc public System.Reflection.MethodInfo Method { get; } public bool NewConnection { get; } } - public sealed class ClientConfig : UiPath.Ipc.EndpointConfig, System.IEquatable - { - public ClientConfig() { } - public string DebugName { get; set; } - public UiPath.Ipc.ISerializer? Serializer { get; set; } - public System.Func? BeforeCall { get; init; } - public System.Func? BeforeConnect { get; init; } - public UiPath.Ipc.EndpointCollection? Callbacks { get; init; } - public Microsoft.Extensions.Logging.ILogger? Logger { get; init; } - public System.Threading.Tasks.TaskScheduler? Scheduler { get; init; } - public System.IServiceProvider? ServiceProvider { get; init; } - } public abstract class ClientTransport : System.IEquatable { protected ClientTransport() { } - public abstract UiPath.Ipc.IClientState CreateState(); - public abstract void Validate(); } public class EndpointCollection : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -42,15 +28,8 @@ namespace UiPath.Ipc public void Add(System.Type contractType, object? instance) { } public System.Collections.Generic.IEnumerator GetEnumerator() { } } - public abstract class EndpointConfig : System.IEquatable + public sealed class EndpointNotFoundException : System.ArgumentException { - protected EndpointConfig() { } - public System.TimeSpan RequestTimeout { get; init; } - } - [System.Serializable] - public sealed class EndpointNotFoundException : System.ArgumentOutOfRangeException - { - public EndpointNotFoundException(string paramName, string serverDebugName, string endpointName) { } public string EndpointName { get; } public string ServerDebugName { get; } } @@ -58,7 +37,7 @@ namespace UiPath.Ipc { public EndpointSettings(System.Type contractType, System.IServiceProvider serviceProvider) { } public EndpointSettings(System.Type contractType, object? serviceInstance = null) { } - public System.Func? BeforeCall { get; set; } + public System.Func? BeforeIncomingCall { get; set; } public System.Type ContractType { get; } public System.Threading.Tasks.TaskScheduler? Scheduler { get; set; } public object? ServiceInstance { get; } @@ -73,7 +52,6 @@ namespace UiPath.Ipc public EndpointSettings(TContract? serviceInstance = null) { } public override UiPath.Ipc.EndpointSettings WithServiceProvider(System.IServiceProvider? serviceProvider) { } } - [System.Serializable] public class Error : System.IEquatable { public Error(string Message, string StackTrace, string Type, UiPath.Ipc.Error? InnerError) { } @@ -91,12 +69,6 @@ namespace UiPath.Ipc where TCallbackInterface : class; void Impersonate(System.Action action); } - public interface IClientState : System.IDisposable - { - System.IO.Stream? Network { get; } - System.Threading.Tasks.ValueTask Connect(UiPath.Ipc.IpcClient client, System.Threading.CancellationToken ct); - bool IsConnected(); - } public static class IOHelpers { public static System.IO.Pipes.PipeSecurity Allow(this System.IO.Pipes.PipeSecurity pipeSecurity, System.Security.Principal.IdentityReference sid, System.IO.Pipes.PipeAccessRights pipeAccessRights) { } @@ -105,21 +77,25 @@ namespace UiPath.Ipc public static System.IO.Pipes.PipeSecurity Deny(this System.IO.Pipes.PipeSecurity pipeSecurity, System.Security.Principal.IdentityReference sid, System.IO.Pipes.PipeAccessRights pipeAccessRights) { } public static System.IO.Pipes.PipeSecurity Deny(this System.IO.Pipes.PipeSecurity pipeSecurity, System.Security.Principal.WellKnownSidType sid, System.IO.Pipes.PipeAccessRights pipeAccessRights) { } public static System.IO.Pipes.PipeSecurity LocalOnly(this System.IO.Pipes.PipeSecurity pipeSecurity) { } + [System.ComponentModel.Browsable(false)] public static bool PipeExists(string pipeName, int timeout = 1) { } } - public interface ISerializer + public abstract class IpcBase { - object? Deserialize(string json, System.Type type); - System.Threading.Tasks.ValueTask DeserializeAsync(System.IO.Stream json, Microsoft.Extensions.Logging.ILogger? logger); - string Serialize(object? obj); - void Serialize(object? obj, System.IO.Stream stream); + protected IpcBase() { } + public System.TimeSpan RequestTimeout { get; set; } + public System.Threading.Tasks.TaskScheduler? Scheduler { get; set; } + public System.IServiceProvider? ServiceProvider { get; set; } } - public sealed class IpcClient + public sealed class IpcClient : UiPath.Ipc.IpcBase { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] public IpcClient() { } - public UiPath.Ipc.ClientConfig Config { get; init; } + public System.Func? BeforeConnect { get; set; } + public System.Func? BeforeOutgoingCall { get; set; } + public UiPath.Ipc.EndpointCollection? Callbacks { get; set; } + public Microsoft.Extensions.Logging.ILogger? Logger { get; init; } public UiPath.Ipc.ClientTransport Transport { get; init; } public TProxy GetProxy() where TProxy : class { } @@ -133,27 +109,21 @@ namespace UiPath.Ipc public void Dispose() { } protected override object? Invoke(System.Reflection.MethodInfo? targetMethod, object?[]? args) { } } - public sealed class IpcServer : System.IAsyncDisposable + public sealed class IpcServer : UiPath.Ipc.IpcBase, System.IAsyncDisposable { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] public IpcServer() { } public UiPath.Ipc.EndpointCollection Endpoints { get; init; } - public System.Collections.Generic.IReadOnlyList Listeners { get; init; } - public System.Threading.Tasks.TaskScheduler? Scheduler { get; init; } - public System.IServiceProvider ServiceProvider { get; init; } + public UiPath.Ipc.ServerTransport Transport { get; init; } public System.Threading.Tasks.ValueTask DisposeAsync() { } + [System.Diagnostics.CodeAnalysis.MemberNotNull(new string[] { + "Transport", + "_accepter"})] public void Start() { } public System.Threading.Tasks.Task WaitForStart() { } public System.Threading.Tasks.Task WaitForStop() { } } - public abstract class ListenerConfig : UiPath.Ipc.EndpointConfig, System.IEquatable - { - protected ListenerConfig() { } - public System.Security.Cryptography.X509Certificates.X509Certificate? Certificate { get; init; } - public int ConcurrentAccepts { get; init; } - public byte MaxReceivedMessageSizeInMegabytes { get; init; } - } public class Message { public Message() { } @@ -170,7 +140,6 @@ namespace UiPath.Ipc public Message(TPayload payload) { } public TPayload Payload { get; } } - [System.Serializable] public class RemoteException : System.Exception { public RemoteException(UiPath.Ipc.Error error) { } @@ -181,84 +150,72 @@ namespace UiPath.Ipc where TException : System.Exception { } public override string ToString() { } } -} -namespace UiPath.Ipc.Extensibility -{ - public interface IListenerConfig - where TSelf : UiPath.Ipc.ListenerConfig, UiPath.Ipc.Extensibility.IListenerConfig - where TListenerState : System.IAsyncDisposable + public abstract class ServerTransport { - System.Threading.Tasks.ValueTask AwaitConnection(TListenerState listenerState, TConnectionState connectionState, System.Threading.CancellationToken ct); - TConnectionState CreateConnectionState(UiPath.Ipc.IpcServer server, TListenerState listenerState); - TListenerState CreateListenerState(UiPath.Ipc.IpcServer server); - System.Collections.Generic.IEnumerable Validate(); + protected ServerTransport() { } + public int ConcurrentAccepts { get; set; } + public byte MaxReceivedMessageSizeInMegabytes { get; set; } } } namespace UiPath.Ipc.Transport.NamedPipe { - public sealed class NamedPipeListener : UiPath.Ipc.ListenerConfig, System.IEquatable, UiPath.Ipc.Extensibility.IListenerConfig + public sealed class NamedPipeClientTransport : UiPath.Ipc.ClientTransport, System.IEquatable { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] - public NamedPipeListener() { } - [Newtonsoft.Json.JsonIgnore] - public System.Action? AccessControl { get; init; } + public NamedPipeClientTransport() { } + public bool AllowImpersonation { get; init; } public string PipeName { get; init; } public string ServerName { get; init; } public override string ToString() { } } - public sealed class NamedPipeTransport : UiPath.Ipc.ClientTransport, System.IEquatable + public sealed class NamedPipeServerTransport : UiPath.Ipc.ServerTransport { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] - public NamedPipeTransport() { } - public bool AllowImpersonation { get; init; } + public NamedPipeServerTransport() { } + [Newtonsoft.Json.JsonIgnore] + public System.Action? AccessControl { get; init; } public string PipeName { get; init; } public string ServerName { get; init; } - public override UiPath.Ipc.IClientState CreateState() { } public override string ToString() { } - public override void Validate() { } } } namespace UiPath.Ipc.Transport.Tcp { - public sealed class TcpListener : UiPath.Ipc.ListenerConfig, System.IEquatable, UiPath.Ipc.Extensibility.IListenerConfig + public sealed class TcpClientTransport : UiPath.Ipc.ClientTransport, System.IEquatable { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] - public TcpListener() { } + public TcpClientTransport() { } public System.Net.IPEndPoint EndPoint { get; init; } public override string ToString() { } } - public sealed class TcpTransport : UiPath.Ipc.ClientTransport, System.IEquatable + public sealed class TcpServerTransport : UiPath.Ipc.ServerTransport { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] - public TcpTransport() { } + public TcpServerTransport() { } public System.Net.IPEndPoint EndPoint { get; init; } - public override UiPath.Ipc.IClientState CreateState() { } public override string ToString() { } - public override void Validate() { } } } namespace UiPath.Ipc.Transport.WebSocket { - public sealed class WebSocketListener : UiPath.Ipc.ListenerConfig, System.IEquatable, UiPath.Ipc.Extensibility.IListenerConfig + public sealed class WebSocketClientTransport : UiPath.Ipc.ClientTransport, System.IEquatable { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] - public WebSocketListener() { } - public System.Func> Accept { get; init; } + public WebSocketClientTransport() { } + public System.Uri Uri { get; init; } public override string ToString() { } } - public sealed class WebSocketTransport : UiPath.Ipc.ClientTransport, System.IEquatable + public sealed class WebSocketServerTransport : UiPath.Ipc.ServerTransport { [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] - public WebSocketTransport() { } - public System.Uri Uri { get; init; } - public override UiPath.Ipc.IClientState CreateState() { } + public WebSocketServerTransport() { } + public System.Func> Accept { get; init; } public override string ToString() { } - public override void Validate() { } } } \ No newline at end of file From 0339141c93b9ed4882ca74ed3b17707322049eea Mon Sep 17 00:00:00 2001 From: Eduard Dumitru Date: Wed, 27 Nov 2024 22:47:41 +0100 Subject: [PATCH 3/4] rename Endpoint.. to Contract.. (..Collection, ..Settings) - other simplifications --- UiPath.Ipc.net6.0-windows.received.txt | 44 ++++++++------------------ 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/UiPath.Ipc.net6.0-windows.received.txt b/UiPath.Ipc.net6.0-windows.received.txt index 8cfda51b..95fd1bdb 100644 --- a/UiPath.Ipc.net6.0-windows.received.txt +++ b/UiPath.Ipc.net6.0-windows.received.txt @@ -16,41 +16,26 @@ namespace UiPath.Ipc public System.Reflection.MethodInfo Method { get; } public bool NewConnection { get; } } - public abstract class ClientTransport : System.IEquatable + public abstract class ClientTransport : System.IEquatable { } + public class ContractCollection : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected ClientTransport() { } - } - public class EndpointCollection : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - public EndpointCollection() { } - public void Add(System.Type type) { } - public void Add(UiPath.Ipc.EndpointSettings endpointSettings) { } + public ContractCollection() { } + public void Add(System.Type contractType) { } + public void Add(UiPath.Ipc.ContractSettings endpointSettings) { } public void Add(System.Type contractType, object? instance) { } - public System.Collections.Generic.IEnumerator GetEnumerator() { } - } - public sealed class EndpointNotFoundException : System.ArgumentException - { - public string EndpointName { get; } - public string ServerDebugName { get; } + public System.Collections.Generic.IEnumerator GetEnumerator() { } } - public class EndpointSettings : System.IEquatable + public sealed class ContractSettings { - public EndpointSettings(System.Type contractType, System.IServiceProvider serviceProvider) { } - public EndpointSettings(System.Type contractType, object? serviceInstance = null) { } + public ContractSettings(System.Type contractType, System.IServiceProvider serviceProvider) { } + public ContractSettings(System.Type contractType, object? serviceInstance = null) { } public System.Func? BeforeIncomingCall { get; set; } - public System.Type ContractType { get; } public System.Threading.Tasks.TaskScheduler? Scheduler { get; set; } - public object? ServiceInstance { get; } - public System.IServiceProvider? ServiceProvider { get; } - public void Validate() { } - public virtual UiPath.Ipc.EndpointSettings WithServiceProvider(System.IServiceProvider? serviceProvider) { } } - public sealed class EndpointSettings : UiPath.Ipc.EndpointSettings, System.IEquatable> - where TContract : class + public sealed class EndpointNotFoundException : System.ArgumentException { - public EndpointSettings(System.IServiceProvider serviceProvider) { } - public EndpointSettings(TContract? serviceInstance = null) { } - public override UiPath.Ipc.EndpointSettings WithServiceProvider(System.IServiceProvider? serviceProvider) { } + public string EndpointName { get; } + public string ServerDebugName { get; } } public class Error : System.IEquatable { @@ -94,7 +79,7 @@ namespace UiPath.Ipc public IpcClient() { } public System.Func? BeforeConnect { get; set; } public System.Func? BeforeOutgoingCall { get; set; } - public UiPath.Ipc.EndpointCollection? Callbacks { get; set; } + public UiPath.Ipc.ContractCollection? Callbacks { get; set; } public Microsoft.Extensions.Logging.ILogger? Logger { get; init; } public UiPath.Ipc.ClientTransport Transport { get; init; } public TProxy GetProxy() @@ -114,7 +99,7 @@ namespace UiPath.Ipc [System.Obsolete("Constructors of types with required members are not supported in this version of " + "your compiler.", true)] public IpcServer() { } - public UiPath.Ipc.EndpointCollection Endpoints { get; init; } + public UiPath.Ipc.ContractCollection Endpoints { get; init; } public UiPath.Ipc.ServerTransport Transport { get; init; } public System.Threading.Tasks.ValueTask DisposeAsync() { } [System.Diagnostics.CodeAnalysis.MemberNotNull(new string[] { @@ -152,7 +137,6 @@ namespace UiPath.Ipc } public abstract class ServerTransport { - protected ServerTransport() { } public int ConcurrentAccepts { get; set; } public byte MaxReceivedMessageSizeInMegabytes { get; set; } } From 26eccce3e7fd85d115094f2080e8331e93918948 Mon Sep 17 00:00:00 2001 From: Eduard Dumitru Date: Thu, 28 Nov 2024 12:40:07 +0100 Subject: [PATCH 4/4] simplifications after review - decommission WaitForStop --- UiPath.Ipc.net6.0-windows.received.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/UiPath.Ipc.net6.0-windows.received.txt b/UiPath.Ipc.net6.0-windows.received.txt index 95fd1bdb..1290f0c3 100644 --- a/UiPath.Ipc.net6.0-windows.received.txt +++ b/UiPath.Ipc.net6.0-windows.received.txt @@ -107,7 +107,6 @@ namespace UiPath.Ipc "_accepter"})] public void Start() { } public System.Threading.Tasks.Task WaitForStart() { } - public System.Threading.Tasks.Task WaitForStop() { } } public class Message {