Skip to content

Instantly share code, notes, and snippets.

@vmussak
Created February 25, 2021 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmussak/4be72bc478fef707b2036aab76c8a76b to your computer and use it in GitHub Desktop.
Save vmussak/4be72bc478fef707b2036aab76c8a76b to your computer and use it in GitHub Desktop.
public static void CadastrarCliente()
{
try
{
//tenta cadastrar o cliente aqui
throw new Exception("Erro ao cadastrar o cliente");
}
catch (Exception ex)
{
var teamsRequest = new MicrosoftTeamsRequest
{
Context = "https://schema.org/extensions",
Type = "MessageCard",
ThemeColor = "000",
Title = "Deu erro :(",
Text = "Erro ao cadastrar o cliente ABCD"
};
new MicrosoftTeamsService().SendMicrosoftTeamsMessage(teamsRequest);
Console.WriteLine("Deu erro...");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment