Microsoft\VisualBasic\Activities\VisualBasicHelper.cs (7)
252public static Expression<Func<ActivityContext, T>> Compile<T>(string expressionText, CodeActivityPublicEnvironmentAccessor publicAccessor, bool isLocationExpression)
407public Expression<Func<ActivityContext, T>> Compile<T>(CodeActivityPublicEnvironmentAccessor publicAccessor, bool isLocationReference = false)
415public Expression<Func<ActivityContext, T>> Compile<T>(LocationReferenceEnvironment environment)
425public Expression<Func<ActivityContext, T>> Compile<T>(LocationReferenceEnvironment environment, bool isLocationReference)
468return Expression.Lambda<Func<ActivityContext, T>>(finalBody,
576return Expression.Lambda<Func<ActivityContext, T>>(finalBody,
1295if (parameterExpression.Type == typeof(ActivityContext) && parameterExpression.Name == "context")
System\Activities\Expressions\ExpressionServices.cs (13)
29public static Activity<TResult> Convert<TResult>(Expression<Func<ActivityContext, TResult>> expression)
42public static bool TryConvert<TResult>(Expression<Func<ActivityContext, TResult>> expression, out Activity<TResult> result)
85if (TypeHelper.AreTypesCompatible(declaringType, typeof(Variable)) && calledMethod.Name == "Get" && parameters.Length == 1 && TypeHelper.AreTypesCompatible(parameters[0].ParameterType, typeof(ActivityContext)))
90&& calledMethod.Name == "Get" && parameters.Length == 1 && TypeHelper.AreTypesCompatible(parameters[0].ParameterType, typeof(ActivityContext)))
95&& calledMethod.Name == "Get" && parameters.Length == 1 && TypeHelper.AreTypesCompatible(parameters[0].ParameterType, typeof(ActivityContext)))
99else if (TypeHelper.AreTypesCompatible(declaringType, typeof(ActivityContext)) && calledMethod.Name == "GetValue" && parameters.Length == 1 &&
105else if (TypeHelper.AreTypesCompatible(declaringType, typeof(ActivityContext)) && calledMethod.Name == "GetValue" && parameters.Length == 1 &&
149public static Activity<Location<TResult>> ConvertReference<TResult>(Expression<Func<ActivityContext, TResult>> expression)
163public static bool TryConvertReference<TResult>(Expression<Func<ActivityContext, TResult>> expression, out Activity<Location<TResult>> result)
208if (TypeHelper.AreTypesCompatible(declaringType, typeof(Variable)) && calledMethod.Name == "Get" && parameters.Length == 1 && TypeHelper.AreTypesCompatible(parameters[0].ParameterType, typeof(ActivityContext)))
213&& calledMethod.Name == "Get" && parameters.Length == 1 && TypeHelper.AreTypesCompatible(parameters[0].ParameterType, typeof(ActivityContext)))
218&& calledMethod.Name == "Get" && parameters.Length == 1 && TypeHelper.AreTypesCompatible(parameters[0].ParameterType, typeof(ActivityContext)))
222else if (TypeHelper.AreTypesCompatible(declaringType, typeof(ActivityContext)) && calledMethod.Name == "GetValue" && parameters.Length == 1 &&
System\Activities\ExpressionUtilities.cs (33)
21public static ParameterExpression RuntimeContextParameter = Expression.Parameter(typeof(ActivityContext), "context");
34static Type activityContextType = typeof(ActivityContext);
42static MethodInfo activityContextGetValueGenericMethod = typeof(ActivityContext).GetMethod("GetValue", new Type[] { typeof(LocationReference) });
43static MethodInfo activityContextGetLocationGenericMethod = typeof(ActivityContext).GetMethod("GetLocation", new Type[] { typeof(LocationReference) });
44static MethodInfo locationReferenceGetLocationMethod = typeof(LocationReference).GetMethod("GetLocation", new Type[] { typeof(ActivityContext) });
45static MethodInfo argumentGetLocationMethod = typeof(Argument).GetMethod("GetLocation", new Type[] { typeof(ActivityContext) });
46static MethodInfo variableGetMethod = typeof(Variable).GetMethod("Get", new Type[] { typeof(ActivityContext) });
47static MethodInfo delegateArgumentGetMethod = typeof(DelegateArgument).GetMethod("Get", new Type[] { typeof(ActivityContext) });
254static Func<ActivityContext, T> Compile<T>(Expression objectExpression, ReadOnlyCollection<ParameterExpression> parametersCollection)
262Expression<Func<ActivityContext, T>> objectLambda = Expression.Lambda<Func<ActivityContext, T>>(objectExpression, parameters);
266static T Evaluate<T>(Expression objectExpression, ReadOnlyCollection<ParameterExpression> parametersCollection, ActivityContext context)
268Func<ActivityContext, T> objectFunc = Compile<T>(objectExpression, parametersCollection);
275Func<ActivityContext, T[]> arrayFunction;
276Func<ActivityContext, int> indexFunction;
287public override Location<T> CreateLocation(ActivityContext context)
337Func<ActivityContext, object> ownerFunction;
365public override Location<T> CreateLocation(ActivityContext context)
454Func<ActivityContext, Argument> argumentFunction;
461public override Location<T> CreateLocation(ActivityContext context)
471Func<ActivityContext, LocationReference> locationReferenceFunction;
478public override Location<T> CreateLocation(ActivityContext context)
490Func<ActivityContext, object>[] setItemArgumentFunctions;
491Func<ActivityContext, object> targetObjectFunction;
523this.setItemArgumentFunctions = new Func<ActivityContext, object>[callExpression.Arguments.Count];
537public override Location<T> CreateLocation(ActivityContext context)
657Func<ActivityContext, Array> arrayFunction;
658Func<ActivityContext, int>[] indexFunctions;
668this.indexFunctions = new Func<ActivityContext, int>[callExpression.Arguments.Count];
676public override Location<T> CreateLocation(ActivityContext context)
731Func<ActivityContext, object> ownerFunction;
761public override Location<T> CreateLocation(ActivityContext context)
1980typeof(Func<,>).MakeGenericType(typeof(ActivityContext), originalLambdaExpression.ReturnType),
System\Activities\XamlIntegration\CompiledDataContext.cs (6)
23protected CompiledDataContext(IList<LocationReference> locationReferences, ActivityContext activityContext)
78typeof(Func<,>).MakeGenericType(typeof(ActivityContext), lambdaExpression.ReturnType),
83public Location<T> GetLocation<T>(Func<T> getMethod, Action<T> setMethod, int expressionId, Activity compiledRootActivity, ActivityContext activityContext)
101protected static CompiledDataContext[] GetCompiledDataContextCache(object dataContextActivities, ActivityContext activityContext, Activity compiledRoot, bool forImplementation, int compiledDataContextCount)
139static ActivityInstance GetDataContextInstance(CompiledDataContextActivitiesCache dataContextActivities, ActivityContext activityContext, Activity compiledRoot)
179IList<Location> ConvertReferences(IList<LocationReference> locationReferences, ActivityContext activityContext)