/// <summary> /// Creates a content loader for specified file. /// </summary> /// <param name="path">An absolute file path.</param> /// <param name="defaultEncoding"> /// Specifies an encoding to be used if the actual encoding can't be determined from the stream content (the stream doesn't start with Byte Order Mark). /// If not specified auto-detect heuristics are used to determine the encoding. If these heuristics fail the decoding is assumed to be <see cref="Encoding.Default"/>. /// Note that if the stream starts with Byte Order Mark the value of <paramref name="defaultEncoding"/> is ignored. /// </param> /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception> /// <exception cref="ArgumentException"><paramref name="path"/> is not an absolute path.</exception> public FileTextLoader(string path, Encoding defaultEncoding) { FilePathUtilities.RequireAbsolutePath(path, "path"); _path = path; _defaultEncoding = defaultEncoding; }