{"id":15409917,"url":"https://github.com/havendv/h.proxyfactory","last_synced_at":"2025-04-19T07:13:09.980Z","repository":{"id":98540425,"uuid":"315846567","full_name":"HavenDV/H.ProxyFactory","owner":"HavenDV","description":"Allows creating proxy objects that look exactly like the original objects.","archived":false,"fork":false,"pushed_at":"2022-01-18T18:37:58.000Z","size":552,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T12:55:55.203Z","etag":null,"topics":["ipc","net5","net6","netstandard","pipes","pub-sub","pubsub","request-response","rpc"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HavenDV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-25T06:16:29.000Z","updated_at":"2023-11-15T01:44:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"7630ebf7-f90d-4bd7-b125-b6bbf0b18158","html_url":"https://github.com/HavenDV/H.ProxyFactory","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"HavenDV/CSharpProjectTemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.ProxyFactory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.ProxyFactory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.ProxyFactory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.ProxyFactory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HavenDV","download_url":"https://codeload.github.com/HavenDV/H.ProxyFactory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249637435,"owners_count":21304298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ipc","net5","net6","netstandard","pipes","pub-sub","pubsub","request-response","rpc"],"created_at":"2024-10-01T16:41:55.696Z","updated_at":"2025-04-19T07:13:09.948Z","avatar_url":"https://github.com/HavenDV.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [H.ProxyFactory](https://github.com/HavenDV/H.ProxyFactory/) \n\n[![Language](https://img.shields.io/badge/language-C%23-blue.svg?style=flat-square)](https://github.com/HavenDV/H.ProxyFactory/search?l=C%23\u0026o=desc\u0026s=\u0026type=Code) \n[![License](https://img.shields.io/github/license/HavenDV/H.ProxyFactory.svg?label=License\u0026maxAge=86400)](LICENSE.md) \n[![Requirements](https://img.shields.io/badge/Requirements-.NET%20Standard%202.0-blue.svg)](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.0.md)\n[![Build Status](https://github.com/HavenDV/H.ProxyFactory/workflows/.NET/badge.svg?branch=master)](https://github.com/HavenDV/H.ProxyFactory/actions?query=workflow%3A%22.NET%22)\n\nAllows you to interact with remote objects. \nYou will have access to an interface through which you will interact with the object created on the server.\n\nFeatures:\n- Create proxy objects that look exactly like the original objects\n- Proxy target can be located anywhere where there is access to pipes\n\n### Nuget\n\n[![NuGet](https://img.shields.io/nuget/dt/H.ProxyFactory.Pipes.svg?style=flat-square\u0026label=H.ProxyFactory.Pipes)](https://www.nuget.org/packages/H.ProxyFactory.Pipes/)\n\n```\nInstall-Package H.ProxyFactory.Pipes\n```\n\n### Usage\nShared code:\n```cs\npublic interface IActionService\n{\n    void SendText(string text);\n    void ShowTrayIcon();\n    void HideTrayIcon();\n\n    event EventHandler\u003cstring\u003e TextReceived;\n}\n\npublic class ActionService { }\n```\n\nImplementation in the server project:\n```cs\npublic class ActionService : IActionService\n{\n    private TrayIconService trayIconService = new();\n\n    public void SendText(string text)\n    {\n        Console.WriteLine($\"Text from client: {text}\");\n\n        TextReceived?.Invoke(this, \"Hi from server\");\n    }\n\n    public void ShowTrayIcon()\n    {\n        trayIconService.ShowTrayIcon();\n    }\n\n    public void HideTrayIcon()\n    {\n        trayIconService.HideTrayIcon();\n    }\n\n    public event EventHandler\u003cstring\u003e? TextReceived;\n}\n```\n\nServer:\n```cs\nawait using var server = new PipeProxyServer();\n\nawait server.InitializeAsync(\"UniquePipeServerName\");\n```\n\nClient:\n```cs\nawait using var factory = new PipeProxyFactory();\n\nawait factory.InitializeAsync(\"UniquePipeServerName\");\n\n// You will have access to an interface through which you will interact with the object created on the server.\nvar service = await factory.CreateInstanceAsync\u003cActionService, IActionService\u003e();\ninstance.TextReceived += (_, text) =\u003e\n{\n    WriteLine($\"{nameof(instance.TextReceived)}: {text}\");\n};\ninstance.ShowTrayIcon();\nInstance.SendText(\"hello!\");\n```\n\n![1](/assets/1.png)\n\n### Contacts\n* [mail](mailto:havendv@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavendv%2Fh.proxyfactory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhavendv%2Fh.proxyfactory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavendv%2Fh.proxyfactory/lists"}