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 //} }
private static void StorageEventManager_RemovableDeviceRemoved(object sender, RemovableDeviceEventArgs e) { _logger.LogInformation($"Removable Device Event: @ \"{e.Path}\" was removed."); }
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(); }
// 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}"); }
private static void StorageEventManager_RemovableDeviceInserted(object sender, RemovableDeviceEventArgs e) { Debug.WriteLine($"Removable Device @ \"{e.Path}\" inserted."); }
private static void StorageEventManager_RemovableDeviceRemoved(object sender, RemovableDeviceEventArgs e) { Console.WriteLine($"Removable Device @ \"{e.Path}\" removed."); }