~ubuntu-branches/ubuntu/trusty/mono-addins/trusty-proposed

« back to all changes in this revision

Viewing changes to Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SentinelType.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-04-25 11:11:33 UTC
  • mfrom: (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110425111133-t05u5p7o5fxx70fu
Tags: 0.6-2
Upload to Unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Author:
5
5
//   Jb Evain (jbevain@gmail.com)
6
6
//
7
 
// (C) 2007 Jb Evain
 
7
// Copyright (c) 2008 - 2010 Jb Evain
8
8
//
9
9
// Permission is hereby granted, free of charge, to any person obtaining
10
10
// a copy of this software and associated documentation files (the
26
26
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
27
//
28
28
 
 
29
using System;
 
30
 
 
31
using MD = Mono.Cecil.Metadata;
 
32
 
29
33
namespace Mono.Cecil {
30
34
 
31
35
        public sealed class SentinelType : TypeSpecification {
32
36
 
33
 
                public SentinelType (TypeReference elementType) : base (elementType)
 
37
                public override bool IsValueType {
 
38
                        get { return false; }
 
39
                        set { throw new InvalidOperationException (); }
 
40
                }
 
41
 
 
42
                public override bool IsSentinel {
 
43
                        get { return true; }
 
44
                }
 
45
 
 
46
                public SentinelType (TypeReference type)
 
47
                        : base (type)
34
48
                {
 
49
                        Mixin.CheckType (type);
 
50
                        this.etype = MD.ElementType.Sentinel;
35
51
                }
36
52
        }
37
53
}