Example #1
0
        public static XFile FromFile(string fileName)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                throw new ArgumentNullException(nameof(fileName));
            }

            return(XFileReader.ReadFile(fileName));
        }
Example #2
0
        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));
        }