dotnet format refactorings.

This commit is contained in:
Burak Kaan Köse
2025-05-18 14:06:25 +02:00
parent 69bfe5b750
commit c4e561dee6
59 changed files with 3549 additions and 3583 deletions

View File

@@ -21,8 +21,8 @@ using Wino.Messaging.Client.Calendar;
using Wino.Messaging.Client.Navigation;
using Wino.Messaging.Server;
namespace Wino.Calendar.ViewModels
{
namespace Wino.Calendar.ViewModels;
public partial class AppShellViewModel : CalendarBaseViewModel,
IRecipient<VisibleDateRangeChangedMessage>,
IRecipient<CalendarEnableStatusChangedMessage>,
@@ -364,4 +364,3 @@ namespace Wino.Calendar.ViewModels
});
}
}
}

View File

@@ -23,8 +23,8 @@ using Wino.Core.Domain.Models.Navigation;
using Wino.Core.ViewModels;
using Wino.Messaging.Client.Calendar;
namespace Wino.Calendar.ViewModels
{
namespace Wino.Calendar.ViewModels;
public partial class CalendarPageViewModel : CalendarBaseViewModel,
IRecipient<LoadCalendarMessage>,
IRecipient<CalendarItemDeleted>,
@@ -868,4 +868,3 @@ namespace Wino.Calendar.ViewModels
});
}
}
}

View File

@@ -8,8 +8,8 @@ using Wino.Core.Domain.Translations;
using Wino.Core.ViewModels;
using Wino.Messaging.Client.Calendar;
namespace Wino.Calendar.ViewModels
{
namespace Wino.Calendar.ViewModels;
public partial class CalendarSettingsPageViewModel : CalendarBaseViewModel
{
[ObservableProperty]
@@ -124,4 +124,3 @@ namespace Wino.Calendar.ViewModels
Messenger.Send(new CalendarSettingsUpdatedMessage());
}
}
}

View File

@@ -1,8 +1,8 @@
using Microsoft.Extensions.DependencyInjection;
using Wino.Core;
namespace Wino.Calendar.ViewModels
{
namespace Wino.Calendar.ViewModels;
public static class CalendarViewModelContainerSetup
{
public static void RegisterCalendarViewModelServices(this IServiceCollection services)
@@ -10,4 +10,3 @@ namespace Wino.Calendar.ViewModels
services.RegisterCoreServices();
}
}
}

View File

@@ -4,8 +4,8 @@ using Wino.Core.Domain.Entities.Calendar;
using Wino.Core.Domain.Entities.Shared;
using Wino.Core.Domain.Interfaces;
namespace Wino.Calendar.ViewModels.Data
{
namespace Wino.Calendar.ViewModels.Data;
public partial class AccountCalendarViewModel : ObservableObject, IAccountCalendar
{
public MailAccount Account { get; }
@@ -67,4 +67,3 @@ namespace Wino.Calendar.ViewModels.Data
}
public Guid Id { get => ((IAccountCalendar)AccountCalendar).Id; set => ((IAccountCalendar)AccountCalendar).Id = value; }
}
}

View File

@@ -5,8 +5,8 @@ using Itenso.TimePeriod;
using Wino.Core.Domain.Entities.Calendar;
using Wino.Core.Domain.Interfaces;
namespace Wino.Calendar.ViewModels.Data
{
namespace Wino.Calendar.ViewModels.Data;
public partial class CalendarItemViewModel : ObservableObject, ICalendarItem, ICalendarItemViewModel
{
public CalendarItem CalendarItem { get; }
@@ -43,4 +43,3 @@ namespace Wino.Calendar.ViewModels.Data
public override string ToString() => CalendarItem.Title;
}
}

View File

@@ -6,8 +6,8 @@ using System.Linq;
using CommunityToolkit.Mvvm.ComponentModel;
using Wino.Core.Domain.Entities.Shared;
namespace Wino.Calendar.ViewModels.Data
{
namespace Wino.Calendar.ViewModels.Data;
public partial class GroupedAccountCalendarViewModel : ObservableObject
{
public event EventHandler CollectiveSelectionStateChanged;
@@ -143,4 +143,3 @@ namespace Wino.Calendar.ViewModels.Data
CalendarSelectionStateChanged?.Invoke(this, accountCalendarViewModel);
}
}
}

