Пример #1
0
 public SourceCodeReader GetReader()
 {
     return(_unit.GetReader());
 }
Пример #2
0
 /// <summary>
 /// Detects the encoding of the content.
 /// </summary>
 /// <returns>
 /// An encoding that is used by the reader of the script source to transcode its content to Unicode text.
 /// <c>Null</c> if the content is already textual and no transcoding is performed.
 /// </returns>
 /// <remarks>
 /// Note that the default encoding specified when the script source is created could be overridden by
 /// an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble).
 /// In that case the preamble encoding is returned. Otherwise, the default encoding is returned.
 /// </remarks>
 /// <exception cref="IOException">An I/O error occurs.</exception>
 public Encoding DetectEncoding()
 {
     using (var reader = SourceUnit.GetReader()) {
         return(reader.Encoding);
     }
 }