mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
set AppxPackageHelper to static
This commit is contained in:
parent
e72810ca2c
commit
02b23756ff
2 changed files with 5 additions and 5 deletions
|
|
@ -9,12 +9,13 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
{
|
||||
public class AppxPackageHelper
|
||||
{
|
||||
private static readonly IAppxFactory appxFactory = (IAppxFactory)new AppxFactory();
|
||||
|
||||
// This function returns a list of attributes of applications
|
||||
public List<IAppxManifestApplication> getAppsFromManifest(IStream stream)
|
||||
public static List<IAppxManifestApplication> GetAppsFromManifest(IStream stream)
|
||||
{
|
||||
List<IAppxManifestApplication> apps = new List<IAppxManifestApplication>();
|
||||
var appxFactory = new AppxFactory();
|
||||
var reader = ((IAppxFactory)appxFactory).CreateManifestReader(stream);
|
||||
var reader = appxFactory.CreateManifestReader(stream);
|
||||
var manifestApps = reader.GetApplications();
|
||||
while (manifestApps.GetHasCurrent())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
private void InitializeAppInfo()
|
||||
{
|
||||
AppxPackageHelper _helper = new AppxPackageHelper();
|
||||
var path = Path.Combine(Location, "AppxManifest.xml");
|
||||
|
||||
var namespaces = XmlNamespaces(path);
|
||||
|
|
@ -67,7 +66,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
{
|
||||
var apps = new List<Application>();
|
||||
|
||||
List<AppxPackageHelper.IAppxManifestApplication> _apps = _helper.getAppsFromManifest(stream);
|
||||
List<AppxPackageHelper.IAppxManifestApplication> _apps = AppxPackageHelper.GetAppsFromManifest(stream);
|
||||
foreach (var _app in _apps)
|
||||
{
|
||||
var app = new Application(_app, this);
|
||||
|
|
|
|||
Loading…
Reference in a new issue