Пример #1
0
        public static XFile FromFile(string fileName)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                throw new ArgumentNullException(nameof(fileName));
            }

            return(XFileReader.ReadFile(fileName));
        }
Пример #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));
        }