Пример #1
0
        void Decompile(IResourceElementSetNode node)
        {
            node.WriteShort(output, language, language.Settings.GetBoolean(DecompilerOptionConstants.ShowTokenAndRvaComments_GUID));

            foreach (var child in GetChildren(node))
            {
                if (child is IResourceElementNode)
                {
                    Decompile((IResourceElementNode)child);
                }
                else
                {
                    DecompileUnknown(child);
                }
            }
        }
Пример #2
0
        void Decompile(IResourceElementSetNode node)
        {
            node.WriteShort(output, language, language.Settings.GetBoolean(DecompilerOptionConstants.ShowTokenAndRvaComments_GUID));

            foreach (var child in GetChildren(node)) {
                if (child is IResourceElementNode)
                    Decompile((IResourceElementNode)child);
                else
                    DecompileUnknown(child);
            }
        }
Пример #3
0
		protected ResourceElementSettingsBaseCommand(IResourceElementNode rsrcElNode, ResourceElementOptions options) {
			this.rsrcSetNode = (IResourceElementSetNode)rsrcElNode.TreeNode.Parent.Data;
			this.rsrcElNode = rsrcElNode;
			this.newOptions = options.Create();
			this.origOptions = rsrcElNode.ResourceElement;

			this.module = rsrcSetNode.GetModule();
			Debug.Assert(this.module != null);
			this.resource = rsrcSetNode.Resource;
			this.resourceIndex = module.Resources.IndexOf(this.resource);
			Debug.Assert(this.resourceIndex >= 0);
			if (this.resourceIndex < 0)
				throw new InvalidOperationException();

			this.origParentChildIndex = this.rsrcSetNode.TreeNode.Children.IndexOf(rsrcElNode.TreeNode);
			Debug.Assert(this.origParentChildIndex >= 0);
			if (this.origParentChildIndex < 0)
				throw new InvalidOperationException();

			this.nameChanged = origOptions.Name != newOptions.Name;
		}
Пример #4
0
			public ModuleInfo(IResourceElementSetNode node) {
				if (node == null)
					throw new InvalidOperationException();
				this.Node = node;
				var module = node.GetModule();
				Debug.Assert(module != null);
				if (module == null)
					throw new InvalidOperationException();
				this.Module = module;
				this.Index = module.Resources.IndexOf(node.Resource);
				Debug.Assert(this.Index >= 0);
				if (this.Index < 0)
					throw new InvalidOperationException();
				this.Resource = node.Resource;
			}
Пример #5
0
		CreateResourceElementCommand(IResourceElementSetNode rsrcSetNode, IResourceElementNode node)
			: base(rsrcSetNode, new[] { node }) {
		}
Пример #6
0
		CreateStreamResourceElementCommand(IResourceElementSetNode rsrcSetNode, IResourceElementNode[] nodes)
			: base(rsrcSetNode, nodes) {
		}
Пример #7
0
		CreateByteArrayResourceElementCommand(IResourceElementSetNode rsrcSetNode, IResourceElementNode[] nodes)
			: base(rsrcSetNode, nodes) {
		}
Пример #8
0
		CreateImageListResourceElementCommand(IResourceElementSetNode rsrcSetNode, ISerializedImageListStreamerResourceElementNode node)
			: base(rsrcSetNode, new IResourceElementNode[] { node }) {
		}
Пример #9
0
		protected CreateResourceElementCommandBase(IResourceElementSetNode rsrcSetNode, IResourceElementNode[] nodes) {
			this.module = rsrcSetNode.GetModule();
			Debug.Assert(this.module != null);
			this.rsrcSetNode = rsrcSetNode;
			this.nodes = nodes;
			this.resource = rsrcSetNode.Resource;
			this.resourceIndex = module.Resources.IndexOf(this.resource);
			Debug.Assert(this.resourceIndex >= 0);
			if (this.resourceIndex < 0)
				throw new InvalidOperationException();
		}