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

ValidateDiagnosticInfos() public static method

Validates a response returned by the server.
public static ValidateDiagnosticInfos ( DiagnosticInfoCollection response, IList request ) : void
response DiagnosticInfoCollection The response.
request IList The request.
return void
        public static void ValidateDiagnosticInfos(DiagnosticInfoCollection response, IList request)
        {
            // returning an empty list for diagnostic info arrays is allowed.
            if (response != null && response.Count != 0 && response.Count != request.Count)
            {
                throw new ServiceResultException(StatusCodes.BadUnexpectedError, "The server forgot to fill in the DiagnosticInfos array correctly when returning an operation level error.");
            }
        }