Skip to content

Commit

Permalink
fix: build warnings due to WinRT and missing partial qualifier
Browse files Browse the repository at this point in the history
  • Loading branch information
abdes committed Oct 14, 2024
1 parent 512015b commit 20d173b
Show file tree
Hide file tree
Showing 20 changed files with 73 additions and 24 deletions.
6 changes: 4 additions & 2 deletions projects/Routing.Debugger.UI/src/Config/RouteAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ namespace DroidNet.Routing.Debugger.UI.Config;
using System.Globalization;
using DroidNet.Routing.Debugger.UI.TreeView;

/// <summary>Adapter for a <see cref="IRoute" /> so it can be used inside the <see cref="RoutesView" /> control.</summary>
/// <summary>
/// Adapter for a <see cref="IRoute" /> so it can be used inside the <see cref="RoutesView" /> control.
/// </summary>
/// <param name="item">The route item to wrap.</param>
public class RouteAdapter(IRoute item) : TreeItemAdapterBase, ITreeItem<IRoute>
public partial class RouteAdapter(IRoute item) : TreeItemAdapterBase, ITreeItem<IRoute>
{
public const string RootPath = "__root";

Expand Down
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/Config/RoutesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ namespace DroidNet.Routing.Debugger.UI.Config;
using DroidNet.Routing;
using DroidNet.Routing.Debugger.UI.TreeView;

public class RoutesViewModel : TreeViewModelBase
/// <summary>
/// ViewModel for the <see cref="RoutesView" /> view.
/// </summary>
public partial class RoutesViewModel : TreeViewModelBase
{
public RoutesViewModel(IRoutes config)
{
Expand Down
2 changes: 1 addition & 1 deletion projects/Routing.Debugger.UI/src/Shell/ShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace DroidNet.Routing.Debugger.UI.Shell;
/// <summary>
/// A ViewModel fpr the debugger shell.
/// </summary>
public class ShellViewModel : AbstractOutletContainer
public partial class ShellViewModel : AbstractOutletContainer
{
/// <summary>
/// Initializes a new instance of the <see cref="ShellViewModel" /> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace DroidNet.Routing.Debugger.UI.State;
/// <see cref="RouterStateView" /> control.
/// </summary>
/// <param name="item">The item to be adapted.</param>
public class RouterStateAdapter(IActiveRoute item) : TreeItemAdapterBase, ITreeItem<IActiveRoute>
public partial class RouterStateAdapter(IActiveRoute item) : TreeItemAdapterBase, ITreeItem<IActiveRoute>
{
public override bool IsRoot => this.Item.Parent == null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ namespace DroidNet.Routing.Debugger.UI.State;
using DroidNet.Routing.Debugger.UI.TreeView;
using DroidNet.Routing.Events;

/// <summary>ViewModel for the <see cref="IRouterState" />.</summary>
public class RouterStateViewModel : TreeViewModelBase, IDisposable
/// <summary>
/// ViewModel for the <see cref="IRouterState" />.
/// </summary>
public partial class RouterStateViewModel : TreeViewModelBase, IDisposable
{
private readonly IDisposable routerEventsSub;

Expand Down
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/Styles/ItemProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.Styles;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class ItemProperties : StackPanel
/// <summary>
/// A styled <see cref="StackPanel" /> for the properties of an item in the tree.
/// </summary>
public partial class ItemProperties : StackPanel
{
public ItemProperties() => this.Style = (Style)Application.Current.Resources[nameof(ItemProperties)];
}
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/Styles/ItemProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.Styles;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class ItemProperty : Grid
/// <summary>
/// A custom control to display an item property.
/// </summary>
public partial class ItemProperty : Grid
{
public static readonly DependencyProperty PropertyNameProperty = DependencyProperty.Register(
nameof(PropertyName),
Expand Down
11 changes: 9 additions & 2 deletions projects/Routing.Debugger.UI/src/Styles/TopNavBarButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.Styles;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class TopNavBarButton : Button
/// <summary>
/// A custom button to be used for the top navigation bar.
/// </summary>
public partial class TopNavBarButton : Button
{
private static readonly DependencyProperty TooltipProperty = DependencyProperty.Register(
nameof(Tooltip),
Expand All @@ -24,7 +27,11 @@ public string Tooltip
{
this.SetValue(TooltipProperty, value);

var toolTip = new ToolTip { Content = value, VerticalOffset = -60 };
var toolTip = new ToolTip
{
Content = value,
VerticalOffset = -60,
};
ToolTipService.SetToolTip(this, toolTip);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.Styles;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class TopNavBarButtonRow : StackPanel
/// <summary>
/// A styled <see cref="StackPanel" /> to be used for a row of buttons in the top navigation bar.
/// </summary>
public partial class TopNavBarButtonRow : StackPanel
{
public TopNavBarButtonRow() => this.Style = (Style)Application.Current.Resources[nameof(TopNavBarButtonRow)];
}
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/Styles/TopNavBarUrlBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.Styles;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class TopNavBarUrlBox : TextBox
/// <summary>
/// A styled <see cref="TextBox" /> for the top navigation bar URL input.
/// </summary>
public partial class TopNavBarUrlBox : TextBox
{
public TopNavBarUrlBox() => this.Style = (Style)Application.Current.Resources[nameof(TopNavBarUrlBox)];
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ namespace DroidNet.Routing.Debugger.UI.TreeView;

using Microsoft.UI.Xaml.Data;

public class ExpanderIconConverter : IValueConverter
/// <summary>
/// A converter to get the icon to be used for an expander based on whether it is expanded or not.
/// </summary>
public partial class ExpanderIconConverter : IValueConverter
{
private const string GlyphChevronDown = "\uE972";
private const string GlyphChevronUp = "\uE70E";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.TreeView;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class GridForItemHeader : Grid
/// <summary>
/// A styled <see cref="Grid" /> for the items header.
/// </summary>
public partial class GridForItemHeader : Grid
{
public GridForItemHeader()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.TreeView;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;

public class IndentToMarginConverter : IValueConverter
/// <summary>
/// A converter that would provide the <see cref="Thickness">margin</see> corresponding to an item's depth in a tree.
/// </summary>
public partial class IndentToMarginConverter : IValueConverter
{
public Thickness InitialMargin { get; set; } = new(0);

Expand Down
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/TreeView/TreeItemBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.TreeView;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class TreeItemBody : ContentPresenter
/// <summary>
/// A styled component for the body part of a tree item.
/// </summary>
public partial class TreeItemBody : ContentPresenter
{
public TreeItemBody() => this.Style = (Style)Application.Current.Resources[nameof(TreeItemBody)];
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace DroidNet.Routing.Debugger.UI.TreeView;
/// <summary>
/// A control that can be used to show any kind of item in a <see cref="TreeView" />.
/// </summary>
public class TreeItemControl : Control
public partial class TreeItemControl : Control
{
/// <summary>
/// Defines the <see cref="ItemAdapter" /> dependency property.
Expand Down
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/TreeView/TreeItemHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace DroidNet.Routing.Debugger.UI.TreeView;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

public class TreeItemHeader : ContentPresenter
/// <summary>
/// A styled component for the header part of a tree item.
/// </summary>
public partial class TreeItemHeader : ContentPresenter
{
public TreeItemHeader() => this.Style = (Style)Application.Current.Resources[nameof(TreeItemHeader)];
}
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/TreeView/TreeItemIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ namespace DroidNet.Routing.Debugger.UI.TreeView;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;

public class TreeItemIcon : ImageIcon
/// <summary>
/// A styled <see cref="ImageIcon" /> for the icon used in tree items.
/// </summary>
public partial class TreeItemIcon : ImageIcon
{
public static readonly DependencyProperty ItemProperty = DependencyProperty.Register(
nameof(Item),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ namespace DroidNet.Routing.Debugger.UI.UrlTree;
using System.Diagnostics.CodeAnalysis;
using DroidNet.Routing.Debugger.UI.TreeView;

/// <summary>Adapter for a <see cref="IUrlSegmentGroup" /> to be used inside a <see cref="UrlTreeView" /> control.</summary>
/// <summary>
/// Adapter for a <see cref="IUrlSegmentGroup" /> to be used inside a <see cref="UrlTreeView" /> control.
/// </summary>
/// <param name="item">The item to wrap.</param>
public class UrlSegmentGroupAdapter(IUrlSegmentGroup item) : TreeItemAdapterBase, ITreeItem<IUrlSegmentGroup>
public partial class UrlSegmentGroupAdapter(IUrlSegmentGroup item) : TreeItemAdapterBase, ITreeItem<IUrlSegmentGroup>
{
private readonly OutletName outlet;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace DroidNet.Routing.Debugger.UI.WorkSpace;
/// Represents a dock that holds only one dockable. Any attempt to add a
/// <see cref="IDockable" /> to it will result in replacing the current one.
/// </summary>
public class ApplicationDock : SingleItemDock
public partial class ApplicationDock : SingleItemDock
{
protected ApplicationDock()
{
Expand Down
5 changes: 4 additions & 1 deletion projects/Routing.Debugger.UI/src/WorkSpace/RoutedDockable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ namespace DroidNet.Routing.Debugger.UI.WorkSpace;

using DroidNet.Docking;

internal sealed class RoutedDockable : Dockable
/// <summary>
/// A <see cref="Dockable" /> that can be the target of a route navigated to via an <see cref="IRouter" />.
/// </summary>
internal sealed partial class RoutedDockable : Dockable
{
internal RoutedDockable(string id, IActiveRoute route)
: base(id)
Expand Down

0 comments on commit 20d173b

Please sign in to comment.