public override TreeViewNodeFilterResult GetFilterResult(AssemblyRef asmRef)
 {
     bool isMatch = (flags & VisibleMembersFlags.AssemblyRef) != 0;
     if (!isMatch)
         return new TreeViewNodeFilterResult(FilterResult.Hidden, isMatch);
     return new TreeViewNodeFilterResult(FilterResult.Match, isMatch);
 }
 public override FileTreeNodeFilterResult GetResult(AssemblyRef asmRef)
 {
     bool isMatch = (flags & VisibleMembersFlags.AssemblyRef) != 0;
     if (!isMatch)
         return new FileTreeNodeFilterResult(FilterType.Hide, isMatch);
     return new FileTreeNodeFilterResult(FilterType.Visible, isMatch);
 }
示例#3
0
		public ClrVersionValues(ClrVersion clrVersion, uint cor20HeaderRuntimeVersion, ushort tablesHeaderVersion, string runtimeVersion, AssemblyRef corLibRef) {
			this.ClrVersion = clrVersion;
			this.Cor20HeaderRuntimeVersion = cor20HeaderRuntimeVersion;
			this.TablesHeaderVersion = tablesHeaderVersion;
			this.RuntimeVersion = runtimeVersion;
			this.CorLibRef = corLibRef;
		}
示例#4
0
        TypeDef Resolve(AssemblyRef asmRef, TypeRef typeRef)
        {
            var asm = ownerModule.Assembly;

            if (asm == null)
            {
                return(null);
            }
            if (!(AssemblyNameComparer.CompareAll.Equals(asmRef, asm) && asmRef.IsRetargetable == asm.IsRetargetable))
            {
                return(null);
            }
            var td = typeRef.Resolve();

            return(td != null && td.Module == ownerModule ? td : null);
        }
示例#5
0
        TypeDef Resolve(AssemblyRef asmRef, TypeRef typeRef)
        {
            var asm = ownerModule.Assembly;

            if (asm == null)
            {
                return(null);
            }
            if (asmRef.FullName != asm.GetFullNameWithPublicKey() && asmRef.FullName != asm.GetFullNameWithPublicKeyToken())
            {
                return(null);
            }
            var td = typeRef.Resolve();

            return(td != null && td.Module == ownerModule ? td : null);
        }
示例#6
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name">Module name</param>
 /// <param name="mvid">Module version ID</param>
 /// <param name="corLibAssemblyRef">Corlib assembly ref or <c>null</c></param>
 public ModuleDefUser(UTF8String name, Guid?mvid, AssemblyRef corLibAssemblyRef)
 {
     this.Kind                      = ModuleKind.Windows;
     this.Characteristics           = DefaultCharacteristics;
     this.DllCharacteristics        = DefaultDllCharacteristics;
     this.RuntimeVersion            = MDHeaderRuntimeVersion.MS_CLR_20;
     this.Machine                   = Machine.I386;
     this.Cor20HeaderFlags          = ComImageFlags.ILOnly;
     this.Cor20HeaderRuntimeVersion = 0x00020005;                // .NET 2.0 or later should use 2.5
     this.TablesHeaderVersion       = 0x0200;                    // .NET 2.0 or later should use 2.0
     this.corLibTypes               = new CorLibTypes(this, corLibAssemblyRef);
     this.types                     = new LazyList <TypeDef>(this);
     this.name                      = name;
     this.mvid                      = mvid;
     types.Add(CreateModuleType());
     UpdateRowId(this);
 }
        internal AssemblyRef FindAssemblyRef(TypeRef nonNestedTypeRef)
        {
            AssemblyRef asmRef = null;

            if (nonNestedTypeRef != null && typeNameParserHelper != null)
            {
                asmRef = typeNameParserHelper.FindAssemblyRef(nonNestedTypeRef);
            }
            if (asmRef != null)
            {
                return(asmRef);
            }
            if (ownerModule.Assembly != null)
            {
                return(ownerModule.UpdateRowId(ownerModule.Assembly.ToAssemblyRef()));
            }
            return(AssemblyRef.CurrentAssembly);
        }
示例#8
0
        internal AssemblyRef FindAssemblyRef(TypeRef nonNestedTypeRef)
        {
            AssemblyRef asmRef = null;

            if (!(nonNestedTypeRef is null) && !(typeNameParserHelper is null))
            {
                asmRef = typeNameParserHelper.FindAssemblyRef(nonNestedTypeRef);
            }
            if (!(asmRef is null))
            {
                return(asmRef);
            }
            var ownerAsm = ownerModule.Assembly;

            if (!(ownerAsm is null))
            {
                return(ownerModule.UpdateRowId(ownerAsm.ToAssemblyRef()));
            }
            return(AssemblyRef.CurrentAssembly);
        }
示例#9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="module">The owner module</param>
 /// <param name="corLibAssemblyRef">Corlib assembly reference or <c>null</c> if a default
 /// assembly reference should be created</param>
 public CorLibTypes(ModuleDef module, AssemblyRef corLibAssemblyRef)
 {
     this.module            = module;
     this.corLibAssemblyRef = corLibAssemblyRef ?? CreateCorLibAssemblyRef();
     Initialize();
 }
		public virtual DocumentTreeNodeFilterResult GetResult(AssemblyRef asmRef) => new DocumentTreeNodeFilterResult();
		public virtual TreeViewNodeFilterResult GetFilterResult(AssemblyRef asmRef) {
			return new TreeViewNodeFilterResult(FilterResult.Hidden, false);
		}
示例#12
0
		public virtual TreeViewNodeFilterResult GetFilterResult(AssemblyRef asmRef) {
			return new TreeViewNodeFilterResult();
		}
示例#13
0
 public virtual FileTreeNodeFilterResult GetResult(AssemblyRef asmRef)
 {
     return new FileTreeNodeFilterResult();
 }
		public virtual DocumentTreeNodeFilterResult GetResult(AssemblyRef asmRef) => new DocumentTreeNodeFilterResult(FilterType.Hide, false);
 public virtual FileTreeNodeFilterResult GetResult(AssemblyRef asmRef)
 {
     return new FileTreeNodeFilterResult(FilterType.Hide, false);
 }
示例#16
0
 public virtual FileTreeNodeFilterResult GetResult(AssemblyRef asmRef)
 {
     return this.filter.GetResult(asmRef);
 }