private int FetchToBuffer(List <NameObjectCollection> buffer, DataProviderBase dataSource, int size)
        {
            int count = 0;

            while (count < size && dataSource.MoveNext())
            {
                count++;
                NameObjectCollection data = new NameObjectCollection(dataSource.CurrentData);
                buffer.Add(data);
            }

            return(count);
        }
        private void DoOneByOneExecute(SyncSession session)
        {
            DataProviderBase provider = session.SourceProvider;

            provider.Reset();

            while (provider.MoveNext())
            {
                string key = (string)provider.CurrentData[session.Mappings.SourceKeyProperty];
                if (string.IsNullOrWhiteSpace(key))
                {
                    throw new SyncException("数据源提供的对象的ID为空");
                }

                SchemaObjectBase scObj = LoadSchemaObject(key);
                CompareAndChange(session, provider.CurrentData, session.Mappings.AllObjectValues, scObj);
            }
        }
        private int FetchToBuffer(List<NameObjectCollection> buffer, DataProviderBase dataSource, int size)
        {
            int count = 0;
            while (count < size && dataSource.MoveNext())
            {
                count++;
                NameObjectCollection data = new NameObjectCollection(dataSource.CurrentData);
                buffer.Add(data);
            }

            return count;
        }