예제 #1
0
        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);
        }
예제 #2
0
 public GeoPositionProperty(GeoPositionValue position, IEnumerable <IPropertyParameter> parameters)
 {
     Position = position; Parameters = parameters;
 }
예제 #3
0
 public GeoPositionProperty(GeoPositionValue position)
 {
     Position = position;
 }