public static Variable CovertArgumentToVariable(DynamicActivityProperty prop) { Type varType = prop.Type; if (typeof(Argument).IsAssignableFrom(prop.Type)) { varType = prop.Type.GetGenericArguments().Single(); } return Variable.Create(prop.Name, varType, VariableModifiers.None); }
private static void CompileInputs(DynamicActivity activity, RuleSet ruleSet) { var settings = new VisualBasicSettings(); foreach (var input in ruleSet.Inputs) { var inProperty = new DynamicActivityProperty { Name = input.Key, Type = typeof(InArgument<>).MakeGenericType(input.Value) }; activity.Properties.Add(inProperty); settings.ImportReferences.Add(new VisualBasicImportReference { Assembly = input.Value.Assembly.GetName().Name, Import = input.Value.Namespace }); } VisualBasic.SetSettings(activity, settings); }
public DynamicActivityPropertyDescriptor(DynamicActivityProperty activityProperty, Type componentType) : base(activityProperty.Name, null) { this.activityProperty = activityProperty; this.componentType = componentType; }
private static bool IsActivityDelegate(DynamicActivityProperty instance) { return instance.Type == typeof(ActivityDelegate) || instance.Type.IsSubclassOf(typeof(ActivityDelegate)); }