Browse Source

feat(Base): Address Rule CA1823

pull/9685/head
Giuseppe Lippolis 4 years ago
parent
commit
0d4ddca7fd
  1. 2
      src/Avalonia.Base/Data/Core/ExpressionNode.cs
  2. 2
      src/Avalonia.Base/Data/Core/ExpressionObserver.cs
  3. 1
      src/Avalonia.Base/Media/TextFormatting/FormattedTextSource.cs
  4. 1
      src/Avalonia.Base/Media/TextFormatting/Unicode/CodepointEnumerator.cs

2
src/Avalonia.Base/Data/Core/ExpressionNode.cs

@ -4,8 +4,6 @@ namespace Avalonia.Data.Core
{ {
public abstract class ExpressionNode public abstract class ExpressionNode
{ {
private static readonly object CacheInvalid = new object();
protected static readonly WeakReference<object?> UnsetReference = protected static readonly WeakReference<object?> UnsetReference =
new WeakReference<object?>(AvaloniaProperty.UnsetValue); new WeakReference<object?>(AvaloniaProperty.UnsetValue);

2
src/Avalonia.Base/Data/Core/ExpressionObserver.cs

@ -49,8 +49,6 @@ namespace Avalonia.Data.Core
new TaskStreamPlugin(), new TaskStreamPlugin(),
new ObservableStreamPlugin(), new ObservableStreamPlugin(),
}; };
private static readonly object UninitializedValue = new object();
private readonly ExpressionNode _node; private readonly ExpressionNode _node;
private object? _root; private object? _root;
private Func<object?>? _rootGetter; private Func<object?>? _rootGetter;

1
src/Avalonia.Base/Media/TextFormatting/FormattedTextSource.cs

@ -8,7 +8,6 @@ namespace Avalonia.Media.TextFormatting
internal readonly struct FormattedTextSource : ITextSource internal readonly struct FormattedTextSource : ITextSource
{ {
private readonly CharacterBufferRange _text; private readonly CharacterBufferRange _text;
private readonly int length;
private readonly TextRunProperties _defaultProperties; private readonly TextRunProperties _defaultProperties;
private readonly IReadOnlyList<ValueSpan<TextRunProperties>>? _textModifier; private readonly IReadOnlyList<ValueSpan<TextRunProperties>>? _textModifier;

1
src/Avalonia.Base/Media/TextFormatting/Unicode/CodepointEnumerator.cs

@ -5,7 +5,6 @@ namespace Avalonia.Media.TextFormatting.Unicode
public ref struct CodepointEnumerator public ref struct CodepointEnumerator
{ {
private CharacterBufferRange _text; private CharacterBufferRange _text;
private int _pos;
public CodepointEnumerator(CharacterBufferRange text) public CodepointEnumerator(CharacterBufferRange text)
{ {

Loading…
Cancel
Save