Пример #1
0
 public StepInfo(IStepNameInfo name, int number, int total, string groupPrefix)
 {
     Name        = name;
     Number      = number;
     Total       = total;
     GroupPrefix = groupPrefix;
 }
Пример #2
0
 public StepInfo(IMetadataInfo parent, IStepNameInfo name, int number, int total, string groupPrefix)
 {
     Parent      = parent;
     Name        = name;
     Number      = number;
     Total       = total;
     GroupPrefix = groupPrefix;
 }
Пример #3
0
 public static StepNameInfo WithUpdatedParameters(IStepNameInfo nameInfo, INameParameterInfo[] parameters)
 {
     if (nameInfo.Parameters.Count() != parameters.Length)
     {
         throw new ArgumentException("StepNameInfo cannot be updated with different number of parameters");
     }
     return(new StepNameInfo(nameInfo.StepTypeName, nameInfo.NameFormat, parameters));
 }
Пример #4
0
        private static XElement ToXElement(IStepNameInfo stepName)
        {
            var objects = new List <object>();

            if (stepName.StepTypeName != null)
            {
                objects.Add(new XAttribute("StepType", stepName.StepTypeName.Name));
            }
            objects.Add(new XAttribute("Format", stepName.NameFormat));
            objects.Add(stepName.Parameters.Select(ToXElement).Cast <object>().ToArray());

            return(new XElement("StepName", objects));
        }
Пример #5
0
 public void UpdateName(INameParameterInfo[] parameters)
 {
     Name = StepNameInfo.WithUpdatedParameters(Name, parameters);
 }
Пример #6
0
 public StepInfo(IStepNameInfo name, int number, int total)
 {
     Name   = name;
     Number = number;
     Total  = total;
 }