diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..f8d20ed2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,280 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Don't use tabs for indentation. +[*] +indent_style = space +# (Please don't specify an indent_size here; that has too many unintended consequences.) + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +insert_final_newline = true +charset = utf-8-bom + +# XML project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 2 + +# XML config files +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] +indent_size = 2 + +# JSON files +[*.json] +indent_size = 2 + +# Powershell files +[*.ps1] +indent_size = 2 + +# Shell script files +[*.sh] +end_of_line = lf +indent_size = 2 + +# Dotnet code style settings: +[*.{cs,vb}] + +# IDE0055: Fix formatting +dotnet_diagnostic.IDE0055.severity = warning + +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = false +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:refactoring +dotnet_style_qualification_for_property = false:refactoring +dotnet_style_qualification_for_method = false:refactoring +dotnet_style_qualification_for_event = false:refactoring + +# Use language keywords instead of framework type names for type references +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# Suggest more modern language features when available +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion + +# Non-private static fields are PascalCase +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style + +dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected +dotnet_naming_symbols.non_private_static_fields.required_modifiers = static + +dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case + +# Non-private readonly fields are PascalCase +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style + +dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected +dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly + +dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case + +# Constants are PascalCase +dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants +dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style + +dotnet_naming_symbols.constants.applicable_kinds = field, local +dotnet_naming_symbols.constants.required_modifiers = const + +dotnet_naming_style.constant_style.capitalization = pascal_case + +# Static fields are camelCase and start with s_ +dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion +dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields +dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style + +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static + +dotnet_naming_style.static_field_style.capitalization = camel_case +dotnet_naming_style.static_field_style.required_prefix = s_ + +# Instance fields are camelCase and start with _ +dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion +dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields +dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style + +dotnet_naming_symbols.instance_fields.applicable_kinds = field + +dotnet_naming_style.instance_field_style.capitalization = camel_case +dotnet_naming_style.instance_field_style.required_prefix = _ +dotnet_naming_style.instance_field_style.required_prefix.severity = warning + +# Locals and parameters are camelCase +dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion +dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters +dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style + +dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local + +dotnet_naming_style.camel_case_style.capitalization = camel_case + +# Local functions are PascalCase +dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function + +dotnet_naming_style.local_function_style.capitalization = pascal_case + +# By default, name items with PascalCase +dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members +dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style + +dotnet_naming_symbols.all_members.applicable_kinds = * + +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# error RS2008: Enable analyzer release tracking for the analyzer project containing rule '{0}' +dotnet_diagnostic.RS2008.severity = none + +# IDE0073: File header +# dotnet_diagnostic.IDE0073.severity = warning +# file_header_template = + +# IDE0035: Remove unreachable code +dotnet_diagnostic.IDE0035.severity = warning + +# IDE0036: Order modifiers +dotnet_diagnostic.IDE0036.severity = warning + +# IDE0043: Format string contains invalid placeholder +dotnet_diagnostic.IDE0043.severity = warning + +# IDE0044: Make field readonly +dotnet_diagnostic.IDE0044.severity = warning + +# RS0016: Only enable if API files are present +dotnet_public_api_analyzer.require_api_files = true + +# CSharp code style settings: +[*.cs] +# Newline settings +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +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_switch_labels = true +csharp_indent_labels = flush_left + +# Prefer "var" everywhere +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion + +# Prefer method-like constructs to have a block body +csharp_style_expression_bodied_methods = false:none +csharp_style_expression_bodied_constructors = false:none +csharp_style_expression_bodied_operators = false:none + +# Prefer property-like constructs to have an expression-body +csharp_style_expression_bodied_properties = true:none +csharp_style_expression_bodied_indexers = true:none +csharp_style_expression_bodied_accessors = true:none + +# Suggest more modern language features when available +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# 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 = do_not_ignore +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 + +# Blocks are allowed +csharp_prefer_braces = true:silent +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +[src/CodeStyle/**.{cs,vb}] +# warning RS0005: Do not use generic CodeAction.Create to create CodeAction +dotnet_diagnostic.RS0005.severity = none + +[src/{Analyzers,CodeStyle,Features,Workspaces,EditorFeatures,VisualStudio}/**/*.{cs,vb}] + +# IDE0011: Add braces +csharp_prefer_braces = when_multiline:warning +# NOTE: We need the below severity entry for Add Braces due to https://github.com/dotnet/roslyn/issues/44201 +dotnet_diagnostic.IDE0011.severity = warning + +# IDE0040: Add accessibility modifiers +dotnet_diagnostic.IDE0040.severity = warning + +# CONSIDER: Are IDE0051 and IDE0052 too noisy to be warnings for IDE editing scenarios? Should they be made build-only warnings? +# IDE0051: Remove unused private member +dotnet_diagnostic.IDE0051.severity = warning + +# IDE0052: Remove unread private member +dotnet_diagnostic.IDE0052.severity = warning + +# IDE0059: Unnecessary assignment to a value +dotnet_diagnostic.IDE0059.severity = warning + +# IDE0060: Remove unused parameter +dotnet_diagnostic.IDE0060.severity = warning + +# CA1012: Abstract types should not have public constructors +dotnet_diagnostic.CA1012.severity = warning + +# CA1822: Make member static +dotnet_diagnostic.CA1822.severity = warning + +# Prefer "var" everywhere +dotnet_diagnostic.IDE0007.severity = warning +csharp_style_var_for_built_in_types = true:warning +csharp_style_var_when_type_is_apparent = true:warning +csharp_style_var_elsewhere = true:warning + +[src/{VisualStudio}/**/*.{cs,vb}] +# CA1822: Make member static +# Not enforced as a build 'warning' for 'VisualStudio' layer due to large number of false positives from https://github.com/dotnet/roslyn-analyzers/issues/3857 and https://github.com/dotnet/roslyn-analyzers/issues/3858 +# Additionally, there is a risk of accidentally breaking an internal API that partners rely on though IVT. +dotnet_diagnostic.CA1822.severity = suggestion \ No newline at end of file diff --git a/Notion.sln b/Notion.sln index 2ce5a778..86e523f7 100644 --- a/Notion.sln +++ b/Notion.sln @@ -5,11 +5,16 @@ VisualStudioVersion = 16.6.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{4A92506A-3CF1-4E86-B9FD-D5F109655D87}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notion.Client", "Src\Notion.Client\Notion.Client.csproj", "{BF5F85F3-901C-40B0-8357-A1919F89AE2E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notion.Client", "Src\Notion.Client\Notion.Client.csproj", "{BF5F85F3-901C-40B0-8357-A1919F89AE2E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{F474CF12-E2AC-4388-B764-BAE891D307B8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notion.UnitTests", "Test\Notion.UnitTests\Notion.UnitTests.csproj", "{B3AE07EA-49CC-4A86-A2D4-04E1FF00AB04}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notion.UnitTests", "Test\Notion.UnitTests\Notion.UnitTests.csproj", "{B3AE07EA-49CC-4A86-A2D4-04E1FF00AB04}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1C2A6790-B7D6-4CFA-B572-E6B3BA482A7F}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -20,9 +25,6 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BF5F85F3-901C-40B0-8357-A1919F89AE2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BF5F85F3-901C-40B0-8357-A1919F89AE2E}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -49,8 +51,14 @@ Global {B3AE07EA-49CC-4A86-A2D4-04E1FF00AB04}.Release|x86.ActiveCfg = Release|Any CPU {B3AE07EA-49CC-4A86-A2D4-04E1FF00AB04}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection GlobalSection(NestedProjects) = preSolution {BF5F85F3-901C-40B0-8357-A1919F89AE2E} = {4A92506A-3CF1-4E86-B9FD-D5F109655D87} {B3AE07EA-49CC-4A86-A2D4-04E1FF00AB04} = {F474CF12-E2AC-4388-B764-BAE891D307B8} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3C5C8AC9-88CA-4079-BC0B-C1A81248B0B1} + EndGlobalSection EndGlobal diff --git a/Src/Notion.Client/Api/ApiEndpoints.cs b/Src/Notion.Client/Api/ApiEndpoints.cs index dfd3615d..d9ba5205 100644 --- a/Src/Notion.Client/Api/ApiEndpoints.cs +++ b/Src/Notion.Client/Api/ApiEndpoints.cs @@ -21,4 +21,4 @@ public static class BlocksApiUrls public static string AppendChildren(string blockId) => $"/v1/blocks/{blockId}/children"; } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Api/Blocks/BlocksClient.cs b/Src/Notion.Client/Api/Blocks/BlocksClient.cs index d68552d9..33f048d6 100644 --- a/Src/Notion.Client/Api/Blocks/BlocksClient.cs +++ b/Src/Notion.Client/Api/Blocks/BlocksClient.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading.Tasks; using static Notion.Client.ApiEndpoints; diff --git a/Src/Notion.Client/Api/Blocks/RequestParams/BlocksAppendChildrenParameters.cs b/Src/Notion.Client/Api/Blocks/RequestParams/BlocksAppendChildrenParameters.cs index 66568db5..a2ad3440 100644 --- a/Src/Notion.Client/Api/Blocks/RequestParams/BlocksAppendChildrenParameters.cs +++ b/Src/Notion.Client/Api/Blocks/RequestParams/BlocksAppendChildrenParameters.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Notion.Client { diff --git a/Src/Notion.Client/Api/Blocks/RequestParams/BlocksRetrieveChildrenParameters.cs b/Src/Notion.Client/Api/Blocks/RequestParams/BlocksRetrieveChildrenParameters.cs index 43fc5575..52a2685f 100644 --- a/Src/Notion.Client/Api/Blocks/RequestParams/BlocksRetrieveChildrenParameters.cs +++ b/Src/Notion.Client/Api/Blocks/RequestParams/BlocksRetrieveChildrenParameters.cs @@ -1,4 +1,4 @@ -namespace Notion.Client +namespace Notion.Client { public class BlocksRetrieveChildrenParameters : IBlocksRetrieveChildrenQueryParameters { diff --git a/Src/Notion.Client/Api/Databases/DatabasesClient.cs b/Src/Notion.Client/Api/Databases/DatabasesClient.cs index 8d2eed5b..b1ca9227 100644 --- a/Src/Notion.Client/Api/Databases/DatabasesClient.cs +++ b/Src/Notion.Client/Api/Databases/DatabasesClient.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; using static Notion.Client.ApiEndpoints; @@ -38,4 +38,4 @@ public async Task> QueryAsync(string databaseId, DatabasesQu return await _client.PostAsync>(DatabasesApiUrls.Query(databaseId), body); } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Api/Databases/IDatabasesClient.cs b/Src/Notion.Client/Api/Databases/IDatabasesClient.cs index 91d00f60..43d0250f 100644 --- a/Src/Notion.Client/Api/Databases/IDatabasesClient.cs +++ b/Src/Notion.Client/Api/Databases/IDatabasesClient.cs @@ -8,4 +8,4 @@ public interface IDatabasesClient Task> QueryAsync(string databaseId, DatabasesQueryParameters databasesQueryParameters); Task> ListAsync(DatabasesListParameters databasesListParameters = null); } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Api/Databases/RequestParams/Sort.cs b/Src/Notion.Client/Api/Databases/RequestParams/Sort.cs index 36c029e8..d8ccc878 100644 --- a/Src/Notion.Client/Api/Databases/RequestParams/Sort.cs +++ b/Src/Notion.Client/Api/Databases/RequestParams/Sort.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Notion.Client diff --git a/Src/Notion.Client/Extensions/HttpResponseMessageExtensions.cs b/Src/Notion.Client/Extensions/HttpResponseMessageExtensions.cs index d7f2b894..9b01580d 100644 --- a/Src/Notion.Client/Extensions/HttpResponseMessageExtensions.cs +++ b/Src/Notion.Client/Extensions/HttpResponseMessageExtensions.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Net.Http; using System.Threading.Tasks; using Newtonsoft.Json; @@ -32,4 +32,4 @@ internal static async Task ParseStreamAsync(this HttpResponseMessage respo } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/Block.cs b/Src/Notion.Client/Models/Blocks/Block.cs index 9b0b37e0..d52d5c1b 100644 --- a/Src/Notion.Client/Models/Blocks/Block.cs +++ b/Src/Notion.Client/Models/Blocks/Block.cs @@ -1,4 +1,4 @@ -using JsonSubTypes; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/Src/Notion.Client/Models/Blocks/BlockType.cs b/Src/Notion.Client/Models/Blocks/BlockType.cs index 366ffe2c..24c07566 100644 --- a/Src/Notion.Client/Models/Blocks/BlockType.cs +++ b/Src/Notion.Client/Models/Blocks/BlockType.cs @@ -34,4 +34,4 @@ public enum BlockType [EnumMember(Value = "unsupported")] Unsupported } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/BulletedListItemBlock.cs b/Src/Notion.Client/Models/Blocks/BulletedListItemBlock.cs index 7bf95457..83f31c83 100644 --- a/Src/Notion.Client/Models/Blocks/BulletedListItemBlock.cs +++ b/Src/Notion.Client/Models/Blocks/BulletedListItemBlock.cs @@ -16,4 +16,4 @@ public class Info public IEnumerable Children { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/ChildPageBlock.cs b/Src/Notion.Client/Models/Blocks/ChildPageBlock.cs index a4c6ec8d..66a9489d 100644 --- a/Src/Notion.Client/Models/Blocks/ChildPageBlock.cs +++ b/Src/Notion.Client/Models/Blocks/ChildPageBlock.cs @@ -14,4 +14,4 @@ public class Info public string Title { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/HeadingOneBlock.cs b/Src/Notion.Client/Models/Blocks/HeadingOneBlock.cs index 6eb35337..7cab0370 100644 --- a/Src/Notion.Client/Models/Blocks/HeadingOneBlock.cs +++ b/Src/Notion.Client/Models/Blocks/HeadingOneBlock.cs @@ -17,4 +17,4 @@ public class Info public IEnumerable Text { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/HeadingThreeeBlock.cs b/Src/Notion.Client/Models/Blocks/HeadingThreeeBlock.cs index ea8eb4a4..d64b57fa 100644 --- a/Src/Notion.Client/Models/Blocks/HeadingThreeeBlock.cs +++ b/Src/Notion.Client/Models/Blocks/HeadingThreeeBlock.cs @@ -17,4 +17,4 @@ public class Info public IEnumerable Text { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/HeadingTwoBlock.cs b/Src/Notion.Client/Models/Blocks/HeadingTwoBlock.cs index 23dfe36e..88835f3c 100644 --- a/Src/Notion.Client/Models/Blocks/HeadingTwoBlock.cs +++ b/Src/Notion.Client/Models/Blocks/HeadingTwoBlock.cs @@ -17,4 +17,4 @@ public class Info public IEnumerable Text { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/NumberedListItemBlock.cs b/Src/Notion.Client/Models/Blocks/NumberedListItemBlock.cs index 4716cee7..27fc29fd 100644 --- a/Src/Notion.Client/Models/Blocks/NumberedListItemBlock.cs +++ b/Src/Notion.Client/Models/Blocks/NumberedListItemBlock.cs @@ -16,4 +16,4 @@ public class Info public IEnumerable Children { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/ParagraphBlock.cs b/Src/Notion.Client/Models/Blocks/ParagraphBlock.cs index 99353606..96b4c239 100644 --- a/Src/Notion.Client/Models/Blocks/ParagraphBlock.cs +++ b/Src/Notion.Client/Models/Blocks/ParagraphBlock.cs @@ -14,4 +14,4 @@ public class Info public IEnumerable Children { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/ToDoBlock.cs b/Src/Notion.Client/Models/Blocks/ToDoBlock.cs index d99a5ddb..aeff42f2 100644 --- a/Src/Notion.Client/Models/Blocks/ToDoBlock.cs +++ b/Src/Notion.Client/Models/Blocks/ToDoBlock.cs @@ -20,4 +20,4 @@ public class Info public IEnumerable Children { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/ToggleBlock.cs b/Src/Notion.Client/Models/Blocks/ToggleBlock.cs index 6865ce3e..6fc6f3df 100644 --- a/Src/Notion.Client/Models/Blocks/ToggleBlock.cs +++ b/Src/Notion.Client/Models/Blocks/ToggleBlock.cs @@ -14,4 +14,4 @@ public class Info public IEnumerable Children { get; set; } } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Blocks/UnsupportedBlock.cs b/Src/Notion.Client/Models/Blocks/UnsupportedBlock.cs index 0e60cfc5..b275813a 100644 --- a/Src/Notion.Client/Models/Blocks/UnsupportedBlock.cs +++ b/Src/Notion.Client/Models/Blocks/UnsupportedBlock.cs @@ -4,4 +4,4 @@ public class UnsupportedBlock : Block { public override BlockType Type => BlockType.Unsupported; } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Database/Database.cs b/Src/Notion.Client/Models/Database/Database.cs index 5568b6c0..0fb81a6f 100644 --- a/Src/Notion.Client/Models/Database/Database.cs +++ b/Src/Notion.Client/Models/Database/Database.cs @@ -1,6 +1,6 @@ -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { @@ -19,4 +19,4 @@ public class Database public Dictionary Properties { get; set; } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Database/Properties/CreatedByProperty.cs b/Src/Notion.Client/Models/Database/Properties/CreatedByProperty.cs index a672016d..bb5e890c 100644 --- a/Src/Notion.Client/Models/Database/Properties/CreatedByProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/CreatedByProperty.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System.Collections.Generic; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/CreatedTimeProperty.cs b/Src/Notion.Client/Models/Database/Properties/CreatedTimeProperty.cs index 1df55fd8..21ccc4f0 100644 --- a/Src/Notion.Client/Models/Database/Properties/CreatedTimeProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/CreatedTimeProperty.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System.Collections.Generic; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/LastEditedByProperty.cs b/Src/Notion.Client/Models/Database/Properties/LastEditedByProperty.cs index 67de4c78..4fd8985a 100644 --- a/Src/Notion.Client/Models/Database/Properties/LastEditedByProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/LastEditedByProperty.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System.Collections.Generic; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/LastEditedTimeProperty.cs b/Src/Notion.Client/Models/Database/Properties/LastEditedTimeProperty.cs index 9fefcfbb..530cf8b8 100644 --- a/Src/Notion.Client/Models/Database/Properties/LastEditedTimeProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/LastEditedTimeProperty.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System.Collections.Generic; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/NumberProperty.cs b/Src/Notion.Client/Models/Database/Properties/NumberProperty.cs index f3d52c01..782f046b 100644 --- a/Src/Notion.Client/Models/Database/Properties/NumberProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/NumberProperty.cs @@ -1,6 +1,6 @@ -using Newtonsoft.Json; +using System.Runtime.Serialization; +using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using System.Runtime.Serialization; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/PhoneNumberProperty.cs b/Src/Notion.Client/Models/Database/Properties/PhoneNumberProperty.cs index aeda8a5a..04fa5453 100644 --- a/Src/Notion.Client/Models/Database/Properties/PhoneNumberProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/PhoneNumberProperty.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System.Collections.Generic; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/RichTextProperty.cs b/Src/Notion.Client/Models/Database/Properties/RichTextProperty.cs index 777dad99..a6e73f87 100644 --- a/Src/Notion.Client/Models/Database/Properties/RichTextProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/RichTextProperty.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System.Collections.Generic; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/RollupProperty.cs b/Src/Notion.Client/Models/Database/Properties/RollupProperty.cs index f9d70021..a0617595 100644 --- a/Src/Notion.Client/Models/Database/Properties/RollupProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/RollupProperty.cs @@ -1,6 +1,6 @@ -using Newtonsoft.Json; +using System.Runtime.Serialization; +using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using System.Runtime.Serialization; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Database/Properties/SelectProperty.cs b/Src/Notion.Client/Models/Database/Properties/SelectProperty.cs index 949d5fb5..23d60afc 100644 --- a/Src/Notion.Client/Models/Database/Properties/SelectProperty.cs +++ b/Src/Notion.Client/Models/Database/Properties/SelectProperty.cs @@ -1,7 +1,7 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.Collections.Generic; +using System.Collections.Generic; using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; namespace Notion.Client { diff --git a/Src/Notion.Client/Models/Filter.cs b/Src/Notion.Client/Models/Filter.cs index d705680c..44448b94 100644 --- a/Src/Notion.Client/Models/Filter.cs +++ b/Src/Notion.Client/Models/Filter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Converters; @@ -205,4 +205,4 @@ public class CompoundFilter : Filter public List Or { get; set; } public List And { get; set; } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Page/DatabaseParent.cs b/Src/Notion.Client/Models/Page/DatabaseParent.cs index d0de9474..aaa8a343 100644 --- a/Src/Notion.Client/Models/Page/DatabaseParent.cs +++ b/Src/Notion.Client/Models/Page/DatabaseParent.cs @@ -7,4 +7,4 @@ public class DatabaseParent : Parent [JsonProperty("database_id")] public string DatabaseId { get; set; } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Page/Page.cs b/Src/Notion.Client/Models/Page/Page.cs index c8ac40cd..12650b0f 100644 --- a/Src/Notion.Client/Models/Page/Page.cs +++ b/Src/Notion.Client/Models/Page/Page.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Newtonsoft.Json; @@ -21,4 +21,4 @@ public class Page public IDictionary Properties { get; set; } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Page/PageParent.cs b/Src/Notion.Client/Models/Page/PageParent.cs index 38f2aaac..a862ffb7 100644 --- a/Src/Notion.Client/Models/Page/PageParent.cs +++ b/Src/Notion.Client/Models/Page/PageParent.cs @@ -7,4 +7,4 @@ public class PageParent : Parent [JsonProperty("page_id")] public string PageId { get; set; } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Page/Parent.cs b/Src/Notion.Client/Models/Page/Parent.cs index d7505f5f..90a91e5b 100644 --- a/Src/Notion.Client/Models/Page/Parent.cs +++ b/Src/Notion.Client/Models/Page/Parent.cs @@ -13,4 +13,4 @@ public class Parent [JsonConverter(typeof(StringEnumConverter))] public ParentType Type { get; set; } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Page/ParentType.cs b/Src/Notion.Client/Models/Page/ParentType.cs index 0c728621..9d40bf03 100644 --- a/Src/Notion.Client/Models/Page/ParentType.cs +++ b/Src/Notion.Client/Models/Page/ParentType.cs @@ -15,4 +15,4 @@ public enum ParentType [EnumMember(Value = "workspace")] Workspace } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/Page/WorkspaceParent.cs b/Src/Notion.Client/Models/Page/WorkspaceParent.cs index b074285b..001db6dd 100644 --- a/Src/Notion.Client/Models/Page/WorkspaceParent.cs +++ b/Src/Notion.Client/Models/Page/WorkspaceParent.cs @@ -3,4 +3,4 @@ public class WorkspaceParent : Parent { } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/Models/PaginatedList.cs b/Src/Notion.Client/Models/PaginatedList.cs index b72304f9..e4d1c522 100644 --- a/Src/Notion.Client/Models/PaginatedList.cs +++ b/Src/Notion.Client/Models/PaginatedList.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System.Collections.Generic; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Notion.Client { diff --git a/Src/Notion.Client/NotionApiException.cs b/Src/Notion.Client/NotionApiException.cs index aa8ffa4a..d8641ae5 100644 --- a/Src/Notion.Client/NotionApiException.cs +++ b/Src/Notion.Client/NotionApiException.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net; namespace Notion.Client @@ -14,4 +14,4 @@ public NotionApiException(HttpStatusCode statusCode, string message, Exception i Data.Add("StatusCode", statusCode); } } -} \ No newline at end of file +} diff --git a/Src/Notion.Client/http/QueryHelpers.cs b/Src/Notion.Client/http/QueryHelpers.cs index cd2ab3e4..783ae20e 100644 --- a/Src/Notion.Client/http/QueryHelpers.cs +++ b/Src/Notion.Client/http/QueryHelpers.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net; @@ -93,4 +93,4 @@ private static IEnumerable> RemoveEmptyValueQueryPa } } -} \ No newline at end of file +} diff --git a/Test/Notion.UnitTests/BlocksClientTests.cs b/Test/Notion.UnitTests/BlocksClientTests.cs index 153caa3d..5a9e8f72 100644 --- a/Test/Notion.UnitTests/BlocksClientTests.cs +++ b/Test/Notion.UnitTests/BlocksClientTests.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; using Notion.Client; using Xunit; @@ -62,4 +62,4 @@ public async Task AppendBlockChildren() Assert.NotNull(block); } } -} \ No newline at end of file +} diff --git a/Test/Notion.UnitTests/DatabasesClientTests.cs b/Test/Notion.UnitTests/DatabasesClientTests.cs index 6d649fbb..dbdd3528 100644 --- a/Test/Notion.UnitTests/DatabasesClientTests.cs +++ b/Test/Notion.UnitTests/DatabasesClientTests.cs @@ -1,6 +1,6 @@ -using System.Threading.Tasks; -using Xunit; +using System.Threading.Tasks; using Notion.Client; +using Xunit; namespace Notion.UnitTests { @@ -43,4 +43,4 @@ public async Task QueryAsync() Assert.NotNull(pagesList); } } -} \ No newline at end of file +} diff --git a/Test/Notion.UnitTests/UserClientTest.cs b/Test/Notion.UnitTests/UserClientTest.cs index c1251ce3..dfbe666b 100644 --- a/Test/Notion.UnitTests/UserClientTest.cs +++ b/Test/Notion.UnitTests/UserClientTest.cs @@ -1,5 +1,5 @@ +using System.Threading.Tasks; using Notion.Client; -using System.Threading.Tasks; using Xunit; namespace Notion.UnitTests