SyntaxFactory.SubStatement 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SubStatement(SyntaxToken) |
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。 |
SubStatement(String) |
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。 |
SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax) |
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。 |
SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax) |
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。 |
SubStatement(SyntaxToken)
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(Microsoft::CodeAnalysis::SyntaxToken identifier);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (Microsoft.CodeAnalysis.SyntaxToken identifier);
static member SubStatement : Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (identifier As SyntaxToken) As MethodStatementSyntax
参数
- identifier
- SyntaxToken
要声明的方法的名称。
返回
适用于
SubStatement(String)
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(System::String ^ identifier);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (string identifier);
static member SubStatement : string -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (identifier As String) As MethodStatementSyntax
参数
- identifier
- String
要声明的方法的名称。
返回
适用于
SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax)
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::TypeParameterListSyntax ^ typeParameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::HandlesClauseSyntax ^ handlesClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::ImplementsClauseSyntax ^ implementsClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax typeParameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax handlesClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax implementsClause);
static member SubStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax
参数
- attributeLists
- SyntaxList<AttributeListSyntax>
此声明上所有属性列表的列表。 如果未指定任何属性,则返回 Nothing。
- modifiers
- SyntaxTokenList
此声明上存在的所有修饰标记的列表。 如果未指定修饰符,则返回空列表。 可以使用 Modifiers 属性获取所有修饰符 ORed 的位字段版本,这在许多情况下更易于使用。
- identifier
- SyntaxToken
要声明的方法的名称。
- typeParameterList
- TypeParameterListSyntax
如果存在,则为此方法提供泛型类型参数的类型参数列表。 如果不存在泛型类型参数,则返回 Nothing。
- parameterList
- ParameterListSyntax
方法的参数列表,包括括号。 如果没有参数列表,则返回 Nothing。
- asClause
- SimpleAsClauseSyntax
描述返回类型的“As”子句。 如果不存在 As 子句,则返回 Nothing。
- handlesClause
- HandlesClauseSyntax
如果存在,则 Handles 子句指示此方法处理的事件。
- implementsClause
- ImplementsClauseSyntax
如果存在,则实现子句指示此方法实现的接口方法。
返回
适用于
SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax)
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
- Source:
- Syntax.xml.Main.Generated.vb
声明 Sub 或 Function 的语句。 如果此方法具有正文,则此语句将是具有 Kind=MethodDeclarationBlock 的 BlockStatement 的 Begin,该方法的正文将是该 BlockStatement 的 Body。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::TypeParameterListSyntax ^ typeParameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::HandlesClauseSyntax ^ handlesClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::ImplementsClauseSyntax ^ implementsClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax typeParameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax handlesClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax implementsClause);
static member SubStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax
参数
- attributeLists
- SyntaxList<AttributeListSyntax>
此声明上所有属性列表的列表。 如果未指定任何属性,则返回 Nothing。
- modifiers
- SyntaxTokenList
此声明上存在的所有修饰标记的列表。 如果未指定修饰符,则返回空列表。 可以使用 Modifiers 属性获取所有修饰符 ORed 的位字段版本,这在许多情况下更易于使用。
- subOrFunctionKeyword
- SyntaxToken
引入此方法声明的“Sub”或“Function”关键字。
- identifier
- SyntaxToken
要声明的方法的名称。
- typeParameterList
- TypeParameterListSyntax
如果存在,则为此方法提供泛型类型参数的类型参数列表。 如果不存在泛型类型参数,则返回 Nothing。
- parameterList
- ParameterListSyntax
方法的参数列表,包括括号。 如果没有参数列表,则返回 Nothing。
- asClause
- SimpleAsClauseSyntax
描述返回类型的“As”子句。 如果不存在 As 子句,则返回 Nothing。
- handlesClause
- HandlesClauseSyntax
如果存在,则 Handles 子句指示此方法处理的事件。
- implementsClause
- ImplementsClauseSyntax
如果存在,则实现子句指示此方法实现的接口方法。