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 = ReceiveStateT_TypedDataContext2.GetDataContextActivitiesHelper(this.rootActivity, this.forImplementation);
     }
     if ((expressionId == 0)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[0] == null)) {
             cachedCompiledDataContext[0] = new ReceiveStateT_TypedDataContext2(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2 refDataContext0 = ((ReceiveStateT_TypedDataContext2)(cachedCompiledDataContext[0]));
         return refDataContext0.GetLocation<string>(refDataContext0.ValueType___Expr0Get, refDataContext0.ValueType___Expr0Set, expressionId, this.rootActivity, activityContext);
     }
     if ((expressionId == 1)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[0] == null)) {
             cachedCompiledDataContext[0] = new ReceiveStateT_TypedDataContext2(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2 refDataContext1 = ((ReceiveStateT_TypedDataContext2)(cachedCompiledDataContext[0]));
         return refDataContext1.GetLocation<string>(refDataContext1.ValueType___Expr1Get, refDataContext1.ValueType___Expr1Set, expressionId, this.rootActivity, activityContext);
     }
     if ((expressionId == 2)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[0] == null)) {
             cachedCompiledDataContext[0] = new ReceiveStateT_TypedDataContext2(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2 refDataContext2 = ((ReceiveStateT_TypedDataContext2)(cachedCompiledDataContext[0]));
         return refDataContext2.GetLocation<string>(refDataContext2.ValueType___Expr2Get, refDataContext2.ValueType___Expr2Set, expressionId, this.rootActivity, activityContext);
     }
     if ((expressionId == 3)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext3 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext3.ValueType___Expr3Get();
     }
     if ((expressionId == 4)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[0] == null)) {
             cachedCompiledDataContext[0] = new ReceiveStateT_TypedDataContext2(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2 refDataContext4 = ((ReceiveStateT_TypedDataContext2)(cachedCompiledDataContext[0]));
         return refDataContext4.GetLocation<Microsoft.Activities.DynamicValue>(refDataContext4.ValueType___Expr4Get, refDataContext4.ValueType___Expr4Set, expressionId, this.rootActivity, activityContext);
     }
     if ((expressionId == 5)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext5 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext5.ValueType___Expr5Get();
     }
     if ((expressionId == 6)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext6 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext6.ValueType___Expr6Get();
     }
     if ((expressionId == 7)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext7 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext7.ValueType___Expr7Get();
     }
     if ((expressionId == 8)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext8 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext8.ValueType___Expr8Get();
     }
     if ((expressionId == 9)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext9 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext9.ValueType___Expr9Get();
     }
     if ((expressionId == 10)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext10 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext10.ValueType___Expr10Get();
     }
     if ((expressionId == 11)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext11 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext11.ValueType___Expr11Get();
     }
     if ((expressionId == 12)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[0] == null)) {
             cachedCompiledDataContext[0] = new ReceiveStateT_TypedDataContext2(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2 refDataContext12 = ((ReceiveStateT_TypedDataContext2)(cachedCompiledDataContext[0]));
         return refDataContext12.GetLocation<string>(refDataContext12.ValueType___Expr12Get, refDataContext12.ValueType___Expr12Set, expressionId, this.rootActivity, activityContext);
     }
     if ((expressionId == 13)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext13 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext13.ValueType___Expr13Get();
     }
     if ((expressionId == 14)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext14 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext14.ValueType___Expr14Get();
     }
     if ((expressionId == 15)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext2_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[1] == null)) {
             cachedCompiledDataContext[1] = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext15 = ((ReceiveStateT_TypedDataContext2_ForReadOnly)(cachedCompiledDataContext[1]));
         return valDataContext15.ValueType___Expr15Get();
     }
     if ((expressionId == 16)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext3_ForReadOnly.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[2] == null)) {
             cachedCompiledDataContext[2] = new ReceiveStateT_TypedDataContext3_ForReadOnly(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext3_ForReadOnly valDataContext16 = ((ReceiveStateT_TypedDataContext3_ForReadOnly)(cachedCompiledDataContext[2]));
         return valDataContext16.ValueType___Expr16Get();
     }
     if ((expressionId == 17)) {
         System.Activities.XamlIntegration.CompiledDataContext[] cachedCompiledDataContext = ReceiveStateT_TypedDataContext3.GetCompiledDataContextCacheHelper(this.dataContextActivities, activityContext, this.rootActivity, this.forImplementation, 4);
         if ((cachedCompiledDataContext[3] == null)) {
             cachedCompiledDataContext[3] = new ReceiveStateT_TypedDataContext3(locations, activityContext, true);
         }
         ReceiveStateT_TypedDataContext3 refDataContext17 = ((ReceiveStateT_TypedDataContext3)(cachedCompiledDataContext[3]));
         return refDataContext17.GetLocation<string>(refDataContext17.ValueType___Expr17Get, refDataContext17.ValueType___Expr17Set, 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)) {
         ReceiveStateT_TypedDataContext2 refDataContext0 = new ReceiveStateT_TypedDataContext2(locations, true);
         return refDataContext0.GetLocation<string>(refDataContext0.ValueType___Expr0Get, refDataContext0.ValueType___Expr0Set);
     }
     if ((expressionId == 1)) {
         ReceiveStateT_TypedDataContext2 refDataContext1 = new ReceiveStateT_TypedDataContext2(locations, true);
         return refDataContext1.GetLocation<string>(refDataContext1.ValueType___Expr1Get, refDataContext1.ValueType___Expr1Set);
     }
     if ((expressionId == 2)) {
         ReceiveStateT_TypedDataContext2 refDataContext2 = new ReceiveStateT_TypedDataContext2(locations, true);
         return refDataContext2.GetLocation<string>(refDataContext2.ValueType___Expr2Get, refDataContext2.ValueType___Expr2Set);
     }
     if ((expressionId == 3)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext3 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext3.ValueType___Expr3Get();
     }
     if ((expressionId == 4)) {
         ReceiveStateT_TypedDataContext2 refDataContext4 = new ReceiveStateT_TypedDataContext2(locations, true);
         return refDataContext4.GetLocation<Microsoft.Activities.DynamicValue>(refDataContext4.ValueType___Expr4Get, refDataContext4.ValueType___Expr4Set);
     }
     if ((expressionId == 5)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext5 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext5.ValueType___Expr5Get();
     }
     if ((expressionId == 6)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext6 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext6.ValueType___Expr6Get();
     }
     if ((expressionId == 7)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext7 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext7.ValueType___Expr7Get();
     }
     if ((expressionId == 8)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext8 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext8.ValueType___Expr8Get();
     }
     if ((expressionId == 9)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext9 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext9.ValueType___Expr9Get();
     }
     if ((expressionId == 10)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext10 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext10.ValueType___Expr10Get();
     }
     if ((expressionId == 11)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext11 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext11.ValueType___Expr11Get();
     }
     if ((expressionId == 12)) {
         ReceiveStateT_TypedDataContext2 refDataContext12 = new ReceiveStateT_TypedDataContext2(locations, true);
         return refDataContext12.GetLocation<string>(refDataContext12.ValueType___Expr12Get, refDataContext12.ValueType___Expr12Set);
     }
     if ((expressionId == 13)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext13 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext13.ValueType___Expr13Get();
     }
     if ((expressionId == 14)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext14 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext14.ValueType___Expr14Get();
     }
     if ((expressionId == 15)) {
         ReceiveStateT_TypedDataContext2_ForReadOnly valDataContext15 = new ReceiveStateT_TypedDataContext2_ForReadOnly(locations, true);
         return valDataContext15.ValueType___Expr15Get();
     }
     if ((expressionId == 16)) {
         ReceiveStateT_TypedDataContext3_ForReadOnly valDataContext16 = new ReceiveStateT_TypedDataContext3_ForReadOnly(locations, true);
         return valDataContext16.ValueType___Expr16Get();
     }
     if ((expressionId == 17)) {
         ReceiveStateT_TypedDataContext3 refDataContext17 = new ReceiveStateT_TypedDataContext3(locations, true);
         return refDataContext17.GetLocation<string>(refDataContext17.ValueType___Expr17Get, refDataContext17.ValueType___Expr17Set);
     }
     return null;
 }