Opc.Ua.ClientBase.ValidateResponse C# (CSharp) Method

ValidateResponse() public static method

Validates a response returned by the server.
public static ValidateResponse ( IList response, IList request ) : void
response IList The response.
request IList The request.
return void
        public static void ValidateResponse(IList response, IList request)
        {
            if (response is DiagnosticInfoCollection)
            {
                throw new ArgumentException("Must call ValidateDiagnosticInfos() for DiagnosticInfoCollections.", "response");
            }

            if (response == null || response.Count != request.Count)
            {
                throw new ServiceResultException(StatusCodes.BadUnexpectedError, "The server returned a list without the expected number of elements.");
            }
        }

Same methods

ClientBase::ValidateResponse ( ResponseHeader header ) : void