SyntaxGenerator.MethodDeclaration Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Перегрузки
MethodDeclaration(IMethodSymbol, IEnumerable<SyntaxNode>) |
Создает объявление метода, соответствующее существующему символу метода. |
MethodDeclaration(String, IEnumerable<SyntaxNode>, IEnumerable<String>, SyntaxNode, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>) |
Создает объявление метода. |
MethodDeclaration(IMethodSymbol, IEnumerable<SyntaxNode>)
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
Создает объявление метода, соответствующее существующему символу метода.
public Microsoft.CodeAnalysis.SyntaxNode MethodDeclaration (Microsoft.CodeAnalysis.IMethodSymbol method, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> statements = default);
public Microsoft.CodeAnalysis.SyntaxNode MethodDeclaration (Microsoft.CodeAnalysis.IMethodSymbol method, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode>? statements = default);
member this.MethodDeclaration : Microsoft.CodeAnalysis.IMethodSymbol * seq<Microsoft.CodeAnalysis.SyntaxNode> -> Microsoft.CodeAnalysis.SyntaxNode
Public Function MethodDeclaration (method As IMethodSymbol, Optional statements As IEnumerable(Of SyntaxNode) = Nothing) As SyntaxNode
Параметры
- method
- IMethodSymbol
- statements
- IEnumerable<SyntaxNode>
Возвращаемое значение
Применяется к
MethodDeclaration(String, IEnumerable<SyntaxNode>, IEnumerable<String>, SyntaxNode, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>)
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
- Source:
- SyntaxGenerator.cs
Создает объявление метода.
public abstract Microsoft.CodeAnalysis.SyntaxNode MethodDeclaration (string name, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> parameters = default, System.Collections.Generic.IEnumerable<string> typeParameters = default, Microsoft.CodeAnalysis.SyntaxNode returnType = default, Microsoft.CodeAnalysis.Accessibility accessibility = Microsoft.CodeAnalysis.Accessibility.NotApplicable, Microsoft.CodeAnalysis.Editing.DeclarationModifiers modifiers = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> statements = default);
public abstract Microsoft.CodeAnalysis.SyntaxNode MethodDeclaration (string name, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode>? parameters = default, System.Collections.Generic.IEnumerable<string>? typeParameters = default, Microsoft.CodeAnalysis.SyntaxNode? returnType = default, Microsoft.CodeAnalysis.Accessibility accessibility = Microsoft.CodeAnalysis.Accessibility.NotApplicable, Microsoft.CodeAnalysis.Editing.DeclarationModifiers modifiers = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode>? statements = default);
public Microsoft.CodeAnalysis.SyntaxNode MethodDeclaration (string name, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode>? parameters = default, System.Collections.Generic.IEnumerable<string>? typeParameters = default, Microsoft.CodeAnalysis.SyntaxNode? returnType = default, Microsoft.CodeAnalysis.Accessibility accessibility = Microsoft.CodeAnalysis.Accessibility.NotApplicable, Microsoft.CodeAnalysis.Editing.DeclarationModifiers modifiers = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode>? statements = default);
abstract member MethodDeclaration : string * seq<Microsoft.CodeAnalysis.SyntaxNode> * seq<string> * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.Accessibility * Microsoft.CodeAnalysis.Editing.DeclarationModifiers * seq<Microsoft.CodeAnalysis.SyntaxNode> -> Microsoft.CodeAnalysis.SyntaxNode
member this.MethodDeclaration : string * seq<Microsoft.CodeAnalysis.SyntaxNode> * seq<string> * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.Accessibility * Microsoft.CodeAnalysis.Editing.DeclarationModifiers * seq<Microsoft.CodeAnalysis.SyntaxNode> -> Microsoft.CodeAnalysis.SyntaxNode
Public MustOverride Function MethodDeclaration (name As String, Optional parameters As IEnumerable(Of SyntaxNode) = Nothing, Optional typeParameters As IEnumerable(Of String) = Nothing, Optional returnType As SyntaxNode = Nothing, Optional accessibility As Accessibility = Microsoft.CodeAnalysis.Accessibility.NotApplicable, Optional modifiers As DeclarationModifiers = Nothing, Optional statements As IEnumerable(Of SyntaxNode) = Nothing) As SyntaxNode
Public Function MethodDeclaration (name As String, Optional parameters As IEnumerable(Of SyntaxNode) = Nothing, Optional typeParameters As IEnumerable(Of String) = Nothing, Optional returnType As SyntaxNode = Nothing, Optional accessibility As Accessibility = Microsoft.CodeAnalysis.Accessibility.NotApplicable, Optional modifiers As DeclarationModifiers = Nothing, Optional statements As IEnumerable(Of SyntaxNode) = Nothing) As SyntaxNode
Параметры
- name
- String
- parameters
- IEnumerable<SyntaxNode>
- typeParameters
- IEnumerable<String>
- returnType
- SyntaxNode
- accessibility
- Accessibility
- modifiers
- DeclarationModifiers
- statements
- IEnumerable<SyntaxNode>
Возвращаемое значение
Применяется к
Совместная работа с нами на GitHub
Источник этого содержимого можно найти на GitHub, где также можно создавать и просматривать проблемы и запросы на вытягивание. Дополнительные сведения см. в нашем руководстве для участников.