using Microsoft.Extensions.Options; using ZB.MOM.WW.ScadaBridge.HealthMonitoring; namespace ZB.MOM.WW.ScadaBridge.Host; /// /// Provides the site identity from NodeOptions configuration. /// public class SiteIdentityProvider : ISiteIdentityProvider { /// public string SiteId { get; } /// /// Initializes the provider by reading the site id from node options. /// /// Node configuration containing the site id. public SiteIdentityProvider(IOptions nodeOptions) { SiteId = nodeOptions.Value.SiteId ?? throw new InvalidOperationException("SiteId is required for site nodes."); } }