System.Runtime.Remoting.Channels.BaseTransportHeaders.SetValueFromHeaderIndex C# (CSharp) Method

SetValueFromHeaderIndex() private method

private SetValueFromHeaderIndex ( int index, Object value ) : void
index int
value Object
return void
        internal void SetValueFromHeaderIndex(int index, Object value)
        {
            // NOTE: If this method returns the null, then that indicates the header has no
            //   value (i.e. isn't in the "dictionary"). For the purposes of iteration, this
            //   means that the header should be skipped.
        
            // 0) CommonTransportKeys.ConnectionId
            // 1) CommonTransportKeys.IPAddress
            // 2) CommonTransportKeys.RequestUri
            // 3) "Content-Type"

            switch (index)
            {
            case 0: _connectionId = value; break;
            case 1: _ipAddress = value; break;        
            case 2: _requestUri = (String)value; break;
            case 3: _contentType = (String)value; break;

            default: 
            {
                InternalRemotingServices.RemotingAssert(false, "someone forgot to update this method"); 
                break;
            }
            
            } // switch (index)
            
        } // MapHeaderIndexToValue