//Do nothing on receive. The headers are already in the IncomingMessageHeaders collection.
 public void Receiving(ServiceContext context, ServiceRemotingMessageHeaders headers, string action)
 {
     if (action.Contains("fault") == false)
     {
         if (OriginationHelper.Get(headers) == null)
         {
             string[] segments = action.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
             throw new InvalidOperationException("Invalid ServiceFabricEx extensibility sequence. Service " + context.ServiceName + " called without proper extensibility proxy for operation " + segments[3] + " on contract " + segments[2] + ".");
         }
     }
 }
Beispiel #2
0
        internal override void OnReceiving(Uri serviceAddress, MessageHeaders messageHeaders)
        {
            if (messageHeaders.Action.Contains("fault") == false)
            {
                if (OriginationHelper.Get(Header <ServiceRemotingMessageHeaders> .Get(messageHeaders)) == null)
                {
                    throw new InvalidOperationException("Invalid ServiceFabricEx extensibility sequence. Operation dispatcher not installed on service " + serviceAddress + ".");
                }
            }
            foreach (IProxyHeaderInterceptor interceptor in Interceptors)
            {
                ServiceRemotingMessageHeaders headers = Header <ServiceRemotingMessageHeaders> .Get(messageHeaders);

                interceptor.Receiving(headers);
                Header <ServiceRemotingMessageHeaders> .Replace(headers, messageHeaders);
            }
        }