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))); }
private static bool IsException(ITypeSymbol type, Compilation compilation) { return(type.EnumerateBaseTypesAndSelf().Any(t => t.IsClrType(compilation, typeof(Exception)))); }