Beispiel #1
0
        /// <summary>
        /// If the filter is enabled for current page, final HTML will be modified
        /// </summary>
        /// <param name="filter">Output filter</param>
        /// <param name="finalHtml">Final HTML string</param>
        public void OnFilterActivated(ResponseOutputFilter filter, ref string finalHtml)
        {
            int state = CheckStateHelper.GetFilterState();

            if (state == Constants.ENABLED_AND_ACTIVE)
            {
                finalHtml = TransformToAmpHtml(finalHtml);
            }
            else if (state == Constants.ENABLED_AND_INACTIVE)
            {
                finalHtml = AppendAmpHtmlLink(finalHtml);
            }
        }
 public static object IsAmpPage(EvaluationContext context, params object[] parameters)
 {
     return(CheckStateHelper.GetFilterState() == Constants.ENABLED_AND_ACTIVE);
 }