Constable Authorization Engine 2.0 BETA

PropertyRuleCollection.AddNew Method (String, String)

[This is preliminary documentation and subject to change.]

Creates and adds a new PropertyRule object to the collection for the given propertyId, roleId and the one state defined for the containing AuthorizationPolicy instance.

[Visual Basic]
Overloads Public Function AddNew( _
   ByVal propertyId As String, _
   ByVal roleId As String _
) As PropertyRule
[C#]
public PropertyRule AddNew(
   string propertyId,
   string roleId
);

Parameters

propertyId
The Id of the property to be associated with the new PropertyRule.
roleId
The Id of the role to be associated with the new PropertyRule.

Return Value

A reference to the newly created PropertyRule.

Remarks

This overload is available only if the containing AuthorizationPolicy instance has exactly one state defined.

Exceptions

Exception Type Condition
InvalidOperationException The containing AuthorizationPolicy doesn't have exactly one state defined.

See Also

PropertyRuleCollection Class | LaMarvin.Constable.Model Namespace | PropertyRuleCollection.AddNew Overload List