Song.ViewData/Methods/Platform.cs

(开头部分) 4KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Song.ServiceInterfaces;
using WeiSha.Common;
using Song.ViewData.Attri;
using System.IO;


namespace Song.ViewData.Methods
{
    /// <summary>
    /// 平台信息
    /// </summary>
    [HttpGet]
    public class Platform : ViewMethod, IViewAPI
    {
        /// <summary>
        /// 授权信息
        /// </summary>
        /// <returns></returns>
        public WeiSha.Common.License Version()
        {
            WeiSha.Common.License lic = WeiSha.Common.License.Value;
            return lic;
        }
        /// <summary>
        /// 版权信息,来自根路径下的copyright.xml文件
        /// </summary>
        /// <returns></returns>
        public Copyright_Item[] Copyright()
        {
            List<Copyright_Item> list = new List<Copyright_Item>();
            System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
            xml.Load(WeiSha.Common.Server.MapPath("~/Copyright.xml"));
            System.Xml.XmlNodeList nodes = xml.SelectNodes("Copyright/*");
            foreach (System.Xml.XmlNode n in nodes)
            {
                string remark = n.Attributes["remark"] != null ? n.Attributes["remark"].Value : string.Empty;
                string type = n.Attributes["type"] != null ? n.Attributes["type"].Value : string.Empty;
                list.Add(new Copyright_Item()
                {
                    Name = n.Name,
                    Remark = Microsoft.JScript.GlobalObject.escape(remark),
                    Type = type,
                    Text = Microsoft.JScript.GlobalObject.escape(n.InnerText.Trim())
                });
            }
            return list.ToArray<Copyright_Item>();
        }


        /// <summary>
        /// 数据库是否链接正常
        /// </summary>
        /// <returns></returns>
        public bool DbConnection()
        {
            bool isCorrect = Business.Do<ISystemPara>().DatabaseLinkTest();
后面还有 69 行代码,解锁后查看完整代码

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

AI 解读

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

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