Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

RuleWriteAttribute Class

Indicates that a property or field is written by the method or property that this attribute is applied to. This information is used by the rules engine to determine dependencies between rules.This class cannot be inherited.

Namespace: System.Workflow.Activities.Rules
Assembly: System.Workflow.Activities (in system.workflow.activities.dll)

[AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple=true)] 
public sealed class RuleWriteAttribute : RuleReadWriteAttribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple=true) */ 
public final class RuleWriteAttribute extends RuleReadWriteAttribute
AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple=true) 
public final class RuleWriteAttribute extends RuleReadWriteAttribute
Not applicable.

This attribute is used to support a forward chaining model that will cause the reevaluation of rules based on changes to fields and properties. The RuleReadAttribute and RuleWriteAttribute indicate the properties read or written by the property or method the attribute is applied to. RuleInvokeAttributes are used to indicate that this property or method uses other methods, which need to also be checked for dependencies.

The following code example demonstrates proper usage of the RuleWriteAttribute.

The following code snippet shows how to indicate a write to a parameter:

[RuleWrite("helper/SomeProperty", RuleAttributeTarget.Parameter)]
public void DoSomethingElse(HelperClass helper)
{
helper.SomeProperty = 3;
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.