Files
Karl Burtram f288bee294 Make nullable warnings a per file opt-in (#1842)
* Make nullable warnings a per file opt-in

* Remove unneeded compiler directives

* Remove compiler directive for User Data
2023-02-03 18:10:07 -08:00

50 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.
//
#nullable disable
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; }
}
}