// NOTE: May be called on invalid definitions public override bool FieldAlwaysUsed(CST.AssemblyDef assemblyDef, CST.TypeDef typeDef, CST.FieldDef fieldDef) { #if false if (env.AttributeHelper.FieldHasAttribute(assemblyDef, typeDef, fieldDef, env.Global.CompilerGeneratedAttributeRef, false)) { return(false); } #endif if (env.AttributeHelper.FieldHasAttribute(assemblyDef, typeDef, fieldDef, env.AttributeHelper.IgnoreAttributeRef, true, true)) { return(false); } if (HasFullReflection(assemblyDef, typeDef)) { return(true); } var isUsed = default(bool); env.AttributeHelper.GetValueFromField(assemblyDef, typeDef, fieldDef, env.AttributeHelper.UsedAttributeRef, env.AttributeHelper.TheIsUsedProperty, true, false, ref isUsed); if (isUsed) { return(true); } return(false); }
public abstract bool FieldAlwaysUsed(AssemblyDef assemblyDef, TypeDef typeDef, FieldDef fieldDef);
public string ResolveFieldDefToSlot(CST.AssemblyDef assemblyDef, CST.TypeDef typeDef, CST.FieldDef fieldDef) { return(TypeMappingFor(assemblyDef, typeDef).ResolveFieldToSlot (fieldDef.QualifiedMemberName(env.Global, assemblyDef, typeDef))); }