Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/Tizen.System.Session/Session/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ public event EventHandler<AddUserEventArgs> AddUserWait
{
lock (_addUserWaitLock)
{
if (value == null)
return;
if (_addUserWaitHandler == null)
RegisterCallbackForEvent(SessionEventType.AddUserWait, ref _addUserWaitCB, OnAddUserWait);
_addUserWaitHandler += value;
Expand All @@ -334,6 +336,8 @@ public event EventHandler<AddUserEventArgs> AddUserWait
{
lock (_addUserWaitLock)
{
if (_addUserWaitHandler == null)
return;
_addUserWaitHandler -= value;
if (_addUserWaitHandler == null)
UnregisterCallbackForEvent(SessionEventType.AddUserWait, ref _addUserWaitCB);
Expand Down Expand Up @@ -367,6 +371,8 @@ public event EventHandler<RemoveUserEventArgs> RemoveUserWait
{
lock (_removeUserWaitLock)
{
if (value == null)
return;
if (_removeUserWaitHandler == null)
RegisterCallbackForEvent(SessionEventType.RemoveUserWait, ref _removeUserWaitCB, OnRemoveUserWait);
_removeUserWaitHandler += value;
Expand All @@ -376,6 +382,8 @@ public event EventHandler<RemoveUserEventArgs> RemoveUserWait
{
lock (_removeUserWaitLock)
{
if (_removeUserWaitHandler == null)
return;
_removeUserWaitHandler -= value;
if (_removeUserWaitHandler == null)
UnregisterCallbackForEvent(SessionEventType.RemoveUserWait, ref _removeUserWaitCB);
Expand Down Expand Up @@ -409,6 +417,8 @@ public event EventHandler<SwitchUserWaitEventArgs> SwitchUserWait
{
lock (_switchUserWaitLock)
{
if (value == null)
return;
if (_switchUserWaitHandler == null)
RegisterCallbackForEvent(SessionEventType.SwitchUserWait, ref _switchUserWaitCB, OnSwitchUserWait);
_switchUserWaitHandler += value;
Expand All @@ -418,6 +428,8 @@ public event EventHandler<SwitchUserWaitEventArgs> SwitchUserWait
{
lock (_switchUserWaitLock)
{
if (_switchUserWaitHandler == null)
return;
_switchUserWaitHandler -= value;
if (_switchUserWaitHandler == null)
UnregisterCallbackForEvent(SessionEventType.SwitchUserWait, ref _switchUserWaitCB);
Expand Down Expand Up @@ -451,6 +463,8 @@ public event EventHandler<SwitchUserCompletionEventArgs> SwitchUserCompleted
{
lock (_switchUserCompletionLock)
{
if (value == null)
return;
if (_switchUserCompletionHandler == null)
RegisterCallbackForEvent(SessionEventType.SwitchUserCompletion, ref _switchUserCompletionCB, OnSwitchUserCompletion);
_switchUserCompletionHandler += value;
Expand All @@ -460,6 +474,8 @@ public event EventHandler<SwitchUserCompletionEventArgs> SwitchUserCompleted
{
lock (_switchUserCompletionLock)
{
if (_switchUserCompletionHandler == null)
return;
_switchUserCompletionHandler -= value;
if (_switchUserCompletionHandler == null)
UnregisterCallbackForEvent(SessionEventType.SwitchUserCompletion, ref _switchUserCompletionCB);
Expand Down
Loading