protected override CodeGenerationSymbol Clone()
        {
            var result = new CodeGenerationMethodSymbol(this.ContainingType,
                                                        this.GetAttributes(), this.DeclaredAccessibility, this.Modifiers,
                                                        this.ReturnType, this.RefKind, this.ExplicitInterfaceImplementations,
                                                        this.Name, this.TypeParameters, this.Parameters, this.GetReturnTypeAttributes());

            CodeGenerationMethodInfo.Attach(result,
                                            CodeGenerationMethodInfo.GetIsNew(this),
                                            CodeGenerationMethodInfo.GetIsUnsafe(this),
                                            CodeGenerationMethodInfo.GetIsPartial(this),
                                            CodeGenerationMethodInfo.GetIsAsync(this),
                                            CodeGenerationMethodInfo.GetStatements(this),
                                            CodeGenerationMethodInfo.GetHandlesExpressions(this));

            return(result);
        }
        internal static IMethodSymbol CreateMethodSymbol(
            INamedTypeSymbol containingType,
            ImmutableArray <AttributeData> attributes,
            Accessibility accessibility, DeclarationModifiers modifiers,
            ITypeSymbol returnType,
            RefKind refKind,
            ImmutableArray <IMethodSymbol> explicitInterfaceImplementations, string name,
            ImmutableArray <ITypeParameterSymbol> typeParameters,
            ImmutableArray <IParameterSymbol> parameters,
            ImmutableArray <SyntaxNode> statements              = default,
            ImmutableArray <SyntaxNode> handlesExpressions      = default,
            ImmutableArray <AttributeData> returnTypeAttributes = default,
            MethodKind methodKind = MethodKind.Ordinary)
        {
            var result = new CodeGenerationMethodSymbol(containingType, attributes, accessibility, modifiers, returnType, refKind, explicitInterfaceImplementations, name, typeParameters, parameters, returnTypeAttributes, methodKind);

            CodeGenerationMethodInfo.Attach(result, modifiers.IsNew, modifiers.IsUnsafe, modifiers.IsPartial, modifiers.IsAsync, statements, handlesExpressions);
            return(result);
        }