コード例 #1
0
ファイル: ResolveCriteria.cs プロジェクト: dox0/DotNet471RS3
        internal void WriteTo(DiscoveryVersion discoveryVersion, XmlWriter writer)
        {
            if (discoveryVersion == null)
            {
                throw FxTrace.Exception.ArgumentNull("discoveryVersion");
            }
            if (writer == null)
            {
                throw FxTrace.Exception.ArgumentNull("writer");
            }

            SerializationUtility.WriteEndPointAddress(discoveryVersion, this.endpointAddress, writer);

            if (this.duration != TimeSpan.MaxValue)
            {
                writer.WriteElementString(
                    ProtocolStrings.SchemaNames.DurationElement,
                    ProtocolStrings.VersionInternal.Namespace,
                    XmlConvert.ToString(this.duration));
            }

            if (this.extensions != null)
            {
                foreach (XElement xElement in Extensions)
                {
                    xElement.WriteTo(writer);
                }
            }
        }
コード例 #2
0
        internal void WriteTo(DiscoveryVersion discoveryVersion, XmlWriter writer)
        {
            if (discoveryVersion == null)
            {
                throw FxTrace.Exception.ArgumentNull("discoveryVersion");
            }
            if (writer == null)
            {
                throw FxTrace.Exception.ArgumentNull("writer");
            }

            SerializationUtility.WriteEndPointAddress(discoveryVersion, this.endpointAddress, writer);

            SerializationUtility.WriteContractTypeNames(discoveryVersion, this.contractTypeNames, writer);


            SerializationUtility.WriteScopes(discoveryVersion, this.scopes, null, writer);

            SerializationUtility.WriteListenUris(discoveryVersion, this.listenUris, writer);

            SerializationUtility.WriteMetadataVersion(discoveryVersion, this.metadataVersion, writer);

            if (this.extensions != null)
            {
                foreach (XElement xElement in Extensions)
                {
                    xElement.WriteTo(writer);
                }
            }
        }