|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ISavableDataObjectBase.cs" company="Catel development team">
// Copyright (c) 2008 - 2011 Catel development team. All rights reserved.
// </copyright>
// <summary>
// ISavableDataObjectBase that defines the additional methods to save a <see cref="IDataObjectBase" /> object.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
using System.IO;
using System.Xml.Serialization;
namespace Catel.Data
{
/// <summary>
/// ISavableDataObjectBase that defines the additional methods to save a <see cref="IDataObjectBase"/> object.
/// </summary>
public interface ISavableDataObjectBase : IDataObjectBase, IXmlSerializable
{
#region Properties
/// <summary>
/// Gets the <see cref="SerializationMode"/> of this object.
/// </summary>
/// <value>The serialization mode.</value>
SerializationMode Mode { get; }
/// <summary>
/// Gets the bytes of the current binary serialized data object.
/// </summary>
/// <value>The bytes that represent the object data.</value>
byte[] Bytes { get; }
#endregion
#region Methods
/// <summary>
/// Saves the object to a file using the default formatting.
/// </summary>
/// <param name="fileName">Filename of the file that will contain the serialized data of this object.</param>
void Save(string fileName);
/// <summary>
/// Saves the object to a file using a specific formatting.
/// </summary>
/// <param name="fileName">Filename of the file that will contain the serialized data of this object.</param>
/// <param name="mode"><see cref="SerializationMode"/> to use.</param>
void Save(string fileName, SerializationMode mode);
/// <summary>
/// Saves the object to a stream using the default formatting.
/// </summary>
/// <param name="stream">Stream that will contain the serialized data of this object.</param>
void Save(Stream stream);
/// <summary>
/// Saves the object to a stream using a specific formatting.
/// </summary>
/// <param name="stream">Stream that will contain the serialized data of this object.</param>
/// <param name="mode"><see cref="SerializationMode"/> to use.</param>
void Save(Stream stream, SerializationMode mode);
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.