/// <summary> /// Creates a new <see cref="IMyoDeviceDriver" />. /// </summary> /// <param name="myoHandle">The Myo handle.</param> /// <param name="myoDeviceBridge">The Myo device bridge. Cannot be <c>null</c>.</param> /// <param name="myoErrorHandlerDriver">The myo error handler driver. Cannot be <c>null</c>.</param> /// <returns> /// Returns a new <see cref="IMyoDeviceDriver" /> instance. /// </returns> protected virtual IMyoDeviceDriver CreateMyoDeviceDriver(IntPtr myoHandle, IMyoDeviceBridge myoDeviceBridge, IMyoErrorHandlerDriver myoErrorHandlerDriver) { Contract.Requires <ArgumentException>(myoHandle != IntPtr.Zero, "The handle to the Myo must be set."); Contract.Requires <ArgumentNullException>(myoDeviceBridge != null, "myoDeviceBridge"); Contract.Requires <ArgumentNullException>(myoErrorHandlerDriver != null, "myoErrorHandlerDriver"); Contract.Ensures(Contract.Result <IMyoDeviceDriver>() != null); return(MyoDeviceDriver.Create(myoHandle, myoDeviceBridge, myoErrorHandlerDriver)); }
/// <summary> /// Creates a new <see cref="IMyoDeviceDriver" />. /// </summary> /// <param name="myoHandle">The Myo handle.</param> /// <param name="myoDeviceBridge">The Myo device bridge. Cannot be <c>null</c>.</param> /// <param name="myoErrorHandlerDriver">The myo error handler driver. Cannot be <c>null</c>.</param> /// <returns> /// Returns a new <see cref="IMyoDeviceDriver" /> instance. /// </returns> protected virtual IMyoDeviceDriver CreateMyoDeviceDriver(IntPtr myoHandle, IMyoDeviceBridge myoDeviceBridge, IMyoErrorHandlerDriver myoErrorHandlerDriver) { return(MyoDeviceDriver.Create(myoHandle, myoDeviceBridge, myoErrorHandlerDriver)); }