/Mono.Cecil/SentinelType.cs

http://github.com/jbevain/cecil · C# · 35 lines · 19 code · 7 blank · 9 comment · 0 complexity · a02bfc3def49aca6f65bfdb91405f6d5 MD5 · raw file

  1. //
  2. // Author:
  3. // Jb Evain (jbevain@gmail.com)
  4. //
  5. // Copyright (c) 2008 - 2015 Jb Evain
  6. // Copyright (c) 2008 - 2011 Novell, Inc.
  7. //
  8. // Licensed under the MIT/X11 license.
  9. //
  10. using System;
  11. using MD = Mono.Cecil.Metadata;
  12. namespace Mono.Cecil {
  13. public sealed class SentinelType : TypeSpecification {
  14. public override bool IsValueType {
  15. get { return false; }
  16. set { throw new InvalidOperationException (); }
  17. }
  18. public override bool IsSentinel {
  19. get { return true; }
  20. }
  21. public SentinelType (TypeReference type)
  22. : base (type)
  23. {
  24. Mixin.CheckType (type);
  25. this.etype = MD.ElementType.Sentinel;
  26. }
  27. }
  28. }