TriLib 2.2.8
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
TriLibCore.General.ContextualizedAction< T > Class Template Reference

Represents an Action with a context used by Threads. More...

Inheritance diagram for TriLibCore.General.ContextualizedAction< T >:
TriLibCore.Interfaces.IContextualizedAction

Public Member Functions

 ContextualizedAction (Action action)
 Initializes the Contextualized Action using the given Action.
 
AssetLoaderContext GetContext ()
 Returns the Context used in this Action.
 
void Invoke ()
 Invokes the Action on the new Thread with the Context as the argument.
 
override string ToString ()
 
 ContextualizedAction (Action< T > action, T context)
 Initializes the Contextualized Action using the given Action and Context.
 
AssetLoaderContext GetContext ()
 Returns the Context used in this Action.
 
void Invoke ()
 Invokes the Action on the new Thread with the Context as the argument.
 
override string ToString ()
 
void Invoke ()
 Invokes this Action without using any context.
 
AssetLoaderContext GetContext ()
 Returns the Context used in this Action.
 

Public Attributes

readonly Action Action
 Action to call on the new Thread.
 
readonly Action< T > Action
 Action to call on the new Thread.
 
readonly T Context
 Context Object passed to the Action.
 

Properties

bool Completed [get]
 Indicates whether this Action is completed.
 
- Properties inherited from TriLibCore.Interfaces.IContextualizedAction
bool Completed [get]
 Indicates whether this Action is completed.
 

Detailed Description

Represents an Action with a context used by Threads.

Template Parameters
TContext type.

Constructor & Destructor Documentation

◆ ContextualizedAction() [1/2]

Initializes the Contextualized Action using the given Action.

Parameters
actionThe Action to be executed.

◆ ContextualizedAction() [2/2]

Initializes the Contextualized Action using the given Action and Context.

Parameters
actionThe Action to be executed.
contextThe Context which has been passed to the Action.

Member Function Documentation

◆ GetContext() [1/2]

Returns the Context used in this Action.

Returns

Implements TriLibCore.Interfaces.IContextualizedAction.

◆ GetContext() [2/2]

Returns the Context used in this Action.

Returns

Implements TriLibCore.Interfaces.IContextualizedAction.

◆ Invoke() [1/2]

Invokes the Action on the new Thread with the Context as the argument.

Implements TriLibCore.Interfaces.IContextualizedAction.

◆ Invoke() [2/2]

Invokes the Action on the new Thread with the Context as the argument.

Implements TriLibCore.Interfaces.IContextualizedAction.

Property Documentation

◆ Completed

bool TriLibCore.General.ContextualizedAction< T >.Completed
get

Indicates whether this Action is completed.

Implements TriLibCore.Interfaces.IContextualizedAction.