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

Feat/revamp #105

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
51ae923
taking shape
eduard-dumitru Jun 11, 2024
ee679a0
temporarily disable branch check for CI nuget push
eduard-dumitru Jun 11, 2024
f1927a2
Fix/namedpipe close (#97)
danutboanta Feb 2, 2024
047d405
cherry pick fix to Spurious Closed Pipes (ROBO-3083)
eduard-dumitru Jun 12, 2024
753be9c
rename assembly and package
eduard-dumitru Jun 12, 2024
a25cd01
fixes
eduard-dumitru Jun 12, 2024
22df014
decommission object params (#103)
eduard-dumitru Jun 26, 2024
2601f27
decommission cryptography
eduard-dumitru Jun 27, 2024
0959a95
change namespace from UiPath.CoreIpc to UiPath.Ipc
eduard-dumitru Jun 27, 2024
71cc234
fixes after namespace change
eduard-dumitru Jun 27, 2024
ab26f0c
fix tests
eduard-dumitru Jun 27, 2024
b53aeb0
reduce public api 1st round
eduard-dumitru Jun 27, 2024
8897b05
downgrade Microsoft.Extensions.DependencyInjection.Abstractions back …
eduard-dumitru Jul 1, 2024
a044fc5
revamp configuration and callback management
eduard-dumitru Jul 4, 2024
da0d120
static all the things almost
eduard-dumitru Jul 4, 2024
84f780e
taking shape
eduard-dumitru Jul 5, 2024
7158d57
extensibility
eduard-dumitru Jul 10, 2024
1df069a
after quick review
eduard-dumitru Jul 15, 2024
45e3370
simplify IpcServer config and decommission server's Callbacks setting
eduard-dumitru Jul 17, 2024
9f1a386
taking shape
eduard-dumitru Jul 17, 2024
b6930af
taking shape
eduard-dumitru Jul 24, 2024
481ef4e
taking shape
eduard-dumitru Jul 25, 2024
c87d9bf
working state
eduard-dumitru Jul 26, 2024
8f7f5be
tests taking shape
eduard-dumitru Jul 26, 2024
46ce612
fixes and test reconciliation
eduard-dumitru Jul 27, 2024
a491e3a
fix js NodeInterop
eduard-dumitru Jul 27, 2024
be30f9c
taking shape
eduard-dumitru Jul 29, 2024
4b29ac9
GetProxy simplification
eduard-dumitru Jul 29, 2024
5fdca6d
allow BeforeCall to set AsyncLocal for the targeted method itself
eduard-dumitru Jul 29, 2024
321dbe0
adjust public members
eduard-dumitru Jul 31, 2024
2b5b90a
system tests
eduard-dumitru Aug 4, 2024
7bfd50f
fix test brittleness
eduard-dumitru Aug 6, 2024
3506106
tests working
eduard-dumitru Aug 6, 2024
1cfc3c3
decomission Pollyfill nuget and replace it with manual polyfills
eduard-dumitru Aug 6, 2024
decb270
decommission Nito.AsyncEx
eduard-dumitru Aug 6, 2024
521e536
fix bug
eduard-dumitru Aug 7, 2024
c6c737c
decomission old tests
eduard-dumitru Aug 7, 2024
e966d75
fixes, tweaks and enhancements
eduard-dumitru Aug 7, 2024
0135fa5
integrate js nodeinterop
eduard-dumitru Aug 7, 2024
bc60228
fix nuget.config and move benchmarks
eduard-dumitru Aug 7, 2024
4e24f36
tweak test timeouts
eduard-dumitru Aug 7, 2024
3f9902d
fix nodeinterop integration
eduard-dumitru Aug 7, 2024
558f282
benchmark fixes
eduard-dumitru Aug 7, 2024
cc84e0f
nodeinterop fixes
eduard-dumitru Aug 8, 2024
ef34081
expand router to all inherited interfaces with last come wins semantics
eduard-dumitru Aug 8, 2024
e93e8ed
namedpipe impersonation fix
eduard-dumitru Aug 12, 2024
b5ce48c
fix: no beforecall for incomming callbacks
eduard-dumitru Aug 13, 2024
28c6d3c
simplify Ipc client api
eduard-dumitru Aug 15, 2024
b1dc8ab
reintroduce ConnectionFactory as BeforeConnect
eduard-dumitru Aug 16, 2024
6dd4d9a
commission waitforstart
eduard-dumitru Aug 26, 2024
2f07b37
decommission IAsyncStream and the Network union
eduard-dumitru Aug 28, 2024
90aff05
update public API report
eduard-dumitru Aug 28, 2024
1811e00
fixes and simplification
eduard-dumitru Aug 29, 2024
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
Prev Previous commit
Next Next commit
adjust public members
  • Loading branch information
eduard-dumitru committed Jul 31, 2024
commit 321dbe07e4b0b4052452023a4716b5944c82adfa
2 changes: 1 addition & 1 deletion src/UiPath.CoreIpc.BackCompat/ServiceHostBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ServiceHostBuilder(IServiceProvider serviceProvider)
public ServiceHostBuilder AddEndpoint(EndpointSettings settings)
{
settings = settings.WithServiceProvider(_serviceProvider);
Endpoints.Add(settings.Name, settings);
Endpoints.Add(settings.ContractType.Name, settings);
return this;
}

Expand Down
5 changes: 2 additions & 3 deletions src/UiPath.CoreIpc/Extensibility/ClientBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public abstract record ClientBase : EndpointConfig
public ConnectionFactory? ConnectionFactory { get; init; }
public BeforeCallHandler? BeforeCall { get; init; }
public TaskScheduler? Scheduler { get; init; }

internal ISerializer? Serializer { get; set; }
public ISerializer? Serializer { get; set; }

public virtual void Validate() { }

Expand All @@ -21,7 +20,7 @@ public TProxy GetProxy<TProxy>() where TProxy : class

internal void ValidateInternal()
{
var haveDeferredInjectedCallbacks = Callbacks?.Any(x => !x.Service.HasServiceProvider() && x.Service.MaybeGetInstance() is null) ?? false;
var haveDeferredInjectedCallbacks = Callbacks?.Any(x => x.Service.MaybeGetServiceProvider() is null && x.Service.MaybeGetInstance() is null) ?? false;

if (haveDeferredInjectedCallbacks && ServiceProvider is null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/UiPath.CoreIpc/Helpers/Router.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ internal abstract record ServiceFactory
public virtual ServiceFactory WithProvider(IServiceProvider? serviceProvider) => this;

internal virtual object? MaybeGetInstance() => null;
internal virtual bool HasServiceProvider() => false;
internal virtual IServiceProvider? MaybeGetServiceProvider() => null;

public sealed record Injected : ServiceFactory
{
public required IServiceProvider ServiceProvider { get; init; }

internal override bool HasServiceProvider() => ServiceProvider is not null;
internal override IServiceProvider? MaybeGetServiceProvider() => ServiceProvider;

public override IDisposable? Get(out object service)
{
Expand Down
13 changes: 7 additions & 6 deletions src/UiPath.CoreIpc/Server/ServiceHostBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

public record EndpointSettings
{
internal TaskScheduler? Scheduler { get; set; }
public TaskScheduler? Scheduler { get; set; }
public BeforeCallHandler? BeforeCall { get; set; }
public Type ContractType => Service.Type;
public object? ServiceInstance => Service.MaybeGetInstance();
public IServiceProvider? ServiceProvider => Service.MaybeGetServiceProvider();
internal ServiceFactory Service { get; }

internal string Name => Service.Type.Name;

public EndpointSettings(Type contractType, object? serviceInstance) : this(
serviceInstance is not null
? new ServiceFactory.Instance()
Expand Down Expand Up @@ -42,20 +43,20 @@ public void Validate()
}
}

protected internal virtual EndpointSettings WithServiceProvider(IServiceProvider serviceProvider)
public virtual EndpointSettings WithServiceProvider(IServiceProvider serviceProvider)
=> new EndpointSettings(Service.Type, serviceProvider)
{
BeforeCall = BeforeCall,
Scheduler = Scheduler
};
}

public record EndpointSettings<TContract> : EndpointSettings where TContract : class
public sealed record EndpointSettings<TContract> : EndpointSettings where TContract : class
{
public EndpointSettings(TContract? serviceInstance = null) : base(typeof(TContract), serviceInstance) { }
public EndpointSettings(IServiceProvider serviceProvider) : base(typeof(TContract), serviceProvider) { }

protected internal override EndpointSettings WithServiceProvider(IServiceProvider serviceProvider)
public override EndpointSettings WithServiceProvider(IServiceProvider serviceProvider)
=> new EndpointSettings<TContract>(serviceProvider)
{
BeforeCall = BeforeCall,
Expand Down