public override bool Equals(Object obj) { if (this == obj) { return(true); } if (obj is ChannelId) { ChannelId id = (ChannelId)obj; if (id.depth() == depth()) { for (int i = id.depth(); i-- > 0;) { if (!id.getSegment(i).Equals(getSegment(i))) { return(false); } } return(true); } } return(false); }
/* ------------------------------------------------------------ */ public bool isParentOf(ChannelId id) { if (Wild || depth() != id.depth() - 1) { return(false); } for (int i = _segments.Length; i-- > 0;) { if (!_segments[i].Equals(id._segments[i])) { return(false); } } return(true); }
/* ------------------------------------------------------------ */ public bool isParentOf(ChannelId id) { if (Wild || depth() != id.depth() - 1) return false; for (int i = _segments.Length; i-- > 0; ) { if (!_segments[i].Equals(id._segments[i])) return false; } return true; }