View File

@@ -12,8 +12,8 @@ using Wino.Core.Domain.Models.Navigation;
using Wino.Core.ViewModels;
using Wino.Messaging.Client.Calendar;
namespace Wino.Calendar.ViewModels
{
namespace Wino.Calendar.ViewModels;
public partial class EventDetailsPageViewModel : CalendarBaseViewModel
{
private readonly ICalendarService _calendarService;
@@ -113,4 +113,3 @@ namespace Wino.Calendar.ViewModels
if (CurrentEvent == null) return;
}
}
}

View File

@@ -6,8 +6,8 @@ using System.Linq;
using Wino.Calendar.ViewModels.Data;
using Wino.Core.Domain.Entities.Shared;
namespace Wino.Calendar.ViewModels.Interfaces
{
namespace Wino.Calendar.ViewModels.Interfaces;
public interface IAccountCalendarStateService : INotifyPropertyChanged
{
ReadOnlyObservableCollection<GroupedAccountCalendarViewModel> GroupedAccountCalendars { get; }
@@ -28,4 +28,3 @@ namespace Wino.Calendar.ViewModels.Interfaces
IEnumerable<AccountCalendarViewModel> ActiveCalendars { get; }
IEnumerable<IGrouping<MailAccount, AccountCalendarViewModel>> GroupedAccountCalendarsEnumerable { get; }
}
}

View File

@@ -1,7 +1,7 @@
using Wino.Calendar.ViewModels.Data;
namespace Wino.Calendar.ViewModels.Messages
{
namespace Wino.Calendar.ViewModels.Messages;
public class CalendarItemDoubleTappedMessage
{
public CalendarItemDoubleTappedMessage(CalendarItemViewModel calendarItemViewModel)
@@ -11,4 +11,3 @@ namespace Wino.Calendar.ViewModels.Messages
public CalendarItemViewModel CalendarItemViewModel { get; }
}
}

View File

@@ -1,7 +1,7 @@
using Wino.Calendar.ViewModels.Data;
namespace Wino.Calendar.ViewModels.Messages
{
namespace Wino.Calendar.ViewModels.Messages;
public class CalendarItemRightTappedMessage
{
public CalendarItemRightTappedMessage(CalendarItemViewModel calendarItemViewModel)
@@ -11,4 +11,3 @@ namespace Wino.Calendar.ViewModels.Messages
public CalendarItemViewModel CalendarItemViewModel { get; }
}
}

View File

@@ -1,8 +1,8 @@
using Wino.Calendar.ViewModels.Data;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Calendar.ViewModels.Messages
{
namespace Wino.Calendar.ViewModels.Messages;
public class CalendarItemTappedMessage
{
public CalendarItemTappedMessage(CalendarItemViewModel calendarItemViewModel, CalendarDayModel clickedPeriod)
@@ -14,4 +14,3 @@ namespace Wino.Calendar.ViewModels.Messages
public CalendarItemViewModel CalendarItemViewModel { get; }
public CalendarDayModel ClickedPeriod { get; }
}
}

View File

@@ -6,8 +6,8 @@ using Windows.UI.Xaml.Media.Animation;
using Wino.Activation;
using Wino.Calendar.Views;
namespace Wino.Calendar.Activation
{
namespace Wino.Calendar.Activation;
public class DefaultActivationHandler : ActivationHandler<IActivatedEventArgs>
{
protected override Task HandleInternalAsync(IActivatedEventArgs args)
@@ -21,4 +21,3 @@ namespace Wino.Calendar.Activation
protected override bool CanHandleInternal(IActivatedEventArgs args)
=> (Window.Current?.Content as Frame)?.Content == null;
}
}

View File

@@ -1,8 +1,8 @@
using System;
using Windows.Foundation;
namespace Wino.Calendar.Args
{
namespace Wino.Calendar.Args;
/// <summary>
/// When a new timeline cell is selected.
/// </summary>
@@ -38,4 +38,3 @@ namespace Wino.Calendar.Args
/// </summary>
public Size CellSize { get; }
}
}

View File

@@ -1,9 +1,8 @@
using System;
namespace Wino.Calendar.Args
{
namespace Wino.Calendar.Args;
/// <summary>
/// When selected timeline cell is unselected.
/// </summary>
public class TimelineCellUnselectedArgs : EventArgs { }
}

