Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

[SkillsLib]remove http transport and related #1676

Merged
merged 4 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public void TestInitialize()

_services = new ServiceCollection();

_services.AddSingleton<SkillHttpAdapter, MockSkillHttpAdapter>();
_services.AddSingleton<SkillHttpBotAdapter>();
_services.AddSingleton<SkillWebSocketAdapter, MockSkillWebSocketAdapter>();
_services.AddSingleton<SkillWebSocketBotAdapter>();
_services.AddSingleton<IBotFrameworkHttpAdapter, MockBotFrameworkHttpAdapter>();
Expand Down Expand Up @@ -291,7 +289,6 @@ private MockSkillController CreateMockSkillController(string manifestFileOverrid
{
var sp = _services.BuildServiceProvider();
var botFrameworkHttpAdapter = sp.GetService<IBotFrameworkHttpAdapter>();
var skillHttpAdapter = sp.GetService<SkillHttpAdapter>();
var skillWebSocketAdapter = sp.GetService<SkillWebSocketAdapter>();
var bot = sp.GetService<IBot>();
var controller = new MockSkillController(bot, _botSettings, botFrameworkHttpAdapter, skillWebSocketAdapter, _mockHttp.ToHttpClient(), manifestFileOverride);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<IsPackable>false</IsPackable>
<RestoreAdditionalProjectSources>
https://botbuilder.myget.org/F/experimental/api/v3/index.json;
</RestoreAdditionalProjectSources>
</PropertyGroup>

<ItemGroup>
Expand Down

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<Company>Microsoft</Company>
<Authors>Microsoft</Authors>
<Description>Shared library for building Bot Framework Skills.</Description>
<RestoreAdditionalProjectSources>
https://botbuilder.myget.org/F/experimental/api/v3/index.json;
</RestoreAdditionalProjectSources>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand All @@ -33,6 +36,8 @@
<PackageReference Include="Microsoft.Bot.Builder" Version="4.4.3" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.4.3" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.4.3" />
<PackageReference Include="Microsoft.Bot.Protocol" Version="1.0.0-67551" />
<PackageReference Include="Microsoft.Bot.Protocol.WebSockets" Version="1.0.0-67551" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta008" PrivateAssets="all" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public abstract class SkillController : ControllerBase
{
private readonly IBot _bot;
private readonly IBotFrameworkHttpAdapter _botFrameworkHttpAdapter;
private readonly SkillHttpAdapter _skillHttpAdapter;
private readonly SkillWebSocketAdapter _skillWebSocketAdapter;
private readonly BotSettingsBase _botSettings;
private readonly JsonSerializer _jsonSerializer = JsonSerializer.Create(Serialization.Settings);
Expand All @@ -30,14 +29,12 @@ public SkillController(
IBot bot,
BotSettingsBase botSettings,
IBotFrameworkHttpAdapter botFrameworkHttpAdapter,
SkillWebSocketAdapter skillWebSocketAdapter,
SkillHttpAdapter skillHttpAdapter = null)
SkillWebSocketAdapter skillWebSocketAdapter)
{
_bot = bot ?? throw new ArgumentNullException(nameof(IBot));
_botSettings = botSettings ?? throw new ArgumentNullException(nameof(botSettings));
_botFrameworkHttpAdapter = botFrameworkHttpAdapter ?? throw new ArgumentNullException(nameof(IBotFrameworkHttpAdapter));
_skillWebSocketAdapter = skillWebSocketAdapter;
_skillHttpAdapter = skillHttpAdapter;
}

// Each skill provides a template manifest file which we use to fill in the dynamic elements.
Expand Down Expand Up @@ -75,24 +72,6 @@ public async Task SkillMessageWebSocket()
}
}

/// <summary>
/// This API is the endpoint the bot exposes as skill.
/// </summary>
/// <returns>Task.</returns>
[Route("api/skill/messages")]
[HttpPost]
public async Task SkillMessage()
{
if (_skillHttpAdapter != null)
{
await _skillHttpAdapter.ProcessAsync(Request, Response, _bot);
}
else
{
Response.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
}
}

/// <summary>
/// This API is the manifest endpoint that surfaces a self-describing document of the Skill.
/// The base template is provided by the template and at runtime we fill in endpoint, msaAppId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,7 @@ enabling the Skill to perform it's own action identification. */

var dialogResult = await ForwardToSkillAsync(innerDc, activity);

// comment out for now to accomodate for
// scenarios where skillTransport can't be transient
// will uncomment once the fix from StreamingExtensions is in
// _skillTransport.Disconnect();
_skillTransport.Disconnect();
return dialogResult;
}

Expand Down

This file was deleted.

Loading