Пример #1
0
        public override string ToString()
        {
            this.Init__jsonIgnore();
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Id") ? string.Empty : string.Format(", Id : {0}", Id == null ? "null" : Id.ToString()),
                __jsonIgnore.ContainsKey("Create_time") ? string.Empty : string.Format(", Create_time : {0}", Create_time == null ? "null" : Create_time.Value.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds.ToString()),
                __jsonIgnore.ContainsKey("Email") ? string.Empty : string.Format(", Email : {0}", Email == null ? "null" : string.Format("'{0}'", Email.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Github") ? string.Empty : string.Format(", Github : {0}", Github == null ? "null" : string.Format("'{0}'", Github.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Location") ? string.Empty : string.Format(", Location : {0}", Location == null ? "null" : string.Format("'{0}'", Location.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Password") ? string.Empty : string.Format(", Password : {0}", Password == null ? "null" : string.Format("'{0}'", Password.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Point") ? string.Empty : string.Format(", Point : {0}", Point == null ? "null" : Point.ToString()),
                __jsonIgnore.ContainsKey("Sign") ? string.Empty : string.Format(", Sign : {0}", Sign == null ? "null" : string.Format("'{0}'", Sign.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Username") ? string.Empty : string.Format(", Username : {0}", Username == null ? "null" : string.Format("'{0}'", Username.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Website") ? string.Empty : string.Format(", Website : {0}", Website == null ? "null" : string.Format("'{0}'", Website.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Weibo") ? string.Empty : string.Format(", Weibo : {0}", Weibo == null ? "null" : string.Format("'{0}'", Weibo.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), " }");

            return(string.Concat("{", json.Substring(1)));
        }