//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
namespace System.Web.Services.Discovery {
using System;
using System.IO;
using System.Collections;
using System.Xml.Serialization;
using System.Text;
///
///
/// This represents a discovery file.
///
[XmlRoot("dynamicDiscovery", Namespace = DynamicDiscoveryDocument.Namespace)]
public sealed class DynamicDiscoveryDocument {
private ExcludePathInfo[] excludePaths = new ExcludePathInfo[0];
///
///
/// [To be supplied.]
///
public const string Namespace = "urn:schemas-dynamicdiscovery:disco.2000-03-17";
///
///
/// Default constructor.
///
public DynamicDiscoveryDocument() {
}
///
///
/// [To be supplied.]
///
[XmlElement("exclude", typeof(ExcludePathInfo))]
public ExcludePathInfo[] ExcludePaths {
get {
return excludePaths;
}
set {
if (value == null)
value = new ExcludePathInfo[0];
excludePaths = value;
}
}
///
///
/// Write this instance to a stream.
///
public void Write(Stream stream) {
XmlSerializer xmlSerializer = new XmlSerializer(typeof(DynamicDiscoveryDocument));
xmlSerializer.Serialize(new StreamWriter(stream, new UTF8Encoding(false)), this);
}
///
///
/// Read an instance of WebMethodsFile from a stream.
///
public static DynamicDiscoveryDocument Load(Stream stream) {
XmlSerializer xmlSerializer = new XmlSerializer(typeof(DynamicDiscoveryDocument));
return (DynamicDiscoveryDocument) xmlSerializer.Deserialize(stream);
}
}
}