Skip to content

Commit

Permalink
Sealed several internal classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehonti Ramos committed Sep 27, 2023
1 parent 837e6da commit 9806c2b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/AvaloniaMath/Fonts/AvaloniaSystemFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace AvaloniaMath.Fonts;

internal class AvaloniaSystemFont : ITeXFont
internal sealed class AvaloniaSystemFont : ITeXFont
{
private readonly string _fontFamily;

Expand Down
6 changes: 3 additions & 3 deletions src/AvaloniaMath/Rendering/AvaloniaElementRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace AvaloniaMath.Rendering;

/// <summary>The renderer that uses Avalonia drawing context.</summary>
internal class AvaloniaElementRenderer : IElementRenderer
internal sealed class AvaloniaElementRenderer : IElementRenderer
{
private readonly DrawingContext _foregroundContext;
private readonly double _scale;
Expand Down Expand Up @@ -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}");
Expand Down
2 changes: 1 addition & 1 deletion src/AvaloniaMath/Rendering/GeometryElementRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace AvaloniaMath.Rendering;

/// <summary>A renderer that renders the elements to a provided <see cref="GeometryGroup"/> instance.</summary>
// TODO[#357]: Make this work
internal class GeometryElementRenderer : IElementRenderer
internal sealed class GeometryElementRenderer : IElementRenderer
{
private readonly GeometryGroup _geometry;
private readonly double _scale;
Expand Down
2 changes: 1 addition & 1 deletion src/XamlMath.Shared/Build/IsExternalInit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace System.Runtime.CompilerServices;

#if !NET5_0_OR_GREATER
/// <summary>This is only used to enable init-only attributes for older target frameworks.</summary>
internal class IsExternalInit
internal sealed class IsExternalInit
{
}
#endif
2 changes: 1 addition & 1 deletion src/XamlMath.Shared/DelimiterInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace XamlMath;
/// <summary>
/// Information about the body between a pair of delimiters.
/// </summary>
internal class DelimiterInfo
internal sealed class DelimiterInfo
{
public Atom Body { get; }

Expand Down
2 changes: 1 addition & 1 deletion src/XamlMath.Shared/TexFormulaHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace XamlMath;

internal class TexFormulaHelper
internal sealed class TexFormulaHelper
{
private readonly TexFormulaParser _formulaParser;
private readonly SourceSpan _source;
Expand Down

0 comments on commit 9806c2b

Please sign in to comment.