In Entity Framework's source code (link) I found this line:
public virtual IRelationalTransaction Transaction
{ get; [param: NotNull] protected set; }
The [param: NotNull]
part looks very strange to me. Any idea what kind of a C# syntax is this? I'm familiar with attributes and param but not this combination.
The definition of NotNull is this:
[AttributeUsage(
AttributeTargets.Method | AttributeTargets.Parameter |
AttributeTargets.Property | AttributeTargets.Delegate |
AttributeTargets.Field)]
internal sealed class NotNullAttribute : Attribute
{
}
Which I expected to be used simply as [NotNull]
but what is param
doing here?