SecurityTreatAsSafeAttribute.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132
  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. namespace System.Security
  5. {
  6. // SecurityTreatAsSafeAttribute:
  7. // Indicates that the code may contain violations to the security critical rules (e.g. transitions from
  8. // critical to non-public transparent, transparent to non-public critical, etc.), has been audited for
  9. // security concerns and is considered security clean.
  10. // At assembly-scope, all rule checks will be suppressed within the assembly and for calls made against the assembly.
  11. // At type-scope, all rule checks will be suppressed for members within the type and for calls made against the type.
  12. // At member level (e.g. field and method) the code will be treated as public - i.e. no rule checks for the members.
  13. [AttributeUsage(AttributeTargets.Assembly |
  14. AttributeTargets.Class |
  15. AttributeTargets.Struct |
  16. AttributeTargets.Enum |
  17. AttributeTargets.Constructor |
  18. AttributeTargets.Method |
  19. AttributeTargets.Field |
  20. AttributeTargets.Interface |
  21. AttributeTargets.Delegate,
  22. AllowMultiple = false,
  23. Inherited = false)]
  24. [Obsolete("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Please use the SecuritySafeCriticalAttribute instead.")]
  25. public sealed class SecurityTreatAsSafeAttribute : Attribute
  26. {
  27. public SecurityTreatAsSafeAttribute() { }
  28. }
  29. }