Beispiel #1
0
 private Location <TResult> GetValueCore(ActivityContext context)
 {
     if (this.locationFactory == null)
     {
         this.locationFactory = ExpressionUtilities.CreateLocationFactory <TResult>(this.expressionTree);
     }
     return(this.locationFactory.CreateLocation(context));
 }
Beispiel #2
0
 protected override Location <T> Execute(CodeActivityContext context)
 {
     if (_locationFactory == null)
     {
         _locationFactory = ExpressionUtilities.CreateLocationFactory <T>(_rewrittenTree);
     }
     return(_locationFactory.CreateLocation(context));
 }
Beispiel #3
0
 internal override bool TryGetValue(ActivityContext context, out Location <T> value)
 {
     if (this.locationFactory == null)
     {
         this.locationFactory = ExpressionUtilities.CreateLocationFactory <T>(this.rewrittenTree);
     }
     value = this.locationFactory.CreateLocation(context);
     return(true);
 }
 protected override Location <TResult> Execute(CodeActivityContext context)
 {
     if (expressionTree == null)
     {
         return((Location <TResult>)invoker.InvokeExpression(context));
     }
     if (locationFactory == null)
     {
         locationFactory = ExpressionUtilities.CreateLocationFactory <TResult>(this.expressionTree);
     }
     return(locationFactory.CreateLocation(context));
 }
Beispiel #5
0
        protected override Location <TResult> Execute(CodeActivityContext context)
        {
            if (!this.invoker.IsStaticallyCompiled)
            {
                if (this.expressionTree != null)
                {
                    if (this.locationFactory == null)
                    {
                        this.locationFactory = ExpressionUtilities.CreateLocationFactory <TResult>(this.expressionTree);
                    }

                    return(this.locationFactory.CreateLocation(context));
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return((Location <TResult>) this.invoker.InvokeExpression(context));
            }
        }