SSM
SSM. Reflection Class - D. 부산외국어대학교 컴퓨터공학부 유수희. 개발환경 : Microsoft Visual Studio 2008. CONTENT. Motive & Dream System Architecture Software Architecture #1(Check CLR Type) Software Architecture #2(Project Browser) Software Architecture #3(Shown on Diagram)
SSM
E N D
Presentation Transcript
SSM Reflection Class - D 부산외국어대학교 컴퓨터공학부 유수희 개발환경 : Microsoft Visual Studio 2008
CONTENT • Motive & Dream • System Architecture • Software Architecture #1(Check CLR Type) • Software Architecture #2(Project Browser) • Software Architecture #3(Shown on Diagram) • Software Architecture #4(Parsing the IL of a Method Body) • PLAN • Demo, Q&A
MOTIVE Visual Studio 2008
SYSTEM ARCHITECTURE Project Manager Reflection Engine Manager XML Read Assembly Method Analysis Menu&Toolbar EXE/DLL Header Test Head Setting Docking Configuration Plug-in • Body Analysis Handler • Branch • Call • Condition • Exception • Hook • Resolve • Switch Individual Class Analysis Project Browser Setting Status Window Fetch Method Window UI Project Browser Class Diagram MSIL Viewer Code Viewer Info Viewer .NET Framework Reflection Namespaces • Aga.Controls • WinFormsUI.Docking C# Window XP
SOFTWARE ARCHITECTURE#1.1 - Open a File Select Type Assemblies (*.dll) Executables (*.exe) Click! Next Step • Valid CLR Type • Create The Tree And Classes • Project Browser
SOFTWARE ARCHITECTURE #1.2 - Valid CLR Type Start TRUE Header @ 0x3C CLI Header Test HeaderSignature ReadUInt16() Machine ReadUInt32() NumberOfSections TimeDateStamp PointerToSymbolTable NumberOfSymbols SizeOfOptionalHeader Characteristics Finish
SOFTWARE ARCHITECTURE #2.1 - Project Browser TreeView MSILView CodeView EXE Using Reflection Class Diagram DLL Info View
SOFTWARE ARCHITECTURE #3.1 - Individual Class Analysis A S S O C I A T I O N S L I S T System.Reflection Constructors • ConstructorInfo • MethodInfo • PropertyInfo • FieldInfo • EventInfo PrameterInfo TypeItem Method Property getGenericsForType Field Event
SOFTWARE ARCHITECTURE #3.2 - Get New Location Selection.Right + DLocation.Y , DLocation.X DefaultItemLocation Point(25,25) Reserved rectangle Step3 Step2 Selection rectangle Step1 Selection. IntersectsWith(Reserved) Move rectangle Example IntersectsWith Return true
SOFTWARE ARCHITECTURE #3.3 - Draw Class Diagram Expander Max Height Max Weight
SOFTWARE ARCHITECTURE #4.1 - Ask for the IL Code • OperandTpye • (17 Case) • InlineBrTarget • InlineField • InlineMethod • InlineSig • InlineTok • InlineType • Inlinel • Inlinel8 • InlineNode • InlineR • InlineString • InlineSwitch • InlineVar • ShortInlineBrTarget • ShortInlinel • ShortInlineR • ShortInlineVar • Reflection • ReturnType • ReflectedType • FullName • Method Body • Array of bytes • MSIL Code • OpCode • SingleByteOpCode • MultiByteOpCode
SOFTWARE ARCHITECTURE #4.3 – Set Method Head • General Code • Public, Private • Int, float, String • Main, Program • Byte, double • String str, Int i Reflection • IsPublic • ReturnType • Name • GetParameters • LocalVariabels
SOFTWARE ARCHITECTURE #4.4 – MSIL Decompil MSIL Structure c b Local Variable Init a 2 Single Byte Instructions(0~ 255) Multi Byte Instructions(0~ 30) Single Byte Instructions(0~ 255) Multi Byte Instructions(0~ 30) 1 0
SSM DEMO, Q&A