protected override void GetDependenciesDueToMethodCodePresenceInternal(ref DependencyList dependencies, NodeFactory factory, MethodDesc method) { bool scanReflection = (_generationOptions & UsageBasedMetadataGenerationOptions.ReflectionILScanning) != 0; bool scanInterop = (_generationOptions & UsageBasedMetadataGenerationOptions.IteropILScanning) != 0; // NOTE: we will intentionally run the scanner even if both scan modes are disabled // because we rely on the scanner to report constructed EETypes for LDTOKEN references // to types. ReflectionMethodBodyScanner.ScanModes modes = 0; if (scanReflection) { modes |= ReflectionMethodBodyScanner.ScanModes.Reflection; } if (scanInterop) { modes |= ReflectionMethodBodyScanner.ScanModes.Interop; } MethodIL methodIL = _ilProvider.GetMethodIL(method); if (methodIL != null) { try { ReflectionMethodBodyScanner.Scan(ref dependencies, factory, methodIL, modes); } catch (TypeSystemException) { // A problem with the IL - we just don't scan it... } } }
protected override void GetDependenciesDueToMethodCodePresenceInternal(ref DependencyList dependencies, NodeFactory factory, MethodDesc method) { if ((_generationOptions & UsageBasedMetadataGenerationOptions.ILScanning) != 0) { MethodIL methodIL = _ilProvider.GetMethodIL(method); if (methodIL != null) { try { ReflectionMethodBodyScanner.Scan(ref dependencies, factory, methodIL); } catch (TypeSystemException) { // A problem with the IL - we just don't scan it... } } } }
protected override void GetDependenciesDueToMethodCodePresence(ref DependencyNodeCore <NodeFactory> .DependencyList dependencies, NodeFactory factory, MethodDesc method) { if (_ilProvider != null) { MethodIL methodIL = _ilProvider.GetMethodIL(method); if (methodIL != null) { try { ReflectionMethodBodyScanner.ScanMarshalOnly(ref dependencies, factory, methodIL); } catch (TypeSystemException) { // A problem with the IL - we just don't scan it... } } } }
public HandleCallAction( LinkContext context, ReflectionMethodBodyScanner reflectionMethodBodyScanner, in ReflectionMethodBodyScanner.AnalysisContext analysisContext,
public RequireDynamicallyAccessedMembersAction( LinkContext context, ReflectionMethodBodyScanner reflectionMethodBodyScanner, in ReflectionMethodBodyScanner.AnalysisContext analysisContext)