blob: 93557e74bd00ac45096d382f7175902f651a1f21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.IO;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
namespace ILLink.RoslynAnalyzer.Tests
{
class XmlText : AdditionalText
{
public override string Path { get; }
readonly Stream Doc;
public XmlText (string path, Stream data)
{
Path = path;
Doc = data;
}
public override SourceText? GetText (CancellationToken token = default)
{
return SourceText.From (Doc);
}
}
}
|