[Calendar]Remove invalid exception
[platform/core/csapi/tizenfx.git] / src / Tizen.Pims.Calendar / Tizen.Pims.Calendar / CalendarDatabase.cs
index 5592b33..c088bd5 100644 (file)
@@ -34,11 +34,10 @@ namespace Tizen.Pims.Calendar
         private Object thisLock = new Object();
         private Dictionary<string, EventHandler<DBChangedEventArgs>> _eventHandlerMap = new Dictionary<string, EventHandler<DBChangedEventArgs>>();
         private Dictionary<string, Interop.Database.DBChangedCallback> _callbackMap = new Dictionary<string, Interop.Database.DBChangedCallback>();
-        private Interop.Database.DBChangedCallback _dbChangedDelegate;
 
         internal CalendarDatabase()
         {
-            ///To be created in CalendarManager only
+            /*To be created in CalendarManager only*/
         }
 
         /// <summary>
@@ -264,7 +263,6 @@ namespace Tizen.Pims.Calendar
         /// <feature>http://tizen.org/feature/calendar</feature>
         /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
-        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
@@ -369,7 +367,6 @@ namespace Tizen.Pims.Calendar
         /// <feature>http://tizen.org/feature/calendar</feature>
         /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
-        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public void Delete(CalendarList list)
@@ -536,7 +533,7 @@ namespace Tizen.Pims.Calendar
                                        _eventHandlerMap[uri]?.Invoke(this, args);
                                };
 
-                               int error = Interop.Database.AddChangedCallback(viewUri, _dbChangedDelegate, IntPtr.Zero);
+                               int error = Interop.Database.AddChangedCallback(viewUri, _callbackMap[viewUri], IntPtr.Zero);
                                if (CalendarError.None != (CalendarError)error)
                                {
                                        Log.Error(Globals.LogTag, "AddDBChangedDelegate Failed with error " + error);
@@ -561,7 +558,6 @@ namespace Tizen.Pims.Calendar
         /// <feature>http://tizen.org/feature/calendar</feature>
         /// <exception cref="NotSupportedException">Thrown when feature is not supported</exception>
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
-        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]