public static extern ReturnCode DsmWinNew( [In, Out] TWIdentity origin, [In, Out] TWIdentity destination, DataGroups dg, DataArgumentType dat, Message msg, [In, Out] TWDeviceEvent data);
public void Constructor_Sets_Correct_Properties() { // just some non-default values to test TWDeviceEvent evt = new TWDeviceEvent(); DeviceEventArgs target = new DeviceEventArgs(evt); Assert.AreEqual(evt, target.DeviceEvent, "DeviceEvent mismatch."); }
public static ReturnCode DsmEntry( TWIdentity origin, TWIdentity destination, Message msg, TWDeviceEvent data) { if (PlatformInfo.Current.IsWindows) { if (PlatformInfo.Current.UseNewWinDSM) { return(NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data)); } else { return(NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data)); } } else if (PlatformInfo.Current.IsLinux) { return(NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data)); } throw new PlatformNotSupportedException(); }
public ReturnCode Get(out TWDeviceEvent sourceDeviceEvent) { Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get); sourceDeviceEvent = new TWDeviceEvent(); return(Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Get, sourceDeviceEvent)); }
/// <summary> /// Initializes a new instance of the <see cref="DeviceEventArgs"/> class. /// </summary> /// <param name="deviceEvent">The device event.</param> internal DeviceEventArgs(TWDeviceEvent deviceEvent) { DeviceEvent = deviceEvent; }