public OrderByQueryOption(string rawValue)
{
if (rawValue == null)
{
throw new ArgumentNullException(nameof(rawValue));
}
this.RawValue = rawValue;
var equals = rawValue.IndexOf('=') + 1;
var properties = rawValue.Substring(equals, rawValue.Length - equals);
if (properties.Contains(','))
{
this.Properties = properties.Split(Comma)
.Select(raw => new OrderByProperty(raw))
.ToArray();
}
else
{
this.Properties = new[] { new OrderByProperty(properties) };
}
}