public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.trace_id)
                {
                    hashcode = (hashcode * 397) + Trace_id.GetHashCode();
                }
                if (__isset.name)
                {
                    hashcode = (hashcode * 397) + Name.GetHashCode();
                }
                if (__isset.id)
                {
                    hashcode = (hashcode * 397) + Id.GetHashCode();
                }
                if (__isset.parent_id)
                {
                    hashcode = (hashcode * 397) + Parent_id.GetHashCode();
                }
                if (__isset.annotations)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Annotations);
                }
                if (__isset.binary_annotations)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Binary_annotations);
                }
                if (__isset.debug)
                {
                    hashcode = (hashcode * 397) + Debug.GetHashCode();
                }
                if (__isset.timestamp)
                {
                    hashcode = (hashcode * 397) + Timestamp.GetHashCode();
                }
                if (__isset.duration)
                {
                    hashcode = (hashcode * 397) + Duration.GetHashCode();
                }
                if (__isset.trace_id_high)
                {
                    hashcode = (hashcode * 397) + Trace_id_high.GetHashCode();
                }
            }
            return(hashcode);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hashcode = 0;

            unchecked {
                hashcode = (hashcode * 397) ^ (Trace_id == null ? 0 : (Trace_id.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Name == null ? 0 : (Name.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Id == null ? 0 : (Id.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Parent_id == null ? 0 : (Parent_id.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Annotations == null ? 0 : (TCollections.GetHashCode(Annotations)));
                hashcode = (hashcode * 397) ^ (Binary_annotations == null ? 0 : (TCollections.GetHashCode(Binary_annotations)));
                hashcode = (hashcode * 397) ^ (Debug == null ? 0 : (Debug.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Timestamp == null ? 0 : (Timestamp.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Duration == null ? 0 : (Duration.GetHashCode()));
            }
            return(hashcode);
        }
Exemple #3
0
        public override string ToString()
        {
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Id") ? string.Empty : string.Format(", Id : {0}", Id == null ? "null" : Id.ToString()),
                __jsonIgnore.ContainsKey("Member_id") ? string.Empty : string.Format(", Member_id : {0}", Member_id == null ? "null" : Member_id.ToString()),
                __jsonIgnore.ContainsKey("Parent_id") ? string.Empty : string.Format(", Parent_id : {0}", Parent_id == null ? "null" : Parent_id.ToString()),
                __jsonIgnore.ContainsKey("Product_id") ? string.Empty : string.Format(", Product_id : {0}", Product_id == null ? "null" : Product_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("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("Name") ? string.Empty : string.Format(", Name : {0}", Name == null ? "null" : string.Format("'{0}'", Name.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("State") ? string.Empty : string.Format(", State : {0}", State == null ? "null" : string.Format("'{0}'", State.ToDescriptionOrString().Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Exemple #4
0
        public override string ToString()
        {
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Id") ? string.Empty : string.Format(", Id : {0}", Id == null ? "null" : Id.ToString()),
                __jsonIgnore.ContainsKey("Parent_id") ? string.Empty : string.Format(", Parent_id : {0}", Parent_id == null ? "null" : Parent_id.ToString()),
                __jsonIgnore.ContainsKey("Create_time") ? string.Empty : string.Format(", Create_time : {0}", Create_time == null ? "null" : string.Concat("", Create_time.Value.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds, "")),
                __jsonIgnore.ContainsKey("Name") ? string.Empty : string.Format(", Name : {0}", Name == null ? "null" : string.Format("'{0}'", Name.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Exemple #5
0
        public override string ToString()
        {
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Id") ? string.Empty : string.Format(", Id : {0}", Id == null ? "null" : Id.ToString()),
                __jsonIgnore.ContainsKey("Market_id") ? string.Empty : string.Format(", Market_id : {0}", Market_id == null ? "null" : Market_id.ToString()),
                __jsonIgnore.ContainsKey("Parent_id") ? string.Empty : string.Format(", Parent_id : {0}", Parent_id == null ? "null" : Parent_id.ToString()),
                __jsonIgnore.ContainsKey("Sort") ? string.Empty : string.Format(", Sort : {0}", Sort == null ? "null" : Sort.ToString()),
                __jsonIgnore.ContainsKey("Title") ? string.Empty : string.Format(", Title : {0}", Title == null ? "null" : string.Format("'{0}'", Title.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Exemple #6
0
        public override string ToString()
        {
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Id") ? string.Empty : string.Format(", Id : {0}", Id == null ? "null" : Id.ToString()),
                __jsonIgnore.ContainsKey("Category_id") ? string.Empty : string.Format(", Category_id : {0}", Category_id == null ? "null" : Category_id.ToString()),
                __jsonIgnore.ContainsKey("Parent_id") ? string.Empty : string.Format(", Parent_id : {0}", Parent_id == null ? "null" : Parent_id.ToString()),
                __jsonIgnore.ContainsKey("Is_filter") ? string.Empty : string.Format(", Is_filter : {0}", Is_filter == null ? "null" : (Is_filter == true ? "true" : "false")),
                __jsonIgnore.ContainsKey("Name") ? string.Empty : string.Format(", Name : {0}", Name == null ? "null" : string.Format("'{0}'", Name.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Exemple #7
0
        public override string ToString()
        {
            var sb    = new StringBuilder("Span(");
            int tmp15 = 0;

            if (__isset.trace_id)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Trace_id: ");
                Trace_id.ToString(sb);
            }
            if ((Name != null) && __isset.name)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Name: ");
                Name.ToString(sb);
            }
            if (__isset.id)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Id: ");
                Id.ToString(sb);
            }
            if (__isset.parent_id)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Parent_id: ");
                Parent_id.ToString(sb);
            }
            if ((Annotations != null) && __isset.annotations)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Annotations: ");
                Annotations.ToString(sb);
            }
            if ((Binary_annotations != null) && __isset.binary_annotations)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Binary_annotations: ");
                Binary_annotations.ToString(sb);
            }
            if (__isset.debug)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Debug: ");
                Debug.ToString(sb);
            }
            if (__isset.timestamp)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Timestamp: ");
                Timestamp.ToString(sb);
            }
            if (__isset.duration)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Duration: ");
                Duration.ToString(sb);
            }
            if (__isset.trace_id_high)
            {
                if (0 < tmp15++)
                {
                    sb.Append(", ");
                }
                sb.Append("Trace_id_high: ");
                Trace_id_high.ToString(sb);
            }
            sb.Append(')');
            return(sb.ToString());
        }