Exemple #1
0
        CreateNestedTypeDefCommand(TypeTreeNode ownerType, TypeDefOptions options)
        {
            this.ownerType = ownerType;

            var modNode = ILSpyTreeNode.GetNode<AssemblyTreeNode>(ownerType);
            Debug.Assert(modNode != null);
            if (modNode == null)
                throw new InvalidOperationException();
            this.nestedType = new TypeTreeNode(options.CreateTypeDef(modNode.LoadedAssembly.ModuleDefinition), modNode.Parent as AssemblyTreeNode ?? modNode);
        }
Exemple #2
0
		CreateNestedTypeDefCommand(TypeTreeNode ownerType, TypeDefOptions options)
		{
			this.ownerType = ownerType;

			var modNode = ILSpyTreeNode.GetNode<AssemblyTreeNode>(ownerType);
			Debug.Assert(modNode != null);
			if (modNode == null)
				throw new InvalidOperationException();
			this.nestedType = new TypeTreeNode(options.CreateTypeDef(modNode.LoadedAssembly.ModuleDefinition), modNode.Parent as AssemblyTreeNode ?? modNode);
		}
Exemple #3
0
		CreateTypeDefCommand(IList<TypeDef> ownerList, ILSpyTreeNode ownerNode, TypeDefOptions options)
		{
			this.ownerList = ownerList;
			var modNode = ILSpyTreeNode.GetNode<AssemblyTreeNode>(ownerNode);
			Debug.Assert(modNode != null);
			if (modNode == null)
				throw new InvalidOperationException();
			this.nsNodeCreator = new NamespaceTreeNodeCreator(options.Namespace, modNode);
			this.typeNode = new TypeTreeNode(options.CreateTypeDef(modNode.LoadedAssembly.ModuleDefinition), modNode.Parent as AssemblyTreeNode ?? modNode);
		}
Exemple #4
0
 CreateTypeDefCommand(IList<TypeDef> ownerList, ILSpyTreeNode ownerNode, TypeDefOptions options)
 {
     this.ownerList = ownerList;
     var modNode = ILSpyTreeNode.GetNode<AssemblyTreeNode>(ownerNode);
     Debug.Assert(modNode != null);
     if (modNode == null)
         throw new InvalidOperationException();
     this.nsNodeCreator = new NamespaceTreeNodeCreator(options.Namespace, modNode);
     this.typeNode = new TypeTreeNode(options.CreateTypeDef(modNode.LoadedAssembly.ModuleDefinition), modNode.Parent as AssemblyTreeNode ?? modNode);
 }