Opc.Ua.ServiceResult.ServiceResult C# (CSharp) Method

ServiceResult() public method

Initializes the object with a status code and a diagnostic info structure.
public ServiceResult ( Opc.Ua.StatusCode code, int index, DiagnosticInfoCollection diagnosticInfos, IList stringTable ) : System
code Opc.Ua.StatusCode
index int
diagnosticInfos DiagnosticInfoCollection
stringTable IList
return System
		public ServiceResult(StatusCode code, int index, DiagnosticInfoCollection diagnosticInfos, IList<string> stringTable)
		{
			m_code = (uint)code;

            if (index >= 0 && diagnosticInfos != null && index < diagnosticInfos.Count)
            {
                DiagnosticInfo diagnosticInfo = diagnosticInfos[index];
                
                if (diagnosticInfo != null)
                {
				    m_namespaceUri = LookupString(stringTable, diagnosticInfo.NamespaceUri);
				    m_symbolicId = LookupString(stringTable, diagnosticInfo.SymbolicId);
				    
                    string locale = LookupString(stringTable, diagnosticInfo.Locale);
				    string localizedText  = LookupString(stringTable, diagnosticInfo.LocalizedText);
                    m_localizedText  = new LocalizedText(locale, localizedText);

                    m_additionalInfo = diagnosticInfo.AdditionalInfo;

                    if (!StatusCode.IsGood(diagnosticInfo.InnerStatusCode))
                    {
                        m_innerResult = new ServiceResult(diagnosticInfo.InnerStatusCode, diagnosticInfo.InnerDiagnosticInfo, stringTable);
                    }
                }
            }
		}
        #endregion

Same methods

ServiceResult::ServiceResult ( ) : System
ServiceResult::ServiceResult ( Exception exception ) : System
ServiceResult::ServiceResult ( Exception exception, uint defaultCode ) : System
ServiceResult::ServiceResult ( Exception exception, uint defaultCode, Opc.Ua.LocalizedText defaultLocalizedText ) : System
ServiceResult::ServiceResult ( Exception exception, uint defaultCode, string defaultSymbolicId, string defaultNamespaceUri ) : System
ServiceResult::ServiceResult ( Exception e, uint defaultCode, string defaultSymbolicId, string defaultNamespaceUri, Opc.Ua.LocalizedText defaultLocalizedText ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode status ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, DiagnosticInfo diagnosticInfo, IList stringTable ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, Exception innerException ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, Opc.Ua.LocalizedText localizedText ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, Opc.Ua.LocalizedText localizedText, Exception innerException ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, ServiceResult innerResult ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, XmlQualifiedName symbolicId, Opc.Ua.LocalizedText localizedText ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, string symbolicId, string namespaceUri ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, string symbolicId, string namespaceUri, Exception innerException ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, string symbolicId, string namespaceUri, Opc.Ua.LocalizedText localizedText ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, string symbolicId, string namespaceUri, Opc.Ua.LocalizedText localizedText, Exception innerException ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, string symbolicId, string namespaceUri, Opc.Ua.LocalizedText localizedText, string additionalInfo ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, string symbolicId, string namespaceUri, Opc.Ua.LocalizedText localizedText, string additionalInfo, Exception innerException ) : System
ServiceResult::ServiceResult ( Opc.Ua.StatusCode code, string symbolicId, string namespaceUri, Opc.Ua.LocalizedText localizedText, string additionalInfo, ServiceResult innerResult ) : System
ServiceResult::ServiceResult ( uint code ) : System