Esempio n. 1
0
 public virtual string GetErrorText(string locale, ResultID resultID)
 {
     if (this.m_server == null)
     {
         throw new NotConnectedException();
     }
     return(this.m_server.GetErrorText((locale == null) ? this.m_locale : locale, resultID));
 }
Esempio n. 2
0
 public ResultID(ResultID resultID, long code)
 {
     this.m_name = resultID.Name;
     if (code > 0x7fffffffL)
     {
         code = -(0x100000000L - code);
     }
     this.m_code = (int)code;
 }
Esempio n. 3
0
 static ResultID()
 {
     S_OK            = new ResultID("S_OK", "http://opcfoundation.org/DataAccess/");
     S_FALSE         = new ResultID("S_FALSE", "http://opcfoundation.org/DataAccess/");
     E_FAIL          = new ResultID("E_FAIL", "http://opcfoundation.org/DataAccess/");
     E_INVALIDARG    = new ResultID("E_INVALIDARG", "http://opcfoundation.org/DataAccess/");
     E_TIMEDOUT      = new ResultID("E_TIMEDOUT", "http://opcfoundation.org/DataAccess/");
     E_OUTOFMEMORY   = new ResultID("E_OUTOFMEMORY", "http://opcfoundation.org/DataAccess/");
     E_NETWORK_ERROR = new ResultID("E_NETWORK_ERROR", "http://opcfoundation.org/DataAccess/");
     E_ACCESS_DENIED = new ResultID("E_ACCESS_DENIED", "http://opcfoundation.org/DataAccess/");
     E_NOTSUPPORTED  = new ResultID("E_NOTSUPPORTED", "http://opcfoundation.org/DataAccess/");
 }
Esempio n. 4
0
 public override bool Equals(object target)
 {
     if ((target != null) && (target.GetType() == typeof(ResultID)))
     {
         ResultID tid = (ResultID)target;
         if ((tid.Code != -1) && (this.Code != -1))
         {
             return((tid.Code == this.Code) && (tid.Name == this.Name));
         }
         if ((tid.Name != null) && (this.Name != null))
         {
             return(tid.Name == this.Name);
         }
     }
     return(false);
 }
Esempio n. 5
0
 public ResultIDException(ResultID result, string message, Exception e) : base(result.ToString() + "\r\n" + message, e)
 {
     this.m_result = ResultID.E_FAIL;
     this.m_result = result;
 }
Esempio n. 6
0
 protected ResultIDException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this.m_result = ResultID.E_FAIL;
 }
Esempio n. 7
0
 public ResultIDException(ResultID result) : base(result.ToString())
 {
     this.m_result = ResultID.E_FAIL;
     this.m_result = result;
 }