9using System.Collections.Generic;
24 private bool _cacheResult =
true;
25 private bool _locked =
false;
60 get {
return _cacheResult; }
63 CanWriteProperty(
"CacheResult");
74 get {
return _element; }
77 CanWriteProperty(
"Element");
87 get {
return _action; }
90 CanWriteProperty(
"Action");
95 private void CanWriteProperty(
string argument)
101 #region IAuthorizationRule
103 void IAuthorizationRule.Execute(IAuthorizationContext context)
126 #region Read Property
140 var target = obj as Core.IManageProperties;
142 return target.ReadProperty(propertyInfo);
A strongly-typed resource class, for looking up localized strings, etc.
static string IManagePropertiesRequiredException
Looks up a localized string similar to Target object must implement IManageProperties.
static string PropertySetNotAllowed
Looks up a localized string similar to Property set not allowed.
Base class providing basic authorization rule implementation.
object ReadProperty(object obj, Csla.Core.IPropertyInfo propertyInfo)
Reads a property's field value.
abstract void Execute(IAuthorizationContext context)
Authorization rule implementation.
AuthorizationRule(AuthorizationActions action, Csla.Core.IMemberInfo element)
Creates an instance of the rule.
bool CacheResult
Gets a value indicating whether the results of this rule can be cached at the business object level.
Csla.Core.IMemberInfo Element
Gets the name of the element (property/method) to which this rule is associated.
AuthorizationActions Action
Gets the authorization action this rule will enforce.
AuthorizationRule(AuthorizationActions action)
Creates an instance of the rule.
Maintains metadata about a method or property.
Maintains metadata about a property.
Implemented by objects which provide context information to an authorization rule when it is invoked.
Interface defining an authorization rule implementation.
AuthorizationActions
Authorization actions.