Пример #1
0
        private static void StorageEventManager_RemovableDeviceInserted(object sender, RemovableDeviceEventArgs e)
        {
            _logger.LogInformation($"Removable Device Event: @ \"{e.Path}\" was inserted.");

            // var mqttConfigChange = ReadStorage(e.Path);
            //if (mqttConfigChange)
            //{
            //  SetupMqtt(restore: true); //should help handle events and Reconnect/close/open
            //}
        }
Пример #2
0
 private static void StorageEventManager_RemovableDeviceRemoved(object sender, RemovableDeviceEventArgs e)
 {
     _logger.LogInformation($"Removable Device Event: @ \"{e.Path}\" was removed.");
 }
Пример #3
0
        private static void StorageEventManager_RemovableDeviceInserted(object sender, RemovableDeviceEventArgs e)
        {
            Debug.WriteLine($"Card inserted - Event:{e.Event} Path:{e.Path}");

            // Card just inserted lets try to mount it
            MountMyCard();
        }
Пример #4
0
        // Storage events can be used to automatically mount SD cards when inserted
        // This only works for SD card adapter that include card detect pin tied to GPIO pin
        // If no Card Detect pin then events not required

        private static void StorageEventManager_RemovableDeviceRemoved(object sender, RemovableDeviceEventArgs e)
        {
            Debug.WriteLine($"Card removed - Event:{e.Event} Path:{e.Path}");
        }
Пример #5
0
 private static void StorageEventManager_RemovableDeviceInserted(object sender, RemovableDeviceEventArgs e)
 {
     Debug.WriteLine($"Removable Device @ \"{e.Path}\" inserted.");
 }
Пример #6
0
 private static void StorageEventManager_RemovableDeviceRemoved(object sender, RemovableDeviceEventArgs e)
 {
     Console.WriteLine($"Removable Device @ \"{e.Path}\" removed.");
 }