Exemplo n.º 1
0
        private static IList <AbstractHead> CreateSimpleHeads(string patternPart, char?invalidWildgetCharacter
                                                              )
        {
            IList <AbstractHead> heads = new AList <AbstractHead>(patternPart.Length);

            for (int i = 0; i < patternPart.Length; i++)
            {
                char c = patternPart[i];
                switch (c)
                {
                case '*':
                {
                    AbstractHead head = CreateWildCardHead(invalidWildgetCharacter, true);
                    heads.AddItem(head);
                    break;
                }

                case '?':
                {
                    AbstractHead head = CreateWildCardHead(invalidWildgetCharacter, false);
                    heads.AddItem(head);
                    break;
                }

                default:
                {
                    CharacterHead head_1 = new CharacterHead(c);
                    heads.AddItem(head_1);
                    break;
                }
                }
            }
            return(heads);
        }
Exemplo n.º 2
0
		private static IList<AbstractHead> CreateSimpleHeads(string patternPart, char? invalidWildgetCharacter
			)
		{
			IList<AbstractHead> heads = new AList<AbstractHead>(patternPart.Length);
			for (int i = 0; i < patternPart.Length; i++)
			{
				char c = patternPart[i];
				switch (c)
				{
					case '*':
					{
						AbstractHead head = CreateWildCardHead(invalidWildgetCharacter, true);
						heads.AddItem(head);
						break;
					}

					case '?':
					{
						AbstractHead head = CreateWildCardHead(invalidWildgetCharacter, false);
						heads.AddItem(head);
						break;
					}

					default:
					{
						CharacterHead head_1 = new CharacterHead(c);
						heads.AddItem(head_1);
						break;
					}
				}
			}
			return heads;
		}