fix: Updated showconfig, gettypes, getjoinmap handlers; updated BridgeBase to expose joinmaps; updated DeviceFactory to introduce method for getting dictionary

This commit is contained in:
jdevito
2023-01-31 18:27:14 -06:00
parent dd2aca9aa4
commit c68d46f971
11 changed files with 525 additions and 23 deletions

View File

@@ -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;
}
}
}