Browse Source

A bit of clean-up

pull/863/head
Siegfried Pammer 8 years ago
parent
commit
a09afe18d7
  1. 4
      ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs
  2. 2
      ILSpy/Languages/CSharpLanguage.cs
  3. 4
      ILSpy/Languages/ILLanguage.cs

4
ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs

@ -221,11 +221,11 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms @@ -221,11 +221,11 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
}
}
void IAstTransform.Run(AstNode node, TransformContext context)
void IAstTransform.Run(AstNode rootNode, TransformContext context)
{
try {
this.context = context;
node.AcceptVisitor(this);
rootNode.AcceptVisitor(this);
} finally {
this.context = null;
}

2
ILSpy/Languages/CSharpLanguage.cs

@ -458,7 +458,7 @@ namespace ICSharpCode.ILSpy @@ -458,7 +458,7 @@ namespace ICSharpCode.ILSpy
var buffer = new System.Text.StringBuilder();
var accessor = property.GetMethod ?? property.SetMethod;
if (accessor.HasOverrides) {
var declaringType = accessor.Overrides.First().DeclaringType;
var declaringType = accessor.Overrides[0].DeclaringType;
buffer.Append(TypeToString(declaringType, includeNamespace: true));
buffer.Append(@".");
}

4
ILSpy/Languages/ILLanguage.cs

@ -122,10 +122,10 @@ namespace ICSharpCode.ILSpy @@ -122,10 +122,10 @@ namespace ICSharpCode.ILSpy
}
}
public override string TypeToString(TypeReference t, bool includeNamespace, ICustomAttributeProvider attributeProvider = null)
public override string TypeToString(TypeReference type, bool includeNamespace, ICustomAttributeProvider typeAttributes = null)
{
PlainTextOutput output = new PlainTextOutput();
t.WriteTo(output, includeNamespace ? ILNameSyntax.TypeName : ILNameSyntax.ShortTypeName);
type.WriteTo(output, includeNamespace ? ILNameSyntax.TypeName : ILNameSyntax.ShortTypeName);
return output.ToString();
}
}

Loading…
Cancel
Save