Skip to content

Commit

Permalink
Add new flag for ByRefLike constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
jbevain committed May 21, 2024
1 parent dff01d9 commit 385578f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Mono.Cecil/GenericParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ public bool HasDefaultConstructorConstraint {
set { attributes = attributes.SetAttributes ((ushort) GenericParameterAttributes.DefaultConstructorConstraint, value); }
}

public bool HasAcceptByRefLikeConstraint {
get { return attributes.GetAttributes ((ushort) GenericParameterAttributes.AcceptByRefLikeConstraint); }
set { attributes = attributes.SetAttributes ((ushort) GenericParameterAttributes.AcceptByRefLikeConstraint, value); }
}

#endregion

public GenericParameter (IGenericParameterProvider owner)
Expand Down
3 changes: 2 additions & 1 deletion Mono.Cecil/GenericParameterAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public enum GenericParameterAttributes : ushort {
SpecialConstraintMask = 0x001c,
ReferenceTypeConstraint = 0x0004,
NotNullableValueTypeConstraint = 0x0008,
DefaultConstructorConstraint = 0x0010
DefaultConstructorConstraint = 0x0010,
AcceptByRefLikeConstraint = 0x0020,
}
}

0 comments on commit 385578f

Please sign in to comment.