Class ApplicationComponent
An abstraction of a disposable application component - major implementation/functionality part of an app.
Components logically subdivide application container so their instances may be discovered
by other parties, for example: one may iterate over all components in an application that support instrumentation and logging.
Services are sub-types of components.
Use "ApplicationComponent.AllComponents" to access all components in the container
Inheritance
System.Object
ApplicationComponent
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NFX.dll
Syntax
public abstract class ApplicationComponent : DisposableObject, IApplicationComponent, IDisposable
Constructors
ApplicationComponent()
Declaration
protected ApplicationComponent()
ApplicationComponent(Object)
Declaration
protected ApplicationComponent(object director)
Parameters
Type |
Name |
Description |
System.Object |
director |
|
Properties
AllComponents
Returns a thread-safe enumerable( a snapshot) of all known component instances
Declaration
public static IEnumerable<ApplicationComponent> AllComponents { get; }
Property Value
ComponentCommonName
Returns the common name used to identify the component, for example "Glue" for various IGlue implementations.
This name is searched-by some management tools that allow to find component by this name that does not change between
application restarts like ComponentSID does. Subordinate (non-root) components return null
Declaration
public virtual string ComponentCommonName { get; }
Property Value
Type |
Description |
System.String |
|
ComponentDirector
Returns a reference to an object that this app component services/operates under, or null
Declaration
public object ComponentDirector { get; }
Property Value
Type |
Description |
System.Object |
|
ComponentSID
Returns process/instance unique app component system id
Declaration
public ulong ComponentSID { get; }
Property Value
Type |
Description |
System.UInt64 |
|
ComponentStartTime
Returns local computer time of component start (not from application container time)
Declaration
public DateTime ComponentStartTime { get; }
Property Value
Type |
Description |
System.DateTime |
|
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
GetAppComponentByCommonName(String)
Looks-up an existing application component instance by its ComponentCommonName or null. The search is case-insensitive
Declaration
public static ApplicationComponent GetAppComponentByCommonName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
GetAppComponentBySID(UInt64)
Looks-up an existing application component instance by its ComponentSID or null
Declaration
public static ApplicationComponent GetAppComponentBySID(ulong sid)
Parameters
Type |
Name |
Description |
System.UInt64 |
sid |
|
Returns
Implements
System.IDisposable
Extension Methods