Click or drag to resize

Session Class

The Session allows typed access to specified application properties. This class is generated by the code generation facilities available in NetQuarry.
Inheritance Hierarchy
SystemObject
  NetQuarrySession

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
[SerializableAttribute]
public class Session : ICloneable

The Session type exposes the following members.

Constructors
  NameDescription
Public methodSession
Initializes a new instance of the Session object.
Top
Properties
  NameDescription
Public propertyAuditSuppression
Gets/sets whether or not auditing is suppressed. For security reasons there is no platform support for suppressing auditing in meta-data. This property must be set programmatically. Note that, even when auditing is suppressed, audit events such as AuditInsert, AuditUpdate, and AuditDelete will be fired and it is the responsibility of the audit-handling code (e.g. any audit extension) to honor this setting.
Public propertyCurrencyCulture
Gets/sets the culture of the default currency for the system. The culture is specified as a .Net culture such as en-GB (British Pounds Sterling) or en-US (United States Dollars).
Public propertyDateCulture
The culture to use for dates in the application.
Public propertyFormatCurrency
The default .Net numeric display format to use for fields mapped to currency data types, e.g. "c0" for currency with no subunits. If not specified, the currency format defaults to the "c" (standard currency) format.
Public propertyFormatDateTime
The default .Net date/time display format to use for fields mapped to date/time data types, e.g. "d" for short dates. If not specified, the date/time format defaults to the "d" (short date) format.
Public propertyFormatFloat
The default .Net numeric display format to use for fields mapped to floating point data types, e.g. "n0". If not specified, the floating format defaults to the "f" (fixed-point) format.
Public propertyFormatInteger
The default .Net numeric display format to use for fields mapped to integer data types, e.g. "n0". If not specified, the integer format defaults to the "n0" (integer with thousands grouping) format.
Public propertyLogPageActivity
Gets the value of LogPageActivity application property. This property determines whether or not page rquests should be logged to the xot_request_log table.
Public propertyMasterSession
Gets the value of MasterSession.
Public propertyNoViewStateCompression
Gets the value of NoViewStateCompression application property. This property determines whether or not the platform should compress the page ViewState.
Public propertyNumberCulture
The general culture to use numbers in the application.
Public propertyPreferences
Returns the preferences collection.
Public propertyRootPath
Gets/Sets the root path for the application. This property is set automatically in the context of the web server.
Public propertyRootURL
Gets/Sets the root URL to use for the application. This property is set automatically in the context of the web server.
Public propertyRootURLHttp
Gets/Sets the root HTTP (vs. HTTPS) URL to use for the application. The HTTP root is currently only used to workaround IE6 limitations with downloading attachment documents under HTTPS. This property is set automatically in the context of the web server if HTTP is being used. If HTTPS is being used then the RootURLHttp application property must be set in order to populate this value.
Public propertyStyleSheet
Gets/Sets the application root relative path to the custom style sheet for the application.
Public propertySuppressAlt
Determines whether or not the ALT attribute should be suppressed. In general it should NOT be suppressed, but on a few older browsers (specifically IE6/7) we need to suppress ALT when no screen reader is being used and we want BubbleTips.
Public propertyTenantID
The ID of the current tenant. This will be null unless a custom session object overrides this method.
Public propertyTimeZone
Gets/sets the user's current timezone. See TimeZones. The value will be null if the user's current timezone is now known.
Public propertyTokenValidHours
The number of hours a persisted user token is valid. The default is 12 hours.
Public propertyUserPreferencesLoaded
Returns true if the user Preferences have been loaded.
Public propertyUsesScreenReader
Identifies whether or not user is using a Screen Reader for the visually impaired.
Public propertyVocabTenantID
The ID of the current vocab tenant. This will be equal to TenantID unless set.
Top
Methods
  NameDescription
