private void ContextChanged(object sender, ChangeEventArgs e)
 {
     if (e.Issuer == this)
         return;
     // If we currently have the token, we can just send this single change...
     if (TokenState == TokenState.HavingToken)
     {
         HasChanged = false;
         SendPatches();
         TokenState = TokenState.WaitingForToken;
     }
     // .. otherwise we first have to request it.
     else
     {
         if (!TokenRequestSent)
         {
             Connection.Send(new TokenRequestMessage());
         }
         TokenRequestSent = true;
         HasChanged = true;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Raises the Changed event.
 /// </summary>
 /// <param name="e">A ChangeEventArgs that contains the event data.</param>        
 protected virtual void OnChanged(ChangeEventArgs e)
 {
     if (Changed != null) {
         Changed(this, e);
     }
 }