File tree Expand file tree Collapse file tree
InterProcessCommunication/TradingApp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,6 +262,19 @@ <h4 id="implement-servicepoxyattribute-and-serviceproxyregistrationbehavior">9.
262262</ li >
263263</ ul >
264264</ li >
265+ </ ul >
266+ < h4 id ="add-the-serviceproxyregistrationbehavior-to-consolehost-and-host-each-service-in-its-own-process "> 10. Add the < code > ServiceProxyRegistrationBehavior</ code > to < code > ConsoleHost</ code > and host each service in its own process</ h4 >
267+ < ul >
268+ < li > Register the service behavior and load the Proxies dll:
269+ < ul >
270+ < li > in < code > AppBootBootstrapper.cs</ code > add:
271+ < ul >
272+ < li > < code > .AddRegistrationBehavior(new ServiceProxyRegistrationBehavior());</ code > </ li >
273+ < li > < code > || filename.StartsWith("Proxies.")</ code > </ li >
274+ </ ul >
275+ </ li >
276+ </ ul >
277+ </ li >
265278</ ul >
266279
267280 </ div >
Original file line number Diff line number Diff line change @@ -178,3 +178,11 @@ class QuotationService : IQuotationService
178178 - demo this with ` ConsoleUi `
179179 - if implementations are deployed ** everythign** is in one process
180180 - if we delete the implementations from the ` \bin\ ` then we have * inter-process* communication with the Console Host!
181+
182+
183+ #### 10. Add the ` ServiceProxyRegistrationBehavior ` to ` ConsoleHost ` and host each service in its own process
184+
185+ - Register the service behavior and load the Proxies dll:
186+ - in ` AppBootBootstrapper.cs ` add:
187+ - ` .AddRegistrationBehavior(new ServiceProxyRegistrationBehavior()); `
188+ - ` || filename.StartsWith("Proxies.") `
Original file line number Diff line number Diff line change 22using System . IO ;
33using System . Linq ;
44using System . Reflection ;
5+ using AppBootEx ;
56using iQuarc . AppBoot ;
67using iQuarc . AppBoot . Unity ;
78
@@ -14,6 +15,7 @@ public static Bootstrapper Run()
1415 var assemblies = GetApplicationAssemblies ( ) . ToArray ( ) ;
1516 Bootstrapper bootstrapper = new Bootstrapper ( assemblies ) ;
1617 bootstrapper . ConfigureWithUnity ( ) ;
18+ bootstrapper . AddRegistrationBehavior ( new ServiceProxyRegistrationBehavior ( ) ) ;
1719 bootstrapper . AddRegistrationBehavior ( new ServiceRegistrationBehavior ( ) ) ;
1820
1921 bootstrapper . Run ( ) ;
@@ -31,6 +33,7 @@ private static IEnumerable<Assembly> GetApplicationAssemblies()
3133 string filename = Path . GetFileName ( dll ) ;
3234 if ( filename != null && ( filename . StartsWith ( "Contracts" )
3335 || filename . StartsWith ( "Infra." )
36+ || filename . StartsWith ( "Proxies." )
3437 || filename . StartsWith ( "Portfolio." )
3538 || filename . StartsWith ( "Quotations." )
3639 || filename . StartsWith ( "Sales." )
Original file line number Diff line number Diff line change 107107 <None Include =" packages.config" />
108108 </ItemGroup >
109109 <ItemGroup >
110+ <ProjectReference Include =" ..\AppBootEx\AppBootEx.csproj" >
111+ <Project >{C378E838-1688-484B-A35E-A95E003E28BC}</Project >
112+ <Name >AppBootEx</Name >
113+ </ProjectReference >
110114 <ProjectReference Include =" ..\Modules\_Contracts\Contracts.csproj" >
111115 <Project >{19297424-954D-42F5-AC38-6F22A25EA682}</Project >
112116 <Name >Contracts</Name >
You can’t perform that action at this time.
0 commit comments