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:
authorJeroen Frijters <jeroen@frijters.net>2015-06-23 14:49:38 +0300
committerJeroen Frijters <jeroen@frijters.net>2015-06-23 14:49:38 +0300
commit856c9a3db2248d8774ed840bee029d65f2ebe894 (patch)
tree3971ed4ae907cd8084f4ef77bf434757b097a9e7
parent9582648627e5c47ce8e91d2bcb981254634afd8d (diff)
Custom modifiers in generic parameter constraints
Added support for custom modifiers in generic parameter constraints.
-rw-r--r--Disassembler.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Disassembler.cs b/Disassembler.cs
index 646380c..418548b 100644
--- a/Disassembler.cs
+++ b/Disassembler.cs
@@ -967,18 +967,26 @@ namespace Ildasm
lw.Write(".ctor ");
}
string sep2 = "(";
- foreach (var constraint in par.GetGenericParameterConstraints())
+ Type[] constraints = par.GetGenericParameterConstraints();
+ CustomModifiers[] customModifiers = par.__GetGenericParameterConstraintCustomModifiers();
+ for (int j = 0; j < constraints.Length; j++)
{
+ Type constraint = constraints[j];
lw.Write(sep2);
sep2 = ", ";
if (constraint.__IsMissing || !constraint.IsGenericType)
{
+ if (!customModifiers[j].IsEmpty && !constraint.IsGenericParameter)
+ {
+ lw.Write(constraint.IsValueType ? "valuetype " : "class ");
+ }
WriteTypeDefOrRef(lw, constraint);
}
else
{
WriteSignatureType(lw, constraint);
}
+ WriteCustomModifiers(lw, customModifiers[j]);
}
if (sep2 != "(")
{