Song.Extend/Global.cs

(开头部分) 6KB

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

using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using WeiSha.Common;

using Song.ServiceInterfaces;
using Song.Entities;
using System.Data;

namespace Song.Extend
{
    /// <summary>
    /// 系统全局参数
    /// </summary>
    public class Global : System.Collections.IEnumerable
    {
        private static Global _p;
        private static readonly object _syncLock = new object();
        /// <summary>
        /// 获取系统参数
        /// </summary>
        public static Global Value
        {
            get
            {
                if (_p == null)
                {
                    lock (_syncLock)
                    {
                        if (_p == null)
                        {
                            _p = new Global();
                        }
                    }
                }
                return _p;
            }
        }
        //参数集合,由数据库表SystemPara读取,在系统初始化中完成数据载入
        private System.Data.DataTable _paragrid = null;
        private Global()
        {
            if (_paragrid == null)
            {
                try
                {
                    _paragrid = Business.Do<ISystemPara>().GetAll();
                }
                catch (Exception)
                {

                }
            }
        }
        /// <summary>
        /// 获取系统参数
        /// </summary>
        /// <param name="key">参数名</param>
        /// <returns></returns>
后面还有 129 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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