sion value for a session-key that must exist.
/// If the key does not exist an applicationException is thrown.
/// </summary>
/// <param name="eKey"> The session-key to return the session-value for. </param>
/// <returns> A none-null value.</returns>
private static object GetMandatoryValue( eKeys eKey )
{
//get the value
object oValue = GetValue( eKey );
//key not found or value null?
if ( null == oValue )
{
//throw applicationException because its application logic error (none CLR)
throw new ApplicationException ( String.Format( sMANDATORY_SESSION_KEY_NOT_FOUND_MSG, eKey.ToString() ));
}
//everything oke: return value
return oValue;
}
#endregion
private: GetValue( eKeys eKey )#region private: GetValue( eKeys eKey )
/**//// <summary>
/// Gets the session value from the specified key.
/// </summary>
/// <param name="eKey">The key to get the value from</param>
/// <returns>The session value for the specified session key.
/// If the key does not exist, null is returned.
/// </returns>
private static object GetValue( eKeys eKey )
{
return HttpCo
/// If the key does not exist an applicationException is thrown.
/// </summary>
/// <param name="eKey"> The session-key to return the session-value for. </param>
/// <returns> A none-null value.</returns>
private static object GetMandatoryValue( eKeys eKey )
{
//get the value
object oValue = GetValue( eKey );
//key not found or value null?
if ( null == oValue )
{
//throw applicationException because its application logic error (none CLR)
throw new ApplicationException ( String.Format( sMANDATORY_SESSION_KEY_NOT_FOUND_MSG, eKey.ToString() ));
}
//everything oke: return value
return oValue;
}
#endregion
private: GetValue( eKeys eKey )#region private: GetValue( eKeys eKey )
/**//// <summary>
/// Gets the session value from the specified key.
/// </summary>
/// <param name="eKey">The key to get the value from</param>
/// <returns>The session value for the specified session key.
/// If the key does not exist, null is returned.
/// </returns>
private static object GetValue( eKeys eKey )
{
return HttpCo
| 对此文章发表了评论 |

