C# Class Meta.ActiveObject

Implements a simple active object pattern implementation
Although there exists a vast number of active objects patterns (in Java they are just "runnable") scattered, one of the best I found is located at http://blog.gurock.com/wp-content/uploads/2008/01/activeobjects.pdf
Inheritance: IActiveObject, IDisposable
显示文件 Open project: brandon-kohn/Meta

Public Methods

Method Description
ActiveObject ( ) : System
ActiveObject ( int maxStack ) : System
Dispose ( ) : void
Initialize ( string name, System.Action action ) : void
Shutdown ( ) : void

Signals to shutdown this active object

Signal ( ) : void

Signal the active object to perform its loop action.

Application may call this after some simple of complex condition evaluation

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
Guard ( ) : bool
Run ( ) : void

Core run method of this active thread

Method Details

ActiveObject() public method

public ActiveObject ( ) : System
return System

ActiveObject() public method

public ActiveObject ( int maxStack ) : System
maxStack int
return System

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Initialize() public method

public Initialize ( string name, System.Action action ) : void
name string
action System.Action
return void

Shutdown() public method

Signals to shutdown this active object
public Shutdown ( ) : void
return void

Signal() public method

Signal the active object to perform its loop action.
Application may call this after some simple of complex condition evaluation
public Signal ( ) : void
return void