Class AppRuntimeBase
An application application runtime providing only assemblies loaded by the runtime.
Inheritance
Inherited Members
Namespace: Kephas.Application
Assembly: Kephas.Core.dll
Syntax
public abstract class AppRuntimeBase : Expando, IAppRuntime, IExpando, IDynamicMetaObjectProvider, IIndexable, ILoggable
Constructors
| Improve this Doc View SourceAppRuntimeBase(IAssemblyLoader, ILogManager, Func<AssemblyName, Boolean>, String, String, String, IExpando)
Initializes a new instance of the AppRuntimeBase class.
Declaration
protected AppRuntimeBase(IAssemblyLoader assemblyLoader = null, ILogManager logManager = null, Func<AssemblyName, bool> defaultAssemblyFilter = null, string appLocation = null, string appId = null, string appVersion = null, IExpando appArgs = null)
Parameters
Type | Name | Description |
---|---|---|
IAssemblyLoader | assemblyLoader | Optional. The assembly loader. |
ILogManager | logManager | Optional. The log manager. |
System.Func<System.Reflection.AssemblyName, System.Boolean> | defaultAssemblyFilter | Optional. A default filter applied when loading assemblies. |
System.String | appLocation | Optional. The application location. If not specified, the current application location is considered. |
System.String | appId | Optional. Identifier for the application. |
System.String | appVersion | Optional. The application version. |
IExpando | appArgs | Optional. The application arguments. |
Fields
| Improve this Doc View SourceAppIdKey
The application identifier key.
Declaration
public const string AppIdKey = "AppId"
Field Value
Type | Description |
---|---|
System.String |
AppInstanceIdKey
The application instance identifier key.
Declaration
public const string AppInstanceIdKey = "AppInstanceId"
Field Value
Type | Description |
---|---|
System.String |
AppVersionKey
The application version key.
Declaration
public const string AppVersionKey = "AppVersion"
Field Value
Type | Description |
---|---|
System.String |
AssemblyFileExtension
The assembly file extension.
Declaration
protected const string AssemblyFileExtension = ".dll"
Field Value
Type | Description |
---|---|
System.String |
AssemblyFileSearchPattern
A pattern specifying the assembly file search.
Declaration
protected const string AssemblyFileSearchPattern = "*.dll"
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceAssemblyFilter
Gets the assembly filter.
Declaration
protected Func<AssemblyName, bool> AssemblyFilter { get; }
Property Value
Type | Description |
---|---|
System.Func<System.Reflection.AssemblyName, System.Boolean> | The assembly filter. |
AssemblyLoader
Gets the assembly loader.
Declaration
public IAssemblyLoader AssemblyLoader { get; }
Property Value
Type | Description |
---|---|
IAssemblyLoader | The assembly loader. |
Logger
Gets or sets the logger.
Declaration
public ILogger Logger { get; protected set; }
Property Value
Type | Description |
---|---|
ILogger | The logger. |
Methods
| Improve this Doc View SourceComputeAppAssemblies(Func<AssemblyName, Boolean>)
Computes the application assemblies.
Declaration
protected virtual IEnumerable<Assembly> ComputeAppAssemblies(Func<AssemblyName, bool> assemblyFilter)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Reflection.AssemblyName, System.Boolean> | assemblyFilter | A filter for the assemblies. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.Assembly> | An enumeration of application assemblies. |
GetAppAssemblies(Func<AssemblyName, Boolean>)
Gets the application assemblies.
Declaration
public virtual IEnumerable<Assembly> GetAppAssemblies(Func<AssemblyName, bool> assemblyFilter = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Reflection.AssemblyName, System.Boolean> | assemblyFilter | Optional. A filter for the assemblies. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.Assembly> | An enumeration of application assemblies. |
GetAppBinDirectories()
Gets the application bin folders from where application is loaded.
Declaration
public virtual IEnumerable<string> GetAppBinDirectories()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumerator that allows foreach to be used to process the application bin folders in this collection. |
GetAppLocation()
Gets the application location (directory where the application lies).
Declaration
public virtual string GetAppLocation()
Returns
Type | Description |
---|---|
System.String | A path indicating the application location. |
GetHostAddress()
Gets host address.
Declaration
public virtual IPAddress GetHostAddress()
Returns
Type | Description |
---|---|
System.Net.IPAddress | The host address. |
GetHostName()
Gets the name of the host where the application process runs.
Declaration
public virtual string GetHostName()
Returns
Type | Description |
---|---|
System.String | The host name. |
GetLoadedAssemblies()
Gets the loaded assemblies.
Declaration
protected virtual IList<Assembly> GetLoadedAssemblies()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.Reflection.Assembly> | The loaded assemblies. |
GetLogger()
Gets the logger.
Declaration
protected virtual ILogger GetLogger()
Returns
Type | Description |
---|---|
ILogger | The logger. |
GetReferencedAssemblies(Assembly)
Gets the referenced assemblies.
Declaration
protected virtual AssemblyName[] GetReferencedAssemblies(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly. |
Returns
Type | Description |
---|---|
System.Reflection.AssemblyName[] | An array of assembly name. |
InitializeAppProperties(Assembly, String, String)
Initializes the application properties: AppId, AppInstanceId, and AppVersion.
Declaration
protected virtual void InitializeAppProperties(Assembly entryAssembly, string appId, string appVersion)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | entryAssembly | The entry assembly. |
System.String | appId | Identifier for the application. |
System.String | appVersion | The application version. |