Click or drag to resize
Coroutine Class
Represents a coroutine.
Inheritance Hierarchy
SystemObject
  Buddy.CoroutinesCoroutine

Namespace: Buddy.Coroutines
Assembly: Buddy.Coroutines (in Buddy.Coroutines.dll) Version: 1.0.5.0 (1.0.5.0)
Syntax
C#
public sealed class Coroutine : IDisposable

The Coroutine type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyStatic memberCurrent
Gets the currently executing coroutine on this thread, or null, if not executing in a coroutine.
Public propertyFaultingException
Gets the exception that was thrown when this coroutine faulted.
Public propertyIsDisposed
Gets a value indicating whether this coroutine has been disposed of.
Public propertyIsFinished
Gets a bool that indicates whether the coroutine is finished
Public propertyResult
Gets the result returned by the original task.
Public propertyStatus
Gets the status this coroutine is currently in.
Public propertyTicks
Gets the amount of times the coroutine has been resumed/ticked.
Top
Methods
  NameDescription
Public methodCode exampleDispose
Disposes this coroutine.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberExternalTask(FuncTask)
Gets a coroutine task that waits for completion of a produced external task.
Public methodStatic memberExternalTask(Task)
Gets a coroutine task that waits for completion of an external task (a task not running as a coroutine).
Public methodStatic memberExternalTask(Task, Int32) Obsolete.
Gets a coroutine task that waits for completion of an external task (a task not running as a coroutine).
Public methodStatic memberExternalTask(Task, TimeSpan) Obsolete.
Gets a coroutine task that waits for completion of an external task (a task not running as a coroutine).
Public methodStatic memberExternalTaskT(FuncTaskT)
Gets a coroutine task that waits for completion of a produced external task.
Public methodStatic memberExternalTaskT(TaskT)
Gets a coroutine task that waits for completion of an external task (a task not running as a coroutine).
Public methodStatic memberExternalTaskT(TaskT, Int32) Obsolete.
Gets a coroutine task that waits for completion of an external task (a task not running as a coroutine).
Public methodStatic memberExternalTaskT(TaskT, TimeSpan) Obsolete.
Gets a coroutine task that waits for completion of an external task (a task not running as a coroutine).
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodResume
Resumes the coroutine.
Public methodStatic memberSleep(Int32)
Gets a coroutine task that sleeps for the specified amount of milliseconds.
Public methodStatic memberSleep(TimeSpan)
Gets a coroutine task that sleeps for the specified timeout.
Public methodToString
Gets a string representation of this coroutine.
(Overrides ObjectToString.)
Public methodStatic memberWait(Int32, FuncBoolean)
Gets a coroutine task that waits for the specified condition to become true, for up to the specified max time. Returns true if the condition becomes true before the max wait time is over.
Public methodStatic memberWait(TimeSpan, FuncBoolean)
Gets a coroutine task that waits for the specified condition to become true, for up to the specified max time. Returns true if the condition becomes true before the max wait time is over.
Public methodStatic memberYield
Yields back to the coroutine, executing the rest of the current function in the next tick.
Top
See Also