public override string ToString() { if (IsNullMove) { return("NULL_MOVE"); } return(!string.IsNullOrEmpty(SAN) ? SAN : $"{SourceIndex.ToSquareString()}->{DestinationIndex.ToSquareString()}"); }
public ParseCommandLineStatus ConstructCommandLineModel(string[] args) { try { if (args.GetLength(0) == 0 || args[0].CompareNoCase("/?")) { return(ParseCommandLineStatus.DisplayHelp); } if (args.GetLength(0) < 3) { throw new ArgumentException(@"URL, Source index pattern, and destination index settings are required parameters."); } Url = args[0]; for (var inc = 1; inc < args.GetLength(0); inc++) { ProcessCommandLineParamter(args[inc]); } if (SourceIndexPattern.IsNullOrEmpty()) { throw new ArgumentException(@"Source index pattern is a required parameter."); } if (DestinationIndex.IsNullOrEmpty() && !DestIsSource && !NoDestinationJustDelete) { throw new ArgumentException(@"Destination index settings are required parameter(s)."); } return(ParseCommandLineStatus.ExecuteProgram); } catch (Exception ex) { ErrorInfo.Add(ex.Message + Environment.NewLine + Environment.NewLine + @"Use /? to see help information about this program."); return(ParseCommandLineStatus.DisplayError); } }