sdk/dotnet/test/Datasync.Common.Test/Mocks/MockOfflineStore.cs
/// <summary>
/// Determines if the table contains the relevant item.
/// </summary>
/// <param name="tableName">Name of the table.</param>
/// <param name="item">The item.</param>
/// <returns><c>true</c> if the item is the same as the item in the table, <c>false</c> otherwise.</returns>
Determines if the table contains the relevant item.
Determines if the table contains the relevant item .
public bool TableContains(string tableName, JObject item)
        {
            string id = ServiceSerializer.GetId(item);
            if (!TableMap.ContainsKey(tableName) || !TableMap[tableName].ContainsKey(id))
            {
                return false;
            }
            return TableMap[tableName][id].Equals(item);
        }
public bool TableContains ( string tableName , JObject item ) { string id = ServiceSerializer . GetId ( item ) ; if ( ! TableMap . ContainsKey ( tableName ) || ! TableMap [ tableName ] . ContainsKey ( id ) ) { return false ; } return TableMap [ tableName ] [ id ] . Equals ( item ) ; }
Determines if the table contains the relevant item.
Determines if the table contains the relevant item .
None
tableName
string
Name of the table.
Name of the table .
item
JObject
None