Exemplo n.º 1
0
        //<< Fields

        protected override void Serialize(IDictionary <string, object> json)
        {
            //>> Serialization

            var stroke = Stroke.ToJson();

            if (stroke.Any())
            {
                json["stroke"] = stroke;
            }

            var hover = Hover.ToJson();

            if (hover.Any())
            {
                json["hover"] = hover;
            }

            if (StartCap.HasValue())
            {
                json["startCap"] = StartCap;
            }

            if (EndCap.HasValue())
            {
                json["endCap"] = EndCap;
            }

            //<< Serialization
        }
Exemplo n.º 2
0
        protected override void Serialize(IDictionary <string, object> json)
        {
            //>> Serialization

            if (Editable.HasValue)
            {
                json["editable"] = Editable;
            }

            if (Rotatable.HasValue)
            {
                json["rotatable"] = Rotatable;
            }

            if (Resizable.HasValue)
            {
                json["resizable"] = Resizable;
            }

            if (Path.HasValue())
            {
                json["path"] = Path;
            }

            var stroke = Stroke.ToJson();

            if (stroke.Any())
            {
                json["stroke"] = stroke;
            }

            if (Type.HasValue())
            {
                json["type"] = Type;
            }

            if (X.HasValue)
            {
                json["x"] = X;
            }

            if (Y.HasValue)
            {
                json["y"] = Y;
            }

            if (MinWidth.HasValue)
            {
                json["minWidth"] = MinWidth;
            }

            if (MinHeight.HasValue)
            {
                json["minHeight"] = MinHeight;
            }

            if (Width.HasValue)
            {
                json["width"] = Width;
            }

            if (Height.HasValue)
            {
                json["height"] = Height;
            }

            if (Background.HasValue())
            {
                json["background"] = Background;
            }

            var hover = Hover.ToJson();

            if (hover.Any())
            {
                json["hover"] = hover;
            }

            var connectors = Connectors.ToJson();

            if (connectors.Any())
            {
                json["connectors"] = connectors;
            }

            var rotation = Rotation.ToJson();

            if (rotation.Any())
            {
                json["rotation"] = rotation;
            }

            if (Content.HasValue())
            {
                json["content"] = Content;
            }

            //<< Serialization

            if (Visual.HasValue())
            {
                json["visual"] = Visual;
            }
        }