/// <summary>
 /// Static method to get a SUTControlProtocolHandler instance
 /// </summary>
 /// <param name="testSite"></param>
 /// <returns></returns>
 public static SUTControlProtocolHandler GetInstance(ITestSite testSite)
 {
     if (context == null)
     {
         context = new SUTControlProtocolHandler(testSite);
     }
     return(context);
 }
Exemple #2
0
        /// <summary>
        /// Initialize this adapter
        /// </summary>
        /// <param name="testSite"></param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(testSite);

            controlHandler = SUTControlProtocolHandler.GetInstance(testSite);
            // Initiate local IP
            string proxyIP = testSite.Properties["RDP.ProxyIP"];

            if (string.IsNullOrEmpty(proxyIP))
            {
                rdpServerIP = GetLocalIP();
            }
            else
            {
                rdpServerIP = proxyIP;
            }

            // Initiate local port
            try
            {
                localPort = ushort.Parse(testSite.Properties["RDP.ServerPort"]);
            }
            catch
            {
                localPort = 0;
            }

            // Initiate Connect payload type
            bool clientSupportRDPFile = false;

            try
            {
                clientSupportRDPFile = bool.Parse(testSite.Properties["SUTControl.ClientSupportRDPFile"]);
            }
            catch
            {
            }
            if (clientSupportRDPFile)
            {
                connectPayloadType = RDP_Connect_Payload_Type.RDP_FILE;
            }
            else
            {
                connectPayloadType = RDP_Connect_Payload_Type.PARAMETERS_STRUCT;
            }

            string strIsClientSupportCompression = Site.Properties["RDP.Client.SupportCompression"];

            if (strIsClientSupportCompression != null)
            {
                isClientSupportCompression = Boolean.Parse(strIsClientSupportCompression);
            }
        }
Exemple #3
0
        /// <summary>
        /// Initialize this adapter
        /// </summary>
        /// <param name="testSite"></param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(testSite);

            controlHandler = SUTControlProtocolHandler.GetInstance(testSite);
            // Initiate local IP
            string proxyIP;

            PtfPropUtility.GetPtfPropertyValue(testSite, "ProxyIP", out proxyIP);
            if (string.IsNullOrEmpty(proxyIP))
            {
                rdpServerIP = GetLocalIP();
            }
            else
            {
                rdpServerIP = proxyIP;
            }

            // Initiate local port
            try
            {
                string localPortString;
                PtfPropUtility.GetPtfPropertyValue(testSite, "ServerPort", out localPortString);
                localPort = ushort.Parse(localPortString);
            }
            catch
            {
                localPort = 0;
            }

            // Initiate Connect payload type
            bool clientSupportRDPFile;

            PtfPropUtility.GetPtfPropertyValue(testSite, "ClientSupportRDPFile", out clientSupportRDPFile, new string[] { RdpPtfGroupNames.SUTControl });

            if (clientSupportRDPFile)
            {
                connectPayloadType = RDP_Connect_Payload_Type.RDP_FILE;
            }
            else
            {
                connectPayloadType = RDP_Connect_Payload_Type.PARAMETERS_STRUCT;
            }

            PtfPropUtility.GetPtfPropertyValue(testSite, "SupportCompression", out isClientSupportCompression);
        }
        /// <summary>
        /// Initialize this adapter
        /// </summary>
        /// <param name="testSite"></param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(testSite);

            controlHandler = SUTControlProtocolHandler.GetInstance(testSite);
            // Initiate local IP
            localIP = GetLocalIP();

            // Initiate local port
            try
            {
                localPort = ushort.Parse(testSite.Properties["RDP.ServerPort"]);
            }
            catch
            {
                localPort = 0;
            }

            // Initiate Connect payload type
            bool clientSupportRDPFile = false;

            try
            {
                clientSupportRDPFile = bool.Parse(testSite.Properties["SUTControl.ClientSupportRDPFile"]);
            }
            catch
            {
            }
            if (clientSupportRDPFile)
            {
                connectPayloadType = RDP_Connect_Payload_Type.RDP_FILE;
            }
            else
            {
                connectPayloadType = RDP_Connect_Payload_Type.PARAMETERS_STRUCT;
            }
        }
        /// <summary>
        /// Initialize this adapter
        /// </summary>
        /// <param name="testSite"></param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(testSite);

            controlHandler = SUTControlProtocolHandler.GetInstance(testSite);
            // Initiate local IP
            localIP = GetLocalIP();

            // Initiate local port
            try
            {
                localPort = ushort.Parse(testSite.Properties["RDP.ServerPort"]);
            }
            catch
            {
                localPort = 0;
            }

            // Initiate Connect payload type
            bool clientSupportRDPFile = false;
            try
            {
                clientSupportRDPFile = bool.Parse(testSite.Properties["SUTControl.ClientSupportRDPFile"]);
            }
            catch
            {
            }
            if (clientSupportRDPFile)
            {
                connectPayloadType = RDP_Connect_Payload_Type.RDP_FILE;
            }
            else
            {
                connectPayloadType = RDP_Connect_Payload_Type.PARAMETERS_STRUCT;
            }
        }
 /// <summary>
 /// Initialize this adapter
 /// </summary>
 /// <param name="testSite"></param>
 public override void Initialize(ITestSite testSite)
 {
     base.Initialize(testSite);
     controlHandler = SUTControlProtocolHandler.GetInstance(testSite);
 }
 /// <summary>
 /// Initialize this adapter
 /// </summary>
 /// <param name="testSite"></param>
 public override void Initialize(ITestSite testSite)
 {
     base.Initialize(testSite);
     controlHandler = SUTControlProtocolHandler.GetInstance(testSite);
 }
 /// <summary>
 /// Static method to get a SUTControlProtocolHandler instance
 /// </summary>
 /// <param name="testSite"></param>
 /// <returns></returns>
 public static SUTControlProtocolHandler GetInstance(ITestSite testSite)
 {
     if (context == null)
     {
         context = new SUTControlProtocolHandler(testSite);
     }
     return context;
 }