Class UserConnection
Inheritance
System.Object
UserConnection
Implements
System.IDisposable
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Terrasoft.Core.dll
Syntax
public class UserConnection : IUserConnection, IDisposable, ISerializable
Constructors
UserConnection(SerializationInfo, StreamingContext)
Declaration
protected UserConnection(SerializationInfo info, StreamingContext context)
Parameters
Type |
Name |
Description |
System.Runtime.Serialization.SerializationInfo |
info |
|
System.Runtime.Serialization.StreamingContext |
context |
|
UserConnection(AppConnection)
Declaration
public UserConnection(AppConnection appConnection)
Parameters
Type |
Name |
Description |
AppConnection |
appConnection |
Application connection.
|
Fields
SysAdminUnitIdColumnName
Declaration
protected const string SysAdminUnitIdColumnName = "Id"
Field Value
Type |
Description |
System.String |
|
SysAdminUnitInRoleSysAdminUnitIdColumnName
Declaration
protected const string SysAdminUnitInRoleSysAdminUnitIdColumnName = "SysAdminUnitId"
Field Value
Type |
Description |
System.String |
|
SysAdminUnitInRoleSysAdminUnitRoleIdColumnName
Declaration
protected const string SysAdminUnitInRoleSysAdminUnitRoleIdColumnName = "SysAdminUnitRoleId"
Field Value
Type |
Description |
System.String |
|
SysAdminUnitInRoleTableName
Declaration
protected const string SysAdminUnitInRoleTableName = "SysAdminUnitInRole"
Field Value
Type |
Description |
System.String |
|
SysAdminUnitSysAdminUnitTypeValueColumnName
Declaration
protected const string SysAdminUnitSysAdminUnitTypeValueColumnName = "SysAdminUnitTypeValue"
Field Value
Type |
Description |
System.String |
|
SysAdminUnitTableName
Declaration
protected const string SysAdminUnitTableName = "SysAdminUnit"
Field Value
Type |
Description |
System.String |
|
SysSettingsCodeColumnName
Declaration
protected const string SysSettingsCodeColumnName = "Code"
Field Value
Type |
Description |
System.String |
|
SysSettingsIdColumnName
Declaration
protected const string SysSettingsIdColumnName = "Id"
Field Value
Type |
Description |
System.String |
|
SysSettingsIsCacheableColumnName
Declaration
protected const string SysSettingsIsCacheableColumnName = "IsCacheable"
Field Value
Type |
Description |
System.String |
|
SysSettingsTableName
Declaration
protected const string SysSettingsTableName = "SysSettings"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueBinaryValueColumnName
Declaration
protected const string SysSettingsValueBinaryValueColumnName = "BinaryValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueBooleanValueColumnName
Declaration
protected const string SysSettingsValueBooleanValueColumnName = "BooleanValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueDateTimeValueColumnName
Declaration
protected const string SysSettingsValueDateTimeValueColumnName = "DateTimeValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueFloatValueColumnName
Declaration
protected const string SysSettingsValueFloatValueColumnName = "FloatValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueGuidValueColumnName
Declaration
protected const string SysSettingsValueGuidValueColumnName = "GuidValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueIntegerValueColumnName
Declaration
protected const string SysSettingsValueIntegerValueColumnName = "IntegerValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValuePositionColumnName
Declaration
protected const string SysSettingsValuePositionColumnName = "Position"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueSysAdminUnitIdColumnName
Declaration
protected const string SysSettingsValueSysAdminUnitIdColumnName = "SysAdminUnitId"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueSysSettingsIdColumnName
Declaration
protected const string SysSettingsValueSysSettingsIdColumnName = "SysSettingsId"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueTableName
Declaration
protected const string SysSettingsValueTableName = "SysSettingsValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueTextValueColumnName
Declaration
protected const string SysSettingsValueTextValueColumnName = "TextValue"
Field Value
Type |
Description |
System.String |
|
SysSettingsValueTypeNameColumnName
Declaration
protected const string SysSettingsValueTypeNameColumnName = "ValueTypeName"
Field Value
Type |
Description |
System.String |
|
Properties
AppConnection
Declaration
public AppConnection AppConnection { get; set; }
Property Value
ApplicationCache
Declaration
public virtual ICacheStore ApplicationCache { get; }
Property Value
ApplicationData
Application-level data storage.
Declaration
public virtual IDataStore ApplicationData { get; }
Property Value
AppManagerProvider
Declaration
public virtual ManagerProvider AppManagerProvider { get; }
Property Value
ClientUnitSchemaManager
Declaration
public ClientUnitSchemaManager ClientUnitSchemaManager { get; }
Property Value
Current
Declaration
public static UserConnection Current { get; set; }
Property Value
CurrentUser
Declaration
public virtual SysUserInfo CurrentUser { get; }
Property Value
DataValueTypeManager
Declaration
public DataValueTypeManager DataValueTypeManager { get; }
Property Value
DBEngine
Declaration
public virtual DBEngine DBEngine { get; set; }
Property Value
DBExecutorType
Declaration
public virtual Type DBExecutorType { get; set; }
Property Value
Type |
Description |
System.Type |
|
Declaration
public DBMetaEngine DBMetaEngine { get; }
Property Value
Declaration
public virtual DBMetaScript DBMetaScript { get; }
Property Value
DBSecurityEngine
Declaration
public virtual DBSecurityEngine DBSecurityEngine { get; protected set; }
Property Value
DBSettings
Declaration
protected DBConfigurationSectionGroup DBSettings { get; set; }
Property Value
DBTypeConverter
Declaration
public virtual DBTypeConverter DBTypeConverter { get; set; }
Property Value
DcmSchemaManager
Declaration
public DcmSchemaManager DcmSchemaManager { get; }
Property Value
EntitySchemaManager
Declaration
public virtual EntitySchemaManager EntitySchemaManager { get; protected set; }
Property Value
ExternalAccessId
Gets or sets the external access identifier.
Declaration
public Guid ExternalAccessId { get; protected set; }
Property Value
Type |
Description |
System.Guid |
The external access identifier.
|
ImageListSchemaManager
Declaration
public ImageListSchemaManager ImageListSchemaManager { get; }
Property Value
IProcessEngine
Gets Process engine interface.
Declaration
public IProcessEngine IProcessEngine { get; }
Property Value
IsMobileClient
Gets or sets a value indicating whether connection from mobile client.
Declaration
public bool IsMobileClient { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
true if connection from mobile client; otherwise, false .
|
IsSessionStateModeInProc
Declaration
public bool IsSessionStateModeInProc { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsSystemOperationsRestricted
Gets or sets a value indicating whether system operations are restricted.
Declaration
public bool IsSystemOperationsRestricted { get; }
Property Value
Type |
Description |
System.Boolean |
true if system operations are not allowed; otherwise, false .
|
LicHelper
Declaration
public virtual LicHelper LicHelper { get; }
Property Value
Maintainer
Declaration
public string Maintainer { get; }
Property Value
Type |
Description |
System.String |
|
MaxEntitySchemaNameLength
Declaration
public int MaxEntitySchemaNameLength { get; }
Property Value
Type |
Description |
System.Int32 |
|
ProcessEngine
Declaration
public IProcessEngine ProcessEngine { get; }
Property Value
ProcessSchemaManager
Declaration
public ProcessSchemaManager ProcessSchemaManager { get; }
Property Value
ProcessUserTaskSchemaManager
Declaration
public ProcessUserTaskSchemaManager ProcessUserTaskSchemaManager { get; }
Property Value
ProfileManager
Declaration
public ProfileManager ProfileManager { get; }
Property Value
RequestData
Request-level data storage.
Declaration
public virtual IDataStore RequestData { get; }
Property Value
ResourceStorage
Declaration
public IResourceStorage ResourceStorage { get; }
Property Value
RootAdminUnitGroupId
Declaration
public virtual Guid RootAdminUnitGroupId { get; }
Property Value
Type |
Description |
System.Guid |
|
RootSSPAdminUnitGroupId
Declaration
public virtual Guid RootSSPAdminUnitGroupId { get; }
Property Value
Type |
Description |
System.Guid |
|
SchemaNamePrefix
Declaration
public string SchemaNamePrefix { get; }
Property Value
Type |
Description |
System.String |
|
SessionCache
Declaration
public virtual ICacheStore SessionCache { get; }
Property Value
SessionData
Session-level data storage.
Declaration
public virtual IDataStore SessionData { get; }
Property Value
SessionId
Declaration
public string SessionId { get; set; }
Property Value
Type |
Description |
System.String |
|
SourceCodeSchemaManager
Declaration
public SourceCodeSchemaManager SourceCodeSchemaManager { get; }
Property Value
SystemEntitySchemaManager
Declaration
public SystemEntitySchemaManager SystemEntitySchemaManager { get; }
Property Value
SystemValueManager
Declaration
public SystemValueManager SystemValueManager { get; }
Property Value
UserManagerProvider
Declaration
public ManagerProvider UserManagerProvider { get; }
Property Value
ValueListSchemaManager
Declaration
public ValueListSchemaManager ValueListSchemaManager { get; }
Property Value
Workspace
Declaration
public SysWorkspace Workspace { get; }
Property Value
WorkspaceCache
Declaration
public virtual ICacheStore WorkspaceCache { get; }
Property Value
Methods
AddSettingsAdditionalColumns(Select)
Declaration
protected virtual void AddSettingsAdditionalColumns(Select select)
Parameters
Type |
Name |
Description |
Select |
select |
|
AuthenticatedInitialize()
Declaration
public void AuthenticatedInitialize()
CheckIsSettingValueAvailable(IDataReader)
Declaration
protected virtual bool CheckIsSettingValueAvailable(IDataReader dataReader)
Parameters
Type |
Name |
Description |
System.Data.IDataReader |
dataReader |
|
Returns
Type |
Description |
System.Boolean |
|
ClearUserLicenseCache()
Declaration
protected virtual void ClearUserLicenseCache()
Close(SessionEndMethod, Boolean)
Declaration
public void Close(SessionEndMethod sessionEndMethod, bool needRegisterSessionEnd = true)
Parameters
Type |
Name |
Description |
SessionEndMethod |
sessionEndMethod |
|
System.Boolean |
needRegisterSessionEnd |
|
Dispose()
Performs operations associated with freeing, releasing resources.
Declaration
Dispose(Boolean)
Disposes managed and unmanaged resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
Value indicates whether it is needed to dispose all managed and unmanaged resources.
|
DisposeExecutors()
Declaration
protected virtual void DisposeExecutors()
EnsureDBConnection()
Returns a default instance of DBExecutor and ensures that the connection to database
will be available until DBExecutor is disposed.
Declaration
public virtual DBExecutor EnsureDBConnection()
Returns
EnsureDBConnection(QueryKind)
Returns an instance of DBExecutor associated with this UserConnection
for the given QueryKind, and ensures that the connection to database will remain open
until dbExecutor is disposed.
Declaration
public virtual DBExecutor EnsureDBConnection(QueryKind queryKind)
Parameters
Type |
Name |
Description |
QueryKind |
queryKind |
Query kind for which a DBExecutor is returned.
|
Returns
Type |
Description |
DBExecutor |
DbExecutor for a given QueryKind.
|
FindSchemaManager(String)
Declaration
public virtual ISchemaManager FindSchemaManager(string schemaManagerName)
Parameters
Type |
Name |
Description |
System.String |
schemaManagerName |
|
Returns
GetCodeSettingsQueryFilter(QueryCondition, String)
Declaration
protected Select GetCodeSettingsQueryFilter(QueryCondition condition, string settingsCode)
Parameters
Type |
Name |
Description |
QueryCondition |
condition |
|
System.String |
settingsCode |
|
Returns
GetDefaultTimeZone(TimeZoneInfo)
Declaration
protected virtual string GetDefaultTimeZone(TimeZoneInfo timeZone)
Parameters
Type |
Name |
Description |
System.TimeZoneInfo |
timeZone |
|
Returns
Type |
Description |
System.String |
|
GetDefSettingsValueWithoutCaching(String)
Declaration
public virtual object GetDefSettingsValueWithoutCaching(string settingsCode)
Parameters
Type |
Name |
Description |
System.String |
settingsCode |
|
Returns
Type |
Description |
System.Object |
|
GetIsCacheableSettingsQueryFilter(QueryCondition)
Declaration
protected Select GetIsCacheableSettingsQueryFilter(QueryCondition condition)
Parameters
Returns
GetIsTimeZoneValid(String)
Declaration
protected virtual bool GetIsTimeZoneValid(string userTimeZoneId)
Parameters
Type |
Name |
Description |
System.String |
userTimeZoneId |
|
Returns
Type |
Description |
System.Boolean |
|
GetObjectData(SerializationInfo, StreamingContext)
Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type |
Name |
Description |
System.Runtime.Serialization.SerializationInfo |
info |
|
System.Runtime.Serialization.StreamingContext |
context |
|
GetRootAdminUnitGroupId(UserType)
Declaration
public Guid GetRootAdminUnitGroupId(UserType userType)
Parameters
Type |
Name |
Description |
UserType |
userType |
User type.
|
Returns
Type |
Description |
System.Guid |
Root SysAdminUnit group identifier.
|
GetRootAdminUnitGroupName(UserType)
Declaration
public string GetRootAdminUnitGroupName(UserType userType)
Parameters
Type |
Name |
Description |
UserType |
userType |
User type.
|
Returns
Type |
Description |
System.String |
Root SysAdminUnit group name.
|
GetRootAdminUnitGroupSelect(UserType)
Declaration
protected Select GetRootAdminUnitGroupSelect(UserType userType)
Parameters
Returns
GetSchemaManager(String)
Declaration
public virtual ISchemaManager GetSchemaManager(string schemaManagerName)
Parameters
Type |
Name |
Description |
System.String |
schemaManagerName |
|
Returns
GetSettingsQueryColumns(Select)
Declaration
protected Select GetSettingsQueryColumns(Select select)
Parameters
Type |
Name |
Description |
Select |
select |
|
Returns
GetSettingsQueryJoin(Select)
Declaration
protected Select GetSettingsQueryJoin(Select select)
Parameters
Type |
Name |
Description |
Select |
select |
|
Returns
GetUserAdminUnitCollection()
Declaration
[Obsolete("7.15.4")]
protected virtual Collection<Guid> GetUserAdminUnitCollection()
Returns
Type |
Description |
System.Collections.ObjectModel.Collection<System.Guid> |
|
Initialize()
Declaration
Initialize(AppConfigurationSectionGroup)
Declaration
public void Initialize(AppConfigurationSectionGroup appSettings)
Parameters
InitializeCurrentUser(String, TimeZoneInfo, String, String, Boolean)
Declaration
protected virtual void InitializeCurrentUser(string userName, TimeZoneInfo timeZone, string clientIP = null, string agent = null, bool needRegisterSessionStart = true)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.TimeZoneInfo |
timeZone |
|
System.String |
clientIP |
|
System.String |
agent |
|
System.Boolean |
needRegisterSessionStart |
|
InitializeDBSecurityEngine()
Declaration
protected virtual void InitializeDBSecurityEngine()
InternalInitializeDBSecurityEngine()
Declaration
protected void InternalInitializeDBSecurityEngine()
IsSettingsAvailable(String)
Declaration
protected virtual bool IsSettingsAvailable(string code)
Parameters
Type |
Name |
Description |
System.String |
code |
|
Returns
Type |
Description |
System.Boolean |
|
Login(String, String, String, TimeZoneInfo, Boolean)
Declaration
public void Login(string userName, string userPassword, string solutionName, TimeZoneInfo timeZone, bool needRegisterSessionStart = true)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.String |
userPassword |
|
System.String |
solutionName |
|
System.TimeZoneInfo |
timeZone |
|
System.Boolean |
needRegisterSessionStart |
|
Login(String, TimeZoneInfo, Boolean)
Declaration
public void Login(string userName, TimeZoneInfo timeZone = null, bool needRegisterSessionStart = true)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.TimeZoneInfo |
timeZone |
|
System.Boolean |
needRegisterSessionStart |
|
Login(String, TimeZoneInfo, String, String, Boolean)
Declaration
public void Login(string userName, TimeZoneInfo timeZone, string clientIP, string agent, bool needRegisterSessionStart = true)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.TimeZoneInfo |
timeZone |
|
System.String |
clientIP |
|
System.String |
agent |
|
System.Boolean |
needRegisterSessionStart |
|
LoginToDB(String, String)
Declaration
public void LoginToDB(string userName, string userPassword)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.String |
userPassword |
|
RefreshCurrentUserInfo()
Declaration
public void RefreshCurrentUserInfo()
ResetCurrent()
Declaration
protected virtual void ResetCurrent()
ResetSettingsCache()
Declaration
public void ResetSettingsCache()
ResetSettingsCache(String)
Declaration
public void ResetSettingsCache(string settingsCode)
Parameters
Type |
Name |
Description |
System.String |
settingsCode |
|
RestoreCurrentUserInfo()
Declaration
protected virtual void RestoreCurrentUserInfo()
SetCurrentUserCulture()
Sets date/time format using user settings.
Declaration
public virtual void SetCurrentUserCulture()
TerminateUserSession(String)
Declaration
public void TerminateUserSession(string sessionId)
Parameters
Type |
Name |
Description |
System.String |
sessionId |
|
TerminateUserSession(String, Guid)
Declaration
public void TerminateUserSession(string sessionId, Guid userId)
Parameters
Type |
Name |
Description |
System.String |
sessionId |
|
System.Guid |
userId |
|
TerminateUserSessions(Guid)
Declaration
public void TerminateUserSessions(Guid userId)
Parameters
Type |
Name |
Description |
System.Guid |
userId |
|
TryGetSettingsValue(String, out Object)
Declaration
protected virtual bool TryGetSettingsValue(string settingsCode, out object value)
Parameters
Type |
Name |
Description |
System.String |
settingsCode |
|
System.Object |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetSettingsValueFromCache(String, out Object)
Declaration
protected virtual bool TryGetSettingsValueFromCache(string settingsCode, out object value)
Parameters
Type |
Name |
Description |
System.String |
settingsCode |
|
System.Object |
value |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IDisposable
System.Runtime.Serialization.ISerializable
Extension Methods