/// <summary> /// Composes this instance. /// </summary> public void Compose() { if (_startupInstance is IConvention convention) { Scanner.AppendConvention(convention); } var configuration = SetupConfiguration(); SetupServices(configuration); SetupWebJobs(configuration); }
/// <summary> /// Composes this instance. /// </summary> public void Compose() { var existingHostedServices = Builder.Services.Where(x => x.ServiceType == typeof(IHostedService)).ToArray(); if (_startupInstance is IConvention convention) { Scanner.AppendConvention(convention); } var configuration = SetupConfiguration(); SetupServices(configuration); SetupWebJobs(configuration); Builder.Services.RemoveAll <IHostedService>(); Builder.Services.Add(existingHostedServices); }
IServicesBuilder IConventionContainer <IServicesBuilder, IServiceConvention, ServiceConventionDelegate> . AppendConvention(IEnumerable <IServiceConvention> conventions) { Scanner.AppendConvention(conventions); return(this); }
IServicesBuilder IConventionContainer <IServicesBuilder, IServiceConvention, ServiceConventionDelegate> . AppendConvention <T>() { Scanner.AppendConvention <T>(); return(this); }
IServicesBuilder IConventionContainer <IServicesBuilder, IServiceConvention, ServiceConventionDelegate> . AppendConvention(params IServiceConvention[] conventions) { Scanner.AppendConvention(conventions); return(this); }