Exemple #1
0
        static bool TryEvaluateExpression(
            ActivityWithResult element,
            LocationReferenceEnvironment locationReferenceEnvironment,
            CodeActivityContext context,
            out object result)
        {
            // value is some expression type and needs to be opened
            context.Reinitialize(context.CurrentInstance, context.CurrentExecutor, element, context.CurrentInstance.InternalId);
            if (element != null && !element.IsRuntimeReady)
            {
                WorkflowInspectionServices.CacheMetadata(element, locationReferenceEnvironment);
            }

            if (element == null || !element.IsFastPath)
            {
                result = SR.DebugInfoNotSkipArgumentResolution;
                return(false);
            }

            result = element.InternalExecuteInResolutionContextUntyped(context);
            return(true);
        }
        static bool TryEvaluateExpression(
            ActivityWithResult element,
            LocationReferenceEnvironment locationReferenceEnvironment,
            CodeActivityContext context,
            out object result)
        {
            // value is some expression type and needs to be opened
            context.Reinitialize(context.CurrentInstance, context.CurrentExecutor, element, context.CurrentInstance.InternalId);
            if (element != null && !element.IsRuntimeReady)
            {
                WorkflowInspectionServices.CacheMetadata(element, locationReferenceEnvironment);
            }

            if (element == null || !element.IsFastPath)
            {
                result = SR.DebugInfoNotSkipArgumentResolution;
                return false;
            }

            result = element.InternalExecuteInResolutionContextUntyped(context);
            return true;
        }