Use Logger overloads (#2163)

This commit is contained in:
Charles Gagnon
2023-08-02 13:25:21 -07:00
committed by GitHub
parent dc91e1ecf0
commit 969ac0ed8c
114 changed files with 438 additions and 530 deletions

View File

@@ -6,7 +6,6 @@
#nullable disable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.SqlTools.Credentials.Contracts;
@@ -162,7 +161,7 @@ namespace Microsoft.SqlTools.Credentials
private async Task HandleRequest<T>(Func<Task<T>> handler, RequestContext<T> requestContext, string requestType)
{
Logger.Write(TraceEventType.Verbose, requestType);
Logger.Verbose(requestType);
T result = await handler();
await requestContext.SendResult(result);
}

View File

@@ -1,4 +1,4 @@
//
//
// Code originally from http://credentialmanagement.codeplex.com/,
// Licensed under the Apache License 2.0
//
@@ -6,7 +6,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.SqlTools.Utility;
@@ -74,7 +73,7 @@ namespace Microsoft.SqlTools.Credentials.Win32
bool result = NativeMethods.CredEnumerateW(Target, 0, out uint count, out pCredentials);
if (!result)
{
Logger.Write(TraceEventType.Error, string.Format("Win32Exception: {0}", new Win32Exception(Marshal.GetLastWin32Error()).ToString()));
Logger.Error(string.Format("Win32Exception: {0}", new Win32Exception(Marshal.GetLastWin32Error()).ToString()));
return;
}

View File

@@ -5,7 +5,6 @@
//
namespace Microsoft.SqlTools.Credentials
{
using System;
using System.Reflection;
using System.Resources;
using System.Globalization;