TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Context in Tinman.Core.Util

Helper object for passing frames of context objects along with method chains.

sealed class Context implements IBeginEnd

Remarks

The Begin and End method can be used to save and restore the current context using an internal stack.

Public / Constructors

Context

Creates a new instance of Context.

public constructor Context ()

Public / Methods

Begin

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:

BeginEnd

Clear

Clears a named context object.

public method Clear (string name)
type Context
params name [not-empty] The context object name.
returns [not-null] this

End

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:

BeginEnd

Get

Returns 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.

GetBool

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.

GetInt

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.

Is

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.

Set

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 [not-null] 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 [not-null] 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 [not-null] this