public static T PlatformSwitch <T>(Func <T> windows, Func <T> nonWindows) { var platform = OSHelper.GetPlatform(); var output = OSHelper.PlatformSwitch(platform, windows, nonWindows); return(output); }
public static T PlatformSwitch <T>(Platform platform, Func <T> windows, Func <T> nonWindows) { T output = default; OSHelper.PlatformSwitch(platform, () => { output = windows(); }, () => { output = nonWindows(); }); return(output); }
public static void PlatformSwitch(Action windows, Action nonWindows) { var platform = OSHelper.GetPlatform(); OSHelper.PlatformSwitch(platform, windows, nonWindows); }