|
|
|
|
@ -21,37 +21,7 @@ using Mono.Cecil;
@@ -21,37 +21,7 @@ using Mono.Cecil;
|
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.ILSpy.TreeNodes.Analyzer |
|
|
|
|
{ |
|
|
|
|
internal sealed class AnalyzedPropertyAccessorsTreeNode : AnalyzerTreeNode |
|
|
|
|
{ |
|
|
|
|
public AnalyzedPropertyAccessorsTreeNode(PropertyDefinition analyzedProperty) |
|
|
|
|
{ |
|
|
|
|
if (analyzedProperty == null) |
|
|
|
|
throw new ArgumentNullException("analyzedProperty"); |
|
|
|
|
|
|
|
|
|
if (analyzedProperty.GetMethod != null) |
|
|
|
|
this.Children.Add(new AnalyzedPropertyAccessorTreeNode(analyzedProperty.GetMethod, "get")); |
|
|
|
|
if (analyzedProperty.SetMethod != null) |
|
|
|
|
this.Children.Add(new AnalyzedPropertyAccessorTreeNode(analyzedProperty.SetMethod, "set")); |
|
|
|
|
foreach (var accessor in analyzedProperty.OtherMethods) |
|
|
|
|
this.Children.Add(new AnalyzedPropertyAccessorTreeNode(accessor, null)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override object Icon |
|
|
|
|
{ |
|
|
|
|
get { return Images.Search; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override object Text |
|
|
|
|
{ |
|
|
|
|
get { return "Accessors"; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static bool CanShow(PropertyDefinition property) |
|
|
|
|
{ |
|
|
|
|
return !MainWindow.Instance.CurrentLanguage.ShowMember(property.GetMethod ?? property.SetMethod); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class AnalyzedPropertyAccessorTreeNode : AnalyzedMethodTreeNode |
|
|
|
|
internal class AnalyzedPropertyAccessorTreeNode : AnalyzedMethodTreeNode |
|
|
|
|
{ |
|
|
|
|
private readonly string name; |
|
|
|
|
|
|
|
|
|
@ -67,4 +37,3 @@ namespace ICSharpCode.ILSpy.TreeNodes.Analyzer
@@ -67,4 +37,3 @@ namespace ICSharpCode.ILSpy.TreeNodes.Analyzer
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |