Ejemplo n.º 1
0
 public static IEnumerable<string> TypeParams(CodeTypeParameterCollection typeParams)
 {
     return typeParams.Cast<CodeTypeParameter> ()
         .Select (p => Block ("typeparam", "name=\"" + p.Name + "\"",
             string.Format ("The {0} value type.", GetIndex (p.Name))))
         .SelectMany (x => x);
 }
Ejemplo n.º 2
0
 public static IEnumerable<string> TypeParams(CodeTypeParameterCollection typeParams, CodeTypeReference type)
 {
     return typeParams.Cast<CodeTypeParameter> ()
         .Select (p => Block ("typeparam", "name=\"" + p.Name + "\"",
             "A " + See (type) + (p.Name == "TResult" ? " return type." : " parameter type.")))
         .SelectMany (x => x);
 }
 /// <summary>
 /// Visits a <see cref="CodeTypeParameterCollection"/>.
 /// </summary>
 /// <param name="codeTypeParameterCollection">The <see cref="CodeTypeParameterCollection"/> to visit.</param>
 protected virtual void VisitCodeTypeParameterCollection(CodeTypeParameterCollection codeTypeParameterCollection)
 {
     // Visit all of the CodeTypeParameter items in the collection.
     foreach (CodeTypeParameter item in codeTypeParameterCollection.Cast<CodeTypeParameter>())
     {
         this.VisitCodeTypeParameter(item);
     }
 }