whitespace forced changes (#6002)

This commit is contained in:
Clint Rutkas
2020-08-17 10:00:56 -07:00
committed by GitHub
parent 649e7e103d
commit d055ba1c3b
129 changed files with 14175 additions and 14175 deletions

View File

@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.IO;
@@ -32,18 +32,18 @@ namespace Microsoft.Plugin.Program.Logger
}
var configuration = new LoggingConfiguration();
using (var target = new FileTarget())
using (var target = new FileTarget())
{
configuration.AddTarget("file", target);
target.FileName = path.Replace(@"\", "/", StringComparison.Ordinal) + "/${shortdate}.txt";
target.FileName = path.Replace(@"\", "/", StringComparison.Ordinal) + "/${shortdate}.txt";
#if DEBUG
var rule = new LoggingRule("*", LogLevel.Debug, target);
var rule = new LoggingRule("*", LogLevel.Debug, target);
#else
var rule = new LoggingRule("*", LogLevel.Error, target);
#endif
configuration.LoggingRules.Add(rule);
}
}
LogManager.Configuration = configuration;
}
@@ -90,7 +90,7 @@ namespace Microsoft.Plugin.Program.Logger
innerExceptionNumber++;
e = e.InnerException;
}
}
while (e != null);
logger.Error("------------- END Microsoft.Plugin.Program exception -------------");
@@ -121,16 +121,16 @@ namespace Microsoft.Plugin.Program.Logger
private static bool IsKnownWinProgramError(Exception e, string callingMethodName)
{
if (e.TargetSite?.Name == "GetDescription" && callingMethodName == "LnkProgram")
{
return true;
}
if (e is SecurityException || e is UnauthorizedAccessException || e is DirectoryNotFoundException)
{
return true;
}
if (e.TargetSite?.Name == "GetDescription" && callingMethodName == "LnkProgram")
{
return true;
}
if (e is SecurityException || e is UnauthorizedAccessException || e is DirectoryNotFoundException)
{
return true;
}
return false;
}
@@ -138,17 +138,17 @@ namespace Microsoft.Plugin.Program.Logger
{
if (((e.HResult == -2147024774 || e.HResult == -2147009769) && callingMethodName == "ResourceFromPri")
|| (e.HResult == -2147024894 && (callingMethodName == "LogoPathFromUri" || callingMethodName == "ImageFromPath"))
|| (e.HResult == -2147024864 && callingMethodName == "InitializeAppInfo"))
{
return true;
}
if (callingMethodName == "XmlNamespaces")
{
return true;
}
|| (e.HResult == -2147024864 && callingMethodName == "InitializeAppInfo"))
{
return true;
}
if (callingMethodName == "XmlNamespaces")
{
return true;
}
return false;
}
}
}
}