public static IEndpoint New(Action <IEndpointConfigurator> action)
        {
            var configurator = new LoopbackEndpointConfigurator();

            action(configurator);

            return(configurator.Create());
        }
        public static IEndpoint New(Action<IEndpointConfigurator> action)
        {
            var configurator = new LoopbackEndpointConfigurator();

            action(configurator);

            return configurator.Create();
        }
Example #3
0
        public static IEndpoint ConfigureEndpoint(Uri uri, Action <IEndpointConfigurator> configurator)
        {
            if (uri.Scheme.ToLowerInvariant() == "loopback")
            {
                IEndpoint endpoint = LoopbackEndpointConfigurator.New(x =>
                {
                    x.SetUri(uri);

                    configurator(x);
                });

                return(endpoint);
            }

            return(null);
        }