Example #1
0
      private void PlaySystemQueueCallback(object obj)
      {
          // trace callback
          TraceHelper.AddMessage(String.Format("Play System Queue Callback: {0}", obj == null ? "null" : "success"));
 
          // if the operation was successful, continue the refresh cycle
          if (obj != null)
          {
              // dequeue the current record (which removes it from the queue)
              RequestQueue.RequestRecord record = RequestQueue.DequeueRequestRecord(RequestQueue.SystemQueue);
              
              // parse out request record info and trace the details 
              string typename;
              string reqtype;
              string id;
              string name;
              RequestQueue.RetrieveRequestInfo(record, out typename, out reqtype, out id, out name);
              TraceHelper.AddMessage(String.Format("Request details: {0} {1} {2} (id {3})", reqtype, typename, name, id));
              
              // don't need to process the object since the folder will be refreshed at the end 
              // of the cycle anyway
  
              // since the operation was successful, continue to drain the queue
              PlayQueue(RequestQueue.SystemQueue);
          }
          else
          {
              // refresh cycle interrupted - still need to signal the SyncComplete event if it was set
              if (SyncComplete != null)
                  SyncComplete(this, new SyncCompleteEventArgs(SyncCompleteArg));
              
          }
      }