View File

@@ -2,9 +2,9 @@
using Windows.UI.Xaml;
using Wino.Calendar.ViewModels.Data;
namespace Wino.Calendar.Controls
{
public class CalendarItemCommandBarFlyout : CommandBarFlyout
namespace Wino.Calendar.Controls;
public partial class CalendarItemCommandBarFlyout : CommandBarFlyout
{
public static readonly DependencyProperty ItemProperty = DependencyProperty.Register(nameof(Item), typeof(CalendarItemViewModel), typeof(CalendarItemCommandBarFlyout), new PropertyMetadata(null, new PropertyChangedCallback(OnItemChanged)));
@@ -28,4 +28,3 @@ namespace Wino.Calendar.Controls
}
}
}

View File

@@ -9,8 +9,8 @@ using Wino.Calendar.ViewModels.Messages;
using Wino.Core.Domain;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Calendar.Controls
{
namespace Wino.Calendar.Controls;
public sealed partial class CalendarItemControl : UserControl
{
// Single tap has a delay to report double taps properly.
@@ -195,4 +195,3 @@ namespace Wino.Calendar.Controls
WeakReferenceMessenger.Default.Send(new CalendarItemRightTappedMessage(CalendarItem));
}
}
}

View File

@@ -1,12 +1,12 @@
using Windows.UI.Xaml.Automation.Peers;
using Windows.UI.Xaml.Controls;
namespace Wino.Calendar.Controls
{
namespace Wino.Calendar.Controls;
/// <summary>
/// FlipView that hides the navigation buttons and exposes methods to navigate to the next and previous items with animations.
/// </summary>
public class CustomCalendarFlipView : FlipView
public partial class CustomCalendarFlipView : FlipView
{
private const string PART_PreviousButton = "PreviousButtonHorizontal";
private const string PART_NextButton = "NextButtonHorizontal";
@@ -40,4 +40,3 @@ namespace Wino.Calendar.Controls
nextPeer.Invoke();
}
}
}

View File

@@ -3,9 +3,9 @@ using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Calendar.Controls
{
public class DayColumnControl : Control
namespace Wino.Calendar.Controls;
public partial class DayColumnControl : Control
{
private const string PART_HeaderDateDayText = nameof(PART_HeaderDateDayText);
private const string PART_IsTodayBorder = nameof(PART_IsTodayBorder);
@@ -75,4 +75,3 @@ namespace Wino.Calendar.Controls
UpdateLayout();
}
}
}

View File

@@ -3,9 +3,9 @@ using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Wino.Core.Domain.Enums;
namespace Wino.Calendar.Controls
{
public class DayHeaderControl : Control
namespace Wino.Calendar.Controls;
public partial class DayHeaderControl : Control
{
private const string PART_DayHeaderTextBlock = nameof(PART_DayHeaderTextBlock);
private TextBlock HeaderTextblock;
@@ -54,4 +54,3 @@ namespace Wino.Calendar.Controls
}
}
}
}

View File

@@ -10,9 +10,9 @@ using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Calendar;
using Wino.Helpers;
namespace Wino.Calendar.Controls
{
public class WinoCalendarControl : Control
namespace Wino.Calendar.Controls;
public partial class WinoCalendarControl : Control
{
private const string PART_WinoFlipView = nameof(PART_WinoFlipView);
private const string PART_IdleGrid = nameof(PART_IdleGrid);
@@ -297,4 +297,3 @@ namespace Wino.Calendar.Controls
return this.FindDescendants<CalendarItemControl>().FirstOrDefault(a => a.CalendarItem == calendarItemViewModel);
}
}
}

View File

@@ -8,9 +8,9 @@ using Windows.UI.Xaml.Controls;
using Wino.Core.Domain.Collections;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Calendar.Controls
{
public class WinoCalendarFlipView : CustomCalendarFlipView
namespace Wino.Calendar.Controls;
public partial class WinoCalendarFlipView : CustomCalendarFlipView
{
public static readonly DependencyProperty IsIdleProperty = DependencyProperty.Register(nameof(IsIdle), typeof(bool), typeof(WinoCalendarFlipView), new PropertyMetadata(true));
public static readonly DependencyProperty ActiveCanvasProperty = DependencyProperty.Register(nameof(ActiveCanvas), typeof(WinoDayTimelineCanvas), typeof(WinoCalendarFlipView), new PropertyMetadata(null));
@@ -183,4 +183,3 @@ namespace Wino.Calendar.Controls
private ObservableRangeCollection<DayRangeRenderModel> GetItemsSource()
=> ItemsSource as ObservableRangeCollection<DayRangeRenderModel>;
}
}

