Implement generating a FileInfo property on generated types (the ones that map to global elements or complex types or have static Load() methods).
Also add a new public static Load method; one that accepts a FileInfo parameter, which is also saved as an instance property on the generated type.
Example:
public partial class element {
public FileInfo FileInfo { get; set; }
// ...
public static element Load(FileInfo fileInfo)
{
var element = XTypedServices.Load<element>(fileInfo.FullName);
element.FileInfo = fileInfo;
return element;
}
}
Implement generating a
FileInfo
property on generated types (the ones that map to global elements or complex types or havestatic Load()
methods).Also add a new public static Load method; one that accepts a
FileInfo
parameter, which is also saved as an instance property on the generated type.Example: