C# Класс C2dmSharp.Server.C2dmService

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
running bool

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

Метод Описание
C2dmService ( ) : System
C2dmService ( string senderID, string password, string applicationID ) : System

Ctor

QueueMessage ( C2dmMessage msg ) : void

Queues a new C2DM Message to be sent

QueueMessage ( string registrationId, NameValueCollection data, string collapseKey ) : void

Queues a new C2DM Message to be sent

QueueMessage ( string registrationId, NameValueCollection data, string collapseKey, bool delayWhileIdle ) : void

Queues a new C2DM Message to be sent

RefreshGoogleAuthToken ( ) : void

Explicitly refreshes the Google Auth Token. Usually not necessary.

SetNumberOfWorkers ( int value ) : void

Increase or decrease the number of workers to process queued messages.

Start ( ) : void
Start ( int numberOfWorkers ) : void

Starts the specified number of workers ready to send queued messages

Stop ( ) : void

Stops all workers and the service, without waiting for queued messages to be sent.

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

Метод Описание
init ( string senderID, string password, string applicationID ) : void
messageTransportWork ( object state ) : void

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

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

public C2dmService ( ) : System
Результат System

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

Ctor
public C2dmService ( string senderID, string password, string applicationID ) : System
senderID string Email address (google account) used to sign up for Google's C2DM application Whitelist
password string Password used to login with Email
applicationID string Application (Package Name) used to sign up for Google's C2DM Whitelist
Результат System

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

Queues a new C2DM Message to be sent
public QueueMessage ( C2dmMessage msg ) : void
msg C2dmMessage Constructed C2dmMessage parameter
Результат void

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

Queues a new C2DM Message to be sent
public QueueMessage ( string registrationId, NameValueCollection data, string collapseKey ) : void
registrationId string Registration ID of the Device
data System.Collections.Specialized.NameValueCollection Key/Value Collection of data or 'extras' to send
collapseKey string Collapse Key
Результат void

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

Queues a new C2DM Message to be sent
public QueueMessage ( string registrationId, NameValueCollection data, string collapseKey, bool delayWhileIdle ) : void
registrationId string Registration ID of the Device
data System.Collections.Specialized.NameValueCollection Key/Value Collection of data or 'extras' to send
collapseKey string Collapse Key
delayWhileIdle bool If true, C2DM will only be delivered once the device's screen is on
Результат void

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

Explicitly refreshes the Google Auth Token. Usually not necessary.
public RefreshGoogleAuthToken ( ) : void
Результат void

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

Increase or decrease the number of workers to process queued messages.
public SetNumberOfWorkers ( int value ) : void
value int New Value for the number of workers to use
Результат void

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

public Start ( ) : void
Результат void

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

Starts the specified number of workers ready to send queued messages
public Start ( int numberOfWorkers ) : void
numberOfWorkers int Number of Workers
Результат void

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

Stops all workers and the service, without waiting for queued messages to be sent.
public Stop ( ) : void
Результат void

Описание свойств

running публичное свойство

public bool running
Результат bool