public static XFile FromFile(string fileName) { if (string.IsNullOrEmpty(fileName)) { throw new ArgumentNullException(nameof(fileName)); } return(XFileReader.ReadFile(fileName)); }
public static XFile FromBytes(byte[] fileBytes) { if (fileBytes == null) { throw new ArgumentNullException(nameof(fileBytes)); } if (fileBytes.Length == 0) { throw new ArgumentOutOfRangeException(nameof(fileBytes)); } return(XFileReader.ReadFile(fileBytes)); }