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


C# ModuleBuilder.GetTypes方法代码示例

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


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

示例1: UpdateComTypesInAssembly

 private static void UpdateComTypesInAssembly(AssemblyBuilder asmBldr, ModuleBuilder modBldr)
 {
     AssemblyBuilderData assemblyData = asmBldr.m_assemblyData;
     Type[] types = modBldr.GetTypes();
     int length = types.Length;
     for (int i = 0; i < length; i++)
     {
         assemblyData.AddPublicComType(types[i]);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:TypeLibConverter.cs

示例2: UpdateComTypesInAssembly

        private static void UpdateComTypesInAssembly(AssemblyBuilder asmBldr, ModuleBuilder modBldr)
        {
            // Retrieve the AssemblyBuilderData associated with the assembly builder.
            AssemblyBuilderData AsmBldrData = asmBldr.m_assemblyData;

            // Go through the types in the module and add them as public COM types.
            Type[] aTypes = modBldr.GetTypes();
            int NumTypes = aTypes.Length;
            for (int cTypes = 0; cTypes < NumTypes; cTypes++)
                AsmBldrData.AddPublicComType(aTypes[cTypes]);
        }
开发者ID:Rayislandstyle,项目名称:dotnet-coreclr,代码行数:11,代码来源:TypeLibConverter.cs

示例3: ModuleBuilder_GetType

 // ...
 // There's a bug in ModuleBuilder.GetType(), so we have to use our own 
 // version for now.
 System.Type ModuleBuilder_GetType(ModuleBuilder m, string stType)
 {
 #if false
     // This should work, but is broken for nested types.
     return m.GetType(stType);
 #else        
     // Here's our hack to use in the meantime
     // Note, we have to deal with appended characters like [], and &
     // This is a hack that will work for now. When reflection-emit fixes the 
     // bug, we can get rid of this.
     Type [] al = m.GetTypes();
     foreach(Type t in al)
     {
         if (t.FullName == stType)
             return t;
     }
     return null;    
 #endif
 }
开发者ID:chenzuo,项目名称:blue,代码行数:22,代码来源:EmitCodeGen.cs


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