Exemplo n.º 1
0
        public sealed override string ToString()
        {
            StringBuilder str = new StringBuilder(128);

            str.Append("(object)");
            str.Append('(');
            if (mObject != null)
            {
                str.Append('[');
                if (mObject is NativeClass)
                {
                    str.Append(((NativeClass)mObject).GetClassName());
                }
                else
                {
                    if (mObject is InterCodeObject)
                    {
                        str.Append(((InterCodeObject)mObject).GetName());
                    }
                    else
                    {
                        if (mObject is CustomObject)
                        {
                            string name = ((CustomObject)mObject).GetClassNames();
                            if (name != null)
                            {
                                str.Append(name);
                            }
                            else
                            {
                                str.Append(mObject.GetType().FullName);
                            }
                        }
                        else
                        {
                            str.Append(mObject.GetType().FullName);
                        }
                    }
                }
                str.Append(']');
            }
            else
            {
                str.Append("0x00000000");
            }
            if (mObjThis != null)
            {
                str.Append('[');
                if (mObjThis is NativeClass)
                {
                    str.Append(((NativeClass)mObjThis).GetClassName());
                }
                else
                {
                    if (mObjThis is InterCodeObject)
                    {
                        str.Append(((InterCodeObject)mObjThis).GetName());
                    }
                    else
                    {
                        if (mObjThis is CustomObject)
                        {
                            string name = ((CustomObject)mObjThis).GetClassNames();
                            if (name != null)
                            {
                                str.Append(name);
                            }
                            else
                            {
                                str.Append(mObjThis.GetType().FullName);
                            }
                        }
                        else
                        {
                            str.Append(mObjThis.GetType().FullName);
                        }
                    }
                }
                str.Append(']');
            }
            else
            {
                str.Append(":0x00000000");
            }
            str.Append(')');
            return(str.ToString());
        }