Ejemplo n.º 1
0
 public void Pump(TCmd source,
                  ITargetAdapter <PoolEntry <object[]> > targetAdapter,
                  int rowsPoolCapacity = SourceAdapterSqlBase.DefaultRowsCapacity)
 {
     using var reader = source.ExecuteReader(CommandBehavior.SequentialAccess);
     Pump(reader, targetAdapter, rowsPoolCapacity);
 }
Ejemplo n.º 2
0
        public virtual void Pump(ISourceAdapter <TRow> sourceAdapter,
                                 ITargetAdapter <TRow> targetAdapter)
        {
            var targetAdapters = new [] { targetAdapter };

            Pump(sourceAdapter, targetAdapters);
        }
Ejemplo n.º 3
0
 public void Pump(string sourceSql,
                  DbConnection sourceConnection,
                  ITargetAdapter <PoolEntry <object[]> > targetAdapter,
                  int rowsPoolCapacity = SourceAdapterSqlBase.DefaultRowsCapacity)
 {
     using var cmd = GenericObjectBuilder.Build <TCmd>(sourceSql, sourceConnection);
     Pump(cmd, targetAdapter, rowsPoolCapacity);
 }
Ejemplo n.º 4
0
        public void Pump(DbDataReader source,
                         ITargetAdapter <PoolEntry <object[]> > targetAdapter,
                         int rowsPoolCapacity = SourceAdapterSqlBase.DefaultRowsCapacity)
        {
            var adapter = GenericObjectBuilder.Build <TAdapter>(source, rowsPoolCapacity);

            Pump(adapter, targetAdapter);
        }
Ejemplo n.º 5
0
 public void Pump(
     Stream source,
     ColumnMetadataList sourceMetadatas,
     ITargetAdapter <PoolEntry <object[]> > targetAdapter,
     string delimiter     = DelimitedTextSourceAdapter.DefaultDelimiter,
     int rowsPoolCapacity = TextSourceAdapter.DefaultRowsPoolCapacity)
 {
     using var reader = new StreamReader(source);
     Pump(reader, sourceMetadatas, targetAdapter, delimiter, rowsPoolCapacity);
 }
Ejemplo n.º 6
0
 public VSFake(ITargetAdapter targetAdapter, IProjectAdapter projectAdapter,
               ISessionDebugManager sessionDebugManager, ISolutionExplorer solutionExplorer,
               IDebugSession debugSession, VSFakeTimeoutSource timeouts)
 {
     TargetAdapter       = targetAdapter;
     ProjectAdapter      = projectAdapter;
     SessionDebugManager = sessionDebugManager;
     SolutionExplorer    = solutionExplorer;
     DebugSession        = debugSession;
     Timeouts            = timeouts;
 }
Ejemplo n.º 7
0
 public void Pump(
     string sourceFileName,
     ColumnMetadataList sourceMetadatas,
     ITargetAdapter <PoolEntry <object[]> > targetAdapter,
     string delimiter     = DelimitedTextSourceAdapter.DefaultDelimiter,
     int rowsPoolCapacity = TextSourceAdapter.DefaultRowsPoolCapacity)
 {
     using var stream = new FileStream(sourceFileName, FileMode.Open, FileAccess.Read);
     using var reader = new StreamReader(stream);
     Pump(reader, sourceMetadatas, targetAdapter, delimiter, rowsPoolCapacity);
 }
        public void Pump(
            TextReader source,
            ColumnMetadataList sourceMetadatas,
            ITargetAdapter <PoolEntry <object[]> > targetAdapter,
            int rowsPoolCapacity = TextSourceAdapter.DefaultRowsPoolCapacity)
        {
            var sourceAdapter = new FixedLengthTextSourceAdapter(source)
            {
                ColumnMetadatas = sourceMetadatas,
                RowsPoolSize    = rowsPoolCapacity
            };

            base.Pump(sourceAdapter, targetAdapter);
        }
Ejemplo n.º 9
0
        public void Pump(
            TextReader source,
            ColumnMetadataList sourceMetadatas,
            ITargetAdapter <PoolEntry <object[]> > targetAdapter,
            string delimiter     = DelimitedTextSourceAdapter.DefaultDelimiter,
            int rowsPoolCapacity = TextSourceAdapter.DefaultRowsPoolCapacity)
        {
            var sourceAdapter = new DelimitedTextSourceAdapter(source)
            {
                ColumnMetadatas = sourceMetadatas,
                RowsPoolSize    = rowsPoolCapacity,
                Delimiter       = delimiter
            };

            base.Pump(sourceAdapter, targetAdapter);
        }
Ejemplo n.º 10
0
        public virtual ITargetAdapter GetTargetAdapter()
        {
            if (targetAdapter == null)
            {
                var debugQueryTarget    = debugQueryTargetFactory.Create();
                var debugProgramFactory = new DebugProgram.Factory();
                var defaultPortFactory  = new DefaultPort.Factory();
                var processFactory      = new Process.Factory();
                var portNotifyFactory   = new DebugPortNotify.Factory(
                    debugProgramFactory, defaultPortFactory, processFactory);
                targetAdapter = new TargetAdapter(debugQueryTarget, portNotifyFactory,
                                                  defaultPortFactory, processFactory);
            }

            return(targetAdapter);
        }
Ejemplo n.º 11
0
 public LaunchAndAttachFlow(BindPendingBreakpointsHandler bindPendingBreakpoints,
                            Func <IDebugEngine2> createDebugEngine,
                            IDebugEventCallback2 debugEventCallback,
                            IDebugSessionContext debugSessionContext,
                            IProjectAdapter projectAdapter, ITargetAdapter targetAdapter,
                            IJobQueue jobQueue, JoinableTaskContext taskContext,
                            ObserveAndNotifyJob.Factory observeAndNotifyJobFactory,
                            LaunchAndAttachJob.Factory launchAndAttachJobFactory)
 {
     _bindPendingBreakpoints = bindPendingBreakpoints;
     _createDebugEngine      = createDebugEngine;
     _debugEventCallback     = debugEventCallback;
     _debugSessionContext    = debugSessionContext;
     _projectAdapter         = projectAdapter;
     _targetAdapter          = targetAdapter;
     _jobQueue    = jobQueue;
     _taskContext = taskContext;
     _observeAndNotifyJobFactory = observeAndNotifyJobFactory;
     _launchAndAttachJobFactory  = launchAndAttachJobFactory;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Routes the source to a target via mapper.
 /// </summary>
 /// <param name="source">The source adapter.</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="target">The target adapter.</param>
 public static void Route(ISourceAdapter source, IMapper mapper, ITargetAdapter target)
 {
     target.Load(
         mapper.Transform(
             source.Extract(), source.SourceSpecification, target.TargetSpecification));
 }