Class DynamicAppRuntime
An application application runtime loading dynamically assemblies from the application localtion.
Inheritance
Inherited Members
Namespace: Kephas.Application
Assembly: Kephas.Core.dll
Syntax
public class DynamicAppRuntime : AppRuntimeBase, IAppRuntime, IExpando, IDynamicMetaObjectProvider, IIndexable, ILoggable
Constructors
| Improve this Doc View SourceDynamicAppRuntime(IAssemblyLoader, ILogManager, Func<AssemblyName, Boolean>, String, String, String, IExpando)
Initializes a new instance of the DynamicAppRuntime class.
Declaration
public DynamicAppRuntime(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. Manager for log. |
System.Func<System.Reflection.AssemblyName, System.Boolean> | defaultAssemblyFilter | Optional. The default assembly filter. |
System.String | appLocation | Optional. The application location. |
System.String | appId | Optional. Identifier for the application. |
System.String | appVersion | Optional. The application version. |
IExpando | appArgs | Optional. The application arguments. |
Methods
| Improve this Doc View SourceAddAdditionalAssemblies(IList<Assembly>, Func<AssemblyName, Boolean>)
Adds additional assemblies to the ones already collected.
Declaration
protected virtual void AddAdditionalAssemblies(IList<Assembly> assemblies, Func<AssemblyName, bool> assemblyFilter)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Reflection.Assembly> | assemblies | The collected assemblies. |
System.Func<System.Reflection.AssemblyName, System.Boolean> | assemblyFilter | A filter for the assemblies. |
ComputeAppAssemblies(Func<AssemblyName, Boolean>)
Computes the application assemblies.
Declaration
protected override 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. |
Overrides
| Improve this Doc View SourceEnumerateFiles(String, String)
Enumerates the files in the provided directory.
Declaration
protected virtual IEnumerable<string> EnumerateFiles(string directory, string filePattern)
Parameters
Type | Name | Description |
---|---|---|
System.String | directory | Pathname of the directory. |
System.String | filePattern | A pattern specifying the files to retrieve. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file names. |
GetAssemblyNameFromAssemblyFileName(String)
Gets the assembly name from the assembly file name.
Declaration
protected AssemblyName GetAssemblyNameFromAssemblyFileName(string f)
Parameters
Type | Name | Description |
---|---|---|
System.String | f | The format string. |
Returns
Type | Description |
---|---|
System.Reflection.AssemblyName | The assembly name. |
GetFileName(Assembly)
Gets the file name of the provided assembly.
Declaration
protected virtual string GetFileName(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly. |
Returns
Type | Description |
---|---|
System.String | The assembly file name. |