Class ModuleBase
  
  Provides base for implementation of IModule
 
  
  
    Inheritance
    System.Object
    
    
    ModuleBase
      
      
      
   
  
    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)
    
   
  
  Assembly: NFX.dll
  Syntax
  
    public abstract class ModuleBase : ApplicationComponent, IModuleImplementation, IModule, IApplicationComponent, INamed, IOrdered, IDisposable, IConfigurable, IInstrumentable, IExternallyParameterized
   
  Constructors
  
  
  
  
  ModuleBase()
  Creates a root module without a parent
 
  
  Declaration
  
  
  
  
  ModuleBase(IModule)
  Creates a module under a parent module, such as HubModule
 
  
  Declaration
  
    protected ModuleBase(IModule parent)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | IModule | 
        parent | 
         | 
      
    
  
  
  
  
  ModuleBase(IModule, Int32)
  Creates a module under a parent module with the specified order, such as HubModule
 
  
  Declaration
  
    protected ModuleBase(IModule parent, int order)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | IModule | 
        parent | 
         | 
      
      
        | System.Int32 | 
        order | 
         | 
      
    
  
  Fields
  
  
  
  m_Children
  
  
  Declaration
  
    protected OrderedRegistry<ModuleBase> m_Children
   
  Field Value
  
  Properties
  
  
  
  
  ChildModules
  
  
  Declaration
  
    public IOrderedRegistry<IModule> ChildModules { get; }
   
  Property Value
  
  
  
  
  InstrumentationEnabled
  
  
  Declaration
  
    public virtual bool InstrumentationEnabled { get; set; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  IsHardcodedModule
  
  
  Declaration
  
    public abstract bool IsHardcodedModule { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  ModuleEffectiveLogLevel
  
  
  Declaration
  
    public virtual MessageType ModuleEffectiveLogLevel { get; }
   
  Property Value
  
  
  
  
  ModuleLogLevel
  
  
  Declaration
  
    public MessageType? ModuleLogLevel { get; set; }
   
  Property Value
  
  
  
  
  Name
  
  
  Declaration
  
    public string Name { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  Order
  
  
  Declaration
  
    public int Order { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
  
  
  ParentModule
  
  
  Declaration
  
    public IModule ParentModule { get; }
   
  Property Value
  
  Methods
  
  
  
  
  Destructor()
  
  
  Declaration
  
    protected override void Destructor()
   
  Overrides
  
  
  
  
  DoApplicationAfterInit(IApplication)
  Override to perform this module-specific actions after app container init.
Return true only when the system should not continue to call all child modules, false to let the system call all child modules.
The call is used to perform initialization tasks such as inter-service dependency fixups,
initial data loads (e.g. initial cache fetch etc..) after everything has loaded in the application container.
The implementation is expected to handle internal exceptions gracefully (i.e. use log etc.)
 
  
  Declaration
  
    protected virtual bool DoApplicationAfterInit(IApplication application)
   
  Parameters
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  DoApplicationBeforeCleanup(IApplication)
  Override to perform this module-specific actions before app container shutdown.
Return true only when the system should not continue to call all child modules, false let the system call all child modules.
The call is used to perform finalization tasks such as inter-service dependency tears and flushes before
everything is about to be shutdown in the application container.
The implementation is expected to handle internal exceptions gracefully (i.e. use log etc.)
 
  
  Declaration
  
    protected virtual bool DoApplicationBeforeCleanup(IApplication application)
   
  Parameters
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  
  Override to configure the instance 
 
  
  Declaration
  
    protected virtual void DoConfigure(IConfigSectionNode node)
   
  Parameters
  
  
  
  
  
  Override to perform custom population/registration of modules
 
  
  Declaration
  
    protected virtual void DoConfigureChildModules(IConfigSectionNode node)
   
  Parameters
  
  
  
  
  DoExternalGetParameter(String, out Object, String[])
  
  
  Declaration
  
    protected virtual bool DoExternalGetParameter(string name, out object value, params string[] groups)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
      
        | System.Object | 
        value | 
         | 
      
      
        | System.String[] | 
        groups | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  DoExternalSetParameter(String, Object, String[])
  
  
  Declaration
  
    protected virtual bool DoExternalSetParameter(string name, object value, params string[] groups)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
      
        | System.Object | 
        value | 
         | 
      
      
        | System.String[] | 
        groups | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  DoGetAllChildModuleConfigNodes(IConfigSectionNode)
  
  
  Declaration
  
    protected virtual IEnumerable<IConfigSectionNode> DoGetAllChildModuleConfigNodes(IConfigSectionNode node)
   
  Parameters
  
  Returns
  
  
  
  
  DoGetExternalParameters()
  
  
  Declaration
  
    protected virtual IEnumerable<KeyValuePair<string, Type>> DoGetExternalParameters()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>> | 
         | 
      
    
  
  
  
  
  DoGetExternalParametersForGroups(String[])
  
  
  Declaration
  
    protected virtual IEnumerable<KeyValuePair<string, Type>> DoGetExternalParametersForGroups(params string[] groups)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String[] | 
        groups | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>> | 
         | 
      
    
  
  
  
  
  Get<TModule>(Func<TModule, Boolean>)
  
  
  Declaration
  
    public virtual TModule Get<TModule>(Func<TModule, bool> filter = null)where TModule : class, IModule
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Func<TModule, System.Boolean> | 
        filter | 
         | 
      
    
  
  Returns
  
  Type Parameters
  
  
  
  
  Get<TModule>(String)
  
  
  Declaration
  
    public virtual TModule Get<TModule>(string name)where TModule : class, IModule
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
    
  
  Returns
  
  Type Parameters
  
  
  
  
  ModuleLog(MessageType, String, String, Exception, Nullable<Guid>, String)
  
  
  Declaration
  
    public virtual Guid ModuleLog(MessageType type, string from, string text, Exception error = null, Guid? related = default (Guid? ), string pars = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | MessageType | 
        type | 
         | 
      
      
        | System.String | 
        from | 
         | 
      
      
        | System.String | 
        text | 
         | 
      
      
        | System.Exception | 
        error | 
         | 
      
      
        | System.Nullable<System.Guid> | 
        related | 
         | 
      
      
        | System.String | 
        pars | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Guid | 
         | 
      
    
  
  
  
  
  ToString()
  
  
  Declaration
  
    public override string ToString()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  Overrides
  System.Object.ToString()
  
  
  
  TryGet<TModule>(Func<TModule, Boolean>)
  
  
  Declaration
  
    public TModule TryGet<TModule>(Func<TModule, bool> filter)where TModule : class, IModule
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Func<TModule, System.Boolean> | 
        filter | 
         | 
      
    
  
  Returns
  
  Type Parameters
  
  
  
  
  TryGet<TModule>(String)
  
  
  Declaration
  
    public virtual TModule TryGet<TModule>(string name)where TModule : class, IModule
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
    
  
  Returns
  
  Type Parameters
  
  Explicit Interface Implementations
  
  
  
  
  IModuleImplementation.ApplicationAfterInit(IApplication)
  
  
  Declaration
  
    void IModuleImplementation.ApplicationAfterInit(IApplication application)
   
  Parameters
  
  
  
  
  IModuleImplementation.ApplicationBeforeCleanup(IApplication)
  
  
  Declaration
  
    void IModuleImplementation.ApplicationBeforeCleanup(IApplication application)
   
  Parameters
  
  
  
  
  
  
  
  Declaration
  
    void IConfigurable.Configure(IConfigSectionNode node)
   
  Parameters
  
  
  
  
  IExternallyParameterized.ExternalGetParameter(String, out Object, String[])
  
  
  Declaration
  
    bool IExternallyParameterized.ExternalGetParameter(string name, out object value, params string[] groups)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
      
        | System.Object | 
        value | 
         | 
      
      
        | System.String[] | 
        groups | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  IExternallyParameterized.ExternalParameters
  
  
  Declaration
  
    IEnumerable<KeyValuePair<string, Type>> IExternallyParameterized.ExternalParameters { get; }
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>> | 
         | 
      
    
  
  
  
  
  IExternallyParameterized.ExternalParametersForGroups(String[])
  
  
  Declaration
  
    IEnumerable<KeyValuePair<string, Type>> IExternallyParameterized.ExternalParametersForGroups(params string[] groups)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String[] | 
        groups | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>> | 
         | 
      
    
  
  
  
  
  IExternallyParameterized.ExternalSetParameter(String, Object, String[])
  
  
  Declaration
  
    bool IExternallyParameterized.ExternalSetParameter(string name, object value, params string[] groups)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        name | 
         | 
      
      
        | System.Object | 
        value | 
         | 
      
      
        | System.String[] | 
        groups | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  Implements
  
  
  
  
  
  
      System.IDisposable
  
  
  
  
  Extension Methods