RemObjects.InternetPack.Messages.HeaderField.Parse C# (CSharp) Méthode

Parse() public méthode

public Parse ( ) : void
Résultat void
		public void Parse()
		{
			//String lValue = "";
			String lRemainder = fValue;
			String lProperty = null;

			while (lRemainder.Length > 0)
			{
				String lPropertyValue;
				if (lRemainder.IndexOf('=') >= 0)
				{
					Int32 lSemicolonPosition;
					if (lRemainder[0] == '"')
					{
						lRemainder = lRemainder.Substring(1);
						lSemicolonPosition = lRemainder.IndexOf("\";", StringComparison.Ordinal);
						if (lSemicolonPosition >= 0)
						{
							lPropertyValue = lRemainder.Substring(0, lSemicolonPosition - 1);
							lRemainder = lRemainder.Substring(lSemicolonPosition + 1);
						}
						else
						{
							lPropertyValue = lRemainder.Substring(0, lRemainder.Length - 1);
							lRemainder = "";
						}
					}
					else
					{
						lSemicolonPosition = lRemainder.IndexOf(';');
						if (lSemicolonPosition >= 0)
						{
							lPropertyValue = lRemainder.Substring(0, lSemicolonPosition);
							lRemainder = lRemainder.Substring(lSemicolonPosition + 1);
						}
						else
						{
							lPropertyValue = (lRemainder[0] == '"') && (lRemainder[lRemainder.Length - 1] == '"')
												? lRemainder.Substring(1, lRemainder.Length - 2)
												: lRemainder;
							lRemainder = "";
						}
					}
				}
				else
				{
					lPropertyValue = (lRemainder[0] == '"') && (lRemainder[lRemainder.Length - 1] == '"')
										? lRemainder.Substring(1, lRemainder.Length - 2)
										: lRemainder;
					lRemainder = "";
				}

				lPropertyValue = lPropertyValue.Trim();

				if (String.IsNullOrEmpty(lProperty))
					this.fUnnamedValue = lPropertyValue;
				else
				{
					if (this.ContainsKey(lProperty))
						this[lProperty] = this[lProperty] + lPropertyValue;
					else
						this.Add(lProperty, lPropertyValue);
				}

				lRemainder = lRemainder.Trim();

				Int32 lEqualsPosition = lRemainder.IndexOf('=');
				if (lEqualsPosition >= 0)
				{
					lProperty = lRemainder.Substring(0, lEqualsPosition);
					lRemainder = lRemainder.Substring(lEqualsPosition + 1);
				}
			}
		}