public static HttpRequestMessageProperty GetHttpRequestHeaders(this IOperationContext operation) { if (operation.HasIncomingMessageProperty(HttpRequestMessageProperty.Name)) { return((HttpRequestMessageProperty)operation.GetIncomingMessageProperty(HttpRequestMessageProperty.Name)); } return(null); }
private void UpdateClientIp(LocationContext location, IOperationContext operation) { if ( operation.HasIncomingMessageProperty(RemoteEndpointMessageProperty.Name) ) { var property = (RemoteEndpointMessageProperty) operation.GetIncomingMessageProperty(RemoteEndpointMessageProperty.Name); location.Ip = property.Address; WcfEventSource.Log.LocationIdSet(location.Ip); } }
private void UpdateClientIp(LocationContext location, IOperationContext operation) { if (operation.HasIncomingMessageProperty(RemoteEndpointMessageProperty.Name)) { var property = (RemoteEndpointMessageProperty) operation.GetIncomingMessageProperty(RemoteEndpointMessageProperty.Name); location.Ip = property.Address; WcfEventSource.Log.LocationIdSet(location.Ip); } }