/// <summary> /// Sets the filter for a query. /// </summary> /// <param name="filter">The filter.</param> /// <feature>http://tizen.org/feature/contact</feature> /// <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> /// <since_tizen> 4 </since_tizen> public void SetFilter(ContactsFilter filter) { int error = Interop.Query.ContactsQuerySetFilter(_queryHandle, filter._filterHandle); if ((int)ContactsError.None != error) { Log.Error(Globals.LogTag, "SetFilter Failed with error " + error); throw ContactsErrorFactory.CheckAndCreateException(error); } }
/// <summary> /// Adds a child filter to a parent filter. /// </summary> /// <param name="logicalOperator">The operator type.</param> /// <param name="filter">The child filter.</param> /// <feature>http://tizen.org/feature/contact</feature> /// <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> /// <since_tizen> 4 </since_tizen> public void AddFilter(LogicalOperator logicalOperator, ContactsFilter filter) { int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator); if ((int)ContactsError.None != error) { Log.Error(Globals.LogTag, "AddFilter Failed with error " + error); throw ContactsErrorFactory.CheckAndCreateException(error); } error = Interop.Filter.ContactsFilterAddFilter(_filterHandle, filter._filterHandle); if ((int)ContactsError.None != error) { Log.Error(Globals.LogTag, "AddFilter Failed with error " + error); throw ContactsErrorFactory.CheckAndCreateException(error); } }