public override void ContributeConfigSections(IComponentContainerBuilder newComponents)
        {
            base.ContributeConfigSections(newComponents);

            newComponents
            .RegisterComponentInstance(new ConfigSection_MessagingPlatformConfiguration())
            .ForService <IMessagingPlatformConfiguration>();
        }
예제 #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public static void ContributePortBExample(this IComponentContainerBuilder containerBuilder, string value)
        {
            containerBuilder.RegisterComponentInstance <PortsAndAdaptersPoc.ExamplePortB>(
                new PortsAndAdaptersPoc.ExamplePortB(containerBuilder)
            {
                Value = value
            }
                );
        }
예제 #3
0
        public static HttpEndpointInjectorPort ContributeHttpEndpoint(
            this IComponentContainerBuilder containerBuilder,
            string name,
            int?listenPortNumber = null,
            Action <IHttpEndpointConfig> onConfiguration = null,
            Func <HttpContext, Task> onRequest           = null)
        {
            if (listenPortNumber.HasValue)
            {
                onConfiguration += (http) => {
                    http.Port = listenPortNumber.Value;
                };
            }

            var port = new HttpEndpointInjectorPort(containerBuilder, name, onConfiguration, onRequest);

            containerBuilder.RegisterComponentInstance <HttpEndpointInjectorPort>(port);
            return(port);
        }
예제 #4
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        private void OnRegisterHostComponents(IComponentContainerBuilder containerBuilder)
        {
            containerBuilder.RegisterComponentInstance <MicroserviceHostBuilder>(this);
        }
예제 #5
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public static void ContributeWebApp <TApp>(this IComponentContainerBuilder containerBuilder, string urlPathBase)
            where TApp : IWebApp
        {
            containerBuilder.RegisterComponentInstance(new WebAppInjectorPort(containerBuilder, typeof(TApp), urlPathBase));
        }