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 lean review #108

Draft
wants to merge 12 commits into
base: feat/revamp_lean
Choose a base branch
from
Draft
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
8 changes: 7 additions & 1 deletion src/CoreIpc.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# 17
# Visual Studio Version 17
VisualStudioVersion = 17.0.31919.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UiPath.CoreIpc", "UiPath.CoreIpc\UiPath.CoreIpc.csproj", "{58200319-1F71-4E22-894D-7E69E0CD0B57}"
Expand All @@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UiPath.CoreIpc.Http", "UiPa
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UiPath.Ipc.Tests", "UiPath.Ipc.Tests\UiPath.Ipc.Tests.csproj", "{E238E183-92CF-48A6-890F-C422853D6656}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UiPath.CoreIpc.Extensions.Abstractions", "UiPath.CoreIpc.Extensions.Abstractions\UiPath.CoreIpc.Extensions.Abstractions.csproj", "{F519AE2B-88A6-482E-A6E2-B525F71F566D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,6 +41,10 @@ Global
{E238E183-92CF-48A6-890F-C422853D6656}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E238E183-92CF-48A6-890F-C422853D6656}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E238E183-92CF-48A6-890F-C422853D6656}.Release|Any CPU.Build.0 = Release|Any CPU
{F519AE2B-88A6-482E-A6E2-B525F71F566D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F519AE2B-88A6-482E-A6E2-B525F71F566D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F519AE2B-88A6-482E-A6E2-B525F71F566D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F519AE2B-88A6-482E-A6E2-B525F71F566D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions src/Playground/Playground.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoWarn>1998</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
72 changes: 28 additions & 44 deletions src/Playground/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,28 @@ private static async Task Main(string[] args)
{
Scheduler = serverScheduler,
ServiceProvider = serverSP,
RequestTimeout = TimeSpan.FromHours(10),
Endpoints = new()
{
typeof(Contracts.IServerOperations), // DEVINE
new EndpointSettings(typeof(Contracts.IServerOperations)) // ASTALALT
{
BeforeCall = async (callInfo, _) =>
BeforeIncommingCall = async (callInfo, _) =>
{
Console.WriteLine($"Server: {callInfo.Method.Name}");
}
},
typeof(Contracts.IClientOperations2)
},
Listeners = [
new NamedPipeListener()
Transport = new NamedPipeServerTransport()
{
PipeName = Contracts.PipeName,
ServerName = ".",
AccessControl = ps =>
{
PipeName = Contracts.PipeName,
ServerName = ".",
AccessControl = ps =>
{
},
MaxReceivedMessageSizeInMegabytes = 100,
RequestTimeout = TimeSpan.FromHours(10)
},
//new BidirectionalHttp.ListenerConfig()
//{
// Uri = serverUri,
// RequestTimeout = TimeSpan.FromHours(1)
//}
]
MaxReceivedMessageSizeInMegabytes = 100,
}
};

try
Expand All @@ -83,37 +76,31 @@ private static async Task Main(string[] args)

var c1 = new IpcClient()
{
Config = new()
Callbacks = new()
{
Callbacks = new()
{
typeof(Contracts.IClientOperations),
{ typeof(Contracts.IClientOperations2), new Impl.Client2() },
},
ServiceProvider = clientSP,
Scheduler = clientScheduler,
typeof(Contracts.IClientOperations),
{ typeof(Contracts.IClientOperations2), new Impl.Client2() },
},
Transport = new NamedPipeTransport()
ServiceProvider = clientSP,
Scheduler = clientScheduler,
Transport = new NamedPipeClientTransport()
{
PipeName = Contracts.PipeName,
ServerName = ".",
AllowImpersonation = false,
},
}
};

var c2 = new IpcClient()
{
Config = new()
ServiceProvider = clientSP,
Callbacks = new()
{
ServiceProvider = clientSP,
Callbacks = new()
{
typeof(Contracts.IClientOperations),
{ typeof(Contracts.IClientOperations2), new Impl.Client2() },
},
Scheduler = clientScheduler,
typeof(Contracts.IClientOperations),
{ typeof(Contracts.IClientOperations2), new Impl.Client2() },
},
Transport = new NamedPipeTransport()
Scheduler = clientScheduler,
Transport = new NamedPipeClientTransport()
{
PipeName = Contracts.PipeName,
ServerName = ".",
Expand All @@ -123,17 +110,14 @@ private static async Task Main(string[] args)

var proxy1 = new IpcClient()
{
Config = new()
ServiceProvider = clientSP,
Callbacks = new()
{
ServiceProvider = clientSP,
Callbacks = new()
{
typeof(Contracts.IClientOperations),
{ typeof(Contracts.IClientOperations2), new Impl.Client2() },
},
Scheduler = clientScheduler,
typeof(Contracts.IClientOperations),
{ typeof(Contracts.IClientOperations2), new Impl.Client2() },
},
Transport = new NamedPipeTransport()
Scheduler = clientScheduler,
Transport = new NamedPipeClientTransport()
{
PipeName = Contracts.PipeName,
ServerName = ".",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net461;net6.0-windows</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\UiPath.CoreIpc\UiPath.CoreIpc.csproj" />
</ItemGroup>

</Project>
Loading