Inheritance: AbstractHead
示例#1
0
        private static IList <AbstractHead> CreateSimpleHeads(string patternPart, char?invalidWildgetCharacter)
        {
            IList <AbstractHead> heads = new List <AbstractHead>(patternPart.Length);

            for (int i = 0; i < patternPart.Length; i++)
            {
                AbstractHead head;

                char c = patternPart[i];
                switch (c)
                {
                case '*':
                    head = CreateWildCardHead(invalidWildgetCharacter, true);
                    heads.Add(head);
                    break;

                case '?':
                    head = CreateWildCardHead(invalidWildgetCharacter, false);
                    heads.Add(head);
                    break;

                default:
                    head = new CharacterHead(c);
                    heads.Add(head);
                    break;
                }
            }

            return(heads);
        }
示例#2
0
		private static IList<AbstractHead> CreateSimpleHeads(string patternPart, char? invalidWildgetCharacter)
		{
			IList<AbstractHead> heads = new List<AbstractHead>(patternPart.Length);

			for (int i = 0; i < patternPart.Length; i++)
			{
				AbstractHead head;

				char c = patternPart[i];
				switch (c)
				{
					case '*':
						head = CreateWildCardHead(invalidWildgetCharacter, true);
						heads.Add(head);
						break;

					case '?':
						head = CreateWildCardHead(invalidWildgetCharacter, false);
						heads.Add(head);
						break;

					default:
						head = new CharacterHead(c);
						heads.Add(head);
						break;
				}
			}

			return heads;
		}