コード例 #1
0
 private void DeleteExpiredBroadcasted(CloudTableEvent evt, uint256 hash)
 {
     if (evt.AddedEntity != null)
     {
         if (DateTimeOffset.UtcNow - evt.AddedEntity.Timestamp > TimeSpan.FromHours(24.0))
         {
             ListenerTrace.Verbose("Cleaning expired broadcasted " + hash);
             DeleteBroadcasted(evt.AddedEntity, hash);
         }
     }
 }
コード例 #2
0
        private static CloudTableEvent ToCloudTableEvent(BrokeredMessage message)
        {
            if (message == null)
            {
                return(null);
            }
            CloudTableEvent evt = new CloudTableEvent();

            evt.Addition = message.Properties["Addition"].ToString() == "true";
            if (evt.Addition)
            {
                evt.AddedEntity = ListenableCloudTable.ToTableEntity(message);
            }
            evt.PartitionKey = evt.PartitionKey;
            evt.RowKey       = message.Properties["RowKey"].ToString();
            return(evt);
        }