Exemplo n.º 1
0
        public override string ToString()
        {
            string format = "{{" +
                            "\"_id\": {0}, " +
                            "\"username\": {1}," +
                            "\"displayname\": {2}," +
                            "\"avatar\": {3}," +
                            "\"color\": {4}," +
                            "\"roles\": {5}," +
                            "\"badges\": {6}" +
                            "}}";

            try {
                return(string.Format(
                           format,
                           JsonConvert.ToString(UserID),
                           JsonConvert.ToString(Username),
                           JsonConvert.ToString(DisplayName),
                           JsonConvert.ToString(Avatar),
                           JsonConvert.ToString(Color),
                           JSONUtil.ToString(Roles.ToArray()),
                           JSONUtil.ToString(Badges.ToArray())
                           ));
            } catch (Exception e) {
                Console.WriteLine(e);
                return("");
            }
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return(string.Format(FORMAT,
                          JsonConvert.ToString(ID),
                          JsonConvert.ToString(ChannelName),
                          Category,
                          JsonConvert.ToString(Title),
                          JsonConvert.ToString(IsLive),
                          JsonConvert.ToString(FollowerCount),
                          JsonConvert.ToString(SubscriberCount),
                          JsonConvert.ToString(Description),
                          JSONUtil.ToString(Owners)));
 }