Exemple #1
0
        public static DefaultTypeName FromFullName(string ns,
                                                   string name,
                                                   AssemblyName assembly = null)
        {
            int mangle;

            name = TypeName.StripMangle(name, out mangle);
            var result = new DefaultTypeName(assembly, name, ns);

            result.FinalizeGenerics(mangle);
            return(result);
        }
Exemple #2
0
        private void CopyGenericsTo(DefaultTypeName result)
        {
            if (_genericParameters != null)
            {
                int baseCount = DeclaringType == null ? 0 : DeclaringType.GenericParameterCount;
                var generics  = _genericParameters
                                .Where(t => !(t is RedirectedGenericParameterName))
                                .Select((t, i) => GenericParameterName.New(result, baseCount + i, t.Name)).ToArray();

                result.FinalizeGenerics(generics);
            }
        }