/// <summary> /// Does a specific ephemeral property exist for an Event? /// </summary> /// <param name="ev">The Event to check</param> /// <param name="propertyName">The property to check</param> public Boolean PropertyExists(Event ev, EphemeralProperty.PropertyName propertyName) { if (!ExistAny(ev)) { return(false); } return(ephemeralProperties[ev].ContainsKey(propertyName)); }
/// <summary> /// Does a specific ephemeral property exist for an AppointmentItem? /// </summary> /// <param name="ai">The AppointmentItem to check</param> /// <param name="propertyName">The property to check</param> public Boolean PropertyExists(AppointmentItem ai, EphemeralProperty.PropertyName propertyName) { if (!ExistAny(ai)) { return(false); } return(ephemeralProperties[ai].ContainsKey(propertyName)); }
public Object GetProperty(Event ev, EphemeralProperty.PropertyName propertyName) { if (this.ExistAny(ev)) { if (PropertyExists(ev, propertyName)) { Object ep = ephemeralProperties[ev][propertyName]; switch (propertyName) { case EphemeralProperty.PropertyName.KeySet: if (ep is int && ep != null) { return(Convert.ToInt16(ep)); } else { return(null); } case EphemeralProperty.PropertyName.MaxSet: if (ep is int && ep != null) { return(Convert.ToInt16(ep)); } else { return(null); } default: return(ep); } } } return(null); }