Opc.Ua.Server.StandardServer.SetServerState C# (CSharp) Method

SetServerState() protected method

Updates the server state.
protected SetServerState ( ServerState state ) : void
state ServerState The state.
return void
        protected virtual void SetServerState(ServerState state)
        {
            lock (m_lock)
            {
                if (ServiceResult.IsBad(ServerError))
                {
                    throw new ServiceResultException(ServerError);
                }

                if (m_serverInternal == null)
                {                    
                    throw new ServiceResultException(StatusCodes.BadServerHalted);
                }

                m_serverInternal.CurrentState = state;
            }
        }