internal override void Match(MatchContext context) { Pattern.Match(context); if (!context.IsMatch) { return; } var match = GetLastMatchingInstruction(context); var field = (FieldInfo)match.Operand; context.AddData(BackingFieldKey, field); }
public override void Match(MatchContext context) { pattern.Match(context); if (!context.IsMatch) { return; } var match = GetLastMatchingInstruction(context); var method = (MethodInfo)match.Operand; if (!IsActivateCall(method)) { context.IsMatch = false; } }
private static MatchContext MatchGetter(MethodInfo method) { return(ILPattern.Match(method, GetterPattern)); }