コード例 #1
0
        public static void SplitFullyQualifiedTypeName(string fullyQualifiedTypeName, out string typeName, out string assemblyName)
        {
            int?assemblyDelimiterIndex = ReflectionUtils.GetAssemblyDelimiterIndex(fullyQualifiedTypeName);

            if (!assemblyDelimiterIndex.HasValue)
            {
                typeName     = fullyQualifiedTypeName;
                assemblyName = null;
                return;
            }
            typeName     = fullyQualifiedTypeName.Substring(0, assemblyDelimiterIndex.GetValueOrDefault()).Trim();
            assemblyName = fullyQualifiedTypeName.Substring(assemblyDelimiterIndex.GetValueOrDefault() + 1, fullyQualifiedTypeName.Length - assemblyDelimiterIndex.GetValueOrDefault() - 1).Trim();
        }
コード例 #2
0
        public static void SplitFullyQualifiedTypeName(string fullyQualifiedTypeName, out string typeName, out string assemblyName)
        {
            int?assemblyDelimiterIndex = ReflectionUtils.GetAssemblyDelimiterIndex(fullyQualifiedTypeName);

            if (assemblyDelimiterIndex.get_HasValue())
            {
                typeName     = fullyQualifiedTypeName.Substring(0, assemblyDelimiterIndex.get_Value()).Trim();
                assemblyName = fullyQualifiedTypeName.Substring(assemblyDelimiterIndex.get_Value() + 1, fullyQualifiedTypeName.get_Length() - assemblyDelimiterIndex.get_Value() - 1).Trim();
            }
            else
            {
                typeName     = fullyQualifiedTypeName;
                assemblyName = null;
            }
        }
コード例 #3
0
ファイル: ReflectionUtils.cs プロジェクト: yunxuan0123/Piggy2
        public static StructMultiKey <string, string> SplitFullyQualifiedTypeName(string fullyQualifiedTypeName)
        {
            string str;
            string str1;
            int?   assemblyDelimiterIndex = ReflectionUtils.GetAssemblyDelimiterIndex(fullyQualifiedTypeName);

            if (!assemblyDelimiterIndex.HasValue)
            {
                str  = fullyQualifiedTypeName;
                str1 = null;
            }
            else
            {
                str  = fullyQualifiedTypeName.Trim(0, assemblyDelimiterIndex.GetValueOrDefault());
                str1 = fullyQualifiedTypeName.Trim(assemblyDelimiterIndex.GetValueOrDefault() + 1, fullyQualifiedTypeName.Length - assemblyDelimiterIndex.GetValueOrDefault() - 1);
            }
            return(new StructMultiKey <string, string>(str1, str));
        }
コード例 #4
0
ファイル: ReflectionUtils.cs プロジェクト: zha0/Cerberus
        public static StructMultiKey <string, string> SplitFullyQualifiedTypeName(string fullyQualifiedTypeName)
        {
            int?assemblyDelimiterIndex = ReflectionUtils.GetAssemblyDelimiterIndex(fullyQualifiedTypeName);

            string v;
            string v2;

            if (assemblyDelimiterIndex != null)
            {
                v  = fullyQualifiedTypeName.Trim(0, assemblyDelimiterIndex.GetValueOrDefault());
                v2 = fullyQualifiedTypeName.Trim(assemblyDelimiterIndex.GetValueOrDefault() + 1, fullyQualifiedTypeName.Length - assemblyDelimiterIndex.GetValueOrDefault() - 1);
            }
            else
            {
                v  = fullyQualifiedTypeName;
                v2 = null;
            }
            return(new StructMultiKey <string, string>(v2, v));
        }