Пример #1
0
 private static TypeParameterListSyntax GenerateTypeParameterList(
     INamedTypeSymbol namedType,
     CodeGenerationOptions options
     )
 {
     return(TypeParameterGenerator.GenerateTypeParameterList(
                namedType.TypeParameters,
                options
                ));
 }
Пример #2
0
        private static DelegateDeclarationSyntax GenerateDelegateDeclaration(
            INamedTypeSymbol namedType,
            CodeGenerationDestination destination,
            CodeGenerationOptions options)
        {
            var invokeMethod = namedType.DelegateInvokeMethod;

            return(SyntaxFactory.DelegateDeclaration(
                       GenerateAttributeDeclarations(namedType, options),
                       GenerateModifiers(namedType, destination, options),
                       invokeMethod.ReturnType.GenerateTypeSyntax(),
                       namedType.Name.ToIdentifierToken(),
                       TypeParameterGenerator.GenerateTypeParameterList(namedType.TypeParameters, options),
                       ParameterGenerator.GenerateParameterList(invokeMethod.Parameters, isExplicit: false, options: options),
                       namedType.TypeParameters.GenerateConstraintClauses()));
        }
Пример #3
0
 private static TypeParameterListSyntax GenerateTypeParameterList(
     IMethodSymbol method, CodeGenerationOptions options)
 {
     return(TypeParameterGenerator.GenerateTypeParameterList(method.TypeParameters, options));
 }