public bool CanExecuteExpression(string expressionText, bool isReference, System.Collections.Generic.IList <System.Activities.LocationReference> locations, out int expressionId)
 {
     if (((isReference == false) &&
          ((expressionText == "DynamicVal") &&
           (InitializeDynamicValue_TypedDataContext2_ForReadOnly.Validate(locations, true, 0) == true))))
     {
         expressionId = 0;
         return(true);
     }
     if (((isReference == true) &&
          ((expressionText == "IsEmpty") &&
           (InitializeDynamicValue_TypedDataContext2.Validate(locations, true, 0) == true))))
     {
         expressionId = 1;
         return(true);
     }
     if (((isReference == false) &&
          ((expressionText == "IsEmpty") &&
           (InitializeDynamicValue_TypedDataContext2_ForReadOnly.Validate(locations, true, 0) == true))))
     {
         expressionId = 2;
         return(true);
     }
     if (((isReference == true) &&
          ((expressionText == "DynamicVal") &&
           (InitializeDynamicValue_TypedDataContext2.Validate(locations, true, 0) == true))))
     {
         expressionId = 3;
         return(true);
     }
     expressionId = -1;
     return(false);
 }
 public object InvokeExpression(int expressionId, System.Collections.Generic.IList <System.Activities.Location> locations)
 {
     if ((this.rootActivity == null))
     {
         this.rootActivity = this;
     }
     if ((expressionId == 0))
     {
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext0 = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, true);
         return(valDataContext0.ValueType___Expr0Get());
     }
     if ((expressionId == 1))
     {
         InitializeDynamicValue_TypedDataContext2 refDataContext1 = new InitializeDynamicValue_TypedDataContext2(locations, true);
         return(refDataContext1.GetLocation <bool>(refDataContext1.ValueType___Expr1Get, refDataContext1.ValueType___Expr1Set));
     }
     if ((expressionId == 2))
     {
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext2 = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, true);
         return(valDataContext2.ValueType___Expr2Get());
     }
     if ((expressionId == 3))
     {
         InitializeDynamicValue_TypedDataContext2 refDataContext3 = new InitializeDynamicValue_TypedDataContext2(locations, true);
         return(refDataContext3.GetLocation <Microsoft.Activities.DynamicValue>(refDataContext3.ValueType___Expr3Get, refDataContext3.ValueType___Expr3Set));
     }
     return(null);
 }
 public object InvokeExpression(int expressionId, System.Collections.Generic.IList <System.Activities.LocationReference> locations, System.Activities.ActivityContext activityContext)
 {
     if ((this.rootActivity == null))
     {
         this.rootActivity = this;
     }
     if ((this.dataContextActivities == null))
     {
         this.dataContextActivities = InitializeDynamicValue_TypedDataContext2_ForReadOnly.GetDataContextActivitiesHelper(this.rootActivity, this.forImplementation);
     }
     if ((expressionId == 0))
     {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[0] == null))
         {
             cachedCompiledDataContext[0] = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext0 = ((InitializeDynamicValue_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[0]));
         return(valDataContext0.ValueType___Expr0Get());
     }
     if ((expressionId == 1))
     {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[1] == null))
         {
             cachedCompiledDataContext[1] = new InitializeDynamicValue_TypedDataContext2(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2 refDataContext1 = ((InitializeDynamicValue_TypedDataContext2)(cachedCompiledDataContext[1]));
         return(refDataContext1.GetLocation <bool>(refDataContext1.ValueType___Expr1Get, refDataContext1.ValueType___Expr1Set, expressionId, this.rootActivity, activityContext));
     }
     if ((expressionId == 2))
     {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[0] == null))
         {
             cachedCompiledDataContext[0] = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext2 = ((InitializeDynamicValue_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[0]));
         return(valDataContext2.ValueType___Expr2Get());
     }
     if ((expressionId == 3))
     {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[1] == null))
         {
             cachedCompiledDataContext[1] = new InitializeDynamicValue_TypedDataContext2(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2 refDataContext3 = ((InitializeDynamicValue_TypedDataContext2)(cachedCompiledDataContext[1]));
         return(refDataContext3.GetLocation <Microsoft.Activities.DynamicValue>(refDataContext3.ValueType___Expr3Get, refDataContext3.ValueType___Expr3Set, expressionId, this.rootActivity, activityContext));
     }
     return(null);
 }
 public object InvokeExpression(int expressionId, System.Collections.Generic.IList<System.Activities.LocationReference> locations, System.Activities.ActivityContext activityContext) {
     if ((this.rootActivity == null)) {
         this.rootActivity = this;
     }
     if ((this.dataContextActivities == null)) {
         this.dataContextActivities = InitializeDynamicValue_TypedDataContext2_ForReadOnly.GetDataContextActivitiesHelper(this.rootActivity, this.forImplementation);
     }
     if ((expressionId == 0)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[0] == null)) {
             cachedCompiledDataContext[0] = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext0 = ((InitializeDynamicValue_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[0]));
         return valDataContext0.ValueType___Expr0Get();
     }
     if ((expressionId == 1)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new InitializeDynamicValue_TypedDataContext2(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2 refDataContext1 = ((InitializeDynamicValue_TypedDataContext2)(cachedCompiledDataContext[1]));
         return refDataContext1.GetLocation<bool>(refDataContext1.ValueType___Expr1Get, refDataContext1.ValueType___Expr1Set, expressionId, this.rootActivity, activityContext);
     }
     if ((expressionId == 2)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[0] == null)) {
             cachedCompiledDataContext[0] = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext2 = ((InitializeDynamicValue_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[0]));
         return valDataContext2.ValueType___Expr2Get();
     }
     if ((expressionId == 3)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = InitializeDynamicValue_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 2);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new InitializeDynamicValue_TypedDataContext2(locations, activityContext, true);
         }
         InitializeDynamicValue_TypedDataContext2 refDataContext3 = ((InitializeDynamicValue_TypedDataContext2)(cachedCompiledDataContext[1]));
         return refDataContext3.GetLocation<Microsoft.Activities.DynamicValue>(refDataContext3.ValueType___Expr3Get, refDataContext3.ValueType___Expr3Set, expressionId, this.rootActivity, activityContext);
     }
     return null;
 }
 public object InvokeExpression(int expressionId, System.Collections.Generic.IList<System.Activities.Location> locations) {
     if ((this.rootActivity == null)) {
         this.rootActivity = this;
     }
     if ((expressionId == 0)) {
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext0 = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext0.ValueType___Expr0Get();
     }
     if ((expressionId == 1)) {
         InitializeDynamicValue_TypedDataContext2 refDataContext1 = new InitializeDynamicValue_TypedDataContext2(locations, true);
         return refDataContext1.GetLocation<bool>(refDataContext1.ValueType___Expr1Get, refDataContext1.ValueType___Expr1Set);
     }
     if ((expressionId == 2)) {
         InitializeDynamicValue_TypedDataContext2_ForReadOnly valDataContext2 = new InitializeDynamicValue_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext2.ValueType___Expr2Get();
     }
     if ((expressionId == 3)) {
         InitializeDynamicValue_TypedDataContext2 refDataContext3 = new InitializeDynamicValue_TypedDataContext2(locations, true);
         return refDataContext3.GetLocation<Microsoft.Activities.DynamicValue>(refDataContext3.ValueType___Expr3Get, refDataContext3.ValueType___Expr3Set);
     }
     return null;
 }