예제 #1
0
        /// <summary>
        /// Create a new instance based on the current <see cref="RemotingContext"/>
        /// </summary>
        /// <returns>An instance of <see cref="CustomHeaders"/> with headers populated using the current <see cref="RemotingContext"/></returns>
        public static CustomHeaders FromRemotingContext()
        {
            var customHeader = new CustomHeaders();

            foreach (var key in RemotingContext.Keys)
            {
                customHeader.Add(key, RemotingContext.GetData(key));
            }

            return(customHeader);
        }
예제 #2
0
        /// <summary>
        /// Create a new instance based on the current <see cref="RemotingContext"/>
        /// </summary>
        /// <returns>An instance of <see cref="CustomHeaders"/> with headers populated using the current <see cref="RemotingContext"/></returns>
        public static CustomHeaders FromRemotingContext()
        {
            var customHeader = new CustomHeaders();

            foreach (var key in RemotingContext.Keys.Where(k => k != MethodHeader))
            {
                customHeader.Add(key, RemotingContext.GetData(key).ToString());
            }

            return(customHeader);
        }
 /// <summary>
 /// Creates a new instance
 /// </summary>
 /// <param name="serviceRemotingClientFactory"></param>
 /// <param name="customHeaders"></param>
 public ExtendedServiceRemotingClientFactory(IServiceRemotingClientFactory serviceRemotingClientFactory, CustomHeaders customHeaders) :
     this(serviceRemotingClientFactory, () => customHeaders)
 {
 }