Song.Extend/Html/HtmlInfo.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Song.Extend.Html
{
    public class HtmlInfo
    {
        private Context _Context;

        public Context Context
        {
            get { return _Context; }
            set { _Context = value; }
        }        
        #region 文件的结构
        public struct HtmlFileInfo
        {
            public string Name;
            public string Path;
            public string FullName;
        }
        public HtmlFileInfo File = new HtmlFileInfo();        
        #endregion
        private HtmlInfo()
        {
           
        }

        public HtmlInfo(string fullPath)
        {
            fullPath=System.Web.HttpContext.Current.Server.MapPath(fullPath);
            System.IO.FileInfo fi = new FileInfo(fullPath);
            this.File.FullName = fi.FullName;
            this.File.Path = fi.Directory.FullName;
            this.File.Name = fi.Name;
            this._Context = new Context();
            if (fi.Exists)
            {
                System.IO.StreamReader sr = new StreamReader(fullPath, System.Text.Encoding.UTF8);
                this._Context.Text = sr.ReadToEnd();
                sr.Close();               
            }
            else
            {
                throw new System.NotImplementedException();
            }

        }
        public HtmlInfo(string path, string file)
        {
            path = System.Web.HttpContext.Current.Server.MapPath(path);
            System.IO.FileInfo fi = new FileInfo(path+"\\"+file);
            this.File.FullName = fi.FullName;
            this.File.Path = fi.Directory.FullName;
            this.File.Name = fi.Name;
            this._Context = new Context();
            if (fi.Exists)
            {
后面还有 71 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。