Пример #1
0
        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);
        }
Пример #2
0
        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);
        }