sdk/dotnet/src/Microsoft.Datasync.Client/Table/RemoteTable.generic.cs
/// <summary>
/// Refreshes the current instance with the latest values from the table.
/// </summary>
/// <param name="instance">The instance to refresh.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that returns when the operation is complete.</returns>
Refreshes the current instance with the latest values from the table.
Refreshes the current instance with the latest values from the table .
public async Task RefreshItemAsync(T instance, CancellationToken cancellationToken = default)
        {
            Arguments.IsNotNull(instance, nameof(instance));
            string id = ServiceClient.Serializer.GetId(instance, allowDefault: true);
            if (id == null)
            {
                return; 
            }
            Arguments.IsValidId(id, nameof(instance));  
            JToken refreshed = await base.GetItemAsync(id, cancellationToken).ConfigureAwait(false);
            ServiceClient.Serializer.Deserialize<T>(refreshed, instance);
        }
public async Task RefreshItemAsync ( T instance , CancellationToken cancellationToken = default ) { Arguments . IsNotNull ( instance , nameof ( instance ) ) ; string id = ServiceClient . Serializer . GetId ( instance , allowDefault : true ) ; if ( id == null ) { return ; } Arguments . IsValidId ( id , nameof ( instance ) ) ; JToken refreshed = await base . GetItemAsync ( id , cancellationToken ) . ConfigureAwait ( false ) ; ServiceClient . Serializer . Deserialize < T > ( refreshed , instance ) ; }
Refreshes the current instance with the latest values from the table.
Refreshes the current instance with the latest values from the table .
// refresh is not supposed to throw if your object does not have an ID. // If it's not null and invalid, throw.
A task that returns when the operation is complete.
A task that returns when the operation is complete .
instance
T
The instance to refresh.
The instance to refresh .
cancellationToken
CancellationToken
A  to observe.
A to observe .