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);
        }
Пример #2
0
 protected LayerShape(Layer layer, ShapeEntity shapeEntity)
 {
     Layer           = layer;
     ScaledRectangle = SKRect.Create(shapeEntity.X, shapeEntity.Y, shapeEntity.Width, shapeEntity.Height);
 }
Пример #3
0
 internal Rectangle(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity)
 {
 }
Пример #4
0
 internal Polygon(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity)
 {
 }
Пример #5
0
 internal Ellipse(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity)
 {
 }
Пример #6
0
 internal Fill(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity)
 {
 }