Skip to content

Fix: Fixed issue where toolbar button sometimes had the wrong icon state #17032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 11 additions & 24 deletions src/Files.App/Actions/Content/ImageManipulation/BaseRotateAction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Files Community
// Licensed under the MIT License.

using Files.Shared.Helpers;
using Windows.Graphics.Imaging;

namespace Files.App.Actions
@@ -20,8 +21,14 @@ internal abstract class BaseRotateAction : ObservableObject, IAction
protected abstract BitmapRotation Rotation { get; }

public bool IsExecutable =>
IsContextPageTypeAdaptedToCommand() &&
(context.ShellPage?.SlimContentPage?.SelectedItemsPropertiesViewModel?.IsCompatibleToSetAsWindowsWallpaper ?? false);
context.ShellPage is not null &&
context.ShellPage.SlimContentPage is not null &&
context.PageType != ContentPageTypes.RecycleBin &&
context.PageType != ContentPageTypes.ZipFolder &&
context.PageType != ContentPageTypes.ReleaseNotes &&
context.PageType != ContentPageTypes.Settings &&
Comment on lines +26 to +29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're interested, you can use is, and, or:

Suggested change
context.PageType != ContentPageTypes.RecycleBin &&
context.PageType != ContentPageTypes.ZipFolder &&
context.PageType != ContentPageTypes.ReleaseNotes &&
context.PageType != ContentPageTypes.Settings &&
context.PageType is not ContentPageTypes.RecycleBin and
not ContentPageTypes.ZipFolder and
not ContentPageTypes.ReleaseNotes and
not ContentPageTypes.Settings &&

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They have the same results here so I would just leave it as is.

context.HasSelection &&
context.SelectedItems.All(x => FileExtensionHelpers.IsCompatibleToSetAsWindowsWallpaper(x.FileExtension));

public BaseRotateAction()
{
@@ -40,30 +47,10 @@ public async Task ExecuteAsync(object? parameter = null)
await _infoPaneViewModel.UpdateSelectedItemPreviewAsync();
}

private bool IsContextPageTypeAdaptedToCommand()
{
return
context.PageType != ContentPageTypes.RecycleBin &&
context.PageType != ContentPageTypes.ZipFolder &&
context.PageType != ContentPageTypes.ReleaseNotes &&
context.PageType != ContentPageTypes.Settings &&
context.PageType != ContentPageTypes.None;
}

private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
{
if (e.PropertyName is nameof(IContentPageContext.SelectedItem))
{
if (context.ShellPage is not null && context.ShellPage.SlimContentPage is not null)
{
var viewModel = context.ShellPage.SlimContentPage.SelectedItemsPropertiesViewModel;
var extensions = context.SelectedItems.Select(selectedItem => selectedItem.FileExtension).Distinct().ToList();

viewModel.CheckAllFileExtensions(extensions);
Comment on lines -57 to -62
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this deleted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic was moved to IsExecutable.

}

if (e.PropertyName is nameof(IContentPageContext.SelectedItems))
OnPropertyChanged(nameof(IsExecutable));
}
}
}
}
}
47 changes: 24 additions & 23 deletions src/Files.App/UserControls/Toolbar.xaml
Original file line number Diff line number Diff line change
@@ -72,7 +72,8 @@
Grid.Column="0"
HorizontalAlignment="Left"
x:Load="{x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
DefaultLabelPosition="Right">
DefaultLabelPosition="Right"
IsDynamicOverflowEnabled="{x:Bind ViewModel.IsDynamicOverflowEnabled, Mode=OneWay}">
<CommandBar.PrimaryCommands>

