Exemple #1
0
            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);
            }
Exemple #2
0
            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;
                }
            }
Exemple #3
0
 private static MatchContext MatchGetter(MethodInfo method)
 {
     return(ILPattern.Match(method, GetterPattern));
 }