Ejemplo n.º 1
0
        // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
        //     Public Method
        // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

        /// <summary>
        /// 指定したコモンイベントのイベントコードリストを取得する。
        /// </summary>
        /// <returns>イベントコードリスト</returns>
        public IReadOnlyList <string> GetEventCodeStringList(CommonEventId commonEventId)
        {
            var       max = Count;
            const int min = 0;

            if (commonEventId < min || max < commonEventId)
            {
                throw new ArgumentOutOfRangeException(
                          ErrorMessage.OutOfRange(nameof(commonEventId), min, max, commonEventId));
            }

            var targetCommonEvent = this[commonEventId];

            return(targetCommonEvent.GetEventCodeStringList());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 指定したコモンイベントのイベントコマンド文字列情報を返す。
        /// </summary>
        /// <param name="commonEventId">[Range(0, Count - 1)] コモンイベントID</param>
        /// <param name="resolver">[NotNull] 名前解決クラスインスタンス</param>
        /// <param name="desc">[Nullable] 付加情報</param>
        /// <returns>イベントコマンド文字列情報リスト</returns>
        /// <exception cref="ArgumentOutOfRangeException">commonEventIdが指定範囲外の場合</exception>
        /// <exception cref="ArgumentNullException">
        ///     resolver または type が null の場合、
        ///     または必要なときに desc が null の場合
        /// </exception>
        public IReadOnlyList <EventCommandSentenceInfo> GetCommonEventEventCommandSentenceInfoList(
            CommonEventId commonEventId, EventCommandSentenceResolver resolver,
            EventCommandSentenceResolveDesc desc)
        {
            var       max = Count;
            const int min = 0;

            if (commonEventId < min || max < commonEventId)
            {
                throw new ArgumentOutOfRangeException(
                          ErrorMessage.OutOfRange(nameof(commonEventId), min, max, commonEventId));
            }

            var targetCommonEvent = this[commonEventId];

            return(targetCommonEvent.MakeEventCommandSentenceInfoList(resolver, desc));
        }