DbConnectionPoolOptions.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // System.Data.ProviderBase.DbConnectionPoolOptions
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. #if NET_1_2
  10. using System.Data.Common;
  11. namespace System.Data.ProviderBase {
  12. public sealed class DbConnectionPoolOptions
  13. {
  14. #region Fields
  15. bool poolByIdentity;
  16. int creationTimeout;
  17. bool hasTransactionAffinity;
  18. int loadBalanceTimeout;
  19. int maxPoolSize;
  20. int minPoolSize;
  21. bool useDeactivateQueue;
  22. #endregion // Fields
  23. #region Constructors
  24. [MonoTODO]
  25. public DbConnectionPoolOptions (bool poolByIdentity, int minPoolSize, int maxPoolSize, int creationTimeout, int loadBalanceTimeout, bool hasTransactionAffinity, bool useDeactivateQueue)
  26. {
  27. this.poolByIdentity = poolByIdentity;
  28. this.minPoolSize = minPoolSize;
  29. this.maxPoolSize = maxPoolSize;
  30. this.creationTimeout = creationTimeout;
  31. this.loadBalanceTimeout = loadBalanceTimeout;
  32. this.hasTransactionAffinity = hasTransactionAffinity;
  33. this.useDeactivateQueue = useDeactivateQueue;
  34. }
  35. #endregion // Constructors
  36. #region Properties
  37. public int CreationTimeout {
  38. get { return creationTimeout; }
  39. }
  40. public bool HasTransactionAffinity {
  41. get { return hasTransactionAffinity; }
  42. }
  43. public int LoadBalanceTimeout {
  44. get { return loadBalanceTimeout; }
  45. }
  46. public int MaxPoolSize {
  47. get { return maxPoolSize; }
  48. }
  49. public int MinPoolSize {
  50. get { return minPoolSize; }
  51. }
  52. public bool PoolByIdentity {
  53. get { return poolByIdentity; }
  54. }
  55. public bool UseDeactivateQueue {
  56. get { return useDeactivateQueue; }
  57. }
  58. [MonoTODO]
  59. public bool UseLoadBalancing {
  60. get { throw new NotImplementedException (); }
  61. }
  62. #endregion // Properties
  63. }
  64. }
  65. #endif