Last active
October 2, 2019 11:02
-
-
Save beachside-project/005c8d0e137f1d3a6578cc1a774924fb to your computer and use it in GitHub Desktop.
CustomBindingsSamples.TeamsBinding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Azure.WebJobs; | |
namespace CustomBindingsSamples.TeamsBinding | |
{ | |
public class TeamsBindingConverter : IConverter<TeamsAttribute, IAsyncCollector<TeamsMessage>> | |
{ | |
private readonly TeamsBindingConfigProvider _configProvider; | |
public TeamsBindingConverter(TeamsBindingConfigProvider configProvider) | |
{ | |
_configProvider = configProvider; | |
} | |
public IAsyncCollector<TeamsMessage> Convert(TeamsAttribute attribute) | |
{ | |
var context = _configProvider.CreateTeamsBindingContext(attribute); | |
return new TeamsBindingAsyncCollector(context); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment