[Help] Are there any way to know the list tables should be push?🙏 #850
-
Hi all, I'm adding a progress bar for data push from my mobile app to Azure. The challenge is figuring out the list of tables that need to be pushed.
The code above pushing tables has changed from my mobile to Azure. But I want to know the tables should be pushed so I can custom it for my purpose like to know the percent sync data. My idea is below:
Thanks for your help! 🙏🙏🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If I am understanding it right your requirement then you have to check for |
Beta Was this translation helpful? Give feedback.
-
The way to drive a progress bar is to hook into the SynchronizationProgress event handler on the client. client.SynchronizationProgress += (object sender, SynchronizationEventArgs eventargs) => { /* do something */ }; The SynchronizationEventArgs is defined: /// <summary>
/// The list of synchronization events that we support.
/// </summary>
public enum SynchronizationEventType
{
PushStarted,
ItemWillBePushed,
ItemWasPushed,
PushFinished,
PullStarted,
ItemWillBeStored,
ItemWasStored,
PullFinished
}
public class SynchronizationEventArgs
{
/// <summary>
/// The type of event.
/// </summary>
public SynchronizationEventType EventType { get; internal set; }
/// <summary>
/// When an item is indicated, the ID of the item that was processed.
/// </summary>
public string ItemId { get; internal set; }
/// <summary>
/// When pulling records, the number of items that have been processed.
/// </summary>
public long ItemsProcessed { get; internal set; } = -1;
/// <summary>
/// The number of items remaining in the queue.
/// </summary>
public long QueueLength { get; internal set; }
/// <summary>
/// The name of the table containing the item (if appropriate).
/// </summary>
public string TableName { get; internal set; }
/// <summary>
/// In the case of a result, whether the push was successful or not.
/// </summary>
public bool? IsSuccessful { get; internal set; }
} That should give you everything you need to work out where to draw the progress bar. |
Beta Was this translation helpful? Give feedback.
The way to drive a progress bar is to hook into the SynchronizationProgress event handler on the client.
The SynchronizationEventArgs is defined: