AssemblyFlagsAttribute.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 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
  19. {
  20. get { return (uint)_flags; }
  21. }
  22. public int AssemblyFlags
  23. {
  24. get { return (int)_flags; }
  25. }
  26. [Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202")]
  27. public AssemblyFlagsAttribute(int assemblyFlags)
  28. {
  29. _flags = (AssemblyNameFlags)assemblyFlags;
  30. }
  31. public AssemblyFlagsAttribute(AssemblyNameFlags assemblyFlags)
  32. {
  33. _flags = assemblyFlags;
  34. }
  35. }
  36. }