When you mark a method with NotNull , this means that this method returns a non-null object:
[NotNull] public object Get() { return null;
When you mark setter, it does the same - setter returns non-null (because .net converts properties to get and set methods).
public virtual IRelationalTransaction Transaction { get; [NotNull] protected set; }
Equality:
[NotNull] public virtual void set_Transaction(IRelationalTransaction value) { ... }
So, you need to add param: to the point that "i mean - the setter parameter is not null, not the result of the set-method":
public virtual IRelationalTransaction Transaction { get; [param: NotNull] protected set; }
Equality:
public virtual void set_Transaction([NotNull] IRelationalTransaction value) { ... }
Backs Sep 11 '15 at 16:39 2015-09-11 16:39
source share