/// ----------------------------------------------------------------------------- /// <summary> /// This method will check if the context contains a specific error message.This method /// can be used for checking if the context is empty. /// </summary> /// <param name="error">Error Object</param> /// <returns> /// boolean value 'true' - If specific Error is present /// false in case of no errors. /// </returns> /// <remarks> /// </remarks> /// ----------------------------------------------------------------------------- internal bool IsCommunicationErrorContained(ErrorObject error) { if (IsErrorContained()) { foreach (ErrorObject err in _mErrorObjects) if (err != null && err.MessageCode.Equals(error.MessageCode)) if (err.MessageParams != null && error.MessageParams != null) if (err.MessageParams[0].Equals(error.MessageParams[0])) return true; return false; } return false; }
/// ----------------------------------------------------------------------------- /// <summary> /// This method adds the passed error object in the array list contained by /// the context object /// </summary> /// <param name="errObject">ErrorObject</param> /// <returns>Nothing</returns> /// <remarks> /// </remarks> /// ----------------------------------------------------------------------------- internal void AddError(ErrorObject errObject) { if (_mErrorObjects == null) _mErrorObjects = new ArrayList(); _mErrorObjects.Insert(0, errObject); }