Пример #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("Posts_id") ? string.Empty : string.Format(", Posts_id : {0}", Posts_id == null ? "null" : Posts_id.ToString()),
                __jsonIgnore.ContainsKey("Topics_id") ? string.Empty : string.Format(", Topics_id : {0}", Topics_id == null ? "null" : Topics_id.ToString()),
                __jsonIgnore.ContainsKey("Users_id") ? string.Empty : string.Format(", Users_id : {0}", Users_id == null ? "null" : Users_id.ToString()),
                __jsonIgnore.ContainsKey("Content") ? string.Empty : string.Format(", Content : {0}", Content == null ? "null" : string.Format("'{0}'", Content.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Count_good") ? string.Empty : string.Format(", Count_good : {0}", Count_good == null ? "null" : Count_good.ToString()),
                __jsonIgnore.ContainsKey("Count_notgood") ? string.Empty : string.Format(", Count_notgood : {0}", Count_notgood == null ? "null" : Count_notgood.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("Index") ? string.Empty : string.Format(", Index : {0}", Index == null ? "null" : Index.ToString()), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Пример #2
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("Users_id") ? string.Empty : string.Format(", Users_id : {0}", Users_id == null ? "null" : Users_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("Type") ? string.Empty : string.Format(", Type : {0}", Type == null ? "null" : string.Format("'{0}'", Type.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Value") ? string.Empty : string.Format(", Value : {0}", Value == null ? "null" : string.Format("'{0}'", Value.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Пример #3
0
        public override string ToString()
        {
            this.Init__jsonIgnore();
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Roles_id") ? string.Empty : string.Format(", Roles_id : {0}", Roles_id == null ? "null" : Roles_id.ToString()),
                __jsonIgnore.ContainsKey("Users_id") ? string.Empty : string.Format(", Users_id : {0}", Users_id == null ? "null" : Users_id.ToString()), " }");

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