public virtual PathInfo[] GetNextPathsThrough(int nSourceFrom) { PathInfo info; info = new PathInfo { FromElement = this, FromSource = nSourceFrom, ToElement = this.GetNextPathThrough(false, ref info.FromSource, out info.ToSource) }; return ((info.ToElement == null) ? null : new PathInfo[1]); }
public override PathInfo[] GetNextPathsThrough(int nSourceFrom) { PathInfo info; switch (((PointSwitchBase.ConnectionSource) nSourceFrom)) { case PointSwitchBase.ConnectionSource.Plus: case PointSwitchBase.ConnectionSource.Minus: return base.GetNextPathsThrough(nSourceFrom); } info = new PathInfo { FromElement = this, FromSource = nSourceFrom, ToElement = this.GetNextPathThrough(false, ref info.FromSource, out info.ToSource) }; PathInfo info2 = new PathInfo { FromElement = this, FromSource = nSourceFrom }; if (info.ToElement != null) { info2.ToElement = base.GetConnectedPath((info.FromSource == 2) ? 3 : 2, out info2.ToSource); } else if (this.IsPathSelected(this.Plus)) { info.ToElement = base.GetConnectedPath(2, out info.ToSource); info2.ToElement = base.GetConnectedPath(3, out info2.ToSource); } else { info2.ToElement = base.GetConnectedPath(3, out info2.ToSource); info.ToElement = base.GetConnectedPath(2, out info.ToSource); } return new PathInfo[] { info, info2 }; }