Exemplo n.º 1
0
        private static TypePlaceholder[] CreateForwarderPlaceholders(int count, out string patternFragment)
        {
            var placeholders = new List<TypePlaceholder>(count);
            var sb = new StringBuilder();

            for (int i = 1; i <= count; i++)
            {
                var placeholder = new TypePlaceholder("forward" + i);
                sb.AppendFormat("${0}$", placeholder.Name);
                if (i < count)
                {
                    sb.Append(',');
                }
                placeholders.Add(placeholder);
            }

            patternFragment = sb.ToString();
            return placeholders.ToArray();
        }
Exemplo n.º 2
0
        private static TypePlaceholder[] CreateForwarderPlaceholders(int count, out string patternFragment)
        {
            var placeholders = new List<TypePlaceholder>(count);
            var sb = new StringBuilder();

            for (int i = 1; i <= count; i++)
            {
                var placeholder = new TypePlaceholder("forward" + i);
                sb.AppendFormat("${0}$", placeholder.Name);
                if (i < count)
                {
                    sb.Append(',');
                }
                placeholders.Add(placeholder);
            }

            patternFragment = sb.ToString();
            return placeholders.ToArray();
        }