/*
* IReadable.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
namespace DTS.Serialization
{ ///
///
/// Defines "readability" for DTS.Serialization objects.
///
///
public interface IReadable
{ //
// It's not that it doesn't take much to be readable, just that all non-trivial readable
// definitions involve a specific type of object that the file is to be deserialized
// into (see non-trivial IReadable interface below). But one may want to reflect against
// a general "IReadable" type for various reasons, i.e., to check to see if file-type object
// is readable in general before presenting the user with read options on the UI (that will
// perform polymorphic read functions on the object, natch).
} //
///
/// Defines "readability" for DTS.Serialization objects.
///
///
///
/// The type of object to be deserialized to.
///
///
public interface IReadable : IReadable
{ ///
///
/// Get a deserializer to "read" an instance of this file format into the specified object type.
///
///
IReader Importer { get; }
}
///
/// Defines the general requirements of a DTS.Serialization file reader object.
///
public interface IReader
{ //
// It's not that it doesn't take much to be a reader, just that all non-trivial reader
// definitions involve a specific type of object that the file is to be deserialized
// into (see non-trivial IReader interface below). But one may want to reflect against
// a general "IReader" type for various reasons, i.e., to check to see if file-type object
// is readable in general before presenting the user with read options on the UI (that will
// perform polymorphic read functions on the object, natch).
} //
///
/// Defines the non-trivial requirements of a DTS.Serialization file reader object.
///
///
///
/// The type of object the file is to be deserialized into.
///
///
public interface IReader : IReader
{ ///
///
/// Deserialize the path-specified serialization into the given object reference.
///
///
///
/// The pathname at which the serialization can be found.
///
///
///
/// The object to be initialized by the specified serialization.
///
///
void Read(string pathname, out T target);
}
}