Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikdasm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2017-03-15 23:24:13 +0300
committerZoltan Varga <vargaz@gmail.com>2017-03-15 23:24:13 +0300
commit88b67c42ca8b7d58141c176b46749819bfcef166 (patch)
treeb5877e9ffa69b9f923ee695b16516abde334013e
parentc30bfe5a31a8eb95701af9d763549587f2bb6b48 (diff)
Avoid using a c#7 local method.
-rw-r--r--TableDumper.cs19
1 files changed, 9 insertions, 10 deletions
diff --git a/TableDumper.cs b/TableDumper.cs
index 0366f3c..bfb69cc 100644
--- a/TableDumper.cs
+++ b/TableDumper.cs
@@ -177,6 +177,15 @@ namespace Ildasm
}
}
+ string StringifyCattrValue (object val) {
+ if (val.GetType () == typeof (string))
+ return String.Format ("\"{0}\"", val);
+ else if (val == null)
+ return "null";
+ else
+ return val.ToString ();
+ }
+
void DumpCustomAttributeTable (TextWriter w) {
var t = module.CustomAttribute;
w.WriteLine ("CustomAttribute Table (1.." + t.RowCount + ")");
@@ -206,15 +215,6 @@ namespace Ildasm
{ GenericParamTable.Index, "GenericParam" }
};
- string StringifyCattrValue (object val) {
- if (val.GetType () == typeof (string))
- return String.Format ("\"{0}\"", val);
- else if (val == null)
- return "null";
- else
- return val.ToString ();
- }
-
foreach (var cattr in module.__EnumerateCustomAttributeTable ()) {
//Console.WriteLine (cattr);
@@ -228,7 +228,6 @@ namespace Ildasm
var args = new StringBuilder ();
args.Append ("[");
- bool first_arg = true;
var sep = "";
foreach (var arg in cattr.ConstructorArguments) {
args.Append (sep).Append (StringifyCattrValue (arg.Value));