예제 #1
0
        // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
        //     VersionCheck
        // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

        /// <inheritdoc />
        /// <summary>
        /// VersionConfigにセットされたバージョンとイベントコマンドの内容を確認し、
        /// イベントコマンドの内容が設定バージョンに対応していないものであれば警告ログを出力する。
        /// </summary>
        public override void OutputVersionWarningLogIfNeed()
        {
            if (VersionConfig.IsGreaterVersion(WoditorVersion.Ver2_20))
            {
                OutputVersionWarningLogIfNeed_GreaterVer2_20();
            }
        }
        // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
        //     Private Static Method
        // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

        private static IEnumerable <(string, string)> GetAllPropertyAndValueTuples(TIniTarget target)
        {
            return(target.GetType().GetProperties()
                   .Where(x =>
            {
                var iniTargetAttr = (IniTargetAttribute)x.GetCustomAttribute(typeof(IniTargetAttribute), true);
                if (iniTargetAttr is null)
                {
                    return false;
                }

                // サポート対象外の場合、出力対象に含めない
                return VersionConfig.IsGreaterVersion(iniTargetAttr.SupportMinVersion);
            })
                   .Select(propertyInfo => (propertyInfo.Name, (string)propertyInfo.GetValue(target))));
        }