Share via


UserBase Class

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Serves as the base class for user entities that pass principal values to the client.

Inheritance Hierarchy

System.Object
  System.ServiceModel.DomainServices.Server.ApplicationServices.UserBase

Namespace:  System.ServiceModel.DomainServices.Server.ApplicationServices
Assembly:  System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)

Syntax

'Declaration
Public MustInherit Class UserBase _
    Implements IUser, IPrincipal, IIdentity
'Usage
Dim instance As UserBase
public abstract class UserBase : IUser, 
    IPrincipal, IIdentity
public ref class UserBase abstract : IUser, 
    IPrincipal, IIdentity
[<AbstractClassAttribute>]
type UserBase =  
    class
        interface IUser
        interface IPrincipal
        interface IIdentity
    end
public abstract class UserBase implements IUser, IPrincipal, IIdentity

The UserBase type exposes the following members.

Constructors

  Name Description
Protected method UserBase Initializes a new instance of the UserBase class.

Top

Properties

  Name Description
Public property IsAuthenticated Gets a value indicating whether the user is authenticated.
Public property Name Gets or sets the user name.
Public property Roles Gets or sets the roles the user is a member of.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method IsInRole Determines whether the current user belongs to the specified role.
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate property IIdentity.AuthenticationType Gets the authentication type.
Explicit interface implemetationPrivate property IPrincipal.Identity Gets the identity.

Top

Remarks

This class is designed for use with the AuthenticationBase<T>. It provides properties to support serialization of principal values to the domain context generated for any domain service extending AuthenticationBase<T> class. It also presents those values through the IPrincipal and IIdentity interfaces for use in shared authorization scenarios.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.ServiceModel.DomainServices.Server.ApplicationServices Namespace