public RuleExecution(RuleValidation validation, object thisObject) { if (validation == null) { throw new ArgumentNullException("validation"); } if (thisObject == null) { throw new ArgumentNullException("thisObject"); } if (validation.ThisType != thisObject.GetType()) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Messages.ValidationMismatch, new object[] { RuleDecompiler.DecompileType(validation.ThisType), RuleDecompiler.DecompileType(thisObject.GetType()) })); } this.validation = validation; this.activity = thisObject as System.Workflow.ComponentModel.Activity; this.thisObject = thisObject; this.thisLiteralResult = new RuleLiteralResult(thisObject); }