Bool() public static method

Gets the bool value from node
public static Bool ( string nodeName ) : bool
nodeName string node
return bool
Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 public static CommentsInfo GetCommentsInfo(XmlNode node)
 {
     if (node != null)
     {
         XmlUtils.UseNode(node);
         CommentsInfo c = new CommentsInfo();
         c.Count      = XmlUtils.Int("count");
         c.CanComment = XmlUtils.Bool("can_post");
         return(c);
     }
     return(null);
 }
Ejemplo n.º 2
0
 public static LikesInfo GetLikesInfo(XmlNode node)
 {
     if (node != null)
     {
         XmlUtils.UseNode(node);
         LikesInfo l = new LikesInfo();
         l.CanLike    = XmlUtils.Bool("can_like");
         l.CanPublish = XmlUtils.Bool("can_publish");
         l.Count      = XmlUtils.Int("count");
         l.UserLikes  = XmlUtils.Int("user_likes");
         return(l);
     }
     return(null);
 }