/// <summary> /// Initialize this protocol with create control and data channels. /// </summary> /// <param name="rdpedycServer">RDPEDYC Server instance</param> /// <param name="transportType">selected transport type for created channels</param> /// <returns>true if client supports this protocol; otherwise, return false.</returns> public bool ProtocolInitialize(RdpedycServer rdpedycServer, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_UDP_Reliable) { if (!rdpedycServer.IsMultipleTransportCreated(transportType)) { rdpedycServer.CreateMultipleTransport(transportType); } this.rdpefsServer = new RdpefsServer(rdpedycServer); bool success = false; // Create RDPEFS channel try { uint channelId = DynamicVirtualChannel.NewChannelId(); Dictionary <TunnelType_Value, List <uint> > channelListDic = new Dictionary <TunnelType_Value, List <uint> >(); List <uint> list = new List <uint>(); list.Add(channelId); channelListDic.Add(TunnelType_Value.TUNNELTYPE_UDPFECR, list); rdpedycServer.SoftSyncNegotiate(waitTime, channelListDic); success = rdpefsServer.CreateRdpefsDvc(waitTime, channelId); } catch (Exception e) { Site.Log.Add(LogEntryKind.Comment, "Exception occurred when creating RDPEFS channels: {1}", e.Message); } return(success); }
public override void Initialize(ITestSite testSite) { base.Initialize(testSite); rdpbcgrAdapter = null; this.rdpefsServer = new RdpefsServer(); waitTime = new TimeSpan(0, 0, 40); #region WaitTime string strWaitTime = Site.Properties["WaitTime"]; if (strWaitTime != null) { int waitSeconds = Int32.Parse(strWaitTime); waitTime = new TimeSpan(0, 0, waitSeconds); } else { waitTime = new TimeSpan(0, 0, 40); } #endregion }
public override void Initialize(ITestSite testSite) { base.Initialize(testSite); rdpbcgrAdapter = null; this.rdpefsServer = new RdpefsServer(); waitTime = new TimeSpan(0, 0, 40); #region WaitTime string strWaitTime; PtfPropUtility.GetPtfPropertyValue(Site, "WaitTime", out strWaitTime); if (!string.IsNullOrEmpty(strWaitTime)) { int waitSeconds = Int32.Parse(strWaitTime); waitTime = new TimeSpan(0, 0, waitSeconds); } else { waitTime = new TimeSpan(0, 0, 40); } #endregion }