private static void InitializeAgatha() { var c = new ClientConfiguration(Assembly.Load("AgathaSample.Common"), new Container(KernelContainer.Kernel)) { // this wires up some custom types for implementing // the AuthenticatedRequest handling // this isn't necessary if you don't need such. RequestProcessorImplementation = typeof (CustomRequestProcessorProxy), RequestDispatcherImplementation = typeof (AuthenticatedRequestDispatcher), AsyncRequestDispatcherImplementation = typeof (AuthenticatedAsyncRequestDispatcher), AsyncRequestProcessorImplementation = typeof (CustomAsyncRequestProcessorProxy) }; c.Initialize(); }
private void ConfigureAgatha() { var agathaContainer = new Container ( Container ); IoC.Container = agathaContainer; Container.RegisterInstance<IContainer> ( agathaContainer ); var clientConfiguration = new ClientConfiguration ( agathaContainer ) { AsyncRequestDispatcherImplementation = typeof( AsyncRequestDispatcher ) }; KnownTypeProvider.Register ( typeof( LookupValueDto ) ); KnownTypeHelper.RegisterNonGenericRequestsAndResponses ( typeof( InfrastructureModule ).Assembly ); clientConfiguration.AddRequestAndResponseAssembly ( typeof( GetLookupValuesRequest ).Assembly ); var genericsToApply = KnownTypeHelper.GetGenerics ( typeof( Const ).Assembly ); KnownTypeHelper.RegisterGenerics ( genericsToApply, typeof( InfrastructureModule ).Assembly ); KnownTypeHelper.RegisterKnownTypesFromIKnownTypeProviders ( typeof( IMetadataItemDto ).Assembly ); // metadata clientConfiguration.RequestProcessorImplementation = typeof( CustomAsyncRequestProcessorProxy ); clientConfiguration.Initialize (); }