SyntaxFactory.DeclareStatement 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
DeclareStatement(SyntaxKind, SyntaxToken, SyntaxToken, LiteralExpressionSyntax)
- 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
声明外部 DLL 方法的 Declare 语句。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName);
static member DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareStatement (kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax
参数
- kind
- SyntaxKind
一个 SyntaxKind ,表示特定类型的 DeclareStatementSyntax。 DeclareSubStatement 之一,DeclareFunctionStatement。
- subOrFunctionKeyword
- SyntaxToken
“Sub”或“Function”关键字 (keyword) 。
- identifier
- SyntaxToken
要声明的方法的名称。
- libraryName
- LiteralExpressionSyntax
具有库名称的字符串文本。
返回
适用于
DeclareStatement(SyntaxKind, SyntaxToken, String, LiteralExpressionSyntax)
- 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
声明外部 DLL 方法的 Declare 语句。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, System::String ^ identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, string identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName);
static member DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.SyntaxToken * string * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareStatement (kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As String, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax
参数
- kind
- SyntaxKind
一个 SyntaxKind ,表示特定类型的 DeclareStatementSyntax。 DeclareSubStatement 之一,DeclareFunctionStatement。
- subOrFunctionKeyword
- SyntaxToken
“Sub”或“Function”关键字 (keyword) 。
- identifier
- String
要声明的方法的名称。
- libraryName
- LiteralExpressionSyntax
具有库名称的字符串文本。
返回
适用于
DeclareStatement(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax)
- 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
声明外部 DLL 方法的 Declare 语句。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken charsetKeyword, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ aliasName, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken charsetKeyword, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax aliasName, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause);
static member DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareStatement (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax
参数
- kind
- SyntaxKind
一个 SyntaxKind ,表示特定类型的 DeclareStatementSyntax。 DeclareSubStatement 之一,DeclareFunctionStatement。
- attributeLists
- SyntaxList<AttributeListSyntax>
此声明上所有属性列表的列表。 如果未指定任何属性,则不返回任何属性。
- modifiers
- SyntaxTokenList
此声明上存在的所有修饰符标记的列表。 如果未指定修饰符,则返回空列表。 可以使用 Modifiers 属性获取所有修饰符 ORed 的位域版本(在许多情况下更易于使用)。
- charsetKeyword
- SyntaxToken
如果存在,关键字 (keyword) 定义外部方法的字符串转换语义。
- subOrFunctionKeyword
- SyntaxToken
“Sub”或“Function”关键字 (keyword) 。
- identifier
- SyntaxToken
要声明的方法的名称。
- libraryName
- LiteralExpressionSyntax
具有库名称的字符串文本。
- aliasName
- LiteralExpressionSyntax
具有别名的字符串文本。 如果不存在,则返回 Nothing。
- parameterList
- ParameterListSyntax
方法的参数列表,包括括号。 如果没有参数列表,则不返回任何内容。
- asClause
- SimpleAsClauseSyntax
描述返回类型的“As”子句。 如果没有 As 子句,则不返回任何内容。
返回
适用于
DeclareStatement(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, SyntaxToken, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax)
- 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
声明外部 DLL 方法的 Declare 语句。
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken declareKeyword, Microsoft::CodeAnalysis::SyntaxToken charsetKeyword, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::SyntaxToken libKeyword, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName, Microsoft::CodeAnalysis::SyntaxToken aliasKeyword, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ aliasName, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken declareKeyword, Microsoft.CodeAnalysis.SyntaxToken charsetKeyword, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.SyntaxToken libKeyword, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName, Microsoft.CodeAnalysis.SyntaxToken aliasKeyword, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax aliasName, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause);
static member DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareStatement (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, declareKeyword As SyntaxToken, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libKeyword As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasKeyword As SyntaxToken, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax
参数
- kind
- SyntaxKind
一个 SyntaxKind ,表示特定类型的 DeclareStatementSyntax。 DeclareSubStatement 之一,DeclareFunctionStatement。
- attributeLists
- SyntaxList<AttributeListSyntax>
此声明上所有属性列表的列表。 如果未指定任何属性,则不返回任何属性。
- modifiers
- SyntaxTokenList
此声明上存在的所有修饰符标记的列表。 如果未指定修饰符,则返回空列表。 可以使用 Modifiers 属性获取所有修饰符 ORed 的位域版本(在许多情况下更易于使用)。
- declareKeyword
- SyntaxToken
“Declare”关键字 (keyword) 。
- charsetKeyword
- SyntaxToken
如果存在,关键字 (keyword) 定义外部方法的字符串转换语义。
- subOrFunctionKeyword
- SyntaxToken
“Sub”或“Function”关键字 (keyword) 。
- identifier
- SyntaxToken
要声明的方法的名称。
- libKeyword
- SyntaxToken
“Lib”关键字 (keyword) 。
- libraryName
- LiteralExpressionSyntax
具有库名称的字符串文本。
- aliasKeyword
- SyntaxToken
如果存在,“别名”关键字 (keyword) 。 如果不存在,则返回 Nothing。
- aliasName
- LiteralExpressionSyntax
具有别名的字符串文本。 如果不存在,则返回 Nothing。
- parameterList
- ParameterListSyntax
方法的参数列表,包括括号。 如果没有参数列表,则不返回任何内容。
- asClause
- SimpleAsClauseSyntax
描述返回类型的“As”子句。 如果没有 As 子句,则不返回任何内容。