Class TestApplication
Application designated for use in various unit test cases.
This class is not intended for use in non-test systems
Inheritance
System.Object
TestApplication
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: Azos.dll
Syntax
public class TestApplication : DisposableObject, IDisposable, IApplication, INamed, ILocalizedTimeProvider
Constructors
TestApplication(ConfigSectionNode)
Declaration
public TestApplication(ConfigSectionNode cfgRoot = null)
Parameters
Fields
m_CommandArgs
Declaration
protected ConfigSectionNode m_CommandArgs
Field Value
m_ConfigRoot
Declaration
protected ConfigSectionNode m_ConfigRoot
Field Value
m_ConfigSettings
Declaration
protected List<IConfigSettings> m_ConfigSettings
Field Value
m_InstanceID
Declaration
protected Guid m_InstanceID
Field Value
Type |
Description |
System.Guid |
|
Properties
Active
Declaration
public virtual bool Active { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AllComponents
Enumerates all components of this application
Declaration
public IEnumerable<IApplicationComponent> AllComponents { get; }
Property Value
AllowNesting
Declaration
public virtual bool AllowNesting { get; }
Property Value
Type |
Description |
System.Boolean |
|
CommandArgs
Declaration
public virtual IConfigSectionNode CommandArgs { get; set; }
Property Value
ConfigRoot
Declaration
public virtual IConfigSectionNode ConfigRoot { get; set; }
Property Value
DataStore
Declaration
public virtual IDataStore DataStore { get; set; }
Property Value
DependencyInjector
Declaration
public IApplicationDependencyInjector DependencyInjector { get; set; }
Property Value
EnvironmentName
Declaration
public virtual string EnvironmentName { get; set; }
Property Value
Type |
Description |
System.String |
|
EventTimer
Declaration
public virtual IEventTimer EventTimer { get; set; }
Property Value
ForceInvariantCulture
Declaration
public virtual bool ForceInvariantCulture { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Glue
Declaration
public virtual IGlue Glue { get; set; }
Property Value
InstanceID
Declaration
public virtual Guid InstanceID { get; }
Property Value
Type |
Description |
System.Guid |
|
Instrumentation
Declaration
public virtual IInstrumentation Instrumentation { get; set; }
Property Value
IsUnitTest
Declaration
public virtual bool IsUnitTest { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
LocalizedTime
Declaration
public virtual DateTime LocalizedTime { get; set; }
Property Value
Type |
Description |
System.DateTime |
|
Log
Declaration
public virtual ILog Log { get; set; }
Property Value
ModuleRoot
Declaration
public virtual IModule ModuleRoot { get; set; }
Property Value
Name
Declaration
public virtual string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
ObjectStore
Declaration
public virtual IObjectStore ObjectStore { get; set; }
Property Value
Random
Declaration
public virtual RandomGenerator Random { get; }
Property Value
Realm
Declaration
public virtual IApplicationRealm Realm { get; set; }
Property Value
SecurityManager
Declaration
public virtual ISecurityManager SecurityManager { get; set; }
Property Value
ShutdownStarted
Declaration
public virtual bool ShutdownStarted { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Singletons
Declaration
public IApplicationSingletonManager Singletons { get; set; }
Property Value
StartTime
Declaration
public virtual DateTime StartTime { get; set; }
Property Value
Type |
Description |
System.DateTime |
|
Stopping
Declaration
public virtual bool Stopping { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
TimeLocation
Declaration
public virtual TimeLocation TimeLocation { get; set; }
Property Value
TimeSource
Declaration
public virtual ITimeSource TimeSource { get; set; }
Property Value
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
GetComponentByCommonName(String)
Returns an existing application component instance by its ComponentCommonName or null. The search is case-insensitive
Declaration
public IApplicationComponent GetComponentByCommonName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
GetComponentBySID(UInt64)
Returns a component by SID or null
Declaration
public IApplicationComponent GetComponentBySID(ulong sid)
Parameters
Type |
Name |
Description |
System.UInt64 |
sid |
|
Returns
LocalizedTimeToUniversalTime(DateTime)
Declaration
public DateTime LocalizedTimeToUniversalTime(DateTime local)
Parameters
Type |
Name |
Description |
System.DateTime |
local |
|
Returns
Type |
Description |
System.DateTime |
|
MakeNewSessionInstance(Guid, User)
Declaration
public virtual ISession MakeNewSessionInstance(Guid sessionID, User user = null)
Parameters
Type |
Name |
Description |
System.Guid |
sessionID |
|
User |
user |
|
Returns
NotifyAllConfigSettingsAboutChange()
Forces notification of all registered IConfigSettings-implementers about configuration change
Declaration
public virtual void NotifyAllConfigSettingsAboutChange()
NotifyAllConfigSettingsAboutChange(IConfigSectionNode)
Forces notification of all registered IConfigSettings-implementers about configuration change
Declaration
protected void NotifyAllConfigSettingsAboutChange(IConfigSectionNode node)
Parameters
RegisterAppFinishNotifiable(IApplicationFinishNotifiable)
Declaration
public bool RegisterAppFinishNotifiable(IApplicationFinishNotifiable notifiable)
Parameters
Returns
Type |
Description |
System.Boolean |
|
RegisterConfigSettings(IConfigSettings)
Registers an instance of IConfigSettings with application container to receive a call when
underlying app configuration changes
Declaration
public virtual bool RegisterConfigSettings(IConfigSettings settings)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Stop()
Declaration
UniversalTimeToLocalizedTime(DateTime)
Declaration
public DateTime UniversalTimeToLocalizedTime(DateTime utc)
Parameters
Type |
Name |
Description |
System.DateTime |
utc |
|
Returns
Type |
Description |
System.DateTime |
|
UnregisterAppFinishNotifiable(IApplicationFinishNotifiable)
Declaration
public bool UnregisterAppFinishNotifiable(IApplicationFinishNotifiable notifiable)
Parameters
Returns
Type |
Description |
System.Boolean |
|
UnregisterConfigSettings(IConfigSettings)
Removes the registration of IConfigSettings from application container
Declaration
public virtual bool UnregisterConfigSettings(IConfigSettings settings)
Parameters
Returns
Type |
Description |
System.Boolean |
True if settings instance was found and removed
|
Implements
System.IDisposable
Extension Methods