|
|
|
@ -72,6 +72,10 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
@@ -72,6 +72,10 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
|
|
|
|
|
var attr = member.Attributes.FirstOrDefault(a => a.AttributeType.Name == "ObsoleteAttribute" && a.AttributeType.Namespace == "System"); |
|
|
|
|
if (attr == null) |
|
|
|
|
return; |
|
|
|
|
var message = attr.PositionalArguments.SingleOrDefault(arg => !arg.IsError && arg.ConstantValue is string); |
|
|
|
|
if (message != null) |
|
|
|
|
AddIssue(new CodeIssue(nodeToMark, string.Format(ctx.TranslateString("'{0}' is obsolete: '{1}'"), member.FullName, message.ConstantValue))); |
|
|
|
|
else |
|
|
|
|
AddIssue(new CodeIssue(nodeToMark, string.Format(ctx.TranslateString("'{0}' is obsolete"), member.FullName))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|