AuthorizationRules StopProcessing, CSLA 4 Beta 1

AuthorizationRules StopProcessing, CSLA 4 Beta 1

Old forum URL: forums.lhotka.net/forums/t/8894.aspx


dmnc posted on Friday, May 07, 2010

Hello,

There does not seem to be a way to set the StopProcessing value for a rule.

Maybe the AddErrorResult(), AddWarningResult(), AddInformationResult() methods could be overloaded to accept a StopProcessing parameter.

I have tried to add a rule result to the list of results. As the result list is not lazily initialized in the property getter I get a null reference:

protected override void Execute(RuleContext context)
{
   var errorResult = new RuleResult(context.Rule.RuleName, context.Rule.PrimaryProperty);
   errorResult.StopProcessing = true;
   context.Results.Add(errorResult);
}

Thank you!

RockfordLhotka replied on Friday, May 07, 2010

I'll look into this, thanks!

Copyright (c) Marimer LLC