mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 17:23:27 -05:00
* Add linting for copyright and unused usings * Add one more + comment * Enforce in build and fix errors * Fix build
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using Microsoft.SqlTools.Extensibility;
|
|
using Microsoft.SqlTools.ResourceProvider.Core.Extensibility;
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ResourceProvider.Fakes
|
|
{
|
|
[Exportable(typeof(ITrace), "Microsoft.SqlTools.ServiceLayer.UnitTests.ResourceProvider.Fakes.FakeTrace")
|
|
]
|
|
public class FakeTrace : ITrace
|
|
{
|
|
private readonly List<string> _traces = new List<string>();
|
|
public bool TraceEvent(TraceEventType eventType, int traceId, string message, params object[] args)
|
|
{
|
|
_traces.Add(message);
|
|
return true;
|
|
}
|
|
|
|
public bool TraceException(TraceEventType eventType, int traceId, Exception exception, string message, int lineNumber = 0,
|
|
string fileName = "", string memberName = "")
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public void SetServiceProvider(IMultiServiceProvider provider)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public IEnumerable<string> Traces
|
|
{
|
|
get
|
|
{
|
|
return _traces;
|
|
}
|
|
}
|
|
|
|
public IExportableMetadata Metadata { get; set; }
|
|
public ExportableStatus Status { get; }
|
|
}
|
|
}
|