public ServiceHandle( string description, ILog log, IHostingSettingsProvider hostingSettingsProvider, Action <IServiceHandle, IAppBuilder> configure) : this(description, log, hostingSettingsProvider, configure, string.Empty) { // Nothing to do }
public ServiceHandle( string description, ILog log, IHostingSettingsProvider hostingSettingsProvider, Action <IServiceHandle, IAppBuilder> configure, string serviceSuffix) { if (string.IsNullOrWhiteSpace(description)) { throw new ArgumentException( @"The value can be neither empty nor whitespace-only string nor null.", nameof(description)); } Description = description; _log = log ?? throw new ArgumentNullException(nameof(log)); HostingSettingsProvider = hostingSettingsProvider ?? throw new ArgumentNullException(nameof(hostingSettingsProvider)); ServiceSuffix = serviceSuffix ?? throw new ArgumentNullException(nameof(serviceSuffix)); _configure = configure ?? throw new ArgumentNullException(nameof(configure)); ServiceRegistrationUrl = hostingSettingsProvider.GetServiceRegistrationUrl(serviceSuffix); ServiceUrl = hostingSettingsProvider.GetServiceUrl(serviceSuffix); }