SqlAuthenticationToken(String, DateTimeOffset) 构造函数

定义

初始化 SqlAuthenticationToken 类的新实例。Initializes a new instance of the SqlAuthenticationToken class.

public:
 SqlAuthenticationToken(System::String ^ accessToken, DateTimeOffset expiresOn);
public SqlAuthenticationToken (string accessToken, DateTimeOffset expiresOn);
new System.Data.SqlClient.SqlAuthenticationToken : string * DateTimeOffset -> System.Data.SqlClient.SqlAuthenticationToken
Public Sub New (accessToken As String, expiresOn As DateTimeOffset)

参数

accessToken
String

访问令牌。The access token.

expiresOn
DateTimeOffset

令牌的过期时间。The token expiration time.

例外

accessToken 参数为 null 或为空。The accessToken parameter is null or empty.

适用于