<!-- New Item -->
@@ -287,13 +288,13 @@
x:Name="ExtractButton"
Width="Auto"
MinWidth="40"
x:Load="{x:Bind ViewModel.CanExtract, Mode=OneWay, FallbackValue=False}"
AccessKey="Z"
AccessKeyInvoked="AppBarButton_AccessKeyInvoked"
IsEnabled="{x:Bind ViewModel.CanExtract, Mode=OneWay, FallbackValue=False}"
Label="{helpers:ResourceString Name=Extract}"
LabelPosition="Default"
Style="{StaticResource ToolBarAppBarButtonFlyoutStyle}">
Style="{StaticResource ToolBarAppBarButtonFlyoutStyle}"
Visibility="{x:Bind ViewModel.CanExtract, Mode=OneWay}">

<controls:ThemedIcon Style="{StaticResource App.ThemedIcons.Zip}" />

@@ -331,12 +332,12 @@
x:Name="RunWithPowerShellButton"
Width="Auto"
MinWidth="40"
x:Load="{x:Bind Commands.RunWithPowershell.IsExecutable, Mode=OneWay}"
AutomationProperties.Name="RunWithPowerShell"
Command="{x:Bind Commands.RunWithPowershell}"
Label="{x:Bind Commands.RunWithPowershell.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{x:Bind Commands.RunWithPowershell.LabelWithHotKey, Mode=OneWay}">
ToolTipService.ToolTip="{x:Bind Commands.RunWithPowershell.LabelWithHotKey, Mode=OneWay}"
Visibility="{x:Bind Commands.RunWithPowershell.IsExecutable, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.RunWithPowershell.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
@@ -347,12 +348,12 @@
x:Name="EditInNotepadButton"
Width="Auto"
MinWidth="40"
x:Load="{x:Bind Commands.EditInNotepad.IsExecutable, Mode=OneWay}"
AutomationProperties.Name="EditInNotepad"
Command="{x:Bind Commands.EditInNotepad}"
Label="{x:Bind Commands.EditInNotepad.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{x:Bind Commands.EditInNotepad.LabelWithHotKey, Mode=OneWay}">
ToolTipService.ToolTip="{x:Bind Commands.EditInNotepad.LabelWithHotKey, Mode=OneWay}"
Visibility="{x:Bind Commands.EditInNotepad.IsExecutable, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.EditInNotepad.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
@@ -363,11 +364,11 @@
x:Name="SetAsBackgroundButton"
Width="Auto"
MinWidth="40"
x:Load="{x:Bind Commands.SetAsWallpaperBackground.IsExecutable, Mode=OneWay}"
Label="{helpers:ResourceString Name=SetAsBackgroundFlyout}"
LabelPosition="Default"
Style="{StaticResource ToolBarAppBarButtonFlyoutStyle}"
ToolTipService.ToolTip="{helpers:ResourceString Name=SetAsBackgroundFlyout}">
ToolTipService.ToolTip="{helpers:ResourceString Name=SetAsBackgroundFlyout}"
Visibility="{x:Bind Commands.SetAsWallpaperBackground.IsExecutable, Mode=OneWay}">

<controls:ThemedIcon Style="{StaticResource App.ThemedIcons.SetWallpaper.16}" />

@@ -410,21 +411,21 @@
x:Name="SetAsSlideshowButton"
Width="Auto"
MinWidth="40"
x:Load="{x:Bind Commands.SetAsSlideshowBackground.IsExecutable, Mode=OneWay}"
Command="{x:Bind Commands.SetAsSlideshowBackground}"
Icon="{x:Bind Commands.SetAsSlideshowBackground.FontIcon}"
Label="{x:Bind Commands.SetAsSlideshowBackground.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{x:Bind Commands.SetAsSlideshowBackground.LabelWithHotKey, Mode=OneWay}" />
ToolTipService.ToolTip="{x:Bind Commands.SetAsSlideshowBackground.LabelWithHotKey, Mode=OneWay}"
Visibility="{x:Bind Commands.SetAsSlideshowBackground.IsExecutable, Mode=OneWay}" />

