Microsoft.Protocols.TestSuites.Pccrd.PccrdBothRoleCaptureCode.CaptureTypesElementRequirements C# (CSharp) Method

CaptureTypesElementRequirements() public static method

Capture requirements for Type structure
public static CaptureTypesElementRequirements ( string types, ITestSite site ) : void
types string Type structure
site ITestSite A instance of ITestSite.
return void
        public static void CaptureTypesElementRequirements(string types, ITestSite site)
        {
            #region MS-PCCRD_R51
            // Add debug info
            site.Log.Add(LogEntryKind.Debug, "Types: {0}", types);

            site.CaptureRequirementIfAreEqual<string>(
                "PeerDist:PeerDistData",
                types,
                51,
                "[In Types] This element [Types] MUST be set to: PeerDist:PeerDistData.");

            #endregion
        }

Usage Example

        /// <summary>
        /// receive message handler
        /// </summary>
        /// <param name="sender">The sender</param>
        /// <param name="message">The soap envelope message</param>
        private void Server_ReceiveProbeMessage(IPEndPoint sender, SoapEnvelope message)
        {
            WsdHeader header = (WsdHeader)message.Header;
            ProbeType probe  = ((ProbeOp)message.Body).Probe;

            if (this.receive && (!this.returned.Contains(header.MessageID.Value)))
            {
                this.CaptureHeaderRequirements(header);
                this.CaptureProbeRequirements(probe);
                PccrdBothRoleCaptureCode.CaptureCommonRequirements(Site);
                PccrdBothRoleCaptureCode.CaptureTypesElementRequirements(probe.Types, Site);
                PccrdBothRoleCaptureCode.CaptureScopesElementRequirements(probe.Scopes, Site);

                ProbeMsg probeMsg = new ProbeMsg(header.MessageID.Value, probe.Types, probe.Scopes.Text[0]);
                this.ReceiveProbeMessage(sender, probeMsg);
            }
        }
All Usage Examples Of Microsoft.Protocols.TestSuites.Pccrd.PccrdBothRoleCaptureCode::CaptureTypesElementRequirements