Was this page helpful?

TaskEnv Class

    Table of contents
    1. 1. Members
      1. 1.1. Properties
      2. 1.2. Methods
    Table of Contents
    public class TaskEnv
    Namespace: MindTouch.Tasking
    Assembly: mindtouch.dream
    Type Hierarchy:
    • object
      • Dictionary<object,object>
        • TaskEnv
    Implements:
    • IDictionary<object,object>
    • ICollection<KeyValuePair<object,object>>
    • IEnumerable<KeyValuePair<object,object>>
    • IEnumerable
    • IDictionary
    • ICollection
    • ISerializable
    • IDeserializationCallback
    Environment propagated along with a task as it transitions between threads.

    Members

    Properties

    Visibility Description
    Public Instantaneous Get the instantaneous execution environment.
    Public None Get the environment-less marker value.
    Public CurrentOrNull Get the current task environment. Returns null if there is no current environment.
    Public Current Get the current task environment. Will create a new task environment if none exists.
    Public DispatchQueue Dispatch queue of the environment.
    Public TimerFactory MindTouch.Dream.TaskTimer factory used by the environment.
    Public Comparer (Inherited from Dictionary<TKey,TValue>)
    Public Count (Inherited from Dictionary<TKey,TValue>)
    Public Keys (Inherited from Dictionary<TKey,TValue>)
    Public Values (Inherited from Dictionary<TKey,TValue>)
    Public this[object key] (Inherited from Dictionary<TKey,TValue>)

    Methods

    Visibility Description
    Public New(IDispatchQueue dispatchQueue) Create a new environment.
    Public Clone(IDispatchQueue dispatchQueue) Clone the current task environment with a provided dispatch queue.
    Public New(IDispatchQueue dispatchQueue, TaskTimerFactory taskTimerFactory) Create a new environment.
    Public Clone(IDispatchQueue dispatchQueue, TaskTimerFactory taskTimerFactory) Clone the current task environment with a provided dispatch queue and task timer factory.
    Public New(TaskTimerFactory taskTimerFactory) Create a new environment.
    Public Clone(TaskTimerFactory taskTimerFactory) Clone the current task environment with a task timer factory.
    Public New() Create a new environment.
    Public Clone() Clone the current task environment.
    Public ExecuteNew(Action handler) Execute an action in a new environment.
    Public ExecuteNew(Action handler, TaskTimerFactory timerFactory) Execute an action in a new environment.
    Public GetState() Retrieve a typed state variable.
    Public SetState(T value) Set a typed state variable.
    Public GetState(string key) Retrieve a keyed state variable.
    Public SetState(string key, T value) Set a keyed state variable.
    Public Acquire() Acquire the environment, prevent it from being disposed.
    Public Release() Release the environment, possibly making it eligble for disposal.
    Public Reset() Reset all aquisitions and dispose the environment.
    Public InvokeNow(Action handler) Invoke an action in place.
    Public Invoke(Action handler) Invoke a zero arg action.
    Public Invoke(Action<T1> handler, T1 arg1) Invoke a one argument action.
    Public Invoke(Action<T1,T2> handler, T1 arg1, T2 arg2) Invoke a two argument action.
    Public Invoke(Action<T1,T2,T3> handler, T1 arg1, T2 arg2, T3 arg3) Invoke a three argument action.
    Public MakeAction(Action action) Wrap a method call, delegate or lambda in an environment for later invocation.
    Public MakeAction(Action action, Result result) Wrap a method call, delegate or lambda in an environment for later invocation.
    Public MakeAction(Func<T> func) Wrap a method call, delegate or lambda in an environment for later invocation.
    Public MakeAction(Func<T> func, Result<T> result) Wrap a method call, delegate or lambda in an environment for later invocation.
    Public Add(object key, object value) (Inherited from Dictionary<TKey,TValue>)
    Public Clear() (Inherited from Dictionary<TKey,TValue>)
    Public ContainsKey(object key) (Inherited from Dictionary<TKey,TValue>)
    Public ContainsValue(object value) (Inherited from Dictionary<TKey,TValue>)
    Public GetEnumerator() (Inherited from Dictionary<TKey,TValue>)
    Public GetObjectData(SerializationInfo info, StreamingContext context) (Inherited from Dictionary<TKey,TValue>)
    Public OnDeserialization(object sender) (Inherited from Dictionary<TKey,TValue>)
    Public Remove(object key) (Inherited from Dictionary<TKey,TValue>)
    Public TryGetValue(object key, out object value) (Inherited from Dictionary<TKey,TValue>)
    Public ToString() (Inherited from Object)
    Public Equals(object obj) (Inherited from Object)
    Public GetHashCode() (Inherited from Object)
    Public GetType() (Inherited from Object)
    Protected MemberwiseClone() (Inherited from Object)
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by