protected override void Execute(Rules.IRuleContext context) { #pragma warning disable CS0436 // Type conflicts with imported type // TODO: Not sure how to replicate this functionality in Csla 6 // ((LocationBusinessBase)context.Target).Rule = ApplicationContext.LogicalExecutionLocation.ToString(); #pragma warning restore CS0436 // Type conflicts with imported type }
protected override void Execute(Rules.IRuleContext context) { var target = (T)context.Target; if (target.ChildList.Count < 1) { context.AddErrorResult("At least one item required"); } }
protected override void Execute(Rules.IRuleContext context) { var v1 = (string)context.InputPropertyValues[PrimaryProperty]; var v2 = (string)context.InputPropertyValues[SecondaryProperty]; if (string.IsNullOrEmpty(v1) || string.IsNullOrEmpty(v2)) { context.AddErrorResult(string.Format("v1:{0}, v2:{1}", v1, v2)); } }
protected override void Execute(Rules.IRuleContext context) { if (context.InputPropertyValues.ContainsKey(PrimaryProperty)) { context.AddErrorResult("PrimaryProperty has value."); } else { context.AddErrorResult("PrimaryProperty does not exist."); } }
protected override void Execute(Rules.IRuleContext context) { context.AddInformationResult("Always info"); }
protected override void Execute(Rules.IRuleContext context) { context.AddErrorResult("Always error"); }
protected override void Execute(Rules.IRuleContext context) { context.AddWarningResult("Always warns"); }
protected override void Execute(Rules.IRuleContext context) { throw new InvalidOperationException(); }
protected override void Execute(Rules.IRuleContext context) { base.Execute(context); }
protected override void Execute(Rules.IRuleContext context) { #pragma warning disable CS0436 // Type conflicts with imported type ((LocationBusinessBase)context.Target).Rule = Csla.ApplicationContext.LogicalExecutionLocation.ToString(); #pragma warning restore CS0436 // Type conflicts with imported type }
protected override void Execute(Rules.IRuleContext context) { context.AddErrorResult("Bad rule"); }
protected override void Execute(Rules.IRuleContext context) { ((LocationBusinessBase)context.Target).Rule = Csla.ApplicationContext.LogicalExecutionLocation.ToString(); }