public void SomeIteratorWithNullArgument() { Action act = () => ReSharper.SuppressUnusedWarning(_instance.SomeIterator(null /*Expect:AssignNullToNotNullAttribute[MIn]*/)); act.ShouldThrow <ArgumentNullException>("throws immediately => no ForceIteration needed") .And.ParamName.Should().Be("str"); }
public void SomeIteratorWithManualNullCheckWithNullArgument() { Action act = () => ReSharper.SuppressUnusedWarning(_instance.SomeIteratorWithManualNullCheck(null /*Expect:AssignNullToNotNullAttribute[MIn]*/)); act.ShouldNotThrow("no iteration"); }
partial void PartialMethodWithImplementation(string a) => ReSharper.SuppressUnusedWarning(a);
public void Method <T>(string a /* no warning */) { ReSharper.SuppressUnusedWarning(typeof(T)); }
public GeneratedCodeOnMember/*Expect:NotNullMemberIsNotInitialized[InclGenCode]*/ (string a) { ReSharper.SuppressUnusedWarning(a); }
public void Consume() { ReSharper.SuppressUnusedWarning(ControlInXaml); }
public void ImplicitNotNullRefParameterInInterfaceCanBeNullInDerived( [CanBeNull] /*Expect:AnnotationConflictInHierarchy[Implicit]*/ ref string a) { ReSharper.SuppressUnusedWarning(a); }
public void CanBeNullRefParameterInInterfaceImplicitNotNullInDerived(ref string a /*Expect:ImplicitNotNullConflictInHierarchy[Implicit]*/) { ReSharper.SuppressUnusedWarning(a); a = null; }
public void CanBeNullRefParameterInInterfaceExplicitNotNullInDerived([NotNull] /*Expect:AnnotationConflictInHierarchy*/ ref string a) { ReSharper.SuppressUnusedWarning(a); a = null /*Expect:AssignNullToNotNullAttribute*/; }