CSLE.CLS_Environment.GetTypeByKeyword C# (CSharp) Метод

GetTypeByKeyword() публичный Метод

public GetTypeByKeyword ( string keyword ) : ICLS_Type
keyword string
Результат ICLS_Type
        public ICLS_Type GetTypeByKeyword(string keyword)
        {
            ICLS_Type ret = null;
            if (string.IsNullOrEmpty(keyword))
            {
                return null;
            }
            if (typess.TryGetValue(keyword, out ret) == false)
            {
                if (keyword[keyword.Length - 1] == '>')
                {
                    int iis = keyword.IndexOf('<');
                    string func = keyword.Substring(0, iis);
                    List<string> _types = new List<string>();
                    int istart = iis + 1;
                    int inow = istart;
                    int dep = 0;
                    while (inow < keyword.Length)
                    {
                        if (keyword[inow] == '<')
                        {
                            dep++;
                        }
                        if (keyword[inow] == '>')
                        {
                            dep--;
                            if (dep < 0)
                            {
                                _types.Add(keyword.Substring(istart, inow - istart));
                                break;
                            }
                        }

                        if (keyword[inow] == ',' && dep == 0)
                        {
                            _types.Add(keyword.Substring(istart, inow - istart));
                            istart = inow + 1;
                            inow = istart;
                            continue; ;
                        }

                        inow++;
                    }

                    //var funk = keyword.Split(new char[] { '<', '>', ',' }, StringSplitOptions.RemoveEmptyEntries);
                    if (typess.ContainsKey(func))
                    {
                        Type gentype = GetTypeByKeyword(func).type;
                        if (gentype.IsGenericTypeDefinition)
                        {
                            Type[] types = new Type[_types.Count];
                            for (int i = 0; i < types.Length; i++)
                            {
                                CLType t = GetTypeByKeyword(_types[i]).type;
                                Type rt = t;
                                if (rt == null && t != null)
                                {
                                    rt = typeof(object);
                                }
                                types[i] = rt;
                            }
                            Type IType = gentype.MakeGenericType(types);
                            RegType(CSLE.RegHelper_Type.MakeType(IType, keyword));
                            return GetTypeByKeyword(keyword);
                        }

                    }
                }
                logger.Log_Error("(CLScript)类型未注册:" + keyword);

            }

            return ret;
        }
        public ICLS_Type GetTypeByKeywordQuiet(string keyword)