Example #1
0
        private static Task <GenerateGenericUserInterfaceModel> GetGenericInterfaceModelTask(string typeName, string modelPrefix)
        {
            var type = CrocoTypeSearcher.FindFirstTypeByName(typeName);

            if (type == null)
            {
                return(Task.FromResult((GenerateGenericUserInterfaceModel)null));
            }

            return(GetModelByType(type, modelPrefix, true));
        }
        /// <summary>
        /// Получить документацию по типу данных
        /// </summary>
        /// <param name="typeName"></param>
        /// <returns></returns>
        public static CrocoTypeDescriptionResult GetTypeDocumentation(string typeName)
        {
            if (typeName == null)
            {
                return(null);
            }

            var type = CrocoTypeSearcher.FindFirstTypeByName(typeName, x => !x.IsGenericTypeDefinition);

            if (type == null)
            {
                return(null);
            }

            return(CrocoTypeDescription.GetDescription(type));
        }
Example #3
0
        private Type SearchTypeFromCache(string typeDisplayFullName)
        {
            if (TypeSearchMatchings.ContainsKey(typeDisplayFullName))
            {
                return(TypeSearchMatchings[typeDisplayFullName]);
            }

            var type = CrocoTypeSearcher.FindFirstTypeByName(typeDisplayFullName, x => !x.IsGenericTypeDefinition);

            if (type != null)
            {
                TypeSearchMatchings[typeDisplayFullName] = type;
            }

            return(type);
        }
Example #4
0
        public CrocoTypeDescription GetTypeDocumentation(string typeName)
        {
            if (typeName == null)
            {
                return(null);
            }

            var type = CrocoTypeSearcher.FindFirstTypeByName(typeName);

            if (type == null)
            {
                return(null);
            }

            return(CrocoTypeDescription.GetDescription(type));
        }