PageRenderTime 58ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs

http://github.com/IronLanguages/main
C# | 2729 lines | 1267 code | 368 blank | 1094 comment | 0 complexity | ec8699a12ec0e0e7b4bf4d45da92ec62 MD5 | raw file
Possible License(s): CPL-1.0, BSD-3-Clause, ISC, GPL-2.0, MPL-2.0-no-copyleft-exception
  1. /* ****************************************************************************
  2. *
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * This source code is subject to terms and conditions of the Apache License, Version 2.0. 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 Apache License, Version 2.0, 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 Apache License, Version 2.0.
  10. *
  11. * You must not remove this notice, or any other, from this software.
  12. *
  13. *
  14. * ***************************************************************************/
  15. using System;
  16. #if !FEATURE_CORE_DLR
  17. namespace Microsoft.Scripting.Ast {
  18. #else
  19. namespace System.Linq.Expressions {
  20. #endif
  21. internal static partial class Strings {
  22. private static string FormatString(string format, params object[] args) {
  23. return string.Format(System.Globalization.CultureInfo.CurrentCulture, format, args);
  24. }
  25. }
  26. #region Generated Exception Factory
  27. // *** BEGIN GENERATED CODE ***
  28. // generated by function: gen_expr_factory_core from: generate_exception_factory.py
  29. /// <summary>
  30. /// Strongly-typed and parameterized string factory.
  31. /// </summary>
  32. internal static partial class Strings {
  33. /// <summary>
  34. /// A string like "Method precondition violated"
  35. /// </summary>
  36. internal static string MethodPreconditionViolated {
  37. get {
  38. return "Method precondition violated";
  39. }
  40. }
  41. /// <summary>
  42. /// A string like "Invalid argument value"
  43. /// </summary>
  44. internal static string InvalidArgumentValue {
  45. get {
  46. return "Invalid argument value";
  47. }
  48. }
  49. /// <summary>
  50. /// A string like "Non-empty collection required"
  51. /// </summary>
  52. internal static string NonEmptyCollectionRequired {
  53. get {
  54. return "Non-empty collection required";
  55. }
  56. }
  57. /// <summary>
  58. /// A string like "Argument count must be greater than number of named arguments."
  59. /// </summary>
  60. internal static string ArgCntMustBeGreaterThanNameCnt {
  61. get {
  62. return "Argument count must be greater than number of named arguments.";
  63. }
  64. }
  65. /// <summary>
  66. /// A string like "reducible nodes must override Expression.Reduce()"
  67. /// </summary>
  68. internal static string ReducibleMustOverrideReduce {
  69. get {
  70. return "reducible nodes must override Expression.Reduce()";
  71. }
  72. }
  73. /// <summary>
  74. /// A string like "node cannot reduce to itself or null"
  75. /// </summary>
  76. internal static string MustReduceToDifferent {
  77. get {
  78. return "node cannot reduce to itself or null";
  79. }
  80. }
  81. /// <summary>
  82. /// A string like "cannot assign from the reduced node type to the original node type"
  83. /// </summary>
  84. internal static string ReducedNotCompatible {
  85. get {
  86. return "cannot assign from the reduced node type to the original node type";
  87. }
  88. }
  89. /// <summary>
  90. /// A string like "Setter must have parameters."
  91. /// </summary>
  92. internal static string SetterHasNoParams {
  93. get {
  94. return "Setter must have parameters.";
  95. }
  96. }
  97. /// <summary>
  98. /// A string like "Property cannot have a managed pointer type."
  99. /// </summary>
  100. internal static string PropertyCannotHaveRefType {
  101. get {
  102. return "Property cannot have a managed pointer type.";
  103. }
  104. }
  105. /// <summary>
  106. /// A string like "Indexing parameters of getter and setter must match."
  107. /// </summary>
  108. internal static string IndexesOfSetGetMustMatch {
  109. get {
  110. return "Indexing parameters of getter and setter must match.";
  111. }
  112. }
  113. /// <summary>
  114. /// A string like "Accessor method should not have VarArgs."
  115. /// </summary>
  116. internal static string AccessorsCannotHaveVarArgs {
  117. get {
  118. return "Accessor method should not have VarArgs.";
  119. }
  120. }
  121. /// <summary>
  122. /// A string like "Accessor indexes cannot be passed ByRef."
  123. /// </summary>
  124. internal static string AccessorsCannotHaveByRefArgs {
  125. get {
  126. return "Accessor indexes cannot be passed ByRef.";
  127. }
  128. }
  129. /// <summary>
  130. /// A string like "Bounds count cannot be less than 1"
  131. /// </summary>
  132. internal static string BoundsCannotBeLessThanOne {
  133. get {
  134. return "Bounds count cannot be less than 1";
  135. }
  136. }
  137. /// <summary>
  138. /// A string like "type must not be ByRef"
  139. /// </summary>
  140. internal static string TypeMustNotBeByRef {
  141. get {
  142. return "type must not be ByRef";
  143. }
  144. }
  145. /// <summary>
  146. /// A string like "Type doesn't have constructor with a given signature"
  147. /// </summary>
  148. internal static string TypeDoesNotHaveConstructorForTheSignature {
  149. get {
  150. return "Type doesn't have constructor with a given signature";
  151. }
  152. }
  153. /// <summary>
  154. /// A string like "Count must be non-negative."
  155. /// </summary>
  156. internal static string CountCannotBeNegative {
  157. get {
  158. return "Count must be non-negative.";
  159. }
  160. }
  161. /// <summary>
  162. /// A string like "arrayType must be an array type"
  163. /// </summary>
  164. internal static string ArrayTypeMustBeArray {
  165. get {
  166. return "arrayType must be an array type";
  167. }
  168. }
  169. /// <summary>
  170. /// A string like "Setter should have void type."
  171. /// </summary>
  172. internal static string SetterMustBeVoid {
  173. get {
  174. return "Setter should have void type.";
  175. }
  176. }
  177. /// <summary>
  178. /// A string like "Property type must match the value type of setter"
  179. /// </summary>
  180. internal static string PropertyTyepMustMatchSetter {
  181. get {
  182. return "Property type must match the value type of setter";
  183. }
  184. }
  185. /// <summary>
  186. /// A string like "Both accessors must be static."
  187. /// </summary>
  188. internal static string BothAccessorsMustBeStatic {
  189. get {
  190. return "Both accessors must be static.";
  191. }
  192. }
  193. /// <summary>
  194. /// A string like "Static field requires null instance, non-static field requires non-null instance."
  195. /// </summary>
  196. internal static string OnlyStaticFieldsHaveNullInstance {
  197. get {
  198. return "Static field requires null instance, non-static field requires non-null instance.";
  199. }
  200. }
  201. /// <summary>
  202. /// A string like "Static property requires null instance, non-static property requires non-null instance."
  203. /// </summary>
  204. internal static string OnlyStaticPropertiesHaveNullInstance {
  205. get {
  206. return "Static property requires null instance, non-static property requires non-null instance.";
  207. }
  208. }
  209. /// <summary>
  210. /// A string like "Static method requires null instance, non-static method requires non-null instance."
  211. /// </summary>
  212. internal static string OnlyStaticMethodsHaveNullInstance {
  213. get {
  214. return "Static method requires null instance, non-static method requires non-null instance.";
  215. }
  216. }
  217. /// <summary>
  218. /// A string like "Property cannot have a void type."
  219. /// </summary>
  220. internal static string PropertyTypeCannotBeVoid {
  221. get {
  222. return "Property cannot have a void type.";
  223. }
  224. }
  225. /// <summary>
  226. /// A string like "Can only unbox from an object or interface type to a value type."
  227. /// </summary>
  228. internal static string InvalidUnboxType {
  229. get {
  230. return "Can only unbox from an object or interface type to a value type.";
  231. }
  232. }
  233. /// <summary>
  234. /// A string like "Expression must be readable"
  235. /// </summary>
  236. internal static string ExpressionMustBeReadable {
  237. get {
  238. return "Expression must be readable";
  239. }
  240. }
  241. /// <summary>
  242. /// A string like "Expression must be writeable"
  243. /// </summary>
  244. internal static string ExpressionMustBeWriteable {
  245. get {
  246. return "Expression must be writeable";
  247. }
  248. }
  249. /// <summary>
  250. /// A string like "Argument must not have a value type."
  251. /// </summary>
  252. internal static string ArgumentMustNotHaveValueType {
  253. get {
  254. return "Argument must not have a value type.";
  255. }
  256. }
  257. /// <summary>
  258. /// A string like "must be reducible node"
  259. /// </summary>
  260. internal static string MustBeReducible {
  261. get {
  262. return "must be reducible node";
  263. }
  264. }
  265. /// <summary>
  266. /// A string like "All test values must have the same type."
  267. /// </summary>
  268. internal static string AllTestValuesMustHaveSameType {
  269. get {
  270. return "All test values must have the same type.";
  271. }
  272. }
  273. /// <summary>
  274. /// A string like "All case bodies and the default body must have the same type."
  275. /// </summary>
  276. internal static string AllCaseBodiesMustHaveSameType {
  277. get {
  278. return "All case bodies and the default body must have the same type.";
  279. }
  280. }
  281. /// <summary>
  282. /// A string like "Default body must be supplied if case bodies are not System.Void."
  283. /// </summary>
  284. internal static string DefaultBodyMustBeSupplied {
  285. get {
  286. return "Default body must be supplied if case bodies are not System.Void.";
  287. }
  288. }
  289. /// <summary>
  290. /// A string like "MethodBuilder does not have a valid TypeBuilder"
  291. /// </summary>
  292. internal static string MethodBuilderDoesNotHaveTypeBuilder {
  293. get {
  294. return "MethodBuilder does not have a valid TypeBuilder";
  295. }
  296. }
  297. /// <summary>
  298. /// A string like "Type must be derived from System.Delegate"
  299. /// </summary>
  300. internal static string TypeMustBeDerivedFromSystemDelegate {
  301. get {
  302. return "Type must be derived from System.Delegate";
  303. }
  304. }
  305. /// <summary>
  306. /// A string like "Argument type cannot be void"
  307. /// </summary>
  308. internal static string ArgumentTypeCannotBeVoid {
  309. get {
  310. return "Argument type cannot be void";
  311. }
  312. }
  313. /// <summary>
  314. /// A string like "Label type must be System.Void if an expression is not supplied"
  315. /// </summary>
  316. internal static string LabelMustBeVoidOrHaveExpression {
  317. get {
  318. return "Label type must be System.Void if an expression is not supplied";
  319. }
  320. }
  321. /// <summary>
  322. /// A string like "Type must be System.Void for this label argument"
  323. /// </summary>
  324. internal static string LabelTypeMustBeVoid {
  325. get {
  326. return "Type must be System.Void for this label argument";
  327. }
  328. }
  329. /// <summary>
  330. /// A string like "Quoted expression must be a lambda"
  331. /// </summary>
  332. internal static string QuotedExpressionMustBeLambda {
  333. get {
  334. return "Quoted expression must be a lambda";
  335. }
  336. }
  337. /// <summary>
  338. /// A string like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables."
  339. /// </summary>
  340. internal static string VariableMustNotBeByRef(object p0, object p1) {
  341. return FormatString("Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables.", p0, p1);
  342. }
  343. /// <summary>
  344. /// A string like "Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object."
  345. /// </summary>
  346. internal static string DuplicateVariable(object p0) {
  347. return FormatString("Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object.", p0);
  348. }
  349. /// <summary>
  350. /// A string like "Start and End must be well ordered"
  351. /// </summary>
  352. internal static string StartEndMustBeOrdered {
  353. get {
  354. return "Start and End must be well ordered";
  355. }
  356. }
  357. /// <summary>
  358. /// A string like "fault cannot be used with catch or finally clauses"
  359. /// </summary>
  360. internal static string FaultCannotHaveCatchOrFinally {
  361. get {
  362. return "fault cannot be used with catch or finally clauses";
  363. }
  364. }
  365. /// <summary>
  366. /// A string like "try must have at least one catch, finally, or fault clause"
  367. /// </summary>
  368. internal static string TryMustHaveCatchFinallyOrFault {
  369. get {
  370. return "try must have at least one catch, finally, or fault clause";
  371. }
  372. }
  373. /// <summary>
  374. /// A string like "Body of catch must have the same type as body of try."
  375. /// </summary>
  376. internal static string BodyOfCatchMustHaveSameTypeAsBodyOfTry {
  377. get {
  378. return "Body of catch must have the same type as body of try.";
  379. }
  380. }
  381. /// <summary>
  382. /// A string like "Extension node must override the property {0}."
  383. /// </summary>
  384. internal static string ExtensionNodeMustOverrideProperty(object p0) {
  385. return FormatString("Extension node must override the property {0}.", p0);
  386. }
  387. /// <summary>
  388. /// A string like "User-defined operator method '{0}' must be static."
  389. /// </summary>
  390. internal static string UserDefinedOperatorMustBeStatic(object p0) {
  391. return FormatString("User-defined operator method '{0}' must be static.", p0);
  392. }
  393. /// <summary>
  394. /// A string like "User-defined operator method '{0}' must not be void."
  395. /// </summary>
  396. internal static string UserDefinedOperatorMustNotBeVoid(object p0) {
  397. return FormatString("User-defined operator method '{0}' must not be void.", p0);
  398. }
  399. /// <summary>
  400. /// A string like "No coercion operator is defined between types '{0}' and '{1}'."
  401. /// </summary>
  402. internal static string CoercionOperatorNotDefined(object p0, object p1) {
  403. return FormatString("No coercion operator is defined between types '{0}' and '{1}'.", p0, p1);
  404. }
  405. /// <summary>
  406. /// 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."
  407. /// </summary>
  408. internal static string DynamicBinderResultNotAssignable(object p0, object p1, object p2) {
  409. 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);
  410. }
  411. /// <summary>
  412. /// 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."
  413. /// </summary>
  414. internal static string DynamicObjectResultNotAssignable(object p0, object p1, object p2, object p3) {
  415. 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);
  416. }
  417. /// <summary>
  418. /// 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."
  419. /// </summary>
  420. internal static string DynamicBindingNeedsRestrictions(object p0, object p1) {
  421. 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);
  422. }
  423. /// <summary>
  424. /// A string like "The result type '{0}' of the binder '{1}' is not compatible with the result type '{2}' expected by the call site."
  425. /// </summary>
  426. internal static string BinderNotCompatibleWithCallSite(object p0, object p1, object p2) {
  427. 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);
  428. }
  429. /// <summary>
  430. /// A string like "The unary operator {0} is not defined for the type '{1}'."
  431. /// </summary>
  432. internal static string UnaryOperatorNotDefined(object p0, object p1) {
  433. return FormatString("The unary operator {0} is not defined for the type '{1}'.", p0, p1);
  434. }
  435. /// <summary>
  436. /// A string like "The binary operator {0} is not defined for the types '{1}' and '{2}'."
  437. /// </summary>
  438. internal static string BinaryOperatorNotDefined(object p0, object p1, object p2) {
  439. return FormatString("The binary operator {0} is not defined for the types '{1}' and '{2}'.", p0, p1, p2);
  440. }
  441. /// <summary>
  442. /// A string like "Reference equality is not defined for the types '{0}' and '{1}'."
  443. /// </summary>
  444. internal static string ReferenceEqualityNotDefined(object p0, object p1) {
  445. return FormatString("Reference equality is not defined for the types '{0}' and '{1}'.", p0, p1);
  446. }
  447. /// <summary>
  448. /// A string like "The operands for operator '{0}' do not match the parameters of method '{1}'."
  449. /// </summary>
  450. internal static string OperandTypesDoNotMatchParameters(object p0, object p1) {
  451. return FormatString("The operands for operator '{0}' do not match the parameters of method '{1}'.", p0, p1);
  452. }
  453. /// <summary>
  454. /// A string like "The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'."
  455. /// </summary>
  456. internal static string OverloadOperatorTypeDoesNotMatchConversionType(object p0, object p1) {
  457. return FormatString("The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'.", p0, p1);
  458. }
  459. /// <summary>
  460. /// A string like "Conversion is not supported for arithmetic types without operator overloading."
  461. /// </summary>
  462. internal static string ConversionIsNotSupportedForArithmeticTypes {
  463. get {
  464. return "Conversion is not supported for arithmetic types without operator overloading.";
  465. }
  466. }
  467. /// <summary>
  468. /// A string like "Argument must be array"
  469. /// </summary>
  470. internal static string ArgumentMustBeArray {
  471. get {
  472. return "Argument must be array";
  473. }
  474. }
  475. /// <summary>
  476. /// A string like "Argument must be boolean"
  477. /// </summary>
  478. internal static string ArgumentMustBeBoolean {
  479. get {
  480. return "Argument must be boolean";
  481. }
  482. }
  483. /// <summary>
  484. /// A string like "The user-defined equality method '{0}' must return a boolean value."
  485. /// </summary>
  486. internal static string EqualityMustReturnBoolean(object p0) {
  487. return FormatString("The user-defined equality method '{0}' must return a boolean value.", p0);
  488. }
  489. /// <summary>
  490. /// A string like "Argument must be either a FieldInfo or PropertyInfo"
  491. /// </summary>
  492. internal static string ArgumentMustBeFieldInfoOrPropertInfo {
  493. get {
  494. return "Argument must be either a FieldInfo or PropertyInfo";
  495. }
  496. }
  497. /// <summary>
  498. /// A string like "Argument must be either a FieldInfo, PropertyInfo or MethodInfo"
  499. /// </summary>
  500. internal static string ArgumentMustBeFieldInfoOrPropertInfoOrMethod {
  501. get {
  502. return "Argument must be either a FieldInfo, PropertyInfo or MethodInfo";
  503. }
  504. }
  505. /// <summary>
  506. /// A string like "Argument must be an instance member"
  507. /// </summary>
  508. internal static string ArgumentMustBeInstanceMember {
  509. get {
  510. return "Argument must be an instance member";
  511. }
  512. }
  513. /// <summary>
  514. /// A string like "Argument must be of an integer type"
  515. /// </summary>
  516. internal static string ArgumentMustBeInteger {
  517. get {
  518. return "Argument must be of an integer type";
  519. }
  520. }
  521. /// <summary>
  522. /// A string like "Argument for array index must be of type Int32"
  523. /// </summary>
  524. internal static string ArgumentMustBeArrayIndexType {
  525. get {
  526. return "Argument for array index must be of type Int32";
  527. }
  528. }
  529. /// <summary>
  530. /// A string like "Argument must be single dimensional array type"
  531. /// </summary>
  532. internal static string ArgumentMustBeSingleDimensionalArrayType {
  533. get {
  534. return "Argument must be single dimensional array type";
  535. }
  536. }
  537. /// <summary>
  538. /// A string like "Argument types do not match"
  539. /// </summary>
  540. internal static string ArgumentTypesMustMatch {
  541. get {
  542. return "Argument types do not match";
  543. }
  544. }
  545. /// <summary>
  546. /// A string like "Cannot auto initialize elements of value type through property '{0}', use assignment instead"
  547. /// </summary>
  548. internal static string CannotAutoInitializeValueTypeElementThroughProperty(object p0) {
  549. return FormatString("Cannot auto initialize elements of value type through property '{0}', use assignment instead", p0);
  550. }
  551. /// <summary>
  552. /// A string like "Cannot auto initialize members of value type through property '{0}', use assignment instead"
  553. /// </summary>
  554. internal static string CannotAutoInitializeValueTypeMemberThroughProperty(object p0) {
  555. return FormatString("Cannot auto initialize members of value type through property '{0}', use assignment instead", p0);
  556. }
  557. /// <summary>
  558. /// A string like "The type used in TypeAs Expression must be of reference or nullable type, {0} is neither"
  559. /// </summary>
  560. internal static string IncorrectTypeForTypeAs(object p0) {
  561. return FormatString("The type used in TypeAs Expression must be of reference or nullable type, {0} is neither", p0);
  562. }
  563. /// <summary>
  564. /// A string like "Coalesce used with type that cannot be null"
  565. /// </summary>
  566. internal static string CoalesceUsedOnNonNullType {
  567. get {
  568. return "Coalesce used with type that cannot be null";
  569. }
  570. }
  571. /// <summary>
  572. /// A string like "An expression of type '{0}' cannot be used to initialize an array of type '{1}'"
  573. /// </summary>
  574. internal static string ExpressionTypeCannotInitializeArrayType(object p0, object p1) {
  575. return FormatString("An expression of type '{0}' cannot be used to initialize an array of type '{1}'", p0, p1);
  576. }
  577. /// <summary>
  578. /// A string like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'"
  579. /// </summary>
  580. internal static string ExpressionTypeDoesNotMatchConstructorParameter(object p0, object p1) {
  581. return FormatString("Expression of type '{0}' cannot be used for constructor parameter of type '{1}'", p0, p1);
  582. }
  583. /// <summary>
  584. /// A string like " Argument type '{0}' does not match the corresponding member type '{1}'"
  585. /// </summary>
  586. internal static string ArgumentTypeDoesNotMatchMember(object p0, object p1) {
  587. return FormatString(" Argument type '{0}' does not match the corresponding member type '{1}'", p0, p1);
  588. }
  589. /// <summary>
  590. /// A string like " The member '{0}' is not declared on type '{1}' being created"
  591. /// </summary>
  592. internal static string ArgumentMemberNotDeclOnType(object p0, object p1) {
  593. return FormatString(" The member '{0}' is not declared on type '{1}' being created", p0, p1);
  594. }
  595. /// <summary>
  596. /// A string like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'"
  597. /// </summary>
  598. internal static string ExpressionTypeDoesNotMatchMethodParameter(object p0, object p1, object p2) {
  599. return FormatString("Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'", p0, p1, p2);
  600. }
  601. /// <summary>
  602. /// A string like "Expression of type '{0}' cannot be used for parameter of type '{1}'"
  603. /// </summary>
  604. internal static string ExpressionTypeDoesNotMatchParameter(object p0, object p1) {
  605. return FormatString("Expression of type '{0}' cannot be used for parameter of type '{1}'", p0, p1);
  606. }
  607. /// <summary>
  608. /// A string like "Expression of type '{0}' cannot be used for return type '{1}'"
  609. /// </summary>
  610. internal static string ExpressionTypeDoesNotMatchReturn(object p0, object p1) {
  611. return FormatString("Expression of type '{0}' cannot be used for return type '{1}'", p0, p1);
  612. }
  613. /// <summary>
  614. /// A string like "Expression of type '{0}' cannot be used for assignment to type '{1}'"
  615. /// </summary>
  616. internal static string ExpressionTypeDoesNotMatchAssignment(object p0, object p1) {
  617. return FormatString("Expression of type '{0}' cannot be used for assignment to type '{1}'", p0, p1);
  618. }
  619. /// <summary>
  620. /// A string like "Expression of type '{0}' cannot be used for label of type '{1}'"
  621. /// </summary>
  622. internal static string ExpressionTypeDoesNotMatchLabel(object p0, object p1) {
  623. return FormatString("Expression of type '{0}' cannot be used for label of type '{1}'", p0, p1);
  624. }
  625. /// <summary>
  626. /// A string like "Expression of type '{0}' cannot be invoked"
  627. /// </summary>
  628. internal static string ExpressionTypeNotInvocable(object p0) {
  629. return FormatString("Expression of type '{0}' cannot be invoked", p0);
  630. }
  631. /// <summary>
  632. /// A string like "Field '{0}' is not defined for type '{1}'"
  633. /// </summary>
  634. internal static string FieldNotDefinedForType(object p0, object p1) {
  635. return FormatString("Field '{0}' is not defined for type '{1}'", p0, p1);
  636. }
  637. /// <summary>
  638. /// A string like "Instance field '{0}' is not defined for type '{1}'"
  639. /// </summary>
  640. internal static string InstanceFieldNotDefinedForType(object p0, object p1) {
  641. return FormatString("Instance field '{0}' is not defined for type '{1}'", p0, p1);
  642. }
  643. /// <summary>
  644. /// A string like "Field '{0}.{1}' is not defined for type '{2}'"
  645. /// </summary>
  646. internal static string FieldInfoNotDefinedForType(object p0, object p1, object p2) {
  647. return FormatString("Field '{0}.{1}' is not defined for type '{2}'", p0, p1, p2);
  648. }
  649. /// <summary>
  650. /// A string like "Incorrect number of indexes"
  651. /// </summary>
  652. internal static string IncorrectNumberOfIndexes {
  653. get {
  654. return "Incorrect number of indexes";
  655. }
  656. }
  657. /// <summary>
  658. /// A string like "Incorrect number of arguments supplied for lambda invocation"
  659. /// </summary>
  660. internal static string IncorrectNumberOfLambdaArguments {
  661. get {
  662. return "Incorrect number of arguments supplied for lambda invocation";
  663. }
  664. }
  665. /// <summary>
  666. /// A string like "Incorrect number of parameters supplied for lambda declaration"
  667. /// </summary>
  668. internal static string IncorrectNumberOfLambdaDeclarationParameters {
  669. get {
  670. return "Incorrect number of parameters supplied for lambda declaration";
  671. }
  672. }
  673. /// <summary>
  674. /// A string like "Incorrect number of arguments supplied for call to method '{0}'"
  675. /// </summary>
  676. internal static string IncorrectNumberOfMethodCallArguments(object p0) {
  677. return FormatString("Incorrect number of arguments supplied for call to method '{0}'", p0);
  678. }
  679. /// <summary>
  680. /// A string like "Incorrect number of arguments for constructor"
  681. /// </summary>
  682. internal static string IncorrectNumberOfConstructorArguments {
  683. get {
  684. return "Incorrect number of arguments for constructor";
  685. }
  686. }
  687. /// <summary>
  688. /// A string like " Incorrect number of members for constructor"
  689. /// </summary>
  690. internal static string IncorrectNumberOfMembersForGivenConstructor {
  691. get {
  692. return " Incorrect number of members for constructor";
  693. }
  694. }
  695. /// <summary>
  696. /// A string like "Incorrect number of arguments for the given members "
  697. /// </summary>
  698. internal static string IncorrectNumberOfArgumentsForMembers {
  699. get {
  700. return "Incorrect number of arguments for the given members ";
  701. }
  702. }
  703. /// <summary>
  704. /// A string like "Lambda type parameter must be derived from System.Delegate"
  705. /// </summary>
  706. internal static string LambdaTypeMustBeDerivedFromSystemDelegate {
  707. get {
  708. return "Lambda type parameter must be derived from System.Delegate";
  709. }
  710. }
  711. /// <summary>
  712. /// A string like "Member '{0}' not field or property"
  713. /// </summary>
  714. internal static string MemberNotFieldOrProperty(object p0) {
  715. return FormatString("Member '{0}' not field or property", p0);
  716. }
  717. /// <summary>
  718. /// A string like "Method {0} contains generic parameters"
  719. /// </summary>
  720. internal static string MethodContainsGenericParameters(object p0) {
  721. return FormatString("Method {0} contains generic parameters", p0);
  722. }
  723. /// <summary>
  724. /// A string like "Method {0} is a generic method definition"
  725. /// </summary>
  726. internal static string MethodIsGeneric(object p0) {
  727. return FormatString("Method {0} is a generic method definition", p0);
  728. }
  729. /// <summary>
  730. /// A string like "The method '{0}.{1}' is not a property accessor"
  731. /// </summary>
  732. internal static string MethodNotPropertyAccessor(object p0, object p1) {
  733. return FormatString("The method '{0}.{1}' is not a property accessor", p0, p1);
  734. }
  735. /// <summary>
  736. /// A string like "The property '{0}' has no 'get' accessor"
  737. /// </summary>
  738. internal static string PropertyDoesNotHaveGetter(object p0) {
  739. return FormatString("The property '{0}' has no 'get' accessor", p0);
  740. }
  741. /// <summary>
  742. /// A string like "The property '{0}' has no 'set' accessor"
  743. /// </summary>
  744. internal static string PropertyDoesNotHaveSetter(object p0) {
  745. return FormatString("The property '{0}' has no 'set' accessor", p0);
  746. }
  747. /// <summary>
  748. /// A string like "The property '{0}' has no 'get' or 'set' accessors"
  749. /// </summary>
  750. internal static string PropertyDoesNotHaveAccessor(object p0) {
  751. return FormatString("The property '{0}' has no 'get' or 'set' accessors", p0);
  752. }
  753. /// <summary>
  754. /// A string like "'{0}' is not a member of type '{1}'"
  755. /// </summary>
  756. internal static string NotAMemberOfType(object p0, object p1) {
  757. return FormatString("'{0}' is not a member of type '{1}'", p0, p1);
  758. }
  759. /// <summary>
  760. /// A string like "The operator '{0}' is not implemented for type '{1}'"
  761. /// </summary>
  762. internal static string OperatorNotImplementedForType(object p0, object p1) {
  763. return FormatString("The operator '{0}' is not implemented for type '{1}'", p0, p1);
  764. }
  765. /// <summary>
  766. /// A string like "ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'"
  767. /// </summary>
  768. internal static string ParameterExpressionNotValidAsDelegate(object p0, object p1) {
  769. return FormatString("ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'", p0, p1);
  770. }
  771. /// <summary>
  772. /// A string like "Property '{0}' is not defined for type '{1}'"
  773. /// </summary>
  774. internal static string PropertyNotDefinedForType(object p0, object p1) {
  775. return FormatString("Property '{0}' is not defined for type '{1}'", p0, p1);
  776. }
  777. /// <summary>
  778. /// A string like "Instance property '{0}' is not defined for type '{1}'"
  779. /// </summary>
  780. internal static string InstancePropertyNotDefinedForType(object p0, object p1) {
  781. return FormatString("Instance property '{0}' is not defined for type '{1}'", p0, p1);
  782. }
  783. /// <summary>
  784. /// A string like "Instance property '{0}' that takes no argument is not defined for type '{1}'"
  785. /// </summary>
  786. internal static string InstancePropertyWithoutParameterNotDefinedForType(object p0, object p1) {
  787. return FormatString("Instance property '{0}' that takes no argument is not defined for type '{1}'", p0, p1);
  788. }
  789. /// <summary>
  790. /// A string like "Instance property '{0}{1}' is not defined for type '{2}'"
  791. /// </summary>
  792. internal static string InstancePropertyWithSpecifiedParametersNotDefinedForType(object p0, object p1, object p2) {
  793. return FormatString("Instance property '{0}{1}' is not defined for type '{2}'", p0, p1, p2);
  794. }
  795. /// <summary>
  796. /// A string like "Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'"
  797. /// </summary>
  798. internal static string InstanceAndMethodTypeMismatch(object p0, object p1, object p2) {
  799. return FormatString("Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'", p0, p1, p2);
  800. }
  801. /// <summary>
  802. /// A string like "Type {0} contains generic parameters"
  803. /// </summary>
  804. internal static string TypeContainsGenericParameters(object p0) {
  805. return FormatString("Type {0} contains generic parameters", p0);
  806. }
  807. /// <summary>
  808. /// A string like "Type {0} is a generic type definition"
  809. /// </summary>
  810. internal static string TypeIsGeneric(object p0) {
  811. return FormatString("Type {0} is a generic type definition", p0);
  812. }
  813. /// <summary>
  814. /// A string like "Type '{0}' does not have a default constructor"
  815. /// </summary>
  816. internal static string TypeMissingDefaultConstructor(object p0) {
  817. return FormatString("Type '{0}' does not have a default constructor", p0);
  818. }
  819. /// <summary>
  820. /// A string like "List initializers must contain at least one initializer"
  821. /// </summary>
  822. internal static string ListInitializerWithZeroMembers {
  823. get {
  824. return "List initializers must contain at least one initializer";
  825. }
  826. }
  827. /// <summary>
  828. /// A string like "Element initializer method must be named 'Add'"
  829. /// </summary>
  830. internal static string ElementInitializerMethodNotAdd {
  831. get {
  832. return "Element initializer method must be named 'Add'";
  833. }
  834. }
  835. /// <summary>
  836. /// A string like "Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter"
  837. /// </summary>
  838. internal static string ElementInitializerMethodNoRefOutParam(object p0, object p1) {
  839. return FormatString("Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter", p0, p1);
  840. }
  841. /// <summary>
  842. /// A string like "Element initializer method must have at least 1 parameter"
  843. /// </summary>
  844. internal static string ElementInitializerMethodWithZeroArgs {
  845. get {
  846. return "Element initializer method must have at least 1 parameter";
  847. }
  848. }
  849. /// <summary>
  850. /// A string like "Element initializer method must be an instance method"
  851. /// </summary>
  852. internal static string ElementInitializerMethodStatic {
  853. get {
  854. return "Element initializer method must be an instance method";
  855. }
  856. }
  857. /// <summary>
  858. /// A string like "Type '{0}' is not IEnumerable"
  859. /// </summary>
  860. internal static string TypeNotIEnumerable(object p0) {
  861. return FormatString("Type '{0}' is not IEnumerable", p0);
  862. }
  863. /// <summary>
  864. /// A string like "Type parameter is {0}. Expected a delegate."
  865. /// </summary>
  866. internal static string TypeParameterIsNotDelegate(object p0) {
  867. return FormatString("Type parameter is {0}. Expected a delegate.", p0);
  868. }
  869. /// <summary>
  870. /// A string like "Unexpected coalesce operator."
  871. /// </summary>
  872. internal static string UnexpectedCoalesceOperator {
  873. get {
  874. return "Unexpected coalesce operator.";
  875. }
  876. }
  877. /// <summary>
  878. /// A string like "Cannot cast from type '{0}' to type '{1}"
  879. /// </summary>
  880. internal static string InvalidCast(object p0, object p1) {
  881. return FormatString("Cannot cast from type '{0}' to type '{1}", p0, p1);
  882. }
  883. /// <summary>
  884. /// A string like "Unhandled binary: {0}"
  885. /// </summary>
  886. internal static string UnhandledBinary(object p0) {
  887. return FormatString("Unhandled binary: {0}", p0);
  888. }
  889. /// <summary>
  890. /// A string like "Unhandled binding "
  891. /// </summary>
  892. internal static string UnhandledBinding {
  893. get {
  894. return "Unhandled binding ";
  895. }
  896. }
  897. /// <summary>
  898. /// A string like "Unhandled Binding Type: {0}"
  899. /// </summary>
  900. internal static string UnhandledBindingType(object p0) {
  901. return FormatString("Unhandled Binding Type: {0}", p0);
  902. }
  903. /// <summary>
  904. /// A string like "Unhandled convert: {0}"
  905. /// </summary>
  906. internal static string UnhandledConvert(object p0) {
  907. return FormatString("Unhandled convert: {0}", p0);
  908. }
  909. /// <summary>
  910. /// A string like "Unhandled Expression Type: {0}"
  911. /// </summary>
  912. internal static string UnhandledExpressionType(object p0) {
  913. return FormatString("Unhandled Expression Type: {0}", p0);
  914. }
  915. /// <summary>
  916. /// A string like "Unhandled unary: {0}"
  917. /// </summary>
  918. internal static string UnhandledUnary(object p0) {
  919. return FormatString("Unhandled unary: {0}", p0);
  920. }
  921. /// <summary>
  922. /// A string like "Unknown binding type"
  923. /// </summary>
  924. internal static string UnknownBindingType {
  925. get {
  926. return "Unknown binding type";
  927. }
  928. }
  929. /// <summary>
  930. /// A string like "The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types."
  931. /// </summary>
  932. internal static string UserDefinedOpMustHaveConsistentTypes(object p0, object p1) {
  933. return FormatString("The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types.", p0, p1);
  934. }
  935. /// <summary>
  936. /// A string like "The user-defined operator method '{1}' for operator '{0}' must return the same type as its parameter or a derived type."
  937. /// </summary>
  938. internal static string UserDefinedOpMustHaveValidReturnType(object p0, object p1) {
  939. 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);
  940. }
  941. /// <summary>
  942. /// A string like "The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators."
  943. /// </summary>
  944. internal static string LogicalOperatorMustHaveBooleanOperators(object p0, object p1) {
  945. return FormatString("The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators.", p0, p1);
  946. }
  947. /// <summary>
  948. /// A string like "No method '{0}' exists on type '{1}'."
  949. /// </summary>
  950. internal static string MethodDoesNotExistOnType(object p0, object p1) {
  951. return FormatString("No method '{0}' exists on type '{1}'.", p0, p1);
  952. }
  953. /// <summary>
  954. /// A string like "No method '{0}' on type '{1}' is compatible with the supplied arguments."
  955. /// </summary>
  956. internal static string MethodWithArgsDoesNotExistOnType(object p0, object p1) {
  957. return FormatString("No method '{0}' on type '{1}' is compatible with the supplied arguments.", p0, p1);
  958. }
  959. /// <summary>
  960. /// 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. "
  961. /// </summary>
  962. internal static string GenericMethodWithArgsDoesNotExistOnType(object p0, object p1) {
  963. 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);
  964. }
  965. /// <summary>
  966. /// A string like "More than one method '{0}' on type '{1}' is compatible with the supplied arguments."
  967. /// </summary>
  968. internal static string MethodWithMoreThanOneMatch(object p0, object p1) {
  969. return FormatString("More than one method '{0}' on type '{1}' is compatible with the supplied arguments.", p0, p1);
  970. }
  971. /// <summary>
  972. /// A string like "More than one property '{0}' on type '{1}' is compatible with the supplied arguments."
  973. /// </summary>
  974. internal static string PropertyWithMoreThanOneMatch(object p0, object p1) {
  975. return FormatString("More than one property '{0}' on type '{1}' is compatible with the supplied arguments.", p0, p1);
  976. }
  977. /// <summary>
  978. /// A string like "An incorrect number of type args were specified for the declaration of a Func type."
  979. /// </summary>
  980. internal static string IncorrectNumberOfTypeArgsForFunc {
  981. get {
  982. return "An incorrect number of type args were specified for the declaration of a Func type.";
  983. }
  984. }
  985. /// <summary>
  986. /// A string like "An incorrect number of type args were specified for the declaration of an Action type."
  987. /// </summary>
  988. internal static string IncorrectNumberOfTypeArgsForAction {
  989. get {
  990. return "An incorrect number of type args were specified for the declaration of an Action type.";
  991. }
  992. }
  993. /// <summary>
  994. /// A string like "Argument type cannot be System.Void."
  995. /// </summary>
  996. internal static string ArgumentCannotBeOfTypeVoid {
  997. get {
  998. return "Argument type cannot be System.Void.";
  999. }
  1000. }
  1001. /// <summary>
  1002. /// A string like "More than one key matching '{0}' was found in the ExpandoObject."
  1003. /// </summary>
  1004. internal static string AmbiguousMatchInExpandoObject(object p0) {
  1005. return FormatString("More than one key matching '{0}' was found in the ExpandoObject.", p0);
  1006. }
  1007. /// <summary>
  1008. /// A string like "An element with the same key '{0}' already exists in the ExpandoObject."
  1009. /// </summary>
  1010. internal static string SameKeyExistsInExpando(object p0) {
  1011. return FormatString("An element with the same key '{0}' already exists in the ExpandoObject.", p0);
  1012. }
  1013. /// <summary>
  1014. /// A string like "The specified key '{0}' does not exist in the ExpandoObject."
  1015. /// </summary>
  1016. internal static string KeyDoesNotExistInExpando(object p0) {
  1017. return FormatString("The specified key '{0}' does not exist in the ExpandoObject.", p0);
  1018. }
  1019. /// <summary>
  1020. /// A string like "No or Invalid rule produced"
  1021. /// </summary>
  1022. internal static string NoOrInvalidRuleProduced {
  1023. get {
  1024. return "No or Invalid rule produced";
  1025. }
  1026. }
  1027. /// <summary>
  1028. /// A string like "First argument of delegate must be CallSite"
  1029. /// </summary>
  1030. internal static string FirstArgumentMustBeCallSite {
  1031. get {
  1032. return "First argument of delegate must be CallSite";
  1033. }
  1034. }
  1035. /// <summary>
  1036. /// A string like "Bind cannot return null."
  1037. /// </summary>
  1038. internal static string BindingCannotBeNull {
  1039. get {
  1040. return "Bind cannot return null.";
  1041. }
  1042. }
  1043. /// <summary>
  1044. /// A string like "Invalid operation: '{0}'"
  1045. /// </summary>
  1046. internal static string InvalidOperation(object p0) {
  1047. return FormatString("Invalid operation: '{0}'", p0);
  1048. }
  1049. /// <summary>
  1050. /// A string like "{0} must be greater than or equal to {1}"
  1051. /// </summary>
  1052. internal static string OutOfRange(object p0, object p1) {
  1053. return FormatString("{0} must be greater than or equal to {1}", p0, p1);
  1054. }
  1055. /// <summary>
  1056. /// A string like "Queue empty."
  1057. /// </summary>
  1058. internal static string QueueEmpty {
  1059. get {
  1060. return "Queue empty.";
  1061. }
  1062. }
  1063. /// <summary>
  1064. /// A string like "Cannot redefine label '{0}' in an inner block."
  1065. /// </summary>
  1066. internal static string LabelTargetAlreadyDefined(object p0) {
  1067. return FormatString("Cannot redefine label '{0}' in an inner block.", p0);
  1068. }
  1069. /// <summary>
  1070. /// A string like "Cannot jump to undefined label '{0}'."
  1071. /// </summary>
  1072. internal static string LabelTargetUndefined(object p0) {
  1073. return FormatString("Cannot jump to undefined label '{0}'.", p0);
  1074. }
  1075. /// <summary>
  1076. /// A string like "Control cannot leave a finally block."
  1077. /// </summary>
  1078. internal static string ControlCannotLeaveFinally {
  1079. get {
  1080. return "Control cannot leave a finally block.";
  1081. }
  1082. }
  1083. /// <summary>
  1084. /// A string like "Control cannot leave a filter test."
  1085. /// </summary>
  1086. internal static string ControlCannotLeaveFilterTest {
  1087. get {
  1088. return "Control cannot leave a filter test.";
  1089. }
  1090. }
  1091. /// <summary>
  1092. /// A string like "Cannot jump to ambiguous label '{0}'."
  1093. /// </summary>
  1094. internal static string AmbiguousJump(object p0) {
  1095. return FormatString("Cannot jump to ambiguous label '{0}'.", p0);
  1096. }
  1097. /// <summary>
  1098. /// A string like "Control cannot enter a try block."
  1099. /// </summary>
  1100. internal static string ControlCannotEnterTry {
  1101. get {
  1102. return "Control cannot enter a try block.";
  1103. }
  1104. }
  1105. /// <summary>
  1106. /// A string like "Control cannot enter an expression--only statements can be jumped into."
  1107. /// </summary>
  1108. internal static string ControlCannotEnterExpression {
  1109. get {
  1110. return "Control cannot enter an expression--only statements can be jumped into.";
  1111. }
  1112. }
  1113. /// <summary>
  1114. /// A string like "Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values."
  1115. /// </summary>
  1116. internal static string NonLocalJumpWithValue(object p0) {
  1117. return FormatString("Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values.", p0);
  1118. }
  1119. /// <summary>
  1120. /// A string like "Extension should have been reduced."
  1121. /// </summary>
  1122. internal static string ExtensionNotReduced {
  1123. get {
  1124. return "Extension should have been reduced.";
  1125. }
  1126. }
  1127. /// <summary>
  1128. /// 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."
  1129. /// </summary>
  1130. internal static string CannotCompileConstant(object p0) {
  1131. 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);
  1132. }
  1133. /// <summary>
  1134. /// A string like "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite."
  1135. /// </summary>
  1136. internal static string CannotCompileDynamic {
  1137. get {
  1138. return "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite.";
  1139. }
  1140. }
  1141. /// <summary>
  1142. /// A string like "Invalid lvalue for assignment: {0}."
  1143. /// </summary>
  1144. internal static string InvalidLvalue(object p0) {
  1145. return FormatString("Invalid lvalue for assignment: {0}.", p0);
  1146. }
  1147. /// <summary>
  1148. /// A string like "Invalid member type: {0}."
  1149. /// </summary>
  1150. internal static string InvalidMemberType(object p0) {
  1151. return FormatString("Invalid member type: {0}.", p0);
  1152. }
  1153. /// <summary>
  1154. /// A string like "unknown lift type: '{0}'."
  1155. /// </summary>
  1156. internal static string UnknownLiftType(object p0) {
  1157. return FormatString("unknown lift type: '{0}'.", p0);
  1158. }
  1159. /// <summary>
  1160. /// A string like "Invalid output directory."
  1161. /// </summary>
  1162. internal static string InvalidOutputDir {
  1163. get {
  1164. return "Invalid output directory.";
  1165. }
  1166. }
  1167. /// <summary>
  1168. /// A string like "Invalid assembly name or file extension."
  1169. /// </summary>
  1170. internal static string InvalidAsmNameOrExtension {
  1171. get {
  1172. return "Invalid assembly name or file extension.";
  1173. }
  1174. }
  1175. /// <summary>
  1176. /// A string like "Collection is read-only."
  1177. /// </summary>
  1178. internal static string CollectionReadOnly {
  1179. get {
  1180. return "Collection is read-only.";
  1181. }
  1182. }
  1183. /// <summary>
  1184. /// A string like "Cannot create instance of {0} because it contains generic parameters"
  1185. /// </summary>
  1186. internal static string IllegalNewGenericParams(object p0) {
  1187. return FormatString("Cannot create instance of {0} because it contains generic parameters", p0);
  1188. }
  1189. /// <summary>
  1190. /// A string like "variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined"
  1191. /// </summary>
  1192. internal static string UndefinedVariable(object p0, object p1, object p2) {
  1193. return FormatString("variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined", p0, p1, p2);
  1194. }
  1195. /// <summary>
  1196. /// A string like "Cannot close over byref parameter '{0}' referenced in lambda '{1}'"
  1197. /// </summary>
  1198. internal static string CannotCloseOverByRef(object p0, object p1) {
  1199. return FormatString("Cannot close over byref parameter '{0}' referenced in lambda '{1}'", p0, p1);
  1200. }
  1201. /// <summary>
  1202. /// A string like "Unexpected VarArgs call to method '{0}'"
  1203. /// </summary>
  1204. internal static string UnexpectedVarArgsCall(object p0) {
  1205. return FormatString("Unexpected VarArgs call to method '{0}'", p0);
  1206. }
  1207. /// <summary>
  1208. /// A string like "Rethrow statement is valid only inside a Catch block."
  1209. /// </summary>
  1210. internal static string RethrowRequiresCatch {
  1211. get {
  1212. return "Rethrow statement is valid only inside a Catch block.";
  1213. }
  1214. }
  1215. /// <summary>
  1216. /// A string like "Try expression is not allowed inside a filter body."
  1217. /// </summary>
  1218. internal static string TryNotAllowedInFilter {
  1219. get {
  1220. return "Try expression is not allowed inside a filter body.";
  1221. }
  1222. }
  1223. /// <summary>
  1224. /// 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."
  1225. /// </summary>
  1226. internal static string MustRewriteToSameNode(object p0, object p1, object p2) {
  1227. 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);
  1228. }
  1229. /// <summary>
  1230. /// 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."
  1231. /// </summary>
  1232. internal static string MustRewriteChildToSameType(object p0, object p1, object p2) {
  1233. 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);
  1234. }
  1235. /// <summary>
  1236. /// 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."
  1237. /// </summary>
  1238. internal static string MustRewriteWithoutMethod(object p0, object p1) {
  1239. 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);
  1240. }
  1241. /// <summary>
  1242. /// A string like "The value null is not of type '{0}' and cannot be used in this collection."
  1243. /// </summary>
  1244. internal static string InvalidNullValue(object p0) {
  1245. return FormatString("The value null is not of type '{0}' and cannot be used in this collection.", p0);
  1246. }
  1247. /// <summary>
  1248. /// A string like "The value '{0}' is not of type '{1}' and cannot be used in this collection."
  1249. /// </summary>
  1250. internal static string InvalidObjectType(object p0, object p1) {
  1251. return FormatString("The value '{0}' is not of type '{1}' and cannot be used in this collection.", p0, p1);
  1252. }
  1253. /// <summary>
  1254. /// 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."
  1255. /// </summary>
  1256. internal static string TryNotSupportedForMethodsWithRefArgs(object p0) {
  1257. 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);
  1258. }
  1259. /// <summary>
  1260. /// 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."
  1261. /// </summary>
  1262. internal static string TryNotSupportedForValueTypeInstances(object p0) {
  1263. 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);
  1264. }
  1265. /// <summary>
  1266. /// A string like "Collection was modified; enumeration operation may not execute."
  1267. /// </summary>
  1268. internal static string CollectionModifiedWhileEnumerating {
  1269. get {
  1270. return "Collection was modified; enumeration operation may not execute.";
  1271. }
  1272. }
  1273. /// <summary>
  1274. /// A string like "Enumeration has either not started or has already finished."
  1275. /// </summary>
  1276. internal static string EnumerationIsDone {
  1277. get {
  1278. return "Enumeration has either not started or has already finished.";
  1279. }
  1280. }
  1281. /// <summary>
  1282. /// A string like "Dynamic operations can only be performed in homogenous AppDomain."
  1283. /// </summary>
  1284. internal static string HomogenousAppDomainRequired {
  1285. get {
  1286. return "Dynamic operations can only be performed in homogenous AppDomain.";
  1287. }
  1288. }
  1289. /// <summary>
  1290. /// A string like "Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
  1291. /// </summary>
  1292. internal static string TestValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
  1293. return FormatString("Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'", p0, p1);
  1294. }
  1295. /// <summary>
  1296. /// A string like "Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
  1297. /// </summary>
  1298. internal static string SwitchValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
  1299. return FormatString("Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'", p0, p1);
  1300. }
  1301. /// <summary>
  1302. /// A string like "An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance."
  1303. /// </summary>
  1304. internal static string InvalidMetaObjectCreated(object p0) {
  1305. return FormatString("An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance.", p0);
  1306. }
  1307. /// <summary>
  1308. /// A string like "DebugInfoGenerator created by CreatePdbGenerator can only be used with LambdaExpression.CompileToMethod."
  1309. /// </summary>
  1310. internal static string PdbGeneratorNeedsExpressionCompiler {
  1311. get {
  1312. return "DebugInfoGenerator created by CreatePdbGenerator can only be used with LambdaExpression.CompileToMethod.";
  1313. }
  1314. }
  1315. }
  1316. /// <summary>
  1317. /// Strongly-typed and parameterized exception factory.
  1318. /// </summary>
  1319. internal static partial class Error {
  1320. /// <summary>
  1321. /// ArgumentException with message like "Argument count must be greater than number of named arguments."
  1322. /// </summary>
  1323. internal static Exception ArgCntMustBeGreaterThanNameCnt() {
  1324. return new ArgumentException(Strings.ArgCntMustBeGreaterThanNameCnt);
  1325. }
  1326. /// <summary>
  1327. /// ArgumentException with message like "reducible nodes must override Expression.Reduce()"
  1328. /// </summary>
  1329. internal static Exception ReducibleMustOverrideReduce() {
  1330. return new ArgumentException(Strings.ReducibleMustOverrideReduce);
  1331. }
  1332. /// <summary>
  1333. /// ArgumentException with message like "node cannot reduce to itself or null"
  1334. /// </summary>
  1335. internal static Exception MustReduceToDifferent() {
  1336. return new ArgumentException(Strings.MustReduceToDifferent);
  1337. }
  1338. /// <summary>
  1339. /// ArgumentException with message like "cannot assign from the reduced node type to the original node type"
  1340. /// </summary>
  1341. internal static Exception ReducedNotCompatible() {
  1342. return new ArgumentException(Strings.ReducedNotCompatible);
  1343. }
  1344. /// <summary>
  1345. /// ArgumentException with message like "Setter must have parameters."
  1346. /// </summary>
  1347. internal static Exception SetterHasNoParams() {
  1348. return new ArgumentException(Strings.SetterHasNoParams);
  1349. }
  1350. /// <summary>
  1351. /// ArgumentException with message like "Property cannot have a managed pointer type."
  1352. /// </summary>
  1353. internal static Exception PropertyCannotHaveRefType() {
  1354. return new ArgumentException(Strings.PropertyCannotHaveRefType);
  1355. }
  1356. /// <summary>
  1357. /// ArgumentException with message like "Indexing parameters of getter and setter must match."
  1358. /// </summary>
  1359. internal static Exception IndexesOfSetGetMustMatch() {
  1360. return new ArgumentException(Strings.IndexesOfSetGetMustMatch);
  1361. }
  1362. /// <summary>
  1363. /// ArgumentException with message like "Accessor method should not have VarArgs."
  1364. /// </summary>
  1365. internal static Exception AccessorsCannotHaveVarArgs() {
  1366. return new ArgumentException(Strings.AccessorsCannotHaveVarArgs);
  1367. }
  1368. /// <summary>
  1369. /// ArgumentException with message like "Accessor indexes cannot be passed ByRef."
  1370. /// </summary>
  1371. internal static Exception AccessorsCannotHaveByRefArgs() {
  1372. return new ArgumentException(Strings.AccessorsCannotHaveByRefArgs);
  1373. }
  1374. /// <summary>
  1375. /// ArgumentException with message like "Bounds count cannot be less than 1"
  1376. /// </summary>
  1377. internal static Exception BoundsCannotBeLessThanOne() {
  1378. return new ArgumentException(Strings.BoundsCannotBeLessThanOne);
  1379. }
  1380. /// <summary>
  1381. /// ArgumentException with message like "type must not be ByRef"
  1382. /// </summary>
  1383. internal static Exception TypeMustNotBeByRef() {
  1384. return new ArgumentException(Strings.TypeMustNotBeByRef);
  1385. }
  1386. /// <summary>
  1387. /// ArgumentException with message like "Type doesn't have constructor with a given signature"
  1388. /// </summary>
  1389. internal static Exception TypeDoesNotHaveConstructorForTheSignature() {
  1390. return new ArgumentException(Strings.TypeDoesNotHaveConstructorForTheSignature);
  1391. }
  1392. /// <summary>
  1393. /// ArgumentException with message like "Count must be non-negative."
  1394. /// </summary>
  1395. internal static Exception CountCannotBeNegative() {
  1396. return new ArgumentException(Strings.CountCannotBeNegative);
  1397. }
  1398. /// <summary>
  1399. /// ArgumentException with message like "arrayType must be an array type"
  1400. /// </summary>
  1401. internal static Exception ArrayTypeMustBeArray() {
  1402. return new ArgumentException(Strings.ArrayTypeMustBeArray);
  1403. }
  1404. /// <summary>
  1405. /// ArgumentException with message like "Setter should have void type."
  1406. /// </summary>
  1407. internal static Exception SetterMustBeVoid() {
  1408. return new ArgumentException(Strings.SetterMustBeVoid);
  1409. }
  1410. /// <summary>
  1411. /// ArgumentException with message like "Property type must match the value type of setter"
  1412. /// </summary>
  1413. internal static Exception PropertyTyepMustMatchSetter() {
  1414. return new ArgumentException(Strings.PropertyTyepMustMatchSetter);
  1415. }
  1416. /// <summary>
  1417. /// ArgumentException with message like "Both accessors must be static."
  1418. /// </summary>
  1419. internal static Exception BothAccessorsMustBeStatic() {
  1420. return new ArgumentException(Strings.BothAccessorsMustBeStatic);
  1421. }
  1422. /// <summary>
  1423. /// ArgumentException with message like "Static method requires null instance, non-static method requires non-null instance."
  1424. /// </summary>
  1425. internal static Exception OnlyStaticMethodsHaveNullInstance() {
  1426. return new ArgumentException(Strings.OnlyStaticMethodsHaveNullInstance);
  1427. }
  1428. /// <summary>
  1429. /// ArgumentException with message like "Property cannot have a void type."
  1430. /// </summary>
  1431. internal static Exception PropertyTypeCannotBeVoid() {
  1432. return new ArgumentException(Strings.PropertyTypeCannotBeVoid);
  1433. }
  1434. /// <summary>
  1435. /// ArgumentException with message like "Can only unbox from an object or interface type to a value type."
  1436. /// </summary>
  1437. internal static Exception InvalidUnboxType() {
  1438. return new ArgumentException(Strings.InvalidUnboxType);
  1439. }
  1440. /// <summary>
  1441. /// ArgumentException with message like "Argument must not have a value type."
  1442. /// </summary>
  1443. internal static Exception ArgumentMustNotHaveValueType() {
  1444. return new ArgumentException(Strings.ArgumentMustNotHaveValueType);
  1445. }
  1446. /// <summary>
  1447. /// ArgumentException with message like "must be reducible node"
  1448. /// </summary>
  1449. internal static Exception MustBeReducible() {
  1450. return new ArgumentException(Strings.MustBeReducible);
  1451. }
  1452. /// <summary>
  1453. /// ArgumentException with message like "Default body must be supplied if case bodies are not System.Void."
  1454. /// </summary>
  1455. internal static Exception DefaultBodyMustBeSupplied() {
  1456. return new ArgumentException(Strings.DefaultBodyMustBeSupplied);
  1457. }
  1458. /// <summary>
  1459. /// ArgumentException with message like "MethodBuilder does not have a valid TypeBuilder"
  1460. /// </summary>
  1461. internal static Exception MethodBuilderDoesNotHaveTypeBuilder() {
  1462. return new ArgumentException(Strings.MethodBuilderDoesNotHaveTypeBuilder);
  1463. }
  1464. /// <summary>
  1465. /// ArgumentException with message like "Type must be derived from System.Delegate"
  1466. /// </summary>
  1467. internal static Exception TypeMustBeDerivedFromSystemDelegate() {
  1468. return new ArgumentException(Strings.TypeMustBeDerivedFromSystemDelegate);
  1469. }
  1470. /// <summary>
  1471. /// ArgumentException with message like "Argument type cannot be void"
  1472. /// </summary>
  1473. internal static Exception ArgumentTypeCannotBeVoid() {
  1474. return new ArgumentException(Strings.ArgumentTypeCannotBeVoid);
  1475. }
  1476. /// <summary>
  1477. /// ArgumentException with message like "Label type must be System.Void if an expression is not supplied"
  1478. /// </summary>
  1479. internal static Exception LabelMustBeVoidOrHaveExpression() {
  1480. return new ArgumentException(Strings.LabelMustBeVoidOrHaveExpression);
  1481. }
  1482. /// <summary>
  1483. /// ArgumentException with message like "Type must be System.Void for this label argument"
  1484. /// </summary>
  1485. internal static Exception LabelTypeMustBeVoid() {
  1486. return new ArgumentException(Strings.LabelTypeMustBeVoid);
  1487. }
  1488. /// <summary>
  1489. /// ArgumentException with message like "Quoted expression must be a lambda"
  1490. /// </summary>
  1491. internal static Exception QuotedExpressionMustBeLambda() {
  1492. return new ArgumentException(Strings.QuotedExpressionMustBeLambda);
  1493. }
  1494. /// <summary>
  1495. /// ArgumentException with message like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables."
  1496. /// </summary>
  1497. internal static Exception VariableMustNotBeByRef(object p0, object p1) {
  1498. return new ArgumentException(Strings.VariableMustNotBeByRef(p0, p1));
  1499. }
  1500. /// <summary>
  1501. /// ArgumentException with message like "Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object."
  1502. /// </summary>
  1503. internal static Exception DuplicateVariable(object p0) {
  1504. return new ArgumentException(Strings.DuplicateVariable(p0));
  1505. }
  1506. /// <summary>
  1507. /// ArgumentException with message like "Start and End must be well ordered"
  1508. /// </summary>
  1509. internal static Exception StartEndMustBeOrdered() {
  1510. return new ArgumentException(Strings.StartEndMustBeOrdered);
  1511. }
  1512. /// <summary>
  1513. /// ArgumentException with message like "fault cannot be used with catch or finally clauses"
  1514. /// </summary>
  1515. internal static Exception FaultCannotHaveCatchOrFinally() {
  1516. return new ArgumentException(Strings.FaultCannotHaveCatchOrFinally);
  1517. }
  1518. /// <summary>
  1519. /// ArgumentException with message like "try must have at least one catch, finally, or fault clause"
  1520. /// </summary>
  1521. internal static Exception TryMustHaveCatchFinallyOrFault() {
  1522. return new ArgumentException(Strings.TryMustHaveCatchFinallyOrFault);
  1523. }
  1524. /// <summary>
  1525. /// ArgumentException with message like "Body of catch must have the same type as body of try."
  1526. /// </summary>
  1527. internal static Exception BodyOfCatchMustHaveSameTypeAsBodyOfTry() {
  1528. return new ArgumentException(Strings.BodyOfCatchMustHaveSameTypeAsBodyOfTry);
  1529. }
  1530. /// <summary>
  1531. /// InvalidOperationException with message like "Extension node must override the property {0}."
  1532. /// </summary>
  1533. internal static Exception ExtensionNodeMustOverrideProperty(object p0) {
  1534. return new InvalidOperationException(Strings.ExtensionNodeMustOverrideProperty(p0));
  1535. }
  1536. /// <summary>
  1537. /// ArgumentException with message like "User-defined operator method '{0}' must be static."
  1538. /// </summary>
  1539. internal static Exception UserDefinedOperatorMustBeStatic(object p0) {
  1540. return new ArgumentException(Strings.UserDefinedOperatorMustBeStatic(p0));
  1541. }
  1542. /// <summary>
  1543. /// ArgumentException with message like "User-defined operator method '{0}' must not be void."
  1544. /// </summary>
  1545. internal static Exception UserDefinedOperatorMustNotBeVoid(object p0) {
  1546. return new ArgumentException(Strings.UserDefinedOperatorMustNotBeVoid(p0));
  1547. }
  1548. /// <summary>
  1549. /// InvalidOperationException with message like "No coercion operator is defined between types '{0}' and '{1}'."
  1550. /// </summary>
  1551. internal static Exception CoercionOperatorNotDefined(object p0, object p1) {
  1552. return new InvalidOperationException(Strings.CoercionOperatorNotDefined(p0, p1));
  1553. }
  1554. /// <summary>
  1555. /// 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."
  1556. /// </summary>
  1557. internal static Exception DynamicBinderResultNotAssignable(object p0, object p1, object p2) {
  1558. return new InvalidCastException(Strings.DynamicBinderResultNotAssignable(p0, p1, p2));
  1559. }
  1560. /// <summary>
  1561. /// 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."
  1562. /// </summary>
  1563. internal static Exception DynamicObjectResultNotAssignable(object p0, object p1, object p2, object p3) {
  1564. return new InvalidCastException(Strings.DynamicObjectResultNotAssignable(p0, p1, p2, p3));
  1565. }
  1566. /// <summary>
  1567. /// 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."
  1568. /// </summary>
  1569. internal static Exception DynamicBindingNeedsRestrictions(object p0, object p1) {
  1570. return new InvalidOperationException(Strings.DynamicBindingNeedsRestrictions(p0, p1));
  1571. }
  1572. /// <summary>
  1573. /// 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."
  1574. /// </summary>
  1575. internal static Exception BinderNotCompatibleWithCallSite(object p0, object p1, object p2) {
  1576. return new InvalidOperationException(Strings.BinderNotCompatibleWithCallSite(p0, p1, p2));
  1577. }
  1578. /// <summary>
  1579. /// InvalidOperationException with message like "The unary operator {0} is not defined for the type '{1}'."
  1580. /// </summary>
  1581. internal static Exception UnaryOperatorNotDefined(object p0, object p1) {
  1582. return new InvalidOperationException(Strings.UnaryOperatorNotDefined(p0, p1));
  1583. }
  1584. /// <summary>
  1585. /// InvalidOperationException with message like "The binary operator {0} is not defined for the types '{1}' and '{2}'."
  1586. /// </summary>
  1587. internal static Exception BinaryOperatorNotDefined(object p0, object p1, object p2) {
  1588. return new InvalidOperationException(Strings.BinaryOperatorNotDefined(p0, p1, p2));
  1589. }
  1590. /// <summary>
  1591. /// InvalidOperationException with message like "Reference equality is not defined for the types '{0}' and '{1}'."
  1592. /// </summary>
  1593. internal static Exception ReferenceEqualityNotDefined(object p0, object p1) {
  1594. return new InvalidOperationException(Strings.ReferenceEqualityNotDefined(p0, p1));
  1595. }
  1596. /// <summary>
  1597. /// InvalidOperationException with message like "The operands for operator '{0}' do not match the parameters of method '{1}'."
  1598. /// </summary>
  1599. internal static Exception OperandTypesDoNotMatchParameters(object p0, object p1) {
  1600. return new InvalidOperationException(Strings.OperandTypesDoNotMatchParameters(p0, p1));
  1601. }
  1602. /// <summary>
  1603. /// InvalidOperationException with message like "The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'."
  1604. /// </summary>
  1605. internal static Exception OverloadOperatorTypeDoesNotMatchConversionType(object p0, object p1) {
  1606. return new InvalidOperationException(Strings.OverloadOperatorTypeDoesNotMatchConversionType(p0, p1));
  1607. }
  1608. /// <summary>
  1609. /// InvalidOperationException with message like "Conversion is not supported for arithmetic types without operator overloading."
  1610. /// </summary>
  1611. internal static Exception ConversionIsNotSupportedForArithmeticTypes() {
  1612. return new InvalidOperationException(Strings.ConversionIsNotSupportedForArithmeticTypes);
  1613. }
  1614. /// <summary>
  1615. /// ArgumentException with message like "Argument must be array"
  1616. /// </summary>
  1617. internal static Exception ArgumentMustBeArray() {
  1618. return new ArgumentException(Strings.ArgumentMustBeArray);
  1619. }
  1620. /// <summary>
  1621. /// ArgumentException with message like "Argument must be boolean"
  1622. /// </summary>
  1623. internal static Exception ArgumentMustBeBoolean() {
  1624. return new ArgumentException(Strings.ArgumentMustBeBoolean);
  1625. }
  1626. /// <summary>
  1627. /// ArgumentException with message like "The user-defined equality method '{0}' must return a boolean value."
  1628. /// </summary>
  1629. internal static Exception EqualityMustReturnBoolean(object p0) {
  1630. return new ArgumentException(Strings.EqualityMustReturnBoolean(p0));
  1631. }
  1632. /// <summary>
  1633. /// ArgumentException with message like "Argument must be either a FieldInfo or PropertyInfo"
  1634. /// </summary>
  1635. internal static Exception ArgumentMustBeFieldInfoOrPropertInfo() {
  1636. return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertInfo);
  1637. }
  1638. /// <summary>
  1639. /// ArgumentException with message like "Argument must be either a FieldInfo, PropertyInfo or MethodInfo"
  1640. /// </summary>
  1641. internal static Exception ArgumentMustBeFieldInfoOrPropertInfoOrMethod() {
  1642. return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertInfoOrMethod);
  1643. }
  1644. /// <summary>
  1645. /// ArgumentException with message like "Argument must be an instance member"
  1646. /// </summary>
  1647. internal static Exception ArgumentMustBeInstanceMember() {
  1648. return new ArgumentException(Strings.ArgumentMustBeInstanceMember);
  1649. }
  1650. /// <summary>
  1651. /// ArgumentException with message like "Argument must be of an integer type"
  1652. /// </summary>
  1653. internal static Exception ArgumentMustBeInteger() {
  1654. return new ArgumentException(Strings.ArgumentMustBeInteger);
  1655. }
  1656. /// <summary>
  1657. /// ArgumentException with message like "Argument for array index must be of type Int32"
  1658. /// </summary>
  1659. internal static Exception ArgumentMustBeArrayIndexType() {
  1660. return new ArgumentException(Strings.ArgumentMustBeArrayIndexType);
  1661. }
  1662. /// <summary>
  1663. /// ArgumentException with message like "Argument must be single dimensional array type"
  1664. /// </summary>
  1665. internal static Exception ArgumentMustBeSingleDimensionalArrayType() {
  1666. return new ArgumentException(Strings.ArgumentMustBeSingleDimensionalArrayType);
  1667. }
  1668. /// <summary>
  1669. /// ArgumentException with message like "Argument types do not match"
  1670. /// </summary>
  1671. internal static Exception ArgumentTypesMustMatch() {
  1672. return new ArgumentException(Strings.ArgumentTypesMustMatch);
  1673. }
  1674. /// <summary>
  1675. /// InvalidOperationException with message like "Cannot auto initialize elements of value type through property '{0}', use assignment instead"
  1676. /// </summary>
  1677. internal static Exception CannotAutoInitializeValueTypeElementThroughProperty(object p0) {
  1678. return new InvalidOperationException(Strings.CannotAutoInitializeValueTypeElementThroughProperty(p0));
  1679. }
  1680. /// <summary>
  1681. /// InvalidOperationException with message like "Cannot auto initialize members of value type through property '{0}', use assignment instead"
  1682. /// </summary>
  1683. internal static Exception CannotAutoInitializeValueTypeMemberThroughProperty(object p0) {
  1684. return new InvalidOperationException(Strings.CannotAutoInitializeValueTypeMemberThroughProperty(p0));
  1685. }
  1686. /// <summary>
  1687. /// ArgumentException with message like "The type used in TypeAs Expression must be of reference or nullable type, {0} is neither"
  1688. /// </summary>
  1689. internal static Exception IncorrectTypeForTypeAs(object p0) {
  1690. return new ArgumentException(Strings.IncorrectTypeForTypeAs(p0));
  1691. }
  1692. /// <summary>
  1693. /// InvalidOperationException with message like "Coalesce used with type that cannot be null"
  1694. /// </summary>
  1695. internal static Exception CoalesceUsedOnNonNullType() {
  1696. return new InvalidOperationException(Strings.CoalesceUsedOnNonNullType);
  1697. }
  1698. /// <summary>
  1699. /// InvalidOperationException with message like "An expression of type '{0}' cannot be used to initialize an array of type '{1}'"
  1700. /// </summary>
  1701. internal static Exception ExpressionTypeCannotInitializeArrayType(object p0, object p1) {
  1702. return new InvalidOperationException(Strings.ExpressionTypeCannotInitializeArrayType(p0, p1));
  1703. }
  1704. /// <summary>
  1705. /// ArgumentException with message like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'"
  1706. /// </summary>
  1707. internal static Exception ExpressionTypeDoesNotMatchConstructorParameter(object p0, object p1) {
  1708. return new ArgumentException(Strings.ExpressionTypeDoesNotMatchConstructorParameter(p0, p1));
  1709. }
  1710. /// <summary>
  1711. /// ArgumentException with message like " Argument type '{0}' does not match the corresponding member type '{1}'"
  1712. /// </summary>
  1713. internal static Exception ArgumentTypeDoesNotMatchMember(object p0, object p1) {
  1714. return new ArgumentException(Strings.ArgumentTypeDoesNotMatchMember(p0, p1));
  1715. }
  1716. /// <summary>
  1717. /// ArgumentException with message like " The member '{0}' is not declared on type '{1}' being created"
  1718. /// </summary>
  1719. internal static Exception ArgumentMemberNotDeclOnType(object p0, object p1) {
  1720. return new ArgumentException(Strings.ArgumentMemberNotDeclOnType(p0, p1));
  1721. }
  1722. /// <summary>
  1723. /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'"
  1724. /// </summary>
  1725. internal static Exception ExpressionTypeDoesNotMatchMethodParameter(object p0, object p1, object p2) {
  1726. return new ArgumentException(Strings.ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2));
  1727. }
  1728. /// <summary>
  1729. /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}'"
  1730. /// </summary>
  1731. internal static Exception ExpressionTypeDoesNotMatchParameter(object p0, object p1) {
  1732. return new ArgumentException(Strings.ExpressionTypeDoesNotMatchParameter(p0, p1));
  1733. }
  1734. /// <summary>
  1735. /// ArgumentException with message like "Expression of type '{0}' cannot be used for return type '{1}'"
  1736. /// </summary>
  1737. internal static Exception ExpressionTypeDoesNotMatchReturn(object p0, object p1) {
  1738. return new ArgumentException(Strings.ExpressionTypeDoesNotMatchReturn(p0, p1));
  1739. }
  1740. /// <summary>
  1741. /// ArgumentException with message like "Expression of type '{0}' cannot be used for assignment to type '{1}'"
  1742. /// </summary>
  1743. internal static Exception ExpressionTypeDoesNotMatchAssignment(object p0, object p1) {
  1744. return new ArgumentException(Strings.ExpressionTypeDoesNotMatchAssignment(p0, p1));
  1745. }
  1746. /// <summary>
  1747. /// ArgumentException with message like "Expression of type '{0}' cannot be used for label of type '{1}'"
  1748. /// </summary>
  1749. internal static Exception ExpressionTypeDoesNotMatchLabel(object p0, object p1) {
  1750. return new ArgumentException(Strings.ExpressionTypeDoesNotMatchLabel(p0, p1));
  1751. }
  1752. /// <summary>
  1753. /// ArgumentException with message like "Expression of type '{0}' cannot be invoked"
  1754. /// </summary>
  1755. internal static Exception ExpressionTypeNotInvocable(object p0) {
  1756. return new ArgumentException(Strings.ExpressionTypeNotInvocable(p0));
  1757. }
  1758. /// <summary>
  1759. /// ArgumentException with message like "Field '{0}' is not defined for type '{1}'"
  1760. /// </summary>
  1761. internal static Exception FieldNotDefinedForType(object p0, object p1) {
  1762. return new ArgumentException(Strings.FieldNotDefinedForType(p0, p1));
  1763. }
  1764. /// <summary>
  1765. /// ArgumentException with message like "Instance field '{0}' is not defined for type '{1}'"
  1766. /// </summary>
  1767. internal static Exception InstanceFieldNotDefinedForType(object p0, object p1) {
  1768. return new ArgumentException(Strings.InstanceFieldNotDefinedForType(p0, p1));
  1769. }
  1770. /// <summary>
  1771. /// ArgumentException with message like "Field '{0}.{1}' is not defined for type '{2}'"
  1772. /// </summary>
  1773. internal static Exception FieldInfoNotDefinedForType(object p0, object p1, object p2) {
  1774. return new ArgumentException(Strings.FieldInfoNotDefinedForType(p0, p1, p2));
  1775. }
  1776. /// <summary>
  1777. /// ArgumentException with message like "Incorrect number of indexes"
  1778. /// </summary>
  1779. internal static Exception IncorrectNumberOfIndexes() {
  1780. return new ArgumentException(Strings.IncorrectNumberOfIndexes);
  1781. }
  1782. /// <summary>
  1783. /// InvalidOperationException with message like "Incorrect number of arguments supplied for lambda invocation"
  1784. /// </summary>
  1785. internal static Exception IncorrectNumberOfLambdaArguments() {
  1786. return new InvalidOperationException(Strings.IncorrectNumberOfLambdaArguments);
  1787. }
  1788. /// <summary>
  1789. /// ArgumentException with message like "Incorrect number of parameters supplied for lambda declaration"
  1790. /// </summary>
  1791. internal static Exception IncorrectNumberOfLambdaDeclarationParameters() {
  1792. return new ArgumentException(Strings.IncorrectNumberOfLambdaDeclarationParameters);
  1793. }
  1794. /// <summary>
  1795. /// ArgumentException with message like "Incorrect number of arguments supplied for call to method '{0}'"
  1796. /// </summary>
  1797. internal static Exception IncorrectNumberOfMethodCallArguments(object p0) {
  1798. return new ArgumentException(Strings.IncorrectNumberOfMethodCallArguments(p0));
  1799. }
  1800. /// <summary>
  1801. /// ArgumentException with message like "Incorrect number of arguments for constructor"
  1802. /// </summary>
  1803. internal static Exception IncorrectNumberOfConstructorArguments() {
  1804. return new ArgumentException(Strings.IncorrectNumberOfConstructorArguments);
  1805. }
  1806. /// <summary>
  1807. /// ArgumentException with message like " Incorrect number of members for constructor"
  1808. /// </summary>
  1809. internal static Exception IncorrectNumberOfMembersForGivenConstructor() {
  1810. return new ArgumentException(Strings.IncorrectNumberOfMembersForGivenConstructor);
  1811. }
  1812. /// <summary>
  1813. /// ArgumentException with message like "Incorrect number of arguments for the given members "
  1814. /// </summary>
  1815. internal static Exception IncorrectNumberOfArgumentsForMembers() {
  1816. return new ArgumentException(Strings.IncorrectNumberOfArgumentsForMembers);
  1817. }
  1818. /// <summary>
  1819. /// ArgumentException with message like "Lambda type parameter must be derived from System.Delegate"
  1820. /// </summary>
  1821. internal static Exception LambdaTypeMustBeDerivedFromSystemDelegate() {
  1822. return new ArgumentException(Strings.LambdaTypeMustBeDerivedFromSystemDelegate);
  1823. }
  1824. /// <summary>
  1825. /// ArgumentException with message like "Member '{0}' not field or property"
  1826. /// </summary>
  1827. internal static Exception MemberNotFieldOrProperty(object p0) {
  1828. return new ArgumentException(Strings.MemberNotFieldOrProperty(p0));
  1829. }
  1830. /// <summary>
  1831. /// ArgumentException with message like "Method {0} contains generic parameters"
  1832. /// </summary>
  1833. internal static Exception MethodContainsGenericParameters(object p0) {
  1834. return new ArgumentException(Strings.MethodContainsGenericParameters(p0));
  1835. }
  1836. /// <summary>
  1837. /// ArgumentException with message like "Method {0} is a generic method definition"
  1838. /// </summary>
  1839. internal static Exception MethodIsGeneric(object p0) {
  1840. return new ArgumentException(Strings.MethodIsGeneric(p0));
  1841. }
  1842. /// <summary>
  1843. /// ArgumentException with message like "The method '{0}.{1}' is not a property accessor"
  1844. /// </summary>
  1845. internal static Exception MethodNotPropertyAccessor(object p0, object p1) {
  1846. return new ArgumentException(Strings.MethodNotPropertyAccessor(p0, p1));
  1847. }
  1848. /// <summary>
  1849. /// ArgumentException with message like "The property '{0}' has no 'get' accessor"
  1850. /// </summary>
  1851. internal static Exception PropertyDoesNotHaveGetter(object p0) {
  1852. return new ArgumentException(Strings.PropertyDoesNotHaveGetter(p0));
  1853. }
  1854. /// <summary>
  1855. /// ArgumentException with message like "The property '{0}' has no 'set' accessor"
  1856. /// </summary>
  1857. internal static Exception PropertyDoesNotHaveSetter(object p0) {
  1858. return new ArgumentException(Strings.PropertyDoesNotHaveSetter(p0));
  1859. }
  1860. /// <summary>
  1861. /// ArgumentException with message like "The property '{0}' has no 'get' or 'set' accessors"
  1862. /// </summary>
  1863. internal static Exception PropertyDoesNotHaveAccessor(object p0) {
  1864. return new ArgumentException(Strings.PropertyDoesNotHaveAccessor(p0));
  1865. }
  1866. /// <summary>
  1867. /// ArgumentException with message like "'{0}' is not a member of type '{1}'"
  1868. /// </summary>
  1869. internal static Exception NotAMemberOfType(object p0, object p1) {
  1870. return new ArgumentException(Strings.NotAMemberOfType(p0, p1));
  1871. }
  1872. /// <summary>
  1873. /// NotImplementedException with message like "The operator '{0}' is not implemented for type '{1}'"
  1874. /// </summary>
  1875. internal static Exception OperatorNotImplementedForType(object p0, object p1) {
  1876. return new NotImplementedException(Strings.OperatorNotImplementedForType(p0, p1));
  1877. }
  1878. /// <summary>
  1879. /// ArgumentException with message like "ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'"
  1880. /// </summary>
  1881. internal static Exception ParameterExpressionNotValidAsDelegate(object p0, object p1) {
  1882. return new ArgumentException(Strings.ParameterExpressionNotValidAsDelegate(p0, p1));
  1883. }
  1884. /// <summary>
  1885. /// ArgumentException with message like "Property '{0}' is not defined for type '{1}'"
  1886. /// </summary>
  1887. internal static Exception PropertyNotDefinedForType(object p0, object p1) {
  1888. return new ArgumentException(Strings.PropertyNotDefinedForType(p0, p1));
  1889. }
  1890. /// <summary>
  1891. /// ArgumentException with message like "Instance property '{0}' is not defined for type '{1}'"
  1892. /// </summary>
  1893. internal static Exception InstancePropertyNotDefinedForType(object p0, object p1) {
  1894. return new ArgumentException(Strings.InstancePropertyNotDefinedForType(p0, p1));
  1895. }
  1896. /// <summary>
  1897. /// ArgumentException with message like "Instance property '{0}' that takes no argument is not defined for type '{1}'"
  1898. /// </summary>
  1899. internal static Exception InstancePropertyWithoutParameterNotDefinedForType(object p0, object p1) {
  1900. return new ArgumentException(Strings.InstancePropertyWithoutParameterNotDefinedForType(p0, p1));
  1901. }
  1902. /// <summary>
  1903. /// ArgumentException with message like "Instance property '{0}{1}' is not defined for type '{2}'"
  1904. /// </summary>
  1905. internal static Exception InstancePropertyWithSpecifiedParametersNotDefinedForType(object p0, object p1, object p2) {
  1906. return new ArgumentException(Strings.InstancePropertyWithSpecifiedParametersNotDefinedForType(p0, p1, p2));
  1907. }
  1908. /// <summary>
  1909. /// ArgumentException with message like "Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'"
  1910. /// </summary>
  1911. internal static Exception InstanceAndMethodTypeMismatch(object p0, object p1, object p2) {
  1912. return new ArgumentException(Strings.InstanceAndMethodTypeMismatch(p0, p1, p2));
  1913. }
  1914. /// <summary>
  1915. /// ArgumentException with message like "Type {0} contains generic parameters"
  1916. /// </summary>
  1917. internal static Exception TypeContainsGenericParameters(object p0) {
  1918. return new ArgumentException(Strings.TypeContainsGenericParameters(p0));
  1919. }
  1920. /// <summary>
  1921. /// ArgumentException with message like "Type {0} is a generic type definition"
  1922. /// </summary>
  1923. internal static Exception TypeIsGeneric(object p0) {
  1924. return new ArgumentException(Strings.TypeIsGeneric(p0));
  1925. }
  1926. /// <summary>
  1927. /// ArgumentException with message like "Type '{0}' does not have a default constructor"
  1928. /// </summary>
  1929. internal static Exception TypeMissingDefaultConstructor(object p0) {
  1930. return new ArgumentException(Strings.TypeMissingDefaultConstructor(p0));
  1931. }
  1932. /// <summary>
  1933. /// ArgumentException with message like "List initializers must contain at least one initializer"
  1934. /// </summary>
  1935. internal static Exception ListInitializerWithZeroMembers() {
  1936. return new ArgumentException(Strings.ListInitializerWithZeroMembers);
  1937. }
  1938. /// <summary>
  1939. /// ArgumentException with message like "Element initializer method must be named 'Add'"
  1940. /// </summary>
  1941. internal static Exception ElementInitializerMethodNotAdd() {
  1942. return new ArgumentException(Strings.ElementInitializerMethodNotAdd);
  1943. }
  1944. /// <summary>
  1945. /// ArgumentException with message like "Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter"
  1946. /// </summary>
  1947. internal static Exception ElementInitializerMethodNoRefOutParam(object p0, object p1) {
  1948. return new ArgumentException(Strings.ElementInitializerMethodNoRefOutParam(p0, p1));
  1949. }
  1950. /// <summary>
  1951. /// ArgumentException with message like "Element initializer method must have at least 1 parameter"
  1952. /// </summary>
  1953. internal static Exception ElementInitializerMethodWithZeroArgs() {
  1954. return new ArgumentException(Strings.ElementInitializerMethodWithZeroArgs);
  1955. }
  1956. /// <summary>
  1957. /// ArgumentException with message like "Element initializer method must be an instance method"
  1958. /// </summary>
  1959. internal static Exception ElementInitializerMethodStatic() {
  1960. return new ArgumentException(Strings.ElementInitializerMethodStatic);
  1961. }
  1962. /// <summary>
  1963. /// ArgumentException with message like "Type '{0}' is not IEnumerable"
  1964. /// </summary>
  1965. internal static Exception TypeNotIEnumerable(object p0) {
  1966. return new ArgumentException(Strings.TypeNotIEnumerable(p0));
  1967. }
  1968. /// <summary>
  1969. /// InvalidOperationException with message like "Type parameter is {0}. Expected a delegate."
  1970. /// </summary>
  1971. internal static Exception TypeParameterIsNotDelegate(object p0) {
  1972. return new InvalidOperationException(Strings.TypeParameterIsNotDelegate(p0));
  1973. }
  1974. /// <summary>
  1975. /// InvalidOperationException with message like "Unexpected coalesce operator."
  1976. /// </summary>
  1977. internal static Exception UnexpectedCoalesceOperator() {
  1978. return new InvalidOperationException(Strings.UnexpectedCoalesceOperator);
  1979. }
  1980. /// <summary>
  1981. /// InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}"
  1982. /// </summary>
  1983. internal static Exception InvalidCast(object p0, object p1) {
  1984. return new InvalidOperationException(Strings.InvalidCast(p0, p1));
  1985. }
  1986. /// <summary>
  1987. /// ArgumentException with message like "Unhandled binary: {0}"
  1988. /// </summary>
  1989. internal static Exception UnhandledBinary(object p0) {
  1990. return new ArgumentException(Strings.UnhandledBinary(p0));
  1991. }
  1992. /// <summary>
  1993. /// ArgumentException with message like "Unhandled binding "
  1994. /// </summary>
  1995. internal static Exception UnhandledBinding() {
  1996. return new ArgumentException(Strings.UnhandledBinding);
  1997. }
  1998. /// <summary>
  1999. /// ArgumentException with message like "Unhandled Binding Type: {0}"
  2000. /// </summary>
  2001. internal static Exception UnhandledBindingType(object p0) {
  2002. return new ArgumentException(Strings.UnhandledBindingType(p0));
  2003. }
  2004. /// <summary>
  2005. /// ArgumentException with message like "Unhandled convert: {0}"
  2006. /// </summary>
  2007. internal static Exception UnhandledConvert(object p0) {
  2008. return new ArgumentException(Strings.UnhandledConvert(p0));
  2009. }
  2010. /// <summary>
  2011. /// ArgumentException with message like "Unhandled Expression Type: {0}"
  2012. /// </summary>
  2013. internal static Exception UnhandledExpressionType(object p0) {
  2014. return new ArgumentException(Strings.UnhandledExpressionType(p0));
  2015. }
  2016. /// <summary>
  2017. /// ArgumentException with message like "Unhandled unary: {0}"
  2018. /// </summary>
  2019. internal static Exception UnhandledUnary(object p0) {
  2020. return new ArgumentException(Strings.UnhandledUnary(p0));
  2021. }
  2022. /// <summary>
  2023. /// ArgumentException with message like "Unknown binding type"
  2024. /// </summary>
  2025. internal static Exception UnknownBindingType() {
  2026. return new ArgumentException(Strings.UnknownBindingType);
  2027. }
  2028. /// <summary>
  2029. /// ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types."
  2030. /// </summary>
  2031. internal static Exception UserDefinedOpMustHaveConsistentTypes(object p0, object p1) {
  2032. return new ArgumentException(Strings.UserDefinedOpMustHaveConsistentTypes(p0, p1));
  2033. }
  2034. /// <summary>
  2035. /// 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."
  2036. /// </summary>
  2037. internal static Exception UserDefinedOpMustHaveValidReturnType(object p0, object p1) {
  2038. return new ArgumentException(Strings.UserDefinedOpMustHaveValidReturnType(p0, p1));
  2039. }
  2040. /// <summary>
  2041. /// ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators."
  2042. /// </summary>
  2043. internal static Exception LogicalOperatorMustHaveBooleanOperators(object p0, object p1) {
  2044. return new ArgumentException(Strings.LogicalOperatorMustHaveBooleanOperators(p0, p1));
  2045. }
  2046. /// <summary>
  2047. /// InvalidOperationException with message like "No method '{0}' exists on type '{1}'."
  2048. /// </summary>
  2049. internal static Exception MethodDoesNotExistOnType(object p0, object p1) {
  2050. return new InvalidOperationException(Strings.MethodDoesNotExistOnType(p0, p1));
  2051. }
  2052. /// <summary>
  2053. /// InvalidOperationException with message like "No method '{0}' on type '{1}' is compatible with the supplied arguments."
  2054. /// </summary>
  2055. internal static Exception MethodWithArgsDoesNotExistOnType(object p0, object p1) {
  2056. return new InvalidOperationException(Strings.MethodWithArgsDoesNotExistOnType(p0, p1));
  2057. }
  2058. /// <summary>
  2059. /// 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. "
  2060. /// </summary>
  2061. internal static Exception GenericMethodWithArgsDoesNotExistOnType(object p0, object p1) {
  2062. return new InvalidOperationException(Strings.GenericMethodWithArgsDoesNotExistOnType(p0, p1));
  2063. }
  2064. /// <summary>
  2065. /// InvalidOperationException with message like "More than one method '{0}' on type '{1}' is compatible with the supplied arguments."
  2066. /// </summary>
  2067. internal static Exception MethodWithMoreThanOneMatch(object p0, object p1) {
  2068. return new InvalidOperationException(Strings.MethodWithMoreThanOneMatch(p0, p1));
  2069. }
  2070. /// <summary>
  2071. /// InvalidOperationException with message like "More than one property '{0}' on type '{1}' is compatible with the supplied arguments."
  2072. /// </summary>
  2073. internal static Exception PropertyWithMoreThanOneMatch(object p0, object p1) {
  2074. return new InvalidOperationException(Strings.PropertyWithMoreThanOneMatch(p0, p1));
  2075. }
  2076. /// <summary>
  2077. /// ArgumentException with message like "An incorrect number of type args were specified for the declaration of a Func type."
  2078. /// </summary>
  2079. internal static Exception IncorrectNumberOfTypeArgsForFunc() {
  2080. return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForFunc);
  2081. }
  2082. /// <summary>
  2083. /// ArgumentException with message like "An incorrect number of type args were specified for the declaration of an Action type."
  2084. /// </summary>
  2085. internal static Exception IncorrectNumberOfTypeArgsForAction() {
  2086. return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForAction);
  2087. }
  2088. /// <summary>
  2089. /// ArgumentException with message like "Argument type cannot be System.Void."
  2090. /// </summary>
  2091. internal static Exception ArgumentCannotBeOfTypeVoid() {
  2092. return new ArgumentException(Strings.ArgumentCannotBeOfTypeVoid);
  2093. }
  2094. /// <summary>
  2095. /// System.Reflection.AmbiguousMatchException with message like "More than one key matching '{0}' was found in the ExpandoObject."
  2096. /// </summary>
  2097. internal static Exception AmbiguousMatchInExpandoObject(object p0) {
  2098. return new System.Reflection.AmbiguousMatchException(Strings.AmbiguousMatchInExpandoObject(p0));
  2099. }
  2100. /// <summary>
  2101. /// ArgumentException with message like "An element with the same key '{0}' already exists in the ExpandoObject."
  2102. /// </summary>
  2103. internal static Exception SameKeyExistsInExpando(object p0) {
  2104. return new ArgumentException(Strings.SameKeyExistsInExpando(p0));
  2105. }
  2106. /// <summary>
  2107. /// System.Collections.Generic.KeyNotFoundException with message like "The specified key '{0}' does not exist in the ExpandoObject."
  2108. /// </summary>
  2109. internal static Exception KeyDoesNotExistInExpando(object p0) {
  2110. return new System.Collections.Generic.KeyNotFoundException(Strings.KeyDoesNotExistInExpando(p0));
  2111. }
  2112. /// <summary>
  2113. /// InvalidOperationException with message like "No or Invalid rule produced"
  2114. /// </summary>
  2115. internal static Exception NoOrInvalidRuleProduced() {
  2116. return new InvalidOperationException(Strings.NoOrInvalidRuleProduced);
  2117. }
  2118. /// <summary>
  2119. /// ArgumentException with message like "First argument of delegate must be CallSite"
  2120. /// </summary>
  2121. internal static Exception FirstArgumentMustBeCallSite() {
  2122. return new ArgumentException(Strings.FirstArgumentMustBeCallSite);
  2123. }
  2124. /// <summary>
  2125. /// InvalidOperationException with message like "Bind cannot return null."
  2126. /// </summary>
  2127. internal static Exception BindingCannotBeNull() {
  2128. return new InvalidOperationException(Strings.BindingCannotBeNull);
  2129. }
  2130. /// <summary>
  2131. /// ArgumentException with message like "Invalid operation: '{0}'"
  2132. /// </summary>
  2133. internal static Exception InvalidOperation(object p0) {
  2134. return new ArgumentException(Strings.InvalidOperation(p0));
  2135. }
  2136. /// <summary>
  2137. /// ArgumentOutOfRangeException with message like "{0} must be greater than or equal to {1}"
  2138. /// </summary>
  2139. internal static Exception OutOfRange(object p0, object p1) {
  2140. return new ArgumentOutOfRangeException(Strings.OutOfRange(p0, p1));
  2141. }
  2142. /// <summary>
  2143. /// InvalidOperationException with message like "Queue empty."
  2144. /// </summary>
  2145. internal static Exception QueueEmpty() {
  2146. return new InvalidOperationException(Strings.QueueEmpty);
  2147. }
  2148. /// <summary>
  2149. /// InvalidOperationException with message like "Cannot redefine label '{0}' in an inner block."
  2150. /// </summary>
  2151. internal static Exception LabelTargetAlreadyDefined(object p0) {
  2152. return new InvalidOperationException(Strings.LabelTargetAlreadyDefined(p0));
  2153. }
  2154. /// <summary>
  2155. /// InvalidOperationException with message like "Cannot jump to undefined label '{0}'."
  2156. /// </summary>
  2157. internal static Exception LabelTargetUndefined(object p0) {
  2158. return new InvalidOperationException(Strings.LabelTargetUndefined(p0));
  2159. }
  2160. /// <summary>
  2161. /// InvalidOperationException with message like "Control cannot leave a finally block."
  2162. /// </summary>
  2163. internal static Exception ControlCannotLeaveFinally() {
  2164. return new InvalidOperationException(Strings.ControlCannotLeaveFinally);
  2165. }
  2166. /// <summary>
  2167. /// InvalidOperationException with message like "Control cannot leave a filter test."
  2168. /// </summary>
  2169. internal static Exception ControlCannotLeaveFilterTest() {
  2170. return new InvalidOperationException(Strings.ControlCannotLeaveFilterTest);
  2171. }
  2172. /// <summary>
  2173. /// InvalidOperationException with message like "Cannot jump to ambiguous label '{0}'."
  2174. /// </summary>
  2175. internal static Exception AmbiguousJump(object p0) {
  2176. return new InvalidOperationException(Strings.AmbiguousJump(p0));
  2177. }
  2178. /// <summary>
  2179. /// InvalidOperationException with message like "Control cannot enter a try block."
  2180. /// </summary>
  2181. internal static Exception ControlCannotEnterTry() {
  2182. return new InvalidOperationException(Strings.ControlCannotEnterTry);
  2183. }
  2184. /// <summary>
  2185. /// InvalidOperationException with message like "Control cannot enter an expression--only statements can be jumped into."
  2186. /// </summary>
  2187. internal static Exception ControlCannotEnterExpression() {
  2188. return new InvalidOperationException(Strings.ControlCannotEnterExpression);
  2189. }
  2190. /// <summary>
  2191. /// 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."
  2192. /// </summary>
  2193. internal static Exception NonLocalJumpWithValue(object p0) {
  2194. return new InvalidOperationException(Strings.NonLocalJumpWithValue(p0));
  2195. }
  2196. /// <summary>
  2197. /// InvalidOperationException with message like "Extension should have been reduced."
  2198. /// </summary>
  2199. internal static Exception ExtensionNotReduced() {
  2200. return new InvalidOperationException(Strings.ExtensionNotReduced);
  2201. }
  2202. /// <summary>
  2203. /// 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."
  2204. /// </summary>
  2205. internal static Exception CannotCompileConstant(object p0) {
  2206. return new InvalidOperationException(Strings.CannotCompileConstant(p0));
  2207. }
  2208. /// <summary>
  2209. /// NotSupportedException with message like "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite."
  2210. /// </summary>
  2211. internal static Exception CannotCompileDynamic() {
  2212. return new NotSupportedException(Strings.CannotCompileDynamic);
  2213. }
  2214. /// <summary>
  2215. /// InvalidOperationException with message like "Invalid lvalue for assignment: {0}."
  2216. /// </summary>
  2217. internal static Exception InvalidLvalue(object p0) {
  2218. return new InvalidOperationException(Strings.InvalidLvalue(p0));
  2219. }
  2220. /// <summary>
  2221. /// InvalidOperationException with message like "Invalid member type: {0}."
  2222. /// </summary>
  2223. internal static Exception InvalidMemberType(object p0) {
  2224. return new InvalidOperationException(Strings.InvalidMemberType(p0));
  2225. }
  2226. /// <summary>
  2227. /// InvalidOperationException with message like "unknown lift type: '{0}'."
  2228. /// </summary>
  2229. internal static Exception UnknownLiftType(object p0) {
  2230. return new InvalidOperationException(Strings.UnknownLiftType(p0));
  2231. }
  2232. /// <summary>
  2233. /// ArgumentException with message like "Invalid output directory."
  2234. /// </summary>
  2235. internal static Exception InvalidOutputDir() {
  2236. return new ArgumentException(Strings.InvalidOutputDir);
  2237. }
  2238. /// <summary>
  2239. /// ArgumentException with message like "Invalid assembly name or file extension."
  2240. /// </summary>
  2241. internal static Exception InvalidAsmNameOrExtension() {
  2242. return new ArgumentException(Strings.InvalidAsmNameOrExtension);
  2243. }
  2244. /// <summary>
  2245. /// NotSupportedException with message like "Collection is read-only."
  2246. /// </summary>
  2247. internal static Exception CollectionReadOnly() {
  2248. return new NotSupportedException(Strings.CollectionReadOnly);
  2249. }
  2250. /// <summary>
  2251. /// ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters"
  2252. /// </summary>
  2253. internal static Exception IllegalNewGenericParams(object p0) {
  2254. return new ArgumentException(Strings.IllegalNewGenericParams(p0));
  2255. }
  2256. /// <summary>
  2257. /// InvalidOperationException with message like "variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined"
  2258. /// </summary>
  2259. internal static Exception UndefinedVariable(object p0, object p1, object p2) {
  2260. return new InvalidOperationException(Strings.UndefinedVariable(p0, p1, p2));
  2261. }
  2262. /// <summary>
  2263. /// InvalidOperationException with message like "Cannot close over byref parameter '{0}' referenced in lambda '{1}'"
  2264. /// </summary>
  2265. internal static Exception CannotCloseOverByRef(object p0, object p1) {
  2266. return new InvalidOperationException(Strings.CannotCloseOverByRef(p0, p1));
  2267. }
  2268. /// <summary>
  2269. /// InvalidOperationException with message like "Unexpected VarArgs call to method '{0}'"
  2270. /// </summary>
  2271. internal static Exception UnexpectedVarArgsCall(object p0) {
  2272. return new InvalidOperationException(Strings.UnexpectedVarArgsCall(p0));
  2273. }
  2274. /// <summary>
  2275. /// InvalidOperationException with message like "Rethrow statement is valid only inside a Catch block."
  2276. /// </summary>
  2277. internal static Exception RethrowRequiresCatch() {
  2278. return new InvalidOperationException(Strings.RethrowRequiresCatch);
  2279. }
  2280. /// <summary>
  2281. /// InvalidOperationException with message like "Try expression is not allowed inside a filter body."
  2282. /// </summary>
  2283. internal static Exception TryNotAllowedInFilter() {
  2284. return new InvalidOperationException(Strings.TryNotAllowedInFilter);
  2285. }
  2286. /// <summary>
  2287. /// 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."
  2288. /// </summary>
  2289. internal static Exception MustRewriteToSameNode(object p0, object p1, object p2) {
  2290. return new InvalidOperationException(Strings.MustRewriteToSameNode(p0, p1, p2));
  2291. }
  2292. /// <summary>
  2293. /// 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."
  2294. /// </summary>
  2295. internal static Exception MustRewriteChildToSameType(object p0, object p1, object p2) {
  2296. return new InvalidOperationException(Strings.MustRewriteChildToSameType(p0, p1, p2));
  2297. }
  2298. /// <summary>
  2299. /// 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."
  2300. /// </summary>
  2301. internal static Exception MustRewriteWithoutMethod(object p0, object p1) {
  2302. return new InvalidOperationException(Strings.MustRewriteWithoutMethod(p0, p1));
  2303. }
  2304. /// <summary>
  2305. /// 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."
  2306. /// </summary>
  2307. internal static Exception TryNotSupportedForMethodsWithRefArgs(object p0) {
  2308. return new NotSupportedException(Strings.TryNotSupportedForMethodsWithRefArgs(p0));
  2309. }
  2310. /// <summary>
  2311. /// 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."
  2312. /// </summary>
  2313. internal static Exception TryNotSupportedForValueTypeInstances(object p0) {
  2314. return new NotSupportedException(Strings.TryNotSupportedForValueTypeInstances(p0));
  2315. }
  2316. /// <summary>
  2317. /// InvalidOperationException with message like "Collection was modified; enumeration operation may not execute."
  2318. /// </summary>
  2319. internal static Exception CollectionModifiedWhileEnumerating() {
  2320. return new InvalidOperationException(Strings.CollectionModifiedWhileEnumerating);
  2321. }
  2322. /// <summary>
  2323. /// InvalidOperationException with message like "Enumeration has either not started or has already finished."
  2324. /// </summary>
  2325. internal static Exception EnumerationIsDone() {
  2326. return new InvalidOperationException(Strings.EnumerationIsDone);
  2327. }
  2328. /// <summary>
  2329. /// InvalidOperationException with message like "Dynamic operations can only be performed in homogenous AppDomain."
  2330. /// </summary>
  2331. internal static Exception HomogenousAppDomainRequired() {
  2332. return new InvalidOperationException(Strings.HomogenousAppDomainRequired);
  2333. }
  2334. /// <summary>
  2335. /// ArgumentException with message like "Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
  2336. /// </summary>
  2337. internal static Exception TestValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
  2338. return new ArgumentException(Strings.TestValueTypeDoesNotMatchComparisonMethodParameter(p0, p1));
  2339. }
  2340. /// <summary>
  2341. /// ArgumentException with message like "Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'"
  2342. /// </summary>
  2343. internal static Exception SwitchValueTypeDoesNotMatchComparisonMethodParameter(object p0, object p1) {
  2344. return new ArgumentException(Strings.SwitchValueTypeDoesNotMatchComparisonMethodParameter(p0, p1));
  2345. }
  2346. /// <summary>
  2347. /// InvalidOperationException with message like "An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance."
  2348. /// </summary>
  2349. internal static Exception InvalidMetaObjectCreated(object p0) {
  2350. return new InvalidOperationException(Strings.InvalidMetaObjectCreated(p0));
  2351. }
  2352. /// <summary>
  2353. /// NotSupportedException with message like "DebugInfoGenerator created by CreatePdbGenerator can only be used with LambdaExpression.CompileToMethod."
  2354. /// </summary>
  2355. internal static Exception PdbGeneratorNeedsExpressionCompiler() {
  2356. return new NotSupportedException(Strings.PdbGeneratorNeedsExpressionCompiler);
  2357. }
  2358. }
  2359. // *** END GENERATED CODE ***
  2360. #endregion
  2361. }