/// <summary>
 /// Initializes a new instance of the <see cref="NthChildModifier"/> class.
 /// </summary>
 public NthChildModifier(Object parameter)
 {
     if (parameter.IsNumeric())
     {
         Type = NthType.Specific;
         Index = Convert.ToInt32(parameter);
     }
     else if (parameter is String)
     {
         var type = (String)parameter;
         switch (type)
         {
             case "odd":
                 Type = NthType.Odd;
                 break;
             case "even":
                 Type = NthType.Even;
                 break;
             default:
                 throw new Exception(String.Format("Unrecognized parameter: {0}", type));
         }
     }
 }