1 /* ****************************************************************************
3 * Copyright (c) Microsoft Corporation.
5 * This source code is subject to terms and conditions of the Microsoft Public License. A
6 * copy of the license can be found in the License.html file at the root of this distribution. If
7 * you cannot locate the Microsoft Public License, please send an email to
8 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
9 * by the terms of the Microsoft Public License.
11 * You must not remove this notice, or any other, from this software.
14 * ***************************************************************************/
15 using System; using Microsoft;
19 namespace System.Linq.Expressions {
21 namespace Microsoft.Linq.Expressions {
24 internal static partial class Strings {
25 private static string FormatString(string format, params object[] args) {
26 return string.Format(System.Globalization.CultureInfo.CurrentCulture, format, args);
30 #region Generated Exception Factory
32 // *** BEGIN GENERATED CODE ***
33 // generated by function: gen_expr_factory_core from: generate_exception_factory.py
36 /// Strongly-typed and parameterized string factory.
39 internal static partial class Strings {
41 /// A string like "Method precondition violated"
43 internal static string MethodPreconditionViolated {
45 return "Method precondition violated";
50 /// A string like "Invalid argument value"
52 internal static string InvalidArgumentValue {
54 return "Invalid argument value";
59 /// A string like "Non-empty collection required"
61 internal static string NonEmptyCollectionRequired {
63 return "Non-empty collection required";
68 /// A string like "Argument count must be greater than number of named arguments."
70 internal static string ArgCntMustBeGreaterThanNameCnt {
72 return "Argument count must be greater than number of named arguments.";
77 /// A string like "reducible nodes must override Expression.Reduce()"
79 internal static string ReducibleMustOverrideReduce {
81 return "reducible nodes must override Expression.Reduce()";
86 /// A string like "node cannot reduce to itself or null"
88 internal static string MustReduceToDifferent {
90 return "node cannot reduce to itself or null";
95 /// A string like "cannot assign from the reduced node type to the original node type"
97 internal static string ReducedNotCompatible {
99 return "cannot assign from the reduced node type to the original node type";
104 /// A string like "Setter must have parameters."
106 internal static string SetterHasNoParams {
108 return "Setter must have parameters.";
113 /// A string like "Property cannot have a managed pointer type."
115 internal static string PropertyCannotHaveRefType {
117 return "Property cannot have a managed pointer type.";
122 /// A string like "Indexing parameters of getter and setter must match."
124 internal static string IndexesOfSetGetMustMatch {
126 return "Indexing parameters of getter and setter must match.";
131 /// A string like "Accessor method should not have VarArgs."
133 internal static string AccessorsCannotHaveVarArgs {
135 return "Accessor method should not have VarArgs.";
140 /// A string like "Accessor indexes cannot be passed ByRef."
142 internal static string AccessorsCannotHaveByRefArgs {
144 return "Accessor indexes cannot be passed ByRef.";
149 /// A string like "Bounds count cannot be less than 1"
151 internal static string BoundsCannotBeLessThanOne {
153 return "Bounds count cannot be less than 1";
158 /// A string like "type must not be ByRef"
160 internal static string TypeMustNotBeByRef {
162 return "type must not be ByRef";
167 /// A string like "Type doesn't have constructor with a given signature"
169 internal static string TypeDoesNotHaveConstructorForTheSignature {
171 return "Type doesn't have constructor with a given signature";
176 /// A string like "Count must be non-negative."
178 internal static string CountCannotBeNegative {
180 return "Count must be non-negative.";
185 /// A string like "arrayType must be an array type"
187 internal static string ArrayTypeMustBeArray {
189 return "arrayType must be an array type";
194 /// A string like "Setter should have void type."
196 internal static string SetterMustBeVoid {
198 return "Setter should have void type.";
203 /// A string like "Property type must match the value type of setter"
205 internal static string PropertyTyepMustMatchSetter {
207 return "Property type must match the value type of setter";
212 /// A string like "Both accessors must be static."
214 internal static string BothAccessorsMustBeStatic {
216 return "Both accessors must be static.";
221 /// A string like "Static field requires null instance, non-static field requires non-null instance."
223 internal static string OnlyStaticFieldsHaveNullInstance {
225 return "Static field requires null instance, non-static field requires non-null instance.";
230 /// A string like "Static property requires null instance, non-static property requires non-null instance."
232 internal static string OnlyStaticPropertiesHaveNullInstance {
234 return "Static property requires null instance, non-static property requires non-null instance.";
239 /// A string like "Static method requires null instance, non-static method requires non-null instance."
241 internal static string OnlyStaticMethodsHaveNullInstance {
243 return "Static method requires null instance, non-static method requires non-null instance.";
248 /// A string like "Property cannot have a void type."
250 internal static string PropertyTypeCannotBeVoid {
252 return "Property cannot have a void type.";
257 /// A string like "Can only unbox from an object or interface type to a value type."
259 internal static string InvalidUnboxType {
261 return "Can only unbox from an object or interface type to a value type.";
266 /// A string like "Expression must be readable"
268 internal static string ExpressionMustBeReadable {
270 return "Expression must be readable";
275 /// A string like "Expression must be writeable"
277 internal static string ExpressionMustBeWriteable {
279 return "Expression must be writeable";
284 /// A string like "Argument must not have a value type."
286 internal static string ArgumentMustNotHaveValueType {
288 return "Argument must not have a value type.";
293 /// A string like "must be reducible node"
295 internal static string MustBeReducible {
297 return "must be reducible node";
302 /// A string like "All test values must have the same type."
304 internal static string AllTestValuesMustHaveSameType {
306 return "All test values must have the same type.";
311 /// A string like "All case bodies and the default body must have the same type."
313 internal static string AllCaseBodiesMustHaveSameType {
315 return "All case bodies and the default body must have the same type.";
320 /// A string like "Default body must be supplied if case bodies are not System.Void."
322 internal static string DefaultBodyMustBeSupplied {
324 return "Default body must be supplied if case bodies are not System.Void.";
329 /// A string like "MethodBuilder does not have a valid TypeBuilder"
331 internal static string MethodBuilderDoesNotHaveTypeBuilder {
333 return "MethodBuilder does not have a valid TypeBuilder";
338 /// A string like "Type must be derived from System.Delegate"
340 internal static string TypeMustBeDerivedFromSystemDelegate {
342 return "Type must be derived from System.Delegate";
347 /// A string like "Argument type cannot be void"
349 internal static string ArgumentTypeCannotBeVoid {
351 return "Argument type cannot be void";
356 /// A string like "Label type must be System.Void if an expression is not supplied"
358 internal static string LabelMustBeVoidOrHaveExpression {
360 return "Label type must be System.Void if an expression is not supplied";
365 /// A string like "Type must be System.Void for this label argument"
367 internal static string LabelTypeMustBeVoid {
369 return "Type must be System.Void for this label argument";
374 /// A string like "Quoted expression must be a lambda"
376 internal static string QuotedExpressionMustBeLambda {
378 return "Quoted expression must be a lambda";
383 /// A string like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables."
385 internal static string VariableMustNotBeByRef(object p0, object p1) {
386 return FormatString("Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables.", p0, p1);
390 /// A string like "Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object."
392 internal static string DuplicateVariable(object p0) {
393 return FormatString("Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object.", p0);
397 /// A string like "Start and End must be well ordered"
399 internal static string StartEndMustBeOrdered {
401 return "Start and End must be well ordered";
406 /// A string like "fault cannot be used with catch or finally clauses"
408 internal static string FaultCannotHaveCatchOrFinally {
410 return "fault cannot be used with catch or finally clauses";
415 /// A string like "try must have at least one catch, finally, or fault clause"
417 internal static string TryMustHaveCatchFinallyOrFault {
419 return "try must have at least one catch, finally, or fault clause";
424 /// A string like "Body of catch must have the same type as body of try."
426 internal static string BodyOfCatchMustHaveSameTypeAsBodyOfTry {
428 return "Body of catch must have the same type as body of try.";
433 /// A string like "Extension node must override the property {0}."
435 internal static string ExtensionNodeMustOverrideProperty(object p0) {
436 return FormatString("Extension node must override the property {0}.", p0);
440 /// A string like "User-defined operator method '{0}' must be static."
442 internal static string UserDefinedOperatorMustBeStatic(object p0) {
443 return FormatString("User-defined operator method '{0}' must be static.", p0);
447 /// A string like "User-defined operator method '{0}' must not be void."
449 internal static string UserDefinedOperatorMustNotBeVoid(object p0) {
450 return FormatString("User-defined operator method '{0}' must not be void.", p0);
454 /// A string like "No coercion operator is defined between types '{0}' and '{1}'."
456 internal static string CoercionOperatorNotDefined(object p0, object p1) {
457 return FormatString("No coercion operator is defined between types '{0}' and '{1}'.", p0, p1);
461 /// A string like "The result type '{0}' of the dynamic binding produced by binder '{1}' is not compatible with the result type '{2}' expected by the call site."
463 internal static string DynamicBinderResultNotAssignable(object p0, object p1, object p2) {
464 return FormatString("The result type '{0}' of the dynamic binding produced by binder '{1}' is not compatible with the result type '{2}' expected by the call site.", p0, p1, p2);
468 /// A string like "The result type '{0}' of the dynamic binding produced by the object with type '{1}' for the binder '{2}' is not compatible with the result type '{3}' expected by the call site."
470 internal static string DynamicObjectResultNotAssignable(object p0, object p1, object p2, object p3) {
471 return FormatString("The result type '{0}' of the dynamic binding produced by the object with type '{1}' for the binder '{2}' is not compatible with the result type '{3}' expected by the call site.", p0, p1, p2, p3);
475 /// A string like "The result of the dynamic binding produced by the object with type '{0}' for the binder '{1}' needs at least one restriction."
477 internal static string DynamicBindingNeedsRestrictions(object p0, object p1) {
478 return FormatString("The result of the dynamic binding produced by the object with type '{0}' for the binder '{1}' needs at least one restriction.", p0, p1);
482 /// A string like "The result type '{0}' of the binder '{1}' is not compatible with the result type '{2}' expected by the call site."
484 internal static string BinderNotCompatibleWithCallSite(object p0, object p1, object p2) {
485 return FormatString("The result type '{0}' of the binder '{1}' is not compatible with the result type '{2}' expected by the call site.", p0, p1, p2);
489 /// A string like "The unary operator {0} is not defined for the type '{1}'."
491 internal static string UnaryOperatorNotDefined(object p0, object p1) {
492 return FormatString("The unary operator {0} is not defined for the type '{1}'.", p0, p1);
496 /// A string like "The binary operator {0} is not defined for the types '{1}' and '{2}'."
498 internal static string BinaryOperatorNotDefined(object p0, object p1, object p2) {
499 return FormatString("The binary operator {0} is not defined for the types '{1}' and '{2}'.", p0, p1, p2);
503 /// A string like "Reference equality is not defined for the types '{0}' and '{1}'."
505 internal static string ReferenceEqualityNotDefined(object p0, object p1) {
506 return FormatString("Reference equality is not defined for the types '{0}' and '{1}'.", p0, p1);
510 /// A string like "The operands for operator '{0}' do not match the parameters of method '{1}'."
512 internal static string OperandTypesDoNotMatchParameters(object p0, object p1) {
513 return FormatString("The operands for operator '{0}' do not match the parameters of method '{1}'.", p0, p1);
517 /// A string like "The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'."
519 internal static string OverloadOperatorTypeDoesNotMatchConversionType(object p0, object p1) {
520 return FormatString("The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'.", p0, p1);
524 /// A string like "Conversion is not supported for arithmetic types without operator overloading."
526 internal static string ConversionIsNotSupportedForArithmeticTypes {
528 return "Conversion is not supported for arithmetic types without operator overloading.";
533 /// A string like "Argument must be array"
535 internal static string ArgumentMustBeArray {
537 return "Argument must be array";
542 /// A string like "Argument must be boolean"
544 internal static string ArgumentMustBeBoolean {
546 return "Argument must be boolean";
551 /// A string like "The user-defined equality method '{0}' must return a boolean value."
553 internal static string EqualityMustReturnBoolean(object p0) {
554 return FormatString("The user-defined equality method '{0}' must return a boolean value.", p0);
558 /// A string like "Argument must be either a FieldInfo or PropertyInfo"
560 internal static string ArgumentMustBeFieldInfoOrPropertInfo {
562 return "Argument must be either a FieldInfo or PropertyInfo";
567 /// A string like "Argument must be either a FieldInfo, PropertyInfo or MethodInfo"
569 internal static string ArgumentMustBeFieldInfoOrPropertInfoOrMethod {
571 return "Argument must be either a FieldInfo, PropertyInfo or MethodInfo";
576 /// A string like "Argument must be an instance member"
578 internal static string ArgumentMustBeInstanceMember {
580 return "Argument must be an instance member";
585 /// A string like "Argument must be of an integer type"
587 internal static string ArgumentMustBeInteger {
589 return "Argument must be of an integer type";
594 /// A string like "Argument for array index must be of type Int32"
596 internal static string ArgumentMustBeArrayIndexType {
598 return "Argument for array index must be of type Int32";
603 /// A string like "Argument must be single dimensional array type"
605 internal static string ArgumentMustBeSingleDimensionalArrayType {
607 return "Argument must be single dimensional array type";
612 /// A string like "Argument types do not match"
614 internal static string ArgumentTypesMustMatch {
616 return "Argument types do not match";
621 /// A string like "Cannot auto initialize elements of value type through property '{0}', use assignment instead"
623 internal static string CannotAutoInitializeValueTypeElementThroughProperty(object p0) {
624 return FormatString("Cannot auto initialize elements of value type through property '{0}', use assignment instead", p0);
628 /// A string like "Cannot auto initialize members of value type through property '{0}', use assignment instead"
630 internal static string CannotAutoInitializeValueTypeMemberThroughProperty(object p0) {
631 return FormatString("Cannot auto initialize members of value type through property '{0}', use assignment instead", p0);
635 /// A string like "The type used in TypeAs Expression must be of reference or nullable type, {0} is neither"
637 internal static string IncorrectTypeForTypeAs(object p0) {
638 return FormatString("The type used in TypeAs Expression must be of reference or nullable type, {0} is neither", p0);
642 /// A string like "Coalesce used with type that cannot be null"
644 internal static string CoalesceUsedOnNonNullType {
646 return "Coalesce used with type that cannot be null";
651 /// A string like "An expression of type '{0}' cannot be used to initialize an array of type '{1}'"
653 internal static string ExpressionTypeCannotInitializeArrayType(object p0, object p1) {
654 return FormatString("An expression of type '{0}' cannot be used to initialize an array of type '{1}'", p0, p1);
658 /// A string like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'"
660 internal static string ExpressionTypeDoesNotMatchConstructorParameter(object p0, object p1) {
661 return FormatString("Expression of type '{0}' cannot be used for constructor parameter of type '{1}'", p0, p1);
665 /// A string like " Argument type '{0}' does not match the corresponding member type '{1}'"
667 internal static string ArgumentTypeDoesNotMatchMember(object p0, object p1) {
668 return FormatString(" Argument type '{0}' does not match the corresponding member type '{1}'", p0, p1);
672 /// A string like " The member '{0}' is not declared on type '{1}' being created"
674 internal static string ArgumentMemberNotDeclOnType(object p0, object p1) {
675 return FormatString(" The member '{0}' is not declared on type '{1}' being created", p0, p1);
679 /// A string like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'"
681 internal static string ExpressionTypeDoesNotMatchMethodParameter(object p0, object p1, object p2) {
682 return FormatString("Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'", p0, p1, p2);
686 /// A string like "Expression of type '{0}' cannot be used for parameter of type '{1}'"
688 internal static string ExpressionTypeDoesNotMatchParameter(object p0, object p1) {
689 return FormatString("Expression of type '{0}' cannot be used for parameter of type '{1}'", p0, p1);
693 /// A string like "Expression of type '{0}' cannot be used for return type '{1}'"
695 internal static string ExpressionTypeDoesNotMatchReturn(object p0, object p1) {
696 return FormatString("Expression of type '{0}' cannot be used for return type '{1}'", p0, p1);
700 /// A string like "Expression of type '{0}' cannot be used for assignment to type '{1}'"
702 internal static string ExpressionTypeDoesNotMatchAssignment(object p0, object p1) {
703 return FormatString("Expression of type '{0}' cannot be used for assignment to type '{1}'", p0, p1);
707 /// A string like "Expression of type '{0}' cannot be used for label of type '{1}'"
709 internal static string ExpressionTypeDoesNotMatchLabel(object p0, object p1) {
710 return FormatString("Expression of type '{0}' cannot be used for label of type '{1}'", p0, p1);
714 /// A string like "Expression of type '{0}' cannot be invoked"
716 internal static string ExpressionTypeNotInvocable(object p0) {
717 return FormatString("Expression of type '{0}' cannot be invoked", p0);
721 /// A string like "Field '{0}' is not defined for type '{1}'"
723 internal static string FieldNotDefinedForType(object p0, object p1) {
724 return FormatString("Field '{0}' is not defined for type '{1}'", p0, p1);
728 /// A string like "Instance field '{0}' is not defined for type '{1}'"
730 internal static string InstanceFieldNotDefinedForType(object p0, object p1) {
731 return FormatString("Instance field '{0}' is not defined for type '{1}'", p0, p1);
735 /// A string like "Field '{0}.{1}' is not defined for type '{2}'"
737 internal static string FieldInfoNotDefinedForType(object p0, object p1, object p2) {
738 return FormatString("Field '{0}.{1}' is not defined for type '{2}'", p0, p1, p2);
742 /// A string like "Incorrect number of indexes"
744 internal static string IncorrectNumberOfIndexes {
746 return "Incorrect number of indexes";
751 /// A string like "Incorrect number of arguments supplied for lambda invocation"
753 internal static string IncorrectNumberOfLambdaArguments {
755 return "Incorrect number of arguments supplied for lambda invocation";
760 /// A string like "Incorrect number of parameters supplied for lambda declaration"
762 internal static string IncorrectNumberOfLambdaDeclarationParameters {
764 return "Incorrect number of parameters supplied for lambda declaration";
769 /// A string like "Incorrect number of arguments supplied for call to method '{0}'"
771 internal static string IncorrectNumberOfMethodCallArguments(object p0) {
772 return FormatString("Incorrect number of arguments supplied for call to method '{0}'", p0);
776 /// A string like "Incorrect number of arguments for constructor"
778 internal static string IncorrectNumberOfConstructorArguments {
780 return "Incorrect number of arguments for constructor";
785 /// A string like " Incorrect number of members for constructor"
787 internal static string IncorrectNumberOfMembersForGivenConstructor {
789 return " Incorrect number of members for constructor";
794 /// A string like "Incorrect number of arguments for the given members "
796 internal static string IncorrectNumberOfArgumentsForMembers {
798 return "Incorrect number of arguments for the given members ";
803 /// A string like "Lambda type parameter must be derived from System.Delegate"
805 internal static string LambdaTypeMustBeDerivedFromSystemDelegate {
807 return "Lambda type parameter must be derived from System.Delegate";
812 /// A string like "Member '{0}' not field or property"
814 internal static string MemberNotFieldOrProperty(object p0) {
815 return FormatString("Member '{0}' not field or property", p0);
819 /// A string like "Method {0} contains generic parameters"
821 internal static string MethodContainsGenericParameters(object p0) {
822 return FormatString("Method {0} contains generic parameters", p0);
826 /// A string like "Method {0} is a generic method definition"
828 internal static string MethodIsGeneric(object p0) {
829 return FormatString("Method {0} is a generic method definition", p0);
833 /// A string like "The method '{0}.{1}' is not a property accessor"
835 internal static string MethodNotPropertyAccessor(object p0, object p1) {
836 return FormatString("The method '{0}.{1}' is not a property accessor", p0, p1);
840 /// A string like "The property '{0}' has no 'get' accessor"
842 internal static string PropertyDoesNotHaveGetter(object p0) {
843 return FormatString("The property '{0}' has no 'get' accessor", p0);
847 /// A string like "The property '{0}' has no 'set' accessor"
849 internal static string PropertyDoesNotHaveSetter(object p0) {
850 return FormatString("The property '{0}' has no 'set' accessor", p0);
854 /// A string like "The property '{0}' has no 'get' or 'set' accessors"
856 internal static string PropertyDoesNotHaveAccessor(object p0) {
857 return FormatString("The property '{0}' has no 'get' or 'set' accessors", p0);
861 /// A string like "'{0}' is not a member of type '{1}'"
863 internal static string NotAMemberOfType(object p0, object p1) {
864 return FormatString("'{0}' is not a member of type '{1}'", p0, p1);
868 /// A string like "The operator '{0}' is not implemented for type '{1}'"
870 internal static string OperatorNotImplementedForType(object p0, object p1) {
871 return FormatString("The operator '{0}' is not implemented for type '{1}'", p0, p1);
875 /// A string like "ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'"
877 internal static string ParameterExpressionNotValidAsDelegate(object p0, object p1) {
878 return FormatString("ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'", p0, p1);
882 /// A string like "Property '{0}' is not defined for type '{1}'"
884 internal static string PropertyNotDefinedForType(object p0, object p1) {
885 return FormatString("Property '{0}' is not defined for type '{1}'", p0, p1);
889 /// A string like "Instance property '{0}' is not defined for type '{1}'"
891 internal static string InstancePropertyNotDefinedForType(object p0, object p1) {
892 return FormatString("Instance property '{0}' is not defined for type '{1}'", p0, p1);
896 /// A string like "Instance property '{0}' that takes no argument is not defined for type '{1}'"
898 internal static string InstancePropertyWithoutParameterNotDefinedForType(object p0, object p1) {
899 return FormatString("Instance property '{0}' that takes no argument is not defined for type '{1}'", p0, p1);
903 /// A string like "Instance property '{0}{1}' is not defined for type '{2}'"
905 internal static string InstancePropertyWithSpecifiedParametersNotDefinedForType(object p0, object p1, object p2) {
906 return FormatString("Instance property '{0}{1}' is not defined for type '{2}'", p0, p1, p2);
910 /// A string like "Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'"
912 internal static string InstanceAndMethodTypeMismatch(object p0, object p1, object p2) {
913 return FormatString("Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'", p0, p1, p2);
917 /// A string like "Type {0} contains generic parameters"
919 internal static string TypeContainsGenericParameters(object p0) {
920 return FormatString("Type {0} contains generic parameters", p0);
924 /// A string like "Type {0} is a generic type definition"
926 internal static string TypeIsGeneric(object p0) {
927 return FormatString("Type {0} is a generic type definition", p0);
931 /// A string like "Type '{0}' does not have a default constructor"
933 internal static string TypeMissingDefaultConstructor(object p0) {
934 return FormatString("Type '{0}' does not have a default constructor", p0);
938 /// A string like "List initializers must contain at least one initializer"
940 internal static string ListInitializerWithZeroMembers {
942 return "List initializers must contain at least one initializer";
947 /// A string like "Element initializer method must be named 'Add'"
949 internal static string ElementInitializerMethodNotAdd {
951 return "Element initializer method must be named 'Add'";
956 /// A string like "Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter"
958 internal static string ElementInitializerMethodNoRefOutParam(object p0, object p1) {
959 return FormatString("Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter", p0, p1);
963 /// A string like "Element initializer method must have at least 1 parameter"
965 internal static string ElementInitializerMethodWithZeroArgs {
967 return "Element initializer method must have at least 1 parameter";
972 /// A string like "Element initializer method must be an instance method"
974 internal static string ElementInitializerMethodStatic {
976 return "Element initializer method must be an instance method";
981 /// A string like "Type '{0}' is not IEnumerable"
983 internal static string TypeNotIEnumerable(object p0) {
984 return FormatString("Type '{0}' is not IEnumerable", p0);
988 /// A string like "Type parameter is {0}. Expected a delegate."
990 internal static string TypeParameterIsNotDelegate(object p0) {
991 return FormatString("Type parameter is {0}. Expected a delegate.", p0);
995 /// A string like "Unexpected coalesce operator."
997 internal static string UnexpectedCoalesceOperator {
999 return "Unexpected coalesce operator.";
1004 /// A string like "Cannot cast from type '{0}' to type '{1}"
1006 internal static string InvalidCast(object p0, object p1) {
1007 return FormatString("Cannot cast from type '{0}' to type '{1}", p0, p1);
1011 /// A string like "Unhandled binary: {0}"
1013 internal static string UnhandledBinary(object p0) {
1014 return FormatString("Unhandled binary: {0}", p0);
1018 /// A string like "Unhandled binding "
1020 internal static string UnhandledBinding {
1022 return "Unhandled binding ";
1027 /// A string like "Unhandled Binding Type: {0}"
1029 internal static string UnhandledBindingType(object p0) {
1030 return FormatString("Unhandled Binding Type: {0}", p0);
1034 /// A string like "Unhandled convert: {0}"
1036 internal static string UnhandledConvert(object p0) {
1037 return FormatString("Unhandled convert: {0}", p0);
1041 /// A string like "Unhandled Expression Type: {0}"
1043 internal static string UnhandledExpressionType(object p0) {
1044 return FormatString("Unhandled Expression Type: {0}", p0);
1048 /// A string like "Unhandled unary: {0}"
1050 internal static string UnhandledUnary(object p0) {
1051 return FormatString("Unhandled unary: {0}", p0);
1055 /// A string like "Unknown binding type"
1057 internal static string UnknownBindingType {
1059 return "Unknown binding type";
1064 /// A string like "The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types."
1066 internal static string UserDefinedOpMustHaveConsistentTypes(object p0, object p1) {
1067 return FormatString("The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types.", p0, p1);
1071 /// A string like "The user-defined operator method '{1}' for operator '{0}' must return the same type as its parameter or a derived type."
1073 internal static string UserDefinedOpMustHaveValidReturnType(object p0, object p1) {
1074 return FormatString("The user-defined operator method '{1}' for operator '{0}' must return the same type as its parameter or a derived type.", p0, p1);
1078 /// A string like "The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators."
1080 internal static string LogicalOperatorMustHaveBooleanOperators(object p0, object p1) {
1081 return FormatString("The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators.", p0, p1);
1085 /// A string like "No method '{0}' exists on type '{1}'."
1087 internal static string MethodDoesNotExistOnType(object p0, object p1) {
1088 return FormatString("No method '{0}' exists on type '{1}'.", p0, p1);
1092 /// A string like "No method '{0}' on type '{1}' is compatible with the supplied arguments."
1094 internal static string MethodWithArgsDoesNotExistOnType(object p0, object p1) {
1095 return FormatString("No method '{0}' on type '{1}' is compatible with the supplied arguments.", p0, p1);
1099 /// A string like "No generic method '{0}' on type '{1}' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. "
1101 internal static string GenericMethodWithArgsDoesNotExistOnType(object p0, object p1) {
1102 return FormatString("No generic method '{0}' on type '{1}' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. ", p0, p1);
1106 /// A string like "More than one method '{0}' on type '{1}' is compatible with the supplied arguments."
1108 internal static string MethodWithMoreThanOneMatch(object p0, object p1) {
1109 return FormatString("More than one method '{0}' on type '{1}' is compatible with the supplied arguments.", p0, p1);
1113 /// A string like "More than one property '{0}' on type '{1}' is compatible with the supplied arguments."
1115 internal static string PropertyWithMoreThanOneMatch(object p0, object p1) {
1116 return FormatString("More than one property '{0}' on type '{1}' is compatible with the supplied arguments.", p0, p1);
1120 /// A string like "An incorrect number of type args were specified for the declaration of a Func type."
1122 internal static string IncorrectNumberOfTypeArgsForFunc {
1124 return "An incorrect number of type args were specified for the declaration of a Func type.";
1129 /// A string like "An incorrect number of type args were specified for the declaration of an Action type."
1131 internal static string IncorrectNumberOfTypeArgsForAction {
1133 return "An incorrect number of type args were specified for the declaration of an Action type.";
1138 /// A string like "Argument type cannot be System.Void."
1140 internal static string ArgumentCannotBeOfTypeVoid {
1142 return "Argument type cannot be System.Void.";
1147 /// A string like "More than one key matching '{0}' was found in the ExpandoObject."
1149 internal static string AmbiguousMatchInExpandoObject(object p0) {
1150 return FormatString("More than one key matching '{0}' was found in the ExpandoObject.", p0);
1154 /// A string like "An element with the same key '{0}' already exists in the ExpandoObject."
1156 internal static string SameKeyExistsInExpando(object p0) {
1157 return FormatString("An element with the same key '{0}' already exists in the ExpandoObject.", p0);
1161 /// A string like "The specified key '{0}' does not exist in the ExpandoObject."
1163 internal static string KeyDoesNotExistInExpando(object p0) {
1164 return FormatString("The specified key '{0}' does not exist in the ExpandoObject.", p0);
1168 /// A string like "No or Invalid rule produced"
1170 internal static string NoOrInvalidRuleProduced {
1172 return "No or Invalid rule produced";
1177 /// A string like "First argument of delegate must be CallSite"
1179 internal static string FirstArgumentMustBeCallSite {
1181 return "First argument of delegate must be CallSite";
1186 /// A string like "Bind cannot return null."
1188 internal static string BindingCannotBeNull {
1190 return "Bind cannot return null.";
1195 /// A string like "Invalid operation: '{0}'"
1197 internal static string InvalidOperation(object p0) {
1198 return FormatString("Invalid operation: '{0}'", p0);
1202 /// A string like "{0} must be greater than or equal to {1}"
1204 internal static string OutOfRange(object p0, object p1) {
1205 return FormatString("{0} must be greater than or equal to {1}", p0, p1);
1209 /// A string like "Queue empty."
1211 internal static string QueueEmpty {
1213 return "Queue empty.";
1218 /// A string like "Cannot redefine label '{0}' in an inner block."
1220 internal static string LabelTargetAlreadyDefined(object p0) {
1221 return FormatString("Cannot redefine label '{0}' in an inner block.", p0);
1225 /// A string like "Cannot jump to undefined label '{0}'."
1227 internal static string LabelTargetUndefined(object p0) {
1228 return FormatString("Cannot jump to undefined label '{0}'.", p0);
1232 /// A string like "Control cannot leave a finally block."
1234 internal static string ControlCannotLeaveFinally {
1236 return "Control cannot leave a finally block.";
1241 /// A string like "Control cannot leave a filter test."
1243 internal static string ControlCannotLeaveFilterTest {
1245 return "Control cannot leave a filter test.";
1250 /// A string like "Cannot jump to ambiguous label '{0}'."
1252 internal static string AmbiguousJump(object p0) {
1253 return FormatString("Cannot jump to ambiguous label '{0}'.", p0);
1257 /// A string like "Control cannot enter a try block."
1259 internal static string ControlCannotEnterTry {
1261 return "Control cannot enter a try block.";
1266 /// A string like "Control cannot enter an expression--only statements can be jumped into."
1268 internal static string ControlCannotEnterExpression {
1270 return "Control cannot enter an expression--only statements can be jumped into.";
1275 /// A string like "Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values."
1277 internal static string NonLocalJumpWithValue(object p0) {
1278 return FormatString("Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values.", p0);
1282 /// A string like "Extension should have been reduced."
1284 internal static string ExtensionNotReduced {
1286 return "Extension should have been reduced.";
1291 /// A string like "CompileToMethod cannot compile constant '{0}' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value."
1293 internal static string CannotCompileConstant(object p0) {
1294 return FormatString("CompileToMethod cannot compile constant '{0}' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value.", p0);
1298 /// A string like "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite."
1300 internal static string CannotCompileDynamic {
1302 return "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite.";
1307 /// A string like "Invalid lvalue for assignment: {0}."
1309 internal static string InvalidLvalue(object p0) {
1310 return FormatString("Invalid lvalue for assignment: {0}.", p0);
1314 /// A string like "Invalid member type: {0}."
1316 internal static string InvalidMemberType(object p0) {
1317 return FormatString("Invalid member type: {0}.", p0);
1321 /// A string like "unknown lift type: '{0}'."
1323 internal static string UnknownLiftType(object p0) {
1324 return FormatString("unknown lift type: '{0}'.", p0);
1328 /// A string like "Invalid output directory."
1330 internal static string InvalidOutputDir {
1332 return "Invalid output directory.";
1337 /// A string like "Invalid assembly name or file extension."
1339 internal static string InvalidAsmNameOrExtension {
1341 return "Invalid assembly name or file extension.";
1346 /// A string like "Collection is read-only."
1348 internal static string CollectionReadOnly {
1350 return "Collection is read-only.";
1355 /// A string like "Cannot create instance of {0} because it contains generic parameters"
1357 internal static string IllegalNewGenericParams(object p0) {
1358 return FormatString("Cannot create instance of {0} because it contains generic parameters", p0);
1362 /// A string like "variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined"
1364 internal static string UndefinedVariable(object p0, object p1, object p2) {
1365 return FormatString("variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined", p0, p1, p2);
1369 /// A string like "Cannot close over byref parameter '{0}' referenced in lambda '{1}'"
1371 internal static string CannotCloseOverByRef(object p0, object p1) {
1372 return FormatString("Cannot close over byref parameter '{0}' referenced in lambda '{1}'", p0, p1);
1376 /// A string like "Unexpected VarArgs call to method '{0}'"
1378 internal static string UnexpectedVarArgsCall(object p0) {
1379 return FormatString("Unexpected VarArgs call to method '{0}'", p0);
1383 /// A string like "Rethrow statement is valid only inside a Catch block."
1385 internal static string RethrowRequiresCatch {
1387 return "Rethrow statement is valid only inside a Catch block.";
1392 /// A string like "Try expression is not allowed inside a filter body."
1394 internal static string TryNotAllowedInFilter {
1396 return "Try expression is not allowed inside a filter body.";
1401 /// A string like "When called from '{0}', rewriting a node of type '{1}' must return a non-null value of the same type. Alternatively, override '{2}' and change it to not visit children of this type."
1403 internal static string MustRewriteToSameNode(object p0, object p1, object p2) {
1404 return FormatString("When called from '{0}', rewriting a node of type '{1}' must return a non-null value of the same type. Alternatively, override '{2}' and change it to not visit children of this type.", p0, p1, p2);
1408 /// A string like "Rewriting child expression from type '{0}' to type '{1}' is not allowed, because it would change the meaning of the operation. If this is intentional, override '{2}' and change it to allow this rewrite."
1410 internal static string MustRewriteChildToSameType(object p0, object p1, object p2) {
1411 return FormatString("Rewriting child expression from type '{0}' to type '{1}' is not allowed, because it would change the meaning of the operation. If this is intentional, override '{2}' and change it to allow this rewrite.", p0, p1, p2);
1415 /// A string like "Rewritten expression calls operator method '{0}', but the original node had no operator method. If this is is intentional, override '{1}' and change it to allow this rewrite."
1417 internal static string MustRewriteWithoutMethod(object p0, object p1) {
1418 return FormatString("Rewritten expression calls operator method '{0}', but the original node had no operator method. If this is is intentional, override '{1}' and change it to allow this rewrite.", p0, p1);
1422 /// A string like "The value null is not of type '{0}' and cannot be used in this collection."
1424 internal static string InvalidNullValue(object p0) {
1425 return FormatString("The value null is not of type '{0}' and cannot be used in this collection.", p0);
1429 /// A string like "The value '{0}' is not of type '{1}' and cannot be used in this collection."
1431 internal static string InvalidObjectType(object p0, object p1) {
1432 return FormatString("The value '{0}' is not of type '{1}' and cannot be used in this collection.", p0, p1);
1436 /// A string like "TryExpression is not supported as an argument to method '{0}' because it has an argument with by-ref type. Construct the tree so the TryExpression is not nested inside of this expression."
1438 internal static string TryNotSupportedForMethodsWithRefArgs(object p0) {
1439 return FormatString("TryExpression is not supported as an argument to method '{0}' because it has an argument with by-ref type. Construct the tree so the TryExpression is not nested inside of this expression.", p0);
1443 /// A string like "TryExpression is not supported as a child expression when accessing a member on type '{0}' because it is a value type. Construct the tree so the TryExpression is not nested inside of this expression."
1445 internal static string TryNotSupportedForValueTypeInstances(object p0) {
1446 return FormatString("TryExpression is not supported as a child expression when accessing a member on type '{0}' because it is a value type. Construct the tree so the TryExpression is not nested inside of this expression.", p0);
1450 /// A string like "Collection was modified; enumeration operation may not execute."
1452 internal static string CollectionModifiedWhileEnumerating {
1454 return "Collection was modified; enumeration operation may not execute.";
1459 /// A string like "Enumeration has either not started or has already finished."
1461 internal static string EnumerationIsDone {
1463 return "Enumeration has either not started or has already finished.";
1468 /// A string like "Dynamic operations can only be performed in homogenous AppDomain."
1470 internal static string HomogenousAppDomainRequired {
1472 return "Dynamic operations can only be performed in homogenous AppDomain.";
1477 /// A string like "Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
1479 internal static string TestValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
1480 return FormatString("Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'", p0, p1);
1484 /// A string like "Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
1486 internal static string SwitchValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
1487 return FormatString("Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'", p0, p1);
1491 /// A string like "An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance."
1493 internal static string InvalidMetaObjectCreated(object p0) {
1494 return FormatString("An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance.", p0);
1499 /// Strongly-typed and parameterized exception factory.
1502 internal static partial class Error {
1504 /// ArgumentException with message like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables."
1506 internal static Exception VariableMustNotBeByRef(object p0, object p1) {
1507 return new ArgumentException(Strings.VariableMustNotBeByRef(p0, p1));
1511 /// ArgumentException with message like "Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object."
1513 internal static Exception DuplicateVariable(object p0) {
1514 return new ArgumentException(Strings.DuplicateVariable(p0));
1518 /// ArgumentException with message like "Start and End must be well ordered"
1520 internal static Exception StartEndMustBeOrdered() {
1521 return new ArgumentException(Strings.StartEndMustBeOrdered);
1525 /// ArgumentException with message like "fault cannot be used with catch or finally clauses"
1527 internal static Exception FaultCannotHaveCatchOrFinally() {
1528 return new ArgumentException(Strings.FaultCannotHaveCatchOrFinally);
1532 /// ArgumentException with message like "try must have at least one catch, finally, or fault clause"
1534 internal static Exception TryMustHaveCatchFinallyOrFault() {
1535 return new ArgumentException(Strings.TryMustHaveCatchFinallyOrFault);
1539 /// ArgumentException with message like "Body of catch must have the same type as body of try."
1541 internal static Exception BodyOfCatchMustHaveSameTypeAsBodyOfTry() {
1542 return new ArgumentException(Strings.BodyOfCatchMustHaveSameTypeAsBodyOfTry);
1546 /// InvalidOperationException with message like "Extension node must override the property {0}."
1548 internal static Exception ExtensionNodeMustOverrideProperty(object p0) {
1549 return new InvalidOperationException(Strings.ExtensionNodeMustOverrideProperty(p0));
1553 /// ArgumentException with message like "User-defined operator method '{0}' must be static."
1555 internal static Exception UserDefinedOperatorMustBeStatic(object p0) {
1556 return new ArgumentException(Strings.UserDefinedOperatorMustBeStatic(p0));
1560 /// ArgumentException with message like "User-defined operator method '{0}' must not be void."
1562 internal static Exception UserDefinedOperatorMustNotBeVoid(object p0) {
1563 return new ArgumentException(Strings.UserDefinedOperatorMustNotBeVoid(p0));
1567 /// InvalidOperationException with message like "No coercion operator is defined between types '{0}' and '{1}'."
1569 internal static Exception CoercionOperatorNotDefined(object p0, object p1) {
1570 return new InvalidOperationException(Strings.CoercionOperatorNotDefined(p0, p1));
1574 /// InvalidCastException with message like "The result type '{0}' of the dynamic binding produced by binder '{1}' is not compatible with the result type '{2}' expected by the call site."
1576 internal static Exception DynamicBinderResultNotAssignable(object p0, object p1, object p2) {
1577 return new InvalidCastException(Strings.DynamicBinderResultNotAssignable(p0, p1, p2));
1581 /// InvalidCastException with message like "The result type '{0}' of the dynamic binding produced by the object with type '{1}' for the binder '{2}' is not compatible with the result type '{3}' expected by the call site."
1583 internal static Exception DynamicObjectResultNotAssignable(object p0, object p1, object p2, object p3) {
1584 return new InvalidCastException(Strings.DynamicObjectResultNotAssignable(p0, p1, p2, p3));
1588 /// InvalidOperationException with message like "The result of the dynamic binding produced by the object with type '{0}' for the binder '{1}' needs at least one restriction."
1590 internal static Exception DynamicBindingNeedsRestrictions(object p0, object p1) {
1591 return new InvalidOperationException(Strings.DynamicBindingNeedsRestrictions(p0, p1));
1595 /// InvalidOperationException with message like "The result type '{0}' of the binder '{1}' is not compatible with the result type '{2}' expected by the call site."
1597 internal static Exception BinderNotCompatibleWithCallSite(object p0, object p1, object p2) {
1598 return new InvalidOperationException(Strings.BinderNotCompatibleWithCallSite(p0, p1, p2));
1602 /// InvalidOperationException with message like "The unary operator {0} is not defined for the type '{1}'."
1604 internal static Exception UnaryOperatorNotDefined(object p0, object p1) {
1605 return new InvalidOperationException(Strings.UnaryOperatorNotDefined(p0, p1));
1609 /// InvalidOperationException with message like "The binary operator {0} is not defined for the types '{1}' and '{2}'."
1611 internal static Exception BinaryOperatorNotDefined(object p0, object p1, object p2) {
1612 return new InvalidOperationException(Strings.BinaryOperatorNotDefined(p0, p1, p2));
1616 /// InvalidOperationException with message like "Reference equality is not defined for the types '{0}' and '{1}'."
1618 internal static Exception ReferenceEqualityNotDefined(object p0, object p1) {
1619 return new InvalidOperationException(Strings.ReferenceEqualityNotDefined(p0, p1));
1623 /// InvalidOperationException with message like "The operands for operator '{0}' do not match the parameters of method '{1}'."
1625 internal static Exception OperandTypesDoNotMatchParameters(object p0, object p1) {
1626 return new InvalidOperationException(Strings.OperandTypesDoNotMatchParameters(p0, p1));
1630 /// InvalidOperationException with message like "The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'."
1632 internal static Exception OverloadOperatorTypeDoesNotMatchConversionType(object p0, object p1) {
1633 return new InvalidOperationException(Strings.OverloadOperatorTypeDoesNotMatchConversionType(p0, p1));
1637 /// InvalidOperationException with message like "Conversion is not supported for arithmetic types without operator overloading."
1639 internal static Exception ConversionIsNotSupportedForArithmeticTypes() {
1640 return new InvalidOperationException(Strings.ConversionIsNotSupportedForArithmeticTypes);
1644 /// ArgumentException with message like "Argument must be array"
1646 internal static Exception ArgumentMustBeArray() {
1647 return new ArgumentException(Strings.ArgumentMustBeArray);
1651 /// ArgumentException with message like "Argument must be boolean"
1653 internal static Exception ArgumentMustBeBoolean() {
1654 return new ArgumentException(Strings.ArgumentMustBeBoolean);
1658 /// ArgumentException with message like "The user-defined equality method '{0}' must return a boolean value."
1660 internal static Exception EqualityMustReturnBoolean(object p0) {
1661 return new ArgumentException(Strings.EqualityMustReturnBoolean(p0));
1665 /// ArgumentException with message like "Argument must be either a FieldInfo or PropertyInfo"
1667 internal static Exception ArgumentMustBeFieldInfoOrPropertInfo() {
1668 return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertInfo);
1672 /// ArgumentException with message like "Argument must be either a FieldInfo, PropertyInfo or MethodInfo"
1674 internal static Exception ArgumentMustBeFieldInfoOrPropertInfoOrMethod() {
1675 return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertInfoOrMethod);
1679 /// ArgumentException with message like "Argument must be an instance member"
1681 internal static Exception ArgumentMustBeInstanceMember() {
1682 return new ArgumentException(Strings.ArgumentMustBeInstanceMember);
1686 /// ArgumentException with message like "Argument must be of an integer type"
1688 internal static Exception ArgumentMustBeInteger() {
1689 return new ArgumentException(Strings.ArgumentMustBeInteger);
1693 /// ArgumentException with message like "Argument for array index must be of type Int32"
1695 internal static Exception ArgumentMustBeArrayIndexType() {
1696 return new ArgumentException(Strings.ArgumentMustBeArrayIndexType);
1700 /// ArgumentException with message like "Argument must be single dimensional array type"
1702 internal static Exception ArgumentMustBeSingleDimensionalArrayType() {
1703 return new ArgumentException(Strings.ArgumentMustBeSingleDimensionalArrayType);
1707 /// ArgumentException with message like "Argument types do not match"
1709 internal static Exception ArgumentTypesMustMatch() {
1710 return new ArgumentException(Strings.ArgumentTypesMustMatch);
1714 /// InvalidOperationException with message like "Cannot auto initialize elements of value type through property '{0}', use assignment instead"
1716 internal static Exception CannotAutoInitializeValueTypeElementThroughProperty(object p0) {
1717 return new InvalidOperationException(Strings.CannotAutoInitializeValueTypeElementThroughProperty(p0));
1721 /// InvalidOperationException with message like "Cannot auto initialize members of value type through property '{0}', use assignment instead"
1723 internal static Exception CannotAutoInitializeValueTypeMemberThroughProperty(object p0) {
1724 return new InvalidOperationException(Strings.CannotAutoInitializeValueTypeMemberThroughProperty(p0));
1728 /// ArgumentException with message like "The type used in TypeAs Expression must be of reference or nullable type, {0} is neither"
1730 internal static Exception IncorrectTypeForTypeAs(object p0) {
1731 return new ArgumentException(Strings.IncorrectTypeForTypeAs(p0));
1735 /// InvalidOperationException with message like "Coalesce used with type that cannot be null"
1737 internal static Exception CoalesceUsedOnNonNullType() {
1738 return new InvalidOperationException(Strings.CoalesceUsedOnNonNullType);
1742 /// InvalidOperationException with message like "An expression of type '{0}' cannot be used to initialize an array of type '{1}'"
1744 internal static Exception ExpressionTypeCannotInitializeArrayType(object p0, object p1) {
1745 return new InvalidOperationException(Strings.ExpressionTypeCannotInitializeArrayType(p0, p1));
1749 /// ArgumentException with message like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'"
1751 internal static Exception ExpressionTypeDoesNotMatchConstructorParameter(object p0, object p1) {
1752 return new ArgumentException(Strings.ExpressionTypeDoesNotMatchConstructorParameter(p0, p1));
1756 /// ArgumentException with message like " Argument type '{0}' does not match the corresponding member type '{1}'"
1758 internal static Exception ArgumentTypeDoesNotMatchMember(object p0, object p1) {
1759 return new ArgumentException(Strings.ArgumentTypeDoesNotMatchMember(p0, p1));
1763 /// ArgumentException with message like " The member '{0}' is not declared on type '{1}' being created"
1765 internal static Exception ArgumentMemberNotDeclOnType(object p0, object p1) {
1766 return new ArgumentException(Strings.ArgumentMemberNotDeclOnType(p0, p1));
1770 /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'"
1772 internal static Exception ExpressionTypeDoesNotMatchMethodParameter(object p0, object p1, object p2) {
1773 return new ArgumentException(Strings.ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2));
1777 /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}'"
1779 internal static Exception ExpressionTypeDoesNotMatchParameter(object p0, object p1) {
1780 return new ArgumentException(Strings.ExpressionTypeDoesNotMatchParameter(p0, p1));
1784 /// ArgumentException with message like "Expression of type '{0}' cannot be used for return type '{1}'"
1786 internal static Exception ExpressionTypeDoesNotMatchReturn(object p0, object p1) {
1787 return new ArgumentException(Strings.ExpressionTypeDoesNotMatchReturn(p0, p1));
1791 /// ArgumentException with message like "Expression of type '{0}' cannot be used for assignment to type '{1}'"
1793 internal static Exception ExpressionTypeDoesNotMatchAssignment(object p0, object p1) {
1794 return new ArgumentException(Strings.ExpressionTypeDoesNotMatchAssignment(p0, p1));
1798 /// ArgumentException with message like "Expression of type '{0}' cannot be used for label of type '{1}'"
1800 internal static Exception ExpressionTypeDoesNotMatchLabel(object p0, object p1) {
1801 return new ArgumentException(Strings.ExpressionTypeDoesNotMatchLabel(p0, p1));
1805 /// ArgumentException with message like "Expression of type '{0}' cannot be invoked"
1807 internal static Exception ExpressionTypeNotInvocable(object p0) {
1808 return new ArgumentException(Strings.ExpressionTypeNotInvocable(p0));
1812 /// ArgumentException with message like "Field '{0}' is not defined for type '{1}'"
1814 internal static Exception FieldNotDefinedForType(object p0, object p1) {
1815 return new ArgumentException(Strings.FieldNotDefinedForType(p0, p1));
1819 /// ArgumentException with message like "Instance field '{0}' is not defined for type '{1}'"
1821 internal static Exception InstanceFieldNotDefinedForType(object p0, object p1) {
1822 return new ArgumentException(Strings.InstanceFieldNotDefinedForType(p0, p1));
1826 /// ArgumentException with message like "Field '{0}.{1}' is not defined for type '{2}'"
1828 internal static Exception FieldInfoNotDefinedForType(object p0, object p1, object p2) {
1829 return new ArgumentException(Strings.FieldInfoNotDefinedForType(p0, p1, p2));
1833 /// ArgumentException with message like "Incorrect number of indexes"
1835 internal static Exception IncorrectNumberOfIndexes() {
1836 return new ArgumentException(Strings.IncorrectNumberOfIndexes);
1840 /// InvalidOperationException with message like "Incorrect number of arguments supplied for lambda invocation"
1842 internal static Exception IncorrectNumberOfLambdaArguments() {
1843 return new InvalidOperationException(Strings.IncorrectNumberOfLambdaArguments);
1847 /// ArgumentException with message like "Incorrect number of parameters supplied for lambda declaration"
1849 internal static Exception IncorrectNumberOfLambdaDeclarationParameters() {
1850 return new ArgumentException(Strings.IncorrectNumberOfLambdaDeclarationParameters);
1854 /// ArgumentException with message like "Incorrect number of arguments supplied for call to method '{0}'"
1856 internal static Exception IncorrectNumberOfMethodCallArguments(object p0) {
1857 return new ArgumentException(Strings.IncorrectNumberOfMethodCallArguments(p0));
1861 /// ArgumentException with message like "Incorrect number of arguments for constructor"
1863 internal static Exception IncorrectNumberOfConstructorArguments() {
1864 return new ArgumentException(Strings.IncorrectNumberOfConstructorArguments);
1868 /// ArgumentException with message like " Incorrect number of members for constructor"
1870 internal static Exception IncorrectNumberOfMembersForGivenConstructor() {
1871 return new ArgumentException(Strings.IncorrectNumberOfMembersForGivenConstructor);
1875 /// ArgumentException with message like "Incorrect number of arguments for the given members "
1877 internal static Exception IncorrectNumberOfArgumentsForMembers() {
1878 return new ArgumentException(Strings.IncorrectNumberOfArgumentsForMembers);
1882 /// ArgumentException with message like "Lambda type parameter must be derived from System.Delegate"
1884 internal static Exception LambdaTypeMustBeDerivedFromSystemDelegate() {
1885 return new ArgumentException(Strings.LambdaTypeMustBeDerivedFromSystemDelegate);
1889 /// ArgumentException with message like "Member '{0}' not field or property"
1891 internal static Exception MemberNotFieldOrProperty(object p0) {
1892 return new ArgumentException(Strings.MemberNotFieldOrProperty(p0));
1896 /// ArgumentException with message like "Method {0} contains generic parameters"
1898 internal static Exception MethodContainsGenericParameters(object p0) {
1899 return new ArgumentException(Strings.MethodContainsGenericParameters(p0));
1903 /// ArgumentException with message like "Method {0} is a generic method definition"
1905 internal static Exception MethodIsGeneric(object p0) {
1906 return new ArgumentException(Strings.MethodIsGeneric(p0));
1910 /// ArgumentException with message like "The method '{0}.{1}' is not a property accessor"
1912 internal static Exception MethodNotPropertyAccessor(object p0, object p1) {
1913 return new ArgumentException(Strings.MethodNotPropertyAccessor(p0, p1));
1917 /// ArgumentException with message like "The property '{0}' has no 'get' accessor"
1919 internal static Exception PropertyDoesNotHaveGetter(object p0) {
1920 return new ArgumentException(Strings.PropertyDoesNotHaveGetter(p0));
1924 /// ArgumentException with message like "The property '{0}' has no 'set' accessor"
1926 internal static Exception PropertyDoesNotHaveSetter(object p0) {
1927 return new ArgumentException(Strings.PropertyDoesNotHaveSetter(p0));
1931 /// ArgumentException with message like "The property '{0}' has no 'get' or 'set' accessors"
1933 internal static Exception PropertyDoesNotHaveAccessor(object p0) {
1934 return new ArgumentException(Strings.PropertyDoesNotHaveAccessor(p0));
1938 /// ArgumentException with message like "'{0}' is not a member of type '{1}'"
1940 internal static Exception NotAMemberOfType(object p0, object p1) {
1941 return new ArgumentException(Strings.NotAMemberOfType(p0, p1));
1945 /// NotImplementedException with message like "The operator '{0}' is not implemented for type '{1}'"
1947 internal static Exception OperatorNotImplementedForType(object p0, object p1) {
1948 return new NotImplementedException(Strings.OperatorNotImplementedForType(p0, p1));
1952 /// ArgumentException with message like "ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'"
1954 internal static Exception ParameterExpressionNotValidAsDelegate(object p0, object p1) {
1955 return new ArgumentException(Strings.ParameterExpressionNotValidAsDelegate(p0, p1));
1959 /// ArgumentException with message like "Property '{0}' is not defined for type '{1}'"
1961 internal static Exception PropertyNotDefinedForType(object p0, object p1) {
1962 return new ArgumentException(Strings.PropertyNotDefinedForType(p0, p1));
1966 /// ArgumentException with message like "Instance property '{0}' is not defined for type '{1}'"
1968 internal static Exception InstancePropertyNotDefinedForType(object p0, object p1) {
1969 return new ArgumentException(Strings.InstancePropertyNotDefinedForType(p0, p1));
1973 /// ArgumentException with message like "Instance property '{0}' that takes no argument is not defined for type '{1}'"
1975 internal static Exception InstancePropertyWithoutParameterNotDefinedForType(object p0, object p1) {
1976 return new ArgumentException(Strings.InstancePropertyWithoutParameterNotDefinedForType(p0, p1));
1980 /// ArgumentException with message like "Instance property '{0}{1}' is not defined for type '{2}'"
1982 internal static Exception InstancePropertyWithSpecifiedParametersNotDefinedForType(object p0, object p1, object p2) {
1983 return new ArgumentException(Strings.InstancePropertyWithSpecifiedParametersNotDefinedForType(p0, p1, p2));
1987 /// ArgumentException with message like "Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'"
1989 internal static Exception InstanceAndMethodTypeMismatch(object p0, object p1, object p2) {
1990 return new ArgumentException(Strings.InstanceAndMethodTypeMismatch(p0, p1, p2));
1994 /// ArgumentException with message like "Type {0} contains generic parameters"
1996 internal static Exception TypeContainsGenericParameters(object p0) {
1997 return new ArgumentException(Strings.TypeContainsGenericParameters(p0));
2001 /// ArgumentException with message like "Type {0} is a generic type definition"
2003 internal static Exception TypeIsGeneric(object p0) {
2004 return new ArgumentException(Strings.TypeIsGeneric(p0));
2008 /// ArgumentException with message like "Type '{0}' does not have a default constructor"
2010 internal static Exception TypeMissingDefaultConstructor(object p0) {
2011 return new ArgumentException(Strings.TypeMissingDefaultConstructor(p0));
2015 /// ArgumentException with message like "List initializers must contain at least one initializer"
2017 internal static Exception ListInitializerWithZeroMembers() {
2018 return new ArgumentException(Strings.ListInitializerWithZeroMembers);
2022 /// ArgumentException with message like "Element initializer method must be named 'Add'"
2024 internal static Exception ElementInitializerMethodNotAdd() {
2025 return new ArgumentException(Strings.ElementInitializerMethodNotAdd);
2029 /// ArgumentException with message like "Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter"
2031 internal static Exception ElementInitializerMethodNoRefOutParam(object p0, object p1) {
2032 return new ArgumentException(Strings.ElementInitializerMethodNoRefOutParam(p0, p1));
2036 /// ArgumentException with message like "Element initializer method must have at least 1 parameter"
2038 internal static Exception ElementInitializerMethodWithZeroArgs() {
2039 return new ArgumentException(Strings.ElementInitializerMethodWithZeroArgs);
2043 /// ArgumentException with message like "Element initializer method must be an instance method"
2045 internal static Exception ElementInitializerMethodStatic() {
2046 return new ArgumentException(Strings.ElementInitializerMethodStatic);
2050 /// ArgumentException with message like "Type '{0}' is not IEnumerable"
2052 internal static Exception TypeNotIEnumerable(object p0) {
2053 return new ArgumentException(Strings.TypeNotIEnumerable(p0));
2057 /// InvalidOperationException with message like "Type parameter is {0}. Expected a delegate."
2059 internal static Exception TypeParameterIsNotDelegate(object p0) {
2060 return new InvalidOperationException(Strings.TypeParameterIsNotDelegate(p0));
2064 /// InvalidOperationException with message like "Unexpected coalesce operator."
2066 internal static Exception UnexpectedCoalesceOperator() {
2067 return new InvalidOperationException(Strings.UnexpectedCoalesceOperator);
2071 /// InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}"
2073 internal static Exception InvalidCast(object p0, object p1) {
2074 return new InvalidOperationException(Strings.InvalidCast(p0, p1));
2078 /// ArgumentException with message like "Unhandled binary: {0}"
2080 internal static Exception UnhandledBinary(object p0) {
2081 return new ArgumentException(Strings.UnhandledBinary(p0));
2085 /// ArgumentException with message like "Unhandled binding "
2087 internal static Exception UnhandledBinding() {
2088 return new ArgumentException(Strings.UnhandledBinding);
2092 /// ArgumentException with message like "Unhandled Binding Type: {0}"
2094 internal static Exception UnhandledBindingType(object p0) {
2095 return new ArgumentException(Strings.UnhandledBindingType(p0));
2099 /// ArgumentException with message like "Unhandled convert: {0}"
2101 internal static Exception UnhandledConvert(object p0) {
2102 return new ArgumentException(Strings.UnhandledConvert(p0));
2106 /// ArgumentException with message like "Unhandled Expression Type: {0}"
2108 internal static Exception UnhandledExpressionType(object p0) {
2109 return new ArgumentException(Strings.UnhandledExpressionType(p0));
2113 /// ArgumentException with message like "Unhandled unary: {0}"
2115 internal static Exception UnhandledUnary(object p0) {
2116 return new ArgumentException(Strings.UnhandledUnary(p0));
2120 /// ArgumentException with message like "Unknown binding type"
2122 internal static Exception UnknownBindingType() {
2123 return new ArgumentException(Strings.UnknownBindingType);
2127 /// ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types."
2129 internal static Exception UserDefinedOpMustHaveConsistentTypes(object p0, object p1) {
2130 return new ArgumentException(Strings.UserDefinedOpMustHaveConsistentTypes(p0, p1));
2134 /// ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must return the same type as its parameter or a derived type."
2136 internal static Exception UserDefinedOpMustHaveValidReturnType(object p0, object p1) {
2137 return new ArgumentException(Strings.UserDefinedOpMustHaveValidReturnType(p0, p1));
2141 /// ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators."
2143 internal static Exception LogicalOperatorMustHaveBooleanOperators(object p0, object p1) {
2144 return new ArgumentException(Strings.LogicalOperatorMustHaveBooleanOperators(p0, p1));
2148 /// InvalidOperationException with message like "No method '{0}' exists on type '{1}'."
2150 internal static Exception MethodDoesNotExistOnType(object p0, object p1) {
2151 return new InvalidOperationException(Strings.MethodDoesNotExistOnType(p0, p1));
2155 /// InvalidOperationException with message like "No method '{0}' on type '{1}' is compatible with the supplied arguments."
2157 internal static Exception MethodWithArgsDoesNotExistOnType(object p0, object p1) {
2158 return new InvalidOperationException(Strings.MethodWithArgsDoesNotExistOnType(p0, p1));
2162 /// InvalidOperationException with message like "No generic method '{0}' on type '{1}' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. "
2164 internal static Exception GenericMethodWithArgsDoesNotExistOnType(object p0, object p1) {
2165 return new InvalidOperationException(Strings.GenericMethodWithArgsDoesNotExistOnType(p0, p1));
2169 /// InvalidOperationException with message like "More than one method '{0}' on type '{1}' is compatible with the supplied arguments."
2171 internal static Exception MethodWithMoreThanOneMatch(object p0, object p1) {
2172 return new InvalidOperationException(Strings.MethodWithMoreThanOneMatch(p0, p1));
2176 /// InvalidOperationException with message like "More than one property '{0}' on type '{1}' is compatible with the supplied arguments."
2178 internal static Exception PropertyWithMoreThanOneMatch(object p0, object p1) {
2179 return new InvalidOperationException(Strings.PropertyWithMoreThanOneMatch(p0, p1));
2183 /// ArgumentException with message like "An incorrect number of type args were specified for the declaration of a Func type."
2185 internal static Exception IncorrectNumberOfTypeArgsForFunc() {
2186 return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForFunc);
2190 /// ArgumentException with message like "An incorrect number of type args were specified for the declaration of an Action type."
2192 internal static Exception IncorrectNumberOfTypeArgsForAction() {
2193 return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForAction);
2197 /// ArgumentException with message like "Argument type cannot be System.Void."
2199 internal static Exception ArgumentCannotBeOfTypeVoid() {
2200 return new ArgumentException(Strings.ArgumentCannotBeOfTypeVoid);
2204 /// System.Reflection.AmbiguousMatchException with message like "More than one key matching '{0}' was found in the ExpandoObject."
2206 internal static Exception AmbiguousMatchInExpandoObject(object p0) {
2207 return new System.Reflection.AmbiguousMatchException(Strings.AmbiguousMatchInExpandoObject(p0));
2211 /// ArgumentException with message like "An element with the same key '{0}' already exists in the ExpandoObject."
2213 internal static Exception SameKeyExistsInExpando(object p0) {
2214 return new ArgumentException(Strings.SameKeyExistsInExpando(p0));
2218 /// System.Collections.Generic.KeyNotFoundException with message like "The specified key '{0}' does not exist in the ExpandoObject."
2220 internal static Exception KeyDoesNotExistInExpando(object p0) {
2221 return new System.Collections.Generic.KeyNotFoundException(Strings.KeyDoesNotExistInExpando(p0));
2225 /// InvalidOperationException with message like "No or Invalid rule produced"
2227 internal static Exception NoOrInvalidRuleProduced() {
2228 return new InvalidOperationException(Strings.NoOrInvalidRuleProduced);
2232 /// ArgumentException with message like "First argument of delegate must be CallSite"
2234 internal static Exception FirstArgumentMustBeCallSite() {
2235 return new ArgumentException(Strings.FirstArgumentMustBeCallSite);
2239 /// InvalidOperationException with message like "Bind cannot return null."
2241 internal static Exception BindingCannotBeNull() {
2242 return new InvalidOperationException(Strings.BindingCannotBeNull);
2246 /// ArgumentException with message like "Invalid operation: '{0}'"
2248 internal static Exception InvalidOperation(object p0) {
2249 return new ArgumentException(Strings.InvalidOperation(p0));
2253 /// ArgumentOutOfRangeException with message like "{0} must be greater than or equal to {1}"
2255 internal static Exception OutOfRange(object p0, object p1) {
2256 return new ArgumentOutOfRangeException(Strings.OutOfRange(p0, p1));
2260 /// InvalidOperationException with message like "Queue empty."
2262 internal static Exception QueueEmpty() {
2263 return new InvalidOperationException(Strings.QueueEmpty);
2267 /// InvalidOperationException with message like "Cannot redefine label '{0}' in an inner block."
2269 internal static Exception LabelTargetAlreadyDefined(object p0) {
2270 return new InvalidOperationException(Strings.LabelTargetAlreadyDefined(p0));
2274 /// InvalidOperationException with message like "Cannot jump to undefined label '{0}'."
2276 internal static Exception LabelTargetUndefined(object p0) {
2277 return new InvalidOperationException(Strings.LabelTargetUndefined(p0));
2281 /// InvalidOperationException with message like "Control cannot leave a finally block."
2283 internal static Exception ControlCannotLeaveFinally() {
2284 return new InvalidOperationException(Strings.ControlCannotLeaveFinally);
2288 /// InvalidOperationException with message like "Control cannot leave a filter test."
2290 internal static Exception ControlCannotLeaveFilterTest() {
2291 return new InvalidOperationException(Strings.ControlCannotLeaveFilterTest);
2295 /// InvalidOperationException with message like "Cannot jump to ambiguous label '{0}'."
2297 internal static Exception AmbiguousJump(object p0) {
2298 return new InvalidOperationException(Strings.AmbiguousJump(p0));
2302 /// InvalidOperationException with message like "Control cannot enter a try block."
2304 internal static Exception ControlCannotEnterTry() {
2305 return new InvalidOperationException(Strings.ControlCannotEnterTry);
2309 /// InvalidOperationException with message like "Control cannot enter an expression--only statements can be jumped into."
2311 internal static Exception ControlCannotEnterExpression() {
2312 return new InvalidOperationException(Strings.ControlCannotEnterExpression);
2316 /// InvalidOperationException with message like "Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values."
2318 internal static Exception NonLocalJumpWithValue(object p0) {
2319 return new InvalidOperationException(Strings.NonLocalJumpWithValue(p0));
2323 /// InvalidOperationException with message like "Extension should have been reduced."
2325 internal static Exception ExtensionNotReduced() {
2326 return new InvalidOperationException(Strings.ExtensionNotReduced);
2330 /// InvalidOperationException with message like "CompileToMethod cannot compile constant '{0}' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value."
2332 internal static Exception CannotCompileConstant(object p0) {
2333 return new InvalidOperationException(Strings.CannotCompileConstant(p0));
2337 /// NotSupportedException with message like "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite."
2339 internal static Exception CannotCompileDynamic() {
2340 return new NotSupportedException(Strings.CannotCompileDynamic);
2344 /// InvalidOperationException with message like "Invalid lvalue for assignment: {0}."
2346 internal static Exception InvalidLvalue(object p0) {
2347 return new InvalidOperationException(Strings.InvalidLvalue(p0));
2351 /// InvalidOperationException with message like "Invalid member type: {0}."
2353 internal static Exception InvalidMemberType(object p0) {
2354 return new InvalidOperationException(Strings.InvalidMemberType(p0));
2358 /// InvalidOperationException with message like "unknown lift type: '{0}'."
2360 internal static Exception UnknownLiftType(object p0) {
2361 return new InvalidOperationException(Strings.UnknownLiftType(p0));
2365 /// ArgumentException with message like "Invalid output directory."
2367 internal static Exception InvalidOutputDir() {
2368 return new ArgumentException(Strings.InvalidOutputDir);
2372 /// ArgumentException with message like "Invalid assembly name or file extension."
2374 internal static Exception InvalidAsmNameOrExtension() {
2375 return new ArgumentException(Strings.InvalidAsmNameOrExtension);
2379 /// NotSupportedException with message like "Collection is read-only."
2381 internal static Exception CollectionReadOnly() {
2382 return new NotSupportedException(Strings.CollectionReadOnly);
2386 /// ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters"
2388 internal static Exception IllegalNewGenericParams(object p0) {
2389 return new ArgumentException(Strings.IllegalNewGenericParams(p0));
2393 /// InvalidOperationException with message like "variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined"
2395 internal static Exception UndefinedVariable(object p0, object p1, object p2) {
2396 return new InvalidOperationException(Strings.UndefinedVariable(p0, p1, p2));
2400 /// InvalidOperationException with message like "Cannot close over byref parameter '{0}' referenced in lambda '{1}'"
2402 internal static Exception CannotCloseOverByRef(object p0, object p1) {
2403 return new InvalidOperationException(Strings.CannotCloseOverByRef(p0, p1));
2407 /// InvalidOperationException with message like "Unexpected VarArgs call to method '{0}'"
2409 internal static Exception UnexpectedVarArgsCall(object p0) {
2410 return new InvalidOperationException(Strings.UnexpectedVarArgsCall(p0));
2414 /// InvalidOperationException with message like "Rethrow statement is valid only inside a Catch block."
2416 internal static Exception RethrowRequiresCatch() {
2417 return new InvalidOperationException(Strings.RethrowRequiresCatch);
2421 /// InvalidOperationException with message like "Try expression is not allowed inside a filter body."
2423 internal static Exception TryNotAllowedInFilter() {
2424 return new InvalidOperationException(Strings.TryNotAllowedInFilter);
2428 /// InvalidOperationException with message like "When called from '{0}', rewriting a node of type '{1}' must return a non-null value of the same type. Alternatively, override '{2}' and change it to not visit children of this type."
2430 internal static Exception MustRewriteToSameNode(object p0, object p1, object p2) {
2431 return new InvalidOperationException(Strings.MustRewriteToSameNode(p0, p1, p2));
2435 /// InvalidOperationException with message like "Rewriting child expression from type '{0}' to type '{1}' is not allowed, because it would change the meaning of the operation. If this is intentional, override '{2}' and change it to allow this rewrite."
2437 internal static Exception MustRewriteChildToSameType(object p0, object p1, object p2) {
2438 return new InvalidOperationException(Strings.MustRewriteChildToSameType(p0, p1, p2));
2442 /// InvalidOperationException with message like "Rewritten expression calls operator method '{0}', but the original node had no operator method. If this is is intentional, override '{1}' and change it to allow this rewrite."
2444 internal static Exception MustRewriteWithoutMethod(object p0, object p1) {
2445 return new InvalidOperationException(Strings.MustRewriteWithoutMethod(p0, p1));
2449 /// ArgumentNullException with message like "The value null is not of type '{0}' and cannot be used in this collection."
2451 internal static Exception InvalidNullValue(object p0) {
2452 return new ArgumentNullException(Strings.InvalidNullValue(p0));
2456 /// ArgumentException with message like "The value '{0}' is not of type '{1}' and cannot be used in this collection."
2458 internal static Exception InvalidObjectType(object p0, object p1) {
2459 return new ArgumentException(Strings.InvalidObjectType(p0, p1));
2463 /// NotSupportedException with message like "TryExpression is not supported as an argument to method '{0}' because it has an argument with by-ref type. Construct the tree so the TryExpression is not nested inside of this expression."
2465 internal static Exception TryNotSupportedForMethodsWithRefArgs(object p0) {
2466 return new NotSupportedException(Strings.TryNotSupportedForMethodsWithRefArgs(p0));
2470 /// NotSupportedException with message like "TryExpression is not supported as a child expression when accessing a member on type '{0}' because it is a value type. Construct the tree so the TryExpression is not nested inside of this expression."
2472 internal static Exception TryNotSupportedForValueTypeInstances(object p0) {
2473 return new NotSupportedException(Strings.TryNotSupportedForValueTypeInstances(p0));
2477 /// InvalidOperationException with message like "Collection was modified; enumeration operation may not execute."
2479 internal static Exception CollectionModifiedWhileEnumerating() {
2480 return new InvalidOperationException(Strings.CollectionModifiedWhileEnumerating);
2484 /// InvalidOperationException with message like "Enumeration has either not started or has already finished."
2486 internal static Exception EnumerationIsDone() {
2487 return new InvalidOperationException(Strings.EnumerationIsDone);
2491 /// InvalidOperationException with message like "Dynamic operations can only be performed in homogenous AppDomain."
2493 internal static Exception HomogenousAppDomainRequired() {
2494 return new InvalidOperationException(Strings.HomogenousAppDomainRequired);
2498 /// ArgumentException with message like "Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
2500 internal static Exception TestValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
2501 return new ArgumentException(Strings.TestValueTypeDoesNotMatchComparisonMethodParameter(p0, p1));
2505 /// ArgumentException with message like "Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
2507 internal static Exception SwitchValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
2508 return new ArgumentException(Strings.SwitchValueTypeDoesNotMatchComparisonMethodParameter(p0, p1));
2512 /// InvalidOperationException with message like "An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance."
2514 internal static Exception InvalidMetaObjectCreated(object p0) {
2515 return new InvalidOperationException(Strings.InvalidMetaObjectCreated(p0));
2520 // *** END GENERATED CODE ***