Files
ILSpy/TestPlugin/AboutPageAddition.cs
Siegfried Pammer 51aafa0fd9 Move ILSpy UI code back to the ICSharpCode.ILSpy root namespace
The Avalonia port had placed the UI app in an ILSpy.* namespace tree,
while the csproj RootNamespace and every prior release (through 10.1)
use ICSharpCode.ILSpy.*. Restoring the historical namespace reduces the
public API diff against release/10.1 for plugin authors and removes the
shadowing that forced global:: qualifiers in the test project. The
Images class and AccessOverlayIcon enum move back into the root
namespace (as in 10.1), since an ICSharpCode.ILSpy.Images namespace
would shadow the Images class for all code inside ICSharpCode.ILSpy.

Assisted-by: Claude:claude-fable-5:Claude Code
2026-06-12 21:12:07 +02:00

44 lines
1.2 KiB
C#

// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System.Composition;
using Avalonia.Controls;
using Avalonia.Media;
using AvaloniaEdit.Highlighting;
using ICSharpCode.ILSpy;
using ICSharpCode.ILSpy.Commands;
using ICSharpCode.ILSpy.TextView;
namespace TestPlugin
{
[Export(typeof(IAboutPageAddition))]
[Shared]
public class AboutPageAddition : IAboutPageAddition
{
public void Write(ISmartTextOutput textOutput)
{
textOutput.WriteLine();
textOutput.Write("This is a test.");
textOutput.WriteLine();
textOutput.WriteLine();
textOutput.BeginSpan(new HighlightingColor {
Background = new SimpleHighlightingBrush(Colors.Black),
FontStyle = FontStyle.Italic,
Foreground = new SimpleHighlightingBrush(Colors.Aquamarine)
});
textOutput.Write("DO NOT PRESS THIS BUTTON --> ");
textOutput.AddButton(null, "Test!", (sender, args) => {
if (sender is Button button)
button.Content = "Naughty Naughty!";
});
textOutput.Write(" <--");
textOutput.WriteLine();
textOutput.EndSpan();
textOutput.WriteLine();
}
}
}