private int[] _markData; // backing store for reading data when marked /// <summary> /// Ctor. /// </summary> /// <param name="source">the AdapterInputSource from which to obtain the underlying resource</param> public CSVSource(AdapterInputSource source) { _rMarkIndex = -1; // not reading _wMarkIndex = -1; // not writing _eMarkIndex = -1; _markData = new int[2]; _stream = source.GetAsStream(); if (_stream == null) { _reader = source.GetAsReader(); } _source = source; }
private int[] markData; // backing store for reading data when marked /// <summary> /// Ctor. /// </summary> /// <param name="source">the AdapterInputSource from which to obtain the underlying resource</param> public CSVSource(AdapterInputSource source) { rMarkIndex = -1; // not reading wMarkIndex = -1; // not writing eMarkIndex = -1; markData = new int[2]; stream = source.GetAsStream(); if (stream == null) { reader = source.GetAsReader(); } this.source = source; }
/// <summary> /// Ctor. /// </summary> /// <param name="container">The container.</param> /// <param name="source">the AdapterInputSource from which to obtain the underlying resource</param> public CSVSource(IContainer container, AdapterInputSource source) { _container = container; _rMarkIndex = -1; // not reading _wMarkIndex = -1; // not writing _eMarkIndex = -1; _markData = new int[2]; _stream = source.GetAsStream(_container); if (_stream == null) { _reader = source.GetAsReader(); } this._source = source; }
/// <summary>Reset to the beginning of the resource.</summary> public void Reset() { if (!IsResettable) { throw new UnsupportedOperationException("Reset not supported: underlying source cannot be reset"); } if (_stream != null) { _stream = _source.GetAsStream(); } else { _reader = _source.GetAsReader(); } _rMarkIndex = -1; _wMarkIndex = -1; _eMarkIndex = -1; _markData[0] = 0; _markData[1] = 0; }