コード例 #1
0
ファイル: FileNameMatcher.cs プロジェクト: TetradogOther/NGit
        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);
        }
コード例 #2
0
ファイル: FileNameMatcher.cs プロジェクト: LunarLanding/ngit
		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;
		}