Show / Hide Table of Contents

Class Application

A class that represents an application built on the top of the framework. The class provides basic information about the application and methods for initializing and closing the application.

Inheritance
System.Object
Singleton<Application>
Application
Inherited Members
Singleton<Application>.Instance
Singleton<Application>.ResetSingletonInstance()
Singleton<Application>.SetSingletonInstance(Application)
Singleton<Application>.s_instance
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()
Namespace: Juhta.Net.Startup
Assembly: Juhta.Net.Startup.dll
Syntax
public class Application : Singleton<Application>

Constructors

| Improve this Doc View Source

Application()

Initializes a new instance.

Declaration
public Application()
Remarks

Log events will be written to the current user's temp directory, and the configuration files are assumed to locate in the binary directory.

| Improve this Doc View Source

Application(String)

Initializes a new instance.

Declaration
public Application(string logFilePath)
Parameters
Type Name Description
System.String logFilePath

Specifies a log file path. Can be null in which case the log file will be written to the current user's temp directory. This default location will also be used if logFilePath specifies an invalid log file.

Remarks

The configuration files are assumed to locate in the binary directory.

| Improve this Doc View Source

Application(String, String)

Initializes a new instance.

Declaration
public Application(string logFilePath, string configDirectory)
Parameters
Type Name Description
System.String logFilePath

Specifies a log file path. Can be null in which case the log file will be written to the current user's temp directory. This default location will also be used if logFilePath specifies an invalid log file.

System.String configDirectory

Specifies a directory to search for configuration files. Can be null in which case the configuration files are assumed to locate in the binary directory.

Properties

| Improve this Doc View Source

BinDirectory

Gets the binary directory for the framework and application libraries. The return value is null if the application is not initialized.

Declaration
public string BinDirectory { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ConfigDirectory

Gets the configuration directory for the framework and application libraries. The return value is null if the application is not initialized.

Declaration
public string ConfigDirectory { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

DefaultConfigFileName

Gets the name of the default configuration file for the application. Can be null.

Declaration
public string DefaultConfigFileName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

IsInitialized

Returns true if the application has been initialized, otherwise false.

Declaration
public bool IsInitialized { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Name

Gets the name of the application.

Declaration
public string Name { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

Close()

Closes the application by closing all configured startup libraries.

Declaration
public void Close()
| Improve this Doc View Source

CloseInstance()

Closes the possibly created singleton Application instance.

Declaration
public static void CloseInstance()
| Improve this Doc View Source

GetDynamicLibraryContext<TDynamicLibrary, TLibraryState>()

Creates an instance of DynamicLibraryContext<TDynamicLibrary, TLibraryState> corresponding to specified dynamic library type and library state type.

Declaration
public DynamicLibraryContext<TDynamicLibrary, TLibraryState> GetDynamicLibraryContext<TDynamicLibrary, TLibraryState>()where TDynamicLibrary : IDynamicLibrary where TLibraryState : ILibraryState
Returns
Type Description
DynamicLibraryContext<TDynamicLibrary, TLibraryState>

Returns the created DynamicLibraryContext<TDynamicLibrary, TLibraryState> instance.

Type Parameters
Name Description
TDynamicLibrary

Specifies a dynamic library type.

TLibraryState

Specifies a library state type.

| Improve this Doc View Source

Start()

Starts the application by initializing all configured startup libraries.

Declaration
public void Start()
| Improve this Doc View Source

StartInstance()

Creates and starts a new singleton Application instance.

Declaration
public static void StartInstance()
Remarks

Log events will be written to the current user's temp directory, and the configuration files are assumed to locate in the binary directory.

| Improve this Doc View Source

StartInstance(String)

Creates and starts a new singleton Application instance.

Declaration
public static void StartInstance(string logFilePath)
Parameters
Type Name Description
System.String logFilePath

Specifies a log file path. Can be null in which case the log file will be written to the current user's temp directory. This default location will also be used if logFilePath specifies an invalid log file.

Remarks

The configuration files are assumed to locate in the binary directory.

| Improve this Doc View Source

StartInstance(String, String)

Creates and starts a new singleton Application instance.

Declaration
public static void StartInstance(string logFilePath, string configDirectory)
Parameters
Type Name Description
System.String logFilePath

Specifies a log file path. Can be null in which case the log file will be written to the current user's temp directory. This default location will also be used if logFilePath specifies an invalid log file.

System.String configDirectory

Specifies a directory to search for configuration files. Can be null in which case the configuration files are assumed to locate in the binary directory.

  • Improve this Doc
  • View Source
Back to top Copyright © 2017-2019 Juha Lähteenmäki
Generated by DocFX