Пример #1
0
        internal void Parse()
        {
            m_xapAssemblies = new Dictionary <string, XAPAssembly>();
            m_dllFiles      = new List <string>();

            if (!IsUnpacked)
            {
                m_unpackPath = UnZip(m_XAPFilePath);
            }

            string[] asmFiles = Directory.GetFiles(m_unpackPath, "*.dll");
            foreach (var asmFile in asmFiles)
            {
                string asmFileName = Path.GetFileName(asmFile);
                if (!ExcludeAssembly(asmFileName))
                {
                    XAPAssembly xapAssembly = new XAPAssembly(asmFile);
                    m_xapAssemblies.Add(asmFile, xapAssembly);
                }
                m_dllFiles.Add(asmFile);
            }

            ReadManifest();
        }
Пример #2
0
        private void ProcessAssemblyNodeToTree(Node assemblyNode, XAPAssembly assembly)
        {
            foreach (TypeDefinition typeDefinition in assembly.AssemblyDefinition.MainModule.Types)
            {
                if (typeDefinition.Name.StartsWith("<Module>")
                    || typeDefinition.Name.StartsWith("<PrivateImplementationDetails>")
                    || typeDefinition.Name.StartsWith("__StaticArrayInitTypeSize"))
                {
                    continue;
                }

                var typeNode = new TypeNode(typeDefinition.Name);
                if (typeDefinition.BaseType.FullName.Equals("System.Windows.Navigation.UriMapperBase"))
                    typeNode.URIAndFileHandlerIcon = Resources.link;
                assemblyNode.Nodes.Add(typeNode);
                ProcessTypeNodeToTree(typeNode, typeDefinition);
            }
        }
Пример #3
0
 private void FillAssemblyMethods(XAPAssembly xapAssembly)
 {
     foreach (var method in xapAssembly.GetMethods())
     {
         var hook = new MethodHook(method)
         {
             LogMethodName = true,
             LogParameterValues = true,
             LogReturnValues = true
         };
         m_hooks.Add(hook);
     }
 }
Пример #4
0
        internal void Parse()
        {
            m_xapAssemblies = new Dictionary<string, XAPAssembly>();
            m_dllFiles = new List<string>();

            if (!IsUnpacked)
            {
                m_unpackPath = UnZip(m_XAPFilePath);
            }

            string[] asmFiles = Directory.GetFiles(m_unpackPath, "*.dll");
            foreach (var asmFile in asmFiles)
            {
                string asmFileName = Path.GetFileName(asmFile);
                if (!ExcludeAssembly(asmFileName))
                {
                    XAPAssembly xapAssembly = new XAPAssembly(asmFile);
                    m_xapAssemblies.Add(asmFile, xapAssembly);
                }
                m_dllFiles.Add(asmFile);
            }

            ReadManifest();
        }