Пример #1
0
        private static bool TypeMustBeObserved(ITypeSymbol type, IMethodSymbol?method, Compilation compilation)
        {
            if (method?.IsContinueWith(compilation) == true)
            {
                // Task.ContinueWith is a bit special.
                return(false);
            }

            return(type.EnumerateBaseTypesAndSelf().Any(t => IsObservableType(t, method, compilation)));
        }
Пример #2
0
 private static bool IsException(ITypeSymbol type, Compilation compilation)
 {
     return(type.EnumerateBaseTypesAndSelf().Any(t => t.IsClrType(compilation, typeof(Exception))));
 }