C# Class Cedar.Core.ApplicationContexts.ContextLocator

Define the context locator.
Inheritance: IContextLocator
ファイルを表示 Open project: Chinaccn/surfboard

Public Methods

Method Description
AttachContext ( ContextItemCollection context, ContextAttachBehavior behavior ) : void

Attach a new context item collection to the current context.

Clear ( ) : void

Clear the current context item collection.

ContextItemExits ( string key ) : bool

Check if the context item of the given key exists.

GetContextItem ( string key ) : ContextItem

Get an existing context item by given key.

GetCurrentContext ( ) : ContextItemCollection

Get all current context item collection.

SetContextItem ( ContextItem contextItem ) : void

Add a new context item or use the new context item to override the exiting one.

Protected Methods

Method Description
SetContextItemCore ( ContextItem contextItem ) : void

Set context item inernally.

Private Methods

Method Description
EnsureCanWrite ( ContextItem contextItem ) : void

Method Details

AttachContext() public method

Attach a new context item collection to the current context.
public AttachContext ( ContextItemCollection context, ContextAttachBehavior behavior ) : void
context ContextItemCollection The to attach.
behavior ContextAttachBehavior The .
return void

Clear() public abstract method

Clear the current context item collection.
public abstract Clear ( ) : void
return void

ContextItemExits() public abstract method

Check if the context item of the given key exists.
public abstract ContextItemExits ( string key ) : bool
key string The key of the .
return bool

GetContextItem() public abstract method

Get an existing context item by given key.
public abstract GetContextItem ( string key ) : ContextItem
key string The key of the to get.
return ContextItem

GetCurrentContext() public abstract method

Get all current context item collection.
public abstract GetCurrentContext ( ) : ContextItemCollection
return ContextItemCollection

SetContextItem() public method

Add a new context item or use the new context item to override the exiting one.
public SetContextItem ( ContextItem contextItem ) : void
contextItem ContextItem The new to set.
return void

SetContextItemCore() protected abstract method

Set context item inernally.
protected abstract SetContextItemCore ( ContextItem contextItem ) : void
contextItem ContextItem The context item.
return void