Difference between revisions of "Intrinsic Component Configuration"

From OPC Labs Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
 
# Built-in configuration, if present, is applied (this can involve multiple configuration providers in specific sequence). This affects both the static and instance members of the component.
 
# Built-in configuration, if present, is applied (this can involve multiple configuration providers in specific sequence). This affects both the static and instance members of the component.
 
# If the code that creates the component specifies a configuration interface ("programmatic component configuration"), using a constructor designed for IoC (Inversion of Control), the configuration given by the specified interface is applied (this, again, can involve multiple configuration providers in specific sequence). Only instance members of the component can be configured in this way.
 
# If the code that creates the component specifies a configuration interface ("programmatic component configuration"), using a constructor designed for IoC (Inversion of Control), the configuration given by the specified interface is applied (this, again, can involve multiple configuration providers in specific sequence). Only instance members of the component can be configured in this way.
If the programmatic component configuration is used, the initial values that the component will end up using may be different from what you specify using the built-in component configuration feature.
+
If the programmatic component configuration is used, the initial values (of instance members) that the component will end up using may be different from what you specify using the built-in component configuration feature.

Revision as of 12:22, 18 January 2021


Note on Programmatic Component Configuration

The sequence of high-level component configuration evaluation is as follows:

  1. The values are set to their (constant, documented) defaults (both static and instance members).
  2. Built-in configuration, if present, is applied (this can involve multiple configuration providers in specific sequence). This affects both the static and instance members of the component.
  3. If the code that creates the component specifies a configuration interface ("programmatic component configuration"), using a constructor designed for IoC (Inversion of Control), the configuration given by the specified interface is applied (this, again, can involve multiple configuration providers in specific sequence). Only instance members of the component can be configured in this way.

If the programmatic component configuration is used, the initial values (of instance members) that the component will end up using may be different from what you specify using the built-in component configuration feature.