Microsoft.Protocols.TestTools.StackSdk.WsDiscovery.WsDiscoveryService.CreateProbeMatchMessage C# (CSharp) Method

CreateProbeMatchMessage() public method

Create a probe match message
public CreateProbeMatchMessage ( string relatesTo, string instanceId, uint messageNumber, ProbeMatchType matches ) : SoapEnvelope
relatesTo string The URI of relates to
instanceId string Instance ID
messageNumber uint Message number
matches ProbeMatchType Probe match messages
return Microsoft.Protocols.TestTools.StackSdk.WsDiscovery.SoapMessage.SoapEnvelope
        public SoapEnvelope CreateProbeMatchMessage(string relatesTo, string instanceId, uint messageNumber, ProbeMatchType[] matches)
        {
            WsdHeader header = new WsdHeader();
            header.Action.Value = ProtocolStrings.ProbeMatchesAction;
            header.RelatesTo = new AttributedURI();
            header.RelatesTo.Value = relatesTo;
            header.AppSequence = new AppSequenceType();
            header.AppSequence.MessageNumber = 1;
            header.AppSequence.InstanceId = (uint)(this.serviceStartTime - this.baseTime).Seconds;
            header.To = new AttributedURI();
            header.To.Value = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
            ProbeMatchOp match = new ProbeMatchOp();
            match.ProbeMatches = new ProbeMatchesType();
            match.ProbeMatches.ProbeMatch = matches;
            SoapEnvelope resp = new SoapEnvelope(SoapMessageVersion.Soap11Wsa10, header, match);
            return resp;
        }