Example #1
0
        // --------------------------------------------------------------------
        // 文字列の中に含まれている命名規則の変数名を返す
        // 文字列の中には <Name> 形式で変数名を含んでいる必要がある
        // 返す変数名には <> は含まない
        // --------------------------------------------------------------------
        private String FindRuleVarName(String oString)
        {
            Dictionary <String, String> aVarMap = NklCommon.CreateRuleDictionary();

            foreach (String aKey in aVarMap.Keys)
            {
                if (oString.IndexOf(NklCommon.RULE_VAR_BEGIN + aKey + NklCommon.RULE_VAR_END, StringComparison.CurrentCultureIgnoreCase) >= 0)
                {
                    return(aKey);
                }
            }
            if (oString.IndexOf(NklCommon.RULE_VAR_ANY) >= 0)
            {
                return(NklCommon.RULE_VAR_ANY);
            }
            return(null);
        }
Example #2
0
        // ====================================================================
        // コンストラクター・デストラクター
        // ====================================================================

        // --------------------------------------------------------------------
        // コンストラクター
        // --------------------------------------------------------------------
        public FolderSettingsInMemory()
        {
            FileNameRules   = new List <String>();
            FileRegexGroups = new List <List <String> >();
            FolderNameRules = NklCommon.CreateRuleDictionary();
        }