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>
/// <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")]
/// <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)
_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);
/// <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")]