private ShapeEntity FetchDataForEntity(T entity, IEnumerable <PropertyInfo> requiredProperties) { var shapedObject = new ShapeEntity(); foreach (var property in requiredProperties) { var objectPropertyValue = property.GetValue(entity); shapedObject.Entity.TryAdd(property.Name, objectPropertyValue); } var objectProperty = entity.GetType().GetProperty("Id"); shapedObject.Id = (Guid)objectProperty.GetValue(entity); return(shapedObject); }
protected LayerShape(Layer layer, ShapeEntity shapeEntity) { Layer = layer; ScaledRectangle = SKRect.Create(shapeEntity.X, shapeEntity.Y, shapeEntity.Width, shapeEntity.Height); }
internal Rectangle(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity) { }
internal Polygon(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity) { }
internal Ellipse(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity) { }
internal Fill(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity) { }