コード例 #1
0
        protected override MethodDef?CreateMethodDef(MethodInfo methodInfo, IInvocation initialInvocation)
        {
            ValidateType(initialInvocation.TargetType);

            var options = ComputedOptionsProvider.GetComputedOptions(methodInfo);

            if (options == null)
            {
                return(null);
            }

            var methodDef = (ComputeMethodDef)Services.Activate(
                options.ComputeMethodDefType, this, methodInfo);

            return(methodDef.IsValid ? methodDef : null);
        }