<!-- Install Inf -->
<AppBarButton
x:Name="InstallInfButton"
x:Load="{x:Bind Commands.InstallInfDriver.IsExecutable, Mode=OneWay, FallbackValue=False}"
Command="{x:Bind Commands.InstallInfDriver, Mode=OneWay}"
Label="{x:Bind Commands.InstallInfDriver.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}">
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}"
Visibility="{x:Bind Commands.InstallInfDriver.IsExecutable, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.InstallInfDriver.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
@@ -433,44 +434,44 @@
<!-- Rotate Image Left -->
<AppBarButton
x:Name="RotateImageLeftButton"
x:Load="{x:Bind ViewModel.IsImage, Mode=OneWay, FallbackValue=False}"
Command="{x:Bind Commands.RotateLeft, Mode=OneWay}"
Label="{x:Bind Commands.RotateLeft.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=RotateLeft}">
ToolTipService.ToolTip="{helpers:ResourceString Name=RotateLeft}"
Visibility="{x:Bind Commands.RotateLeft.IsExecutable, Mode=OneWay}">
<controls:ThemedIcon Style="{x:Bind Commands.RotateLeft.ThemedIconStyle}" />
</AppBarButton>

<!-- Rotate Image Right -->
<AppBarButton
x:Name="RotateImageRightButton"
x:Load="{x:Bind ViewModel.IsImage, Mode=OneWay, FallbackValue=False}"
Command="{x:Bind Commands.RotateRight, Mode=OneWay}"
Label="{x:Bind Commands.RotateRight.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=RotateRight}">
ToolTipService.ToolTip="{helpers:ResourceString Name=RotateRight}"
Visibility="{x:Bind Commands.RotateRight.IsExecutable, Mode=OneWay}">
<controls:ThemedIcon Style="{x:Bind Commands.RotateRight.ThemedIconStyle}" />
</AppBarButton>

<!-- Install Font -->
<AppBarButton
x:Name="InstallFontButton"
x:Load="{x:Bind Commands.InstallFont.IsExecutable, Mode=OneWay, FallbackValue=False}"
Command="{x:Bind Commands.InstallFont, Mode=OneWay}"
Label="{x:Bind Commands.InstallFont.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}">
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}"
Visibility="{x:Bind Commands.InstallFont.IsExecutable, Mode=OneWay}">
<controls:ThemedIcon Style="{x:Bind Commands.InstallFont.ThemedIconStyle}" />
</AppBarButton>

<!-- Install Certificate -->
<AppBarButton
x:Name="InstallCertificateButton"
x:Load="{x:Bind Commands.InstallCertificate.IsExecutable, Mode=OneWay, FallbackValue=False}"
Command="{x:Bind Commands.InstallCertificate, Mode=OneWay}"
Label="{x:Bind Commands.InstallCertificate.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}">
ToolTipService.ToolTip="{helpers:ResourceString Name=Install}"
Visibility="{x:Bind Commands.InstallCertificate.IsExecutable, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.InstallCertificate.Glyph.BaseGlyph, Mode=OneTime}" />
</AppBarButton.Icon>
@@ -479,12 +480,12 @@
<!-- Play All Media -->
<AppBarButton
x:Name="PlayAllMediaButton"
x:Load="{x:Bind Commands.PlayAll.IsExecutable, Mode=OneWay, FallbackValue=False}"
Command="{x:Bind Commands.PlayAll, Mode=OneWay}"
KeyboardAcceleratorTextOverride="{x:Bind Commands.PlayAll.HotKeyText, Mode=OneWay}"
Label="{x:Bind Commands.PlayAll.Label}"
LabelPosition="Default"
ToolTipService.ToolTip="{x:Bind Commands.PlayAll.LabelWithHotKey, Mode=OneWay}">
ToolTipService.ToolTip="{x:Bind Commands.PlayAll.LabelWithHotKey, Mode=OneWay}"
Visibility="{x:Bind Commands.PlayAll.IsExecutable, Mode=OneWay}">
<AppBarButton.Icon>
<FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.PlayAll.Glyph.BaseGlyph}" />
</AppBarButton.Icon>
40 changes: 27 additions & 13 deletions src/Files.App/ViewModels/UserControls/NavigationToolbarViewModel.cs
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
// Licensed under the MIT License.

