public override void ContributeConfigSections(IComponentContainerBuilder newComponents) { base.ContributeConfigSections(newComponents); newComponents .RegisterComponentInstance(new ConfigSection_MessagingPlatformConfiguration()) .ForService <IMessagingPlatformConfiguration>(); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- public static void ContributePortBExample(this IComponentContainerBuilder containerBuilder, string value) { containerBuilder.RegisterComponentInstance <PortsAndAdaptersPoc.ExamplePortB>( new PortsAndAdaptersPoc.ExamplePortB(containerBuilder) { Value = value } ); }
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); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- private void OnRegisterHostComponents(IComponentContainerBuilder containerBuilder) { containerBuilder.RegisterComponentInstance <MicroserviceHostBuilder>(this); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- public static void ContributeWebApp <TApp>(this IComponentContainerBuilder containerBuilder, string urlPathBase) where TApp : IWebApp { containerBuilder.RegisterComponentInstance(new WebAppInjectorPort(containerBuilder, typeof(TApp), urlPathBase)); }