Opc.Ua.ClientBase.GetResult C# (CSharp) 메소드

GetResult() 공개 정적인 메소드

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.
리턴 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);
        }