本文整理汇总了C#中ModuleSymbol.AsImmutableOrNull方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleSymbol.AsImmutableOrNull方法的具体用法?C# ModuleSymbol.AsImmutableOrNull怎么用?C# ModuleSymbol.AsImmutableOrNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleSymbol
的用法示例。
在下文中一共展示了ModuleSymbol.AsImmutableOrNull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PEAssemblySymbol
internal PEAssemblySymbol(PEAssembly assembly, DocumentationProvider documentationProvider, bool isLinked, MetadataImportOptions importOptions)
{
Debug.Assert(assembly != null);
Debug.Assert(documentationProvider != null);
_assembly = assembly;
_documentationProvider = documentationProvider;
var modules = new ModuleSymbol[assembly.Modules.Length];
for (int i = 0; i < assembly.Modules.Length; i++)
{
modules[i] = new PEModuleSymbol(this, assembly.Modules[i], importOptions, i);
}
_modules = modules.AsImmutableOrNull();
_isLinked = isLinked;
}
示例2: RetargetingAssemblySymbol
/// <summary>
/// Constructor.
/// </summary>
/// <param name="underlyingAssembly">
/// The underlying AssemblySymbol, cannot be an instance of RetargetingAssemblySymbol.
/// </param>
/// <param name="isLinked">
/// Assembly is /l-ed by compilation that is using it as a reference.
/// </param>
public RetargetingAssemblySymbol(SourceAssemblySymbol underlyingAssembly, bool isLinked)
{
Debug.Assert((object)underlyingAssembly != null);
_underlyingAssembly = underlyingAssembly;
ModuleSymbol[] modules = new ModuleSymbol[underlyingAssembly.Modules.Length];
modules[0] = new RetargetingModuleSymbol(this, (SourceModuleSymbol)underlyingAssembly.Modules[0]);
for (int i = 1; i < underlyingAssembly.Modules.Length; i++)
{
PEModuleSymbol under = (PEModuleSymbol)underlyingAssembly.Modules[i];
modules[i] = new PEModuleSymbol(this, under.Module, under.ImportOptions, i);
}
_modules = modules.AsImmutableOrNull();
_isLinked = isLinked;
}