diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/FileSystem/File.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/FileSystem/File.cs
index 105b5efc..8aa1e69f 100644
--- a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/FileSystem/File.cs
+++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/FileSystem/File.cs
@@ -168,6 +168,23 @@ namespace UniversalEditor.ObjectModels.FileSystem
return clone;
}
+ ///
+ /// Gets an for this file using the specified .
+ ///
+ /// The type of to return.
+ /// The specifying how to read the file data.
+ /// An with the file data, or null if the specified ObjectModel cannot be retrieved with the specified DataFormat from this file.
+ public T GetObjectModel(DataFormat df) where T : ObjectModel, new()
+ {
+ byte[] data = GetData();
+ MemoryAccessor ma = new MemoryAccessor(data);
+
+ T om = new T();
+ Document.Load(om, df, ma);
+
+ return om;
+ }
+
public override string ToString()
{
string strSize = "*";