src/Azos.Wave/WorkContext.cs
/// <summary>
/// Ensures that session is injected if session filter is present in processing chain.
/// If session is already available (Session!=null) then does nothing, otherwise
/// fills Session property with either NEW session (if onlyExisting=false(default)) if user supplied no session token,
/// OR gets session from session store as defined by the first SessionFilter in the chain
/// </summary>
Ensures that session is injected if session filter is present in processing chain.
If session is already available (Session!=null) then does nothing, otherwise
fills Session property with either NEW session (if onlyExisting=false(default)) if user supplied no session token,
OR gets session from session store as defined by the first SessionFilter in the chain
Ensures that session is injected if session filter is present in processing chain . If session is already available ( Session! = null ) then does nothing otherwise fills Session property with either NEW session ( if onlyExisting = false ( default )) if user supplied no session token OR gets session from session store as defined by the first SessionFilter in the chain
public WaveSession NeedsSession(bool onlyExisting = false)
      {
        if (m_Session!=null) return m_Session;
        Interlocked.Increment(ref m_Server.m_stat_WorkContextNeedsSession);
        if (m_SessionFilter!=null)
          m_SessionFilter.FetchExistingOrMakeNewSession(this, onlyExisting);
        else
          throw new WaveException(StringConsts.SESSION_NOT_AVAILABLE_ERROR.Args(About));
        return m_Session;
      }
public WaveSession NeedsSession ( bool onlyExisting = false ) { if ( m_Session != null ) return m_Session ; Interlocked . Increment ( ref m_Server . m_stat_WorkContextNeedsSession ) ; if ( m_SessionFilter != null ) m_SessionFilter . FetchExistingOrMakeNewSession ( this , onlyExisting ) ; else throw new WaveException ( StringConsts . SESSION_NOT_AVAILABLE_ERROR . Args ( About ) ) ; return m_Session ; }
Ensures that session is injected if session filter is present in processing chain.
Ensures that session is injected if session filter is present in processing chain .
onlyExisting
bool