예제 #1
0
        public TextDataRow(TextDataColumnCollection columns, Convert convert)
        {
            Assert.IsNotNull(columns);
            Assert.IsNotNull(convert);

            Columns   = columns;
            _convert  = convert;
            ItemArray = new object[columns.Count];

            for (var i = 0; i < ItemArray.Length; i++)
            {
                ItemArray[i] = DBNull.Value;
            }
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="columns"></param>
        /// <param name="convert"></param>
        public TextDataRow(TextDataColumnCollection columns, Convert convert)
        {
            FoundationContract.Requires <ArgumentException>(columns != null);
            FoundationContract.Requires <ArgumentException>(convert != null);

            Columns   = columns;
            _convert  = convert;
            ItemArray = new object[columns.Count];

            for (var i = 0; i < ItemArray.Length; i++)
            {
                ItemArray[i] = DBNull.Value;
            }
        }
예제 #3
0
        internal TextDataReader(TextDataCommand command, CommandBehavior behavior)
        {
            Assert.IsNotNull(command);

            _command  = command;
            _behavior = behavior;
            var parameters = command.Parameters;

            Assert.IsTrue(parameters != null);

            _columns = parameters.GetParameterValue <TextDataColumnCollection>("columns");
            var converters    = parameters.GetParameterValue <IList <ITextDataConverter> >("converters");
            var getTextReader = parameters.GetParameterValue <IConverter <TextDataCommand, TextReader> >("getTextReader");

            _textReader           = getTextReader.Convert(command);
            _textDataStreamReader = new TextDataStreamReader(_textReader, _columns, converters);
        }