Helper object for passing frames of context objects along with method chains.
sealed class
|
Context
|
implements
|
IBeginEnd
|
The Begin and End method can be used to save and restore the current context using an internal stack.
Creates a new instance of Context.
public
constructor
|
Context
()
|
Begins an access to this object.
public
method
|
Begin
()
|
||
implements
|
IBeginEnd.Begin
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndClears a named context object.
public
method
|
Clear
(string name)
|
||
type
|
Context
|
||
params
|
name
|
[not-empty]
|
The context object name. |
returns
|
|
this |
Ends the current access to this object.
public
method
|
End
()
|
||
implements
|
IBeginEnd.End
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndReturns a named context object.
[Pure]
|
||||
public
method
|
Get
(string name)
|
|||
type
|
object
|
|||
params
|
name
|
[not-empty]
|
The context object name. | |
returns
|
The
context
object
or
null . |
Returns a named context boolean value.
[Pure]
|
||||
public
method
|
GetBool
(string name,
bool defaultValue = false)
|
|||
type
|
bool
|
|||
params
|
name
|
[not-empty]
|
The context value name. | |
defaultValue
|
The
value
to
return
if
there
is
no
context
value.
Defaults
to
false .
|
|||
returns
|
The boolean value. |
Returns a named context integer value.
[Pure]
|
||||
public
method
|
GetInt
(string name,
int32 defaultValue = 0)
|
|||
type
|
int32
|
|||
params
|
name
|
[not-empty]
|
The context value name. | |
defaultValue
|
The
value
to
return
if
there
is
no
context
value.
Defaults
to
0 .
|
|||
returns
|
The integer value. |
Returns a named context flag.
[Pure]
|
||||
public
method
|
Is
(string name)
|
|||
type
|
bool
|
|||
params
|
name
|
[not-empty]
|
The context flag name. | |
returns
|
The context value. |
Sets a named boolean flag.
public
method
|
Set
(string name,
bool value)
|
||
type
|
Context
|
||
params
|
name
|
[not-empty]
|
The context flag name. |
value
|
The context flag value. | ||
returns
|
|
this |
Sets a named integer value.
public
method
|
Set
(string name,
int32 value)
|
||
type
|
Context
|
||
params
|
name
|
[not-empty]
|
The context flag name. |
value
|
The context flag value. | ||
returns
|
|
this |
Sets a named context object.
public
method
|
Set
(string name,
object value)
|
||
type
|
Context
|
||
params
|
name
|
[not-empty]
|
The context object name. |
value
|
The context object. | ||
returns
|
|
this |