public static ArgumentException FunctionWithSameNameAndSignatureAlreadyInCollection(string paramName, FunctionBinding functionBinding) { if (paramName == null) { throw new ArgumentNullException("paramName"); } if (functionBinding == null) { throw new ArgumentNullException("functionBinding"); } StringBuilder sb = new StringBuilder(); sb.Append(functionBinding.Name); sb.Append("("); FormattingHelpers.FormatTypeList(functionBinding.GetParameterTypes()); sb.Append(")"); string signature = sb.ToString(); string message = String.Format(CultureInfo.CurrentCulture, Resources.FunctionWithSameNameAndSignatureAlreadyInCollection, signature); return(new ArgumentException(message, paramName)); }
void IErrorReporter.UnterminatedParenthesizedIdentifier(SourceLocation location, string tokenText) { string message = String.Format(CultureInfo.CurrentCulture, Resources.UnterminatedParenthesizedIdentifier, FormattingHelpers.GetFirstLine(tokenText)); HandleError(CreateSourceRange(location), ErrorId.UnterminatedParenthesizedIdentifier, message); }
void IErrorReporter.InvalidDataTypeInUnion(Type expressionType, BinaryQueryOperator unionOperator) { string unionOperatorString = unionOperator.ToString().ToUpper(CultureInfo.CurrentCulture); string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidDataTypeInUnion, FormattingHelpers.FormatType(expressionType), unionOperatorString); HandleError(ErrorId.InvalidDataTypeInUnion, message); }
void IErrorReporter.InvalidDataTypeInOrderBy(Type expressionType) { string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidDataTypeInOrderBy, FormattingHelpers.FormatType(expressionType)); HandleError(ErrorId.InvalidDataTypeInOrderBy, message); }
void IErrorReporter.AggregateDoesNotSupportType(AggregateBinding aggregateBinding, Type argumentType) { string message = String.Format(CultureInfo.CurrentCulture, Resources.AggregateDoesNotSupportType, aggregateBinding.Name, FormattingHelpers.FormatType(argumentType)); HandleError(ErrorId.AggregateDoesNotSupportType, message); }
void IErrorReporter.CannotCast(ExpressionNode expression, Type targetType) { string message = String.Format(CultureInfo.CurrentCulture, Resources.CannotCast, expression.GenerateSource(), FormattingHelpers.FormatType(expression.ExpressionType), FormattingHelpers.FormatType(targetType)); HandleError(ErrorId.CannotCast, message); }
void IErrorReporter.WhenMustEvaluateToBoolIfCaseInputIsOmitted(ExpressionNode whenExpression) { string message = String.Format(CultureInfo.CurrentCulture, Resources.WhenMustEvaluateToBoolIfCaseInputIsOmitted, whenExpression.GenerateSource(), FormattingHelpers.FormatType(typeof(bool))); HandleError(ErrorId.WhenMustEvaluateToBoolIfCaseInputIsOmitted, message); }
void IErrorReporter.AmbiguousOperator(CastingOperatorType castingOperatorType, MethodInfo targetFromSource, MethodInfo sourceToTarget) { string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousCastingOperator, castingOperatorType, FormattingHelpers.FormatMethodInfo(targetFromSource), FormattingHelpers.FormatMethodInfo(sourceToTarget)); HandleError(ErrorId.AmbiguousCastingOperator, message); }
void IErrorReporter.CannotApplyOperator(UnaryOperator op, Type type) { string message = String.Format(CultureInfo.CurrentCulture, Resources.CannotApplyUnaryOp, op.TokenText, FormattingHelpers.FormatType(type)); HandleError(ErrorId.CannotApplyUnaryOperator, message); }
void IErrorReporter.AmbiguousInvocation(InvocableBinding function1, InvocableBinding function2, Type[] argumentTypes) { if (argumentTypes.Length == 0) { string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousInvocationNoArgs, function1.GetFullName(), function2.GetFullName()); HandleError(ErrorId.AmbiguousInvocation, message); } else { string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousInvocation, function1.GetFullName(), function2.GetFullName(), FormattingHelpers.FormatTypeList(argumentTypes)); HandleError(ErrorId.AmbiguousInvocation, message); } }
void IErrorReporter.AmbiguousType(string typeReference, Type[] candidates) { string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousType, typeReference, FormattingHelpers.FormatFullyQualifiedTypeList(candidates)); HandleError(ErrorId.AmbiguousType, message); }
void IErrorReporter.AmbiguousProperty(SourceRange sourceRange, Identifier identifier, PropertyBinding[] candidates) { string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousProperty, identifier, FormattingHelpers.FormatBindingList(candidates)); HandleError(sourceRange, ErrorId.AmbiguousProperty, message); }
void IErrorReporter.AmbiguousReference(SourceRange sourceRange, Identifier identifier, Binding[] candidates) { string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousReference, identifier, FormattingHelpers.FormatBindingListWithCategory(candidates)); HandleError(sourceRange, ErrorId.AmbiguousReference, message); }
void IErrorReporter.UndeclaredProperty(SourceRange sourceRange, Type type, Identifier identifier) { string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredProperty, FormattingHelpers.FormatType(type), identifier); HandleError(sourceRange, ErrorId.UndeclaredProperty, message); }
void IErrorReporter.UndeclaredMethod(SourceRange sourceRange, Type declaringType, Identifier identifier, Type[] parameterTypes) { string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredMethod, declaringType.Name, identifier, FormattingHelpers.FormatTypeList(parameterTypes)); HandleError(sourceRange, ErrorId.UndeclaredMethod, message); }