/**//// <summary>
/// Returns the userID as a Int32 instead of an object.
/// This way you will get the compiler protection and intelligence support you need.
/// </summary>
public static Int32 UserID
 {
get
 {
return (Int32) GetValueOrDefault( eKeys.UserID, nUSERID_UNKOWN );
}
set
 {
if ( nUSERID_MINIMUM >= value )
 {
throw new ApplicationException ( String.Format(sUSERID_INVALID, value, nUSERID_MINIMUM ));
}
SetValue( eKeys.UserID, value );
}
}
#endregion

 private: GetValueOrDefault( eKeys eKey, Object oDefaultValue )#region private: GetValueOrDefault( eKeys eKey, Object oDefaultValue )
 /**//// <summary>
/// Gets the value from the session object.
/// </summary>
/// <param name="eKey"> The session key to get the value for.</param>
/// <param name="oDefaultValue">The default value to use if no valid value stored.</param>
/// <returns>When the value is null or the key does not exist,
/// the specified default value is returned.
/// Otherwise, the value is returned</returns>
private static object GetValueOrDefault( eKeys eKey, Object oDefaultValue )
 上一页 [1] [2] [3] [4] [5] 下一页 |