LinqToXsdCore icon indicating copy to clipboard operation
LinqToXsdCore copied to clipboard

Implement generating a FileInfo property on generated types

Open mamift opened this issue 6 years ago • 0 comments

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;
	}
}

mamift avatar Feb 03 '20 22:02 mamift