35 references to TypePreserveMembers
illink (35)
Linker.Steps\MarkExportedTypesTargetStep.cs (1)
25
if (!context.Annotations.TryGetPreservedMembers (exportedType, out
TypePreserveMembers
members))
Linker.Steps\MarkStep.cs (6)
2732
if (Annotations.TryGetPreservedMembers (type, out
TypePreserveMembers
members)) {
2737
if ((members &
TypePreserveMembers
.Visible) != 0 && IsMethodVisible (m)) {
2742
if ((members &
TypePreserveMembers
.Internal) != 0 && IsMethodInternal (m)) {
2747
if ((members &
TypePreserveMembers
.Library) != 0) {
2758
if ((members &
TypePreserveMembers
.Visible) != 0 && IsFieldVisible (f)) {
2763
if ((members &
TypePreserveMembers
.Internal) != 0 && IsFieldInternal (f)) {
Linker.Steps\RootAssemblyInputStep.cs (17)
56
var
preserve_visible =
TypePreserveMembers
.Visible;
58
preserve_visible |=
TypePreserveMembers
.Internal;
64
var
preserve_library =
TypePreserveMembers
.Visible |
TypePreserveMembers
.Library;
66
preserve_library |=
TypePreserveMembers
.Internal;
117
void MarkAndPreserve (AssemblyDefinition assembly,
TypePreserveMembers
preserve)
128
void MarkAndPreserve (TypeDefinition type,
TypePreserveMembers
preserve)
130
TypePreserveMembers
preserve_anything = preserve;
131
if ((preserve &
TypePreserveMembers
.Visible) != 0 && !IsTypeVisible (type))
132
preserve_anything &= ~
TypePreserveMembers
.Visible;
134
if ((preserve &
TypePreserveMembers
.Internal) != 0 && IsTypePrivate (type))
135
preserve_anything &= ~
TypePreserveMembers
.Internal;
138
if ((preserve &
TypePreserveMembers
.Library) != 0 && type.IsInterface) {
146
case
TypePreserveMembers
.Library:
167
void MarkAndPreserve (AssemblyDefinition assembly, ExportedType type,
TypePreserveMembers
preserve)
Linker\Annotations.cs (11)
59
protected readonly Dictionary<TypeDefinition,
TypePreserveMembers
> preserved_type_members = new ();
60
protected readonly Dictionary<ExportedType,
TypePreserveMembers
> preserved_exportedtype_members = new ();
359
public void SetMembersPreserve (TypeDefinition type,
TypePreserveMembers
preserve)
361
if (preserved_type_members.TryGetValue (type, out
TypePreserveMembers
existing))
367
static
TypePreserveMembers
CombineMembers (
TypePreserveMembers
left,
TypePreserveMembers
right)
372
public void SetMembersPreserve (ExportedType type,
TypePreserveMembers
preserve)
374
if (preserved_exportedtype_members.TryGetValue (type, out
TypePreserveMembers
existing))
380
public bool TryGetPreservedMembers (TypeDefinition type, out
TypePreserveMembers
preserve)
385
public bool TryGetPreservedMembers (ExportedType type, out
TypePreserveMembers
preserve)