using CommunityToolkit.WinUI;
using Files.App.Actions;
using Files.Shared.Helpers;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
@@ -75,14 +76,26 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr

public SearchBoxViewModel SearchBoxViewModel => (SearchBoxViewModel)SearchBox;

public bool HasAdditionalAction => InstanceViewModel.IsPageTypeRecycleBin || IsPowerShellScript || CanExtract || IsImage || IsFont || IsInfFile;
public bool CanCopy => SelectedItems is not null && SelectedItems.Any();
public bool HasAdditionalAction =>
InstanceViewModel.IsPageTypeRecycleBin ||
Commands.RunWithPowershell.IsExecutable ||
CanExtract ||
Commands.DecompressArchive.IsExecutable ||
Commands.DecompressArchiveHere.IsExecutable ||
Commands.DecompressArchiveHereSmart.IsExecutable ||
Commands.DecompressArchiveToChildFolder.IsExecutable ||
Commands.EditInNotepad.IsExecutable ||
Commands.RotateLeft.IsExecutable ||
Commands.RotateRight.IsExecutable ||
Commands.SetAsAppBackground.IsExecutable ||
Commands.SetAsWallpaperBackground.IsExecutable ||
Commands.SetAsLockscreenBackground.IsExecutable ||
Commands.SetAsSlideshowBackground.IsExecutable ||
Commands.InstallFont.IsExecutable ||
Commands.InstallInfDriver.IsExecutable ||
Commands.InstallCertificate.IsExecutable;
Comment on lines +79 to +96
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public bool HasAdditionalAction =>
InstanceViewModel.IsPageTypeRecycleBin ||
Commands.RunWithPowershell.IsExecutable ||
CanExtract ||
Commands.DecompressArchive.IsExecutable ||
Commands.DecompressArchiveHere.IsExecutable ||
Commands.DecompressArchiveHereSmart.IsExecutable ||
Commands.DecompressArchiveToChildFolder.IsExecutable ||
Commands.EditInNotepad.IsExecutable ||
Commands.RotateLeft.IsExecutable ||
Commands.RotateRight.IsExecutable ||
Commands.SetAsAppBackground.IsExecutable ||
Commands.SetAsWallpaperBackground.IsExecutable ||
Commands.SetAsLockscreenBackground.IsExecutable ||
Commands.SetAsSlideshowBackground.IsExecutable ||
Commands.InstallFont.IsExecutable ||
Commands.InstallInfDriver.IsExecutable ||
Commands.InstallCertificate.IsExecutable;
public bool HasAdditionalAction =>
InstanceViewModel.IsPageTypeRecycleBin ||
Commands.RunWithPowershell.IsExecutable ||
CanExtract ||
Commands.DecompressArchive.IsExecutable ||
Commands.DecompressArchiveHere.IsExecutable ||
Commands.DecompressArchiveHereSmart.IsExecutable ||
Commands.DecompressArchiveToChildFolder.IsExecutable ||
Commands.EditInNotepad.IsExecutable ||
Commands.RotateLeft.IsExecutable ||
Commands.RotateRight.IsExecutable ||
Commands.SetAsAppBackground.IsExecutable ||
Commands.SetAsWallpaperBackground.IsExecutable ||
Commands.SetAsLockscreenBackground.IsExecutable ||
Commands.SetAsSlideshowBackground.IsExecutable ||
Commands.InstallFont.IsExecutable ||
Commands.InstallInfDriver.IsExecutable ||
Commands.InstallCertificate.IsExecutable;

This might look prettier, since the above is similar to other large statements in the codebase.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather stick with the current formatting.