Public methodClone
Copies the current object and returns a clone.
Public methodConstruct
Construct the object from the IAppContext properties.
Public methodConvertToUserTime
Convert the specified date/time to the user's local TimeZone. If no source timezone is provided, UTC is assumed.
Public methodCreateEmbeddedFunctions
Generates the embedded functions from the values in the session variables. See EmbeddedParser.
Public methodStatic memberCreateInstanceT(IAppContext)
Creates an instance of the Session object (loading from the cache when possible).
Public methodStatic memberCreateInstanceT(IAppContext, Boolean)
Creates a new Session object instance (loading from the cache when possible) with special handling when creating the master Session object instance.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetText(String)
Returns a string from the application's TextItems collection
Public methodGetText(String, String)
Returns a string from the application's TextItems collection.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue(String)
Returns the value of the property for the name.
Public methodGetValue(String, String)
Returns the value of the property for the name.
Public methodLoadCachedPreferences(String, String, String, String)
Load cached user preferences into this object.
Public methodLoadCachedPreferences(String, String, String, String, Boolean)
Load cached user preferences into this object. When loading multiple levels of preferences, for example the traditional org hierarchy, country, company, user, say the initial call to this function used to set the preferences to loaded. However, the subsequent levels of hierarchy to be loaded by this function would then be marked as dirty because the collection was said to be loaded from the first call So now we add a parameter to tell the collection when it IS actually loaded This does put a little bit of onus on the end developer, writing session startup code, or preference handling to know when and not when to use this parameter However, I don't think a single end user developer would even touch this stuff during the time that the session start up/preferences is first written
Public methodLoadPreferences(String, String)
Load user preferences into this object.
Public methodLoadPreferences(String, String, Boolean)
Load user preferences into this object. When loading multiple levels of preferences, for example the traditional org hierarchy, country, company, user, say the initial call to this function used to set the preferences to loaded. However, the subsequent levels of hierarchy to be loaded by this function would then be marked as dirty because the collection was said to be loaded from the first call So now we add a parameter to tell the collection when it IS actually loaded This does put a little bit of onus on the end developer, writing session startup code, or preference handling to know when and not when to use this parameter However, I don't think a single end user developer would even touch this stuff during the time that the session start up/preferences is first written
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPersistUserPreference(String, Object, Boolean)
Persist the specified preference.
Public methodPersistUserPreference(String, Object, Boolean, Boolean)
Persist the specified preference.
Public methodSavePreferences
Save the persistant preferences.
Public methodSavePreferences(String, String)
Save the persistant preferences.
Public methodSetPrefOnly
Set a value into this session's preference collection, but do not set the value on the session itself. Use the SetValue(String, Object, String, String) method to set both the preference and session member value.
Public methodSetValue
Set a session value to the session itself and its preferences collection. Use the SetPrefOnly(String, Object, String, String) method to set only the preference and not the session member value.
Public methodToFormattedCurrency
Format a currency value per the FormatCurrency format in the CurrencyCulture culture.
Public methodToFormattedDateTime
Format a DateTime value per the FormatDateTime format in the DateCulture culture.
Public methodToFormattedFloat
Format a floating point value per the FormatFloat format in the NumberCulture culture.
Public methodToFormattedInteger
Format an integer value per the FormatInteger format in the NumberCulture culture.
Public methodToFormattedTimeSpan
Format a TimeSpan value per the current DateCulture and/or NumberCulture culture. Examples: "3h 12m 2s", "18.7 years", "17 days, 3h 21m". Note: At this time the generated string is not fully localized.

The following formatting characters are supported and may be combined:

  • d - Include the date portion of the span (but only if days > 0).
  • D - Include the date portion of the span (even when zero days).
  • t - Include the time portion of the span.
  • s - Include seconds if time is included in format.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields
  NameDescription
Protected field_appCxt
The application context object associated with the Session.
Protected field_preferences
The CustomProperties collection associated with the Session.
Protected field_userPrefsLoaded
True if the user preferences have been loaded
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also