Ejemplo n.º 1
0
 /// <summary>
 /// 使用指定错误消息和对作为此异常原因的内部异常的引用来初始化 MaslException 类的新实例。
 /// </summary>
 /// <param name="majorReason">主要原因。</param>
 /// <param name="minorReason">次要原因。</param>
 /// <param name="message">解释异常原因的错误消息。</param>
 /// <param name="innerException">导致当前异常的异常;如果未指定内部异常,则是一个 null 引用(在 Visual Basic 中为 Nothing)。</param>
 public MaslException(MaslErrorCode majorReason, byte minorReason, string message, Exception innerException)
     : base(message, innerException)
 {
     this.MajorReason = majorReason;
     this.MinorReason = minorReason;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 初始化 MaslException 类的新实例。
 /// </summary>
 public MaslException(MaslErrorCode majorReason, byte minorReason = UndefineMinorReason)
 {
     this.MajorReason = majorReason;
     this.MinorReason = minorReason;
 }
Ejemplo n.º 3
0
        public virtual void Disconnect(MaslErrorCode majorReason, byte minorReason)
        {
            var bytes = this.Context.AuMessageBuilder.BuildDiPacket((byte)majorReason, minorReason);

            this.Context.AleConnection.Disconnect(bytes);
        }
Ejemplo n.º 4
0
        public void Disconnect(MaslErrorCode majorReason, byte minorReason)
        {
            _currentState.Disconnect(majorReason, minorReason);

            _currentState = this.GetInitialState();
        }
Ejemplo n.º 5
0
        public void Disconnect(MaslErrorCode majorReason, byte minorReason)
        {
            _maslConnection.Disconnect(majorReason, minorReason);

            this.Initialize();
        }