AjaxControlToolkit.Animation.Deserialize C# (CSharp) Method

Deserialize() public static method

public static Deserialize ( XmlNode node ) : Animation
node System.Xml.XmlNode
return Animation
        public static Animation Deserialize(XmlNode node)
        {
            if(node == null)
                throw new ArgumentNullException("node");

            var animation = new Animation() {
                Name = node.Name
            };

            // Set the properties of the animation
            foreach(XmlAttribute attribute in node.Attributes)
                animation.Properties.Add(attribute.Name, attribute.Value);

            // Add any children (recursively)
            if(node.HasChildNodes)
                foreach(XmlNode child in node.ChildNodes)
                    animation.Children.Add(Animation.Deserialize(child));

            return animation;
        }

Same methods

Animation::Deserialize ( string json ) : Animation

Usage Example

コード例 #1
0
ファイル: Animation.cs プロジェクト: zzz1985xxxwl/bjl_hrmis
        public static Animation Deserialize(XmlNode node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            // Create the new animation
            Animation animation = new Animation();

            animation.Name = node.Name;

            // Set the properties of the animation
            foreach (XmlAttribute attribute in node.Attributes)
            {
                animation.Properties.Add(attribute.Name, attribute.Value);
            }

            // Add any children (recursively)
            if (node.HasChildNodes)
            {
                foreach (XmlNode child in node.ChildNodes)
                {
                    animation.Children.Add(Animation.Deserialize(child));
                }
            }

            return(animation);
        }
All Usage Examples Of AjaxControlToolkit.Animation::Deserialize