Beispiel #1
0
        private void sortPathByLevel()
        {
            IList <String> allKeyLevels = this.splitFullPathNameByLevel(this.fullPathNamePattern);

            for (int level = 1; level <= allKeyLevels.Count; level++)
            {
                LevelPathName newKeyNameLevel = new LevelPathName(allKeyLevels[level - 1]);
                this.PatternPathNamesByLevel.Add(level, newKeyNameLevel);
            }

            this.updateFixedPathPart();
        }
Beispiel #2
0
        private bool isLevelPathNameMatch(String currentPathNameToMatch, int level)
        {
            LevelPathName currentKeyNamePattern = this.PatternPathNamesByLevel[level];

            bool isLevelKeyNameMatch = currentKeyNamePattern.Path.Equals(currentPathNameToMatch);

            if (currentKeyNamePattern.IsARegexPattern)
            {
                isLevelKeyNameMatch = comparator.Compare(currentPathNameToMatch, currentKeyNamePattern.Path, OperationEnumeration.patternmatch);
            }

            return(isLevelKeyNameMatch);
        }
Beispiel #3
0
        private void updateFixedPathPart()
        {
            this.fixedPathPart = string.Empty;

            foreach (var keyLevel in this.PatternPathNamesByLevel)
            {
                LevelPathName currentKeyLevel = keyLevel.Value;
                if (currentKeyLevel.IsARegexPattern)
                {
                    break;
                }

                this.fixedPathPart += string.Format(@"\{0}", currentKeyLevel.Path);
            }
        }
Beispiel #4
0
        private void sortPathByLevel()
        {
            IList<String> allKeyLevels = this.splitFullPathNameByLevel(this.fullPathNamePattern);
            
            for (int level = 1; level <= allKeyLevels.Count; level++)
            {
                LevelPathName newKeyNameLevel = new LevelPathName(allKeyLevels[level-1]);
                this.PatternPathNamesByLevel.Add(level, newKeyNameLevel);
            }

            this.updateFixedPathPart();
        }