Example #1
0
        public bool HasUnplacedHolder(string placeHolder)
        {
            var getPlaceHoldersVisitor = new GetPlaceHoldersVisitor();

            _predicate.Accept(getPlaceHoldersVisitor);
            return(getPlaceHoldersVisitor.GetUnPlacedHolders.Contains(placeHolder));
        }
Example #2
0
        public bool HasUnplacedHolders()
        {
            var getPlaceHoldersVisitor = new GetPlaceHoldersVisitor();

            _predicate.Accept(getPlaceHoldersVisitor);
            return(getPlaceHoldersVisitor.GetUnPlacedHolders.Count > 0);
        }
Example #3
0
        public Dictionary <string, string> GetAllPlaceHolders()
        {
            var ret = new Dictionary <string, string>();
            var getPlaceHoldersVisitor = new GetPlaceHoldersVisitor();

            _predicate.Accept(getPlaceHoldersVisitor);
            // 未適用プレースホルダと適用済みプレースホルダをマージする
            foreach (var unplacedHolder in getPlaceHoldersVisitor.GetUnPlacedHolders)
            {
                ret.Add(unplacedHolder, "");
            }
            if (_placedHolders == null)
            {
                return(ret);
            }
            foreach (var placedHolder in _placedHolders)
            {
                if (!ret.ContainsKey(placedHolder.Key))
                {
                    var stringifier = new CompactStringifier(144);
                    placedHolder.Value.Accept(stringifier);
                    ret.Add(placedHolder.Key, stringifier.ToString());
                }
            }
            return(ret);
        }