Skip to content

Commit

Permalink
Merge pull request #2511 from Saibamen/ImplicitUsings
Browse files Browse the repository at this point in the history
Add missing implicit usings
  • Loading branch information
marticliment authored Jul 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 5eab36d + 87d827e commit debba96
Showing 19 changed files with 19 additions and 66 deletions.
1 change: 0 additions & 1 deletion src/UniGetUI.Core.Data/CoreData.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using UniGetUI.Core.Logging;

namespace UniGetUI.Core.Data
3 changes: 1 addition & 2 deletions src/UniGetUI.PackageEngine.Managers.Chocolatey/Chocolatey.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics;
using System.Runtime.InteropServices;
using UniGetUI.Core.Data;
using UniGetUI.Core.Logging;
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
using Microsoft.Management.Deployment;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using UniGetUI.Core.Data;
using UniGetUI.Core.Logging;
using UniGetUI.Core.SettingsEngine;
using UniGetUI.Core.Tools;
using UniGetUI.PackageEngine.Classes.Manager.ManagerHelpers;
using UniGetUI.PackageEngine.Enums;
using UniGetUI.PackageEngine.Classes.Manager.ManagerHelpers;
using UniGetUI.PackageEngine.PackageClasses;
using WindowsPackageManager.Interop;

namespace UniGetUI.PackageEngine.Managers.WingetManager
{
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Diagnostics;
using System.Diagnostics.Tracing;
using Microsoft.Management.Deployment;
using UniGetUI.Core.Logging;
using UniGetUI.Core.SettingsEngine;
1 change: 0 additions & 1 deletion src/UniGetUI/Interface/Dialogs/IgnoredUpdates.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text.Json.Nodes;
using UniGetUI.Core.Data;
using UniGetUI.Core.Logging;
5 changes: 0 additions & 5 deletions src/UniGetUI/Interface/Pages/LogPage/AppLogPage.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using Microsoft.UI.Xaml.Documents;
using Microsoft.UI.Xaml.Media;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UniGetUI.Core.Logging;
using UniGetUI.Core.Tools;

5 changes: 0 additions & 5 deletions src/UniGetUI/Interface/Pages/LogPage/LogPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using ExternalLibraries.Clipboard;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Documents;
using Microsoft.UI.Xaml.Media;
using System.Diagnostics;
using UniGetUI.Core.Logging;
using UniGetUI.Core.SettingsEngine;
using UniGetUI.Core.Tools;
using UniGetUI.PackageEngine;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.UI;
5 changes: 0 additions & 5 deletions src/UniGetUI/Interface/Pages/LogPage/ManagerLogsPage.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using Microsoft.UI.Xaml.Documents;
using Microsoft.UI.Xaml.Media;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UniGetUI.Core.Tools;
using UniGetUI.PackageEngine;

5 changes: 0 additions & 5 deletions src/UniGetUI/Interface/Pages/LogPage/OperationHistoryPage.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using Microsoft.UI.Xaml.Documents;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UniGetUI.Core.SettingsEngine;

namespace UniGetUI.Interface.Pages.LogPage
2 changes: 0 additions & 2 deletions src/UniGetUI/Interface/SoftwarePages/PackageBundle.xaml.cs
Original file line number Diff line number Diff line change
@@ -3,9 +3,7 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System.Collections.ObjectModel;
using System.Data;
using System.Diagnostics;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text.Json;
using System.Xml.Serialization;
using UniGetUI.Core.Classes;
1 change: 0 additions & 1 deletion src/UniGetUI/Interface/Widgets/NavButton.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using UniGetUI.Core.Tools;

// To learn more about WinUI, the WinUI project structure,
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
using Microsoft.UI.Xaml.Media.Imaging;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Runtime.InteropServices.WindowsRuntime;
using UniGetUI.Core.Logging;
using UniGetUI.Core.SettingsEngine;
using UniGetUI.Core.Tools;
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;

namespace WindowsPackageManager.Interop;

public class WinGetConfigurationException : Exception
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<Platforms>x64;ARM64</Platforms>
<SelfContained>true</SelfContained>
<RootNamespace>WindowsPackageManager.Interop</RootNamespace>
<!--Platforms>x86;x64;arm64</Platforms>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<Platforms>x64;ARM64</Platforms>
<SelfContained>true</SelfContained>
<RootNamespace>WindowsPackageManager.Interop</RootNamespace>
<!--Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers-->
<Nullable>disable</Nullable>
</PropertyGroup>
@@ -24,12 +25,12 @@
<ItemGroup>
<CsWinRTInputs Include="$(TargetDir)\Microsoft.Management.Deployment.winmd" />
<Content Include="$(TargetDir)\Microsoft.Management.Deployment.winmd" Link="Microsoft.Management.Deployment.winmd" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(TargetDir)\winrtact.dll" Link="winrtact.dll" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(TargetDir)\winrtact.dll" Link="winrtact.dll" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.7" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.7" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
@@ -52,15 +53,15 @@
<WindowsAppSdkUndockedRegFreeWinRTInitialize>false</WindowsAppSdkUndockedRegFreeWinRTInitialize>
</PackageReference>

<PackageReference Include="Microsoft.WindowsPackageManager.InProcCom" Version="1.8.1791">
<NoWarn>NU1701</NoWarn>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>none</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.WindowsPackageManager.InProcCom" Version="1.8.1791">
<NoWarn>NU1701</NoWarn>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>none</IncludeAssets>
</PackageReference>
</ItemGroup>

<Target Name="CopyWinmdToTargetDir" BeforeTargets="BeforeBuild">
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_InProcCom)\lib\Microsoft.Management.Deployment.winmd" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\runtimes\win10-$(Platform)\native\winrtact.dll" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\runtimes\win10-$(Platform)\native\winrtact.dll" DestinationFolder="$(TargetDir)" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;

namespace WindowsPackageManager.Interop;

internal sealed class ClassModel
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
// Licensed under the MIT License.

using Microsoft.Management.Deployment;
using System;
using System.Collections.Generic;

namespace WindowsPackageManager.Interop;

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using System.Runtime.InteropServices;
using WinRT;

Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
// Licensed under the MIT License.

using Microsoft.Management.Deployment;
using System;

namespace WindowsPackageManager.Interop;

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using System.Runtime.InteropServices;
using Windows.Win32;
using Windows.Win32.System.Com;

0 comments on commit debba96

Please sign in to comment.