View File

@@ -11,9 +11,9 @@ using Wino.Calendar.Models;
using Wino.Calendar.ViewModels.Data;
using Wino.Core.Domain.Interfaces;
namespace Wino.Calendar.Controls
{
public class WinoCalendarPanel : Panel
namespace Wino.Calendar.Controls;
public partial class WinoCalendarPanel : Panel
{
private const double LastItemRightExtraMargin = 12d;
@@ -291,4 +291,3 @@ namespace Wino.Calendar.Controls
#endregion
}
}

View File

@@ -4,9 +4,9 @@ using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Wino.Core.Domain.Enums;
namespace Wino.Calendar.Controls
{
public class WinoCalendarTypeSelectorControl : Control
namespace Wino.Calendar.Controls;
public partial class WinoCalendarTypeSelectorControl : Control
{
private const string PART_TodayButton = nameof(PART_TodayButton);
private const string PART_DayToggle = nameof(PART_DayToggle);
@@ -89,4 +89,3 @@ namespace Wino.Calendar.Controls
_yearToggle.IsChecked = SelectedType == CalendarDisplayType.Year;
}
}
}

View File

@@ -8,9 +8,9 @@ using Windows.UI.Xaml.Media;
using Wino.Core.Domain.Models.Calendar;
using Wino.Helpers;
namespace Wino.Calendar.Controls
{
public class WinoCalendarView : Control
namespace Wino.Calendar.Controls;
public partial class WinoCalendarView : Control
{
private const string PART_DayViewItemBorder = nameof(PART_DayViewItemBorder);
private const string PART_CalendarView = nameof(PART_CalendarView);
@@ -145,4 +145,3 @@ namespace Wino.Calendar.Controls
}
}
}
}

View File

@@ -10,9 +10,9 @@ using Windows.UI.Xaml.Media;
using Wino.Calendar.Args;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Calendar.Controls
{
public class WinoDayTimelineCanvas : Control, IDisposable
namespace Wino.Calendar.Controls;
public partial class WinoDayTimelineCanvas : Control, IDisposable
{
public event EventHandler<TimelineCellSelectedArgs> TimelineCellSelected;
public event EventHandler<TimelineCellUnselectedArgs> TimelineCellUnselected;
@@ -275,4 +275,3 @@ namespace Wino.Calendar.Controls
Canvas = null;
}
}
}

View File

@@ -10,8 +10,8 @@ using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Calendar;
using Wino.Helpers;
namespace Wino.Calendar.Helpers
{
namespace Wino.Calendar.Helpers;
public static class CalendarXamlHelpers
{
public static CalendarItemViewModel GetFirstAllDayEvent(CalendarEventCollection collection)
@@ -104,4 +104,3 @@ namespace Wino.Calendar.Helpers
return XamlHelpers.GetPlaccementModeForCalendarType(calendarDisplayType);
}
}
}

View File

@@ -15,8 +15,8 @@ using Windows.UI.Xaml.Navigation;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace Wino.Calendar
{
namespace Wino.Calendar;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
@@ -27,4 +27,3 @@ namespace Wino.Calendar
this.InitializeComponent();
}
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Calendar.Models
{
namespace Wino.Calendar.Models;
public struct CalendarItemMeasurement
{
// Where to start?
@@ -14,4 +14,3 @@
Right = right;
}
}
}

View File

@@ -2,9 +2,9 @@
using Windows.UI.Xaml.Controls;
using Wino.Calendar.ViewModels.Data;
namespace Wino.Calendar.Selectors
{
public class CustomAreaCalendarItemSelector : DataTemplateSelector
namespace Wino.Calendar.Selectors;
public partial class CustomAreaCalendarItemSelector : DataTemplateSelector
{
public DataTemplate AllDayTemplate { get; set; }
public DataTemplate MultiDayTemplate { get; set; }
@@ -19,4 +19,3 @@ namespace Wino.Calendar.Selectors
return base.SelectTemplateCore(item, container);
}
}
}

