uTorrentNotifier.Boxcar.Add C# (CSharp) Méthode

Add() public méthode

public Add ( string message ) : void
message string
Résultat void
        public void Add(string message)
        {
            if (String.IsNullOrEmpty(this.BoxcarConfig.APIKey))
                return;
            try
            {
                string url = this._uri + "/devices/providers/" + this.BoxcarConfig.APIKey + "/notifications";

                WebClient client = new WebClient();
                client.Headers.Add("user-agent", "uTorrent Notifier");
                client.UploadData(url, Encoding.ASCII.GetBytes("email=" + this.BoxcarConfig.MD5Email + "&notification[message]=" + message.Replace(" ", "+")));
            }
            catch (WebException)
            {
                /* User probably isn't subscribed to the provider yet */
                this.SendInvite();
                this.Add(message);
            }
        }