private static string TypeParameter(TypeParameterSyntax type) { var ret = Utility.TypeConstraints(type, TypeState.Instance.Partials.SelectMany(z => z.Syntax.As <TypeDeclarationSyntax>().ConstraintClauses)); if (ClassTags.NeedsClassTag(TypeState.Instance.Partials.First().Symbol, type.Identifier.ValueText)) { ret += " :ClassTag"; } return(ret); }
public static string TypeParameter(TypeParameterSyntax prm, IMethodSymbol methodSymbol, MethodDeclarationSyntax methodSyntax) { var identifier = Utility.TypeConstraints(prm, methodSyntax.ConstraintClauses); if (ClassTags.NeedsClassTag(methodSymbol, methodSyntax, prm.Identifier.ValueText)) { identifier += ":ClassTag"; } return(identifier); }