private void OutputTypeArguments(CodeTypeReferenceCollection typeArguments, StringBuilder sb, int count) { if (count == 0) { return; } if (typeArguments.Count == 0) { sb.Append("<>"); return; } sb.Append('<'); sb.Append(this.GetTypeOutput(typeArguments[0])); for (int i = 1; i < count; i++) { sb.Append(", "); sb.Append(this.GetTypeOutput(typeArguments[i])); } sb.Append('>'); }
public CodeTypeReferenceCollection(CodeTypeReferenceCollection value) { AddRange(value); }
private string GetTypeArguments(CodeTypeReferenceCollection collection) { StringBuilder stringBuilder = new StringBuilder(" <"); IEnumerator enumerator = collection.GetEnumerator(); try { while (enumerator.MoveNext()) { CodeTypeReference type = (CodeTypeReference)enumerator.Current; stringBuilder.Append(this.GetTypeOutput(type)); stringBuilder.Append(", "); } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } stringBuilder.Length--; stringBuilder[stringBuilder.Length - 1] = '>'; return stringBuilder.ToString(); }
public void AddRange(CodeTypeReferenceCollection value) { if (value == null) { throw new ArgumentNullException("value"); } int count = value.Count; for (int i = 0; i < count; i++) { Add(value[i]); } }