예제 #1
0
 public void Process(Interaction interaction)
 {
     if (interaction.HasResource())
     {
         put(interaction);
     }
     else
     {
         if (interaction.IsDeleted())
         {
             store.Delete(interaction);
         }
         else throw new Exception("Entry is neither resource nor deleted");
     }
 }
예제 #2
0
 public void Process(Interaction interaction)
 {
     if (interaction.HasResource())
     {
         IndexResource(interaction.Resource, interaction.Key);
     }
     else
     {
         if (interaction.IsDeleted())
         {
             _indexStore.Delete(interaction);
         }
         else throw new Exception("Entry is neither resource nor deleted");
     }
 }
예제 #3
0
        public FhirResponse GetFhirResponse(Interaction interaction, IEnumerable<object> parameters = null)
        {
            if (interaction.IsDeleted())
            {
                return Respond.Gone(interaction);
            }

            FhirResponse response = null;

            if (parameters != null)
            {
                response = interceptorRunner.RunInterceptors(interaction, parameters);
            }

            return response ?? Respond.WithResource(interaction);
        }