View File

@@ -2,9 +2,9 @@
using Windows.UI.Xaml.Controls;
using Wino.Core.Domain.Enums;
namespace Wino.Calendar.Selectors
{
public class WinoCalendarItemTemplateSelector : DataTemplateSelector
namespace Wino.Calendar.Selectors;
public partial class WinoCalendarItemTemplateSelector : DataTemplateSelector
{
public CalendarDisplayType DisplayType { get; set; }
@@ -31,4 +31,3 @@ namespace Wino.Calendar.Selectors
return base.SelectTemplateCore(item, container);
}
}
}

View File

@@ -7,8 +7,8 @@ using Wino.Calendar.ViewModels.Data;
using Wino.Calendar.ViewModels.Interfaces;
using Wino.Core.Domain.Entities.Shared;
namespace Wino.Calendar.Services
{
namespace Wino.Calendar.Services;
/// <summary>
/// Encapsulated state manager for collectively managing the state of account calendars.
/// Callers must react to the events to update their state only from this service.
@@ -19,7 +19,7 @@ namespace Wino.Calendar.Services
public event EventHandler<AccountCalendarViewModel> AccountCalendarSelectionStateChanged;
[ObservableProperty]
private ReadOnlyObservableCollection<GroupedAccountCalendarViewModel> groupedAccountCalendars;
public partial ReadOnlyObservableCollection<GroupedAccountCalendarViewModel> GroupedAccountCalendars { get; set; }
private ObservableCollection<GroupedAccountCalendarViewModel> _internalGroupedAccountCalendars = new ObservableCollection<GroupedAccountCalendarViewModel>();
@@ -111,4 +111,3 @@ namespace Wino.Calendar.Services
}
}
}
}

View File

@@ -2,8 +2,8 @@
using Wino.Core.Domain.Interfaces;
using Wino.Core.UWP.Services;
namespace Wino.Calendar.Services
{
namespace Wino.Calendar.Services;
public class DialogService : DialogServiceBase, ICalendarDialogService
{
public DialogService(IThemeService themeService,
@@ -12,4 +12,3 @@ namespace Wino.Calendar.Services
{
}
}
}

View File

@@ -10,8 +10,8 @@ using Wino.Core.Domain.Models.Navigation;
using Wino.Core.UWP.Services;
using Wino.Views;
namespace Wino.Calendar.Services
{
namespace Wino.Calendar.Services;
public class NavigationService : NavigationServiceBase, INavigationService
{
public Type GetPageType(WinoPage winoPage)
@@ -60,4 +60,3 @@ namespace Wino.Calendar.Services
return false;
}
}
}

View File

@@ -4,8 +4,8 @@ using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Accounts;
namespace Wino.Calendar.Services
{
namespace Wino.Calendar.Services;
public class ProviderService : IProviderService
{
public IProviderDetail GetProviderDetail(MailProviderType type)
@@ -33,4 +33,3 @@ namespace Wino.Calendar.Services
return providerList;
}
}
}

View File

