Features: - Create proxy objects that look exactly like the original objects - Proxy target can be located anywhere where there is access to pipes ⭐ Last 10 features: - feat: Updated NuGet packages. 2022-01-19 - feat: Added ContinuousIntegrationBuild. 2021-11-29 - feat: Added separate H.ProxyFactory.Remote library. 2021-11-29 - feat: Added separate H.Ipc.Core library. Refactored. 2021-11-29 - feat: Added RemoteProxyServer.ObjectCreated event. 2021-11-28 - feat: Implemented safe CreateObjectAsync. 2021-10-30 - feat: Added try catch to example app. 2021-10-30 - feat: Added CLSCompliant(true). 2021-10-30 - feat: to auto-releases. 2021-10-29 - feat: Implemented example WPF app. 2021-10-29 🐞 Last 10 bug fixes: - fix(test): Removed H.Recorders.NAudioRecorder package from tests. 2022-01-19 - fix: Renamed H.Ipc.Messages to H.ProxyFactory.Remote.Messages. 2021-11-30 - fix: Changed CI build to windows-latest. 2021-10-30 - fix: Added Factory.LoadAssemblyAsync to example app. 2021-10-30 - fix: Fixed H.ProxyFactory.Pipes warnings. 2021-10-30 - fix: Fixed H.ProxyFactory warnings. 2021-10-30
$ dotnet add package H.ProxyFactory.PipesAllows you to interact with remote objects. You will have access to an interface through which you will interact with the object created on the server.
Features:
Install-Package H.ProxyFactory.Pipes
Shared code:
public interface ISimpleEventClass
{
event EventHandler<int> Event1;
string Method2(string input);
}
public class SimpleEventClass : ISimpleEventClass
{
public event EventHandler<int>? Event1;
public void RaiseEvent1()
{
Event1?.Invoke(this, 777);
}
public string Method2(string input)
{
return $"Hello, input = {input}";
}
}Server:
await using var server = new PipeProxyServer();
await server.InitializeAsync("UniquePipeServerName");Client:
await using var factory = new PipeProxyFactory();
await factory.InitializeAsync("UniquePipeServerName");
// If the server does not use the library where the shared code is located, it must be loaded.
await factory.LoadAssemblyAsync(typeof(SimpleEventClass).Assembly.Location);
// You will have access to an interface through which you will interact with the object created on the server.
var instance = await factory.CreateInstanceAsync<ISimpleEventClass>(
typeof(SimpleEventClass).FullName ?? string.Empty);
instance.Event1 += (_, args) =>
{
WriteLine($"{nameof(instance.Event1)}: {args}");
};
instance.RaiseEvent1();
var result = Instance.Method2("argument");