C# Класс WapPush_App1, API-Platform

WapPush_App1 application
This application allows a user to send a WAP Push message to a mobile device, by entering the address, alert text, and URL to be sent. This application uses Autonomous Client Credentials consumption model to send messages. The user enters the alert text and URL, but the application in the background must build the push.txt file to attach with the requested values.
Наследование: System.Web.UI.Page
Показать файл Открыть проект

Открытые методы

Метод Описание
BypassCertificateError ( ) : void

This method neglects the ssl handshake error with authentication server

Page_Load ( object sender, EventArgs e ) : void

Event, that triggers when the application page is loaded into the web browser, reads the web.config file and gets the values of the attributes

Защищенные методы

Метод Описание
SendWAPButton_Click ( object sender, EventArgs e ) : void

This function is called when user clicks on send wap message button. This function calls send wap message API to send the wap message

Приватные методы

Метод Описание
DrawPanelForFailure ( Panel panelParam, string message ) : void

Displays error message

DrawPanelForSuccess ( Panel panelParam, string message ) : void

Display success message

GetAccessToken ( AccessTokenType type ) : bool

This method gets access token based on either client credentials mode or refresh token.

IsTokenValid ( ) : string

Validates he expiry of the access token and refresh token

IsValidMISDN ( string number ) : bool

This function validates string against the valid msisdn

ReadAccessTokenFile ( ) : bool

This function reads the Access Token File and stores the values of access token, expiry seconds, refresh token, last access token time and refresh token expiry time.

ReadAndGetAccessToken ( ) : bool

This function reads access token file, validates the access token and gets a new access token

ReadConfigFile ( ) : bool

This method reads config file and assigns values to local variables

SendWapPush ( ) : void

This function calls send wap message api to send wap messsage

Описание методов

BypassCertificateError() публичный статический Метод

This method neglects the ssl handshake error with authentication server
public static BypassCertificateError ( ) : void
Результат void

Page_Load() публичный Метод

Event, that triggers when the application page is loaded into the web browser, reads the web.config file and gets the values of the attributes
public Page_Load ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
Результат void

SendWAPButton_Click() защищенный Метод

This function is called when user clicks on send wap message button. This function calls send wap message API to send the wap message
protected SendWAPButton_Click ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
Результат void