C# Class Open.Core.Common.Network.LoaderBase

Base class for objects that implement server loading functions.
Inheritance: System.NotifyPropertyChangedBase
Afficher le fichier Open project: philcockfield/Open.TestHarness.SL

Private Properties

Свойство Type Description
CheckForError System.Exception

Méthodes publiques

Méthode Description
Handle_OpenReadCompleted ( object sender, TestableOpenReadCompletedEventArgs e ) : void
Load ( ) : void

Commences the load operation.

Implementers see the 'OnPreload' and 'OnLoadCallback' method.

Load ( System.Action callback ) : void

Commences the load operation, and invokes a callback on complete.

Méthodes protégées

Méthode Description
GetUri ( ) : Uri

Retrieves the URI of the server location to access.

LoaderBase ( ) : System

Constructor.

LoaderBase ( TestableWebClient webClient ) : System

Constructor.

Inject a different client to teh constructor for testing purposes.

OnLoadCallback ( TestableOpenReadCompletedEventArgs e ) : void

Called after the load operation has completed.

Check the 'LoadError' property to see whether the operation was successful.

OnLoadFailed ( ) : void
OnLoaded ( ) : void
OnPreload ( ) : bool

Fired before the server call is initiated.

Private Methods

Méthode Description
CheckForError ( TestableOpenReadCompletedEventArgs e ) : Exception

Method Details

GetUri() protected abstract méthode

Retrieves the URI of the server location to access.
protected abstract GetUri ( ) : Uri
Résultat System.Uri

Handle_OpenReadCompleted() public méthode

public Handle_OpenReadCompleted ( object sender, TestableOpenReadCompletedEventArgs e ) : void
sender object
e TestableOpenReadCompletedEventArgs
Résultat void

Load() public méthode

Commences the load operation.
Implementers see the 'OnPreload' and 'OnLoadCallback' method.
public Load ( ) : void
Résultat void

Load() public méthode

Commences the load operation, and invokes a callback on complete.
public Load ( System.Action callback ) : void
callback System.Action The callback to invoke.
Résultat void

LoaderBase() protected méthode

Constructor.
protected LoaderBase ( ) : System
Résultat System

LoaderBase() protected méthode

Constructor.
Inject a different client to teh constructor for testing purposes.
protected LoaderBase ( TestableWebClient webClient ) : System
webClient TestableWebClient The web client to use.
Résultat System

OnLoadCallback() protected abstract méthode

Called after the load operation has completed.
Check the 'LoadError' property to see whether the operation was successful.
protected abstract OnLoadCallback ( TestableOpenReadCompletedEventArgs e ) : void
e TestableOpenReadCompletedEventArgs The event arguments containing information about the server call.
Résultat void

OnLoadFailed() protected méthode

protected OnLoadFailed ( ) : void
Résultat void

OnLoaded() protected méthode

protected OnLoaded ( ) : void
Résultat void

OnPreload() protected méthode

Fired before the server call is initiated.
protected OnPreload ( ) : bool
Résultat bool