/// <summary> /// Initializes a new instance of the <see cref="WindowsService"/> class. /// </summary> /// <param name="server">The server.</param> /// <param name="configSectionName">Name of the config section.</param> /// <param name="applicationType">Type of the application.</param> /// <param name="configurationType">Type of the configuration.</param> public WindowsService(ServerBase server, string configSectionName, ApplicationType applicationType, Type configurationType) { m_server = server; m_configSectionName = configSectionName; m_applicationType = applicationType; m_configurationType = configurationType; EventLog.Source = "UA Application"; }
/// <summary> /// Starts the UA server as a Windows Service. /// </summary> /// <param name="server">The server.</param> public void StartAsService(ServerBase server) { m_server = server; ServiceBase.Run(new WindowsService(server, ConfigSectionName, ApplicationType, ConfigurationType)); }
/// <summary> /// Starts the UA server. /// </summary> /// <param name="server">The server.</param> public void Start(ServerBase server) { m_server = server; if (m_applicationConfiguration == null) { LoadApplicationConfiguration(false); } if (m_applicationConfiguration.SecurityConfiguration != null && m_applicationConfiguration.SecurityConfiguration.AutoAcceptUntrustedCertificates) { m_applicationConfiguration.CertificateValidator.CertificateValidation += CertificateValidator_CertificateValidation; } server.Start(m_applicationConfiguration); }
/// <summary> /// Returns an instance of the endpoint to use. /// </summary> protected virtual EndpointBase GetEndpointInstance(ServerBase server) { return null; }
/// <summary> /// Initializes a new instance of the <see cref="RequestQueue"/> class. /// </summary> /// <param name="server">The server.</param> /// <param name="minThreadCount">The minimum number of threads in the pool.</param> /// <param name="maxThreadCount">The maximum number of threads in the pool.</param> /// <param name="maxRequestCount">The maximum number of requests that will placed in the queue.</param> public RequestQueue(ServerBase server, int minThreadCount, int maxThreadCount, int maxRequestCount) { m_server = server; m_stopped = false; }
/// <summary> /// Initializes the service host. /// </summary> /// <param name="server">The server.</param> /// <param name="endpointType">Type of the endpoint.</param> /// <param name="addresses">The addresses.</param> public ServiceHost(ServerBase server, Type endpointType, params Uri[] addresses) : base(endpointType, addresses) { m_server = server; m_stopServerOnClose = false; }
/// <summary> /// Initializes the service host. /// </summary> /// <param name="server">The server.</param> /// <param name="endpointType">Type of the endpoint.</param> /// <param name="addresses">The addresses.</param> public ServiceHost(ServerBase server, Type endpointType, params Uri[] addresses) { m_server = server; m_endpointType = endpointType; m_addresses = addresses; }