A base class for a UA server implementation.
상속: IServerBase, IDisposable
예제 #1
0
 /// <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";
 }
예제 #2
0
 /// <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));
 }
예제 #3
0
        /// <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;
 }
예제 #6
0
        /// <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;
		}
예제 #7
0
 /// <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;
 }
예제 #8
0
 /// <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;
 }