GetArrayTypeDesc() private method

private GetArrayTypeDesc ( Type type ) : TypeDesc
type System.Type
return TypeDesc
Example #1
0
        internal ArrayModel GetArrayModel(Type type)
        {
            TypeModel?model;

            if (!_arrayModels.TryGetValue(type, out model))
            {
                model = GetTypeModel(type);
                if (!(model is ArrayModel))
                {
                    TypeDesc typeDesc = _typeScope.GetArrayTypeDesc(type);
                    model = new ArrayModel(type, typeDesc, this);
                }
                _arrayModels.Add(type, model);
            }
            return((ArrayModel)model);
        }
Example #2
0
        internal ArrayModel GetArrayModel(Type type)
        {
            TypeModel model = (TypeModel)arrayModels[type];

            if (model == null)
            {
                model = GetTypeModel(type);
                if (!(model is ArrayModel))
                {
                    TypeDesc typeDesc = typeScope.GetArrayTypeDesc(type);
                    model = new ArrayModel(type, typeDesc, this);
                }
                arrayModels.Add(type, model);
            }
            return((ArrayModel)model);
        }