CSLA.NET
6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
BusinessRule.cs
Go to the documentation of this file.
1
//-----------------------------------------------------------------------
2
// <copyright file="BusinessRule.cs" company="Marimer LLC">
3
// Copyright (c) Marimer LLC. All rights reserved.
4
// Website: https://cslanet.com
5
// </copyright>
6
// <summary>Base class used to create business and validation</summary>
7
//-----------------------------------------------------------------------
8
namespace
Csla.Rules
9
{
14
public
abstract
class
BusinessRule
:
BusinessRuleBase
,
IBusinessRule
15
{
16
private
bool
_isAsync;
17
22
public
override
bool
IsAsync
23
{
24
get
{
return
_isAsync; }
25
protected
set
26
{
27
CanWriteProperty
(
"IsAsync"
);
28
_isAsync = value;
29
}
30
}
31
36
protected
BusinessRule
()
37
: this(null)
38
{ }
39
45
protected
BusinessRule
(
Csla
.
Core
.
IPropertyInfo
primaryProperty)
46
: base(primaryProperty)
47
{ }
48
53
protected
virtual
void
Execute
(
IRuleContext
context)
54
{ }
55
56
void
IBusinessRule
.
Execute
(
IRuleContext
context)
57
{
58
PropertiesLocked
=
true
;
59
Execute
(context);
60
}
61
}
62
}
Csla.Rules.BusinessRuleBase
Base class used to create business and validation rules.
Definition:
BusinessRuleBase.cs:19
Csla.Rules.BusinessRuleBase.CanWriteProperty
void CanWriteProperty(string argument)
Allows or blocks changing a property value.
Definition:
BusinessRuleBase.cs:134
Csla.Rules.BusinessRuleBase.PropertiesLocked
bool PropertiesLocked
Gets or sets a value indicating whether property values should be locked because an async operation i...
Definition:
BusinessRuleBase.cs:31
Csla.Rules.BusinessRule
Base class used to create business and validation rules.
Definition:
BusinessRule.cs:15
Csla.Rules.BusinessRule.BusinessRule
BusinessRule()
Creates an instance of the rule that applies to a business object as a whole.
Definition:
BusinessRule.cs:36
Csla.Rules.BusinessRule.Execute
virtual void Execute(IRuleContext context)
Business or validation rule implementation.
Definition:
BusinessRule.cs:53
Csla.Rules.BusinessRule.BusinessRule
BusinessRule(Csla.Core.IPropertyInfo primaryProperty)
Creates an instance of the rule that applies to a specfic property.
Definition:
BusinessRule.cs:45
Csla.Rules.BusinessRule.IsAsync
override bool IsAsync
Gets a value indicating whether the rule will run on a background thread.
Definition:
BusinessRule.cs:23
Csla.Core.IPropertyInfo
Maintains metadata about a property.
Definition:
Csla/Core/IPropertyInfo.cs:16
Csla.Rules.IBusinessRule
Interface defining a business/validation rule implementation.
Definition:
IBusinessRule.cs:92
Csla.Rules.IBusinessRule.Execute
void Execute(IRuleContext context)
Business or validation rule implementation.
Csla.Rules.IRuleContext
Context information provided to a business rule when it is invoked.
Definition:
IRuleContext.cs:22
Csla.Core
Definition:
AddedNewEventArgs.cs:11
Csla.Rules
Definition:
AddObjectAuthorizationRulesContext.cs:11
Csla
Definition:
BusinessRuleCases.cs:5
Generated by
1.9.2