Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpedyc.RdpedycServer.IsMultipleTransportCreated C# (CSharp) Méthode

IsMultipleTransportCreated() public méthode

Whether a multitransport has been created
public IsMultipleTransportCreated ( DynamicVC_TransportType transportType ) : bool
transportType DynamicVC_TransportType
Résultat bool
        public bool IsMultipleTransportCreated(DynamicVC_TransportType transportType)
        {
            if (transportDic.ContainsKey(transportType))
            {
                return true;
            }
            return false;
        }

Usage Example

        /// <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_TCP)
        {
            if (!rdpedycServer.IsMultipleTransportCreated(transportType))
            {
                rdpedycServer.CreateMultipleTransport(transportType);
            }

            this.rdpegtServer = new RdpegtServer(rdpedycServer);

            bool success = false;

            // Create RDPEGT Channel
            try
            {
                success = rdpegtServer.CreateRdpegtDvc(waitTime);
            }
            catch (Exception e)
            {
                Site.Log.Add(LogEntryKind.Comment, "Exception occurred when creating RDPEGT channels: {1}", e.Message);
            }

            return success;
        }
All Usage Examples Of Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpedyc.RdpedycServer::IsMultipleTransportCreated