private CfxWindowInfo(IntPtr nativePtr) : base(nativePtr) { switch (CfxApi.PlatformOS) { case CfxPlatformOS.Windows: windows = new CfxWindowInfoWindows(nativePtrUnchecked); break; case CfxPlatformOS.Linux: linux = new CfxWindowInfoLinux(nativePtrUnchecked); break; default: throw new CfxException("Unsupported platform."); } }
public CfxWindowInfo() : base( CfxApi.PlatformOS == CfxPlatformOS.Linux ? CfxApi.cfx_window_info_linux_ctor : CfxApi.cfx_window_info_windows_ctor, CfxApi.PlatformOS == CfxPlatformOS.Linux ? CfxApi.cfx_window_info_linux_dtor : CfxApi.cfx_window_info_windows_dtor ) { switch (CfxApi.PlatformOS) { case CfxPlatformOS.Windows: windows = new CfxWindowInfoWindows(nativePtrUnchecked); break; case CfxPlatformOS.Linux: linux = new CfxWindowInfoLinux(nativePtrUnchecked); break; default: throw new CfxException("Unsupported platform."); } }