AvalonStudio.Debugging.Extensions.ToNameValuePair C# (CSharp) Method

ToNameValuePair() public static method

public static ToNameValuePair ( this data ) : NameValuePair
data this
return NameValuePair
		public static NameValuePair ToNameValuePair(this string data)
		{
			var split = data.Split(new[] {'='}, 2);

			var result = new NameValuePair();
			result.Name = split[0];
			result.Value = split[1];

			if (result.Value[0] == '"')
			{
				result.Value = result.Value.RemoveBraces();
			}

			return result;
		}