protected override TypeAttributes GetAttributeFlagsImpl() => typeImpl.Attributes;
+ public override bool IsSZArray => typeImpl.IsSZArray;
+
protected override bool IsArrayImpl() => typeImpl.IsArray;
protected override bool IsPrimitiveImpl() => typeImpl.IsPrimitive;
protected override bool IsByRefImpl() => typeImpl.IsByRef;
else if (elementType.IsByRef)
AddByRef();
- else if (elementType.IsSzArray)
+ else if (elementType.IsSZArray)
AddSzArray();
else if (elementType.IsArray)
return m_typeBuilder.Attributes;
}
+ public override bool IsSZArray => false;
+
protected override bool IsArrayImpl()
{
return false;
protected override TypeAttributes GetAttributeFlagsImpl() { return TypeAttributes.Public; }
+ public override bool IsSZArray => false;
+
protected override bool IsArrayImpl() { return false; }
protected override bool IsByRefImpl() { return false; }
}
else if (clsArgument.IsArray)
{
- if (clsArgument.IsSzArray)
+ if (clsArgument.IsSZArray)
{
AddElementType(CorElementType.SzArray);
#endregion
#region Type Overrides
- internal override bool IsSzArray
- {
- get
- {
- if (m_cRank > 1)
- return false;
-
- return m_isSzArray;
- }
- }
+ public override bool IsSZArray => m_cRank <= 1 && m_isSzArray;
public override Type MakePointerType()
{
return m_iAttr;
}
+ public override bool IsSZArray => false;
+
protected override bool IsArrayImpl()
{
return false;
public override EventInfo[] GetEvents(BindingFlags bindingAttr) { throw new NotSupportedException(); }
public override MemberInfo[] GetMembers(BindingFlags bindingAttr) { throw new NotSupportedException(); }
protected override TypeAttributes GetAttributeFlagsImpl() { return m_type.Attributes; }
+
+ public override bool IsSZArray => false;
+
protected override bool IsArrayImpl() { return false; }
protected override bool IsByRefImpl() { return false; }
protected override bool IsPointerImpl() { return false; }
}
}
- if (ReflectedType.IsSzArray)
+ if (ReflectedType.IsSZArray)
{
RuntimeType arrayType = (RuntimeType)ReflectedType.GetElementType();
// SZArrays implement the methods on IList`1, IEnumerable`1, and ICollection`1 with
// SZArrayHelper and some runtime magic. We don't have accurate interface maps for them.
- if (IsSzArray && ifaceType.IsGenericType)
+ if (IsSZArray && ifaceType.IsGenericType)
throw new ArgumentException(Environment.GetResourceString("Argument_ArrayGetInterfaceMap"));
int ifaceInstanceMethodCount = RuntimeTypeHandle.GetNumVirtuals(ifaceRtType);
#endregion
#region Arrays
- internal override bool IsSzArray
+ public sealed override bool IsSZArray
{
get
{
- return RuntimeTypeHandle.IsSzArray(this);
+ return RuntimeTypeHandle.IsSZArray(this);
}
}
return (corElemType == CorElementType.Array || corElemType == CorElementType.SzArray);
}
- internal static bool IsSzArray(RuntimeType type)
+ internal static bool IsSZArray(RuntimeType type)
{
CorElementType corElemType = GetCorElementType(type);
return (corElemType == CorElementType.SzArray);
get { return IsArrayImpl(); }
}
- internal virtual bool IsSzArray
+ public virtual bool IsSZArray
{
[Pure]
- get { return false; }
+ get { throw new NotImplementedException(); }
}
public virtual bool IsGenericType
List<int> elementTypes = new List<int>();
while (type.HasElementType)
{
- if (type.IsSzArray)
+ if (type.IsSZArray)
{
elementTypes.Add(SzArray);
}