H.ProxyFactory 0.8.4

Install-Package H.ProxyFactory -Version 0.8.4
dotnet add package H.ProxyFactory --version 0.8.4
<PackageReference Include="H.ProxyFactory" Version="0.8.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add H.ProxyFactory --version 0.8.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: H.ProxyFactory, 0.8.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install H.ProxyFactory as a Cake Addin
#addin nuget:?package=H.ProxyFactory&version=0.8.4

// Install H.ProxyFactory as a Cake Tool
#tool nuget:?package=H.ProxyFactory&version=0.8.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

H.ProxyFactory

Language License Requirements Build Status

Allows 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:

  • Create proxy objects that look exactly like the original objects
  • Proxy target can be located anywhere where there is access to pipes

Nuget

NuGet

Install-Package H.ProxyFactory.Pipes

Usage

Shared code:

public interface IActionService
{
    void SendText(string text);
    void ShowTrayIcon();
    void HideTrayIcon();

    event EventHandler<string> TextReceived;
}

public class ActionService { }

Implementation in the server project:

public class ActionService : IActionService
{
    private TrayIconService trayIconService = new();

    public void SendText(string text)
    {
        Console.WriteLine($"Text from client: {text}");

        TextReceived?.Invoke(this, "Hi from server");
    }

    public void ShowTrayIcon()
    {
        trayIconService.ShowTrayIcon();
    }

    public void HideTrayIcon()
    {
        trayIconService.HideTrayIcon();
    }

    public event EventHandler<string>? TextReceived;
}

Server:

await using var server = new PipeProxyServer();

await server.InitializeAsync("UniquePipeServerName");

Client:

await using var factory = new PipeProxyFactory();

await factory.InitializeAsync("UniquePipeServerName");

// You will have access to an interface through which you will interact with the object created on the server.
var service = await factory.CreateInstanceAsync<ActionService, IActionService>();
instance.TextReceived += (_, text) =>
{
    WriteLine($"{nameof(instance.TextReceived)}: {text}");
};
instance.ShowTrayIcon();
Instance.SendText("hello!");

1

Contacts

NuGet packages (1)

Showing the top 1 NuGet packages that depend on H.ProxyFactory:

Package Downloads
H.ProxyFactory.Pipes

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: 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 - feat: Added empty wpf app. 2021-10-29 - feat: To file-scope namespaces. 2021-10-29 - feat: To net6.0 and C# 10. 2021-10-29 🐞 Last 10 bug fixes: - 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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.8.4 0 11/27/2021
0.8.2 157 10/29/2021
0.7.4 2,429 12/10/2020
0.7.3 326 12/8/2020
0.7.2 289 12/8/2020
0.7.1 311 12/8/2020
0.7.0 326 11/25/2020

⭐ Last 10 features:
- 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
- feat: Added empty wpf app. 2021-10-29
- feat: To file-scope namespaces. 2021-10-29
- feat: To net6.0 and C# 10. 2021-10-29

🐞 Last 10 bug fixes:
- 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