C# 클래스 MMS_App2, API-Platform

MMS_App2 class
This is a server side application which also has a web interface. The application looks for a file called numbers.txt containing MSISDNs of desired recipients, and an image called coupon.jpg, and message text from a file called subject.txt, and then sends an MMS message with the attachment to every recipient in the list. This can be triggered via a command line on the server, or through the web interface, which then displays all the returned mmsIds or respective errors
상속: System.Web.UI.Page
파일 보기 프로젝트 열기: attdevsupport/API-Platform

공개 메소드들

메소드 설명
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

SendButton_Click ( object sender, EventArgs e ) : void

This method will be called when user clicks on send mms button

StatusButton_Click ( object sender, EventArgs e ) : void

This method will be called when user clicks on get status button

비공개 메소드들

메소드 설명
DrawPanelForFailedNumbers ( Panel panelParam ) : void

This function draws table for failed numbers

DrawPanelForFailure ( Panel panelParam, string message ) : void

Displays error message

DrawPanelForGetStatusResult ( string msgid, string phone, string status, bool headerFlag ) : void

This method draws table for get status response

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.

GetPhoneNumbers ( ) : bool

This method gets the phone numbers present in phonenumber text box and validates each phone number and prepares valid and invalid phone number lists and returns a bool value indicating if able to get the phone numbers.

IsTokenValid ( ) : string

Validates he expiry of the access token and refresh token

IsValidMISDN ( string number ) : bool

This method validates the given string as 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

SendMMS ( ) : void

Sends MMS message by invoking Send MMS api

메소드 상세

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
protected Page_Load ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
리턴 void

SendButton_Click() 보호된 메소드

This method will be called when user clicks on send mms button
protected SendButton_Click ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
리턴 void

StatusButton_Click() 보호된 메소드

This method will be called when user clicks on get status button
protected StatusButton_Click ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
리턴 void