Contour.Configurator.AppConfigConfigurator.GetRequestConfig C# (CSharp) Method

GetRequestConfig() public method

The get request config.
public GetRequestConfig ( string endpointName, string key ) : IRequestConfiguration
endpointName string /// The endpoint name. ///
key string /// The key. ///
return IRequestConfiguration
        public IRequestConfiguration GetRequestConfig(string endpointName, string key)
        {
            EndpointElement endpoint = this.GetEndPointByName(endpointName);

            OutgoingElement reqDeclaration = endpoint.Outgoing.Cast<OutgoingElement>().
                First(x => x.Key == key);

            return new RequestConfiguration(reqDeclaration.Timeout, reqDeclaration.Persist, reqDeclaration.Ttl);
        }