/// <summary>
        /// LocalThreadStorageクラスのインスタンスを初期化
        /// </summary>
        /// <param name="cache">基になるキャッシュ情報</param>
        /// <param name="parser">データを解析するときに使用するパーサ</param>
        /// <param name="formatter">書き込み時に使用するフォーマッタ</param>
        /// <param name="enc">書き込み時に使用するエンコーダ</param>
        public LocalThreadStorage(Cache cache, ThreadParser parser, ThreadFormatter formatter, Encoding enc)
        {
            if (cache == null)
            {
                throw new ArgumentNullException("cache");
            }
            if (parser == null)
            {
                throw new ArgumentNullException("parser");
            }
            if (formatter == null)
            {
                throw new ArgumentNullException("formatter");
            }
            if (enc == null)
            {
                throw new ArgumentNullException("enc");
            }

            this.cache      = cache;
            this.dataParser = parser;
            this.formatter  = formatter;
            this.encoding   = enc;
            this.bufferSize = 4096;
            this.isOpen     = false;
        }
Пример #2
0
 public ThreadContext(UIDispatcher uiDispatcher, IClassificationFormatMap classificationFormatMap, ITextBlockContentInfoFactory textBlockContentInfoFactory, SearchMatcher searchMatcher, ThreadFormatter formatter)
 {
     UIDispatcher                  = uiDispatcher;
     ClassificationFormatMap       = classificationFormatMap;
     TextBlockContentInfoFactory   = textBlockContentInfoFactory;
     TextClassifierTextColorWriter = new DbgTextClassifierTextColorWriter();
     SearchMatcher                 = searchMatcher;
     ClassifiedTextWriter          = new ClassifiedTextWriter();
     Formatter = formatter;
 }