From 9cebb051eaa10785c1dc50698a5b5c0429dc2868 Mon Sep 17 00:00:00 2001 From: LucDeCaf Date: Mon, 22 Dec 2025 11:56:10 +0200 Subject: [PATCH] add formatting via .editorconfig --- .editorconfig | 378 ++++++++++++++++++ IsExternalInit.cs | 2 +- .../Client/Connection/PowerSyncCredentials.cs | 2 +- .../Client/PowerSyncDatabase.cs | 2 +- .../PowerSync.Common/Client/SQLOpenFactory.cs | 2 +- .../Sync/Bucket/BucketStorageAdapter.cs | 5 +- .../Client/Sync/Bucket/OpType.cs | 2 +- .../Client/Sync/Bucket/OplogEntry.cs | 2 +- .../Client/Sync/Bucket/SqliteBucketStorage.cs | 4 +- .../Client/Sync/Bucket/SyncDataBatch.cs | 2 +- .../Client/Sync/Bucket/SyncDataBucket.cs | 3 +- .../Client/Sync/Stream/CoreInstructions.cs | 4 +- .../Client/Sync/Stream/Remote.cs | 2 +- .../Stream/StreamingSyncImplementation.cs | 3 +- .../Client/Sync/Stream/StreamingSyncTypes.cs | 3 +- .../PowerSync.Common/DB/Crud/CrudBatch.cs | 2 +- .../PowerSync.Common/DB/Crud/CrudEntry.cs | 3 +- .../DB/Crud/CrudTransaction.cs | 2 +- .../PowerSync.Common/DB/Crud/SyncProgress.cs | 2 +- .../PowerSync.Common/DB/Crud/SyncStatus.cs | 8 +- .../DB/Crud/UploadQueueStatus.cs | 2 +- PowerSync/PowerSync.Common/DB/Schema/Index.cs | 2 +- .../DB/Schema/IndexedColumn.cs | 2 +- PowerSync/PowerSync.Common/DB/Schema/Table.cs | 1 + .../MDSQLite/MDSQLiteConnection.cs | 4 +- .../MDSQLite/MDSQLiteDBOpenFactory.cs | 2 +- .../MDSQLite/MDSQLiteOptions.cs | 2 +- .../PowerSync.Common/Utils/EventStream.cs | 2 +- .../Utils/PowerSyncPathResolver.cs | 2 +- .../SQLite/MAUISQLiteAdapter.cs | 3 +- .../SQLite/MAUISQLiteDBOpenFactory.cs | 2 +- .../PowerSync.Maui/build/ApiDefinition.cs | 2 +- .../NodeClient.cs | 5 +- .../NodeConnector.cs | 5 +- .../SyncIntegrationTests.cs | 11 +- .../TestSchema.cs | 2 +- .../Client/PowerSyncDatabaseTests.cs | 5 +- .../Client/Sync/BucketStorageTests.cs | 4 +- .../Client/Sync/CRUDTests.cs | 2 +- .../EventStreamTests.cs | 4 +- .../PowerSync.Common.Tests/TestSchema.cs | 2 +- .../Utils/DatabaseUtils.cs | 2 +- demos/CommandLine/AppSchema.cs | 2 +- demos/CommandLine/Demo.cs | 8 +- .../Helpers/SupabasePatchHelper.cs | 2 + demos/CommandLine/Models/Supabase/List.cs | 1 + demos/CommandLine/Models/Supabase/Todos.cs | 2 + demos/CommandLine/NodeConnector.cs | 8 +- demos/CommandLine/SupabaseConnector.cs | 5 +- demos/CommandLine/Utils/Config.cs | 2 +- demos/MAUITodo/App.xaml.cs | 10 +- demos/MAUITodo/AppShell.xaml.cs | 12 +- demos/MAUITodo/Data/AppSchema.cs | 2 +- demos/MAUITodo/Data/NodeConnector.cs | 1 + demos/MAUITodo/Data/PowerSyncData.cs | 8 +- demos/MAUITodo/MauiProgram.cs | 43 +- demos/MAUITodo/Models/TodoItem.cs | 18 +- demos/MAUITodo/Models/TodoList.cs | 12 +- .../Platforms/Android/MainApplication.cs | 10 +- demos/MAUITodo/Platforms/iOS/AppDelegate.cs | 2 +- demos/MAUITodo/Platforms/iOS/Program.cs | 15 +- demos/MAUITodo/Views/ListsPage.xaml.cs | 11 +- demos/MAUITodo/Views/SqlConsolePage.xaml.cs | 18 +- demos/MAUITodo/Views/TodoListPage.xaml.cs | 6 +- demos/WPF/App.xaml.cs | 3 + demos/WPF/AssemblyInfo.cs | 2 +- demos/WPF/MainWindow.xaml.cs | 1 + demos/WPF/Services/INavigationService.cs | 2 + demos/WPF/Services/PowerSyncConnector.cs | 2 + demos/WPF/ViewModels/MainWindowViewModel.cs | 1 + demos/WPF/ViewModels/SQLConsoleViewModel.cs | 3 + demos/WPF/ViewModels/TodoListViewModel.cs | 2 + demos/WPF/ViewModels/TodoViewModel.cs | 2 + 73 files changed, 574 insertions(+), 143 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..59b1872 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,378 @@ +root = true + +# All files +[*] +indent_style = space + +# Xml files +[*.xml] +indent_size = 2 + +# C# files +[*.cs] + +#### Core EditorConfig Options #### + +# Indentation and spacing +indent_size = 4 +tab_width = 4 + +# New line preferences +insert_final_newline = true + +#### .NET Coding Conventions #### +[*.{cs,vb}] + +# Organize usings +dotnet_separate_import_directive_groups = true +dotnet_sort_system_directives_first = true +file_header_template = unset + +# this. and Me. preferences +dotnet_style_qualification_for_event = false:silent +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_property = false:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent + +# Expression-level preferences +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_namespace_match_folder = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_object_initializer = true:suggestion +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_return = true:suggestion +dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion + +# Field preferences +dotnet_style_readonly_field = true:warning + +# Parameter preferences +dotnet_code_quality_unused_parameters = all:suggestion + +# Suppression preferences +dotnet_remove_unnecessary_suppression_exclusions = none + +#### C# Coding Conventions #### +[*.cs] + +# var preferences +csharp_style_var_elsewhere = false:silent +csharp_style_var_for_built_in_types = false:silent +csharp_style_var_when_type_is_apparent = false:silent + +# Expression-bodied members +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_prefer_extended_property_pattern = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_pattern_matching = true:silent +csharp_style_prefer_switch_expression = true:suggestion + +# Null-checking preferences +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_prefer_static_anonymous_function = true:suggestion +csharp_prefer_static_local_function = true:warning +csharp_preferred_modifier_order = public,private,protected,internal,file,const,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion +csharp_style_prefer_readonly_struct = true:suggestion +csharp_style_prefer_readonly_struct_member = true:suggestion + +# Code-block preferences +csharp_prefer_braces = true:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_style_namespace_declarations = file_scoped:suggestion +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_prefer_top_level_statements = true:silent + +# Expression-level preferences +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_null_check_over_type_check = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_prefer_utf8_string_literals = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +# 'using' directive preferences +csharp_using_directive_placement = outside_namespace:silent + +#### C# Formatting Rules #### + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +#### Naming styles #### +[*.{cs,vb}] + +# Naming rules + +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion +dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces +dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase + +dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion +dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters +dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase + +dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods +dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties +dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.events_should_be_pascalcase.symbols = events +dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion +dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables +dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase + +dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion +dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants +dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase + +dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion +dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters +dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase + +dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields +dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion +dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields +dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase + +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase + +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums +dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase + +# Symbol specifications + +dotnet_naming_symbols.interfaces.applicable_kinds = interface +dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interfaces.required_modifiers = + +dotnet_naming_symbols.enums.applicable_kinds = enum +dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.enums.required_modifiers = + +dotnet_naming_symbols.events.applicable_kinds = event +dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.events.required_modifiers = + +dotnet_naming_symbols.methods.applicable_kinds = method +dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.methods.required_modifiers = + +dotnet_naming_symbols.properties.applicable_kinds = property +dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.properties.required_modifiers = + +dotnet_naming_symbols.public_fields.applicable_kinds = field +dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_fields.required_modifiers = + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_fields.required_modifiers = + +dotnet_naming_symbols.private_static_fields.applicable_kinds = field +dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_static_fields.required_modifiers = static + +dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum +dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types_and_namespaces.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +dotnet_naming_symbols.type_parameters.applicable_kinds = namespace +dotnet_naming_symbols.type_parameters.applicable_accessibilities = * +dotnet_naming_symbols.type_parameters.required_modifiers = + +dotnet_naming_symbols.private_constant_fields.applicable_kinds = field +dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_constant_fields.required_modifiers = const + +dotnet_naming_symbols.local_variables.applicable_kinds = local +dotnet_naming_symbols.local_variables.applicable_accessibilities = local +dotnet_naming_symbols.local_variables.required_modifiers = + +dotnet_naming_symbols.local_constants.applicable_kinds = local +dotnet_naming_symbols.local_constants.applicable_accessibilities = local +dotnet_naming_symbols.local_constants.required_modifiers = const + +dotnet_naming_symbols.parameters.applicable_kinds = parameter +dotnet_naming_symbols.parameters.applicable_accessibilities = * +dotnet_naming_symbols.parameters.required_modifiers = + +dotnet_naming_symbols.public_constant_fields.applicable_kinds = field +dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_constant_fields.required_modifiers = const + +dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static + +dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function +dotnet_naming_symbols.local_functions.applicable_accessibilities = * +dotnet_naming_symbols.local_functions.required_modifiers = + +# Naming styles + +dotnet_naming_style.pascalcase.required_prefix = +dotnet_naming_style.pascalcase.required_suffix = +dotnet_naming_style.pascalcase.word_separator = +dotnet_naming_style.pascalcase.capitalization = pascal_case + +dotnet_naming_style.ipascalcase.required_prefix = I +dotnet_naming_style.ipascalcase.required_suffix = +dotnet_naming_style.ipascalcase.word_separator = +dotnet_naming_style.ipascalcase.capitalization = pascal_case + +dotnet_naming_style.tpascalcase.required_prefix = T +dotnet_naming_style.tpascalcase.required_suffix = +dotnet_naming_style.tpascalcase.word_separator = +dotnet_naming_style.tpascalcase.capitalization = pascal_case + +dotnet_naming_style._camelcase.required_prefix = _ +dotnet_naming_style._camelcase.required_suffix = +dotnet_naming_style._camelcase.word_separator = +dotnet_naming_style._camelcase.capitalization = camel_case + +dotnet_naming_style.camelcase.required_prefix = +dotnet_naming_style.camelcase.required_suffix = +dotnet_naming_style.camelcase.word_separator = +dotnet_naming_style.camelcase.capitalization = camel_case + +dotnet_naming_style.s_camelcase.required_prefix = s_ +dotnet_naming_style.s_camelcase.required_suffix = +dotnet_naming_style.s_camelcase.word_separator = +dotnet_naming_style.s_camelcase.capitalization = camel_case + diff --git a/IsExternalInit.cs b/IsExternalInit.cs index 3cd1a48..7d866a8 100644 --- a/IsExternalInit.cs +++ b/IsExternalInit.cs @@ -4,4 +4,4 @@ namespace System.Runtime.CompilerServices { [EditorBrowsable(EditorBrowsableState.Never)] internal class IsExternalInit { } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/Connection/PowerSyncCredentials.cs b/PowerSync/PowerSync.Common/Client/Connection/PowerSyncCredentials.cs index 4730603..9bb4412 100644 --- a/PowerSync/PowerSync.Common/Client/Connection/PowerSyncCredentials.cs +++ b/PowerSync/PowerSync.Common/Client/Connection/PowerSyncCredentials.cs @@ -4,4 +4,4 @@ public class PowerSyncCredentials(string endpoint, string token, DateTime? expir public string Endpoint { get; set; } = endpoint; public string Token { get; set; } = token; public DateTime? ExpiresAt { get; set; } = expiresAt; -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/PowerSyncDatabase.cs b/PowerSync/PowerSync.Common/Client/PowerSyncDatabase.cs index 9f17882..d00e013 100644 --- a/PowerSync/PowerSync.Common/Client/PowerSyncDatabase.cs +++ b/PowerSync/PowerSync.Common/Client/PowerSyncDatabase.cs @@ -789,4 +789,4 @@ public class WatchOnChangeHandler { public Func OnChange { get; set; } = null!; public Action? OnError { get; set; } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/SQLOpenFactory.cs b/PowerSync/PowerSync.Common/Client/SQLOpenFactory.cs index c14c60e..6e93e49 100644 --- a/PowerSync/PowerSync.Common/Client/SQLOpenFactory.cs +++ b/PowerSync/PowerSync.Common/Client/SQLOpenFactory.cs @@ -15,7 +15,7 @@ public class SQLOpenOptions : IDatabaseSource public string? DbLocation { get; set; } } -public interface ISQLOpenFactory: IDatabaseSource +public interface ISQLOpenFactory : IDatabaseSource { /// /// Opens a connection adapter to a SQLite Database. diff --git a/PowerSync/PowerSync.Common/Client/Sync/Bucket/BucketStorageAdapter.cs b/PowerSync/PowerSync.Common/Client/Sync/Bucket/BucketStorageAdapter.cs index 4611bb2..13f736e 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Bucket/BucketStorageAdapter.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Bucket/BucketStorageAdapter.cs @@ -4,9 +4,10 @@ namespace PowerSync.Common.Client.Sync.Bucket; using System; using System.Threading.Tasks; +using Newtonsoft.Json; + using PowerSync.Common.DB.Crud; using PowerSync.Common.Utils; -using Newtonsoft.Json; public static class PowerSyncControlCommand { @@ -129,4 +130,4 @@ public interface IBucketStorageAdapter : IEventStream /// Invokes the `powersync_control` function for the sync client. /// Task Control(string op, object? payload); -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/Sync/Bucket/OpType.cs b/PowerSync/PowerSync.Common/Client/Sync/Bucket/OpType.cs index 84b7427..26ee81b 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Bucket/OpType.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Bucket/OpType.cs @@ -31,4 +31,4 @@ public string ToJSON() { return JsonConvert.SerializeObject(Value).Trim('"'); // Ensures it's a string without extra quotes } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/Sync/Bucket/OplogEntry.cs b/PowerSync/PowerSync.Common/Client/Sync/Bucket/OplogEntry.cs index b2b95b3..f83f4a6 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Bucket/OplogEntry.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Bucket/OplogEntry.cs @@ -72,4 +72,4 @@ public string ToJSON() return JsonConvert.SerializeObject(jsonObject, Formatting.None); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/Sync/Bucket/SqliteBucketStorage.cs b/PowerSync/PowerSync.Common/Client/Sync/Bucket/SqliteBucketStorage.cs index 78c549d..b419e38 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Bucket/SqliteBucketStorage.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Bucket/SqliteBucketStorage.cs @@ -28,9 +28,9 @@ public class SqliteBucketStorage : EventStream, IBucketStora private static readonly int COMPACT_OPERATION_INTERVAL = 1000; private int compactCounter = COMPACT_OPERATION_INTERVAL; - private ILogger logger; + private readonly ILogger logger; - private CancellationTokenSource updateCts; + private readonly CancellationTokenSource updateCts; private record ExistingTableRowsResult(string name); diff --git a/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBatch.cs b/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBatch.cs index be5cc99..35e5a4f 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBatch.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBatch.cs @@ -3,4 +3,4 @@ namespace PowerSync.Common.Client.Sync.Bucket; public class SyncDataBatch(SyncDataBucket[] buckets) { public SyncDataBucket[] Buckets { get; private set; } = buckets; -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBucket.cs b/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBucket.cs index 7699778..0600256 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBucket.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Bucket/SyncDataBucket.cs @@ -2,6 +2,7 @@ namespace PowerSync.Common.Client.Sync.Bucket; using System.Collections.Generic; using System.Linq; + using Newtonsoft.Json; public class SyncDataBucketJSON @@ -71,4 +72,4 @@ public string ToJSON() return JsonConvert.SerializeObject(jsonObject); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/Sync/Stream/CoreInstructions.cs b/PowerSync/PowerSync.Common/Client/Sync/Stream/CoreInstructions.cs index 7bfef98..6717b0a 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Stream/CoreInstructions.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Stream/CoreInstructions.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json.Linq; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace PowerSync.Common.Client.Sync.Stream; @@ -126,4 +126,4 @@ public class FetchCredentials : Instruction public class CloseSyncStream : Instruction { } public class FlushFileSystem : Instruction { } -public class DidCompleteSync : Instruction { } \ No newline at end of file +public class DidCompleteSync : Instruction { } diff --git a/PowerSync/PowerSync.Common/Client/Sync/Stream/Remote.cs b/PowerSync/PowerSync.Common/Client/Sync/Stream/Remote.cs index d26795f..0912f40 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Stream/Remote.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Stream/Remote.cs @@ -4,9 +4,9 @@ namespace PowerSync.Common.Client.Sync.Stream; using System.Net.Http; using System.Reflection; using System.Text; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using System.Text.RegularExpressions; using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncImplementation.cs b/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncImplementation.cs index 62466cc..ee0e5d2 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncImplementation.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncImplementation.cs @@ -3,6 +3,7 @@ namespace PowerSync.Common.Client.Sync.Stream; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; + using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; @@ -1154,4 +1155,4 @@ public async Task ObtainLock(LockOptions lockOptions) return await lockOptions.Callback(); }); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncTypes.cs b/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncTypes.cs index 6f78059..e55e253 100644 --- a/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncTypes.cs +++ b/PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncTypes.cs @@ -1,8 +1,9 @@ namespace PowerSync.Common.Client.Sync.Stream; +using Newtonsoft.Json; + using PowerSync.Common.Client.Sync.Bucket; using PowerSync.Common.DB.Crud; -using Newtonsoft.Json; public class ContinueCheckpointRequest { diff --git a/PowerSync/PowerSync.Common/DB/Crud/CrudBatch.cs b/PowerSync/PowerSync.Common/DB/Crud/CrudBatch.cs index 027f72d..60934a9 100644 --- a/PowerSync/PowerSync.Common/DB/Crud/CrudBatch.cs +++ b/PowerSync/PowerSync.Common/DB/Crud/CrudBatch.cs @@ -13,4 +13,4 @@ public async Task Complete(string? checkpoint = null) { await CompleteCallback(checkpoint); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Crud/CrudEntry.cs b/PowerSync/PowerSync.Common/DB/Crud/CrudEntry.cs index 5fe8f02..e7fda9c 100644 --- a/PowerSync/PowerSync.Common/DB/Crud/CrudEntry.cs +++ b/PowerSync/PowerSync.Common/DB/Crud/CrudEntry.cs @@ -1,6 +1,7 @@ namespace PowerSync.Common.DB.Crud; using System.Collections.Generic; + using Newtonsoft.Json; public enum UpdateType @@ -97,4 +98,4 @@ public override int GetHashCode() { return JsonConvert.SerializeObject(this).GetHashCode(); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Crud/CrudTransaction.cs b/PowerSync/PowerSync.Common/DB/Crud/CrudTransaction.cs index d516f4b..da63a14 100644 --- a/PowerSync/PowerSync.Common/DB/Crud/CrudTransaction.cs +++ b/PowerSync/PowerSync.Common/DB/Crud/CrudTransaction.cs @@ -6,4 +6,4 @@ namespace PowerSync.Common.DB.Crud; public class CrudTransaction(CrudEntry[] crud, Func complete, long? transactionId = null) : CrudBatch(crud, false, complete) { public long? TransactionId { get; private set; } = transactionId; -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Crud/SyncProgress.cs b/PowerSync/PowerSync.Common/DB/Crud/SyncProgress.cs index b709a2c..875ed1d 100644 --- a/PowerSync/PowerSync.Common/DB/Crud/SyncProgress.cs +++ b/PowerSync/PowerSync.Common/DB/Crud/SyncProgress.cs @@ -78,4 +78,4 @@ public class ProgressWithOperations /// When this number reaches 1.0, all changes have been received from the sync service. /// public double DownloadedFraction { get; set; } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Crud/SyncStatus.cs b/PowerSync/PowerSync.Common/DB/Crud/SyncStatus.cs index cdda36a..9f4356a 100644 --- a/PowerSync/PowerSync.Common/DB/Crud/SyncStatus.cs +++ b/PowerSync/PowerSync.Common/DB/Crud/SyncStatus.cs @@ -1,9 +1,11 @@ namespace PowerSync.Common.DB.Crud; -using PowerSync.Common.Client.Sync.Stream; -using Newtonsoft.Json; using Microsoft.Extensions.Options; +using Newtonsoft.Json; + +using PowerSync.Common.Client.Sync.Stream; + public class SyncDataFlowStatus { [JsonProperty("downloading")] public bool Downloading { get; set; } = false; @@ -173,4 +175,4 @@ public string ToJSON() { return SerializeObject(); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Crud/UploadQueueStatus.cs b/PowerSync/PowerSync.Common/DB/Crud/UploadQueueStatus.cs index 7813617..12c35c6 100644 --- a/PowerSync/PowerSync.Common/DB/Crud/UploadQueueStatus.cs +++ b/PowerSync/PowerSync.Common/DB/Crud/UploadQueueStatus.cs @@ -17,4 +17,4 @@ public override string ToString() return $"UploadQueueStats"; } } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Schema/Index.cs b/PowerSync/PowerSync.Common/DB/Schema/Index.cs index 257cbe6..4329301 100644 --- a/PowerSync/PowerSync.Common/DB/Schema/Index.cs +++ b/PowerSync/PowerSync.Common/DB/Schema/Index.cs @@ -22,4 +22,4 @@ public string ToJSON(Table table) columns = Columns.Select(column => column.ToJSON(table)).ToList() }); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Schema/IndexedColumn.cs b/PowerSync/PowerSync.Common/DB/Schema/IndexedColumn.cs index 0a8430b..69f56f4 100644 --- a/PowerSync/PowerSync.Common/DB/Schema/IndexedColumn.cs +++ b/PowerSync/PowerSync.Common/DB/Schema/IndexedColumn.cs @@ -27,4 +27,4 @@ public object ToJSON(Table table) } ); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/DB/Schema/Table.cs b/PowerSync/PowerSync.Common/DB/Schema/Table.cs index cd9d2b1..3e80f06 100644 --- a/PowerSync/PowerSync.Common/DB/Schema/Table.cs +++ b/PowerSync/PowerSync.Common/DB/Schema/Table.cs @@ -1,6 +1,7 @@ namespace PowerSync.Common.DB.Schema; using System.Text.RegularExpressions; + using Newtonsoft.Json; public class TableOptions( diff --git a/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteConnection.cs b/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteConnection.cs index 6c73c8b..c67dd97 100644 --- a/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteConnection.cs +++ b/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteConnection.cs @@ -20,7 +20,7 @@ public class MDSQLiteConnection : EventStream, ILockContext { public SqliteConnection Db; - private List updateBuffer; + private readonly List updateBuffer; public MDSQLiteConnection(MDSQLiteConnectionOptions options) { Db = options.Database; @@ -215,4 +215,4 @@ public async Task RefreshSchema() { await Get("PRAGMA table_info('sqlite_master')"); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteDBOpenFactory.cs b/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteDBOpenFactory.cs index 333fefb..a376799 100644 --- a/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteDBOpenFactory.cs +++ b/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteDBOpenFactory.cs @@ -25,4 +25,4 @@ public IDBAdapter OpenDatabase() SqliteOptions = options.SqliteOptions }); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteOptions.cs b/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteOptions.cs index a873160..7de8f6a 100644 --- a/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteOptions.cs +++ b/PowerSync/PowerSync.Common/MDSQLite/MDSQLiteOptions.cs @@ -132,4 +132,4 @@ public class RequiredMDSQLiteOptions : MDSQLiteOptions public new int CacheSizeKb { get; set; } public new SqliteExtension[] Extensions { get; set; } = null!; -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Utils/EventStream.cs b/PowerSync/PowerSync.Common/Utils/EventStream.cs index 3bf93cd..91aca88 100644 --- a/PowerSync/PowerSync.Common/Utils/EventStream.cs +++ b/PowerSync/PowerSync.Common/Utils/EventStream.cs @@ -167,4 +167,4 @@ private void RemoveSubscriber(Channel channel) { subscribers.TryRemove(channel, out _); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Common/Utils/PowerSyncPathResolver.cs b/PowerSync/PowerSync.Common/Utils/PowerSyncPathResolver.cs index be382d8..39172df 100644 --- a/PowerSync/PowerSync.Common/Utils/PowerSyncPathResolver.cs +++ b/PowerSync/PowerSync.Common/Utils/PowerSyncPathResolver.cs @@ -63,4 +63,4 @@ private static string GetFileNameForPlatform() throw new PlatformNotSupportedException("Unsupported platform."); } } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteAdapter.cs b/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteAdapter.cs index 4583fe8..3c82f6c 100644 --- a/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteAdapter.cs +++ b/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteAdapter.cs @@ -1,6 +1,7 @@ namespace PowerSync.Maui.SQLite; using Microsoft.Data.Sqlite; + using PowerSync.Common.MDSQLite; // iOS specific imports @@ -46,4 +47,4 @@ private void LoadExtensionIOS(SqliteConnection db) loadExtension.ExecuteNonQuery(); #endif } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteDBOpenFactory.cs b/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteDBOpenFactory.cs index 35485c8..c8d3508 100644 --- a/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteDBOpenFactory.cs +++ b/PowerSync/PowerSync.Maui/SQLite/MAUISQLiteDBOpenFactory.cs @@ -23,4 +23,4 @@ public IDBAdapter OpenDatabase() SqliteOptions = options.SqliteOptions }); } -} \ No newline at end of file +} diff --git a/PowerSync/PowerSync.Maui/build/ApiDefinition.cs b/PowerSync/PowerSync.Maui/build/ApiDefinition.cs index 79a0522..5fe8ef4 100644 --- a/PowerSync/PowerSync.Maui/build/ApiDefinition.cs +++ b/PowerSync/PowerSync.Maui/build/ApiDefinition.cs @@ -1,4 +1,4 @@ namespace PowerSync.Maui.build { // Empty API definition - allows xcframework to be included without managed bindings -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeClient.cs b/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeClient.cs index eab9a3e..4051754 100644 --- a/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeClient.cs +++ b/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeClient.cs @@ -1,11 +1,12 @@ namespace PowerSync.Common.IntegrationTests; using System; +using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Text.Json; using System.Threading.Tasks; -using System.Collections.Generic; + using PowerSync.Common.DB.Crud; public class NodeClient @@ -107,4 +108,4 @@ public void Dispose() { _httpClient?.Dispose(); } -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeConnector.cs b/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeConnector.cs index b9448b3..ae2a1b2 100644 --- a/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeConnector.cs +++ b/Tests/PowerSync/PowerSync.Common.IntegrationTests/NodeConnector.cs @@ -3,11 +3,12 @@ using System; using System.Collections.Generic; +using System.IO; using System.Net.Http; using System.Text; using System.Text.Json; using System.Threading.Tasks; -using System.IO; + using PowerSync.Common.Client; using PowerSync.Common.Client.Connection; using PowerSync.Common.DB.Crud; @@ -110,4 +111,4 @@ public async Task UploadData(IPowerSyncDatabase database) throw; } } -} +} diff --git a/Tests/PowerSync/PowerSync.Common.IntegrationTests/SyncIntegrationTests.cs b/Tests/PowerSync/PowerSync.Common.IntegrationTests/SyncIntegrationTests.cs index 6e2da0e..86ae18f 100644 --- a/Tests/PowerSync/PowerSync.Common.IntegrationTests/SyncIntegrationTests.cs +++ b/Tests/PowerSync/PowerSync.Common.IntegrationTests/SyncIntegrationTests.cs @@ -1,9 +1,12 @@ -using Newtonsoft.Json; -using PowerSync.Common.Client; using System.Data.Common; using System.Diagnostics; using System.Threading.Tasks; + using Microsoft.Extensions.Logging; + +using Newtonsoft.Json; + +using PowerSync.Common.Client; using PowerSync.Common.Client.Sync.Stream; @@ -14,7 +17,7 @@ public class SyncIntegrationTests : IAsyncLifetime { private record ListResult(string id, string name, string owner_id, string created_at); - private string userId = Uuid(); + private readonly string userId = Uuid(); private NodeClient nodeClient = default!; @@ -251,4 +254,4 @@ public IntegrationFactAttribute() Timeout = 5000; // 5 seconds default for all integration tests } } -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.IntegrationTests/TestSchema.cs b/Tests/PowerSync/PowerSync.Common.IntegrationTests/TestSchema.cs index dbf79a2..db16d65 100644 --- a/Tests/PowerSync/PowerSync.Common.IntegrationTests/TestSchema.cs +++ b/Tests/PowerSync/PowerSync.Common.IntegrationTests/TestSchema.cs @@ -30,4 +30,4 @@ public class TestSchema { "todos", Todos }, { "lists", Lists } }); -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.Tests/Client/PowerSyncDatabaseTests.cs b/Tests/PowerSync/PowerSync.Common.Tests/Client/PowerSyncDatabaseTests.cs index b2d6dde..9c25c17 100644 --- a/Tests/PowerSync/PowerSync.Common.Tests/Client/PowerSyncDatabaseTests.cs +++ b/Tests/PowerSync/PowerSync.Common.Tests/Client/PowerSyncDatabaseTests.cs @@ -1,8 +1,9 @@ namespace PowerSync.Common.Tests.Client; +using System.Diagnostics; + using Microsoft.Data.Sqlite; -using System.Diagnostics; using PowerSync.Common.Client; public class PowerSyncDatabaseTests : IAsyncLifetime @@ -434,4 +435,4 @@ await db.WriteTransaction(async tx => var afterTx = await db.GetAll("SELECT * FROM assets"); Assert.Equal(2, afterTx.Length); } -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/BucketStorageTests.cs b/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/BucketStorageTests.cs index 7a2f9bf..c1da954 100644 --- a/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/BucketStorageTests.cs +++ b/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/BucketStorageTests.cs @@ -4,7 +4,9 @@ namespace PowerSync.Common.Tests.Client.Sync; using Microsoft.Data.Sqlite; using Microsoft.Extensions.Logging; + using Newtonsoft.Json; + using PowerSync.Common.Client; using PowerSync.Common.Client.Sync.Bucket; using PowerSync.Common.DB.Schema; @@ -1016,4 +1018,4 @@ await SyncLocalChecked(new Checkpoint var revertedResult = await db.GetAll("SELECT description FROM assets WHERE id = 'O2'"); Assert.Equal(new DescriptionResult("bar"), revertedResult[0]); } -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/CRUDTests.cs b/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/CRUDTests.cs index c3ce177..1c8cb42 100644 --- a/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/CRUDTests.cs +++ b/Tests/PowerSync/PowerSync.Common.Tests/Client/Sync/CRUDTests.cs @@ -338,4 +338,4 @@ await db.WriteTransaction(async (tx) => var nextTx = await db.GetNextCrudTransaction(); Assert.Null(nextTx); } -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.Tests/EventStreamTests.cs b/Tests/PowerSync/PowerSync.Common.Tests/EventStreamTests.cs index 08ce1c6..a924a23 100644 --- a/Tests/PowerSync/PowerSync.Common.Tests/EventStreamTests.cs +++ b/Tests/PowerSync/PowerSync.Common.Tests/EventStreamTests.cs @@ -1,7 +1,7 @@ namespace PowerSync.Common.Tests; -using PowerSync.Common.Utils; using PowerSync.Common.DB.Crud; +using PowerSync.Common.Utils; public class EventStreamTests { @@ -109,4 +109,4 @@ public async Task EventStream_ShouldReceiveTwoMessages_Sync() Assert.Contains(status2, receivedMessages); Assert.Equal(0, eventStream.SubscriberCount()); } -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.Tests/TestSchema.cs b/Tests/PowerSync/PowerSync.Common.Tests/TestSchema.cs index 1998f45..01e1609 100644 --- a/Tests/PowerSync/PowerSync.Common.Tests/TestSchema.cs +++ b/Tests/PowerSync/PowerSync.Common.Tests/TestSchema.cs @@ -30,4 +30,4 @@ public class TestSchema { "assets", Assets }, { "customers", Customers } }); -} \ No newline at end of file +} diff --git a/Tests/PowerSync/PowerSync.Common.Tests/Utils/DatabaseUtils.cs b/Tests/PowerSync/PowerSync.Common.Tests/Utils/DatabaseUtils.cs index f820b84..d82e754 100644 --- a/Tests/PowerSync/PowerSync.Common.Tests/Utils/DatabaseUtils.cs +++ b/Tests/PowerSync/PowerSync.Common.Tests/Utils/DatabaseUtils.cs @@ -36,4 +36,4 @@ private static void TryDelete(string filePath) Console.Error.WriteLine($"Failed to delete file after {retryCount} attempts: {filePath}"); } -} \ No newline at end of file +} diff --git a/demos/CommandLine/AppSchema.cs b/demos/CommandLine/AppSchema.cs index 3b788cd..160c339 100644 --- a/demos/CommandLine/AppSchema.cs +++ b/demos/CommandLine/AppSchema.cs @@ -30,4 +30,4 @@ class AppSchema { "todos", Todos }, { "lists", Lists } }); -} \ No newline at end of file +} diff --git a/demos/CommandLine/Demo.cs b/demos/CommandLine/Demo.cs index 347edd3..7ecd1d2 100644 --- a/demos/CommandLine/Demo.cs +++ b/demos/CommandLine/Demo.cs @@ -1,8 +1,10 @@ namespace CommandLine; -using CommandLine.Utils; +using CommandLine.Utils; + using PowerSync.Common.Client; -using PowerSync.Common.Client.Connection; +using PowerSync.Common.Client.Connection; + using Spectre.Console; class Demo @@ -128,4 +130,4 @@ await AnsiConsole.Live(panel) Console.WriteLine("\nExited live table. Press any key to exit."); } -} \ No newline at end of file +} diff --git a/demos/CommandLine/Helpers/SupabasePatchHelper.cs b/demos/CommandLine/Helpers/SupabasePatchHelper.cs index 47b46a8..29ccf99 100644 --- a/demos/CommandLine/Helpers/SupabasePatchHelper.cs +++ b/demos/CommandLine/Helpers/SupabasePatchHelper.cs @@ -1,7 +1,9 @@ namespace CommandLine.Helpers; using System.Linq.Expressions; + using Newtonsoft.Json; + using Supabase.Postgrest.Interfaces; using Supabase.Postgrest.Models; diff --git a/demos/CommandLine/Models/Supabase/List.cs b/demos/CommandLine/Models/Supabase/List.cs index 7839231..4823885 100644 --- a/demos/CommandLine/Models/Supabase/List.cs +++ b/demos/CommandLine/Models/Supabase/List.cs @@ -1,5 +1,6 @@ using Newtonsoft.Json; + using Supabase.Postgrest.Attributes; using Supabase.Postgrest.Models; diff --git a/demos/CommandLine/Models/Supabase/Todos.cs b/demos/CommandLine/Models/Supabase/Todos.cs index a871c86..591b5c9 100644 --- a/demos/CommandLine/Models/Supabase/Todos.cs +++ b/demos/CommandLine/Models/Supabase/Todos.cs @@ -1,6 +1,8 @@ using Microsoft.VisualBasic; + using Newtonsoft.Json; + using Supabase.Postgrest.Attributes; using Supabase.Postgrest.Models; diff --git a/demos/CommandLine/NodeConnector.cs b/demos/CommandLine/NodeConnector.cs index 043a6e5..13889f3 100644 --- a/demos/CommandLine/NodeConnector.cs +++ b/demos/CommandLine/NodeConnector.cs @@ -2,15 +2,17 @@ using System; using System.Collections.Generic; +using System.IO; using System.Net.Http; using System.Text; using System.Text.Json; using System.Threading.Tasks; -using System.IO; + +using CommandLine.Utils; + using PowerSync.Common.Client; using PowerSync.Common.Client.Connection; using PowerSync.Common.DB.Crud; -using CommandLine.Utils; public class NodeConnector : IPowerSyncBackendConnector { @@ -122,4 +124,4 @@ public async Task UploadData(IPowerSyncDatabase database) throw; } } -} +} diff --git a/demos/CommandLine/SupabaseConnector.cs b/demos/CommandLine/SupabaseConnector.cs index 1e9fa0e..6c5c5fc 100644 --- a/demos/CommandLine/SupabaseConnector.cs +++ b/demos/CommandLine/SupabaseConnector.cs @@ -3,10 +3,13 @@ namespace CommandLine; using CommandLine.Helpers; using CommandLine.Models.Supabase; using CommandLine.Utils; + using Newtonsoft.Json; + using PowerSync.Common.Client; using PowerSync.Common.Client.Connection; using PowerSync.Common.DB.Crud; + using Supabase; using Supabase.Gotrue; using Supabase.Postgrest.Exceptions; @@ -172,4 +175,4 @@ await _supabase throw; } } -} \ No newline at end of file +} diff --git a/demos/CommandLine/Utils/Config.cs b/demos/CommandLine/Utils/Config.cs index 41f534e..693c6b3 100644 --- a/demos/CommandLine/Utils/Config.cs +++ b/demos/CommandLine/Utils/Config.cs @@ -48,4 +48,4 @@ private static string GetRequiredEnv(string key) return Environment.GetEnvironmentVariable(key) ?? throw new InvalidOperationException($"{key} environment variable is not set."); } -} \ No newline at end of file +} diff --git a/demos/MAUITodo/App.xaml.cs b/demos/MAUITodo/App.xaml.cs index 5d5aed0..860b05e 100644 --- a/demos/MAUITodo/App.xaml.cs +++ b/demos/MAUITodo/App.xaml.cs @@ -2,10 +2,10 @@ public partial class App : Application { - public App() - { - InitializeComponent(); + public App() + { + InitializeComponent(); - MainPage = new AppShell(); - } + MainPage = new AppShell(); + } } diff --git a/demos/MAUITodo/AppShell.xaml.cs b/demos/MAUITodo/AppShell.xaml.cs index 7bbace9..bb9a9f4 100644 --- a/demos/MAUITodo/AppShell.xaml.cs +++ b/demos/MAUITodo/AppShell.xaml.cs @@ -4,10 +4,10 @@ namespace MAUITodo; public partial class AppShell : Shell { - public AppShell() - { - InitializeComponent(); - Routing.RegisterRoute(nameof(TodoListPage), typeof(TodoListPage)); - Routing.RegisterRoute(nameof(SqlConsolePage), typeof(SqlConsolePage)); - } + public AppShell() + { + InitializeComponent(); + Routing.RegisterRoute(nameof(TodoListPage), typeof(TodoListPage)); + Routing.RegisterRoute(nameof(SqlConsolePage), typeof(SqlConsolePage)); + } } diff --git a/demos/MAUITodo/Data/AppSchema.cs b/demos/MAUITodo/Data/AppSchema.cs index 35b65d6..3b548e1 100644 --- a/demos/MAUITodo/Data/AppSchema.cs +++ b/demos/MAUITodo/Data/AppSchema.cs @@ -28,4 +28,4 @@ class AppSchema { "todos", Todos }, { "lists", Lists } }); -} \ No newline at end of file +} diff --git a/demos/MAUITodo/Data/NodeConnector.cs b/demos/MAUITodo/Data/NodeConnector.cs index cc2df51..052523f 100644 --- a/demos/MAUITodo/Data/NodeConnector.cs +++ b/demos/MAUITodo/Data/NodeConnector.cs @@ -1,5 +1,6 @@ using System.Text; using System.Text.Json; + using PowerSync.Common.Client; using PowerSync.Common.Client.Connection; using PowerSync.Common.DB.Crud; diff --git a/demos/MAUITodo/Data/PowerSyncData.cs b/demos/MAUITodo/Data/PowerSyncData.cs index 21c381c..5e2f8ba 100644 --- a/demos/MAUITodo/Data/PowerSyncData.cs +++ b/demos/MAUITodo/Data/PowerSyncData.cs @@ -1,8 +1,10 @@ -using Microsoft.Extensions.Logging; +using MAUITodo.Models; + +using Microsoft.Extensions.Logging; + using PowerSync.Common.Client; using PowerSync.Common.MDSQLite; using PowerSync.Maui.SQLite; -using MAUITodo.Models; namespace MAUITodo.Data; @@ -125,4 +127,4 @@ public async Task DeleteItemAsync(TodoItem item) { await Db.Execute("DELETE FROM todos WHERE id = ?", [item.ID]); } -} \ No newline at end of file +} diff --git a/demos/MAUITodo/MauiProgram.cs b/demos/MAUITodo/MauiProgram.cs index 8c14340..47295ea 100644 --- a/demos/MAUITodo/MauiProgram.cs +++ b/demos/MAUITodo/MauiProgram.cs @@ -1,29 +1,30 @@ -using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.Extensions.Logging; -using MAUITodo.Data; +using MAUITodo.Data; using MAUITodo.Views; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Logging; + namespace MAUITodo; public static class MauiProgram { - public static MauiApp CreateMauiApp() - { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); - }); - builder.Logging.SetMinimumLevel(LogLevel.Debug); - builder.Logging.AddDebug(); - builder.Services.AddSingleton(); - builder.Services.AddTransient(); - builder.Services.AddTransient(); - builder.Services.AddTransient(); + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); + }); + builder.Logging.SetMinimumLevel(LogLevel.Debug); + builder.Logging.AddDebug(); + builder.Services.AddSingleton(); + builder.Services.AddTransient(); + builder.Services.AddTransient(); + builder.Services.AddTransient(); - return builder.Build(); - } + return builder.Build(); + } } diff --git a/demos/MAUITodo/Models/TodoItem.cs b/demos/MAUITodo/Models/TodoItem.cs index d15a1c7..2dcfb7e 100644 --- a/demos/MAUITodo/Models/TodoItem.cs +++ b/demos/MAUITodo/Models/TodoItem.cs @@ -5,26 +5,26 @@ namespace MAUITodo.Models; public class TodoItem { [JsonProperty("id")] - public string ID { get; set; } = ""; - - [JsonProperty("list_id")] + public string ID { get; set; } = ""; + + [JsonProperty("list_id")] public string ListId { get; set; } = null!; - + [JsonProperty("created_at")] public string CreatedAt { get; set; } = null!; - + [JsonProperty("completed_at")] public string? CompletedAt { get; set; } - + [JsonProperty("description")] public string Description { get; set; } = null!; - + [JsonProperty("created_by")] public string CreatedBy { get; set; } = null!; - + [JsonProperty("completed_by")] public string CompletedBy { get; set; } = null!; - + [JsonProperty("completed")] public bool Completed { get; set; } } diff --git a/demos/MAUITodo/Models/TodoList.cs b/demos/MAUITodo/Models/TodoList.cs index f67a81b..1b19f4f 100644 --- a/demos/MAUITodo/Models/TodoList.cs +++ b/demos/MAUITodo/Models/TodoList.cs @@ -5,14 +5,14 @@ namespace MAUITodo.Models; public class TodoList { [JsonProperty("id")] - public string ID { get; set; } = ""; - + public string ID { get; set; } = ""; + [JsonProperty("created_at")] public string CreatedAt { get; set; } = null!; - + [JsonProperty("name")] public string Name { get; set; } = null!; - + [JsonProperty("owner_id")] - public string OwnerId { get; set; }= null!; -} \ No newline at end of file + public string OwnerId { get; set; } = null!; +} diff --git a/demos/MAUITodo/Platforms/Android/MainApplication.cs b/demos/MAUITodo/Platforms/Android/MainApplication.cs index 98bfe0d..0bcb922 100644 --- a/demos/MAUITodo/Platforms/Android/MainApplication.cs +++ b/demos/MAUITodo/Platforms/Android/MainApplication.cs @@ -6,10 +6,10 @@ namespace MAUITodo; [Application] public class MainApplication : MauiApplication { - public MainApplication(IntPtr handle, JniHandleOwnership ownership) - : base(handle, ownership) - { - } + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); } diff --git a/demos/MAUITodo/Platforms/iOS/AppDelegate.cs b/demos/MAUITodo/Platforms/iOS/AppDelegate.cs index cd3713f..d199c98 100644 --- a/demos/MAUITodo/Platforms/iOS/AppDelegate.cs +++ b/demos/MAUITodo/Platforms/iOS/AppDelegate.cs @@ -5,5 +5,5 @@ namespace MAUITodo; [Register("AppDelegate")] public class AppDelegate : MauiUIApplicationDelegate { - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); } diff --git a/demos/MAUITodo/Platforms/iOS/Program.cs b/demos/MAUITodo/Platforms/iOS/Program.cs index 838545d..444319f 100644 --- a/demos/MAUITodo/Platforms/iOS/Program.cs +++ b/demos/MAUITodo/Platforms/iOS/Program.cs @@ -1,15 +1,16 @@ using ObjCRuntime; + using UIKit; namespace MAUITodo; public class Program { - // This is the main entry point of the application. - static void Main(string[] args) - { - // if you want to use a different Application Delegate class from "AppDelegate" - // you can specify it here. - UIApplication.Main(args, null, typeof(AppDelegate)); - } + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } } diff --git a/demos/MAUITodo/Views/ListsPage.xaml.cs b/demos/MAUITodo/Views/ListsPage.xaml.cs index a4df8d3..5103795 100644 --- a/demos/MAUITodo/Views/ListsPage.xaml.cs +++ b/demos/MAUITodo/Views/ListsPage.xaml.cs @@ -1,6 +1,7 @@ -using PowerSync.Common.Client; -using MAUITodo.Models; using MAUITodo.Data; +using MAUITodo.Models; + +using PowerSync.Common.Client; namespace MAUITodo.Views; @@ -18,7 +19,7 @@ public ListsPage(PowerSyncData powerSyncData) protected override async void OnAppearing() { base.OnAppearing(); - + database.Db.RunListener((update) => { if (update.StatusChanged != null) @@ -30,7 +31,7 @@ protected override async void OnAppearing() } }); - + await database.Db.Watch("select * from lists", null, new WatchHandler { OnResult = (results) => @@ -77,4 +78,4 @@ private async void OnListSelected(object sender, SelectionChangedEventArgs e) ListsCollection.SelectedItem = null; } } -} \ No newline at end of file +} diff --git a/demos/MAUITodo/Views/SqlConsolePage.xaml.cs b/demos/MAUITodo/Views/SqlConsolePage.xaml.cs index 2d8af71..2cd3aaa 100644 --- a/demos/MAUITodo/Views/SqlConsolePage.xaml.cs +++ b/demos/MAUITodo/Views/SqlConsolePage.xaml.cs @@ -1,15 +1,17 @@ using System.Collections.ObjectModel; using System.Reflection; + +using MAUITodo.Data; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using MAUITodo.Data; namespace MAUITodo.Views; public partial class SqlConsolePage : ContentPage { private readonly PowerSyncData database; - + public SqlConsolePage(PowerSyncData powerSyncData) { InitializeComponent(); @@ -19,23 +21,23 @@ public SqlConsolePage(PowerSyncData powerSyncData) private async void OnQuerySubmitted(object sender, EventArgs e) { Headers.Text = ""; - Results.Text = ""; + Results.Text = ""; try { var query = QueryEntry.Text; if (string.IsNullOrWhiteSpace(query)) return; - + var results = await database.Db.GetAll(query); - - var keys = JObject.Parse(JsonConvert.SerializeObject(results[0])).Properties().Select(p => p.Name).ToList(); + + var keys = JObject.Parse(JsonConvert.SerializeObject(results[0])).Properties().Select(p => p.Name).ToList(); var allValues = results .Select(result => JObject.Parse(JsonConvert.SerializeObject(result)) .Properties() .Select(p => p.Value.ToObject()) .ToList()) .ToList(); - + Console.WriteLine($"Results count: {JsonConvert.SerializeObject(keys)}"); Console.WriteLine($"Results count \n: {JsonConvert.SerializeObject(allValues)}"); @@ -47,4 +49,4 @@ private async void OnQuerySubmitted(object sender, EventArgs e) await DisplayAlert("Error", ex.Message, "OK"); } } -} \ No newline at end of file +} diff --git a/demos/MAUITodo/Views/TodoListPage.xaml.cs b/demos/MAUITodo/Views/TodoListPage.xaml.cs index a46a639..e709593 100644 --- a/demos/MAUITodo/Views/TodoListPage.xaml.cs +++ b/demos/MAUITodo/Views/TodoListPage.xaml.cs @@ -1,7 +1,8 @@ -using PowerSync.Common.Client; -using MAUITodo.Data; +using MAUITodo.Data; using MAUITodo.Models; +using PowerSync.Common.Client; + namespace MAUITodo.Views; public partial class TodoListPage @@ -100,4 +101,3 @@ private async void OnItemSelected(object sender, SelectionChangedEventArgs e) } } } - diff --git a/demos/WPF/App.xaml.cs b/demos/WPF/App.xaml.cs index 0479cf1..00d4533 100644 --- a/demos/WPF/App.xaml.cs +++ b/demos/WPF/App.xaml.cs @@ -1,8 +1,11 @@ using System.Diagnostics; using System.Windows; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + using PowerSync.Common.Client; + using PowersyncDotnetTodoList.Models; using PowersyncDotnetTodoList.Services; using PowersyncDotnetTodoList.ViewModels; diff --git a/demos/WPF/AssemblyInfo.cs b/demos/WPF/AssemblyInfo.cs index cc29e7f..b0ec827 100644 --- a/demos/WPF/AssemblyInfo.cs +++ b/demos/WPF/AssemblyInfo.cs @@ -1,6 +1,6 @@ using System.Windows; -[assembly:ThemeInfo( +[assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) diff --git a/demos/WPF/MainWindow.xaml.cs b/demos/WPF/MainWindow.xaml.cs index 26047c2..19ec57d 100644 --- a/demos/WPF/MainWindow.xaml.cs +++ b/demos/WPF/MainWindow.xaml.cs @@ -1,4 +1,5 @@ using System.Windows; + using PowersyncDotnetTodoList.ViewModels; namespace PowersyncDotnetTodoList; diff --git a/demos/WPF/Services/INavigationService.cs b/demos/WPF/Services/INavigationService.cs index b009d00..a4a3338 100644 --- a/demos/WPF/Services/INavigationService.cs +++ b/demos/WPF/Services/INavigationService.cs @@ -1,5 +1,7 @@ using System.Windows.Controls; + using Microsoft.Extensions.DependencyInjection; + using PowersyncDotnetTodoList.Models; using PowersyncDotnetTodoList.ViewModels; using PowersyncDotnetTodoList.Views; diff --git a/demos/WPF/Services/PowerSyncConnector.cs b/demos/WPF/Services/PowerSyncConnector.cs index 8ca5a07..d27efae 100644 --- a/demos/WPF/Services/PowerSyncConnector.cs +++ b/demos/WPF/Services/PowerSyncConnector.cs @@ -2,7 +2,9 @@ using System.Net.Http; using System.Text; using System.Text.Json; + using DotNetEnv; + using PowerSync.Common.Client; using PowerSync.Common.Client.Connection; using PowerSync.Common.DB.Crud; diff --git a/demos/WPF/ViewModels/MainWindowViewModel.cs b/demos/WPF/ViewModels/MainWindowViewModel.cs index 7b596d4..6297ab3 100644 --- a/demos/WPF/ViewModels/MainWindowViewModel.cs +++ b/demos/WPF/ViewModels/MainWindowViewModel.cs @@ -1,5 +1,6 @@ using System.ComponentModel; using System.Runtime.CompilerServices; + using PowerSync.Common.Client; namespace PowersyncDotnetTodoList.ViewModels diff --git a/demos/WPF/ViewModels/SQLConsoleViewModel.cs b/demos/WPF/ViewModels/SQLConsoleViewModel.cs index f655bbf..bf4cce9 100644 --- a/demos/WPF/ViewModels/SQLConsoleViewModel.cs +++ b/demos/WPF/ViewModels/SQLConsoleViewModel.cs @@ -3,8 +3,11 @@ using System.Collections.ObjectModel; using System.Threading.Tasks; using System.Windows.Input; + using Newtonsoft.Json; + using PowerSync.Common.Client; + using PowersyncDotnetTodoList.Services; namespace PowersyncDotnetTodoList.ViewModels diff --git a/demos/WPF/ViewModels/TodoListViewModel.cs b/demos/WPF/ViewModels/TodoListViewModel.cs index 2104d96..c27ff90 100644 --- a/demos/WPF/ViewModels/TodoListViewModel.cs +++ b/demos/WPF/ViewModels/TodoListViewModel.cs @@ -1,7 +1,9 @@ using System.Collections.ObjectModel; using System.Threading.Tasks; using System.Windows.Input; + using PowerSync.Common.Client; + using PowersyncDotnetTodoList.Models; using PowersyncDotnetTodoList.Services; using PowersyncDotnetTodoList.Views; diff --git a/demos/WPF/ViewModels/TodoViewModel.cs b/demos/WPF/ViewModels/TodoViewModel.cs index 726e32a..85cd1e8 100644 --- a/demos/WPF/ViewModels/TodoViewModel.cs +++ b/demos/WPF/ViewModels/TodoViewModel.cs @@ -1,6 +1,8 @@ using System.Collections.ObjectModel; using System.Windows.Input; + using PowerSync.Common.Client; + using PowersyncDotnetTodoList.Models; using PowersyncDotnetTodoList.Services;