/* * IWriteable.cs * * Copyright © 2009 * Diversified Technical Systems, Inc. * All Rights Reserved */ namespace DTS.Serialization { /// /// /// Defines "writeability" for DTS.Serialization objects. /// /// public interface IWritable { // // It's not that it doesn't take much to be writable, just that all non-trivial writable // definitions involve a specific type of object that the file is to be serialized // out of (see non-trivial IWritable interface below). But one may want to reflect against // a general "IWritable" type for various reasons, i.e., to check to see if file-type object // is writeable in general before presenting the user with write options on the UI (that will // perform polymorphic write functions on the object, natch). } // /// /// Defines "writability" for DTS.Serialization objects. /// /// /// /// The type of object to be serialized from. /// /// public interface IWritable : IWritable { /// /// /// Get a serializer to "write" out an instance of this file format from the specified object type. /// /// IWriter Exporter { get; } } /// /// Defines the general requirements of a DTS.Serialization file writer object. /// public interface IWriter { // // It's not that it doesn't take much to be a writer, just that all non-trivial writer // definitions involve a specific type of object that the file is to be serialized // out of (see non-trivial IWriter interface below). But one may want to reflect against // a general "IWriter" type for various reasons, i.e., to check to see if file-type object // is writeable in general before presenting the user with write options on the UI (that will // perform polymorphic write functions on the object, natch). } // public delegate bool CancelRequested(); /// /// Defines the non-trivial requirements of a DTS.Serialization file writer object. /// /// /// /// The type of object the file is to be serialized from. /// /// public interface IWriter : IWriter { /// /// /// Generate the path-specified serialization from the given object. /// /// /// /// The pathname to which the serialization will be written. /// /// /// /// The object to be serialized. /// /// void Write(string pathname, string id, T target, bool bFiltering, bool includeGroupNameInISOExport, double minStartTime, int dataCollectionLength); /// /// Generate the path-specified serialization from the given object. /// /// /// /// The pathname to which the serialization will be written. /// /// /// /// The object to be serialized. /// /// /// /// The to be notified when the write begins. /// /// /// /// The to be notified when the write completes. /// /// /// /// The to be notified when the write "progresses". /// /// void Write(string pathname, string id, string dataFolder, T target, bool bFiltering, bool includeGroupNameInISOExport, FilteredData fd, Test.Module.Channel tmChannel, int channelNumber, BeginEventHandler onBeginEvent, CancelEventHandler onCancelEvent, EndEventHandler onEndEvent, TickEventHandler onTickEvent, ErrorEventHandler onErrorEvent, CancelRequested cancelRequested, double minStartTime, int dataCollectionLength); void Initialize(string pathname, string id, string dataFolder, T target, bool bFiltering, bool includeGroupNameInISOExport, FilteredData fd, Test.Module.Channel tmChannel, int channelNumber, BeginEventHandler onBeginEvent, CancelEventHandler onCancelEvent, EndEventHandler onEndEvent, TickEventHandler onTickEvent, ErrorEventHandler onErrorEvent, CancelRequested cancelRequested); } }