/// <summary> /// Method to expect a TSMM_CLIENT_NOTIFICATION from client. /// </summary> /// <param name="presentationId">The expected presentation Id.</param> /// <param name="notificationType">The expected notification type</param> public void ExpectClientNotification(byte presentationId, NotificationTypeValues notificationType) { DateTime beginTime = DateTime.Now; DateTime endTime = beginTime + waitTime; TSMM_CLIENT_NOTIFICATION notification = null; while (notification == null && DateTime.Now < endTime) { System.Threading.Thread.Sleep(100); notification = rdpevorServer.ExpectRdpevorPdu<TSMM_CLIENT_NOTIFICATION>(waitTime); if (notification.PresentatioinId != presentationId) { notification = null; } } Site.Assert.IsTrue(notification != null, "TSMM_CLIENT_NOTIFICATION received."); }
/// <summary> /// Method to expect a TSMM_CLIENT_NOTIFICATION from client. /// </summary> /// <param name="presentationId">The expected presentation Id.</param> /// <param name="notificationType">The expected notification type</param> public void ExpectClientNotification(byte presentationId, NotificationTypeValues notificationType) { DateTime beginTime = DateTime.Now; DateTime endTime = beginTime + waitTime; TSMM_CLIENT_NOTIFICATION notification = null; while (notification == null && DateTime.Now < endTime) { System.Threading.Thread.Sleep(100); notification = rdpevorServer.ExpectRdpevorPdu <TSMM_CLIENT_NOTIFICATION>(waitTime); if (notification.PresentatioinId != presentationId) { notification = null; } } Site.Assert.IsTrue(notification != null, "TSMM_CLIENT_NOTIFICATION received."); }
/// <summary> /// Decode this PDU from the PduMarshaler. /// </summary> /// <param name="marshaler">This is used to encode the fields of this PDU.</param> public override bool Decode(PduMarshaler marshaler) { try { this.Header.cbSize = marshaler.ReadUInt32(); this.Header.PacketType = (PacketTypeValues)marshaler.ReadUInt32(); this.PresentatioinId = marshaler.ReadByte(); this.NotificationType = (NotificationTypeValues)marshaler.ReadByte(); this.Reserved = marshaler.ReadUInt16(); this.cbData = marshaler.ReadUInt32(); this.pData = marshaler.ReadToEnd(); return(true); } catch { marshaler.Reset(); throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd()); } }
/// <summary> /// Decode this PDU from the PduMarshaler. /// </summary> /// <param name="marshaler">This is used to encode the fields of this PDU.</param> public override bool Decode(PduMarshaler marshaler) { try { this.Header.cbSize = marshaler.ReadUInt32(); this.Header.PacketType = (PacketTypeValues)marshaler.ReadUInt32(); this.PresentatioinId = marshaler.ReadByte(); this.NotificationType = (NotificationTypeValues)marshaler.ReadByte(); this.Reserved = marshaler.ReadUInt16(); this.cbData = marshaler.ReadUInt32(); this.pData = marshaler.ReadToEnd(); return true; } catch { marshaler.Reset(); throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd()); } }