Example #1
0
        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);
        }
Example #2
0
        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);
            }
        }
Example #3
0
        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;
        }