public static async ValueTask <IShape> AddRangeAsync(this IShape shape, IEnumerable <object> items, string position = null) { foreach (var item in items) { await shape.AddAsync(item, position); } return(shape); }
public override async ValueTask <IShape> AddAsync(object item, string position) { if (item == null) { if (_zone != null) { return(_zone); } return(this); } if (_zone == null) { _zone = await _zoneFactory(); _zone.Properties["Parent"] = _parent; _zone.Properties["ZoneName"] = _potentialZoneName; _parent.Properties[_potentialZoneName] = _zone; } return(_zone = await _zone.AddAsync(item, position)); }
public static ValueTask <IShape> AddAsync(this IShape shape, object item) { return(shape.AddAsync(item, "")); }