示例#1
0
        public InspectionResult(InspectionDecision decision, IPEndPoint tcpEndPoint = null, IPEndPoint secureTcpEndPoint = null)
        {
            if (decision == InspectionDecision.Reconnect)
                Ensure.NotNull(tcpEndPoint, "tcpEndPoint");
            else
            {
                if (tcpEndPoint != null)
                    throw new ArgumentException(string.Format("tcpEndPoint is not null for decision {0}.", decision));
            }

            Decision = decision;
            TcpEndPoint = tcpEndPoint;
            SecureTcpEndPoint = secureTcpEndPoint;
        }
示例#2
0
        public InspectionResult(InspectionDecision decision, IPEndPoint tcpEndPoint = null, IPEndPoint secureTcpEndPoint = null)
        {
            if (decision == InspectionDecision.Reconnect)
            {
                Ensure.NotNull(tcpEndPoint, "tcpEndPoint");
            }
            else
            {
                if (tcpEndPoint != null)
                {
                    throw new ArgumentException(string.Format("tcpEndPoint is not null for decision {0}.", decision));
                }
            }

            Decision          = decision;
            TcpEndPoint       = tcpEndPoint;
            SecureTcpEndPoint = secureTcpEndPoint;
        }
示例#3
0
        public InspectionResult(InspectionDecision decision, string description, EndPoint tcpEndPoint = null,
                                EndPoint secureTcpEndPoint = null)
        {
            if (decision == InspectionDecision.Reconnect)
            {
                if (tcpEndPoint == null && secureTcpEndPoint == null)
                {
                    throw new ArgumentNullException("Both TCP endpoints are null");
                }
            }
            else
            {
                if (tcpEndPoint != null || secureTcpEndPoint != null)
                {
                    throw new ArgumentException(string.Format("tcpEndPoint or secureTcpEndPoint is not null for decision {0}.", decision));
                }
            }

            Decision          = decision;
            Description       = description;
            TcpEndPoint       = tcpEndPoint;
            SecureTcpEndPoint = secureTcpEndPoint;
        }
示例#4
0
 public InspectionResult(InspectionDecision decision, Exception error = null)
 {
     Decision = decision;
     Error = error;
 }
示例#5
0
 public InspectionResult(InspectionDecision decision, string description)
 {
     Decision    = decision;
     Description = description;
 }
示例#6
0
 public InspectionResult(InspectionDecision decision, Exception error = null, object data = null)
 {
     Decision = decision;
     Error    = error;
     Data     = data;
 }
示例#7
0
 public InspectionResult(InspectionDecision decision, Exception error = null, object data = null)
 {
     Decision = decision;
     Error = error;
     Data = data;
 }
示例#8
0
 public InspectionResult(InspectionDecision decision, Exception error = null)
 {
     Decision = decision;
     Error    = error;
 }