C# 클래스 Opc.Ua.Configuration.ApplicationInstance

A class that install, configures and runs a UA application.
파일 보기 프로젝트 열기: OPCFoundation/UA-.NET 1 사용 예제들

공개 메소드들

메소드 설명
AddToDiscoveryServerTrustList ( X509Certificate2 certificate, string oldThumbprint, IList issuers, CertificateStoreIdentifier trustedCertificateStore ) : void

Adds the application certificate to the discovery server trust list.

ApplicationInstance ( ) : System

Initializes a new instance of the ApplicationInstance class.

ApplicationInstance ( ApplicationConfiguration applicationConfiguration ) : System

Initializes a new instance of the ApplicationInstance class.

CheckApplicationInstanceCertificate ( bool silent, ushort minimumKeySize ) : void

Checks for a valid application instance certificate.

GetHttpUrlForAccessRule ( string baseAddress ) : string

Gets the HTTP URL to use for HTTP access rules.

LoadAppConfig ( bool silent, string filePath, ApplicationType applicationType, Type configurationType, bool applyTraceSettings ) : ApplicationConfiguration

Loads the configuration.

LoadApplicationConfiguration ( bool silent ) : ApplicationConfiguration

Loads the application configuration.

LoadApplicationConfiguration ( string filePath, bool silent ) : ApplicationConfiguration

Loads the application configuration.

LoadInstallConfig ( string configFile ) : void

Loads the installation configuration.

LoadInstallConfigFromFile ( string filePath ) : InstalledApplication

Loads the installation configuration from a file.

LoadInstallConfigFromResource ( string resourcePath, Assembly assembly ) : InstalledApplication

Loads the installation configuration from an embedded resource.

LoadInstallConfigFromStream ( Stream istrm ) : InstalledApplication

Loads the installation configuration from a stream.

ProcessCommandLine ( ) : bool

Processes the command line.

ProcessCommandLine ( bool ignoreUnknownArguments ) : bool

Processes the command line.

SetUaValidationForHttps ( CertificateValidator validator ) : void

Uses the UA validation logic for HTTPS certificates.

Start ( ServerBase server ) : void

Starts the UA server.

StartAsService ( ServerBase server ) : void

Starts the UA server as a Windows Service.

Stop ( ) : void

Stops the UA server.

보호된 메소드들

메소드 설명
GetArgumentDescriptions ( ) : ArgumentDescription[]

Gets the descriptions for the supported arguments.

GetHelpString ( ArgumentDescription commands ) : string

Gets the help string.

Install ( bool silent, string>.Dictionary args ) : void

Installs the service.

OnBeforeInstallService ( ) : void

Called immediately before the service is installed.

ProcessCommand ( bool silent, string>.Dictionary args ) : bool

Processes the command.

Uninstall ( bool silent, string>.Dictionary args ) : void

Uninstalls the service.

UpdateAppConfigWithInstallConfig ( ApplicationConfiguration configuration ) : void

Updates the application configuration with the values from the installation configuration.

ValidateArguments ( bool ignoreUnknownArguments, string>.Dictionary args ) : string

Validates the arguments.

비공개 메소드들

메소드 설명
AddApplicationCertificateToStore ( CertificateStoreIdentifier csid, X509Certificate2 certificate, string oldThumbprint ) : void

Adds an application certificate to a store.

AddIssuerCertificatesToStore ( CertificateStoreIdentifier csid, IList issuers ) : void

Adds an application certificate to a store.

AddToTrustedStore ( ApplicationConfiguration configuration, X509Certificate2 certificate ) : void

Adds the certificate to the Trusted Certificate Store

CertificateValidator_CertificateValidation ( CertificateValidator validator, CertificateValidationEventArgs e ) : void

Handles a certificate validation error.

CheckApplicationInstanceCertificate ( ApplicationConfiguration configuration, X509Certificate2 certificate, bool silent, ushort minimumKeySize ) : bool

Creates an application instance certificate if one does not already exist.

CheckDomainsInCertificate ( ApplicationConfiguration configuration, X509Certificate2 certificate, bool silent ) : bool

Checks that the domains in the server addresses match the domains in the certificates.

ConfigureFileAccess ( ApplicationConfiguration configuration ) : void

Configures access to the executable, the configuration file and the private key.

ConfigureFirewall ( ApplicationConfiguration configuration, bool silent, bool remove ) : void

Configures the firewall.

ConfigureHttpAccess ( ApplicationConfiguration configuration, bool remove ) : void

Configures the HTTP access.

CreateApplicationInstanceCertificate ( ApplicationConfiguration configuration, ushort keySize, ushort lifetimeInMonths ) : X509Certificate2

Creates the application instance certificate.

DeleteApplicationInstanceCertificate ( ApplicationConfiguration configuration ) : void

Deletes an existing application instance certificate.

GetAccessRules ( ) : List

Gets the access rules to use for the application.

HttpsCertificateValidation ( object sender, X509Certificate cert, X509Chain chain, System error ) : bool

Remotes the certificate validate.

SetHttpAccessRules ( string url, bool remove ) : void

Sets the HTTP access rules for the URL.

메소드 상세

AddToDiscoveryServerTrustList() 공개 정적인 메소드

Adds the application certificate to the discovery server trust list.
public static AddToDiscoveryServerTrustList ( X509Certificate2 certificate, string oldThumbprint, IList issuers, CertificateStoreIdentifier trustedCertificateStore ) : void
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
oldThumbprint string
issuers IList
trustedCertificateStore CertificateStoreIdentifier
리턴 void

