Ejemplo n.º 1
0
        /// <summary>
        /// Gets the type that the field is an array of (assuming the field is for an array)
        /// </summary>
        /// <param name="field"></param>
        /// <param name="parentName"></param>
        /// <returns></returns>
        public Type GetArrayType(FieldSchema field)
        {
            var parentName   = Document.TypeLookup.ParentNameBySchema[field];
            var templateType = TemplateTypeByName.GetValueOrDefault(parentName);

            return(GetTemplatedType(field.Type, field.Template, templateType));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the type associated with a field, with the
        /// </summary>
        /// <param name="field"></param>
        /// <param name="parentName">The name of the compound or niObject that this object belongs to</param>
        /// <returns></returns>
        public Type GetFieldType(FieldSchema field)
        {
            var parentName   = Document.TypeLookup.ParentNameBySchema[field];
            var templateType = TemplateTypeByName.GetValueOrDefault(parentName);

            return(GetDimensionalType(field.Type, field.Template, field.Dimensions.Count, templateType));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get the type associated with the template argument of a field
        /// </summary>
        /// <param name="field"></param>
        /// <param name="parentName"></param>
        /// <returns></returns>
        public Type GetFieldTemplateType(FieldSchema field)
        {
            if (field.Template == null)
            {
                return(null);
            }
            var parentName   = Document.TypeLookup.ParentNameBySchema[field];
            var templateType = TemplateTypeByName.GetValueOrDefault(parentName);

            return(GetBaseType(field.Template, templateType));
        }