Exemplo n.º 1
0
        public static TypeFilter Configured(this TypeFilter typeFilter, bool aotSafe = true)
        {
            // We offer a bool to bypass AOT safety because of member *return type* filtering.
            // For instance, we want to allow methods that return an interface, even in AOT safe-mode,
            // because that method is guaranteed to be stubbable. However, we still want to restrict
            // methods *called* from an interface, because those can't be guaranteed stubbable.
            // https://support.ludiq.io/communities/5/topics/2458-aot-safe-mode-filters-return-types

            typeFilter = typeFilter.Clone();
            typeFilter.Configure(aotSafe);
            return(typeFilter);
        }
 public static TypeFilter Configured(this TypeFilter typeFilter)
 {
     typeFilter = typeFilter.Clone();
     return(typeFilter);
 }