Skip to content

OfficeAddinEnvironmentService

OfficeAddinEnvironmentService is a host-specific concrete subclass of EnvironmentServiceBase for Office add-in hosting contexts. The application host is resolved from a caller-supplied OfficeEnvironment enum value rather than auto-detected.

Purpose

  • Provide an IEnvironmentService implementation for Office add-in consumers, resolving the environment host from a fixed set of named Office deployment tiers.

Context

  • Namespace: SAIF.Framework.Security
  • Assembly/package: SAIF.Framework.Security.EnvironmentApi

Public members

Member Signature Purpose
OfficeAddinEnvironmentService(environment, applicationId, sections) public OfficeAddinEnvironmentService(OfficeEnvironment environment, string applicationId, params string[] sections) Constructs the service from an OfficeEnvironment enum value and loads the specified configuration sections.
OfficeAddinEnvironmentService(environment, applicationId) public OfficeAddinEnvironmentService(OfficeEnvironment environment, string applicationId) Constructs the service from an OfficeEnvironment enum value.
ApplicationHost public override string ApplicationHost { get; } Returns the host resolved from the OfficeEnvironment value at construction (netdev, nettest, netqa, or netprod).
MachineName public override string MachineName { get; } Returns Environment.MachineName.
IsClientExternal public override bool IsClientExternal { get; } Always false.
IsClientInsideFirewall public override bool IsClientInsideFirewall { get; } Always true.
IsLocalMachine public override bool IsLocalMachine { get; } Always true.
IsWeb public override bool IsWeb { get; } Always false.
User public override IPrincipal User { get; } Returns Thread.CurrentPrincipal.
OfficeEnvironment public enum OfficeEnvironment { Dev, Test, QA, Prod } Nested enum of named Office deployment tiers; any value other than Test/QA/Prod resolves to netdev.

Inherited public members

Members in this section are inherited from EnvironmentServiceBase in SAIF.Framework.Security.EnvironmentApi. They are available on this type through inheritance.

Member Signature Purpose Origin
Configurations ConfigurationSettings Configurations { get; } The current in-memory cached configuration settings; triggers a refresh if not yet loaded. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
GetApplicationEnvironment ApplicationEnvironment GetApplicationEnvironment() Returns Configurations.Environment. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
GetApplicationTrack string GetApplicationTrack() Returns Configurations.Track. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
GetConfigSetting string GetConfigSetting(string configKey) Retrieves a plain-text configuration value. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
GetConfigSetting\<T> T GetConfigSetting<T>(string configKey) Retrieves a typed configuration value. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
GetSecureConfigSetting string GetSecureConfigSetting(string configKey, string systemHashValue) Retrieves an encrypted configuration value. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
IsDeveloperMachine virtual bool IsDeveloperMachine { get; } Determines and memoizes developer-machine status (see BR-005). SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
IsProduction bool IsProduction { get; } true when GetApplicationEnvironment() is ApplicationEnvironment.Prod. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase
LoadSection ConfigurationSettings LoadSection(string section) Fetches and merges an entire named configuration section into the cache. SAIF.Framework.Security.EnvironmentApi — EnvironmentServiceBase

Behavioral notes

  • GetRootApplicationFolder (private) matches a known host prefix (netdev, nettest, netqa, netprod) from a file-system path but has no confirmed call site within this class*.
  • There is no constructor overload accepting a raw host string; the environment host is always derived from OfficeEnvironment*.

Constraints and usage notes

  • Intended exclusively for Office add-in hosting contexts where the environment host is one of a small, fixed set of named deployment tiers.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Framework.Security.EnvironmentApi\Services.Common\OfficeAddinEnvironmentService.cs
  • SAIF.Framework.Security.EnvironmentApi\Services.Common\EnvironmentServiceBase.cs