ToTokenSeparatedList() public static method

public static ToTokenSeparatedList ( IEnumerable items, string separator, bool includeSeparatorAtLast = false ) : string
items IEnumerable
separator string
includeSeparatorAtLast bool
return string
Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private string BuildClassInheritanceAndInterfaceImplementationList()
        {
            string baseClass = string.Empty;

            if (this.BaseClassName != null)
            {
                baseClass = string.Format("{0} {1}", Lexems.ExtendsKeyword, this.BaseClassName.Translate());
            }

            string implementationList = this.Interfaces.Count() > 0 ?
                                        string.Format("{0} {1}", Lexems.ImplementsKeyword, SyntaxUtility.ToTokenSeparatedList(
                                                          this.Interfaces.Select(unit => unit.Translate()), Lexems.Comma + " ")) :
                                        string.Empty;

            return(string.Format("{0} {1}", baseClass, implementationList));
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private string BuildInterfaceExtensionList()
        {
            string implementationList = this.Interfaces.Count() > 0 ?
                                        string.Format("{0} {1}", Lexems.ExtendsKeyword, SyntaxUtility.ToTokenSeparatedList(
                                                          this.Interfaces.Select(unit => unit.Translate()), Lexems.Comma + " ")) :
                                        string.Empty;

            return(implementationList);
        }