IAuthentication 泛型接口

为用于封装身份验证域的域服务实例定义方法。

命名空间: System.ServiceModel.DomainServices.Server.ApplicationServices
程序集: System.ServiceModel.DomainServices.Server(在 system.servicemodel.domainservices.server.dll 中)

用法

用法
Dim instance As IAuthentication(Of T)

语法

声明
<AuthenticationServiceAttribute> _
Public Interface IAuthentication(Of T As IUser)
[AuthenticationServiceAttribute] 
public interface IAuthentication<T> where T : IUser
[AuthenticationServiceAttribute] 
generic<typename T> where T : IUser
public interface class IAuthentication

GenericParameters

  • T
    用户实体的类型。

备注

实现此接口的域服务将用于填充客户端和服务器上的用户。WebAuthenticationService 类可与针对任何实现此接口的域服务生成的 DomainContext 结合使用。

UpdateUser 方法是作为更新方法设计的,并通过在客户端上调用 SubmitChanges 方法进行调用。该实现所具有的一个重要特点是考虑了应用程序的开发时间。当通过调用 SaveUser 来调用 UpdateUser 方法时,您将提交已在 DomainContext 中进行的所有更改,并可能因此调用其他更新方法。相反,当对 DomainContext 调用其他更新方法时,您将提交域上下文中的所有更改并可能调用 UpdateUser 方法。

平台

开发平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 、Windows Server 2008 和 Windows 2000

目标平台

另请参见

参考

IAuthentication 成员
System.ServiceModel.DomainServices.Server.ApplicationServices 命名空间