protected void ExtractParameters(Context context, Step step) { object[] consumed = GetType().GetCustomAttributes(typeof(ConsumedAttribute), true); if (step.Parameters.Count != consumed.Length) throw new ExecutionInterruptedException("Wrong number of parameters"); if (consumed.Length == 0) return; foreach (Parameter parameter in step.Parameters.Values) parameter.Value = context.GetPublishedItem(parameter).Value; }