Exemple #1
0
 public bool UnsubscribeToSkyWatch(Type envelopeType, long storageID)
 {
     try
     {
         return(SkyWatch.UnWatch(envelopeType.ToString(), _iTackGUID));
     }
     catch (Exception ex)
     {
         throw new ApplicationException(ex.Message, ex);
     }
 }
Exemple #2
0
 public void Dispose()
 {
     try
     {
         if (_isDisposed == false)
         {
             SkyWatch.Dispose();
             _boards.Dispose();
         }
     }
     catch (Exception ex)
     {
         throw new ApplicationException(ex.Message, ex);
     }
 }
Exemple #3
0
 public bool DeclareEventToSkyWatch(ISkyWatchEventTypes skyWatchEventType, Type envelopeType, long storageID)
 {
     lock (_thisLock)
     {
         try
         {
             string eventKey = CreateEventKey(envelopeType, storageID);
             return(SkyWatch.Declare(skyWatchEventType, eventKey));
         }
         catch (Exception ex)
         {
             throw new ApplicationException(ex.Message, ex);
         }
     }
 }
Exemple #4
0
 public IEnvelope PUT(IEnvelope envelope)
 {
     lock (_thisLock)
     {
         try
         {
             if (envelope == null)
             {
                 return(envelope);
             }
             else if (_boards == null)
             {
                 throw new InvalidOperationException(ExceptionMessage_BoardsCannotBeNull);
             }
             else if (envelope.GetMyEnvelopeType() == typeof(IChatMessageEnvelope))
             {
                 IEnvelope recipt   = _boards.GetHandle_SQLDataBaseBoardChatMessage().PUT(envelope);
                 string    eventKey = CreateEventKey(typeof(IChatMessageEnvelope), ((IChatMessageEnvelope)envelope).ChatMessageID);
                 SkyWatch.Declare(ISkyWatchEventTypes.WriteOccured, eventKey);
                 return(recipt);
             }
             else
             {
                 return(envelope);
             }
         }
         catch (InvalidOperationException ex)
         {
             throw new InvalidOperationException(ex.Message, ex);
         }
         catch (Exception ex)
         {
             throw new ApplicationException(ex.Message, ex);
         }
     }
 }