AssemblyFlagsAttribute.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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.Reflection
  5. {
  6. [AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
  7. public sealed class AssemblyFlagsAttribute : Attribute
  8. {
  9. private readonly AssemblyNameFlags _flags;
  10. [Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202")]
  11. [CLSCompliant(false)]
  12. public AssemblyFlagsAttribute(uint flags)
  13. {
  14. _flags = (AssemblyNameFlags)flags;
  15. }
  16. [Obsolete("This property has been deprecated. Please use AssemblyFlags instead. https://go.microsoft.com/fwlink/?linkid=14202")]
  17. [CLSCompliant(false)]
  18. public uint Flags => (uint)_flags;
  19. public int AssemblyFlags => (int)_flags;
  20. [Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202")]
  21. public AssemblyFlagsAttribute(int assemblyFlags)
  22. {
  23. _flags = (AssemblyNameFlags)assemblyFlags;
  24. }
  25. public AssemblyFlagsAttribute(AssemblyNameFlags assemblyFlags)
  26. {
  27. _flags = assemblyFlags;
  28. }
  29. }
  30. }