public InvokeWhenReady ( Action | ||
action | Action | Action to invoke |
p | object | Parameter to pass to the action |
type | Action identifier | |
processNow | bool | /// If true, change processing begins now. /// If false, next regular parsing pass with process pending changes. /// |
return | void |
public void InvokeWhenReady(Action<object> action, object p, Type type, bool processNow = false) {
if (IsReady) {
action(p);
} else {
_actionsToInvokeOnReady[type] = new TreeReadyAction() { Action = action, Parameter = p };
if (processNow) {
TreeUpdateTask.ProcessPendingTextBufferChanges(async: true);
}
}
}