Example #1
0
 /// <inheritdoc/>
 public override void ConfigureServices(IServiceCollection services, IConfiguration configuration)
 {
     if (FacebookAdapter.HasConfiguration(configuration))
     {
         services.AddSingleton <FacebookAdapter>();
     }
 }
Example #2
0
 /// <inheritdoc/>
 public override void ConfigureServices(IServiceCollection services, IConfiguration configuration)
 {
     if (FacebookAdapter.HasConfiguration(configuration))
     {
         // Components require the component configuration which is the subsection
         // assigned to the component. When the botbuilder-dotnet issue #5583 gets resolved, this could
         // change to the no-parameter overload.
         services.AddSingleton <IBotFrameworkHttpAdapter, FacebookAdapter>(sp => new FacebookAdapter(configuration));
     }
 }