public override object NewInstance(IReflectClass componentType, ArrayInfo info) { Type type = GetNetType(componentType); if (info.Nullable()) { type = NullableType(type); } MultidimensionalArrayInfo multiDimensionalInfo = info as MultidimensionalArrayInfo; if (multiDimensionalInfo == null) { return System.Array.CreateInstance(type, info.ElementCount()); } int[] dimensions = multiDimensionalInfo.Dimensions(); if (dimensions.Length == 1) { return UnfoldArrayCreation(type, dimensions, 0); } return UnfoldArrayCreation(GetArrayType(type, dimensions.Length - 1), dimensions, 0); }
public override void Analyze(object obj, ArrayInfo info) { info.Nullable(IsNullableType(obj.GetType())); }