mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-11 02:35:00 +00:00
fix: Updated showconfig, gettypes, getjoinmap handlers; updated BridgeBase to expose joinmaps; updated DeviceFactory to introduce method for getting dictionary
This commit is contained in:
@@ -204,5 +204,17 @@ namespace PepperDash.Essentials.Core
|
||||
Description: {2}", type.Key, cType, description);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the device factory dictionary
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
public static Dictionary<string, DeviceFactoryWrapper> GetDeviceFactoryDictionary(string filter)
|
||||
{
|
||||
return !string.IsNullOrEmpty(filter)
|
||||
? FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value)
|
||||
: FactoryMethods;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user