Exemplo n.º 1
0
        public override void Visit(ITypeExport aliasForType)
        {
            this.Visit(aliasForType.GetAttributes(Context));

            // do not visit the reference to aliased type, it does not get into the type ref table based only on its membership of the exported types collection.
            // but DO visit the reference to assembly (if any) that defines the aliased type. That assembly might not already be in the assembly reference list.
            var definingUnit     = MetadataWriter.GetDefiningUnitReference(aliasForType.ExportedType, Context);
            var definingAssembly = definingUnit as IAssemblyReference;

            if (definingAssembly != null)
            {
                this.Visit(definingAssembly);
            }

            var definingModule = definingUnit as IModuleReference;

            if (definingModule != null)
            {
                definingAssembly = definingModule.GetContainingAssembly(Context);
                if (definingAssembly != null && !ReferenceEquals(definingAssembly, this.module.GetContainingAssembly(Context)))
                {
                    this.Visit(definingAssembly);
                }
            }
        }
Exemplo n.º 2
0
        public override void Visit(ITypeExport aliasForType)
        {
            this.Visit(aliasForType.GetAttributes(Context));

            // do not visit the reference to aliased type, it does not get into the type ref table based only on its membership of the exported types collection.
            // but DO visit the reference to assembly (if any) that defines the aliased type. That assembly might not already be in the assembly reference list.
            var definingUnit = MetadataWriter.GetDefiningUnitReference(aliasForType.ExportedType, Context);
            var definingAssembly = definingUnit as IAssemblyReference;
            if (definingAssembly != null)
            {
                this.Visit(definingAssembly);
            }

            var definingModule = definingUnit as IModuleReference;
            if (definingModule != null)
            {
                definingAssembly = definingModule.GetContainingAssembly(Context);
                if (definingAssembly != null && !ReferenceEquals(definingAssembly, this.module.GetContainingAssembly(Context)))
                {
                    this.Visit(definingAssembly);
                }
            }
        }
Exemplo n.º 3
0
 public virtual void Visit(ITypeExport typeExport)
 {
     this.Visit(typeExport.ExportedType);
     this.Visit(typeExport.GetAttributes(Context));
     typeExport.Dispatch(this);
 }
Exemplo n.º 4
0
 public CreateBenchmark TypeOfExport(ITypeExport typeExport)
 {
     _benchmark.Exporter.AddExport(typeExport);
     return(this);
 }
Exemplo n.º 5
0
 public virtual void Visit(ITypeExport typeExport)
 {
     this.Visit(typeExport.ExportedType);
     this.Visit(typeExport.GetAttributes(Context));
     typeExport.Dispatch(this);
 }
Exemplo n.º 6
0
 public void AddExport(string nameExport, ITypeExport export)
 {
     _dicoExportType.Add(nameExport, export);
 }
Exemplo n.º 7
0
 public void AddExport(ITypeExport typeExport)
 {
     _listExport.Add(typeExport);
 }