PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Mono.Cecil/PointerType.cs

http://github.com/jbevain/cecil
C# | 43 lines | 25 code | 9 blank | 9 comment | 0 complexity | bc3eb521d9c6dfc4da814d1d9ecc4eb8 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
11using System;
12
13using MD = Mono.Cecil.Metadata;
14
15namespace Mono.Cecil {
16
17	public sealed class PointerType : TypeSpecification {
18
19		public override string Name {
20			get { return base.Name + "*"; }
21		}
22
23		public override string FullName {
24			get { return base.FullName + "*"; }
25		}
26
27		public override bool IsValueType {
28			get { return false; }
29			set { throw new InvalidOperationException (); }
30		}
31
32		public override bool IsPointer {
33			get { return true; }
34		}
35
36		public PointerType (TypeReference type)
37			: base (type)
38		{
39			Mixin.CheckType (type);
40			this.etype = MD.ElementType.Ptr;
41		}
42	}
43}