/// <summary> /// Adds a condition for the CalendarTime type. /// </summary> /// <since_tizen> 4 </since_tizen> /// <feature>http://tizen.org/feature/calendar</feature> /// <param name="logicalOperator">The operator type.</param> /// <param name="propertyId">The property ID to add a condition.</param> /// <param name="matchType">The match flag.</param> /// <param name="matchValue">The match value.</param> /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception> /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid.</exception> public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, CalendarTime matchValue) { int error = Interop.Filter.AddOperator(_filterHandle, logicalOperator); if (CalendarError.None != (CalendarError)error) { Log.Error(Globals.LogTag, "AddCondition Failed with error " + error); throw CalendarErrorFactory.GetException(error); } Interop.Record.DateTime time = CalendarRecord.ConvertCalendarTimeToStruct(matchValue); error = Interop.Filter.AddCalendarTime(_filterHandle, propertyId, matchType, time); if (CalendarError.None != (CalendarError)error) { Log.Error(Globals.LogTag, "AddCondition Failed with error " + error); throw CalendarErrorFactory.GetException(error); } }
public CalendarFilter(string viewUri, uint propertyId, IntegerMatchType matchType, CalendarTime matchValue) { int error = 0; error = Interop.Filter.Create(viewUri, out _filterHandle); if (CalendarError.None != (CalendarError)error) { Log.Error(Globals.LogTag, "CalendarFilter Failed with error " + error); throw CalendarErrorFactory.GetException(error); } Interop.Record.DateTime time = CalendarRecord.ConvertCalendarTimeToStruct(matchValue); error = Interop.Filter.AddCalendarTime(_filterHandle, propertyId, matchType, time); if (CalendarError.None != (CalendarError)error) { Interop.Filter.Destroy(_filterHandle); Log.Error(Globals.LogTag, "CalendarFilter Failed with error " + error); throw CalendarErrorFactory.GetException(error); } }