C# Class NLogToSlack.Models.Payload

Mostrar archivo Open project: cyrilgandon/NLogToSlack Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
SendTo ( string webHookUrl ) : void

Send this payload via a POST request to the given slack Webhook

SetIcon ( string icon ) : void

Set the IconUrl attribute if icon look like a Uri, else set the IconEmoji attribute

ToJson ( ) : string

Create JSON that will be send to Slack

Method Details

SendTo() public method

Send this payload via a POST request to the given slack Webhook
public SendTo ( string webHookUrl ) : void
webHookUrl string The WebhookUrl where Payload will be POST
return void

SetIcon() public method

Set the IconUrl attribute if icon look like a Uri, else set the IconEmoji attribute
public SetIcon ( string icon ) : void
icon string
return void

ToJson() public method

Create JSON that will be send to Slack
public ToJson ( ) : string
return string