| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 36ae2a4 commit 3c8cfb8
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,11 +14,16 @@ | |||
| 14 | 14 | // See the Apache Version 2.0 License for specific language governing | |
| 15 | 15 | // permissions and limitations under the License. | |
| 16 | 16 | ||
| 17 | + using System; | ||
| 17 | 18 | using System.Collections.Generic; | |
| 18 | 19 | using System.Threading.Tasks; | |
| 19 | 20 | ||
| 20 | 21 | namespace Microsoft.Python.LanguageServer { | |
| 22 | + [Obsolete] | ||
| 21 | 23 | public interface ITelemetryService { | |
| 24 | + Task SendTelemetry(object o); | ||
| 25 | + } | ||
| 26 | + public interface ITelemetryService2 { | ||
| 22 | 27 | Task SendTelemetry(TelemetryEvent telemetryEvent); | |
| 23 | 28 | } | |
| 24 | 29 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,16 +14,22 @@ | |||
| 14 | 14 | // See the Apache Version 2.0 License for specific language governing | |
| 15 | 15 | // permissions and limitations under the License. | |
| 16 | 16 | ||
| 17 | + using System; | ||
| 17 | 18 | using System.Threading.Tasks; | |
| 18 | - using Microsoft.PythonTools.LanguageServer; | ||
| 19 | 19 | using StreamJsonRpc; | |
| 20 | 20 | ||
| 21 | 21 | namespace Microsoft.Python.LanguageServer.Services { | |
| 22 | - public sealed class TelemetryService : ITelemetryService { | ||
| 22 | + #pragma warning disable CS0612 // Type or member is obsolete | ||
| 23 | + public sealed class TelemetryService : ITelemetryService, ITelemetryService2 { | ||
| 24 | + #pragma warning restore CS0612 // Type or member is obsolete | ||
| 23 | 25 | private readonly JsonRpc _rpc; | |
| 24 | 26 | public TelemetryService(JsonRpc rpc) { | |
| 25 | 27 | _rpc = rpc; | |
| 26 | 28 | } | |
| 29 | + | ||
| 30 | + [Obsolete] | ||
| 31 | + public Task SendTelemetry(object o) => Task.CompletedTask; | ||
| 32 | + | ||
| 27 | 33 | public Task SendTelemetry(TelemetryEvent telemetryEvent) | |
| 28 | 34 | => _rpc.NotifyWithParameterObjectAsync("telemetry/event", telemetryEvent); | |
| 29 | 35 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments