static void TestDataFlowPropagation( [KeptAttributeAttribute(typeof(DynamicallyAccessedMembersAttribute))] [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type typeWithPublicMethods = null) { var typeDelegator = new System.Reflection.TypeDelegator(typeWithPublicMethods); typeDelegator.RequiresPublicMethods(); // Should not warn typeDelegator.RequiresPublicFields(); // Should warn }