{"id":18880314,"url":"https://github.com/moimhossain/wcfserver","last_synced_at":"2026-02-20T13:30:17.680Z","repository":{"id":13848394,"uuid":"16545680","full_name":"MoimHossain/WcfServer","owner":"MoimHossain","description":"A handy class to host and consume WCF service with basic net tcp or ws http binding","archived":false,"fork":false,"pushed_at":"2015-01-07T11:34:06.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T03:14:20.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MoimHossain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-05T13:36:42.000Z","updated_at":"2015-01-07T11:34:07.000Z","dependencies_parsed_at":"2022-08-28T17:33:12.817Z","dependency_job_id":null,"html_url":"https://github.com/MoimHossain/WcfServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoimHossain%2FWcfServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoimHossain%2FWcfServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoimHossain%2FWcfServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoimHossain%2FWcfServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MoimHossain","download_url":"https://codeload.github.com/MoimHossain/WcfServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239846371,"owners_count":19706759,"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":[],"created_at":"2024-11-08T06:43:17.018Z","updated_at":"2026-02-20T13:30:17.631Z","avatar_url":"https://github.com/MoimHossain.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"WcfServer\n=========\n\nA handy class to host and consume WCF service with basic net tcp or ws http binding.\n\nThe class \"WcfService\" is the main class that encapsulates all the details and allows users to host \nany POCO classes (with a service contract) as WCF and create client side proxies for  them to invoke.\n\nA typical way to host a service is as follows\n\n                var hosts = WcfService.DefaultFactory.CreateServers(\n                    new List\u003cType\u003e { typeof(MyService) },\n                    (t) =\u003e { return t.Name; },\n                    (t) =\u003e { return typeof(IWcf); },\n                    \"WcfServices\",\n                    8789,\n                    (sender, exception) =\u003e { Trace.Write(exception); },\n                    (msg) =\u003e { Trace.Write(msg); },\n                    (msg) =\u003e { Trace.Write(msg); },\n                    (msg) =\u003e { Trace.Write(msg); });\n                    \n\nThis above code hosts the MyService class as a WCF service on a given port (8789) with a NetTcpBinding.\n\nOnce this service is hosted it can be invoked from a client applicatiojn using the following sample code\n\n                using (var wcf = \n                    WcfService.DefaultFactory.CreateChannel\u003cIWcf\u003e(Environment.MachineName, 8789, (t) =\u003e { return \"MyService\"; }, \"WcfServices\"))\n                {\n                    var result = wcf.Client.Greet(\"Moim\");\n\n                    Console.WriteLine(result);\n                }\n                \nThat's it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoimhossain%2Fwcfserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoimhossain%2Fwcfserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoimhossain%2Fwcfserver/lists"}