Exemplo n.º 1
0
        /// <summary>
        /// This is used for explicitly implemented interfaces to convert the template to the format used in the
        /// comments file.
        /// </summary>
        /// <param name="type">The explicitly implemented interface type</param>
        /// <param name="sb">The string builder to which the name is written</param>
        private static void WriteTemplate(TypeNode eiiType, StringBuilder sb)
        {
            // !EFW Use this instead of the template name as the type parameter may be different in the user's
            // code (i.e. Collection<TControl> instead of Collection<T>.
            string eiiClean = eiiType.GetFullUnmangledNameWithTypeParameters();

            eiiClean = eiiClean.Replace('.', '#');
            eiiClean = eiiClean.Replace('+', '#');  // !EFW - Treat nested class separators like periods
            eiiClean = eiiClean.Replace(',', '@');  // Change the separator between parameters
            eiiClean = eiiClean.Replace('<', '{');  // Change the parameter brackets
            eiiClean = eiiClean.Replace('>', '}');

            sb.Append(eiiClean);
        }