예제 #1
0
        private void Store(Entry entry)
        {
            fhirStore.Add(entry);

            //CK: try the new indexing service.
            if (_indexService != null)
            {
                _indexService.Process(entry);
            }

            else if (fhirIndex != null)
            {
                //TODO: If IndexService is working correctly, remove the reference to fhirIndex.
                fhirIndex.Process(entry);
            }


            if (serviceListener != null)
            {
                Uri location = localhost.GetAbsoluteUri(entry.Key);
                // todo: what we want is not to send localhost to the listener, but to add the Resource.Base. But that is not an option in the current infrastructure.
                // It would modify interaction.Resource, while
                serviceListener.Inform(location, entry);
            }
        }
예제 #2
0
 public void Inform(Entry interaction)
 {
     // todo: what we want is not to send localhost to the listener, but to add the Resource.Base. But that is not an option in the current infrastructure.
     // It would modify interaction.Resource, while
     foreach (IServiceListener listener in listeners)
     {
         Uri location = localhost.GetAbsoluteUri(interaction.Key);
         Inform(listener, location, interaction);
     }
 }
예제 #3
0
        private void Store(Interaction interaction)
        {
            store.Add(interaction);

            if (index != null)
            {
                index.Process(interaction);
            }

            if (listener != null)
            {
                Uri location = localhost.GetAbsoluteUri(interaction.Key);
                // todo: what we want is not to send localhost to the listener, but to add the Resource.Base. But that is not an option in the current infrastructure.
                // It would modify interaction.Resource, while
                listener.Inform(location, interaction);
            }
        }
예제 #4
0
 public Task Inform(Entry interaction)
 {
     return(Task.WhenAll(
                _listeners.Select(
                    listener => listener.Inform(_localhost.GetAbsoluteUri(interaction.Key), interaction))));
 }