Exemple #1
0
        /// <summary>
        /// 分析html文件
        /// 把html中相关联的文件都发给浏览器
        /// </summary>
        /// <param name="client"></param>
        /// <param name="httpVersion"></param>
        /// <param name="mimeType"></param>
        /// <param name="realPath">文件实际路径</param>
        /// <param name="rootPath">项目根目录路径</param>
        public void AnalyseHtmlFile(Client client, string httpVersion, string mimeType, string realPath, string rootPath)
        {
            List<FileItem> fileItemList = GetHtmlExtralFiles(realPath, rootPath);

            SendTool st = new SendTool();
            //先把html文件发送到客户端
            st.SendFileToBroswer(client, httpVersion, mimeType, realPath);
            //Thread.Sleep(50);

            ////把html相关文档发送到客户端
            //if (fileItemList != null && fileItemList.Count > 0)
            //{
            //    foreach (FileItem fileItem in fileItemList)
            //    {
            //        st.SendFileToBroswer(client, httpVersion, fileItem.MimeType, fileItem.Path);
            //        Thread.Sleep(50);
            //    }
            //}
        }
Exemple #2
0
 /// <summary>
 /// 发送文件到浏览器
 /// </summary>
 /// <param name="client"></param>
 /// <param name="httpVersion"></param>
 /// <param name="mimeType"></param>
 /// <param name="realPath">文件实际路径</param>
 /// <param name="rootPath">项目根目录路径</param>
 public virtual void SendFileToBroswer(Client client, string httpVersion, string mimeType, string realPath, string rootPath)
 {
     SendTool st = new SendTool();
     st.SendFileToBroswer(client, httpVersion, mimeType, realPath);
 }