C# Class Castle.MonoRail.Framework.Flash

Inheritance: System.Collections.Hashtable
显示文件 Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Properties

Property Type Description
FlashKey String

Private Properties

Property Type Description
Flash System
InternalAdd void

Public Methods

Method Description
Add ( object key, object value ) : void

Adds an element with the specified key and value into the .

Discard ( ) : void

Marks the entire flash to be discarded by the end of the current action

Discard ( object key ) : void

Marks Flash[key] to be discarded by the end of the current action

Flash ( ) : System

Initializes a new instance of the Flash class.

Flash ( Flash copy ) : System

Initializes a new instance of the Flash class.

Keep ( ) : void

Keeps the entire flash contents available for the next action

Keep ( object key ) : void

Keeps the Flash['key'] contents available for the next action

Now ( object key, object value ) : void

Sets a flash that will not be available to the next action, only to the current. Flash.Now( key, "Hello current action" )

This method enables you to use the flash as a central messaging system in your app. When you need to pass an object to the next action, you use the standard flash assign ([]=). When you need to pass an object to the current action, you use Now, and your object will vanish when the current action is done.

Entries set via Now are accessed the same way as standard entries: Flash['my-key'].

Sweep ( ) : void

Remove any element thats not marked to be kept. This method is automatically called by the framework after the controller is processed.

this ( object key ) : object

Gets or sets the System.Object with the specified key.

Private Methods

Method Description
Flash ( SerializationInfo info, StreamingContext context ) : System
InternalAdd ( object key, object value ) : void

Making sure we keep any item added to the flash directly for at least one more action.

Method Details

Add() public method

Adds an element with the specified key and value into the .
The is read-only.-or- The has a fixed size. An element with the same key already exists in the . key is null.
public Add ( object key, object value ) : void
key object The key of the element to add.
value object The value of the element to add. The value can be null.
return void

Discard() public method

Marks the entire flash to be discarded by the end of the current action
public Discard ( ) : void
return void

Discard() public method

Marks Flash[key] to be discarded by the end of the current action
public Discard ( object key ) : void
key object
return void

Flash() public method

Initializes a new instance of the Flash class.
public Flash ( ) : System
return System

Flash() public method

Initializes a new instance of the Flash class.
public Flash ( Flash copy ) : System
copy Flash The copy.
return System

Keep() public method

Keeps the entire flash contents available for the next action
public Keep ( ) : void
return void

Keep() public method

Keeps the Flash['key'] contents available for the next action
public Keep ( object key ) : void
key object
return void

Now() public method

Sets a flash that will not be available to the next action, only to the current. Flash.Now( key, "Hello current action" )

This method enables you to use the flash as a central messaging system in your app. When you need to pass an object to the next action, you use the standard flash assign ([]=). When you need to pass an object to the current action, you use Now, and your object will vanish when the current action is done.

Entries set via Now are accessed the same way as standard entries: Flash['my-key'].

public Now ( object key, object value ) : void
key object
value object
return void

Sweep() public method

Remove any element thats not marked to be kept. This method is automatically called by the framework after the controller is processed.
public Sweep ( ) : void
return void

this() public method

Gets or sets the System.Object with the specified key.
public this ( object key ) : object
key object
return object

Property Details

FlashKey public_oe static_oe property

Flash key
public static String FlashKey
return String