protected virtual MemoryVariableData GetMessagesCounterData()
        {
            var data = new MemoryVariableData();
            var mainModuleAddress = base._process.MainModule.BaseAddress;
            var offsetsList = MessagesData.Offsets.TakeWhile(p => p != null).Select(p => Convert.ToInt32(p)).ToList();

            var baseAddress= _process.MainModule.BaseAddress;
            var address = baseAddress;

            for (int i = 0; i < offsetsList.Count - 1; i++)
                address = GetMemoryAddress(address, offsetsList[i]);

            data.Address = address;
            data.Offset = offsetsList.Last();
            data.Size = MessagesData.Size;
            return data;
        }
 protected override void OnMessageProcessingSubscribe()
 {
     _messagesCounter = GetMessagesCounterData();
     if (_messageProcessingTimer == null)
         _messageProcessingTimer = new Timer(MessagesProcessingTimerCallback, null, 0, 1000);
 }
 protected override void Dispose(bool disposing)
 {
     if (_disposed)
         return;
     if (disposing)
     {
         _messagesCounter = null;
         MessagesProcessingTimerTick -= DesktopMessenger_MessagesProcessingTimerTick;
         _instanceList.Remove(this);
     }
     _disposed = true;
     base.Dispose(disposing);
 }