public ArrayType(TypeReference type, IEnumerable <ArrayDimension> dimensions)
            : base(type)
        {
            Mixin.CheckType(type);
            m_Dimensions = dimensions.ToReadOnlyCollectionOrNull();

            if (m_Dimensions.Count == 1 &&
                !m_Dimensions[0].IsSized)
            {
                m_Dimensions = null;
            }

            this.etype = MD.ElementType.Array;
        }
        public ArrayType(TypeReference type, int rank)
            : base(type)
        {
            Mixin.CheckType(type);

            if (rank == 1)
            {
                return;
            }

            m_Dimensions = new System.Collections.ObjectModel.ReadOnlyCollection <ArrayDimension>(new ArrayDimension[rank]);

            this.etype = MD.ElementType.Array;
        }
Пример #3
0
 public CustomAttributeArgument(TypeReference type, object value)
 {
     Mixin.CheckType(type);
     this.type  = type;
     this.value = value;
 }
Пример #4
0
 public PinnedType(TypeReference type)
     : base(type)
 {
     Mixin.CheckType(type);
     this.etype = MD.ElementType.Pinned;
 }
Пример #5
0
 public SentinelType(TypeReference type)
     : base(type)
 {
     Mixin.CheckType(type);
     this.etype = MD.ElementType.Sentinel;
 }
 public PointerType(TypeReference type)
     : base(type)
 {
     Mixin.CheckType(type);
     this.etype = MD.ElementType.Ptr;
 }
 public ArrayType(TypeReference type)
     : base(type)
 {
     Mixin.CheckType(type);
     this.etype = MD.ElementType.Array;
 }
Пример #8
0
 public ByReferenceType(TypeReference type)
     : base(type)
 {
     Mixin.CheckType(type);
     this.etype = MD.ElementType.ByRef;
 }