예제 #1
0
        public static T PlatformSwitch <T>(Func <T> windows, Func <T> nonWindows)
        {
            var platform = OSHelper.GetPlatform();

            var output = OSHelper.PlatformSwitch(platform, windows, nonWindows);

            return(output);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public static void PlatformSwitch(Action windows, Action nonWindows)
        {
            var platform = OSHelper.GetPlatform();

            OSHelper.PlatformSwitch(platform, windows, nonWindows);
        }