コード例 #1
0
        /// <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>
        internal 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++)
            {
                CSharpModuleSymbol under = (CSharpModuleSymbol)underlyingAssembly.Modules[i];
                modules[i] = new CSharpModuleSymbol(this, under.UnderlyingModule, i);
            }

            _modules  = modules.AsImmutableOrNull();
            _isLinked = isLinked;
        }
コード例 #2
0
 public RetargetingSymbolTranslator(RetargetingModuleSymbol retargetingModule)
 {
     Debug.Assert((object)retargetingModule != null);
     _retargetingModule = retargetingModule;
 }