Opc.Ua.ClientBase.GetResult C# (CSharp) Méthode

GetResult() public static méthode

Converts a service response to a ServiceResult object.
public static GetResult ( Opc.Ua.StatusCode statusCode, int index, DiagnosticInfoCollection diagnosticInfos, ResponseHeader responseHeader ) : ServiceResult
statusCode Opc.Ua.StatusCode The status code.
index int The index.
diagnosticInfos DiagnosticInfoCollection The diagnostic information.
responseHeader ResponseHeader The response header.
Résultat ServiceResult
        public static ServiceResult GetResult(
            StatusCode statusCode,
            int index,
            DiagnosticInfoCollection diagnosticInfos,
            ResponseHeader responseHeader)
        {
            if (diagnosticInfos != null && diagnosticInfos.Count > index)
            {
                return new ServiceResult(statusCode.Code, diagnosticInfos[index], responseHeader.StringTable);
            }

            return new ServiceResult(statusCode.Code);
        }