Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 public static ValueTask <IShape> AddAsync(this IShape shape, object item)
 {
     return(shape.AddAsync(item, ""));
 }