1.2.1
New features:
Add support for tagging plugins in Roslyn catalog
It's now possible to tag Roslyn based catalogs. This feature was previously available in all the other catalogs and now also Roslyn catalog supports it.
Examples:
[Fact]
public async Task CanTagCode()
{
// Arrange
var code = @"public class MyClass
{
public void RunThings()
{
var y = 0;
var a = 1;
a = y + 10;
Debug.WriteLine(y + a);
}
}";
var catalog = new RoslynPluginCatalog(code, new RoslynPluginCatalogOptions() { Tags = new List<string>() { "CustomTag" } });
await catalog.Initialize();
var plugin = catalog.Single();
Assert.Equal("CustomTag", plugin.Tag);
}
[Fact]
public async Task CanTagScript()
{
// Arrange
var code = "Debug.WriteLine(\"Hello world!\");";
var catalog = new RoslynPluginCatalog(code, new RoslynPluginCatalogOptions() { Tags = new List<string>() { "CustomTag" } });
await catalog.Initialize();
var plugin = catalog.Single();
Assert.Equal("CustomTag", plugin.Tag);
}