C# 클래스 Foundation.Tasks.UnityTask

A task encapsulates future work that may be waited on. - Support running actions in background threads - Supports running coroutines with return results - Use the WaitForRoutine method to wait for the task in a coroutine
상속: UnityEngine.CustomYieldInstruction, IDisposable
파일 보기 프로젝트 열기: NVentimiglia/Unity3d-Foundation 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DisableMultiThread bool
LogErrors bool
Strategy TaskStrategy

보호된 프로퍼티들

프로퍼티 타입 설명
_action System.Action
_routine IEnumerator
_status TaskStatus

공개 메소드들

메소드 설명
AddContinue ( Delegate action ) : void
Complete ( Exception ex = null ) : void

Runs complete logic, for custom tasks

Delay ( int millisecondTimeout ) : System.Threading.Tasks.Task
Delay ( int millisecondTimeout ) : void
DeserializeResult ( string json ) : void

For HTTP

Dispose ( ) : void
Start ( ) : void

Executes the task

UnityTask ( System.Action action ) : System

Creates a new background task

UnityTask ( System.Action action, TaskStrategy mode ) : System

Creates a new Task

UnityTask ( Exception ex ) : System

Creates a new Task in a Faulted state

UnityTask ( IEnumerator action ) : System

Creates a new Coroutine Task

UnityTask ( TaskStrategy mode ) : System

Creates a new task

보호된 메소드들

메소드 설명
Execute ( ) : void
OnRoutineComplete ( ) : void
OnTaskComplete ( ) : void
RunAsCoroutine ( ) : void
RunOnBackgroundThread ( ) : void
RunOnCurrentThread ( ) : void
RunOnMainThread ( ) : void

비공개 메소드들

메소드 설명
UnityTask ( ) : System

메소드 상세

AddContinue() 공개 메소드

public AddContinue ( Delegate action ) : void
action System.Delegate
리턴 void

Complete() 공개 메소드

Runs complete logic, for custom tasks
public Complete ( Exception ex = null ) : void
ex System.Exception
리턴 void

Delay() 공개 정적인 메소드

public static Delay ( int millisecondTimeout ) : System.Threading.Tasks.Task
millisecondTimeout int
리턴 System.Threading.Tasks.Task

Delay() 공개 정적인 메소드

public static Delay ( int millisecondTimeout ) : void
millisecondTimeout int
리턴 void

DeserializeResult() 공개 메소드

For HTTP
public DeserializeResult ( string json ) : void
json string
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Execute() 보호된 메소드

protected Execute ( ) : void
리턴 void

OnRoutineComplete() 보호된 메소드

protected OnRoutineComplete ( ) : void
리턴 void

OnTaskComplete() 보호된 메소드

protected OnTaskComplete ( ) : void
리턴 void

RunAsCoroutine() 보호된 메소드

protected RunAsCoroutine ( ) : void
리턴 void

RunOnBackgroundThread() 보호된 메소드

protected RunOnBackgroundThread ( ) : void
리턴 void

RunOnCurrentThread() 보호된 메소드

protected RunOnCurrentThread ( ) : void
리턴 void

RunOnMainThread() 보호된 메소드

protected RunOnMainThread ( ) : void
리턴 void

Start() 공개 메소드

Executes the task
public Start ( ) : void
리턴 void

UnityTask() 공개 메소드

Creates a new background task
public UnityTask ( System.Action action ) : System
action System.Action
리턴 System

UnityTask() 공개 메소드

Creates a new Task
public UnityTask ( System.Action action, TaskStrategy mode ) : System
action System.Action
mode TaskStrategy
리턴 System

UnityTask() 공개 메소드

Creates a new Task in a Faulted state
public UnityTask ( Exception ex ) : System
ex System.Exception
리턴 System

UnityTask() 공개 메소드

Creates a new Coroutine Task
public UnityTask ( IEnumerator action ) : System
action IEnumerator
리턴 System

UnityTask() 공개 메소드

Creates a new task
public UnityTask ( TaskStrategy mode ) : System
mode TaskStrategy
리턴 System

프로퍼티 상세

DisableMultiThread 공개적으로 정적으로 프로퍼티

Forces use of a single thread for debugging
public static bool DisableMultiThread
리턴 bool

LogErrors 공개적으로 정적으로 프로퍼티

Logs Exceptions
public static bool LogErrors
리턴 bool

Strategy 공개적으로 프로퍼티

Run execution path
public TaskStrategy Strategy
리턴 TaskStrategy

_action 보호되어 있는 프로퍼티

protected Action,System _action
리턴 System.Action

_routine 보호되어 있는 프로퍼티

protected IEnumerator _routine
리턴 IEnumerator

_status 보호되어 있는 프로퍼티

protected TaskStatus _status
리턴 TaskStatus