Beispiel #1
0
        public static void Register()
        {
            if (!registered)
            {
                registered = true;

                DependencyCoupler.Register <FhirService>(
                    delegate()
                {
                    return(new FhirService(Settings.Endpoint));
                });

                //DependencyCoupler.Register<IFhirStore>(Spark.Store.MongoStoreFactory.GetMongoFhirStore);

                DependencyCoupler.Register <IFhirStore>(Spark.Store.MongoStoreFactory.GetMongoFhirStorage);
                DependencyCoupler.Register <ITagStore>(Spark.Store.MongoStoreFactory.GetMongoFhirStorage);
                DependencyCoupler.Register <IGenerator>(Spark.Store.MongoStoreFactory.GetMongoFhirStorage);
                DependencyCoupler.Register <IFhirIndex>(Spark.Search.MongoSearchFactory.GetIndex);

                DependencyCoupler.Register <ResourceImporter>(Factory.GetResourceImporter);
                DependencyCoupler.Register <ResourceExporter>(Factory.GetResourceExporter);

                if (Config.Settings.UseS3)
                {
                    DependencyCoupler.Register <IBlobStorage>(Spark.Store.MongoStoreFactory.GetAmazonStorage);
                }

                DependencyCoupler.Register <MongoDatabase>(MongoDbConnector.GetDatabase);
            }
        }
Beispiel #2
0
        public static void Register()
        {
            DependencyCoupler.Register <IFhirService>(
                delegate()
            {
                return(new FhirService(Settings.Endpoint));
            });
            DependencyCoupler.Register <IFhirStore>(Factory.GetMongoFhirStore);
            DependencyCoupler.Register <IFhirIndex>(Factory.GetIndex);

            DependencyCoupler.Register <IIndexer, MongoIndexer>();

            DependencyCoupler.Register <ResourceImporter>(Factory.GetResourceImporter);

            DependencyCoupler.Register <ResourceExporter>(Factory.GetResourceExporter);

            DependencyCoupler.Register <IBlobStorage>(Factory.GetAmazonStorage);

            DependencyCoupler.Register <MongoDatabase>(MongoDbConnector.GetDatabase);
        }