⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 impserroreventargs.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Core
{
    using System;
    using System.Text;

    public class ImpsErrorEventArgs : EventArgs
    {
        private int _bizCode;
        private object _context;
        private string _desc;
        private int _errorCode;
        private Exception _ex;
        private bool _handled;
        private string _summary;
        private int _type;

        public ImpsErrorEventArgs(string summary) : this(summary, string.Empty, null, 10)
        {
        }

        public ImpsErrorEventArgs(string summary, int type) : this(summary, string.Empty, null, type)
        {
        }

        public ImpsErrorEventArgs(string summary, string desc) : this(summary, desc, null, 10)
        {
        }

        public ImpsErrorEventArgs(string summary, string desc, Exception ex) : this(summary, desc, ex, -1)
        {
        }

        public ImpsErrorEventArgs(string summary, string desc, int type) : this(summary, desc, null, type)
        {
        }

        private ImpsErrorEventArgs(string summary, string desc, Exception ex, int type)
        {
            this._summary = summary;
            this._desc = desc;
            this._ex = ex;
            this._type = type;
            this._handled = false;
        }

        public ImpsErrorEventArgs(string summary, string desc, Exception ex, int type, object context) : this(summary, desc, ex, type)
        {
            this._context = context;
        }

        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();
            LogHelper.BuildLogTextForImpsError(builder, this);
            return builder.ToString();
        }

        public int BizCode
        {
            get
            {
                return this._bizCode;
            }
            set
            {
                this._bizCode = value;
            }
        }

        public object Context
        {
            get
            {
                return this._context;
            }
        }

        public string Description
        {
            get
            {
                return this._desc;
            }
        }

        public int ErrorCode
        {
            get
            {
                return this._errorCode;
            }
            set
            {
                this._errorCode = value;
            }
        }

        public Exception ErrorException
        {
            get
            {
                return this._ex;
            }
        }

        public int ErrorType
        {
            get
            {
                if ((this.BizCode > 0) && (this.ErrorCode > 0))
                {
                    int num = 0;
                    int.TryParse(string.Format("{0}{1}", this.BizCode, this.ErrorCode), ref num);
                    return num;
                }
                return this._type;
            }
        }

        public bool Handled
        {
            get
            {
                return this._handled;
            }
            set
            {
                this._handled = value;
            }
        }

        public bool IsException
        {
            get
            {
                return (null != this._ex);
            }
        }

        public string Summary
        {
            get
            {
                return this._summary;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -