当前位置: 首页>>代码示例>>C#>>正文


C# Engine.ResolveAllAssemblies方法代码示例

本文整理汇总了C#中Microsoft.SPOT.Debugger.Engine.ResolveAllAssemblies方法的典型用法代码示例。如果您正苦于以下问题:C# Engine.ResolveAllAssemblies方法的具体用法?C# Engine.ResolveAllAssemblies怎么用?C# Engine.ResolveAllAssemblies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.SPOT.Debugger.Engine的用法示例。


在下文中一共展示了Engine.ResolveAllAssemblies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetPeFileList

        private static ArrayList GetPeFileList(string buildPath, ArrayList referenceList, 
            bool isDevEnvironment, string assemblyName, Engine engine)
        {
            m_isDevEnvironment = isDevEnvironment;
            Hashtable systemAssemblies = new Hashtable();
            foreach (Debugging_Resolve_Assembly resolvedAssembly in engine.ResolveAllAssemblies())
            {
                if ((resolvedAssembly.m_reply.m_flags & Debugging_Resolve_Assembly.Reply.c_Deployed) == 0)
                {
                    systemAssemblies[resolvedAssembly.m_reply.Name] = true;
                }
            }

            // Build an array list of the pe files that this test needs in order to execute.
            // This would include the pe files for all the references and the test itself.            
            ArrayList peList = new ArrayList();
            for (int i = 0; i < referenceList.Count; i++)
            {
                string peFile = referenceList[i] + ".pe";
                string pePath = string.Empty;

                // Look for the pe file in the Build Path.
                if (isDevEnvironment)
                {
                    if (engine.IsTargetBigEndian)
                    {
                        pePath = buildPath + @"\..\pe\be\" + peFile;
                    }
                    else
                    {
                        pePath = buildPath + @"\..\pe\le\" + peFile;
                    }
                }
                else
                {
                    if (engine.IsTargetBigEndian)
                    {
                        pePath = buildPath + @"\be\" + peFile;
                    }
                    else
                    {
                        pePath = buildPath + @"\le\" + peFile;
                    }
                }

                if (!File.Exists(pePath))
                {
                    // Look for the pe file in the MF Tools Path.
                    if (isDevEnvironment)
                    {
                        if (engine.IsTargetBigEndian)
                        {
                            pePath = FindBuildRelativePath(@"pe\be\" + peFile);
                        }
                        else
                        {
                            pePath = FindBuildRelativePath(@"pe\le\" + peFile);
                        }
                    }
                    else
                    {
                        pePath = FindBuildRelativePath( @"Tools\" + peFile );
                    }

                    if (!File.Exists(pePath))
                    {
                        // Look for the pe files in the MF Assemblies Path (used only on test machines.)
                        if (isDevEnvironment)
                        {
                            throw new FileNotFoundException("Unable to locate " + peFile);
                        }
                        else
                        {
                            if (engine.IsTargetBigEndian)
                            {
                                pePath = FindBuildRelativePath(@"Assemblies\be\" + peFile);
                            }
                            else
                            {
                                pePath = FindBuildRelativePath(@"Assemblies\le\" + peFile);
                            }

                            if (!File.Exists(pePath))
                            {
                                throw new FileNotFoundException("Unable to locate " + peFile);
                            }
                        }
                    }
                }

                pePath = pePath.Replace("\\\\", "\\");
                
                if (!systemAssemblies.ContainsKey(peFile.Replace(".pe", "")))
                {
                    peList.Add(GetAssemblyBinary(pePath));
                }
            }

            // Finally add the pe file for the current test to the array list.
            if (isDevEnvironment)
//.........这里部分代码省略.........
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:101,代码来源:Utils.cs


注:本文中的Microsoft.SPOT.Debugger.Engine.ResolveAllAssemblies方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。