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

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Bjarne Kvinge <rolf@xamarin.com>2012-02-25 03:02:46 +0400
committerRolf Bjarne Kvinge <rolf@xamarin.com>2012-02-25 03:04:57 +0400
commitfe53f3ef6e6a9cf1e2161a1a8d2565b000338c70 (patch)
tree5af96748aa8ee0627a91048bd55854d0189f895b /gui-compare
parent0827dbf2e81fa0f485f73955885e4bfc7304a389 (diff)
gui-compare: Distinguish between ref and out parameters.
And parameters with the (IL) Out attribute aren't necessarily C# out parameters, they might have the System.Runtime.InteropServices.OutAttribute applied (in which case they're not byreference types).
Diffstat (limited to 'gui-compare')
-rw-r--r--gui-compare/CecilMetadata.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui-compare/CecilMetadata.cs b/gui-compare/CecilMetadata.cs
index 2387b5eb..d356a0e4 100644
--- a/gui-compare/CecilMetadata.cs
+++ b/gui-compare/CecilMetadata.cs
@@ -1011,15 +1011,18 @@ namespace GuiCompare {
sb.Append ('(');
bool first_p = true;
foreach (ParameterDefinition p in method_def.Parameters) {
+ TypeReference paramType = p.ParameterType;
if (!first_p)
sb.Append (", ");
first_p = false;
if (p.IsIn)
sb.Append ("in ");
- else if (p.IsOut)
- sb.Append ("out ");
+ else if (paramType.IsByReference) {
+ sb.Append (p.IsOut ? "out " : "ref ");
+ paramType = paramType.GetElementType ();
+ }
sb.Append (beautify
- ? CecilUtils.PrettyType (p.ParameterType)
+ ? CecilUtils.PrettyType (paramType)
: CecilUtils.FormatTypeLikeCorCompare (p.ParameterType));
if (beautify) {
sb.Append (" ");