public RenderFormatImpl(OnDemandProcessingContext odpContext)
 {
     this.m_odpContext      = odpContext;
     this.m_emptyDeviceInfo = new ReadOnlyNameValueCollection(new NameValueCollection(0));
     if (this.m_odpContext.TopLevelContext.ReportContext.RSRequestParameters != null)
     {
         NameValueCollection renderingParameters = this.m_odpContext.TopLevelContext.ReportContext.RSRequestParameters.RenderingParameters;
         if (renderingParameters != null)
         {
             this.m_deviceInfo = new ReadOnlyNameValueCollection(renderingParameters);
         }
     }
     this.m_format = RenderFormatImpl.NormalizeRenderFormat(this.m_odpContext.TopLevelContext.ReportContext, out this.m_isInteractiveFormat);
     if (this.m_deviceInfo == null)
     {
         this.m_deviceInfo = this.m_emptyDeviceInfo;
     }
 }
        public static string NormalizeRenderFormat(ICatalogItemContext reportContext, out bool isInteractiveFormat)
        {
            string text = null;

            if (reportContext.RSRequestParameters != null)
            {
                text = reportContext.RSRequestParameters.FormatParamValue;
            }
            if (text == null)
            {
                text = "RPL";
                isInteractiveFormat = true;
            }
            else if (RenderFormatImpl.IsRenderFormat(text, "RPL") || RenderFormatImpl.IsRenderFormat(text, "RGDI") || RenderFormatImpl.IsRenderFormat(text, "HTML4.0") || RenderFormatImpl.IsRenderFormat(text, "HTML5") || RenderFormatImpl.IsRenderFormat(text, "MHTML"))
            {
                isInteractiveFormat = true;
            }
            else
            {
                isInteractiveFormat = false;
            }
            return(text);
        }