protected static void MapBasePropertiesToDomainModel(OverlayEntry domain, BaseOverlayEntryJsModel zoneOverlayEntryJsModel)
 {
     if (zoneOverlayEntryJsModel.Id != null)
     {
         domain.Id = zoneOverlayEntryJsModel.Id;
     }
     domain.Name  = zoneOverlayEntryJsModel.Name;
     domain.Color = zoneOverlayEntryJsModel.Color;
 }
        public CameraOverlayEntry ToDomainModel()
        {
            var domain = new CameraOverlayEntry();

            BaseOverlayEntryJsModel.MapBasePropertiesToDomainModel(domain, this);

            domain.Points          = this.Points;
            domain.TransformMatrix = this.TransformMatrix;

            return(domain);
        }
        public CircleOverlayEntry ToDomainModel()
        {
            var domain = new CircleOverlayEntry();

            BaseOverlayEntryJsModel.MapBasePropertiesToDomainModel(domain, this);

            domain.Center = this.Center;
            domain.Size   = this.Size;

            return(domain);
        }
        public static CameraOverlayEntryJsModel CreateFromDomainModel(CameraOverlayEntry cameraDomain)
        {
            var model = new CameraOverlayEntryJsModel
            {
                Points          = cameraDomain.Points,
                TransformMatrix = cameraDomain.TransformMatrix
            };

            BaseOverlayEntryJsModel.MapBasePropertiesFromDomainModel(cameraDomain, model);

            return(model);
        }
        internal static CircleOverlayEntryJsModel CreateFromDomainModel(CircleOverlayEntry circleDomain)
        {
            var model = new CircleOverlayEntryJsModel
            {
                Center = circleDomain.Center,
                Size   = circleDomain.Size
            };

            BaseOverlayEntryJsModel.MapBasePropertiesFromDomainModel(circleDomain, model);

            return(model);
        }
Exemplo n.º 6
0
        public ZoneOverlayEntry ToDomainModel()
        {
            var domain = new ZoneOverlayEntry();

            BaseOverlayEntryJsModel.MapBasePropertiesToDomainModel(domain, this);

            domain.Points        = this.Points;
            domain.Alias         = this.Alias;
            domain.MetadataSetId = this.MetadataSetId != null?HyperDocumentId.Create <HyperMetadataSet>(this.MetadataSetId) : (HyperDocumentId?)null;

            domain.FixedCameraEnhancementId = this.FixedCameraEnhancementId != null?HyperDocumentId.Create <FixedCameraEnhancedData>(this.FixedCameraEnhancementId) : (HyperDocumentId?)null;

            domain.View = this.View;
            return(domain);
        }
Exemplo n.º 7
0
        public static ZoneOverlayEntryJsModel CreateFromDomainModel(ZoneOverlayEntry zoneDomain)
        {
            var model = new ZoneOverlayEntryJsModel
            {
                Alias = zoneDomain.Alias,
                FixedCameraEnhancementId = zoneDomain.FixedCameraEnhancementId.HasValue ? zoneDomain.FixedCameraEnhancementId.Value.Id : null,
                Points        = zoneDomain.Points,
                MetadataSetId = zoneDomain.MetadataSetId.HasValue ? zoneDomain.MetadataSetId.Value.Id : null,
                View          = zoneDomain.View
            };

            BaseOverlayEntryJsModel.MapBasePropertiesFromDomainModel(zoneDomain, model);

            return(model);
        }
 protected static void MapBasePropertiesFromDomainModel(OverlayEntry domain, BaseOverlayEntryJsModel model)
 {
     model.Color = domain.Color;
     model.Id    = domain.Id;
     model.Name  = domain.Name;
 }