System.Data.ProviderBase.CharacterSplitterRegex.Match C# (CSharp) Method

Match() protected method

protected Match ( string input, int beginning, int length ) : SimpleMatch
input string
beginning int
length int
return SimpleMatch
		protected internal override SimpleMatch Match(string input, int beginning, int length) {

			for (int i = beginning; i < length; i++) {
				char ch = input[i];
				switch(ch) {
					case '\'': {
						int end = input.IndexOf('\'', i+1);
						if (end < 0)
							break;

						i = end;
						break;
					}
					case '"': {
						int end = input.IndexOf('"', i+1);
						if (end < 0)
							break;

						i = end;
						break;
					}
					case '[': {
						int end = input.IndexOf(']', i+1);
						if (end < 0)
							break;

						i = end;
						break;
					}
					default: {
						if (ch != _delimiter)
							break;

						return new SimpleMatch(this, length, true, beginning, i-beginning, 1, input);
					}
				}
			}

			int matchLength = length-beginning;
			return new SimpleMatch(this, length, matchLength > 0, beginning, matchLength, input);
		}
	}
CharacterSplitterRegex