/// <inheritdoc cref="AbstractCommand.Execute"/> public override ServerResponse Execute ( ClientQuery clientQuery ) { Sure.NotNull(clientQuery, nameof(clientQuery)); ServerResponse result = base.Execute(clientQuery); result.GetReturnCode(); Found = result.RemainingUtfStrings() .ToArray(); return(result); }
private string[] _ReadRawRecords ( [NotNull] int[] mfnList ) { if (mfnList.Length == 0) { return(new string[0]); } if (mfnList.Length == 1) { return(new string[0]); // TODO FIXME! } List <object> arguments = new List <object> ( mfnList.Length + 3 ) { Database, IrbisFormat.All, mfnList.Length }; foreach (int mfn in mfnList) { arguments.Add(mfn); } UniversalCommand command = Connection.CommandFactory.GetUniversalCommand ( CommandCode.FormatRecord, arguments.ToArray() ); command.AcceptAnyResponse = true; ServerResponse response = Connection.ExecuteCommand(command); string[] result = response.RemainingUtfStrings() .Skip(1) .ToArray(); return(result); }
/// <inheritdoc cref="AbstractCommand.Execute"/> public override ServerResponse Execute ( ClientQuery query ) { ServerResponse result = base.Execute(query); // Check whether no records read if (result.GetReturnCode() != -201) { string[] lines = result .RemainingUtfStrings() .ToArray(); RawRecord = RawRecord.Parse(lines); RawRecord.Mfn = Mfn; RawRecord.Database = Database ?? Connection.Database; } return(result); }