public bool CanExtract => Commands.DecompressArchive.CanExecute(null) || Commands.DecompressArchiveHere.CanExecute(null) || Commands.DecompressArchiveHereSmart.CanExecute(null) || Commands.DecompressArchiveToChildFolder.CanExecute(null);
public bool IsPowerShellScript => SelectedItems is not null && SelectedItems.Count == 1 && FileExtensionHelpers.IsPowerShellFile(SelectedItems.First().FileExtension) && !InstanceViewModel.IsPageTypeRecycleBin;
public bool IsImage => SelectedItems is not null && SelectedItems.Any() && SelectedItems.All(x => FileExtensionHelpers.IsImageFile(x.FileExtension)) && !InstanceViewModel.IsPageTypeRecycleBin;
public bool IsMultipleImageSelected => SelectedItems is not null && SelectedItems.Count > 1 && SelectedItems.All(x => FileExtensionHelpers.IsImageFile(x.FileExtension)) && !InstanceViewModel.IsPageTypeRecycleBin;
public bool IsInfFile => SelectedItems is not null && SelectedItems.Count == 1 && FileExtensionHelpers.IsInfFile(SelectedItems.First().FileExtension) && !InstanceViewModel.IsPageTypeRecycleBin;
public bool IsFont => SelectedItems is not null && SelectedItems.Any() && SelectedItems.All(x => FileExtensionHelpers.IsFontFile(x.FileExtension)) && !InstanceViewModel.IsPageTypeRecycleBin;

public bool IsCardsLayout => _InstanceViewModel.FolderSettings.LayoutMode is FolderLayoutModes.CardsView;
public bool IsColumnLayout => _InstanceViewModel.FolderSettings.LayoutMode is FolderLayoutModes.ColumnView;
@@ -126,6 +139,9 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
private bool _IsCommandPaletteOpen;
public bool IsCommandPaletteOpen { get => _IsCommandPaletteOpen; set => SetProperty(ref _IsCommandPaletteOpen, value); }

private bool _IsDynamicOverflowEnabled;
public bool IsDynamicOverflowEnabled { get => _IsDynamicOverflowEnabled; set => SetProperty(ref _IsDynamicOverflowEnabled, value); }

private bool _IsUpdating;
public bool IsUpdating { get => _IsUpdating; set => SetProperty(ref _IsUpdating, value); }

@@ -242,14 +258,12 @@ public List<ListedItem>? SelectedItems
{
if (SetProperty(ref _SelectedItems, value))
{
OnPropertyChanged(nameof(CanCopy));
OnPropertyChanged(nameof(CanExtract));
OnPropertyChanged(nameof(IsInfFile));
OnPropertyChanged(nameof(IsPowerShellScript));
OnPropertyChanged(nameof(IsImage));
OnPropertyChanged(nameof(IsMultipleImageSelected));
OnPropertyChanged(nameof(IsFont));
OnPropertyChanged(nameof(HasAdditionalAction));

// Workaround to ensure the overflow button is only displayed when there are overflow items
IsDynamicOverflowEnabled = false;
IsDynamicOverflowEnabled = true;
}
}
}

Unchanged files with check annotations Beta

