Пример #1
0
        public override bool Equals(object obj)
        {
            IcmpDestinationUnreachable that = obj as IcmpDestinationUnreachable;

            return(((that != null) &&
                    object.Equals(this.Packet, that.Packet)) &&
                   object.Equals(this.Code, that.Code));
        }
Пример #2
0
        public override void Define()
        {
            IcmpDestinationUnreachable unreachable = null;

            When()
            .Match(() => unreachable, x => x.Code == 3);
            Then()
            .Do(ctx => ctx.Error($"Port unreachable while connecting to ?. Message was sent from {unreachable.Packet.IpSrc}."));
        }