Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

69 lines
2.0 KiB
C#

//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------
namespace System.ServiceModel.Discovery.VersionApril2005
{
using System.Runtime;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
[XmlSchemaProvider("GetSchema")]
[Fx.Tag.XamlVisible(false)]
public class ResolveCriteriaApril2005 : IXmlSerializable
{
ResolveCriteria resolveCriteria;
ResolveCriteriaApril2005()
{
this.resolveCriteria = new ResolveCriteria();
}
ResolveCriteriaApril2005(ResolveCriteria resolveCriteria)
{
this.resolveCriteria = resolveCriteria;
}
public static ResolveCriteriaApril2005 FromResolveCriteria(ResolveCriteria resolveCriteria)
{
if (resolveCriteria == null)
{
throw FxTrace.Exception.ArgumentNull("resolveCriteria");
}
return new ResolveCriteriaApril2005(resolveCriteria);
}
public static XmlQualifiedName GetSchema(XmlSchemaSet schemaSet)
{
if (schemaSet == null)
{
throw FxTrace.Exception.ArgumentNull("schemaSet");
}
return SchemaUtility.EnsureResolveSchema(DiscoveryVersion.WSDiscoveryApril2005, schemaSet);
}
public ResolveCriteria ToResolveCriteria()
{
return this.resolveCriteria;
}
public XmlSchema GetSchema()
{
return null;
}
[Fx.Tag.InheritThrows(From = "ReadFrom", FromDeclaringType = typeof(ResolveCriteria))]
public void ReadXml(XmlReader reader)
{
this.resolveCriteria.ReadFrom(DiscoveryVersion.WSDiscoveryApril2005, reader);
}
public void WriteXml(XmlWriter writer)
{
this.resolveCriteria.WriteTo(DiscoveryVersion.WSDiscoveryApril2005, writer);
}
}
}