protected override void CacheMetadata(CodeActivityMetadata metadata) { BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right); if (s_operationFunction == null) { ValidationError validationError; if (!BinaryExpressionHelper.TryGenerateLinqDelegate(ExpressionType.Or, out s_operationFunction, out validationError)) { metadata.AddValidationError(validationError); } } }
protected override void CacheMetadata(CodeActivityMetadata metadata) { BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right); if (_checkedOperation) { EnsureOperationFunction(metadata, ref s_checkedOperationFunction, ExpressionType.AddChecked); } else { EnsureOperationFunction(metadata, ref s_uncheckedOperationFunction, ExpressionType.Add); } }
private void EnsureOperationFunction(CodeActivityMetadata metadata, ref Func <TLeft, TRight, TResult> operationFunction, ExpressionType operatorType) { if (operationFunction == null) { ValidationError validationError; if (!BinaryExpressionHelper.TryGenerateLinqDelegate( operatorType, out operationFunction, out validationError)) { metadata.AddValidationError(validationError); } } }