Exemple #1
0
		public virtual void Decompile(Language language, ITextOutput output) {
			language.WriteComment(output, string.Empty);
			output.WriteOffsetComment(this);
			output.WriteDefinition(UIUtils.CleanUpName(Name), this, TextTokenType.Comment);
			string extra = null;
			if (r.ResourceType == ResourceType.AssemblyLinked)
				extra = ((AssemblyLinkedResource)r).Assembly.FullName;
			else if (r.ResourceType == ResourceType.Linked) {
				var file = ((LinkedResource)r).File;
				extra = string.Format("{0}, {1}, {2}", file.Name, file.ContainsNoMetaData ? "ContainsNoMetaData" : "ContainsMetaData", NumberVMUtils.ByteArrayToString(file.HashValue));
			}
			else if (r.ResourceType == ResourceType.Embedded)
				extra = string.Format("{0} bytes", ((EmbeddedResource)r).Data.Length);
			output.Write(string.Format(" ({0}{1}, {2})", extra == null ? string.Empty : string.Format("{0}, ", extra), r.ResourceType, r.Attributes), TextTokenType.Comment);
			output.WriteLine();
		}
 public virtual void Decompile(Language language, ITextOutput output)
 {
     language.WriteComment(output, string.Empty);
     if (Options.DecompilerSettingsPanel.CurrentDecompilerSettings.ShowTokenAndRvaComments) {
         long fo = FileOffset;
         if (fo != 0)
             output.Write(string.Format("0x{0:X8}: ", fo), TextTokenType.Comment);
     }
     output.WriteDefinition(UIUtils.CleanUpName(Name), this, TextTokenType.Comment);
     output.Write(string.Format(" = {0}", ValueString), TextTokenType.Comment);
     output.WriteLine();
 }
 public virtual void Decompile(Language language, ITextOutput output)
 {
     language.WriteComment(output, string.Empty);
     output.WriteOffsetComment(this);
     output.WriteDefinition(UIUtils.CleanUpName(Name), this, TextTokenType.Comment);
     output.Write(string.Format(" = {0}", ValueString), TextTokenType.Comment);
     output.WriteLine();
 }
Exemple #4
0
 public virtual void Decompile(Language language, ITextOutput output)
 {
     language.WriteComment(output, string.Empty);
     if (Options.DecompilerSettingsPanel.CurrentDecompilerSettings.ShowTokenAndRvaComments) {
         long fo = FileOffset;
         if (fo != 0)
             output.Write(string.Format("0x{0:X8}: ", fo), TextTokenType.Comment);
     }
     output.WriteDefinition(UIUtils.CleanUpName(Name), this, TextTokenType.Comment);
     string extra = null;
     if (r.ResourceType == ResourceType.AssemblyLinked)
         extra = ((AssemblyLinkedResource)r).Assembly.FullName;
     else if (r.ResourceType == ResourceType.Linked) {
         var file = ((LinkedResource)r).File;
         extra = string.Format("{0}, {1}, {2}", file.Name, file.ContainsNoMetaData ? "ContainsNoMetaData" : "ContainsMetaData", AsmEditor.NumberVMUtils.ByteArrayToString(file.HashValue));
     }
     output.Write(string.Format(" ({0}{1}, {2})", extra == null ? string.Empty : string.Format("{0}, ", extra), r.ResourceType, r.Attributes), TextTokenType.Comment);
     output.WriteLine();
 }