/// This method sets all models to 'stale', causing the file to be re-loaded from disk
/// on the next GetModel() call.
/// </summary>
publiceventEventHandlerFileNameChanged;
/// <exception cref="InvalidOperationException">The file is untitled.</exception>
publicvoidReloadFromDisk()
{
if(IsUntitled)
thrownewInvalidOperationException("Cannot reload an untitled file from disk.");
thrownewNotImplementedException();
}
/// <summary>
/// Saves the file to disk.
/// </summary>
/// <remarks>If the file is saved successfully, the dirty flag will be cleared (the dirty model becomes valid instead).</remarks>
/// <exception cref="InvalidOperationException">The file is untitled.</exception>
publicvoidSaveToDisk()
{
if(IsUntitled)
thrownewInvalidOperationException("Cannot reload an untitled file from disk.");
thrownewNotImplementedException();
}
/// <summary>
/// Changes the file name, and saves the file to disk.
/// </summary>
/// <remarks>If the file is saved successfully, the dirty flag will be cleared (the dirty model becomes valid instead).</remarks>
publicvoidSaveToDisk(FileNamefileName)
{
this.FileName=fileName;
SaveToDisk();
}
/// <summary>
/// Saves a copy of the file to disk. Does not change the name of the OpenedFile to the specified file name, and does not reset the dirty flag.
/// </summary>
publicvoidSaveCopyAs(FileNamefileName)
{
thrownewNotImplementedException();
}
/// <summary>
/// Retrieves a file model, loading it if necessary.
/// </summary>
/// <param name="modelProvider">The model provider for the desired model type. Built-in model providers can be found in the <see cref="FileModels"/> class.</param>
/// <param name="options">Options that control how</param>
/// <returns>The model instance, or possibly <c>null</c> if <c>GetModelOptions.DoNotLoad</c> is in use.</returns>
/// <exception cref="IOException">Error loading the file.</exception>
/// <exception cref="FormatException">Cannot construct the model because the underyling data is in an invalid format.</exception>