Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PowerSync/PowerSync.Common/Client/PowerSyncDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ public async Task<UploadQueueStats> GetUploadQueueStats(bool includeSize = false
///
/// Use this from the <see cref="IPowerSyncBackendConnector.UploadData"/> callback.
/// <para />
/// Once the data have been successfully uploaded, call <see cref="CrudTransaction.Complete"/> before
/// Once the data have been successfully uploaded, call <see cref="CrudBatch.Complete"/> before
/// requesting the next transaction.
/// <para />
/// Unlike <see cref="GetCrudBatch"/>, this only returns data from a single transaction at a time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ public AttributeParser(Type type)
{
_type = type;

_tableAttr = _type.GetCustomAttribute<TableAttribute>();
if (_tableAttr == null)
var tableAttr = _type.GetCustomAttribute<TableAttribute>();
if (tableAttr == null)
{
throw new InvalidOperationException("Table classes must be marked with TableAttribute.");
}
_tableAttr = tableAttr;
}

public Table ParseTable()
Expand Down Expand Up @@ -194,7 +195,7 @@ public CustomPropertyTypeMap ParseDapperTypeMap()
(type, columnName) => type.GetProperties()
.FirstOrDefault(prop => prop.GetCustomAttributes()
.OfType<ColumnAttribute>()
.Any(columnAttr => columnAttr.Name == columnName))
.Any(columnAttr => columnAttr.Name == columnName))!
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>12</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>12</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>12</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
7 changes: 2 additions & 5 deletions demos/WPF/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ public MainWindowViewModel(PowerSyncDatabase db)
// Set up the listener to track the status changes
_ = Task.Run(async () =>
{
await foreach (var update in _db.ListenAsync(new CancellationToken()))
await foreach (var update in _db.Events.OnStatusChanged.ListenAsync(new CancellationToken()))
{
if (update.StatusChanged != null)
{
Connected = update.StatusChanged.Connected;
}
Connected = update.Status.Connected;
}
});
}
Expand Down