コード例 #1
0
            public void sampleCeProvider_EndSnapshotInitialization(object sender, DbEndSnapshotInitializationEventArgs e)
            {
                Console.WriteLine("EndSnapshotInitialization event fired");

                Dictionary <string, DbSnapshotInitializationTableStatistics> tableStats =
                    e.TableInitializationStatistics;

                foreach (string tableName in tableStats.Keys)
                {
                    DbSnapshotInitializationTableStatistics ts = tableStats[tableName];

                    Console.WriteLine("\tTable Name: " + tableName);

                    Console.WriteLine("\tTotal Rows: " + ts.TotalRows);

                    Console.WriteLine("\tRows Intialized: " + ts.RowsInitialized);

                    Console.WriteLine("\tStart Time: " + ts.StartTime);

                    Console.WriteLine("\tEnd Time: " + ts.EndTime);
                }

                Console.WriteLine("Snapshot initialization process completed");
                Console.WriteLine("");
            }
コード例 #2
0
        //Show DbSnapshotInitializationStatistics object
        public void ShowSnapshotInitializationStatistics(DbSnapshotInitializationStatistics snapshotStats, Dictionary <string, DbSnapshotInitializationTableStatistics> tableStats)
        {
            string message = "";

            listSyncProgress.Items.Add(message);
            message = "-----Snapshot Initialization Statistics -----";
            listSyncProgress.Items.Add(message);
            message = "Total # of tables: " + snapshotStats.TotalTables;
            listSyncProgress.Items.Add(message);
            message = "Tables Initialized: " + snapshotStats.TablesInitialized;
            listSyncProgress.Items.Add(message);
            message = "Start Time: " + snapshotStats.StartTime;
            listSyncProgress.Items.Add(message);
            message = "End Time: " + snapshotStats.EndTime;
            listSyncProgress.Items.Add(message);

            message = "\t-----Individual Snapshot Table Statistics-----";
            listSyncProgress.Items.Add(message);
            foreach (string tableName in tableStats.Keys)
            {
                DbSnapshotInitializationTableStatistics ts = tableStats[tableName];
                message = "\tTable Name: " + tableName;
                listSyncProgress.Items.Add(message);
                message = "\tTotal Rows: " + ts.TotalRows;
                listSyncProgress.Items.Add(message);
                message = "\tRows Intialized: " + ts.RowsInitialized;
                listSyncProgress.Items.Add(message);
                message = "\tStart Time: " + ts.StartTime;
                listSyncProgress.Items.Add(message);
                message = "\tEnd Time: " + ts.EndTime;
                listSyncProgress.Items.Add(message);
            }
            Application.DoEvents();
        }