コード例 #1
0
        public static ApplicationVersion GetModuleVersion(
            this MetaData metaData,
            string moduleName)
        {
            string key = "Module_" + moduleName;

            if (metaData != null)
            {
                string versionAsString;
                if (metaData.TryGetValue(key, out versionAsString))
                {
                    try
                    {
                        return(ApplicationVersion.FromString(versionAsString, ApplicationVersionGameType.Singleplayer));
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
            return(ApplicationVersion.Empty);
        }
コード例 #2
0
 protected override bool AppliesToVersion(Game game)
 => CommunityPatchSubModule.VersionComparer.GreaterThan(CommunityPatchSubModule.GameVersion, ApplicationVersion.FromString("e1.0.0"));
コード例 #3
0
 protected override bool AppliesToVersion(Game game)
 => VersionComparer.GreaterThan(GameVersion, ApplicationVersion.FromString("e1.0.0"));
コード例 #4
0
        public static ApplicationVersion GetApplicationVersion(this MetaData metaData)
        {
            string versionAsString = metaData?["ApplicationVersion"];

            return(versionAsString == null ? ApplicationVersion.Empty : ApplicationVersion.FromString(versionAsString, ApplicationVersionGameType.Singleplayer));
        }