if (typeDef.IsDelegate) {
// AOT's handling of delegates is very different from the IL/metadata picture
// So to simplify this, we're going to automatically "mark" all of the delegate's methods
- foreach (MethodDesc m in typeDef.GetMethods()) {
- if (ShouldIncludeEntityByDisplayName(m)) {
+ foreach (MethodDesc m in typeDef.GetMethods ()) {
+ if (ShouldIncludeEntityByDisplayName (m)) {
AddMember (m);
}
}
}
object? keptBy = ca.GetPropertyValue (nameof (KeptAttribute.By));
- return keptBy is null ? true : ((ProducedBy) keptBy).HasFlag (ProducedBy.NativeAot);
+ return keptBy is null ? true : ((Tool) keptBy).HasFlag (Tool.NativeAot);
});
}
}
object? keptBy = ca.GetPropertyValue (nameof (KeptAttribute.By));
- return keptBy is null ? true : ((ProducedBy) keptBy).HasFlag (ProducedBy.NativeAot);
+ return keptBy is null ? true : ((Tool) keptBy).HasFlag (Tool.NativeAot);
});
}
private static bool IsProducedByNativeAOT (CustomAttribute attr)
{
var producedBy = attr.GetPropertyValue ("ProducedBy");
- return producedBy is null ? true : ((ProducedBy) producedBy).HasFlag (ProducedBy.NativeAot);
+ return producedBy is null ? true : ((Tool) producedBy).HasFlag (Tool.NativeAot);
}
private static IEnumerable<ICustomAttributeProvider> GetAttributeProviders (AssemblyDefinition assembly)
var actualOriginToken = new AssemblyQualifiedToken (origin.Value.MemberDefinition);
var expectedOriginToken = new AssemblyQualifiedToken (expectedOriginMember);
- if (actualOriginToken.Equals(expectedOriginToken))
+ if (actualOriginToken.Equals (expectedOriginToken))
return true;
var actualMember = origin.Value.MemberDefinition;
private static bool IsIgnoredByNativeAOT (CustomAttribute attr)
{
var ignoredBy = attr.GetPropertyValue ("IgnoredBy");
- return ignoredBy is null ? true : ((ProducedBy) ignoredBy).HasFlag (ProducedBy.NativeAot);
+ return ignoredBy is null ? true : ((Tool) ignoredBy).HasFlag (Tool.NativeAot);
}
- public virtual bool IsIgnored ([NotNullWhen(true)] out string? reason)
+ public virtual bool IsIgnored ([NotNullWhen (true)] out string? reason)
{
var ignoreAttribute = _testCaseTypeDefinition.CustomAttributes.FirstOrDefault (attr => attr.AttributeType.Name == nameof (IgnoreTestCaseAttribute));
- if (ignoreAttribute != null && IsIgnoredByNativeAOT(ignoreAttribute)) {
+ if (ignoreAttribute != null && IsIgnoredByNativeAOT (ignoreAttribute)) {
if (ignoreAttribute.ConstructorArguments.Count == 1) {
reason = (string) ignoreAttribute.ConstructorArguments.First ().Value;
return true;
[KeptMember (".ctor()")]
private abstract class AbstractMethods
{
- [Kept (By = ProducedBy.Trimmer)] // NativeAOT test infra doesn't check reflection-only methods (without entry point) yet
+ [Kept (By = Tool.Trimmer)] // NativeAOT test infra doesn't check reflection-only methods (without entry point) yet
[DynamicDependency (nameof (TargetMethod))]
public abstract void SourceAbstractViaReflection ();