/// <summary>
/// Analyzer that detects if string literals can be replaced with constants from the <c>Strings</c> class.
/// </summary>
[DiagnosticAnalyzer(LanguageNames.CSharp)]

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Release, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Debug, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Release, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Debug, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)
internal sealed class StringsPropertyAnalyzer : DiagnosticAnalyzer
{
/// <summary>
/// <summary>
/// Generates properties for strings based on resource files.
/// </summary>
[Generator]

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Release, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Debug, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Release, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Debug, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)
internal sealed class StringsPropertyGenerator : IIncrementalGenerator
{
// Static HashSet to track generated file names
/// <summary>
/// A generator for serializing/deserializing objects to/from the Windows Registry using attributes.
/// </summary>
[Generator]

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Release, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Debug, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Release, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Debug, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)
internal sealed class RegistrySerializationGenerator : IIncrementalGenerator
{
/// <summary>
{
public unsafe struct IStorageProviderStatusUISource : IComIID
{
private void** lpVtbl;

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISource.cs

GitHub Actions / build (Release, arm64)

Field 'IStorageProviderStatusUISource.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISource.cs

GitHub Actions / build (Debug, arm64)

Field 'IStorageProviderStatusUISource.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISource.cs

GitHub Actions / build (Release, x64)

Field 'IStorageProviderStatusUISource.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISource.cs

GitHub Actions / build (Debug, x64)

Field 'IStorageProviderStatusUISource.lpVtbl' is never assigned to, and will always have its default value
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public HRESULT GetStatusUI(IStorageProviderStatusUI** result)
{
public unsafe struct IStorageProviderStatusUISourceFactory : IComIID
{
private void** lpVtbl;

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISourceFactory.cs

GitHub Actions / build (Release, arm64)

Field 'IStorageProviderStatusUISourceFactory.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISourceFactory.cs

GitHub Actions / build (Debug, arm64)

Field 'IStorageProviderStatusUISourceFactory.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISourceFactory.cs

GitHub Actions / build (Release, x64)

Field 'IStorageProviderStatusUISourceFactory.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUISourceFactory.cs

GitHub Actions / build (Debug, x64)

Field 'IStorageProviderStatusUISourceFactory.lpVtbl' is never assigned to, and will always have its default value
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public HRESULT GetStatusUISource(nint syncRootId, IStorageProviderStatusUISource** result)
{
public unsafe struct IStorageProviderQuotaUI : IComIID
{
private void** lpVtbl;

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderQuotaUI.cs

GitHub Actions / build (Release, arm64)

Field 'IStorageProviderQuotaUI.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderQuotaUI.cs

GitHub Actions / build (Debug, arm64)

Field 'IStorageProviderQuotaUI.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderQuotaUI.cs

GitHub Actions / build (Release, x64)

Field 'IStorageProviderQuotaUI.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderQuotaUI.cs

GitHub Actions / build (Debug, x64)

Field 'IStorageProviderQuotaUI.lpVtbl' is never assigned to, and will always have its default value
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public HRESULT GetQuotaTotalInBytes(ulong* value)
{
public unsafe struct IStorageProviderStatusUI : IComIID
{
private void** lpVtbl;

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUI.cs

GitHub Actions / build (Release, arm64)

Field 'IStorageProviderStatusUI.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUI.cs

GitHub Actions / build (Debug, arm64)

Field 'IStorageProviderStatusUI.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUI.cs

GitHub Actions / build (Release, x64)

Field 'IStorageProviderStatusUI.lpVtbl' is never assigned to, and will always have its default value

Check warning on line 14 in src/Files.App.CsWin32/IStorageProviderStatusUI.cs

GitHub Actions / build (Debug, x64)

Field 'IStorageProviderStatusUI.lpVtbl' is never assigned to, and will always have its default value
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public HRESULT GetQuotaUI(IStorageProviderQuotaUI** result)
GetKeyState
CreateDirectoryFromApp
WNetCancelConnection2
NET_USE_CONNECT_FLAGS

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, arm64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, arm64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, x64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, x64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found
NETRESOURCEW
WNetAddConnection3
CREDENTIALW
SetEntriesInAcl
ACL_SIZE_INFORMATION
DeleteAce
EXPLICIT_ACCESS

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, arm64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, arm64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, x64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, x64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?
ACCESS_ALLOWED_ACE
LookupAccountSid
GetComputerName
CoTaskMemFree
QueryDosDevice
DeviceIoControl
GetLastError

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, arm64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, arm64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, x64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, x64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error
CreateFile
GetVolumeInformation
COMPRESSION_FORMAT