Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I add a test to allow: new UITextField().EditingDidBegin += _proxy.OnEditingDidBegin; // This should warn, because it is NSObject class UITextFieldProxy : NSObject { // But then we suppressed the warning [UnconditionalSuppressMessage("Memory", "MA0003")] public void OnEditingDidBegin(object sender, EventArgs e) { } } I added code to look up the attribute on the method from this statement: new UITextField().EditingDidBegin += _proxy.OnEditingDidBegin; This also uncovered a bug in the analyzer: --if (attribute.AttributeClass.ContainingNamespace.Name != "System.Diagnostics.CodeAnalysis") ++if (attribute.AttributeClass.ContainingNamespace.ToString() != "System.Diagnostics.CodeAnalysis") In this example `Name` was just `"CodeAnalysis"`. I have no idea why, but using `.ToString()` instead was successful. All tests pass with this change, so I'm going with it.
- Loading branch information