C# Class NotificationsExtensions.NotificationSendUtils

Show file Open project: nickharris/WnsRecipe

Public Methods

Method Description
Send ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, NotificationType type, NotificationSendOptions options ) : NotificationSendResult
Send ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, NotificationType type, int secondsTTL = null, bool cache = null, bool requestForStatus = null, string tag = null, NotificationPriority priority = NotificationPriority.Normal, int tokenRetry ) : NotificationSendResult
SendAsynchronously ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, Action sent, Action error, NotificationType type, NotificationSendOptions options ) : void
SendAsynchronously ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, Action sent, Action error, NotificationType type, int secondsTTL = null, bool cache = null, bool requestForStatus = null, string tag = null, NotificationPriority priority = NotificationPriority.Normal, int tokenRetry ) : void

Private Methods

Method Description
AccessTokenLogMessage ( WebResponse webResponse, AccessTokenError error ) : string
CreateWebRequest ( Uri channelId, string accessToken, string payload, NotificationType type, int secondsTTL, bool cache, bool requestForStatus, string tag, NotificationPriority priority, byte &payloadBytes ) : HttpWebRequest
GetAccessTokenError ( WebResponse response ) : AccessTokenError
HttpHeaders ( StringBuilder sb, WebHeaderCollection headers ) : void
NotificationLogMessage ( string message, string description, NotificationSendResult result, string payload, WebRequest request, WebResponse response ) : string
NotificationRequestStatus ( string channelId, string payload, int secondsTTL, bool cache, bool requestForStatus, string tag, NotificationPriority priority, int tokenRetry ) : string
SetCustomHeaders ( HttpWebRequest request, NotificationType type ) : void
SetHeaders ( string accessToken, NotificationType type, int secondsTTL, bool cache, bool requestForStatus, string tag, NotificationPriority priority, HttpWebRequest request ) : void

Method Details

Send() public static method

public static Send ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, NotificationType type, NotificationSendOptions options ) : NotificationSendResult
channelUri System.Uri
accessTokenProvider IAccessTokenProvider
payload string
type NotificationType
options NotificationSendOptions
return NotificationSendResult

Send() public static method

public static Send ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, NotificationType type, int secondsTTL = null, bool cache = null, bool requestForStatus = null, string tag = null, NotificationPriority priority = NotificationPriority.Normal, int tokenRetry ) : NotificationSendResult
channelUri System.Uri
accessTokenProvider IAccessTokenProvider
payload string
type NotificationType
secondsTTL int
cache bool
requestForStatus bool
tag string
priority NotificationPriority
tokenRetry int
return NotificationSendResult

SendAsynchronously() public static method

public static SendAsynchronously ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, Action sent, Action error, NotificationType type, NotificationSendOptions options ) : void
channelUri System.Uri
accessTokenProvider IAccessTokenProvider
payload string
sent Action
error Action
type NotificationType
options NotificationSendOptions
return void

SendAsynchronously() public static method

public static SendAsynchronously ( Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, Action sent, Action error, NotificationType type, int secondsTTL = null, bool cache = null, bool requestForStatus = null, string tag = null, NotificationPriority priority = NotificationPriority.Normal, int tokenRetry ) : void
channelUri System.Uri
accessTokenProvider IAccessTokenProvider
payload string
sent Action
error Action
type NotificationType
secondsTTL int
cache bool
requestForStatus bool
tag string
priority NotificationPriority
tokenRetry int
return void