NFX.Environment NamespaceNFX Class Library

[This is preliminary documentation and is subject to change.]

Provides configuration and environment-related(i.e. environment variables, command-line parser) classes
Classes

  ClassDescription
Public classBehavior
Represents a piece of logic that can be applied to different entities declaratively as attribute or through configuration. Behaviors are a form of inversion-of-control that allows to configure entities by code which itself can be injected by name from configuration. Behaviors are a form of aspect-oriented programming as they allow to proclaim certain "behavior" that knows how to implement itself on various application components (i.e. some behavior may inject Glue message inspector or log destination). Behaviors can be used to enforce policies by performing pre-run checks and throw exceptions if certain required providers are not injected/configured
Public classBehaviorApplyException
Thrown by Behavior class to indicate behavior apply error
Public classBuildInformation
Retrieves build information encapsulated into a module in the form of an embedded resource
Public classCommandArgsConfiguration
Provides implementation of configuration based on arguments supplied from command line which is "string[]". Arguments start with either "/" or "-" prefix. If any argument is not prefixed then it is written as an auto-named attribute node of the root with its value set, otherwise a section (under root) with argument's name is created. Any argument may have options. Any option may either consist of name or name value pair delimited by "=". Argument options are written as attribute nodes of their corresponding sections. If option value specified without name (without "=") then option is auto-named
Public classConfigAttribute
Specifies how to apply configuration values to classes/fields/props
Public classConfigAttrNode
Represents an attribute of a attribute node
Protected classConfigAttrNodeList
Public classConfigException
Configuration-related exception
Public classConfigMacroContextAttribute
Decorates classes or structs that act as a context object for macro evaluation - passed as context parameter to MacroRunner.Run(...context) method
Public classConfigNode
Provides configuration node abstraction for section and attribute nodes. This class is thread-safe
Public classConfigNodeEqualityComparer
Performs deep structural comparison of IConfigNodes
Public classConfigSectionNode
Represents configuration section node. This class is thread safe
Protected classConfigSectionNodeList
Public classConfigStringBuilder
Facilitates the creation/building of strings from existing strings or configuration vectors. This is used for example to build DB connect strings from host names that need to be resolved via an external system
Public classConfiguration
Provides top-level configuration abstraction
Public classDefaultMacroRunner
Provides default implementation for configuration variable macros. NOTE: When serialized a new instance is created which will not equal by reference to static.Instance property
Public classFactoryUtils
Provides helper methods for dynamic object creation and configuration
Public classFileConfiguration
Provides file-based configuration base object used for concrete implementations such as XML or INI file base configurations
Public classJSONConfiguration
Provides implementation of configuration based on a classic JSON content
Public classLaconicConfiguration
Provides implementation of configuration based on Laconic content format
Public classMemoryConfiguration
Implements configuration that can not be persisted/loaded anywhere - just stored in memory
Public classNodeOverrideRules
Contains node override rule definitions such as override specifier names and values. This class is used for merging/override of configurations/nodes
Public classScriptRunner
Executes configuration scripts which are embedded in configuration
Public classVars
Allows for simple ad-hoc environment var passing to configuration
Public classWindowsEnvironmentVariableResolver
Resolves variables using Windows environment variables. NOTE: When serialized a new instance is created which will not equal by reference to static.Instance property
Public classXMLConfiguration
Provides implementation of configuration based on a classic XML content
Interfaces

  InterfaceDescription
Public interfaceIConfigAttrNode
Represents a read-only attribute of a attribute node
Public interfaceIConfigNode
Provides read-only configuration node abstraction for section and attribute nodes
Public interfaceIConfigNodeProvider
Represents an entity that provides config node. It is primarily used for includes
Public interfaceIConfigSectionNode
Provides read-only configuration section node abstraction
Public interfaceIConfigSettings
Represents an entity that provides a type-safe access to configuration settings that come from Configuration nodes. This class obviates the need for navigation between config nodes on every property get and facilitates faster access to some config parameters that need to be gotten efficiently, as they are now kept cached in RAM in native format (i.e. DateTime vs. string) as fields. Usually classes that implement this interface are singleton and they get registered with the application using IApplication.RegisterConfigSettings() method. Warning: the implementation must be thread-safe and allow property getters to keep reading while ConfigChanged() notification happens
Public interfaceIConfigStringBuilder
Denotes objects that can build a string (i.e. a database connection string) from the configured state/properties. This is used for example to build DB connect strings from host names that need to be resolved via an external system
Public interfaceIConfigurable
Designates entities that may be configured
Public interfaceIConfigurationPersistent
Designates entities that may persist their parameters/state in configuration
Public interfaceIEnvironmentVariableResolver
Represents an entity that can resolve variables
Public interfaceIMacroRunner
Represents an entity that runs config var macros
Enumerations

  EnumerationDescription
Public enumerationOverrideSpec
Override specifications that dictate what to do when another node supplies entity with the same name