Skip to content

Commit 58b02da

Browse files
committed
Reduced code duplication in Prism.Avalonia's Prism.Navigation.Regions namespace (note: highly dependent on Implicit Using's auto-gen of global using DependencyObject = global::Avalonia.AvaloniaObject;)
1 parent 0e64438 commit 58b02da

30 files changed

+138
-2018
lines changed

src/Avalonia/Prism.Avalonia/Navigation/Regions/Behaviors/AutoPopulateRegionBehavior.cs

Lines changed: 0 additions & 100 deletions
This file was deleted.

src/Avalonia/Prism.Avalonia/Navigation/Regions/DefaultRegionManagerAccessor.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/Avalonia/Prism.Avalonia/Navigation/Regions/INavigationAware.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Avalonia/Prism.Avalonia/Navigation/Regions/IRegionManagerAccessor.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/Avalonia/Prism.Avalonia/Navigation/Regions/ItemMetadata.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using Avalonia;
33
using Prism.Extensions;
44

@@ -36,16 +36,16 @@ static ItemMetadata()
3636
/// <value>The name of the wrapped item.</value>
3737
public string Name
3838
{
39-
get { return GetValue(NameProperty); }
40-
set { SetValue(NameProperty, value); }
39+
get => (string)GetValue(NameProperty);
40+
set => SetValue(NameProperty, value);
4141
}
4242

4343
/// <summary>Gets or sets a value indicating whether the wrapped item is considered active.</summary>
4444
/// <value><see langword="true" /> if the item should be considered active; otherwise <see langword="false" />.</value>
4545
public bool IsActive
4646
{
47-
get { return GetValue(IsActiveProperty); }
48-
set { SetValue(IsActiveProperty, value); }
47+
get => (bool)GetValue(IsActiveProperty);
48+
set => SetValue(IsActiveProperty, value);
4949
}
5050

5151
/// <summary>Occurs when metadata on the item changes.</summary>

src/Avalonia/Prism.Avalonia/Navigation/Regions/ItemsControlRegionAdapter.cs

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)