Browse Source

Fixed typo.

Whitespace fixes.
pull/5309/head
José Pedro 6 years ago
parent
commit
f281e81530
No known key found for this signature in database GPG Key ID: B8247B9301707B83
  1. 8
      src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs
  2. 2
      tests/Avalonia.Markup.Xaml.UnitTests/MarkupExtensions/ResourceIncludeTests.cs
  3. 2
      tests/Avalonia.Markup.Xaml.UnitTests/StyleIncludeTests.cs

8
src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs

@ -14,7 +14,7 @@ namespace Avalonia.Data.Core.Plugins
{ {
private readonly Dictionary<(Type, string), PropertyInfo> _propertyLookup = private readonly Dictionary<(Type, string), PropertyInfo> _propertyLookup =
new Dictionary<(Type, string), PropertyInfo>(); new Dictionary<(Type, string), PropertyInfo>();
/// <inheritdoc/> /// <inheritdoc/>
public bool Match(object obj, string propertyName) => GetFirstPropertyWithName(obj.GetType(), propertyName) != null; public bool Match(object obj, string propertyName) => GetFirstPropertyWithName(obj.GetType(), propertyName) != null;
@ -51,7 +51,7 @@ namespace Avalonia.Data.Core.Plugins
private PropertyInfo GetFirstPropertyWithName(Type type, string propertyName) private PropertyInfo GetFirstPropertyWithName(Type type, string propertyName)
{ {
var key = (type, propertyName); var key = (type, propertyName);
if (!_propertyLookup.TryGetValue(key, out PropertyInfo propertyInfo)) if (!_propertyLookup.TryGetValue(key, out PropertyInfo propertyInfo))
{ {
propertyInfo = TryFindAndCacheProperty(type, propertyName); propertyInfo = TryFindAndCacheProperty(type, propertyName);
@ -59,7 +59,7 @@ namespace Avalonia.Data.Core.Plugins
return propertyInfo; return propertyInfo;
} }
private PropertyInfo TryFindAndCacheProperty(Type type, string propertyName) private PropertyInfo TryFindAndCacheProperty(Type type, string propertyName)
{ {
PropertyInfo found = null; PropertyInfo found = null;
@ -90,7 +90,7 @@ namespace Avalonia.Data.Core.Plugins
private readonly PropertyInfo _property; private readonly PropertyInfo _property;
private bool _eventRaised; private bool _eventRaised;
public Accessor(WeakReference<object> reference, PropertyInfo property) public Accessor(WeakReference<object> reference, PropertyInfo property)
{ {
Contract.Requires<ArgumentNullException>(reference != null); Contract.Requires<ArgumentNullException>(reference != null);
Contract.Requires<ArgumentNullException>(property != null); Contract.Requires<ArgumentNullException>(property != null);

2
tests/Avalonia.Markup.Xaml.UnitTests/MarkupExtensions/ResourceIncludeTests.cs

@ -5,7 +5,7 @@ using Avalonia.Media;
using Avalonia.UnitTests; using Avalonia.UnitTests;
using Xunit; using Xunit;
namespace Avalonia.Markup.Xaml.UnitTests.MakrupExtensions namespace Avalonia.Markup.Xaml.UnitTests.MarkupExtensions
{ {
public class ResourceIncludeTests : XamlTestBase public class ResourceIncludeTests : XamlTestBase
{ {

2
tests/Avalonia.Markup.Xaml.UnitTests/StyleIncludeTests.cs

@ -12,7 +12,7 @@ namespace Avalonia.Markup.Xaml.UnitTests
{ {
var styleXaml = @" var styleXaml = @"
<Style xmlns='https://github.com/avaloniaui' <Style xmlns='https://github.com/avaloniaui'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<Style.Resources> <Style.Resources>
<StaticResource x:Key='brush' ResourceKey='missing' /> <StaticResource x:Key='brush' ResourceKey='missing' />
</Style.Resources> </Style.Resources>

Loading…
Cancel
Save