Exemple #1
0
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddControllers();
     services.AddLogging(l => l.AddXunit(_outputHelper));
     services.AddFhir(
         new SparkSettings
     {
         UseAsynchronousIO  = true,
         Endpoint           = new Uri("https://localhost:60001/fhir"),
         FhirRelease        = "R4",
         ParserSettings     = ParserSettings.CreateDefault(),
         SerializerSettings = SerializerSettings.CreateDefault()
     });
     services.AddSingleton <IFhirIndex, InMemoryFhirIndex>();
     services.AddSingleton <ISnapshotStore, InMemorySnapshotStore>();
     services.AddSingleton <IHistoryStore, InMemoryHistoryStore>();
     services.AddSingleton <IGenerator, GuidGenerator>();
     services.AddSingleton <IFhirStore, InMemoryFhirStore>();
     services.AddSingleton <IIndexStore, NoopIndexStore>();
     services.AddSingleton <IPatchService, PatchService>();
 }