bool IAdvice.RequiresWeave(WeavingContext context)
        {
            ITypeSignature addressType = context.StackTypeStatus.GetAt(1);

            bool weave = context.Method.DeclaringType != this.wrapperType &&
                         this.methods.ContainsKey(context.JoinPoint.Instruction.OpCodeNumber) &&
                         !((PointerTypeSignature)addressType.GetNakedType()).IsManaged;

            Console.WriteLine("method={0}, instruction={1}, address={2}, weave={3}", context.Method, context.JoinPoint.Instruction, addressType, weave);

            return(weave);
        }
        private void EmitEqualsField(InstructionWriter writer, CreatedEmptyMethod methodBody,
                                     FieldDefDeclaration field)
        {
            ITypeSignature fieldType = field.FieldType;

            if ((fieldType.GetNakedType() is IntrinsicTypeSignature sig &&
                 sig.IntrinsicType != IntrinsicType.Object &&
                 sig.IntrinsicType != IntrinsicType.String
                 ) || fieldType.IsEnum())
            {
                this.EmitSimpleValueCheck(writer, methodBody, field);
            }