Add ContinueLoading to allow us to switch between DataFormats

This commit is contained in:
Michael Becker 2014-06-07 19:58:50 -04:00
parent b1a133f4a7
commit dfac3d4942

View File

@ -24,7 +24,19 @@ namespace UniversalEditor
}
private Accessor mvarAccessor = null;
public Accessor Accessor { get { return mvarAccessor; } set { mvarAccessor = value; } }
protected internal Accessor Accessor { get { return mvarAccessor; } set { mvarAccessor = value; } }
/// <summary>
/// Continues loading the file into the specified <see cref="ObjectModel" /> with a different
/// <see cref="DataFormat" />.
/// </summary>
/// <param name="objectModel">The <see cref="ObjectModel" /> in which to continue loading the document.</param>
/// <param name="otherDataFormat">The <see cref="DataFormat" /> used to parse the document.</param>
protected void ContinueLoading(ref ObjectModel objectModel, DataFormat otherDataFormat)
{
otherDataFormat.Accessor = mvarAccessor;
otherDataFormat.Load(ref objectModel);
}
protected virtual bool IsObjectModelSupported(ObjectModel objectModel)
{