/Mono.Cecil/ReferenceType.cs

http://github.com/jbevain/cecil · C# · 43 lines · 25 code · 9 blank · 9 comment · 0 complexity · 209d9dd26e68e2433c32744bea1e6a25 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 ByReferenceType : TypeSpecification {
  14. public override string Name {
  15. get { return base.Name + "&"; }
  16. }
  17. public override string FullName {
  18. get { return base.FullName + "&"; }
  19. }
  20. public override bool IsValueType {
  21. get { return false; }
  22. set { throw new InvalidOperationException (); }
  23. }
  24. public override bool IsByReference {
  25. get { return true; }
  26. }
  27. public ByReferenceType (TypeReference type)
  28. : base (type)
  29. {
  30. Mixin.CheckType (type);
  31. this.etype = MD.ElementType.ByRef;
  32. }
  33. }
  34. }