SqlException.platformnotsupported.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Data.Common;
  6. using System.Data.SqlClient;
  7. using System.Runtime.Serialization;
  8. namespace System.Data.SqlClient
  9. {
  10. public class SqlException : DbException
  11. {
  12. const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlException is not supported on the current platform.";
  13. internal bool _doNotReconnect;
  14. static internal SqlException CreateException(SqlErrorCollection errorCollection, string serverVersion)
  15. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  16. static internal SqlException CreateException(SqlErrorCollection errorCollection, string serverVersion, SqlInternalConnectionTds internalConnection, Exception innerException = null)
  17. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  18. static internal SqlException CreateException(SqlErrorCollection errorCollection, string serverVersion, Guid conId, Exception innerException = null)
  19. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  20. SqlException () {}
  21. public override void GetObjectData (SerializationInfo si, StreamingContext context)
  22. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  23. public byte Class
  24. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  25. public Guid ClientConnectionId
  26. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  27. public SqlErrorCollection Errors
  28. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  29. public int LineNumber
  30. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  31. public override string Message
  32. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  33. public int Number
  34. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  35. public string Procedure
  36. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  37. public string Server
  38. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  39. public override string Source
  40. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  41. public byte State
  42. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  43. internal SqlException InternalClone()
  44. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  45. }
  46. }