Exemplo n.º 1
0
        public InterceptionProcessingData(InterceptionEntryModel entryModel, EngineConfiguration configuration)
        {
            this.BoundaryType         = BoundaryType.Entry;
            this.TargetInstance       = entryModel.TargetInstance;
            this.MethodArgs           = entryModel.MethodArgs;
            this.Method               = entryModel.Method;
            this.Configuration        = configuration;
            this.VerificationFailures = new List <VerificationFailure>();

            GetAttributesFromMethodBase(entryModel.Method);
        }
Exemplo n.º 2
0
        public EntryProcessingResult OnEntry(InterceptionEntryModel entryModel)
        {
            var procData  = new InterceptionProcessingData(entryModel, _configuration);
            var engineRes = _engineImp.RunEngine(procData);

            var returnVal = new EntryProcessingResult();

            if (engineRes.OverrideValue != null)
            {
                returnVal.BypassProxiedMethod      = true;
                returnVal.BypassProxiedMethodValue = engineRes.OverrideValue;
            }

            return(returnVal);
        }