private static int CountValues(RelativePosition[] values) { int num = 0; foreach (RelativePosition relativePosition in values) { if (relativePosition._values.Length > 0) { num += RelativePosition.CountValues(relativePosition._values); } else { ++num; } } return(num); }
public RelativePosition(string name, params RelativePosition[] values) { if (values == null) { throw new ArgumentNullException("values"); } if (values.Length > 0) { this._values = new RelativePosition[RelativePosition.CountValues(values)]; RelativePosition.FillValues(this._values, values, 0); } else { this._values = values; } if (name == null || name.Length == 0) { name = this._values.Length <= 0 ? string.Empty : string.Concat((object[])this._values); } this._name = name; }