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(); }
private void RegisterServices() { var genericsToApply = KnownTypeHelper.GetGenerics(typeof(Const).Assembly); KnownTypeHelper.RegisterNonGenericRequestsAndResponses(typeof(PatientModule).Assembly); KnownTypeHelper.RegisterGenerics(genericsToApply, typeof(PatientModule).Assembly); KnownTypeHelper.RegisterKnownTypesFromIKnownTypeProviders(typeof(PatientModule).Assembly); KnownTypeProvider.RegisterDerivedTypesOf <AbstractDataTransferObject>(typeof(PatientModule).Assembly.GetTypes().Where(t => !t.IsGenericType)); _container.RegisterType <ITerminologyProxy, TerminologyProxy> (); _container.RegisterType <ICdsAlertService, CdsAlertService> (); _container.RegisterType <IPatientAccessService, PatientAccessService> (); _accessControlManager.RegisterPermissionDescriptor( new ClientPermissionDescriptor()); _metadataService.LoadMetadataForModule(this); }