microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/sub-pr-338

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/src/Microsoft.Teams.Bot.Compat/CompatConnectorClient.cs

44lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using Microsoft.Bot.Connector;
5using Microsoft.Rest;
6using Newtonsoft.Json;
7
8namespace Microsoft.Teams.Bot.Compat
9{
10 /// <summary>
11 /// Provides a stub implementation of <see cref="IConnectorClient"/> for compatibility with Bot Framework SDK.
12 /// </summary>
13 /// <remarks>
14 /// This class serves as a minimal adapter to satisfy Bot Framework's requirement for an IConnectorClient instance.
15 /// Only the <see cref="Conversations"/> property is implemented; all other members throw <see cref="NotImplementedException"/>.
16 /// This design allows legacy bots to access conversation operations through the CompatConversations adapter without
17 /// requiring full implementation of unused connector client features.
18 /// </remarks>
19 /// <param name="conversations">The conversations adapter that handles conversation-related operations.</param>
20 internal sealed class CompatConnectorClient(CompatConversations conversations) : IConnectorClient
21 {
22 /// <summary>
23 /// Gets the conversations interface for managing bot conversations.
24 /// </summary>
25 public IConversations Conversations => conversations;
26
27 public Uri BaseUri { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
28
29 public JsonSerializerSettings SerializationSettings => throw new NotImplementedException();
30
31 public JsonSerializerSettings DeserializationSettings => throw new NotImplementedException();
32
33 public ServiceClientCredentials Credentials => throw new NotImplementedException();
34
35 public IAttachments Attachments => throw new NotImplementedException();
36
37
38 public void Dispose()
39 {
40 // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
41 GC.SuppressFinalize(this);
42 }
43 }
44}
45