@@ -4,8 +4,8 @@ using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Settings;
namespace Wino.Calendar.Services
{
namespace Wino.Calendar.Services;
public class SettingsBuilderService : ISettingsBuilderService
{
public List<SettingOption> GetSettingItems()
@@ -18,4 +18,3 @@ namespace Wino.Calendar.Services
new SettingOption(Translator.SettingsAbout_Title, Translator.SettingsAbout_Description, WinoPage.AboutPage,"F1 M 9.375 18.75 C 8.509114 18.75 7.677409 18.639322 6.879883 18.417969 C 6.082356 18.196615 5.335286 17.882486 4.638672 17.475586 C 3.942057 17.068686 3.308919 16.580404 2.739258 16.010742 C 2.169596 15.441081 1.681315 14.807943 1.274414 14.111328 C 0.867513 13.414714 0.553385 12.667644 0.332031 11.870117 C 0.110677 11.072592 0 10.240886 0 9.375 C 0 8.509115 0.110677 7.677409 0.332031 6.879883 C 0.553385 6.082357 0.867513 5.335287 1.274414 4.638672 C 1.681315 3.942059 2.169596 3.30892 2.739258 2.739258 C 3.308919 2.169598 3.942057 1.681316 4.638672 1.274414 C 5.335286 0.867514 6.082356 0.553387 6.879883 0.332031 C 7.677409 0.110678 8.509114 0 9.375 0 C 10.240885 0 11.072591 0.110678 11.870117 0.332031 C 12.667643 0.553387 13.414713 0.867514 14.111328 1.274414 C 14.807942 1.681316 15.44108 2.169598 16.010742 2.739258 C 16.580402 3.30892 17.068684 3.942059 17.475586 4.638672 C 17.882486 5.335287 18.196613 6.082357 18.417969 6.879883 C 18.639322 7.677409 18.75 8.509115 18.75 9.375 C 18.75 10.240886 18.639322 11.072592 18.417969 11.870117 C 18.196613 12.667644 17.882486 13.414714 17.475586 14.111328 C 17.068684 14.807943 16.580402 15.441081 16.010742 16.010742 C 15.44108 16.580404 14.807942 17.068686 14.111328 17.475586 C 13.414713 17.882486 12.667643 18.196615 11.870117 18.417969 C 11.072591 18.639322 10.240885 18.75 9.375 18.75 Z M 9.375 1.25 C 8.626302 1.25 7.906901 1.347656 7.216797 1.542969 C 6.526692 1.738281 5.880533 2.011719 5.27832 2.363281 C 4.676106 2.714844 4.127604 3.138021 3.632812 3.632812 C 3.138021 4.127604 2.714844 4.676107 2.363281 5.27832 C 2.011719 5.880534 1.738281 6.52832 1.542969 7.22168 C 1.347656 7.915039 1.25 8.632812 1.25 9.375 C 1.25 10.117188 1.347656 10.834961 1.542969 11.52832 C 1.738281 12.22168 2.011719 12.869467 2.363281 13.47168 C 2.714844 14.073894 3.138021 14.622396 3.632812 15.117188 C 4.127604 15.611979 4.676106 16.035156 5.27832 16.386719 C 5.880533 16.738281 6.526692 17.011719 7.216797 17.207031 C 7.906901 17.402344 8.626302 17.5 9.375 17.5 C 10.117188 17.5 10.834961 17.402344 11.52832 17.207031 C 12.221679 17.011719 12.869465 16.738281 13.47168 16.386719 C 14.073893 16.035156 14.622396 15.611979 15.117188 15.117188 C 15.611979 14.622396 16.035156 14.073894 16.386719 13.47168 C 16.738281 12.869467 17.011719 12.223308 17.207031 11.533203 C 17.402344 10.8431 17.5 10.123698 17.5 9.375 C 17.5 8.632812 17.402344 7.915039 17.207031 7.22168 C 17.011719 6.52832 16.738281 5.880534 16.386719 5.27832 C 16.035156 4.676107 15.611979 4.127604 15.117188 3.632812 C 14.622396 3.138021 14.073893 2.714844 13.47168 2.363281 C 12.869465 2.011719 12.221679 1.738281 11.52832 1.542969 C 10.834961 1.347656 10.117188 1.25 9.375 1.25 Z M 8.75 7.5 L 10 7.5 L 10 13.75 L 8.75 13.75 Z M 8.75 5 L 10 5 L 10 6.25 L 8.75 6.25 Z "),
};
}
}

View File

@@ -1,7 +1,7 @@
using Windows.UI.Xaml;
namespace Wino.Calendar.Styles
{
namespace Wino.Calendar.Styles;
public sealed partial class WinoCalendarResources : ResourceDictionary
{
public WinoCalendarResources()
@@ -9,4 +9,3 @@ namespace Wino.Calendar.Styles
this.InitializeComponent();
}
}
}

View File

@@ -1,7 +1,6 @@
using Wino.Calendar.ViewModels;
using Wino.Core.UWP;
namespace Wino.Calendar.Views.Abstract
{
namespace Wino.Calendar.Views.Abstract;
public abstract class AccountDetailsPageAbstract : BasePage<AccountDetailsPageViewModel> { }
}

View File

@@ -1,7 +1,6 @@
using Wino.Calendar.ViewModels;
using Wino.Core.UWP;
namespace Wino.Calendar.Views.Abstract
{
public class AccountManagementPageAbstract : BasePage<AccountManagementViewModel> { }
}
namespace Wino.Calendar.Views.Abstract;
public partial class AccountManagementPageAbstract : BasePage<AccountManagementViewModel> { }

View File

@@ -1,7 +1,6 @@
using Wino.Calendar.ViewModels;
using Wino.Core.UWP;
namespace Wino.Calendar.Views.Abstract
{
namespace Wino.Calendar.Views.Abstract;
public abstract class AppShellAbstract : BasePage<AppShellViewModel> { }
}

View File

@@ -1,7 +1,6 @@
using Wino.Calendar.ViewModels;
using Wino.Core.UWP;
namespace Wino.Calendar.Views.Abstract
{
namespace Wino.Calendar.Views.Abstract;
public abstract class CalendarPageAbstract : BasePage<CalendarPageViewModel> { }
}

View File

@@ -1,7 +1,6 @@
using Wino.Calendar.ViewModels;
using Wino.Core.UWP;
namespace Wino.Calendar.Views.Abstract
{
namespace Wino.Calendar.Views.Abstract;
public abstract class CalendarSettingsPageAbstract : BasePage<CalendarSettingsPageViewModel> { }
}

View File

@@ -1,7 +1,6 @@
using Wino.Calendar.ViewModels;
using Wino.Core.UWP;
namespace Wino.Calendar.Views.Abstract
{
namespace Wino.Calendar.Views.Abstract;
public abstract class EventDetailsPageAbstract : BasePage<EventDetailsPageViewModel> { }
}

View File

@@ -1,7 +1,6 @@
using Wino.Core.UWP;
using Wino.Core.ViewModels;
namespace Wino.Calendar.Views.Abstract
{
public class PersonalizationPageAbstract : BasePage<PersonalizationPageViewModel> { }
}
namespace Wino.Calendar.Views.Abstract;
public partial class PersonalizationPageAbstract : BasePage<PersonalizationPageViewModel> { }

View File

@@ -1,7 +1,7 @@
using Wino.Calendar.Views.Abstract;
namespace Wino.Calendar.Views.Account
{
namespace Wino.Calendar.Views.Account;
public sealed partial class AccountManagementPage : AccountManagementPageAbstract
{
public AccountManagementPage()
@@ -9,4 +9,3 @@ namespace Wino.Calendar.Views.Account
InitializeComponent();
}
}
}

View File

@@ -5,8 +5,8 @@ using Wino.Calendar.Views.Abstract;
using Wino.Core.UWP;
using Wino.Messaging.Client.Calendar;
namespace Wino.Calendar.Views
{
namespace Wino.Calendar.Views;
public sealed partial class AppShell : AppShellAbstract,
IRecipient<CalendarDisplayTypeChangedMessage>
{
@@ -51,4 +51,3 @@ namespace Wino.Calendar.Views
private void AppBarBackButtonClicked(Core.UWP.Controls.WinoAppTitleBar sender, RoutedEventArgs args)
=> ViewModel.NavigationService.GoBack();
}
}

View File

@@ -9,8 +9,8 @@ using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Calendar;
using Wino.Messaging.Client.Calendar;
namespace Wino.Calendar.Views
{
namespace Wino.Calendar.Views;
public sealed partial class CalendarPage : CalendarPageAbstract,
IRecipient<ScrollToDateMessage>,
IRecipient<ScrollToHourMessage>,
@@ -158,4 +158,3 @@ namespace Wino.Calendar.Views
ViewModel.DisplayDetailsCalendarItemViewModel = null;
}
}
}

View File

@@ -1,8 +1,8 @@
using Wino.Calendar.Views.Abstract;
namespace Wino.Calendar.Views
{
namespace Wino.Calendar.Views;
public sealed partial class EventDetailsPage : EventDetailsPageAbstract
{
public EventDetailsPage()
@@ -10,4 +10,3 @@ namespace Wino.Calendar.Views
this.InitializeComponent();
}
}
}

View File

@@ -1,7 +1,7 @@
using Wino.Calendar.Views.Abstract;
namespace Wino.Calendar.Views.Settings
{
namespace Wino.Calendar.Views.Settings;
public sealed partial class AccountDetailsPage : AccountDetailsPageAbstract
{
public AccountDetailsPage()
@@ -9,4 +9,3 @@ namespace Wino.Calendar.Views.Settings
this.InitializeComponent();
}
}
}

