Exemplo n.º 1
0
 public void OnStorageUpdate(string server, int deviceChannel, StorageNotificationType type)
 {
     _isStorageUpdated = true;
     _storageUpdate    = new CallbackObjects.StorageUpdate {
         DeviceChannel = deviceChannel, NotificationType = type, ServerName = server
     };
 }
Exemplo n.º 2
0
        public void PrintCallBack(CallbackObjects.StorageUpdate storageUpdate)
        {
            string typeString;

            switch (storageUpdate.NotificationType)
            {
            case StorageNotificationType.NeedsRefresh:
                typeString = "Need Refresh";
                break;

            case StorageNotificationType.ReadWholeStorage:
                typeString = "Read Whole Message";
                break;

            default:
                typeString = "UNKNOWN";
                break;
            }
            AddNote(String.Format("[OnStorageUpdate Callback]=>Device Server:{0}, Device channel:{1}, Notifaction Type:{2} \r\n", storageUpdate.ServerName, storageUpdate.DeviceChannel, typeString), GlobalFlags.CallbackDestination.DeviceService);
            File.AppendAllText(AppConstants.DeviceserviceCallBackFname, String.Format("[OnStorageUpdate Callback]=>Device Server:{0}, Device channel:{1}, Notifaction Type:{2} \r\n", storageUpdate.ServerName, storageUpdate.DeviceChannel, typeString));
        }