forked from microsoft/CopilotStudioSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBotEndpoint.cs
More file actions
34 lines (29 loc) · 995 Bytes
/
Copy pathBotEndpoint.cs
File metadata and controls
34 lines (29 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
namespace TranslationBot.Translation.Model
{
/// <summary>
/// class with bot info
/// </summary>
public class BotEndpoint
{
/// <summary>
/// constructor
/// </summary>
/// <param name="botId">Bot Id GUID</param>
/// <param name="tenantId">Bot tenant GUID</param>
/// <param name="tokenEndPoint">REST API endpoint to retreive directline token</param>
public BotEndpoint(string botId, string tenantId, string tokenEndPoint)
{
BotId = botId;
TenantId = tenantId;
UriBuilder uriBuilder = new UriBuilder(tokenEndPoint);
uriBuilder.Query = $"botId={BotId}&tenantId={TenantId}";
TokenUrl = uriBuilder.Uri;
}
public string BotId { get; }
public string TenantId { get; }
public Uri TokenUrl { get; }
}
}