From cb4e572ba2302cb828a5f2dcd69985800fff2fe1 Mon Sep 17 00:00:00 2001 From: Jongkyu Koo Date: Mon, 4 Sep 2017 18:55:36 +0900 Subject: [PATCH] Add null check and fix API reference Change-Id: If80eb959ff033b3d876e64ce966e401bcee46816 Signed-off-by: Jongkyu Koo --- src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs index 63cadcb..4bb4efd 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs @@ -106,6 +106,11 @@ namespace Tizen.Pims.Contacts /// Thrown when one of the arguments provided to a method is not valid public void SetProjection(uint[] propertyIdArray) { + if (propertyIdArray == null) + { + throw new ArgumentException("Invalid Parameters Provided"); + } + int error = Interop.Query.ContactsQuerySetProjection(_queryHandle, propertyIdArray, propertyIdArray.Length); if ((int)ContactsError.None != error) { @@ -118,7 +123,6 @@ namespace Tizen.Pims.Contacts /// Sets the "distinct" option for projection. /// /// If true it is set, otherwise if false it is unset - /// Thrown when one of the arguments provided to a method is not valid public void SetDistinct(bool set) { int error = Interop.Query.ContactsQuerySetDistinct(_queryHandle, set); -- 2.7.4