progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
using System.Text;
|
||||
|
||||
namespace AspClassic.Scripting.Runtime;
|
||||
|
||||
internal sealed class LanguageBoundTextContentProvider : TextContentProvider
|
||||
{
|
||||
private readonly LanguageContext _context;
|
||||
|
||||
private readonly StreamContentProvider _streamProvider;
|
||||
|
||||
private readonly Encoding _defaultEncoding;
|
||||
|
||||
private readonly string _path;
|
||||
|
||||
public LanguageBoundTextContentProvider(LanguageContext context, StreamContentProvider streamProvider, Encoding defaultEncoding, string path)
|
||||
{
|
||||
_context = context;
|
||||
_streamProvider = streamProvider;
|
||||
_defaultEncoding = defaultEncoding;
|
||||
_path = path;
|
||||
}
|
||||
|
||||
public override SourceCodeReader GetReader()
|
||||
{
|
||||
return _context.GetSourceReader(_streamProvider.GetStream(), _defaultEncoding, _path);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue