Example #1
0
        /// <inheritdoc cref="AbstractCommand.Execute" />
        public override ServerResponse Execute
        (
            ClientQuery query
        )
        {
            ServerResponse result = base.Execute(query);

            // Check whether no records read
            if (result.GetReturnCode() != -201)
            {
                MarcRecord record = new MarcRecord
                {
                    HostName = Connection.Host,
                    Database = Database
                };

                record = ProtocolText.ParseResponseForReadRecord
                         (
                    result,
                    record
                         );
                record.Verify(ThrowOnVerify);

                if (ThrowOnEmptyRecord)
                {
                    IrbisNetworkUtility.ThrowIfEmptyRecord
                    (
                        record,
                        result
                    );
                }

                Record = record;
            }

            return(result);
        }
Example #2
0
        public void MarcRecord_Verify_1()
        {
            MarcRecord record = _GetRecord();

            Assert.IsTrue(record.Verify(false));
        }