public static bool RequiresAsync(InstanceSource source, InstanceSourcesScope containerScope)
        {
            var visitor = new RequiresAsyncVisitor(containerScope);

            visitor.VisitCore(source, new State {
                InstanceSourcesScope = containerScope
            });
            return(visitor._requiresAsync);
        }
        public static bool RequiresUnsafe(ITypeSymbol target, InstanceSourcesScope containerScope)
        {
            var visitor = new RequiresUnsafeVisitor(containerScope);
            var state   = new State {
                InstanceSourcesScope = containerScope
            };

            visitor.VisitCore(visitor.GetInstanceSource(target, state, parameterSymbol: null), state);
            return(visitor._requiresUnsafe);
        }
 private RequiresAsyncVisitor(InstanceSourcesScope containerScope) : base(containerScope)
 {
 }