ToString() public method

public ToString ( ) : string
return string
Ejemplo n.º 1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("User(");

            sb.Append("Id: ");
            sb.Append(Id);
            sb.Append(",Username: "******",Email: ");
            sb.Append(Email);
            sb.Append(",Name: ");
            sb.Append(Name);
            sb.Append(",Timezone: ");
            sb.Append(Timezone);
            sb.Append(",Privilege: ");
            sb.Append(Privilege);
            sb.Append(",Created: ");
            sb.Append(Created);
            sb.Append(",Updated: ");
            sb.Append(Updated);
            sb.Append(",Deleted: ");
            sb.Append(Deleted);
            sb.Append(",Active: ");
            sb.Append(Active);
            sb.Append(",ShardId: ");
            sb.Append(ShardId);
            sb.Append(",Attributes: ");
            sb.Append(Attributes == null ? "<null>" : Attributes.ToString());
            sb.Append(",Accounting: ");
            sb.Append(Accounting == null ? "<null>" : Accounting.ToString());
            sb.Append(",PremiumInfo: ");
            sb.Append(PremiumInfo == null ? "<null>" : PremiumInfo.ToString());
            sb.Append(",BusinessUserInfo: ");
            sb.Append(BusinessUserInfo == null ? "<null>" : BusinessUserInfo.ToString());
            sb.Append(")");
            return(sb.ToString());
        }
Ejemplo n.º 2
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("User(");
            bool          __first = true;

            if (__isset.id)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Id: ");
                __sb.Append(Id);
            }
            if (Username != null && __isset.username)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Username: "******", ");
                }
                __first = false;
                __sb.Append("Email: ");
                __sb.Append(Email);
            }
            if (Name != null && __isset.name)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Name: ");
                __sb.Append(Name);
            }
            if (Timezone != null && __isset.timezone)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Timezone: ");
                __sb.Append(Timezone);
            }
            if (__isset.privilege)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Privilege: ");
                __sb.Append(Privilege);
            }
            if (__isset.serviceLevel)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ServiceLevel: ");
                __sb.Append(ServiceLevel);
            }
            if (__isset.created)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Created: ");
                __sb.Append(Created);
            }
            if (__isset.updated)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Updated: ");
                __sb.Append(Updated);
            }
            if (__isset.deleted)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Deleted: ");
                __sb.Append(Deleted);
            }
            if (__isset.active)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Active: ");
                __sb.Append(Active);
            }
            if (ShardId != null && __isset.shardId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ShardId: ");
                __sb.Append(ShardId);
            }
            if (Attributes != null && __isset.attributes)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Attributes: ");
                __sb.Append(Attributes == null ? "<null>" : Attributes.ToString());
            }
            if (Accounting != null && __isset.accounting)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Accounting: ");
                __sb.Append(Accounting == null ? "<null>" : Accounting.ToString());
            }
            if (BusinessUserInfo != null && __isset.businessUserInfo)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("BusinessUserInfo: ");
                __sb.Append(BusinessUserInfo == null ? "<null>" : BusinessUserInfo.ToString());
            }
            if (PhotoUrl != null && __isset.photoUrl)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("PhotoUrl: ");
                __sb.Append(PhotoUrl);
            }
            if (__isset.photoLastUpdated)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("PhotoLastUpdated: ");
                __sb.Append(PhotoLastUpdated);
            }
            if (AccountLimits != null && __isset.accountLimits)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("AccountLimits: ");
                __sb.Append(AccountLimits == null ? "<null>" : AccountLimits.ToString());
            }
            __sb.Append(")");
            return(__sb.ToString());
        }