DbDataPermissionAttribute.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // System.Data.Common.DbDataPermissionAttribute.cs
  3. //
  4. // Authors:
  5. // Rodrigo Moya ([email protected])
  6. // Tim Coleman ([email protected])
  7. //
  8. // (C) Ximian, Inc
  9. // Copyright (C) Tim Coleman, 2002
  10. //
  11. using System;
  12. using System.Security.Permissions;
  13. namespace System.Data.Common {
  14. [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method)]
  15. [Serializable]
  16. public abstract class DBDataPermissionAttribute : CodeAccessSecurityAttribute
  17. {
  18. #region Fields
  19. SecurityAction securityAction;
  20. bool allowBlankPassword;
  21. #endregion // Fields
  22. #region Constructors
  23. protected DBDataPermissionAttribute (SecurityAction action)
  24. : base (action)
  25. {
  26. securityAction = action;
  27. allowBlankPassword = false;
  28. }
  29. #endregion // Constructors
  30. #region Properties
  31. public bool AllowBlankPassword {
  32. get { return allowBlankPassword; }
  33. set { allowBlankPassword = value; }
  34. }
  35. #endregion // Properties
  36. #region // Methods
  37. #if NET_1_2
  38. [MonoTODO]
  39. public bool ShouldSerializeConnectionString ()
  40. {
  41. throw new NotImplementedException ();
  42. }
  43. [MonoTODO]
  44. public bool ShouldSerializeKeyRestrictions ()
  45. {
  46. throw new NotImplementedException ();
  47. }
  48. #endif
  49. #endregion // Methods
  50. }
  51. }