Пример #1
0
        public void DebuggerDisplay()
        {
            string str;
            var    a = new ComplexProxy();

            str = CSharpObjectFormatter.Instance.FormatObject(a, s_memberList);

            AssertMembers(str, @"[AStr]",
                          @"_02_public_property_dd: *1",
                          @"_03_private_property_dd: *2",
                          @"_04_protected_property_dd: *3",
                          @"_05_internal_property_dd: *4",
                          @"_07_private_field_dd: +2",
                          @"_08_protected_field_dd: +3",
                          @"_09_internal_field_dd: +4",
                          @"_10_private_collapsed: 0",
                          @"_12_public: 0",
                          @"_13_private: 0",
                          @"_14_protected: 0",
                          @"_15_internal: 0",
                          "_16_eolns: ==\r\n=\r\n=",
                          @"_17_braces_0: =={==",
                          @"_17_braces_1: =={{==",
                          @"_17_braces_2: ==!<Member ''{'' not found>==",
                          @"_17_braces_3: ==!<Member ''\{'' not found>==",
                          @"_17_braces_4: ==!<Member '1/*{*/' not found>==",
                          @"_17_braces_5: ==!<Member ''{'/*\' not found>*/}==",
                          @"_17_braces_6: ==!<Member ''{'/*' not found>*/}==",
                          @"_19_escapes: ==\{\x\t==",
                          @"_21: !<Member '1+1' not found>",
                          @"_22: !<Member '""xxx""' not found>",
                          @"_23: !<Member '""xxx""' not found>",
                          @"_24: !<Member ''x'' not found>",
                          @"_25: !<Member ''x'' not found>",
                          @"_26_0: !<Method 'new B' not found>",
                          @"_26_1: !<Method 'new D' not found>",
                          @"_26_2: !<Method 'new E' not found>",
                          @"_26_3: ",
                          @"_26_4: !<Member 'F1(1)' not found>",
                          @"_26_5: 1",
                          @"_26_6: 2",
                          @"A: 1",
                          @"B: 2",
                          @"_28: [CStr]",
                          @"_29_collapsed: [CStr]",
                          @"_31: 0",
                          @"_32: 0",
                          @"_33: 0",
                          @"_34_Exception: !<Exception>",
                          @"_35_Exception: -!-",
                          @"_36: !<MyException>",
                          @"_38_private_get_public_set: 1",
                          @"_39_public_get_private_set: 1",
                          @"_40_private_get_private_set: 1"
                          );

            var b = new TypeWithComplexProxy();

            str = CSharpObjectFormatter.Instance.FormatObject(b, s_memberList);

            AssertMembers(str, @"[BStr]",
                          @"_02_public_property_dd: *1",
                          @"_04_protected_property_dd: *3",
                          @"_08_protected_field_dd: +3",
                          @"_10_private_collapsed: 0",
                          @"_12_public: 0",
                          @"_14_protected: 0",
                          "_16_eolns: ==\r\n=\r\n=",
                          @"_17_braces_0: =={==",
                          @"_17_braces_1: =={{==",
                          @"_17_braces_2: ==!<Member ''{'' not found>==",
                          @"_17_braces_3: ==!<Member ''\{'' not found>==",
                          @"_17_braces_4: ==!<Member '1/*{*/' not found>==",
                          @"_17_braces_5: ==!<Member ''{'/*\' not found>*/}==",
                          @"_17_braces_6: ==!<Member ''{'/*' not found>*/}==",
                          @"_19_escapes: ==\{\x\t==",
                          @"_21: !<Member '1+1' not found>",
                          @"_22: !<Member '""xxx""' not found>",
                          @"_23: !<Member '""xxx""' not found>",
                          @"_24: !<Member ''x'' not found>",
                          @"_25: !<Member ''x'' not found>",
                          @"_26_0: !<Method 'new B' not found>",
                          @"_26_1: !<Method 'new D' not found>",
                          @"_26_2: !<Method 'new E' not found>",
                          @"_26_3: ",
                          @"_26_4: !<Member 'F1(1)' not found>",
                          @"_26_5: 1",
                          @"_26_6: 2",
                          @"A: 1",
                          @"B: 2",
                          @"_28: [CStr]",
                          @"_29_collapsed: [CStr]",
                          @"_31: 0",
                          @"_32: 0",
                          @"_34_Exception: !<Exception>",
                          @"_35_Exception: -!-",
                          @"_36: !<MyException>",
                          @"_38_private_get_public_set: 1",
                          @"_39_public_get_private_set: 1"
                          );
        }
