Class FileSource
Represents source code stored in a file
Inheritance
System.Object
System.MarshalByRefObject
System.IO.TextReader
System.IO.StreamReader
FileSource
Inherited Members
System.IO.StreamReader.Null
System.IO.StreamReader.Close()
System.IO.StreamReader.DiscardBufferedData()
System.IO.StreamReader.Dispose(System.Boolean)
System.IO.StreamReader.Peek()
System.IO.StreamReader.Read()
System.IO.StreamReader.Read(System.Char[], System.Int32, System.Int32)
System.IO.StreamReader.ReadAsync(System.Char[], System.Int32, System.Int32)
System.IO.StreamReader.ReadBlock(System.Char[], System.Int32, System.Int32)
System.IO.StreamReader.ReadBlockAsync(System.Char[], System.Int32, System.Int32)
System.IO.StreamReader.ReadLine()
System.IO.StreamReader.ReadLineAsync()
System.IO.StreamReader.ReadToEnd()
System.IO.StreamReader.ReadToEndAsync()
System.IO.StreamReader.BaseStream
System.IO.StreamReader.CurrentEncoding
System.IO.StreamReader.EndOfStream
System.IO.TextReader.Dispose()
System.IO.TextReader.Synchronized(System.IO.TextReader)
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.CodeAnalysis.Source
Assembly: Azos.dll
Syntax
public class FileSource : StreamReader, IDisposable, ISourceText
Constructors
FileSource(Language, String)
Constructs file source with specified language ignoring file extension
Declaration
public FileSource(Language language, string fileName)
Parameters
Type | Name | Description |
---|---|---|
Language | language | |
System.String | fileName |
FileSource(String)
Constructs file source infering source language from file extension
Declaration
public FileSource(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName |
Properties
EOF
Declaration
public bool EOF { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Language
Declaration
public Language Language { get; }
Property Value
Type | Description |
---|---|
Language |
Name
Returns source's file name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
PeekChar()
Declaration
public char PeekChar()
Returns
Type | Description |
---|---|
System.Char |
ReadChar()
Declaration
public char ReadChar()
Returns
Type | Description |
---|---|
System.Char |
Reset()
Declaration
public void Reset()
Implements
System.IDisposable