Esempio n. 1
0
        /// <summary>
        /// Wählt eine neue Quellgruppe aus.
        /// </summary>
        /// <param name="location">Der Ursprung der Quellgruppe.</param>
        /// <param name="group">Die eigentliche Quellgruppe.</param>
        private void PrepareReceiver(TLocationType location, TSourceGroupType group)
        {
            // Create once
            if (Receiver != null)
            {
                return;
            }

            // Create receiver
            var receiver = new DataGraph();

            try
            {
                // Load device data
                receiver.CaptureInformation          = FindFilter(Aspect_CaptureName, Aspect_CaptureMoniker, false);
                receiver.TunerInformation            = FindFilter(Aspect_TunerName, Aspect_TunerMoniker, true);
                receiver.DisableCIResetOnTuneFailure = m_disableEncryption;
                receiver.DVBType = DVBType;

                // Load optional data
                int value;
                if (int.TryParse(GetParameter(BDAEnvironment.MiniumPATCountName), out value))
                {
                    if (value >= 0)
                    {
                        receiver.Configuration.MinimumPATCount = value;
                    }
                }
                if (int.TryParse(GetParameter(BDAEnvironment.MinimumPATCountWaitName), out value))
                {
                    if (value >= 0)
                    {
                        receiver.Configuration.MinimumPATCountWaitTime = value;
                    }
                }

                // Configure pipeline
                foreach (var item in Pipeline)
                {
                    item.CreateExtension <IPipelineExtension>().Install(receiver, Profile, item.SupportedOperations);
                }

                // Time to create the graph
                receiver.Create(location, group);

                // Activate it
                receiver.Start();
            }
            catch
            {
                // Cleanup
                receiver.Dispose();

                // Forward
                throw;
            }

            // Remember
            Receiver = receiver;
        }
Esempio n. 2
0
        public void SetUp(DataSet dataSource)
        {
            if (dataSource is NorthwindDataSet)
            {
                Assert.Ignore("Northwind is buggy... because import in VC# is buggy");
            }
            this.Admin.CreateDatabase();

            dataSource.EnforceConstraints = true;
            this.graph = DataGraph.Create(dataSource);

            this.pop = new DatabasePopulator();
            this.pop.Populate(dataSource);

            // add one row data per table
            foreach (DataTable table in this.graph.GetSortedTables())
            {
                ITablePopulator tp = this.pop.Tables[table];
                tp.Generate();
                table.Rows.Add(tp.Row);
                table.AcceptChanges();
            }

            this.gen = new SqlGenerator(
                this.ConnectionString,
                this.DatabaseName,
                dataSource
                );
        }
 public void SetUp()
 {
     this.dataSource     = new NullableAndNonNullableRelationDataSet();
     this.graph          = DataGraph.Create(dataSource);
     this.edgePredictate = new DataTableSortAlgorithm.NonNullableDataRelationEdgePredicate();
     this.fgraph         = new FilteredEdgeListGraph(this.graph,
                                                     this.edgePredictate
                                                     );
 }
 public void SetUp(DataSet dataSource)
 {
     this.graph = DataGraph.Create(dataSource);
     this.topo  = new DataTableSortAlgorithm(this.graph);
 }
Esempio n. 5
0
 public void SetUp()
 {
     this.dataSource = new UserOrderProductDataSet();
     this.graph      = new DataJoinGraph(DataGraph.Create(this.dataSource));
 }
Esempio n. 6
0
 public DbGenerator(DbAdministratorBase admin, DataSet dataSource)
 {
     this.admin      = admin;
     this.dataSource = dataSource;
     this.graph      = DataGraph.Create(this.DataSource);
 }
Esempio n. 7
0
 public void SetUp(DataSet dataSource)
 {
     this.graph = DataGraph.Create(dataSource);
 }