Error.cs 862 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Text;
  5. namespace System.Data.Linq.SqlClient {
  6. /// <summary>
  7. /// DLinq-providerbase-specific custom exception factory.
  8. /// </summary>
  9. internal partial class Error {
  10. /// <summary>
  11. /// Exception thrown when a query cannot execute against a particular SQL server version.
  12. /// </summary>
  13. static internal Exception ExpressionNotSupportedForSqlServerVersion(Collection<string> reasons) {
  14. StringBuilder exceptionMessage = new StringBuilder(Strings.CannotTranslateExpressionToSql);
  15. foreach (string reason in reasons) {
  16. exceptionMessage.AppendLine(reason);
  17. }
  18. return new NotSupportedException(exceptionMessage.ToString());
  19. }
  20. }
  21. }