当前位置: 首页>>代码示例>>C#>>正文


C# Variant.GetUtcTimeOrDefault方法代码示例

本文整理汇总了C#中System.Variant.GetUtcTimeOrDefault方法的典型用法代码示例。如果您正苦于以下问题:C# Variant.GetUtcTimeOrDefault方法的具体用法?C# Variant.GetUtcTimeOrDefault怎么用?C# Variant.GetUtcTimeOrDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Variant的用法示例。


在下文中一共展示了Variant.GetUtcTimeOrDefault方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BaseConfig

        public BaseConfig(Variant config)
        {
            this.BaseDirectory = AppDomain.CurrentDomain.BaseDirectory;

            this.Platform = config.GetStringOrDefault("Platform", Sinan.Entity.Platform.Tencent);
            this.DirConfig = Path.Combine(this.BaseDirectory, fixPath(config.GetStringOrDefault("DirConfig", "Config")));

            this.Crossdomain = Path.Combine(DirConfig, fixPath(config.GetStringOrDefault("Crossdomain", "crossdomain.txt")));
            this.DirBase = Path.Combine(DirConfig, fixPath(config.GetStringOrDefault("DirBase", "base")));
            this.DirGame = Path.Combine(DirConfig, fixPath(config.GetStringOrDefault("DirGame", "game")));
            this.DirDB = Path.Combine(DirConfig, fixPath(config.GetStringOrDefault("DirDB", "db")));

            this.Language = config.GetStringOrDefault("Language");
            if (!string.IsNullOrWhiteSpace(Language))
            {
                string path = Path.Combine(DirConfig, fixPath(Language));
                if (Directory.Exists(path))
                {
                    this.DirBase = path;
                }
            }

            this.DirPlugin = Path.Combine(BaseDirectory, fixPath(config.GetStringOrDefault("DirPlugin", "Plugins")));
            this.Log4Config = Path.Combine(BaseDirectory, fixPath(config.GetStringOrDefault("Log4Config", "log4net.config")));

            this.DbBase = config.GetStringOrDefault("DbBase");
            this.DbLog = config.GetStringOrDefault("DbLog");
            this.DbPlayer = config.GetStringOrDefault("DbPlayer");

            string epGame = config.GetStringOrDefault("EpGame");
            this.EpGame = CreateEndPoint(epGame);

            string epGM = config.GetStringOrDefault("EpGM");
            this.EpGM = CreateEndPoint(epGM);

            string epGMM = config.GetStringOrDefault("EpGMM");
            this.EpGMM = CreateEndPoint(epGMM);

            string epShip = config.GetStringOrDefault("EpShip");
            this.EpShip = CreateEndPoint(epShip);

            this.MaxClient = config.GetIntOrDefault("MaxClient", 500);
            this.SendQueueSize = config.GetIntOrDefault("SendQueueSize", 100);
            this.MaxLevel = config.GetIntOrDefault("MaxLevel", 100);
            this.MaxNameLen = config.GetIntOrDefault("MaxNameLen", 16);

            this.Zoneid = config.GetIntOrDefault("Zoneid");
            this.ZoneEpoch = config.GetUtcTimeOrDefault("ZoneEpoch");

            this.DesKey = config.GetStringOrDefault("DESKey");
            this.LoginKey = config.GetStringOrDefault("LoginKey") ?? config.GetStringOrDefault("MD5Key");
            this.RechargeKey = config.GetStringOrDefault("RechargeKey");
            this.GMKey = config.GetStringOrEmpty("GMKey");
            this.ReportSIP = config.GetStringOrDefault("ReportSIP");

            this.WebAddress = config.GetStringOrDefault("WebAddress");

            this.FreeCoin = config.GetBooleanOrDefault("FreeCoin", false);
        }
开发者ID:abel,项目名称:sinan,代码行数:59,代码来源:BaseConfig.cs


注:本文中的System.Variant.GetUtcTimeOrDefault方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。