Whitespace and type fixes (#5917)

This commit is contained in:
Clint Rutkas
2020-08-13 15:31:14 -07:00
committed by GitHub
parent 24d7232559
commit e02977edc0
18 changed files with 147 additions and 103 deletions

View File

@@ -81,14 +81,15 @@ namespace Microsoft.Plugin.Program.Programs
else
{
var e = Marshal.GetExceptionForHR((int)hResult);
ProgramLogger.LogException($"|UWP|InitializeAppInfo|{path}" +
ProgramLogger.LogException(
$"|UWP|InitializeAppInfo|{path}" +
"|Error caused while trying to get the details of the UWP program", e);
Apps = new List<UWPApplication>().ToArray();
}
}
/// http://www.hanselman.com/blog/GetNamespacesFromAnXMLDocumentWithXPathDocumentAndLINQToXML.aspx
// http://www.hanselman.com/blog/GetNamespacesFromAnXMLDocumentWithXPathDocumentAndLINQToXML.aspx
private static string[] XmlNamespaces(string path)
{
XDocument z = XDocument.Load(path);
@@ -130,7 +131,8 @@ namespace Microsoft.Plugin.Program.Programs
}
}
ProgramLogger.LogException($"|UWP|XmlNamespaces|{Location}" +
ProgramLogger.LogException(
$"|UWP|XmlNamespaces|{Location}" +
"|Trying to get the package version of the UWP program, but a unknown UWP appmanifest version "
+ $"{FullName} from location {Location} is returned.", new FormatException());
@@ -154,10 +156,12 @@ namespace Microsoft.Plugin.Program.Programs
}
catch (Exception e)
{
ProgramLogger.LogException($"|UWP|All|{p.InstalledLocation}|An unexpected error occurred and "
ProgramLogger.LogException(
$"|UWP|All|{p.InstalledLocation}|An unexpected error occurred and "
+ $"unable to convert Package to UWP for {p.FullName}", e);
return Array.Empty<UWPApplication>();
}
return u.Apps;
}).ToArray();
@@ -189,8 +193,7 @@ namespace Microsoft.Plugin.Program.Programs
}
catch (Exception e)
{
ProgramLogger.LogException("UWP", "CurrentUserPackages", $"id", "An unexpected error occurred and "
+ $"unable to verify if package is valid", e);
ProgramLogger.LogException("UWP", "CurrentUserPackages", $"id", "An unexpected error occurred and unable to verify if package is valid", e);
return false;
}
@@ -232,15 +235,14 @@ namespace Microsoft.Plugin.Program.Programs
[Flags]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1714:Flags enums should have plural names", Justification = "This name is consistent with the corresponding win32 flags: https://docs.microsoft.com/en-us/windows/win32/stg/stgm-constants ")]
public enum Stgm : Int64
public enum Stgm : long
{
Read = 0x00000000L,
}
public enum Hresult : Int32
public enum Hresult : int
{
Ok = 0x0,
}
}
}