AwaitableCoroutine.ThrowHelper.InvalidOp C# (CSharp) Méthode

InvalidOp() public static méthode

public static InvalidOp ( string message ) : void
message string
Résultat void
        public static void InvalidOp(string message) => throw new InvalidOperationException(message);
    }

Usage Example

Exemple #1
0
        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);
        }
All Usage Examples Of AwaitableCoroutine.ThrowHelper::InvalidOp