private DefaultMicrosoftTeamsLogicAppPostMessageClient CreateClient(DefaultMicrosoftTeamsLogicAppPostMessageClientSettings settings = null, HttpClient httpClient = null)
        {
            if (settings == null)
            {
                settings = new DefaultMicrosoftTeamsLogicAppPostMessageClientSettings()
                {
                    Active      = true,
                    EndpointUrl = "https://loremipsum.com/api/v1/postmessage"
                };
            }

            if (httpClient == null)
            {
                httpClient = HttpClientExtensions.CreateMockHttpClient(
                    new DefaultMicrosoftTeamsPostMessageResponse()
                {
                    MessageId = "M123456789"
                }
                    );
            }

            var notifier = new DefaultMicrosoftTeamsLogicAppPostMessageClient(httpClient, settings);

            return(notifier);
        }
Exemple #2
0
 public DefaultMicrosoftTeamsLogicAppPostMessageClient(HttpClient httpClient, DefaultMicrosoftTeamsLogicAppPostMessageClientSettings settings)
 {
     _httpClient = httpClient;
     _settings   = settings;
 }