SqlClientFactory.cs 711 B

123456789101112131415161718192021222324
  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;
  6. using System.Data.Sql;
  7. using System.Data.Common;
  8. using System.Security;
  9. using System.Security.Permissions;
  10. namespace System.Data.SqlClient
  11. {
  12. partial class SqlClientFactory
  13. {
  14. public override bool CanCreateDataSourceEnumerator => true;
  15. public override DbDataSourceEnumerator CreateDataSourceEnumerator() =>
  16. SqlDataSourceEnumerator.Instance;
  17. public override CodeAccessPermission CreatePermission (PermissionState state) =>
  18. new SqlClientPermission(state);
  19. }
  20. }