public void Assign(object right) { tGETNEXTPATHINFO val = right as tGETNEXTPATHINFO; if (val == null) { throw new Exception("object is not tGETNEXTPATHINFO type!"); } else { mac.Assign(val.mac); filter = val.filter; pathId = val.pathId; } }
public new void Unserialize(byte[] stream, int offset = 0) { try { if (stream == null || stream.Length <= 0) { throw new Exception("EventPathDelete.Unserialize take invalid parameter"); } if (stream.Length < (offset + Len)) { throw new Exception("EventPathDelete.Unserialize take invalid Index"); } base.Unserialize(stream, offset); Array.Copy(stream, offset + SRC_MAC_OFFSET, Source.u8aData, 0, tMAC.LEN); Array.Copy(stream, offset + DST_MAC_OFFSET, Dest.u8aData, 0, tMAC.LEN); Direction = (enPathDirection)stream[offset + PATH_DIR_OFFSET]; } catch (Exception ex) { CommStackLog.RecordErr(enLogLayer.eAdapter, ex.Message); } }