Пример #1
0
 public FhirService(Uri serviceBase)
 {
     store = DependencyCoupler.Inject<IFhirStore>(); // new MongoFhirStore();
     _index = DependencyCoupler.Inject<IFhirIndex>(); // Factory.Index;
     _importer = DependencyCoupler.Inject<ResourceImporter>();
     exporter = DependencyCoupler.Inject<ResourceExporter>();
     pager = new Pager(store);
     Endpoint = serviceBase;
 }
Пример #2
0
        public FhirService(Infrastructure infrastructure)
        {
            this.localhost = infrastructure.Localhost;
            this.store = infrastructure.Store;
            this.snapshotstore = infrastructure.SnapshotStore;
            this.generator = infrastructure.Generator;
            this.index = infrastructure.Index;
            this.listener = infrastructure.ServiceListener;

            transfer = new Transfer(generator, localhost);
            pager = new Pager(store, snapshotstore, localhost, transfer);
        }
Пример #3
0
        public FhirService(Uri endpoint)
        {
            //refac: store = DependencyCoupler.Inject<IFhirStore>(); // new MongoFhirStore();

            store = DependencyCoupler.Inject<IFhirStore>();
            tagstore = DependencyCoupler.Inject<ITagStore>();
            generator = DependencyCoupler.Inject<IGenerator>();
            index = DependencyCoupler.Inject<IFhirIndex>(); // Factory.Index;
            importer = DependencyCoupler.Inject<ResourceImporter>();
            exporter = DependencyCoupler.Inject<ResourceExporter>();
            pager = new Pager(store, exporter);
            Endpoint = endpoint;
        }
Пример #4
0
        public FhirService(ILocalhost localhost, IFhirStore fhirStore, ISnapshotStore snapshotStore, IGenerator keyGenerator,
            IFhirIndex fhirIndex, IServiceListener serviceListener, IFhirResponseFactory responseFactory, IndexService indexService)
        {
            this.localhost = localhost;
            this.fhirStore = fhirStore;
            this.snapshotstore = snapshotStore;
            this.keyGenerator = keyGenerator;
            this.fhirIndex = fhirIndex;
            this.serviceListener = serviceListener;
            this.responseFactory = responseFactory;
            _indexService = indexService;

            transfer = new Transfer(this.keyGenerator, localhost);
            pager = new Pager(this.fhirStore, snapshotstore, localhost, transfer, ModelInfo.SearchParameters);
            //TODO: Use FhirModel instead of ModelInfo for the searchparameters.
        }