Create() public static method

Creates a new startable endpoint based on the provided configuration.
public static Create ( EndpointConfiguration configuration ) : Task
configuration EndpointConfiguration Configuration.
return Task
Example #1
0
        Task <IStartableEndpoint> PerformConfiguration(Action <EndpointConfiguration> moreConfiguration = null)
        {
            var configuration = new EndpointConfiguration(endpointNameToUse);

            configuration.DefineCriticalErrorAction(OnCriticalError);

            moreConfiguration?.Invoke(configuration);

            specifier.Customize(configuration);
            profileManager.ActivateProfileHandlers(configuration);

            return(Endpoint.Create(configuration));
        }
Example #2
0
        Task <IStartableEndpoint> PerformConfiguration(Action <EndpointConfiguration> moreConfiguration = null)
        {
            var loggingConfigurers = profileManager.GetLoggingConfigurer();

            foreach (var loggingConfigurer in loggingConfigurers)
            {
                loggingConfigurer.Configure(specifier);
            }

            var configuration = new EndpointConfiguration(endpointNameToUse);

            SetSlaFromAttribute(configuration, specifier);

            configuration.DefineCriticalErrorAction(OnCriticalError);

            moreConfiguration?.Invoke(configuration);

            specifier.Customize(configuration);
            RoleManager.TweakConfigurationBuilder(specifier, configuration);
            profileManager.ActivateProfileHandlers(configuration);

            return(Endpoint.Create(configuration));
        }