/// <summary> /// Ermittelt die Geräteabstraktion zu einer Quellinformation. /// </summary> /// <param name="selection">Die betroffene Quellinformation.</param> /// <returns>Die zugehörige Geräteabstraktion.</returns> /// <exception cref="ArgumentNullException">Es wurde keine Quellinformation angegeben.</exception> public static Hardware GetHardware(this SourceSelection selection) { // Validate if (null == selection) { throw new ArgumentNullException("selection"); } // Forward using (HardwareManager.Open()) return(HardwareManager.OpenHardware(selection.ProfileName)); }
/// <summary> /// Aktiviert eine Quellinformation. /// </summary> /// <param name="selection">Die gewünschte Quellinformation.</param> /// <exception cref="ArgumentNullException">Es wurden keine Informationen zur /// Quelle angegeben.</exception> public static void SelectGroup(this SourceSelection selection) { // Validate if (null == selection) { throw new ArgumentNullException("selection"); } // Forward using (HardwareManager.Open()) selection.SelectGroup(selection.GetHardware()); }