これして
http://blogs.wankuma.com/naka/archive/2007/12/29/115456.aspx
これして
http://blogs.wankuma.com/naka/archive/2007/12/29/115459.aspx
!clrstack
そうすっと
001b8d44 55385f23 System.Windows.Markup.XamlStyleSerializer.ConvertBamlToObject(System.Windows.Markup.BamlRecordReader, System.Windows.Markup.BamlRecord, System.Windows.Markup.ParserContext)
001b8d60 55357a30 System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(System.Windows.Markup.BamlElementStartRecord)
001b8d98 55342fc9 System.Windows.Markup.BamlRecordReader.ReadRecord(System.Windows.Markup.BamlRecord)
001b8dec 55385ada System.Windows.Markup.BamlRecordReader.ReadElement(Int64, System.Windows.Markup.XamlObjectIds, System.Object)
001b8e1c 55385932 System.Windows.ResourceDictionary.CreateObject(Int32, System.Object)
001b8e60 553856d2 System.Windows.ResourceDictionary.RealizeDeferContent(System.Object, System.Object ByRef, Boolean ByRef)
001b8eb0 55385593 System.Windows.ResourceDictionary.GetValueWithoutLock(System.Object, Boolean ByRef)
001b8ecc 5538552c System.Windows.ResourceDictionary.GetValue(System.Object, Boolean ByRef)
001b8f00 553ec25f System.Windows.ResourceDictionary.get_Item(System.Object)
001b8f08 553ec1b9 System.Windows.DeferredResourceReference.GetValue(System.Windows.BaseValueSourceInternal)
001b8f14 5539a5ec System.Windows.StaticResourceExtension.ProvideValueInternal(System.Windows.Markup.IBamlReader, System.Object, System.Object, Boolean)
001b8f44 5539a4d5 System.Windows.StaticResourceExtension.ProvideValue(System.IServiceProvider)
001b8f60 5537f701 System.Windows.Markup.BamlRecordReader.ProvideValueFromMarkupExtension(System.Windows.Markup.MarkupExtension, System.Object, System.Object)
001b8f9c 5539a245 System.Windows.Markup.BamlRecordReader.BaseReadOptimizedMarkupExtension(System.Object, Int16, System.Windows.Markup.PropertyDefinition, System.Object)
001b8ff4 5539a1e2 System.Windows.Markup.BamlRecordReader.ReadPropertyWithStaticResourceIdRecord(System.Windows.Markup.BamlPropertyWithStaticResourceIdRecord)
001b901c 5539a010 System.Windows.Markup.StyleBamlRecordReader.ReadPropertyWithStaticResourceIdRecord(System.Windows.Markup.BamlPropertyWithStaticResourceIdRecord)
001b902c 55343318 System.Windows.Markup.BamlRecordReader.ReadRecord(System.Windows.Markup.BamlRecord)
001b9080 5538615a System.Windows.Markup.StyleBamlRecordReader.ReadRecord(System.Windows.Markup.BamlRecord)
001b9088 5537ce50 System.Windows.Markup.BamlRecordReader.Read(Boolean)
001b909c 55386409 System.Windows.Markup.StyleTreeBuilderBamlTranslator.ParseFragment()
001b90b8 5534134d System.Windows.Markup.TreeBuilder.Parse()
こんなかんじで1周しているのがわかります。
!dso ってやるとスタックに積まれていったオブジェクトがわかります。
002856e0 0363b9d0 System.Windows.Markup.BamlRecordManager
002856f0 0363b880 System.Windows.Markup.BamlRecordReader
002856f4 03635e58 System.IO.MemoryStream
002856f8 03686514 System.Windows.Markup.XamlStyleSerializer
00285704 0363bad4 System.Windows.Markup.BamlElementStartRecord
00285714 0363bad4 System.Windows.Markup.BamlElementStartRecord
!do 右の数字ってやると、中身が見られます。
0:000> !do 03635e58
Name: System.IO.MemoryStream
MethodTable: 7910f09c
EEClass: 7910f01c
Size: 52(0x34) bytes
(C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
Fields:
MT Field Offset Type VT Attr Value Name
790fd0f0 400018a 4 System.Object 0 instance 00000000 __identity
791913b0 4001b56 8 ...ream+ReadDelegate 0 instance 00000000 _readDelegate
79191440 4001b57 c ...eam+WriteDelegate 0 instance 00000000 _writeDelegate
791124e4 4001b58 10 ...ng.AutoResetEvent 0 instance 00000000 _asyncActiveEvent
79102290 4001b59 14 System.Int32 1 instance 1 _asyncActiveCount
79101924 4001b55 570 System.IO.Stream 0 shared static Null
>> Domain:Value 00812990:NotInit <<
7912dae8 4001c00 18 System.Byte[] 0 instance 03635b94 _buffer
79102290 4001c01 1c System.Int32 1 instance 0 _origin
79102290 4001c02 20 System.Int32 1 instance 147 _position
79102290 4001c03 24 System.Int32 1 instance 693 _length
79102290 4001c04 28 System.Int32 1 instance 693 _capacity
7910be50 4001c05 2c System.Boolean 1 instance 0 _expandable
7910be50 4001c06 2d System.Boolean 1 instance 1 _writable
7910be50 4001c07 2e System.Boolean 1 instance 0 _exposable
7910be50 4001c08 2f System.Boolean 1 instance 1 _isOpen
ほかは使いながらですね・・・・まだいまいち使いこなせてないです。