Ejemplo n.º 1
0
        public IEnumerable <Tuple <ObjectID, object> > ReadSequence(IDataReader dataReader)
        {
            ArgumentUtility.CheckNotNull("dataReader", dataReader);

            var columnValueProvider = new ColumnValueReader(dataReader, _columnOrdinalProvider);

            while (dataReader.Read())
            {
                yield return(GetTimestampTuple(columnValueProvider));
            }
        }
Ejemplo n.º 2
0
        public IEnumerable <ObjectID> ReadSequence(IDataReader dataReader)
        {
            ArgumentUtility.CheckNotNull("dataReader", dataReader);

            var columnValueReader = new ColumnValueReader(dataReader, _columnOrdinalProvider);

            while (dataReader.Read())
            {
                yield return((ObjectID)_idProperty.CombineValue(columnValueReader));
            }
        }
        public virtual IEnumerable <DataContainer> ReadSequence(IDataReader dataReader)
        {
            ArgumentUtility.CheckNotNull("dataReader", dataReader);

            var columnValueReader = new ColumnValueReader(dataReader, _ordinalProvider);

            while (dataReader.Read())
            {
                yield return(CreateDataContainerFromReader(dataReader, columnValueReader));
            }
        }
        protected virtual DataContainer CreateDataContainerFromReader(IDataReader dataReader, ColumnValueReader columnValueReader)
        {
            ArgumentUtility.CheckNotNull("dataReader", dataReader);

            var id = (ObjectID)_idProperty.CombineValue(columnValueReader);

            if (id == null)
            {
                return(null);
            }

            var timestamp = _timestampProperty.CombineValue(columnValueReader);

            var dataContainer = DataContainer.CreateForExisting(
                id,
                timestamp,
                pd => pd.StorageClass == StorageClass.Persistent ? ReadPropertyValue(pd, columnValueReader, id) : pd.DefaultValue);

            _dataContainerValidator.Validate(dataContainer);

            return(dataContainer);
        }