CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Rules.AuthorizationRuleAsync Class Referenceabstract

Base class providing basic authorization rule implementation. More...

Inheritance diagram for Csla.Rules.AuthorizationRuleAsync:
Csla.Rules.IAuthorizationRuleAsync Csla.Rules.IAuthorizationRuleBase

Public Member Functions

 AuthorizationRuleAsync (AuthorizationActions action)
 Creates an instance of the rule.
 AuthorizationRuleAsync (AuthorizationActions action, IMemberInfo element)
 Creates an instance of the rule.

Protected Member Functions

Task ExecuteAsync (IAuthorizationContext context, CancellationToken ct)
 Authorization rule implementation.
object? ReadProperty (object obj, IPropertyInfo propertyInfo)
 Reads a property's field value.

Properties

bool CacheResult [get, protected set]
 Gets a value indicating whether the results of this rule can be cached at the business object level.
IMemberInfoElement [get, set]
 Gets the name of the element (property/method) to which this rule is associated.
AuthorizationActions Action [get, set]
 Gets the authorization action this rule will enforce.

Detailed Description

Base class providing basic authorization rule implementation.

Constructor & Destructor Documentation

◆ AuthorizationRuleAsync() [1/2]

Csla.Rules.AuthorizationRuleAsync.AuthorizationRuleAsync ( AuthorizationActions action)
inline

Creates an instance of the rule.

Parameters
actionAction this rule will enforce.

◆ AuthorizationRuleAsync() [2/2]

Csla.Rules.AuthorizationRuleAsync.AuthorizationRuleAsync ( AuthorizationActions action,
IMemberInfo element )
inline

Creates an instance of the rule.

Parameters
actionAction this rule will enforce.
elementMethod or property.
Exceptions
ArgumentNullExceptionelement is null.

Member Function Documentation

◆ ExecuteAsync()

Task Csla.Rules.AuthorizationRuleAsync.ExecuteAsync ( IAuthorizationContext context,
CancellationToken ct )
abstractprotected

Authorization rule implementation.

Parameters
contextRule context object.
ctThe cancellation token.

Implements Csla.Rules.IAuthorizationRuleAsync.

◆ ReadProperty()

object? Csla.Rules.AuthorizationRuleAsync.ReadProperty ( object obj,
IPropertyInfo propertyInfo )
inlineprotected

Reads a property's field value.

Parameters
objObject on which to call the method.
propertyInfoPropertyInfo object containing property metadata.

No authorization checks occur when this method is called.

Exceptions
ArgumentNullExceptionobj or propertyInfo is null.

Property Documentation

◆ Action

AuthorizationActions Csla.Rules.AuthorizationRuleAsync.Action
getset

Gets the authorization action this rule will enforce.

Implements Csla.Rules.IAuthorizationRuleBase.

◆ CacheResult

bool Csla.Rules.AuthorizationRuleAsync.CacheResult
getprotected set

Gets a value indicating whether the results of this rule can be cached at the business object level.

Returns
bool, true by default to allow cache result.

Implements Csla.Rules.IAuthorizationRuleBase.

◆ Element

IMemberInfo? Csla.Rules.AuthorizationRuleAsync.Element
getset

Gets the name of the element (property/method) to which this rule is associated.

Implements Csla.Rules.IAuthorizationRuleBase.


The documentation for this class was generated from the following file: