コード例 #1
0
 /// <summary>
 /// Initialize the adapter.
 /// </summary>
 /// <param name="testSite"> test site.</param>
 public override void Initialize(ITestSite testSite)
 {
     base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));
     this.server = new PccrdServer(new Logger(testSite));
     this.server.ReceiveProbeMessage += new ReceiveProbeMessageHandler(this.Server_ReceiveProbeMessage);
     Site.DefaultProtocolDocShortName = "MS-PCCRD";
 }
コード例 #2
0
        /// <summary>
        /// Initialize the adapter.
        /// </summary>
        /// <param name="testSite"> test site.</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));

            this.client = new PccrdClient(new Logger(testSite));
            this.client.ReceivePccrdMessage += new ReceivePccrdMessageHandler(this.Client_ReceivePccrdMessage);
            this.startReceiving              = true;
            Site.DefaultProtocolDocShortName = "MS-PCCRD";
        }
コード例 #3
0
        /// <summary>
        /// Initialize protocol adapter.
        /// </summary>
        /// <param name="testSite">The test site instance associated with the current adapter.</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));

            // The protocol name.
            Site.DefaultProtocolDocShortName = "MS-PCHC";

            PchcBothRoleCaptureCode.Initialize(testSite);
            this.InitializePchcClient(testSite);
        }
コード例 #4
0
 /// <summary>
 /// Initialize adapter.
 /// </summary>
 /// <param name="testSite">The test site instance associated with the current adapter.</param>
 public override void Initialize(ITestSite testSite)
 {
     base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));
     PccrtpBothRoleCapture.Initialize(testSite);
     this.pccrtpClientStack = new PccrtpClient(new Logger(testSite));
     this.Site.DefaultProtocolDocShortName = "MS-PCCRTP";
     SutOsVersion = (OSVersion)Enum.Parse(
         typeof(OSVersion),
         this.GetProperty("Environment.ContentServer.OSVersion"),
         true);
 }
コード例 #5
0
        /// <summary>
        /// Initialize protocol adapter.
        /// </summary>
        /// <param name="testSite">The test site.</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));
            Site.DefaultProtocolDocShortName = "MS-PCHC";

            PchcBothRoleCaptureCode.Initialize(testSite);
            this.pchcServer = new PCHCServer(
                TransferProtocol.HTTPS,
                int.Parse(this.GetProperty("PCHC.Protocol.NewPort")),
                IPAddressType.IPv4,
                new Logger(testSite));
            this.pchcServer.Start();
        }
コード例 #6
0
        /// <summary>
        /// Initialize adapter data and create connection.
        /// </summary>
        /// <param name="testSite">the test site</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));
            this.Site.DefaultProtocolDocShortName = "MS-PCCRR";
            this.isDistributedMode = bool.Parse(this.GetProperty("Environment.IsDistributedMode"));

            if (!this.isDistributedMode)
            {
                this.isWindows = string.Equals(
                    testSite.Properties["Environment.SecondContentClient.OSVersion"],
                    "win2k8r2",
                    StringComparison.OrdinalIgnoreCase);
            }
            else
            {
                this.isWindows = string.Equals(
                    testSite.Properties["Environment.DistributedSUT.OSVersion"],
                    "win2k8r2",
                    StringComparison.OrdinalIgnoreCase);
            }

            this.cryptoAlgo = (CryptoAlgoId_Values)Enum.Parse(typeof(CryptoAlgoId_Values), this.GetProperty("PCCRR.Protocol.CryptoAlgoId_Value"));
            this.port       = int.Parse(this.GetProperty("PCCRR.Protocol.HttpPort"));
            PccrrBothRoleCaptureCode.Initialize(this.Site);

            this.minSupV.MinorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.MinSupportedProtocolVersion.MinorVer"));
            this.minSupV.MajorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.MinSupportedProtocolVersion.MajorVer"));
            this.maxSupV.MinorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.MaxSupportedProtocolVersion.MinorVer"));
            this.maxSupV.MajorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.MaxSupportedProtocolVersion.MajorVer"));
            this.minErrorSupV.MinorVersion  = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.Error.MinSupportedProtocolVersion"));
            this.minErrorSupV.MajorVersion  = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.MaxSupportedProtocolVersion.MajorVer"));
            this.maxErrorSupV.MinorVersion  = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.Error.MaxSupportedProtocolVersion"));
            this.maxErrorSupV.MajorVersion  = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.MaxSupportedProtocolVersion.MajorVer"));
            this.protoVer.MinorVersion      = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MinSupportedProtocolVersion.MinorVer"));
            this.protoVer.MajorVersion      = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MinSupportedProtocolVersion.MajorVer"));
            this.protoErrorVer.MinorVersion = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.ErrorProtocolVersion"));
            this.protoErrorVer.MajorVersion = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_RESP.MaxSupportedProtocolVersion.MajorVer"));

            this.pccrrStackSer = new PccrrServer(this.port, string.Empty, IPAddressType.IPv4);
            this.pccrrStackSer.MessageArrived += new MessageArrivedEventArgs(this.RetrievalTransport_Receive);

            this.pccrrStackSer.StartListening();
        }
