• 调用读写配置文件类的全局类


     1using System;
     2
     3namespace SSSSystem.Class
     4{
     5    /// <summary>
     6    /// Global 的摘要说明。
     7    /// </summary>

     8    public class Global
     9    {
    10        private static Global _global = null;
    11        public Global()
    12        {
    13            //
    14            // TODO: 在此处添加构造函数逻辑
    15            //
    16        }

    17        public static Global GetInstance()
    18        {
    19            if (_global  == null)
    20            {
    21                _global = new Global();
    22            }

    23
    24            return _global;
    25        }

    26
    27        private ConfigSettings settings = new ConfigSettings((new ConfigSettingDefaults()).Value);
    28        /// <summary>
    29        /// 操纵Appconfig配置文件类
    30        /// </summary>

    31        public ConfigSettings Settings
    32        {
    33            get{return settings;}
    34        }

    35    }

    36}

    37
  • 相关阅读:
    接口自动化架构-获取用例
    Windows性能监控工具Perfmon使用指南
    接口自动化架构1-setting
    多进程
    线程锁、守护线程
    多线程
    xlrd模块
    封装写日志的类
    封装redis
    继承
  • 原文地址:https://www.cnblogs.com/telephoner/p/174588.html
Copyright © 2020-2023  润新知