private static void ValidateGroup(Group group)
{
if (group.Name == null) throw new XmlDidNotPassValidationException("Group Name is missing.");
foreach (var command in group.Commands)
{
if (command.Source == null)
throw new XmlDidNotPassValidationException(string.Format("Command Source is missing in Group {0}.",
group.Name));
if (command.Destination == null)
{
log.DebugFormat(
"Destination missing from xml for group '{0}' and source '{1}'. Using Convention to derive destination",
group.Name, command.Source);
}
}
}