View File

@@ -1,8 +1,8 @@
using Wino.Calendar.Views.Abstract;
namespace Wino.Calendar.Views.Settings
{
namespace Wino.Calendar.Views.Settings;
public sealed partial class CalendarSettingsPage : CalendarSettingsPageAbstract
{
public CalendarSettingsPage()
@@ -10,4 +10,3 @@ namespace Wino.Calendar.Views.Settings
InitializeComponent();
}
}
}

View File

@@ -1,7 +1,7 @@
using Wino.Calendar.Views.Abstract;
namespace Wino.Calendar.Views.Settings
{
namespace Wino.Calendar.Views.Settings;
public sealed partial class PersonalizationPage : PersonalizationPageAbstract
{
public PersonalizationPage()
@@ -9,4 +9,3 @@ namespace Wino.Calendar.Views.Settings
this.InitializeComponent();
}
}
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.Extensions.DependencyInjection;
using Windows.UI.Xaml;
@@ -53,6 +54,8 @@ public abstract class BasePage<T> : BasePage where T : CoreBaseViewModel
Debug.WriteLine($"Disposed {GetType().Name}");
}
[RequiresDynamicCode("AOT")]
[RequiresUnreferencedCode("AOT")]
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
@@ -288,6 +289,8 @@ public class WinoServerConnectionManager :
public Task<WinoServerResponse<TResponse>> GetResponseAsync<TResponse, TRequestType>(TRequestType message, CancellationToken cancellationToken = default) where TRequestType : IClientMessage
=> GetResponseInternalAsync<TResponse, TRequestType>(message, cancellationToken: cancellationToken);
[RequiresDynamicCode("Calls System.Text.Json.JsonSerializer.Serialize<TValue>(TValue, JsonSerializerOptions)")]
[RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize<TValue>(TValue, JsonSerializerOptions)")]
private async Task<WinoServerResponse<TResponse>> GetResponseInternalAsync<TResponse, TRequestType>(TRequestType message,
Dictionary<string, object> parameters = null,
CancellationToken cancellationToken = default)

View File

@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
using Serilog;
@@ -46,6 +47,8 @@ public partial class AboutPageViewModel : CoreBaseViewModel
PreferencesService = preferencesService;
}
[RequiresDynamicCode("AOT")]
[RequiresUnreferencedCode("AOT")]
protected override void OnActivated()
{
base.OnActivated();

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
@@ -200,6 +201,8 @@ public partial class PersonalizationPageViewModel : CoreBaseViewModel
SelectedAppTheme = AppThemes.Find(a => a.Id == _themeService.CurrentApplicationThemeId);
}
[RequiresDynamicCode("AOT")]
[RequiresUnreferencedCode("AOT")]
protected override async void OnActivated()
{
base.OnActivated();

View File

@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Net.Http;
using System.Text.Json;
using System.Threading;
@@ -20,6 +21,8 @@ public record HttpRequestBundle<TRequest>(TRequest NativeRequest, IUIChangeReque
/// <param name="BatchRequest">Batch request that is generated by base synchronizer.</param>
public record HttpRequestBundle<TRequest, TResponse>(TRequest NativeRequest, IRequestBase Request) : HttpRequestBundle<TRequest>(NativeRequest, Request)
{
[RequiresDynamicCode("AOT")]
[RequiresUnreferencedCode("AOT")]
public async Task<TResponse> DeserializeBundleAsync(HttpResponseMessage httpResponse, CancellationToken cancellationToken = default)
{
var content = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net;
@@ -464,6 +465,7 @@ public class OutlookSynchronizer : WinoSynchronizer<RequestInformation, Message,
await UpdateDeltaSynchronizationIdentifierAsync(iterator.Deltalink).ConfigureAwait(false);
}
[RequiresUnreferencedCode("Calls Microsoft.Kiota.Abstractions.Serialization.KiotaJsonSerializer.DeserializeAsync<T>(String, CancellationToken)")]
private async Task<T> DeserializeGraphBatchResponseAsync<T>(BatchResponseContentCollection collection, string requestId, CancellationToken cancellationToken = default) where T : IParsable, new()
{
// This deserialization may throw generalException in case of failure.