ConnectedServiceSinglePage.CreateAuthenticatorAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建允许用户登录到服务的 ConnectedServiceAuthenticator。
public:
virtual System::Threading::Tasks::Task<Microsoft::VisualStudio::ConnectedServices::ConnectedServiceAuthenticator ^> ^ CreateAuthenticatorAsync();
public virtual System.Threading.Tasks.Task<Microsoft.VisualStudio.ConnectedServices.ConnectedServiceAuthenticator> CreateAuthenticatorAsync ();
abstract member CreateAuthenticatorAsync : unit -> System.Threading.Tasks.Task<Microsoft.VisualStudio.ConnectedServices.ConnectedServiceAuthenticator>
override this.CreateAuthenticatorAsync : unit -> System.Threading.Tasks.Task<Microsoft.VisualStudio.ConnectedServices.ConnectedServiceAuthenticator>
Public Overridable Function CreateAuthenticatorAsync () As Task(Of ConnectedServiceAuthenticator)
返回
返回 ConnectedServiceAuthenticator 实例的任务;如果提供程序不需要使用身份验证,则为 null。
注解
当对话框关闭时,连接的服务核心将在此实例上调用 Dispose () 。
使用 ConnectedServiceSinglePage 选项时,连接服务核心仅使用 ConnectedServiceAuthenticator 上的 View 属性。 但是,其他成员在单页实现中可能会有所帮助。 例如,当用户登录和注销或切换到其他帐户时,AuthenticationChanged 和 IsAuthenticated 成员会通知 ConnectedServiceSinglePage 类。