Example #1
0
 public ForAggregateCommand(string aggregateName)
 {
     if (!ForAggregateCommand.IsValidAggregateName(aggregateName))
     {
         throw new ArgumentException(aggregateName + @" is not a valid aggregate name ", nameof(aggregateName));
     }
     m_aggregateName = aggregateName;
 }
Example #2
0
 public static bool IsValidForAggregateCommand(string commandLine)
 {
     if (!string.IsNullOrWhiteSpace(commandLine))
     {
         string[] commandParts = commandLine.Split(' ');
         if (commandParts != null)
         {
             if (commandParts.GetLength(0) >= 2)
             {
                 // Is this a USING command?
                 if (commandParts[0].Equals(CommandLineParser.COMMAND_FOR, StringComparison.OrdinalIgnoreCase))
                 {
                     // Is there a valid aggregate name?
                     return(ForAggregateCommand.IsValidAggregateName(commandParts[1]));
                 }
             }
         }
     }
     return(false);
 }