public ScheduleEvent(JToken node) : base(node) { if (node["id"] != null) { this._Id = ParseInt(node["id"].Value <string>()); } if (node["partnerId"] != null) { this._PartnerId = ParseInt(node["partnerId"].Value <string>()); } if (node["parentId"] != null) { this._ParentId = ParseInt(node["parentId"].Value <string>()); } if (node["summary"] != null) { this._Summary = node["summary"].Value <string>(); } if (node["description"] != null) { this._Description = node["description"].Value <string>(); } if (node["status"] != null) { this._Status = (ScheduleEventStatus)ParseEnum(typeof(ScheduleEventStatus), node["status"].Value <string>()); } if (node["startDate"] != null) { this._StartDate = ParseInt(node["startDate"].Value <string>()); } if (node["endDate"] != null) { this._EndDate = ParseInt(node["endDate"].Value <string>()); } if (node["referenceId"] != null) { this._ReferenceId = node["referenceId"].Value <string>(); } if (node["classificationType"] != null) { this._ClassificationType = (ScheduleEventClassificationType)ParseEnum(typeof(ScheduleEventClassificationType), node["classificationType"].Value <string>()); } if (node["geoLatitude"] != null) { this._GeoLatitude = ParseFloat(node["geoLatitude"].Value <string>()); } if (node["geoLongitude"] != null) { this._GeoLongitude = ParseFloat(node["geoLongitude"].Value <string>()); } if (node["location"] != null) { this._Location = node["location"].Value <string>(); } if (node["organizer"] != null) { this._Organizer = node["organizer"].Value <string>(); } if (node["ownerId"] != null) { this._OwnerId = node["ownerId"].Value <string>(); } if (node["priority"] != null) { this._Priority = ParseInt(node["priority"].Value <string>()); } if (node["sequence"] != null) { this._Sequence = ParseInt(node["sequence"].Value <string>()); } if (node["recurrenceType"] != null) { this._RecurrenceType = (ScheduleEventRecurrenceType)ParseEnum(typeof(ScheduleEventRecurrenceType), node["recurrenceType"].Value <string>()); } if (node["duration"] != null) { this._Duration = ParseInt(node["duration"].Value <string>()); } if (node["contact"] != null) { this._Contact = node["contact"].Value <string>(); } if (node["comment"] != null) { this._Comment = node["comment"].Value <string>(); } if (node["tags"] != null) { this._Tags = node["tags"].Value <string>(); } if (node["createdAt"] != null) { this._CreatedAt = ParseInt(node["createdAt"].Value <string>()); } if (node["updatedAt"] != null) { this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>()); } if (node["recurrence"] != null) { this._Recurrence = ObjectFactory.Create <ScheduleEventRecurrence>(node["recurrence"]); } }
public ScheduleEvent(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "id": this._Id = ParseInt(propertyNode.InnerText); continue; case "partnerId": this._PartnerId = ParseInt(propertyNode.InnerText); continue; case "parentId": this._ParentId = ParseInt(propertyNode.InnerText); continue; case "summary": this._Summary = propertyNode.InnerText; continue; case "description": this._Description = propertyNode.InnerText; continue; case "status": this._Status = (ScheduleEventStatus)ParseEnum(typeof(ScheduleEventStatus), propertyNode.InnerText); continue; case "startDate": this._StartDate = ParseInt(propertyNode.InnerText); continue; case "endDate": this._EndDate = ParseInt(propertyNode.InnerText); continue; case "referenceId": this._ReferenceId = propertyNode.InnerText; continue; case "classificationType": this._ClassificationType = (ScheduleEventClassificationType)ParseEnum(typeof(ScheduleEventClassificationType), propertyNode.InnerText); continue; case "geoLatitude": this._GeoLatitude = ParseFloat(propertyNode.InnerText); continue; case "geoLongitude": this._GeoLongitude = ParseFloat(propertyNode.InnerText); continue; case "location": this._Location = propertyNode.InnerText; continue; case "organizer": this._Organizer = propertyNode.InnerText; continue; case "ownerId": this._OwnerId = propertyNode.InnerText; continue; case "priority": this._Priority = ParseInt(propertyNode.InnerText); continue; case "sequence": this._Sequence = ParseInt(propertyNode.InnerText); continue; case "recurrenceType": this._RecurrenceType = (ScheduleEventRecurrenceType)ParseEnum(typeof(ScheduleEventRecurrenceType), propertyNode.InnerText); continue; case "duration": this._Duration = ParseInt(propertyNode.InnerText); continue; case "contact": this._Contact = propertyNode.InnerText; continue; case "comment": this._Comment = propertyNode.InnerText; continue; case "tags": this._Tags = propertyNode.InnerText; continue; case "createdAt": this._CreatedAt = ParseInt(propertyNode.InnerText); continue; case "updatedAt": this._UpdatedAt = ParseInt(propertyNode.InnerText); continue; case "recurrence": this._Recurrence = ObjectFactory.Create <ScheduleEventRecurrence>(propertyNode); continue; } } }