public void Deserialize(string content) { // make sure that the parameter starts with GEO if (!content.ToUpper().StartsWith(Markup)) { throw new ArgumentException($"Invalid geo position detected! Component property needs to start with { Markup } keyword!"); } // deserialize parameters Parameters = content.Substring(Markup.Length, content.IndexOf(':') - Markup.Length) .Split(';', StringSplitOptions.RemoveEmptyEntries) .Select(x => CalendarFactory.DeserializePropertyParameter(x)) .ToList(); // extract the value content string valueContent = content.Substring(content.IndexOf(':') + 1).Trim(); Position = ObjectSerializer.Deserialize <GeoPositionValue>(valueContent); }
public GeoPositionProperty(GeoPositionValue position, IEnumerable <IPropertyParameter> parameters) { Position = position; Parameters = parameters; }
public GeoPositionProperty(GeoPositionValue position) { Position = position; }