private void ReadCharaMoveCommand(BinaryReadStatus readStatus,
                                          ICollection <ICharaMoveCommand> commandList)
        {
            // 動作指定コード
            var charaMoveCode = readStatus.ReadByte();
            CharaMoveCommandCode commandCode;

            try
            {
                commandCode = CharaMoveCommandCode.FromByte(charaMoveCode);
            }
            catch
            {
                throw new InvalidOperationException(
                          $"存在しない動作指定コマンドコードが読み込まれました。" +
                          $"(コマンドコード値:{charaMoveCode}, offset:{readStatus.Offset}");
            }

            var charaMoveCommand = CharaMoveCommandFactory.CreateRaw(commandCode);

            readStatus.IncreaseByteOffset();

            // 変数の数
            var varLength = readStatus.ReadByte();

            readStatus.IncreaseByteOffset();

            // 変数
            for (var i = 0; i < varLength; i++)
            {
                var value = readStatus.ReadInt();
                charaMoveCommand.SetNumberValue(i, value);
                readStatus.IncreaseIntOffset();
            }

            // 終端コードチェック
            foreach (var b in CharaMoveCommandBase.EndBlockCode)
            {
                if (readStatus.ReadByte() != b)
                {
                    throw new InvalidOperationException(
                              $"動作指定コマンド末尾の値が異なります。(offset: {readStatus.Offset})");
                }

                readStatus.IncreaseByteOffset();
            }

            // 結果
            commandList.Add(charaMoveCommand);
        }
        public static void CreateRawTest(CharaMoveCommandCode code)
        {
            bool result;
            ICharaMoveCommand instance = null;

            try
            {
                instance = Factory.CreateRaw(code);
                result   = true;
            }
            catch (Exception ex)
            {
                logger.Exception(ex);
                result = false;
            }

            Assert.IsTrue(result);
            Assert.AreEqual(instance.CommandCode, code);
        }
        /// <summary>
        /// 動作指定コマンド
        /// </summary>
        /// <param name="status">読み込み経過状態</param>
        /// <param name="commandList">データ格納先</param>
        /// <exception cref="InvalidOperationException">ファイル仕様が異なる場合</exception>
        private void ReadCharaMoveCommand(FileReadStatus status, ICollection <ICharaMoveCommand> commandList)
        {
            // 動作指定コード
            var charaMoveCode = status.ReadByte();
            CharaMoveCommandCode commandCode;

            try
            {
                commandCode = CharaMoveCommandCode.FromByte(charaMoveCode);
            }
            catch
            {
                throw new InvalidOperationException(
                          $"存在しない動作指定コマンドコードが読み込まれました。" +
                          $"(コマンドコード値:{charaMoveCode}, offset:{status.Offset}");
            }

            var charaMoveCommand = CharaMoveCommandFactory.CreateRaw(commandCode);

            status.IncreaseByteOffset();

            Logger.Debug(FileIOMessage.SuccessRead(typeof(EventCommandListReader),
                                                   "動作指定コード", charaMoveCode));

            // 変数の数
            var varLength = status.ReadByte();

            status.IncreaseByteOffset();

            Logger.Debug(FileIOMessage.SuccessRead(typeof(EventCommandListReader),
                                                   "変数の数", charaMoveCode));

            // 変数
            for (var i = 0; i < varLength; i++)
            {
                var value = status.ReadInt();
                charaMoveCommand.SetNumberValue(i, value);
                status.IncreaseIntOffset();

                Logger.Debug(FileIOMessage.SuccessRead(typeof(EventCommandListReader),
                                                       $"変数{i}", value));
            }

            // 終端コードチェック
            foreach (var b in CharaMoveCommandBase.EndBlockCode)
            {
                if (status.ReadByte() != b)
                {
                    throw new InvalidOperationException(
                              $"動作指定コマンド末尾の値が異なります。(offset: {status.Offset})");
                }

                status.IncreaseByteOffset();
            }

            Logger.Debug(FileIOMessage.CheckOk(typeof(EventCommandListReader),
                                               $"終端コード"));

            // 結果
            commandList.Add(charaMoveCommand);
        }