Пример #2
0
        public void DebuggerDisplay()
        {
            string str;
            var a = new ComplexProxy();

            str = CSharpObjectFormatter.Instance.FormatObject(a, s_memberList);

            AssertMembers(str, @"[AStr]",
                @"_02_public_property_dd: *1",
                @"_03_private_property_dd: *2",
                @"_04_protected_property_dd: *3",
                @"_05_internal_property_dd: *4",
                @"_07_private_field_dd: +2",
                @"_08_protected_field_dd: +3",
                @"_09_internal_field_dd: +4",
                @"_10_private_collapsed: 0",
                @"_12_public: 0",
                @"_13_private: 0",
                @"_14_protected: 0",
                @"_15_internal: 0",
                "_16_eolns: ==\r\n=\r\n=",
                @"_17_braces_0: =={==",
                @"_17_braces_1: =={{==",
                @"_17_braces_2: ==!<Member ''{'' not found>==",
                @"_17_braces_3: ==!<Member ''\{'' not found>==",
                @"_17_braces_4: ==!<Member '1/*{*/' not found>==",
                @"_17_braces_5: ==!<Member ''{'/*\' not found>*/}==",
                @"_17_braces_6: ==!<Member ''{'/*' not found>*/}==",
                @"_19_escapes: ==\{\x\t==",
                @"_21: !<Member '1+1' not found>",
                @"_22: !<Member '""xxx""' not found>",
                @"_23: !<Member '""xxx""' not found>",
                @"_24: !<Member ''x'' not found>",
                @"_25: !<Member ''x'' not found>",
                @"_26_0: !<Method 'new B' not found>",
                @"_26_1: !<Method 'new D' not found>",
                @"_26_2: !<Method 'new E' not found>",
                @"_26_3: ",
                @"_26_4: !<Member 'F1(1)' not found>",
                @"_26_5: 1",
                @"_26_6: 2",
                @"A: 1",
                @"B: 2",
                @"_28: [CStr]",
                @"_29_collapsed: [CStr]",
                @"_31: 0",
                @"_32: 0",
                @"_33: 0",
                @"_34_Exception: !<Exception>",
                @"_35_Exception: -!-",
                @"_36: !<MyException>",
                @"_38_private_get_public_set: 1",
                @"_39_public_get_private_set: 1",
                @"_40_private_get_private_set: 1"
            );

            var b = new TypeWithComplexProxy();
            str = CSharpObjectFormatter.Instance.FormatObject(b, s_memberList);

            AssertMembers(str, @"[BStr]",
                @"_02_public_property_dd: *1",
                @"_04_protected_property_dd: *3",
                @"_08_protected_field_dd: +3",
                @"_10_private_collapsed: 0",
                @"_12_public: 0",
                @"_14_protected: 0",
                "_16_eolns: ==\r\n=\r\n=",
                @"_17_braces_0: =={==",
                @"_17_braces_1: =={{==",
                @"_17_braces_2: ==!<Member ''{'' not found>==",
                @"_17_braces_3: ==!<Member ''\{'' not found>==",
                @"_17_braces_4: ==!<Member '1/*{*/' not found>==",
                @"_17_braces_5: ==!<Member ''{'/*\' not found>*/}==",
                @"_17_braces_6: ==!<Member ''{'/*' not found>*/}==",
                @"_19_escapes: ==\{\x\t==",
                @"_21: !<Member '1+1' not found>",
                @"_22: !<Member '""xxx""' not found>",
                @"_23: !<Member '""xxx""' not found>",
                @"_24: !<Member ''x'' not found>",
                @"_25: !<Member ''x'' not found>",
                @"_26_0: !<Method 'new B' not found>",
                @"_26_1: !<Method 'new D' not found>",
                @"_26_2: !<Method 'new E' not found>",
                @"_26_3: ",
                @"_26_4: !<Member 'F1(1)' not found>",
                @"_26_5: 1",
                @"_26_6: 2",
                @"A: 1",
                @"B: 2",
                @"_28: [CStr]",
                @"_29_collapsed: [CStr]",
                @"_31: 0",
                @"_32: 0",
                @"_34_Exception: !<Exception>",
                @"_35_Exception: -!-",
                @"_36: !<MyException>",
                @"_38_private_get_public_set: 1",
                @"_39_public_get_private_set: 1"
            );
        }