AuthorizationServiceClient 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AuthorizationServiceClient(IAuthorizationService, Boolean)
初始化 AuthorizationServiceClient 类的新实例。
public AuthorizationServiceClient(Microsoft.ServiceHub.Framework.Services.IAuthorizationService authorizationService, bool ownsAuthorizationService = true);
new Microsoft.ServiceHub.Framework.Services.AuthorizationServiceClient : Microsoft.ServiceHub.Framework.Services.IAuthorizationService * bool -> Microsoft.ServiceHub.Framework.Services.AuthorizationServiceClient
Public Sub New (authorizationService As IAuthorizationService, Optional ownsAuthorizationService As Boolean = true)
参数
- authorizationService
- IAuthorizationService
此实例将包装的授权服务的客户端代理。 如果它在释放时实现 IDisposable) ,则会 (释放它 AuthorizationServiceClient 。
- ownsAuthorizationService
- Boolean
true
如果释放此实例, authorizationService
则为 ;否则为 false
。
适用于
AuthorizationServiceClient(IAuthorizationService, JoinableTaskFactory, Boolean)
注意
Use the overload that does not accept a JoinableTaskFactory instead. This overload will be removed in a future release.
初始化 AuthorizationServiceClient 类的新实例。
[System.Obsolete("Use the overload that does not accept a JoinableTaskFactory instead. This overload will be removed in a future release.", true)]
public AuthorizationServiceClient(Microsoft.ServiceHub.Framework.Services.IAuthorizationService authorizationService, Microsoft.VisualStudio.Threading.JoinableTaskFactory? joinableTaskFactory, bool ownsAuthorizationService = true);
[<System.Obsolete("Use the overload that does not accept a JoinableTaskFactory instead. This overload will be removed in a future release.", true)>]
new Microsoft.ServiceHub.Framework.Services.AuthorizationServiceClient : Microsoft.ServiceHub.Framework.Services.IAuthorizationService * Microsoft.VisualStudio.Threading.JoinableTaskFactory * bool -> Microsoft.ServiceHub.Framework.Services.AuthorizationServiceClient
Public Sub New (authorizationService As IAuthorizationService, joinableTaskFactory As JoinableTaskFactory, Optional ownsAuthorizationService As Boolean = true)
参数
- authorizationService
- IAuthorizationService
此实例将包装的授权服务的客户端代理。 如果它在释放时实现 IDisposable) ,则会 (释放它 AuthorizationServiceClient 。
- joinableTaskFactory
- JoinableTaskFactory
如果授权服务需要main线程,则避免死锁。 可能为 null。
- ownsAuthorizationService
- Boolean
true
如果释放此实例, authorizationService
则为 ;否则为 false
。
- 属性