C# Class ShoutLib.Shouter

The worker class that converts lowercase to uppercase.
Afficher le fichier Open project: GoogleCloudPlatform/pubsub-shout-csharp Class Usage Examples

Méthodes publiques

Méthode Description
FromUnixTime ( long unixTime ) : System.DateTime

Converts a unix time (seconds since the epoch) to a DateTime.

Shout ( System cancellationToken ) : int

Waits for a shout request message to arrive in the Pub/Sub subscription. Converts the text to uppercase and posts the results back to the website.

Nothing more than a wrapper around ShoutOrThrow() to catch unexpected exceptions.

ShoutOrThrow ( System cancellationToken ) : int

Waits for a shout request message to arrive in the Pub/Sub subscription. Converts the text to uppercase and posts the results back to the website.

Shouter ( Initializer init = null ) : System
Shouter ( Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter logWriter ) : System

Private Methods

Méthode Description
Acknowledge ( string ackId ) : void

Removes a shout request message from the subscription.

MakeSubscriptionPath ( string subscription ) : string

Makes a full subscription path given a subscription name.

MakeTopicPath ( string topic ) : string

Makes a full topic path given a topic name.

PublishStatus ( string postStatusUrl, string postStatusToken, string status, string result = null ) : void

Posts a message back to the browser, via App Engine.

ShoutString ( string text, ThrowIfAborted throwIfAborted ) : string

Converts a string from lowercase to uppercase, taking an extra long time. During that time, it periodically calls testCancel so that the caller can abort the operation if it's taking too long.

WriteLog ( string message, TraceEventType severity = TraceEventType.Information ) : void

Writes a message to the log.

Method Details

FromUnixTime() public static méthode

Converts a unix time (seconds since the epoch) to a DateTime.
public static FromUnixTime ( long unixTime ) : System.DateTime
unixTime long Seconds since the epoch.
Résultat System.DateTime

Shout() public méthode

Waits for a shout request message to arrive in the Pub/Sub subscription. Converts the text to uppercase and posts the results back to the website.
Nothing more than a wrapper around ShoutOrThrow() to catch unexpected exceptions.
public Shout ( System cancellationToken ) : int
cancellationToken System
Résultat int

ShoutOrThrow() public méthode

Waits for a shout request message to arrive in the Pub/Sub subscription. Converts the text to uppercase and posts the results back to the website.
public ShoutOrThrow ( System cancellationToken ) : int
cancellationToken System
Résultat int

Shouter() public méthode

public Shouter ( Initializer init = null ) : System
init Initializer
Résultat System

Shouter() public méthode

public Shouter ( Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter logWriter ) : System
logWriter Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter
Résultat System