Browse Source

static readonly rename

Nikita Tsukanov 10 years ago
parent
commit
dbeb0344f8

+ 5 - 5
src/Gtk/Perspex.Gtk/CursorFactory.cs

@@ -18,7 +18,7 @@ namespace Perspex.Gtk
         {
         }
 
-        private static readonly Dictionary<StandardCursorType, object> s_cursorTypeMapping = new Dictionary
+        private static readonly Dictionary<StandardCursorType, object> CursorTypeMapping = new Dictionary
             <StandardCursorType, object>
         {
             { StandardCursorType.AppStarting, CursorType.Watch },
@@ -37,7 +37,7 @@ namespace Perspex.Gtk
             { StandardCursorType.Help, Gtk.Stock.Help }
         };
 
-        private static readonly Dictionary<StandardCursorType, IPlatformHandle> s_cache =
+        private static readonly Dictionary<StandardCursorType, IPlatformHandle> Cache =
             new Dictionary<StandardCursorType, IPlatformHandle>();
 
         private Gdk.Cursor GetCursor(object desc)
@@ -62,12 +62,12 @@ namespace Perspex.Gtk
         public IPlatformHandle GetCursor(StandardCursorType cursorType)
         {
             IPlatformHandle rv;
-            if (!s_cache.TryGetValue(cursorType, out rv))
+            if (!Cache.TryGetValue(cursorType, out rv))
             {
-                s_cache[cursorType] =
+                Cache[cursorType] =
                     rv =
                         new PlatformHandle(
-                            GetCursor(s_cursorTypeMapping[cursorType]).Handle,
+                            GetCursor(CursorTypeMapping[cursorType]).Handle,
                             "GTKCURSOR");
             }
 

+ 4 - 4
src/Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs

@@ -11,7 +11,7 @@ namespace Perspex.Gtk
     public class GtkKeyboardDevice : KeyboardDevice
     {
         private static GtkKeyboardDevice s_instance;
-        private static readonly Dictionary<Gdk.Key, string> s_nameDic = new Dictionary<Gdk.Key, string>();
+        private static readonly Dictionary<Gdk.Key, string> NameDic = new Dictionary<Gdk.Key, string>();
 
         static GtkKeyboardDevice()
         {
@@ -19,9 +19,9 @@ namespace Perspex.Gtk
             foreach (var f in typeof(Gdk.Key).GetFields(BindingFlags.Public | BindingFlags.Static))
             {
                 var key = (Gdk.Key)f.GetValue(null);
-                if (s_nameDic.ContainsKey(key))
+                if (NameDic.ContainsKey(key))
                     continue;
-                s_nameDic[key] = f.Name;
+                NameDic[key] = f.Name;
             }
         }
 
@@ -41,7 +41,7 @@ namespace Perspex.Gtk
             else
             {
                 string s;
-                if (!s_nameDic.TryGetValue(key, out s))
+                if (!NameDic.TryGetValue(key, out s))
                     s = "Unknown";
                 Key result;
 

+ 2 - 2
src/Gtk/Perspex.Gtk/WindowImpl.cs

@@ -26,7 +26,7 @@ namespace Perspex.Gtk
 
         private uint _lastKeyEventTimestamp;
 
-        private static readonly Gdk.Cursor s_defaultCursor = new Gdk.Cursor(CursorType.LeftPtr);
+        private static readonly Gdk.Cursor DefaultCursor = new Gdk.Cursor(CursorType.LeftPtr);
 
         public WindowImpl()
             : base(Gtk.WindowType.Toplevel)
@@ -104,7 +104,7 @@ namespace Perspex.Gtk
 
         public void SetCursor(IPlatformHandle cursor)
         {
-            GdkWindow.Cursor = cursor != null ? new Gdk.Cursor(cursor.Handle) : s_defaultCursor;
+            GdkWindow.Cursor = cursor != null ? new Gdk.Cursor(cursor.Handle) : DefaultCursor;
         }
 
         public IDisposable ShowDialog()

+ 2 - 2
src/Perspex.Animation/Animate.cs

@@ -22,7 +22,7 @@ namespace Perspex.Animation
         /// <summary>
         /// The time span of each frame.
         /// </summary>
-        private static readonly TimeSpan s_tick = TimeSpan.FromSeconds(1.0 / FramesPerSecond);
+        private static readonly TimeSpan Tick = TimeSpan.FromSeconds(1.0 / FramesPerSecond);
 
         /// <summary>
         /// Initializes static members of the <see cref="Animate"/> class.
@@ -31,7 +31,7 @@ namespace Perspex.Animation
         {
             Stopwatch = new Stopwatch();
             Stopwatch.Start();
-            Timer = Observable.Interval(s_tick, PerspexScheduler.Instance)
+            Timer = Observable.Interval(Tick, PerspexScheduler.Instance)
                 .Select(_ => Stopwatch.Elapsed)
                 .Publish()
                 .RefCount();

+ 2 - 2
src/Perspex.Base/Utilities/TypeUtilities.cs

@@ -13,7 +13,7 @@ namespace Perspex.Utilities
     /// </summary>
     internal static class TypeUtilities
     {
-        private static readonly Dictionary<Type, List<Type>> s_conversions = new Dictionary<Type, List<Type>>()
+        private static readonly Dictionary<Type, List<Type>> Conversions = new Dictionary<Type, List<Type>>()
         {
             { typeof(decimal), new List<Type> { typeof(sbyte), typeof(byte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(char) } },
             { typeof(double), new List<Type> { typeof(sbyte), typeof(byte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(char), typeof(float) } },
@@ -56,7 +56,7 @@ namespace Perspex.Utilities
                 result = value;
                 return true;
             }
-            else if (s_conversions.ContainsKey(to) && s_conversions[to].Contains(from))
+            else if (Conversions.ContainsKey(to) && Conversions[to].Contains(from))
             {
                 result = Convert.ChangeType(value, to);
                 return true;

+ 2 - 2
src/Perspex.Controls/Deck.cs

@@ -23,7 +23,7 @@ namespace Perspex.Controls
         /// <summary>
         /// The default value of <see cref="IReparentingControl"/> for <see cref="Deck"/>.
         /// </summary>
-        private static readonly ITemplate<IPanel> s_panelTemplate =
+        private static readonly ITemplate<IPanel> PanelTemplate =
             new FuncTemplate<IPanel>(() => new Panel());
 
         /// <summary>
@@ -32,7 +32,7 @@ namespace Perspex.Controls
         static Deck()
         {
             AutoSelectProperty.OverrideDefaultValue<Deck>(true);
-            ItemsPanelProperty.OverrideDefaultValue<Deck>(s_panelTemplate);
+            ItemsPanelProperty.OverrideDefaultValue<Deck>(PanelTemplate);
         }
 
         /// <summary>

+ 2 - 2
src/Perspex.Controls/ItemsControl.cs

@@ -26,7 +26,7 @@ namespace Perspex.Controls
         /// The default value for the <see cref="ItemsPanel"/> property.
         /// </summary>
         [SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "Needs to be before or a NullReferenceException is thrown.")]
-        private static readonly FuncTemplate<IPanel> s_defaultPanel =
+        private static readonly FuncTemplate<IPanel> DefaultPanel =
             new FuncTemplate<IPanel>(() => new StackPanel());
 
         /// <summary>
@@ -39,7 +39,7 @@ namespace Perspex.Controls
         /// Defines the <see cref="ItemsPanel"/> property.
         /// </summary>
         public static readonly PerspexProperty<ITemplate<IPanel>> ItemsPanelProperty =
-            PerspexProperty.Register<ItemsControl, ITemplate<IPanel>>("ItemsPanel", defaultValue: s_defaultPanel);
+            PerspexProperty.Register<ItemsControl, ITemplate<IPanel>>("ItemsPanel", defaultValue: DefaultPanel);
 
         private IItemContainerGenerator _itemContainerGenerator;
 

+ 2 - 2
src/Perspex.Controls/Menu.cs

@@ -21,7 +21,7 @@ namespace Perspex.Controls
         /// <summary>
         /// Defines the default items panel used by a <see cref="Menu"/>.
         /// </summary>
-        private static readonly ITemplate<IPanel> s_defaultPanel =
+        private static readonly ITemplate<IPanel> DefaultPanel =
             new FuncTemplate<IPanel>(() => new StackPanel { Orientation = Orientation.Horizontal });
 
         /// <summary>
@@ -40,7 +40,7 @@ namespace Perspex.Controls
         /// </summary>
         static Menu()
         {
-            ItemsPanelProperty.OverrideDefaultValue(typeof(Menu), s_defaultPanel);
+            ItemsPanelProperty.OverrideDefaultValue(typeof(Menu), DefaultPanel);
             MenuItem.ClickEvent.AddClassHandler<Menu>(x => x.OnMenuClick);
             MenuItem.SubmenuOpenedEvent.AddClassHandler<Menu>(x => x.OnSubmenuOpened);
         }

+ 2 - 2
src/Perspex.Controls/MenuItem.cs

@@ -74,7 +74,7 @@ namespace Perspex.Controls
         /// <summary>
         /// The default value for the <see cref="ItemsControl.ItemsPanel"/> property.
         /// </summary>
-        private static readonly ITemplate<IPanel> s_defaultPanel =
+        private static readonly ITemplate<IPanel> DefaultPanel =
             new FuncTemplate<IPanel>(() => new StackPanel
             {
                 [KeyboardNavigation.DirectionalNavigationProperty] = KeyboardNavigationMode.Cycle,
@@ -97,7 +97,7 @@ namespace Perspex.Controls
         {
             SelectableMixin.Attach<MenuItem>(IsSelectedProperty);
             FocusableProperty.OverrideDefaultValue<MenuItem>(true);
-            ItemsPanelProperty.OverrideDefaultValue<MenuItem>(s_defaultPanel);
+            ItemsPanelProperty.OverrideDefaultValue<MenuItem>(DefaultPanel);
             ClickEvent.AddClassHandler<MenuItem>(x => x.OnClick);
             SubmenuOpenedEvent.AddClassHandler<MenuItem>(x => x.OnSubmenuOpened);
             IsSubMenuOpenProperty.Changed.AddClassHandler<MenuItem>(x => x.SubMenuOpenChanged);

+ 2 - 2
src/Perspex.Controls/TreeViewItem.cs

@@ -30,7 +30,7 @@ namespace Perspex.Controls
         public static readonly PerspexProperty<bool> IsSelectedProperty =
             ListBoxItem.IsSelectedProperty.AddOwner<TreeViewItem>();
 
-        private static readonly ITemplate<IPanel> s_defaultPanel =
+        private static readonly ITemplate<IPanel> DefaultPanel =
             new FuncTemplate<IPanel>(() => new StackPanel
             {
                 [KeyboardNavigation.DirectionalNavigationProperty] = KeyboardNavigationMode.Continue,
@@ -45,7 +45,7 @@ namespace Perspex.Controls
         {
             SelectableMixin.Attach<TreeViewItem>(IsSelectedProperty);
             FocusableProperty.OverrideDefaultValue<TreeViewItem>(true);
-            ItemsPanelProperty.OverrideDefaultValue<TreeViewItem>(s_defaultPanel);
+            ItemsPanelProperty.OverrideDefaultValue<TreeViewItem>(DefaultPanel);
         }
 
         /// <summary>

+ 3 - 3
src/Perspex.Diagnostics/Views/ControlDetailsView.cs

@@ -13,7 +13,7 @@ namespace Perspex.Diagnostics.Views
 {
     internal class ControlDetailsView : UserControl
     {
-        private static readonly PerspexProperty<ControlDetailsViewModel> s_viewModelProperty =
+        private static readonly PerspexProperty<ControlDetailsViewModel> ViewModelProperty =
             PerspexProperty.Register<ControlDetailsView, ControlDetailsViewModel>("ViewModel");
 
         public ControlDetailsView()
@@ -25,8 +25,8 @@ namespace Perspex.Diagnostics.Views
 
         public ControlDetailsViewModel ViewModel
         {
-            get { return GetValue(s_viewModelProperty); }
-            private set { SetValue(s_viewModelProperty, value); }
+            get { return GetValue(ViewModelProperty); }
+            private set { SetValue(ViewModelProperty, value); }
         }
 
         private void InitializeComponent()

+ 3 - 3
src/Perspex.Diagnostics/Views/LogicalTreeView.cs

@@ -14,7 +14,7 @@ namespace Perspex.Diagnostics.Views
 
     internal class LogicalTreeView : TreePage
     {
-        private static readonly PerspexProperty<LogicalTreeViewModel> s_viewModelProperty =
+        private static readonly PerspexProperty<LogicalTreeViewModel> ViewModelProperty =
             PerspexProperty.Register<LogicalTreeView, LogicalTreeViewModel>("ViewModel");
 
         public LogicalTreeView()
@@ -26,8 +26,8 @@ namespace Perspex.Diagnostics.Views
 
         public LogicalTreeViewModel ViewModel
         {
-            get { return GetValue(s_viewModelProperty); }
-            private set { SetValue(s_viewModelProperty, value); }
+            get { return GetValue(ViewModelProperty); }
+            private set { SetValue(ViewModelProperty, value); }
         }
 
         private void InitializeComponent()

+ 3 - 3
src/Perspex.Diagnostics/Views/VisualTreeView.cs

@@ -15,7 +15,7 @@ namespace Perspex.Diagnostics.Views
 
     internal class VisualTreeView : TreePage
     {
-        private static readonly PerspexProperty<VisualTreeViewModel> s_viewModelProperty =
+        private static readonly PerspexProperty<VisualTreeViewModel> ViewModelProperty =
             PerspexProperty.Register<VisualTreeView, VisualTreeViewModel>("ViewModel");
 
         public VisualTreeView()
@@ -27,8 +27,8 @@ namespace Perspex.Diagnostics.Views
 
         public VisualTreeViewModel ViewModel
         {
-            get { return GetValue(s_viewModelProperty); }
-            private set { SetValue(s_viewModelProperty, value); }
+            get { return GetValue(ViewModelProperty); }
+            private set { SetValue(ViewModelProperty, value); }
         }
 
         private void InitializeComponent()

+ 2 - 2
src/Perspex.SceneGraph/Media/PathMarkupParser.cs

@@ -14,7 +14,7 @@ namespace Perspex.Media
     /// </summary>
     public class PathMarkupParser
     {
-        private static readonly Dictionary<char, Command> s_commands = new Dictionary<char, Command>
+        private static readonly Dictionary<char, Command> Commands = new Dictionary<char, Command>
         {
             { 'F', Command.FillRule },
             { 'f', Command.FillRule },
@@ -184,7 +184,7 @@ namespace Perspex.Media
                 char c = (char)i;
                 Command command = Command.None;
 
-                if (!s_commands.TryGetValue(c, out command))
+                if (!Commands.TryGetValue(c, out command))
                 {
                     if ((char.IsDigit(c) || c == '.' || c == '+' || c == '-') &&
                         (lastCommand != Command.None))

+ 3 - 3
src/Perspex.Themes.Default/MenuItemStyle.cs

@@ -21,7 +21,7 @@ namespace Perspex.Themes.Default
     /// </summary>
     public class MenuItemStyle : Styles
     {
-        private static readonly DataTemplate s_accessKeyDataTemplate =
+        private static readonly DataTemplate AccessKeyDataTemplate =
             new DataTemplate<string>(x => new AccessText { Text = x });
 
         /// <summary>
@@ -96,7 +96,7 @@ namespace Perspex.Themes.Default
                         {
                             DataTemplates = new DataTemplates
                             {
-                                s_accessKeyDataTemplate,
+                                AccessKeyDataTemplate,
                             },
                             [~ContentPresenter.ContentProperty] = control[~MenuItem.HeaderProperty],
                             [~Layoutable.MarginProperty] = control[~TemplatedControl.PaddingProperty],
@@ -197,7 +197,7 @@ namespace Perspex.Themes.Default
                         {
                             DataTemplates = new DataTemplates
                             {
-                                s_accessKeyDataTemplate,
+                                AccessKeyDataTemplate,
                             },
                             VerticalAlignment = VerticalAlignment.Center,
                             [~ContentPresenter.ContentProperty] = control[~MenuItem.HeaderProperty],

+ 3 - 3
src/Windows/Perspex.Direct2D1/Direct2D1Platform.cs

@@ -13,7 +13,7 @@ namespace Perspex.Direct2D1
     {
         private static Direct2D1Platform s_instance = new Direct2D1Platform();
 
-        private static SharpDX.Direct2D1.Factory s_d2d1Factory = new SharpDX.Direct2D1.Factory();
+        private static SharpDX.Direct2D1.Factory s_d2D1Factory = new SharpDX.Direct2D1.Factory();
 
         private static SharpDX.DirectWrite.Factory s_dwfactory = new SharpDX.DirectWrite.Factory();
 
@@ -23,7 +23,7 @@ namespace Perspex.Direct2D1
         {
             var locator = Locator.CurrentMutable;
             locator.Register(() => s_instance, typeof(IPlatformRenderInterface));
-            locator.Register(() => s_d2d1Factory, typeof(SharpDX.Direct2D1.Factory));
+            locator.Register(() => s_d2D1Factory, typeof(SharpDX.Direct2D1.Factory));
             locator.Register(() => s_dwfactory, typeof(SharpDX.DirectWrite.Factory));
             locator.Register(() => s_imagingFactory, typeof(SharpDX.WIC.ImagingFactory));
         }
@@ -60,7 +60,7 @@ namespace Perspex.Direct2D1
 
         public IRenderTargetBitmapImpl CreateRenderTargetBitmap(int width, int height)
         {
-            return new RenderTargetBitmapImpl(s_imagingFactory, s_d2d1Factory, width, height);
+            return new RenderTargetBitmapImpl(s_imagingFactory, s_d2D1Factory, width, height);
         }
 
         public IStreamGeometryImpl CreateStreamGeometry()

+ 5 - 5
src/Windows/Perspex.Win32/CursorFactory.cs

@@ -20,7 +20,7 @@ namespace Perspex.Win32
         {
         }
 
-        private static readonly Dictionary<StandardCursorType, int> s_cursorTypeMapping = new Dictionary
+        private static readonly Dictionary<StandardCursorType, int> CursorTypeMapping = new Dictionary
             <StandardCursorType, int>
         {
             { StandardCursorType.AppStarting, 32650 },
@@ -41,18 +41,18 @@ namespace Perspex.Win32
             { StandardCursorType.Wait, 32514 }
         };
 
-        private static readonly Dictionary<StandardCursorType, IPlatformHandle> s_cache =
+        private static readonly Dictionary<StandardCursorType, IPlatformHandle> Cache =
             new Dictionary<StandardCursorType, IPlatformHandle>();
 
         public IPlatformHandle GetCursor(StandardCursorType cursorType)
         {
             IPlatformHandle rv;
-            if (!s_cache.TryGetValue(cursorType, out rv))
+            if (!Cache.TryGetValue(cursorType, out rv))
             {
-                s_cache[cursorType] =
+                Cache[cursorType] =
                     rv =
                         new PlatformHandle(
-                            UnmanagedMethods.LoadCursor(IntPtr.Zero, new IntPtr(s_cursorTypeMapping[cursorType])),
+                            UnmanagedMethods.LoadCursor(IntPtr.Zero, new IntPtr(CursorTypeMapping[cursorType])),
                             PlatformConstants.CursorHandleType);
             }
 

+ 2 - 2
src/Windows/Perspex.Win32/Embedding/EmbeddedWindowImpl.cs

@@ -8,7 +8,7 @@ namespace Perspex.Win32
 {
     public class EmbeddedWindowImpl : WindowImpl
     {
-        private static readonly System.Windows.Forms.UserControl s_winFormsControl = new System.Windows.Forms.UserControl();
+        private static readonly System.Windows.Forms.UserControl WinFormsControl = new System.Windows.Forms.UserControl();
 
         public IntPtr Handle { get; private set; }
 
@@ -23,7 +23,7 @@ namespace Perspex.Win32
                 UnmanagedMethods.CW_USEDEFAULT,
                 UnmanagedMethods.CW_USEDEFAULT,
                 UnmanagedMethods.CW_USEDEFAULT,
-                s_winFormsControl.Handle,
+                WinFormsControl.Handle,
                 IntPtr.Zero,
                 IntPtr.Zero,
                 IntPtr.Zero);

+ 1 - 0
src/Windows/Perspex.Win32/Interop/UnmanagedMethods.cs

@@ -5,6 +5,7 @@ using System;
 using System.Diagnostics.CodeAnalysis;
 using System.Runtime.InteropServices;
 using System.Text;
+// ReSharper disable InconsistentNaming
 
 namespace Perspex.Win32.Interop
 {

+ 5 - 5
src/Windows/Perspex.Win32/WindowImpl.cs

@@ -22,7 +22,7 @@ namespace Perspex.Win32
     {
         private static List<WindowImpl> s_instances = new List<WindowImpl>();
 
-        private static readonly IntPtr s_defaultCursor = UnmanagedMethods.LoadCursor(
+        private static readonly IntPtr DefaultCursor = UnmanagedMethods.LoadCursor(
             IntPtr.Zero, new IntPtr((int)UnmanagedMethods.Cursor.IDC_ARROW));
 
         private UnmanagedMethods.WndProc _wndProcDelegate;
@@ -187,7 +187,7 @@ namespace Perspex.Win32
         public void SetCursor(IPlatformHandle cursor)
         {
             UnmanagedMethods.SetClassLong(_hwnd, UnmanagedMethods.ClassLongIndex.GCL_HCURSOR,
-                cursor?.Handle ?? s_defaultCursor);
+                cursor?.Handle ?? DefaultCursor);
         }
 
         protected virtual IntPtr CreateWindowOverride(ushort atom)
@@ -212,7 +212,7 @@ namespace Perspex.Win32
         {
             bool unicode = UnmanagedMethods.IsWindowUnicode(hWnd);
 
-            const double WheelDelta = 120.0;
+            const double wheelDelta = 120.0;
             uint timestamp = unchecked((uint)UnmanagedMethods.GetMessageTime());
 
             RawInputEventArgs e = null;
@@ -327,7 +327,7 @@ namespace Perspex.Win32
                         timestamp,
                         _owner,
                         ScreenToClient((uint)lParam & 0xffff, (uint)lParam >> 16),
-                        new Vector(0, ((int)wParam >> 16) / WheelDelta), WindowsKeyboardDevice.Instance.Modifiers);
+                        new Vector(0, ((int)wParam >> 16) / wheelDelta), WindowsKeyboardDevice.Instance.Modifiers);
                     break;
 
                 case UnmanagedMethods.WindowsMessage.WM_MOUSELEAVE:
@@ -388,7 +388,7 @@ namespace Perspex.Win32
                 style = 0,
                 lpfnWndProc = _wndProcDelegate,
                 hInstance = Marshal.GetHINSTANCE(GetType().Module),
-                hCursor = s_defaultCursor,
+                hCursor = DefaultCursor,
                 hbrBackground = (IntPtr)5,
                 lpszClassName = _className,
             };

+ 3 - 3
tests/Perspex.Direct2D1.UnitTests/Controls/Shapes/PathTests.cs

@@ -11,7 +11,7 @@ namespace Perspex.Direct2D1.UnitTests.Controls.Shapes
 {
     public class PathTests
     {
-        private static readonly RectComparer s_compare = new RectComparer();
+        private static readonly RectComparer Compare = new RectComparer();
 
         [Fact]
         public void Should_Measure_Expander_Triangle_Correctly()
@@ -32,7 +32,7 @@ namespace Perspex.Direct2D1.UnitTests.Controls.Shapes
                 target.Measure(new Size(100, 100));
                 target.Arrange(new Rect(0, 0, 100, 100));
 
-                Assert.Equal(new Rect(0, 0, 4, 10), target.Bounds, s_compare);
+                Assert.Equal(new Rect(0, 0, 4, 10), target.Bounds, Compare);
             }
         }
 
@@ -66,7 +66,7 @@ namespace Perspex.Direct2D1.UnitTests.Controls.Shapes
                 //
                 // However Path.Measure doesn't correctly handle strokes currently, so testing for
                 // the (incorrect) current output for now...
-                Assert.Equal(new Rect(0, 0, 4, 10), target.Bounds, s_compare);
+                Assert.Equal(new Rect(0, 0, 4, 10), target.Bounds, Compare);
             }
         }
     }

+ 3 - 3
tests/Perspex.Direct2D1.UnitTests/Media/GeometryTests.cs

@@ -9,7 +9,7 @@ namespace Perspex.Direct2D1.UnitTests.Media
 {
     public class GeometryTests
     {
-        private static readonly RectComparer s_compare = new RectComparer();
+        private static readonly RectComparer Compare = new RectComparer();
 
         [Fact]
         public void Should_Measure_Expander_Triangle_Correctly()
@@ -20,7 +20,7 @@ namespace Perspex.Direct2D1.UnitTests.Media
 
                 var target = StreamGeometry.Parse("M 0 2 L 4 6 L 0 10 Z");
 
-                Assert.Equal(new Rect(0, 2, 4, 8), target.Bounds, s_compare);
+                Assert.Equal(new Rect(0, 2, 4, 8), target.Bounds, Compare);
             }
         }
 
@@ -33,7 +33,7 @@ namespace Perspex.Direct2D1.UnitTests.Media
 
                 var target = StreamGeometry.Parse("M 0 2 L 4 6 L 0 10 Z");
 
-                Assert.Equal(new Rect(-1, -0.414, 6.414, 12.828), target.GetRenderBounds(2), s_compare);
+                Assert.Equal(new Rect(-1, -0.414, 6.414, 12.828), target.GetRenderBounds(2), Compare);
             }
         }
     }