Exemplo n.º 1
0
 public CifEditor(IInputStreamFactory inputStreamFactory, ICifRecordDefFactory recordDefFactory,
                  IScheduleMatcher scheduleMatcher)
 {
     _inputStreamFactory = inputStreamFactory ?? throw new ArgumentNullException(nameof(inputStreamFactory));
     _recordDefFactory   = recordDefFactory ?? throw new ArgumentNullException(nameof(recordDefFactory));
     _scheduleMatcher    = scheduleMatcher ?? throw new ArgumentNullException(nameof(scheduleMatcher));
 }
Exemplo n.º 2
0
 public DecodingFileReader(
     IInputStreamFactory streamFactory,
     IAudioDecoder decoder)
 {
     this.decoder            = decoder;
     this.inputStreamFactory = streamFactory;
 }
Exemplo n.º 3
0
        public PlainTextByLineStream(IInputStreamFactory streamFactory, Encoding encoding)
        {
            if (streamFactory == null)
            {
                throw new ArgumentNullException("streamFactory");
            }

            currentLine        = 0;
            this.streamFactory = streamFactory;
            this.encoding      = encoding;

            reader = encoding != null ?
                     new StreamReader(streamFactory.CreateInputStream(), encoding) :
                     new StreamReader(streamFactory.CreateInputStream());
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CoNLL02NameSampleStream"/> class.
        /// </summary>
        /// <param name="language">The supported conll language.</param>
        /// <param name="streamFactory">The stream factory.</param>
        /// <param name="types">The conll types.</param>
        /// <exception cref="System.ArgumentOutOfRangeException">language</exception>
        /// <exception cref="System.ArgumentNullException">streamFactory</exception>
        public CoNLL02NameSampleStream(Language language, IInputStreamFactory streamFactory, Types types)
        {
            if (!Enum.IsDefined(typeof(Language), language))
            {
                throw new ArgumentOutOfRangeException("language");
            }

            if (streamFactory == null)
            {
                throw new ArgumentNullException("streamFactory");
            }

            this.language = language;
            lineStream    = new PlainTextByLineStream(streamFactory);
            this.types    = types;
        }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CoNLLXPOSSampleStream"/> class.
 /// </summary>
 /// <param name="streamFactory">The stream factory.</param>
 /// <param name="encoding">The text encoding.</param>
 public CoNLLXPOSSampleStream(IInputStreamFactory streamFactory, Encoding encoding)
     : base(new ParagraphStream(new PlainTextByLineStream(streamFactory, encoding)))
 {
 }
 public HeaderDataFile(string fullPath, IInputStreamFactory streamFactory, AbstractSectorDataReader reader)
     : base(fullPath, InputDataType.FILE_HEADERS)
 {
     this.streamFactory = streamFactory;
     this.reader        = reader;
 }
Exemplo n.º 7
0
 public CifParser(IInputStreamFactory inputStreamFactory, ICifRecordDefFactory recordDefFactory)
 {
     _inputStreamFactory = inputStreamFactory ?? throw new ArgumentNullException(nameof(inputStreamFactory));
     _recordDefFactory   = recordDefFactory ?? throw new ArgumentNullException(nameof(recordDefFactory));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CoNLL03NameSampleStream" /> class.
 /// </summary>
 /// <param name="language">The language of the data. The valid languages are: En, De</param>
 /// <param name="streamFactory">The stream factory.</param>
 /// <param name="types">The types to be readed.</param>
 /// <exception cref="System.ArgumentOutOfRangeException">language</exception>
 /// <exception cref="System.ArgumentNullException">lineStream</exception>
 /// <exception cref="System.ArgumentException">The specified language is not supported.</exception>
 public CoNLL03NameSampleStream(Language language, IInputStreamFactory streamFactory, Types types)
     : this(language, new PlainTextByLineStream(streamFactory), types)
 {
 }
Exemplo n.º 9
0
 public CifParserTest()
 {
     _inputStreamFactory = Substitute.For <IInputStreamFactory>();
     _recordDefFactory   = Substitute.For <ICifRecordDefFactory>();
 }
Exemplo n.º 10
0
 public CifEditorTest()
 {
     _inputStreamFactory = Substitute.For <IInputStreamFactory>();
     _recordDefFactory   = Substitute.For <ICifRecordDefFactory>();
     _scheduleMatcher    = Substitute.For <IScheduleMatcher>();
 }
Exemplo n.º 11
0
 public PlainTextByLineStream(IInputStreamFactory streamFactory) : this(streamFactory, Encoding.UTF8)
 {
 }
 public SectorDataFileFactory(IInputStreamFactory streamFactory)
 {
     this.streamFactory = streamFactory;
 }
Exemplo n.º 13
0
 public SectorDataFile(string fullPath, IInputStreamFactory streamFactory, InputDataType dataType, AbstractSectorDataReader reader)
     : base(fullPath, dataType)
 {
     this.streamFactory = streamFactory;
     this.reader        = reader;
 }