locked
Sevarl SyncProgressEventArgs Events are not called RRS feed

  • Question

  • Hello,

    I´ve a little problem with showin sync-statistics.

    I added a SyncProcessEvent Handler to my Local Provider:
    1 syncAgent.LocalProvider.SyncProgress += new EventHandler<SyncProgressEventArgs>(ShowSyncProgress); 

    which is handled here:
    1        public void Report(SyncProgressEventArgs args) 
    2         { 
    3  
    4             switch (args.SyncStage) 
    5             {    
    6                 case SyncStage.UploadingChanges: 
    7                     lblStageText.Text = LanguageDictionary.GetText("Synchronization.SyncStage.UploadingChanges"); 
    8                     break
    9                 case SyncStage.DownloadingChanges: 
    10                     lblStageText.Text = LanguageDictionary.GetText("Synchronization.SyncStage.DownloadingChanges"); 
    11                     break
    12
    13                 #region server side 
    14                 case SyncStage.ApplyingInserts: 
    15                     RefreshStatusList(StatisticType.Server, args);                                   
    16                     break
    17  
    18                 case SyncStage.ApplyingUpdates: 
    19                     RefreshStatusList(StatisticType.Server, args);   
    20                     break
    21  
    22                 case SyncStage.ApplyingDeletes: 
    23                     RefreshStatusList(StatisticType.Server, args); 
    24                     break
    25
    26
    27                 #endregion 
    28
    29                 #region client side 
    30  
    31                 case SyncStage.GettingInserts: 
    32                     RefreshStatusList(StatisticType.Client, args);   
    33                     break
    34  
    35                 case SyncStage.GettingUpdates: 
    36                     RefreshStatusList(StatisticType.Client, args);   
    37                     break
    38  
    39                 case SyncStage.GettingDeletes: 
    40                     RefreshStatusList(StatisticType.Client, args);   
    41                     break
    42
    43                 #endregion 
    44
    45
    46                 #region meta data 
    47  
    48  
    49                 case SyncStage.ReadingSchema: 
    50                     lblStageText.Text = LanguageDictionary.GetText("SyncStage.ReadingSchema"); 
    51                     break
    52  
    53                 case SyncStage.CreatingSchema: 
    54                     lblStageText.Text = LanguageDictionary.GetText("SyncStage.CreatingSchema"); 
    55                     break
    56  
    57                 case SyncStage.DeletingMetadata: 
    58                     lblStageText.Text = LanguageDictionary.GetText("SyncStage.DeletingMetadata"); 
    59                     break
    60  
    61                 case SyncStage.ReadingMetadata: 
    62                     lblStageText.Text = LanguageDictionary.GetText("SyncStage.ReadingMetadata"); 
    63                     break
    64  
    65                 case SyncStage.WritingMetadata: 
    66                     lblStageText.Text = LanguageDictionary.GetText("SyncStage.WritingMetadata"); 
    67                     break
    68
    69                 #endregion 
    70             } 
    71             Application.DoEvents(); 
    72         } 

    The regions I´ve marked with server and client side work fine. But the following SyncStages are never called:

    - SyncStage.UploadingChanges
    - SyncStage.DownloadingChanges

    - SyncStage.ReadingSchema
    - SyncStage.CreatingSchema

    - SyncStage.DeletingMetadata
    - SyncStage.ReadingMetadata
    - SyncStage.WritingMetadata


    Can anybody give me a hint? Do i have to register a special handler on client or server side?

    Or does anybody know a tutorial which handles these topics?



    Regards,

    Martin

    Friday, March 27, 2009 2:24 PM

Answers

  • Hello again,

    I just found out the problems. The Metadata are handles in the SessionProgressEvent, so I need to register and handle this Event.


    Regards,

    Martin

    Friday, March 27, 2009 2:43 PM