コード例 #7
0
        /// <summary>
        /// Initialize adapter data and create connection.
        /// </summary>
        /// <param name="testSite">the test site</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));
            this.Site.DefaultProtocolDocShortName = "MS-PCCRR";
            PccrrBothRoleCaptureCode.Initialize(this.Site);

            this.isDistributedMode = bool.Parse(this.GetProperty("Environment.IsDistributedMode"));

            if (this.isDistributedMode)
            {
                this.isWindows = string.Equals(
                    this.GetProperty("Environment.DistributedSUT.OSVersion"),
                    "win2k8r2",
                    StringComparison.OrdinalIgnoreCase);
                this.serverName = this.GetProperty("Environment.DistributedSUT.MachineName");
            }
            else
            {
                this.isWindows = string.Equals(
                    this.GetProperty("Environment.HostedCacheServer.OSVersion"),
                    "win2k8r2",
                    StringComparison.OrdinalIgnoreCase);
                this.serverName = this.GetProperty("Environment.HostedCacheServer.MachineName");
            }

            this.cryptoAlgo = (CryptoAlgoId_Values)Enum.Parse(typeof(CryptoAlgoId_Values), this.GetProperty("PCCRR.Protocol.CryptoAlgoId_Value"));
            this.timeout    = int.Parse(this.GetProperty("PCCRR.Protocol.timeout"));
            this.port       = int.Parse(this.GetProperty("PCCRR.Protocol.Http.Port"));

            this.protoErrorVer.MinorVersion = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.ErrorProtocolVersion"));
            this.protoErrorVer.MajorVersion = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.ErrorProtocolVersion"));
            this.minSupV.MinorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MinSupportedProtocolVersion.MinorVer"));
            this.minSupV.MajorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MinSupportedProtocolVersion.MajorVer"));
            this.maxSupV.MinorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MaxSupportedProtocolVersion.MinorVer"));
            this.maxSupV.MajorVersion       = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MaxSupportedProtocolVersion.MajorVer"));
            this.protoVer.MinorVersion      = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MinSupportedProtocolVersion.MinorVer"));
            this.protoVer.MajorVersion      = ushort.Parse(this.GetProperty("PCCRR.Protocol.MSG_NEGO_REQ.MinSupportedProtocolVersion.MajorVer"));

            this.pccrrStack = new PccrrClient(this.serverName, this.port, PccrrUri, HttpMethod.POST);
        }
コード例 #8
0
        /// <summary>
        /// Initialize adapter.
        /// </summary>
        /// <param name="testSite">The test site instance associated with the current adapter.</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(ReqConfigurableSite.GetReqConfigurableSite(testSite));
            PccrtpBothRoleCapture.Initialize(testSite);
            this.Site.DefaultProtocolDocShortName = "MS-PCCRTP";
            this.sutOsVersion = (OSVersion)Enum.Parse(
                typeof(OSVersion),
                this.Site.Properties["Environment.DistributedSUT.OSVersion"].ToString(),
                true);
            this.isIpv4     = bool.Parse(Site.Properties["PCCRTP.Protocol.Address.isIPv4"]);
            this.listenPort = int.Parse(Site.Properties["Environment.ContentServer.HTTP.Port"]);

            if (this.isIpv4)
            {
                this.pccrtpServerStack = new PccrtpServer(this.listenPort, IPAddressType.IPv4, new Logger(testSite));
            }
            else
            {
                this.pccrtpServerStack = new PccrtpServer(this.listenPort, IPAddressType.IPv6, new Logger(testSite));
            }

            this.pccrtpServerStack.StartServer();
        }