共用方式為


SecurityTokenSerializer.ReadToken(XmlReader, SecurityTokenResolver) 方法

定義

讀取指定之 XML 讀取器所指向的安全性權杖。

public:
 System::IdentityModel::Tokens::SecurityToken ^ ReadToken(System::Xml::XmlReader ^ reader, System::IdentityModel::Selectors::SecurityTokenResolver ^ tokenResolver);
public System.IdentityModel.Tokens.SecurityToken ReadToken (System.Xml.XmlReader reader, System.IdentityModel.Selectors.SecurityTokenResolver tokenResolver);
member this.ReadToken : System.Xml.XmlReader * System.IdentityModel.Selectors.SecurityTokenResolver -> System.IdentityModel.Tokens.SecurityToken
Public Function ReadToken (reader As XmlReader, tokenResolver As SecurityTokenResolver) As SecurityToken

參數

reader
XmlReader

要讀取安全性權杖的 XmlReader

tokenResolver
SecurityTokenResolver

要判定安全性權杖類型的 SecurityTokenResolver

傳回

SecurityToken,表示已讀取的安全性權杖。

例外狀況

readernull

-或-

tokenResolvernull

備註

衍生自 SecurityTokenSerializer 類別的類別必須覆寫 ReadTokenCore(XmlReader, SecurityTokenResolver) 方法。 ReadToken(XmlReader, SecurityTokenResolver) 方法會呼叫 ReadTokenCore(XmlReader, SecurityTokenResolver) 方法。

適用於