diff --git a/src/AvaloniaMath/Fonts/AvaloniaSystemFont.cs b/src/AvaloniaMath/Fonts/AvaloniaSystemFont.cs index 6cb8c3d2..38e88893 100644 --- a/src/AvaloniaMath/Fonts/AvaloniaSystemFont.cs +++ b/src/AvaloniaMath/Fonts/AvaloniaSystemFont.cs @@ -7,7 +7,7 @@ namespace AvaloniaMath.Fonts; -internal class AvaloniaSystemFont : ITeXFont +internal sealed class AvaloniaSystemFont : ITeXFont { private readonly string _fontFamily; diff --git a/src/AvaloniaMath/Rendering/AvaloniaElementRenderer.cs b/src/AvaloniaMath/Rendering/AvaloniaElementRenderer.cs index 720b0225..beff7c73 100644 --- a/src/AvaloniaMath/Rendering/AvaloniaElementRenderer.cs +++ b/src/AvaloniaMath/Rendering/AvaloniaElementRenderer.cs @@ -15,7 +15,7 @@ namespace AvaloniaMath.Rendering; /// The renderer that uses Avalonia drawing context. -internal class AvaloniaElementRenderer : IElementRenderer +internal sealed class AvaloniaElementRenderer : IElementRenderer { private readonly DrawingContext _foregroundContext; private readonly double _scale; @@ -94,10 +94,10 @@ private static Transform ToTransform(Transformation transformation) switch (transformation.Kind) { case TransformationKind.Translate: - var tt = (Transformation.Translate) transformation; + var tt = (Transformation.Translate)transformation; return new TranslateTransform(tt.X, tt.Y); case TransformationKind.Rotate: - var rt = (Transformation.Rotate) transformation; + var rt = (Transformation.Rotate)transformation; return new RotateTransform(rt.RotationDegrees); default: throw new NotSupportedException($"Unknown {nameof(Transformation)} kind: {transformation.Kind}"); diff --git a/src/AvaloniaMath/Rendering/GeometryElementRenderer.cs b/src/AvaloniaMath/Rendering/GeometryElementRenderer.cs index 63355f5b..06fdf5f0 100644 --- a/src/AvaloniaMath/Rendering/GeometryElementRenderer.cs +++ b/src/AvaloniaMath/Rendering/GeometryElementRenderer.cs @@ -11,7 +11,7 @@ namespace AvaloniaMath.Rendering; /// A renderer that renders the elements to a provided instance. // TODO[#357]: Make this work -internal class GeometryElementRenderer : IElementRenderer +internal sealed class GeometryElementRenderer : IElementRenderer { private readonly GeometryGroup _geometry; private readonly double _scale; diff --git a/src/XamlMath.Shared/Build/IsExternalInit.cs b/src/XamlMath.Shared/Build/IsExternalInit.cs index 5298a49a..7795b71a 100644 --- a/src/XamlMath.Shared/Build/IsExternalInit.cs +++ b/src/XamlMath.Shared/Build/IsExternalInit.cs @@ -3,7 +3,7 @@ namespace System.Runtime.CompilerServices; #if !NET5_0_OR_GREATER /// This is only used to enable init-only attributes for older target frameworks. -internal class IsExternalInit +internal sealed class IsExternalInit { } #endif diff --git a/src/XamlMath.Shared/DelimiterInfo.cs b/src/XamlMath.Shared/DelimiterInfo.cs index 62d103fe..65d96d17 100644 --- a/src/XamlMath.Shared/DelimiterInfo.cs +++ b/src/XamlMath.Shared/DelimiterInfo.cs @@ -5,7 +5,7 @@ namespace XamlMath; /// /// Information about the body between a pair of delimiters. /// -internal class DelimiterInfo +internal sealed class DelimiterInfo { public Atom Body { get; } diff --git a/src/XamlMath.Shared/TexFormulaHelper.cs b/src/XamlMath.Shared/TexFormulaHelper.cs index 16a42eab..37c9cd33 100644 --- a/src/XamlMath.Shared/TexFormulaHelper.cs +++ b/src/XamlMath.Shared/TexFormulaHelper.cs @@ -6,7 +6,7 @@ namespace XamlMath; -internal class TexFormulaHelper +internal sealed class TexFormulaHelper { private readonly TexFormulaParser _formulaParser; private readonly SourceSpan _source;