// _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ // Constructor // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /// <summary> /// コンストラクタ /// </summary> /// <param name="colorSet">[NotNull] カラーセット</param> /// <param name="sentence">[NotNull] コマンド文</param> /// <exception cref="ArgumentNullException">colorSet, sentence が null の場合</exception> public EventCommandSentenceInfo(EventCommandColorSet colorSet, EventCommandSentence sentence) { if (colorSet is null) { throw new ArgumentNullException( ErrorMessage.NotNull(nameof(colorSet))); } if (sentence is null) { throw new ArgumentNullException( ErrorMessage.NotNull(nameof(sentence))); } ColorSet = colorSet; Sentence = sentence; }
protected EventCommandSentenceInfo(SerializationInfo info, StreamingContext context) { ColorSet = EventCommandColorSet.FromId(info.GetValue <string>(nameof(ColorSet))); Sentence = info.GetValue <EventCommandSentence>(nameof(Sentence)); }