/// <summary> /// 获取处理器 /// </summary> /// <param name="v"></param> public static ProjectProcessor GetProcessor(VersionEnum v) { ProjectProcessor processor = null; switch (v) { case VersionEnum.V2003: if (Instance._Processor2003 == null) { Instance._Processor2003 = new Project2003Processor(); } processor = Instance._Processor2003; break; case VersionEnum.V2007: if (Instance._Processor2007 == null) { Instance._Processor2007 = new Project2007Processor(); } processor = Instance._Processor2007; break; } return(processor); }
protected BaseService( ILeagueApiConfiguration apiConfiguration, VersionEnum version, string prefix, bool isLimitedByRateLimit = true) { if (apiConfiguration == null) { throw new ArgumentNullException("apiConfiguration"); } if (prefix == null) { throw new ArgumentNullException("prefix"); } _apiConfiguration = apiConfiguration; _version = version; Prefix = prefix; _isLimitedByRateLimit = isLimitedByRateLimit; if (!LastRequests.ContainsKey(_apiConfiguration.Key)) { LastRequests[_apiConfiguration.Key] = new List <DateTime>(); } AutoMapperService = new AutoMapperService(apiConfiguration); AutoMapperService.CreateMap <long, DateTime>() .ConvertUsing(x => new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(x)); }
public static Version GetVersion( this VersionEnum value ) { var versionSuffix = value.ToString().Substring(value.ToString().Length - 2); return(Version.Get(versionSuffix[0] + "." + versionSuffix[1])); }
public HomeController( ILogger <HomeController> logger, Func <VersionEnum, IDataService> dataServiceAccessor, IConfiguration configuration) { this.logger = logger; this.dataServiceAccessor = dataServiceAccessor; this.version = configuration.GetSection("DataService").GetValue <VersionEnum>("Version"); }
/// <summary> /// 获取Ms Project数据表结构的DataSet形式 /// </summary> /// <param name="v"></param> /// <returns></returns> public static DataSet GetSchemaDataSet(VersionEnum v) { ProjectProcessor processor = GetProcessor(v); DataSet ds = processor.GetSchemaDataSet(); // ds.DataSetName = MsProjectWBSPropertyCatalogEnum.Project.ToString(); ds.Namespace = MSPROJECT_XML_NAMESPACE; return(ds); }
public PDF( VersionEnum value ) { Value = value; }
public PDF( VersionEnum value ) { this.value = value; }
/// <summary> /// 生成迭代版本文件 /// </summary> /// <param name="path"></param> public static GameVersion GenVersionFile(string path, VersionEnum verType, GameVersion ver = null) { string filePath = path + "/version.txt"; GameVersion gver = null; if (null != ver) { gver = ver; } else { string oldvertxt = ""; gver = new GameVersion(); if (File.Exists(filePath)) { oldvertxt = File.ReadAllText(filePath); File.Delete(filePath); } gver.SetVersionTxt(oldvertxt); } if (verType == VersionEnum.APP) { gver.IterateAppVer(); } else if (verType == VersionEnum.LUA) { gver.IterateLuaVer(); } else if (verType == VersionEnum.RES) { gver.IterateResVer(); } //获取服务器版本 LuaState lua = new LuaState(); lua.Start(); lua.DoFile("Game/Data/GameConfig.lua"); LuaFunction func = lua.GetFunction("GameConfig.getServerVersion"); if (func != null) { //string objs = func.Call(); //if (objs != null) //{ //gver.ServerVersion = new System.Version(objs[0].ToString()); //} gver.ServerVersion = new System.Version("1.1.1.1"); } string verContent = gver.GetVersionTxt(); //Debug.Log("Build Version : \n" + verContent); if (!Directory.Exists(filePath)) { Directory.CreateDirectory(Path.GetDirectoryName(filePath)); } File.WriteAllText(filePath, verContent); return(gver); }