public void ConfigureEndpoint(Uri uri, Action <IEndpointConfigurator> action)
 {
     try
     {
         _endpointConfigurators.Store(uri, action);
     }
     catch (Exception ex)
     {
         throw new ConfigurationException("The endpoint could not be configured: " + uri, ex);
     }
 }
Example #2
0
        private void ConnectTransportConfigurators(IEnumerable <Type> transportTypes)
        {
            const BindingFlags bindingFlags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;

            foreach (Type transportType in transportTypes)
            {
                MethodInfo mi = GetConfigureEndpointMethodInfo(transportType, bindingFlags);

                Func <Uri, Action <IEndpointConfigurator>, IEndpoint> invoker = BuildConfigureEndpointLambda(mi);

                _transportConfigurators.Store(transportType, invoker);
            }
        }