Imports System.Security.Principal Namespace Server ''' ''' Provides consistent context information between the client ''' and server DataPortal objects. ''' ''' ''' The context includes the current ''' ''' object if CSLA security is being used. It also includes a ''' flag indicating whether the server-side DataPortal is running ''' locally or remotely. ''' _ Public Class DataPortalContext Private mPrincipal As IPrincipal Private mRemotePortal As Boolean ''' ''' The current ''' if CSLA security is being used. ''' Public ReadOnly Property Principal() As IPrincipal Get Return mPrincipal End Get End Property ''' ''' Returns True if the server-side DataPortal is running ''' on a remote server via remoting. ''' Public ReadOnly Property IsRemotePortal() As Boolean Get Return mRemotePortal End Get End Property ''' ''' Creates a new DataPortalContext object. ''' ''' Indicates whether the DataPortal is remote. Public Sub New(ByVal isRemotePortal As Boolean) mPrincipal = Nothing mRemotePortal = isRemotePortal End Sub ''' ''' Creates a new DataPortalContext object. ''' ''' The current Principal object. ''' Indicates whether the DataPortal is remote. Public Sub New(ByVal principal As IPrincipal, ByVal isRemotePortal As Boolean) mPrincipal = principal mRemotePortal = isRemotePortal End Sub End Class End Namespace