public static InvalidOp ( string message ) : void | ||
message | string | |
return | void |
public static void InvalidOp(string message) => throw new InvalidOperationException(message);
}
public static T OnUpdating <T>(this T coroutine, Action onUpdating) where T : AwaitableCoroutineBase { if (coroutine is null) { ThrowHelper.ArgNull(nameof(coroutine)); } if (onUpdating is null) { ThrowHelper.ArgNull(nameof(onUpdating)); } if (coroutine.IsCanceled) { ThrowHelper.InvalidOp("Coroutine is already canceled"); } if (coroutine.IsCompleted) { ThrowHelper.InvalidOp("Coroutine is already completed"); } coroutine.OnUpdating += onUpdating; return(coroutine); }