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 11 using System; 12 13 using MD = Mono.Cecil.Metadata; 14 15 namespace Mono.Cecil { 16 17 public sealed class PinnedType : TypeSpecification { 18 19 public override bool IsValueType { 20 get { return false; } 21 set { throw new InvalidOperationException (); } 22 } 23 24 public override bool IsPinned { 25 get { return true; } 26 } 27 PinnedType(TypeReference type)28 public PinnedType (TypeReference type) 29 : base (type) 30 { 31 Mixin.CheckType (type); 32 this.etype = MD.ElementType.Pinned; 33 } 34 } 35 } 36