예제 #1
0
 partial void Merge(Location entity, LocationDTO dto, object state)
 {
     var center = dto.Center;
     if (center != null && center.Length == 3)
     {
         entity.Center = this.vector3DConverter.Convert(center, dto);
     }
 }
        partial void Merge(PolygonLocation entity, LocationDTO dto, object state)
        {
            var zrange = dto.ZRange;
            if (zrange != null && zrange.Length == 2)
            {
                entity.ZRange = this.vector2DConverter.Convert(zrange, dto);
            }

            var points = dto.Points;
            if (points != null)
            {
                entity.Points = new List<Vector2D>(points.Length);
                foreach (var point in points)
                {
                    if (point == null || point.Length != 2)
                    {
                        continue;
                    }

                    entity.Points.Add(this.vector2DConverter.Convert(point, dto));
                }
            }
        }
 partial void Merge(CylinderLocation entity, LocationDTO dto, object state)
 {
     entity.Height = dto.Height;
     entity.Radius = dto.Radius;
     entity.Rotation = dto.Rotation;
 }
예제 #4
0
 partial void Merge(SphereLocation entity, LocationDTO dto, object state)
 {
     entity.Radius = dto.Radius;
     entity.Rotation = dto.Rotation;
 }