private static MethodToExecuteInfo GetMethodToExecuteInfo(IEnumerable<ParameterDefinitionWithValue> parameters, ActionDefinitionForActivity action)
        {
            var inputParameters = new List<MethodParameterInfo>(action.InputParameters.Count());
            var outputParameters = new List<MethodParameterInfo>(action.OutputParameters.Count());
            var method = new MethodToExecuteInfo
                             {
                                 Type = action.Type.AssemblyQualifiedName,
                                 MethodName = action.MethodName,
                                 Order = action.Order,
                                 ActionName = action.Name
                             };

            inputParameters.AddRange(
                action.InputParameters.Select(
                    inParameter =>
                    new MethodParameterInfo
                        {
                            Order = inParameter.Order,
                            Name = inParameter.Name,
                            Type = inParameter.Type,
                            //TODO -  	反序列化
                            DefaultValue = inParameter.SerializedDefaultValue
                        }));

            outputParameters.AddRange(
                action.OutputParameters.Select(
                    outParameter =>
                    new MethodParameterInfo
                        {
                            Order = outParameter.Order,
                            Name = outParameter.Name,
                            Type = outParameter.Type
                        }));
            method.InputParameters = inputParameters.ToArray();
            method.OutputParameters = outputParameters.ToArray();
            return method;
        }
Beispiel #2
0
 public void AddPreExecutionAction(ActionDefinitionForActivity action)
 {
     PreExecutionImplemementation.Add(action);
 }
Beispiel #3
0
 public void AddPreExecutionAction(ActionDefinitionForActivity action)
 {
     PreExecutionImplemementation.Add(action);
 }
Beispiel #4
0
 public void AddAction(ActionDefinitionForActivity action)
 {
     Implemementation.Add(action);
 }
Beispiel #5
0
 public void AddAction(ActionDefinitionForActivity action)
 {
     Implemementation.Add(action);
 }