BoxAttribute.cs 858 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace MatrixIO.IO.Bmff
  6. {
  7. [AttributeUsage(AttributeTargets.Class, AllowMultiple=true)]
  8. public sealed class BoxAttribute : System.Attribute
  9. {
  10. public BoxType Type { get; private set; }
  11. public string Description { get; private set; }
  12. public BoxAttribute(string type, string description = null)
  13. {
  14. Type = new BoxType(type);
  15. Description = description;
  16. }
  17. public BoxAttribute(int type, string description = null)
  18. {
  19. Type = new BoxType((uint)type);
  20. Description = description;
  21. }
  22. public BoxAttribute(Guid uuid, string description = null)
  23. {
  24. Type = new BoxType(uuid);
  25. Description = description;
  26. }
  27. }
  28. }