Source/NFX.Wave/WorkMatch.cs
/// <summary>
/// Decides whether the specified WorkContext makes the match per this instance and if it does, returns the match variables.
/// Returns null if match was not made
/// </summary>
Decides whether the specified WorkContext makes the match per this instance and if it does, returns the match variables.
Returns null if match was not made
Decides whether the specified WorkContext makes the match per this instance and if it does returns the match variables . Returns null if match was not made
public virtual JSONDataMap Make(WorkContext work, object context = null)
      {
        if (
            !Check_Methods(work) ||
            !Check_AcceptTypes(work) ||
            !Check_ContentTypes(work) ||
            !Check_IsLocal(work) ||
            !Check_Hosts(work) ||
            !Check_Ports(work) ||
            !Check_Schemes(work) ||
            !Check_UserAgents(work) ||
            !Check_UserHosts(work) ||
            !Check_Permissions(work) ||
            !Check_Cookies(work) ||
            !Check_AbsentCookies(work) ||
            !Check_IsSocialNetBot(work) ||
            !Check_IsSearchCrawler(work) ||
            !Check_Headers(work) ||
            !Check_AbsentHeaders(work) ||
            !Check_ApiVersions(work)
           ) return null;
        JSONDataMap result = null;
        if (m_PathPattern!=null)
        {
          result = m_PathPattern.MatchURIPath(work.Request.Url);
          if (result==null) return null;
        }
        if (m_NotPathPattern!=null)
        {
          if (m_NotPathPattern.MatchURIPath(work.Request.Url)!=null) return null;
        }
        if (!Check_VariablesAndGetValues(work, ref result)) return null;
        return result ?? new JSONDataMap(false);
      }
public virtual JSONDataMap Make ( WorkContext work , object context = null ) { if ( ! Check_Methods ( work ) || ! Check_AcceptTypes ( work ) || ! Check_ContentTypes ( work ) || ! Check_IsLocal ( work ) || ! Check_Hosts ( work ) || ! Check_Ports ( work ) || ! Check_Schemes ( work ) || ! Check_UserAgents ( work ) || ! Check_UserHosts ( work ) || ! Check_Permissions ( work ) || ! Check_Cookies ( work ) || ! Check_AbsentCookies ( work ) || ! Check_IsSocialNetBot ( work ) || ! Check_IsSearchCrawler ( work ) || ! Check_Headers ( work ) || ! Check_AbsentHeaders ( work ) || ! Check_ApiVersions ( work ) ) return null ; JSONDataMap result = null ; if ( m_PathPattern != null ) { result = m_PathPattern . MatchURIPath ( work . Request . Url ) ; if ( result == null ) return null ; } if ( m_NotPathPattern != null ) { if ( m_NotPathPattern . MatchURIPath ( work . Request . Url ) != null ) return null ; } if ( ! Check_VariablesAndGetValues ( work , ref result ) ) return null ; return result ?? new JSONDataMap ( false ) ; }
Decides whether the specified WorkContext makes the match per this instance and if it does, returns the match variables.
Decides whether the specified WorkContext makes the match per this instance and if it does returns the match variables .
work
WorkContext
context
object