public bool TryGetPoint(byte pointNum, MarkupPoint.PointType type, out MarkupPoint point) { switch (type) { case MarkupPoint.PointType.Enter: if (EnterPointsDic.TryGetValue(pointNum, out MarkupEnterPoint enterPoint)) { point = enterPoint; return(true); } break; case MarkupPoint.PointType.Crosswalk: if (CrosswalkPointsDic.TryGetValue(pointNum, out MarkupCrosswalkPoint crosswalkPoint)) { point = crosswalkPoint; return(true); } break; case MarkupPoint.PointType.Normal: if (NormalPointsDic.TryGetValue(pointNum, out MarkupNormalPoint normalPoint)) { point = normalPoint; return(true); } break; } point = null; return(false); }
public virtual bool TryGetPoint(byte pointNum, MarkupPoint.PointType type, out MarkupPoint point) { if (type == MarkupPoint.PointType.Enter && EnterPointsDic.TryGetValue(pointNum, out MarkupEnterPoint enterPoint)) { point = enterPoint; return(true); } else { point = null; return(false); } }