Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a result code with a general result code and a specific result code.
        /// </summary>
        public ResultID(ResultID resultID, long code)
        {
            m_name = resultID.Name;

            if (code > Int32.MaxValue)
            {
                code = -(((long)UInt32.MaxValue) + 1 - code);
            }

            m_code = (int)code;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if the target object is equal to the object.
        /// </summary>
        public override bool Equals(object target)
        {
            if (target != null && target.GetType() == typeof(ResultID))
            {
                ResultID resultID = (ResultID)target;

                // compare by integer if both specify valid integers.
                if (resultID.Code != -1 && Code != -1)
                {
                    return((resultID.Code == Code) && (resultID.Name == Name));
                }

                // compare by name if both specify valid names.
                if (resultID.Name != null && Name != null)
                {
                    return(resultID.Name == Name);
                }
            }

            return(false);
        }
Ejemplo n.º 3
0
 /// <remarks/>
 public ResultIDException(ResultID result, string message, Exception e) : base(result.ToString() + "\r\n" + message, e)
 {
     m_result = result;
 }
Ejemplo n.º 4
0
 /// <remarks/>
 public ResultIDException(ResultID result) : base(result.ToString())
 {
     m_result = result;
 }