Beispiel #1
0
        /// <summary>
        /// Determines whether the current method is asynchronous.
        /// </summary>
        /// <param name="input">The input.</param>
        /// <returns><see langword="true" /> if the method is asynchronous; otherwise, <see langword="false" />.</returns>
        public static bool IsAsyncCall(
            this IMethodInvocation input)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }

            return(typeof(Task).IsAssignableFrom(input.ResultType()));
        }