public void OnMbedAttachedEventTest() { MbedAttachedStatus expected = MbedAttachedStatus.Attached; _target.add_MbedAttachedEvent((sender, args) => Assert.AreEqual(expected, args.Status)); _target.OnMbedAttachedEvent(expected); expected = MbedAttachedStatus.Detached; _target.add_MbedAttachedEvent((sender, args) => Assert.AreEqual(expected, args.Status)); }
private void OnMbedAttachedEvent(MbedAttachedStatus status) { MbedAttachedEventArgs e = new MbedAttachedEventArgs { Status = status }; EventHandler <MbedAttachedEventArgs> handler = MbedAttachedEvent; if (handler != null) { handler(this, e); } }
private void OnMbedAttachedEvent(MbedAttachedStatus status) { MbedAttachedEventArgs e = new MbedAttachedEventArgs { Status = status }; EventHandler<MbedAttachedEventArgs> handler = MbedAttachedEvent; if (handler != null) handler(this, e); }