ApplicationInstance() 공개 메소드

Initializes a new instance of the ApplicationInstance class.
public ApplicationInstance ( ) : System
리턴 System

ApplicationInstance() 공개 메소드

Initializes a new instance of the ApplicationInstance class.
public ApplicationInstance ( ApplicationConfiguration applicationConfiguration ) : System
applicationConfiguration ApplicationConfiguration The application configuration.
리턴 System

CheckApplicationInstanceCertificate() 공개 메소드

Checks for a valid application instance certificate.
public CheckApplicationInstanceCertificate ( bool silent, ushort minimumKeySize ) : void
silent bool if set to true no dialogs will be displayed.
minimumKeySize ushort Minimum size of the key.
리턴 void

GetArgumentDescriptions() 보호된 메소드

Gets the descriptions for the supported arguments.
protected GetArgumentDescriptions ( ) : ArgumentDescription[]
리턴 ArgumentDescription[]

GetHelpString() 보호된 메소드

Gets the help string.
protected GetHelpString ( ArgumentDescription commands ) : string
commands ArgumentDescription
리턴 string

GetHttpUrlForAccessRule() 공개 정적인 메소드

Gets the HTTP URL to use for HTTP access rules.
public static GetHttpUrlForAccessRule ( string baseAddress ) : string
baseAddress string
리턴 string

Install() 보호된 메소드

Installs the service.
protected Install ( bool silent, string>.Dictionary args ) : void
silent bool if set to true no dialogs such be displayed.
args string>.Dictionary Additional arguments provided on the command line.
리턴 void

LoadAppConfig() 공개 정적인 메소드

Loads the configuration.
public static LoadAppConfig ( bool silent, string filePath, ApplicationType applicationType, Type configurationType, bool applyTraceSettings ) : ApplicationConfiguration
silent bool
filePath string
applicationType ApplicationType
configurationType System.Type
applyTraceSettings bool
리턴 ApplicationConfiguration

LoadApplicationConfiguration() 공개 메소드

Loads the application configuration.
public LoadApplicationConfiguration ( bool silent ) : ApplicationConfiguration
silent bool
리턴 ApplicationConfiguration

LoadApplicationConfiguration() 공개 메소드

Loads the application configuration.
public LoadApplicationConfiguration ( string filePath, bool silent ) : ApplicationConfiguration
filePath string
silent bool
리턴 ApplicationConfiguration

LoadInstallConfig() 공개 메소드

Loads the installation configuration.
public LoadInstallConfig ( string configFile ) : void
configFile string The config file (may be null).
리턴 void

LoadInstallConfigFromFile() 공개 메소드

Loads the installation configuration from a file.
public LoadInstallConfigFromFile ( string filePath ) : InstalledApplication
filePath string
리턴 InstalledApplication

LoadInstallConfigFromResource() 공개 메소드

Loads the installation configuration from an embedded resource.
public LoadInstallConfigFromResource ( string resourcePath, Assembly assembly ) : InstalledApplication
resourcePath string
assembly System.Reflection.Assembly
리턴 InstalledApplication

LoadInstallConfigFromStream() 공개 메소드

Loads the installation configuration from a stream.
public LoadInstallConfigFromStream ( Stream istrm ) : InstalledApplication
istrm Stream
리턴 InstalledApplication

OnBeforeInstallService() 보호된 메소드

Called immediately before the service is installed.
protected OnBeforeInstallService ( ) : void
리턴 void

ProcessCommand() 보호된 메소드

Processes the command.
protected ProcessCommand ( bool silent, string>.Dictionary args ) : bool
silent bool if set to true no dialogs such be displayed.
args string>.Dictionary Additional arguments provided on the command line.
리턴 bool

ProcessCommandLine() 공개 메소드

Processes the command line.
public ProcessCommandLine ( ) : bool
리턴 bool

ProcessCommandLine() 공개 메소드

Processes the command line.
public ProcessCommandLine ( bool ignoreUnknownArguments ) : bool
ignoreUnknownArguments bool if set to true unknown arguments are ignored.
리턴 bool

SetUaValidationForHttps() 공개 정적인 메소드

Uses the UA validation logic for HTTPS certificates.
public static SetUaValidationForHttps ( CertificateValidator validator ) : void
validator CertificateValidator The validator.
리턴 void

Start() 공개 메소드

Starts the UA server.
public Start ( ServerBase server ) : void
server ServerBase The server.
리턴 void

StartAsService() 공개 메소드

Starts the UA server as a Windows Service.
public StartAsService ( ServerBase server ) : void
server ServerBase The server.
리턴 void

Stop() 공개 메소드

Stops the UA server.
public Stop ( ) : void
리턴 void

Uninstall() 보호된 메소드

Uninstalls the service.
protected Uninstall ( bool silent, string>.Dictionary args ) : void
silent bool if set to true no dialogs such be displayed.
args string>.Dictionary Additional arguments provided on the command line.
리턴 void

UpdateAppConfigWithInstallConfig() 보호된 메소드

Updates the application configuration with the values from the installation configuration.
protected UpdateAppConfigWithInstallConfig ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The configuration to update.
리턴 void

ValidateArguments() 보호된 메소드

Validates the arguments.
protected ValidateArguments ( bool ignoreUnknownArguments, string>.Dictionary args ) : string
ignoreUnknownArguments bool
args string>.Dictionary
리턴 string