コード例 #1
0
 /// <summary>
 /// Send a DIMSE message
 /// </summary>
 /// <param name="rq"></param>
 /// <param name="l"></param>
 public void Invoke(Dimse rq, DimseListenerI l)
 {
     int msgID = rq.Command.MessageID;
     int maxOps = assoc.MaxOpsInvoked;
     if (maxOps == 0)
     {
         rspDispatcher.Add(msgID, l);
     }
     else
         lock(rspDispatcher)
         {
             while (rspDispatcher.Count >= maxOps)
             {
                 System.Threading.Monitor.Wait(rspDispatcher);
             }
             rspDispatcher.Add(msgID, l);
         }
     assoc.Write(rq);
 }
コード例 #2
0
 /// <summary>
 /// Add DIMSE message listener
 /// </summary>
 /// <param name="msgID"></param>
 /// <param name="l"></param>
 public void AddCancelListener(int msgID, DimseListenerI l)
 {
     cancelDispatcher.Add(msgID, l);
 }