From fe2322a6965fd7e9e7a1022151bbc7d8cc7348ca Mon Sep 17 00:00:00 2001 From: Jon Gallant <2163001+jongio@users.noreply.github.com> Date: Fri, 2 May 2025 15:57:33 -0700 Subject: [PATCH] Sync .editorconfig and .gitattributes with azsdk repo (#91) * Refactor code to ensure consistent formatting and improve readability across multiple files - Added missing newlines at the end of several C# files to comply with coding standards. - Reorganized using directives for better clarity in various service and model files. - Enhanced code readability by breaking long lines and ensuring proper indentation. - Updated tests to maintain consistency with the refactored code structure. - Introduced a .gitattributes file to manage line endings and text attributes for various file types. * Add copyright and license comments to EnvironmentVariableHelpers.cs --- .editorconfig | 399 ++++++++---------- .gitattributes | 8 + .../AppConfig/Account/AccountListArguments.cs | 2 +- .../AppConfig/BaseAppConfigArguments.cs | 4 +- .../KeyValue/BaseKeyValueArguments.cs | 4 +- .../KeyValue/KeyValueDeleteArguments.cs | 2 +- .../KeyValue/KeyValueListArguments.cs | 4 +- .../KeyValue/KeyValueLockArguments.cs | 2 +- .../KeyValue/KeyValueSetArguments.cs | 4 +- .../KeyValue/KeyValueShowArguments.cs | 2 +- .../KeyValue/KeyValueUnlockArguments.cs | 2 +- src/Arguments/AuthMethodArgument.cs | 4 +- src/Arguments/Cosmos/AccountListArguments.cs | 2 +- .../Cosmos/BaseContainerArguments.cs | 4 +- src/Arguments/Cosmos/BaseCosmosArguments.cs | 4 +- src/Arguments/Cosmos/BaseDatabaseArguments.cs | 4 +- .../Cosmos/ContainerListArguments.cs | 2 +- src/Arguments/Cosmos/DatabaseListArguments.cs | 2 +- src/Arguments/Cosmos/ItemQueryArguments.cs | 4 +- src/Arguments/Extension/AzArguments.cs | 4 +- src/Arguments/Extension/AzdArguments.cs | 4 +- src/Arguments/GlobalArguments.cs | 4 +- src/Arguments/Group/BaseGroupArguments.cs | 2 +- src/Arguments/Monitor/BaseMonitorArguments.cs | 2 +- src/Arguments/Monitor/IWorkspaceArguments.cs | 2 +- src/Arguments/Monitor/LogQueryArguments.cs | 4 +- src/Arguments/Monitor/TableListArguments.cs | 4 +- .../Monitor/WorkspaceListArguments.cs | 2 +- src/Arguments/ParseResultExtensions.cs | 2 +- src/Arguments/RetryPolicyArguments.cs | 19 +- src/Arguments/Search/BaseSearchArguments.cs | 4 +- .../Search/Index/BaseIndexArguments.cs | 4 +- .../Search/Index/IndexDescribeArguments.cs | 2 +- .../Search/Index/IndexListArguments.cs | 2 +- .../Search/Index/IndexQueryArguments.cs | 4 +- .../Search/Service/ServiceListArguments.cs | 2 +- src/Arguments/Server/ServiceStartArguments.cs | 2 +- src/Arguments/Server/TransportTypes.cs | 2 +- .../Storage/Account/AccountListArguments.cs | 2 +- src/Arguments/Storage/BaseStorageArguments.cs | 4 +- .../Storage/Blob/BaseContainerArguments.cs | 4 +- .../Storage/Blob/BlobListArguments.cs | 2 +- .../Container/ContainerDetailsArguments.cs | 2 +- .../Blob/Container/ContainerListArguments.cs | 2 +- .../Storage/Table/TableListArguments.cs | 2 +- .../Subscription/BaseSubscriptionArguments.cs | 2 +- .../Subscription/SubscriptionListArguments.cs | 2 +- src/Arguments/SubscriptionArguments.cs | 4 +- .../AppConfig/Account/AccountListCommand.cs | 4 +- .../AppConfig/BaseAppConfigCommand.cs | 8 +- .../AppConfig/KeyValue/BaseKeyValueCommand.cs | 6 +- .../KeyValue/KeyValueDeleteCommand.cs | 4 +- .../AppConfig/KeyValue/KeyValueListCommand.cs | 6 +- .../AppConfig/KeyValue/KeyValueLockCommand.cs | 4 +- .../AppConfig/KeyValue/KeyValueSetCommand.cs | 6 +- .../AppConfig/KeyValue/KeyValueShowCommand.cs | 4 +- .../KeyValue/KeyValueUnlockCommand.cs | 4 +- src/Commands/BaseCommand.cs | 6 +- src/Commands/CommandFactory.cs | 12 +- src/Commands/CommandGroup.cs | 2 +- src/Commands/Cosmos/AccountListCommand.cs | 4 +- src/Commands/Cosmos/BaseContainerCommand.cs | 4 +- src/Commands/Cosmos/BaseCosmosCommand.cs | 11 +- src/Commands/Cosmos/BaseDatabaseCommand.cs | 6 +- src/Commands/Cosmos/ContainerListCommand.cs | 4 +- src/Commands/Cosmos/DatabaseListCommand.cs | 4 +- src/Commands/Cosmos/ItemQueryCommand.cs | 6 +- src/Commands/Extension/AzCommand.cs | 8 +- src/Commands/Extension/AzdCommand.cs | 8 +- src/Commands/GlobalCommand.cs | 11 +- src/Commands/Group/GroupListCommand.cs | 4 +- src/Commands/IBaseCommand.cs | 6 +- src/Commands/Monitor/BaseMonitorCommand.cs | 11 +- src/Commands/Monitor/Log/LogQueryCommand.cs | 6 +- .../Monitor/Table/TableListCommand.cs | 6 +- .../Monitor/Workspace/WorkspaceListCommand.cs | 4 +- .../Search/Index/IndexDescribeCommand.cs | 6 +- src/Commands/Search/Index/IndexListCommand.cs | 6 +- .../Search/Index/IndexQueryCommand.cs | 6 +- .../Search/Service/ServiceListCommand.cs | 4 +- src/Commands/Server/ServiceStartCommand.cs | 8 +- src/Commands/Server/ToolOperations.cs | 8 +- .../Storage/Account/AccountListCommand.cs | 4 +- src/Commands/Storage/BaseStorageCommand.cs | 8 +- src/Commands/Storage/Blob/BlobListCommand.cs | 4 +- .../Blob/Container/BaseContainerCommand.cs | 8 +- .../Blob/Container/ContainerDetailsCommand.cs | 4 +- .../Blob/Container/ContainerListCommand.cs | 4 +- .../Storage/Table/TableListCommand.cs | 4 +- .../Subscription/BaseSubscriptionCommand.cs | 4 +- .../Subscription/SubscriptionListCommand.cs | 4 +- src/Commands/SubscriptionCommand.cs | 8 +- src/Commands/Tools/ToolsListCommand.cs | 4 +- src/Extensions/ArgumentExtensions.cs | 2 +- src/Extensions/OpenTelemetryExtensions.cs | 6 +- src/Helpers/EnvironmentVariableHelpers.cs | 7 +- .../AppConfig/AppConfigurationAccount.cs | 2 +- src/Models/AppConfig/EncryptionProperties.cs | 2 +- src/Models/AppConfig/KeyValueSetting.cs | 2 +- src/Models/Argument/ArgumentBuilder.cs | 2 +- src/Models/Argument/ArgumentDefinition.cs | 2 +- src/Models/Argument/ArgumentDefinitions.cs | 2 +- src/Models/Argument/ArgumentInfo.cs | 2 +- src/Models/Argument/ArgumentOption.cs | 2 +- src/Models/AuthMethod.cs | 2 +- src/Models/Command/CommandContext.cs | 2 +- src/Models/Command/CommandInfo.cs | 4 +- src/Models/Command/CommandResponse.cs | 2 +- src/Models/ETag.cs | 2 +- src/Models/HiddenCommandAttribute.cs | 2 +- src/Models/Identity/ManagedIdentity.cs | 2 +- .../Identity/SystemAssignedIdentityInfo.cs | 2 +- .../Identity/UserAssignedIdentityInfo.cs | 2 +- src/Models/Monitor/WorkspaceInfo.cs | 2 +- src/Models/ResourceGroup/ResourceGroupInfo.cs | 2 +- src/Program.cs | 6 +- .../Azure/AppConfig/AppConfigService.cs | 5 +- .../Authentication/CustomChainedCredential.cs | 4 +- .../Authentication/WindowHandleProvider.cs | 2 +- src/Services/Azure/BaseAzureService.cs | 9 +- src/Services/Azure/Cosmos/CosmosService.cs | 4 +- src/Services/Azure/Monitor/MonitorService.cs | 4 +- .../ResourceGroup/ResourceGroupService.cs | 2 +- src/Services/Azure/Search/SearchService.cs | 4 +- src/Services/Azure/Storage/StorageService.cs | 2 +- .../Azure/Subscription/SubscriptionService.cs | 2 +- src/Services/Azure/Tenant/TenantService.cs | 2 +- src/Services/Azure/UserAgentPolicy.cs | 2 +- src/Services/Caching/CacheService.cs | 5 +- src/Services/Interfaces/IAppConfigService.cs | 2 +- src/Services/Interfaces/ICacheService.cs | 2 +- src/Services/Interfaces/ICosmosService.cs | 4 +- .../Interfaces/IExternalProcessService.cs | 2 +- src/Services/Interfaces/IMonitorService.cs | 4 +- .../Interfaces/IResourceGroupService.cs | 2 +- src/Services/Interfaces/ISearchService.cs | 2 +- src/Services/Interfaces/IStorageService.cs | 2 +- .../Interfaces/ISubscriptionService.cs | 2 +- src/Services/Interfaces/ITenantService.cs | 2 +- .../ExternalProcessService.cs | 4 +- tests/Arguments/RetryPolicyArgumentsTests.cs | 2 +- tests/Client/AppConfigCommandTests.cs | 4 +- tests/Client/ClientToolTests.cs | 4 +- tests/Client/CommandTests.cs | 4 +- tests/Client/CommandTestsBase.cs | 4 +- tests/Client/CosmosCommandTests.cs | 4 +- .../Helpers/CosmosLocalAccessFixture.cs | 4 +- tests/Client/Helpers/CustomTestTransport.cs | 4 +- tests/Client/Helpers/LiveTestSettings.cs | 2 +- .../Client/Helpers/LiveTestSettingsFixture.cs | 2 +- tests/Client/Helpers/McpClientFixture.cs | 4 +- tests/Client/MockClientTests.cs | 6 +- tests/Client/MonitorCommandTests.cs | 4 +- tests/Client/StorageCommandTests.cs | 4 +- .../Cosmos/AccountListCommandTests.cs | 10 +- .../Search/Index/IndexDescribeCommandTests.cs | 10 +- .../Search/Index/IndexListCommandTests.cs | 10 +- .../Search/Index/IndexQueryCommandTests.cs | 8 +- .../Search/Service/ServiceListCommandTests.cs | 10 +- .../Server/ServiceStartCommandTests.cs | 2 +- tests/Commands/Server/ToolOperationsTest.cs | 2 +- .../SubscriptionListCommandTests.cs | 8 +- .../AuthenticationIntegrationTests.cs | 6 +- tests/Services/Azure/BaseAzureServiceTests.cs | 2 +- tests/Services/Azure/UserAgentPolicyTests.cs | 4 +- tests/SkipExtensions.cs | 2 +- 166 files changed, 522 insertions(+), 559 deletions(-) create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig index 5c92c5c14..5602ee68c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,246 +1,187 @@ -# Remove the line below if you want to inherit .editorconfig settings from higher directories +# editorconfig.org + +# top-most EditorConfig file root = true +[*] +trim_trailing_whitespace = true + +# Default settings: +# A newline ending every file +# Use 4 spaces as indentation +insert_final_newline = true +indent_style = space +indent_size = 4 + # C# files [*.cs] - -#### Core EditorConfig Options #### - -# Indentation and spacing -indent_size = 4 -indent_style = space -tab_width = 4 - # New line preferences -end_of_line = crlf -insert_final_newline = false - -#### .NET Code Actions #### - -# Type members -dotnet_hide_advanced_members = false -dotnet_member_insertion_location = with_other_members_of_the_same_kind -dotnet_property_generation_behavior = prefer_throwing_properties - -# Symbol search -dotnet_search_reference_assemblies = true - -#### .NET Coding Conventions #### - -# Organize usings -dotnet_separate_import_directive_groups = false -dotnet_sort_system_directives_first = false -file_header_template = unset - -# this. and Me. preferences -dotnet_style_qualification_for_event = false -dotnet_style_qualification_for_field = false -dotnet_style_qualification_for_method = false -dotnet_style_qualification_for_property = false - -# Language keywords vs BCL types preferences -dotnet_style_predefined_type_for_locals_parameters_members = true -dotnet_style_predefined_type_for_member_access = true - -# Parentheses preferences -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity -dotnet_style_parentheses_in_other_operators = never_if_unnecessary -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity - -# Modifier preferences -dotnet_style_require_accessibility_modifiers = for_non_interface_members - -# Expression-level preferences -dotnet_prefer_system_hash_code = true -dotnet_style_coalesce_expression = true -dotnet_style_collection_initializer = true -dotnet_style_explicit_tuple_names = true -dotnet_style_namespace_match_folder = true -dotnet_style_null_propagation = true -dotnet_style_object_initializer = true -dotnet_style_operator_placement_when_wrapping = beginning_of_line -dotnet_style_prefer_auto_properties = true -dotnet_style_prefer_collection_expression = when_types_loosely_match -dotnet_style_prefer_compound_assignment = true -dotnet_style_prefer_conditional_expression_over_assignment = true -dotnet_style_prefer_conditional_expression_over_return = true -dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed -dotnet_style_prefer_inferred_anonymous_type_member_names = true -dotnet_style_prefer_inferred_tuple_names = true -dotnet_style_prefer_is_null_check_over_reference_equality_method = true -dotnet_style_prefer_simplified_boolean_expressions = true -dotnet_style_prefer_simplified_interpolation = true - -# Field preferences -dotnet_style_readonly_field = true - -# Parameter preferences -dotnet_code_quality_unused_parameters = all - -# Suppression preferences -dotnet_remove_unnecessary_suppression_exclusions = none - -# New line preferences -dotnet_style_allow_multiple_blank_lines_experimental = true -dotnet_style_allow_statement_immediately_after_block_experimental = true - -#### C# Coding Conventions #### - -# var preferences -csharp_style_var_elsewhere = false -csharp_style_var_for_built_in_types = false -csharp_style_var_when_type_is_apparent = false - -# Expression-bodied members -csharp_style_expression_bodied_accessors = true -csharp_style_expression_bodied_constructors = false -csharp_style_expression_bodied_indexers = true -csharp_style_expression_bodied_lambdas = true -csharp_style_expression_bodied_local_functions = false -csharp_style_expression_bodied_methods = false -csharp_style_expression_bodied_operators = false -csharp_style_expression_bodied_properties = true - -# Pattern matching preferences -csharp_style_pattern_matching_over_as_with_null_check = true -csharp_style_pattern_matching_over_is_with_cast_check = true -csharp_style_prefer_extended_property_pattern = true -csharp_style_prefer_not_pattern = true -csharp_style_prefer_pattern_matching = true -csharp_style_prefer_switch_expression = true - -# Null-checking preferences -csharp_style_conditional_delegate_call = true - -# Modifier preferences -csharp_prefer_static_anonymous_function = true -csharp_prefer_static_local_function = true -csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async -csharp_style_prefer_readonly_struct = true -csharp_style_prefer_readonly_struct_member = true - -# Code-block preferences -csharp_prefer_braces = true -csharp_prefer_simple_using_statement = true -csharp_prefer_system_threading_lock = true -csharp_style_namespace_declarations = block_scoped -csharp_style_prefer_method_group_conversion = true -csharp_style_prefer_primary_constructors = true -csharp_style_prefer_top_level_statements = true - -# Expression-level preferences -csharp_prefer_simple_default_expression = true -csharp_style_deconstructed_variable_declaration = true -csharp_style_implicit_object_creation_when_type_is_apparent = true -csharp_style_inlined_variable_declaration = true -csharp_style_prefer_implicitly_typed_lambda_expression = true -csharp_style_prefer_index_operator = true -csharp_style_prefer_local_over_anonymous_function = true -csharp_style_prefer_null_check_over_type_check = true -csharp_style_prefer_range_operator = true -csharp_style_prefer_tuple_swap = true -csharp_style_prefer_unbound_generic_type_in_nameof = true -csharp_style_prefer_utf8_string_literals = true -csharp_style_throw_expression = true -csharp_style_unused_value_assignment_preference = discard_variable -csharp_style_unused_value_expression_statement_preference = discard_variable - -# 'using' directive preferences -csharp_using_directive_placement = outside_namespace - -# New line preferences -csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true -csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true -csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true -csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true -csharp_style_allow_embedded_statements_on_same_line_experimental = true - -#### 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 +csharp_new_line_before_open_brace = all # vs-default: any +csharp_new_line_before_else = true # vs-default: true +csharp_new_line_before_catch = true # vs-default: true +csharp_new_line_before_finally = true # vs-default: true +csharp_new_line_before_members_in_object_initializers = true # vs-default: true +csharp_new_line_before_members_in_anonymous_types = true # vs-default: true +csharp_new_line_between_query_expression_clauses = true # vs-default: true # Indentation preferences -csharp_indent_block_contents = true -csharp_indent_braces = false -csharp_indent_case_contents = true +csharp_indent_block_contents = true # vs-default: true +csharp_indent_braces = false # vs-default: false +csharp_indent_case_contents = true # vs-default: true csharp_indent_case_contents_when_block = true -csharp_indent_labels = one_less_than_current -csharp_indent_switch_labels = true +csharp_indent_switch_labels = true # vs-default: true +csharp_indent_labels = one_less_than_current # vs-default: one_less_than_current + +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion + +# avoid this. unless absolutely necessary +dotnet_style_qualification_for_field = false:suggestion # vs-default: false:none +dotnet_style_qualification_for_property = false:suggestion # vs-default: false:none +dotnet_style_qualification_for_method = false:suggestion # vs-default: false:none +dotnet_style_qualification_for_event = false:suggestion # vs-default: false:none + +# only use var when it's obvious what the variable type is +csharp_style_var_for_built_in_types = false:none # vs-default: true:none +csharp_style_var_when_type_is_apparent = false:none # vs-default: true:none +csharp_style_var_elsewhere = false:suggestion # vs-default: true:none + +# use language keywords instead of BCL types +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion # vs-default: true:none +dotnet_style_predefined_type_for_member_access = true:suggestion # vs-default: true:none + +# name all constant fields using PascalCase +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style + +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const + +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# static fields should have s_ prefix +dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion +dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields +dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style + +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static +dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected +dotnet_naming_style.static_prefix_style.required_prefix = s_ +dotnet_naming_style.static_prefix_style.capitalization = camel_case + +# internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style + +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal + +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# Code style defaults +csharp_using_directive_placement = outside_namespace:suggestion +dotnet_sort_system_directives_first = true # vs-default: true +csharp_prefer_braces = true:refactoring +csharp_preserve_single_line_blocks = true # vs-default: true +csharp_preserve_single_line_statements = false # vs-default: true +csharp_prefer_static_local_function = true:suggestion +csharp_prefer_simple_using_statement = false:none +csharp_style_prefer_switch_expression = true:suggestion + +# Code quality +dotnet_style_readonly_field = true:suggestion +dotnet_code_quality_unused_parameters = non_public:suggestion + +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion # vs-default: true:suggestion +dotnet_style_collection_initializer = true:suggestion # vs-default: true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion # vs-default: true:suggestion +dotnet_style_coalesce_expression = true:suggestion # vs-default: true:suggestion +dotnet_style_null_propagation = true:suggestion # vs-default: true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:refactoring +dotnet_style_prefer_conditional_expression_over_return = true:refactoring +csharp_prefer_simple_default_expression = true:suggestion + +# Expression-bodied members +csharp_style_expression_bodied_methods = false:none # vs-default: false:none +csharp_style_expression_bodied_constructors = false:none # vs-default: false:none +csharp_style_expression_bodied_operators = false:none # vs-default: false:none +csharp_style_expression_bodied_properties = true:none # vs-default: true:none +csharp_style_expression_bodied_indexers = true:none # vs-default: true:none +csharp_style_expression_bodied_accessors = true:none # vs-default: true:none +csharp_style_expression_bodied_lambdas = true:refactoring +csharp_style_expression_bodied_local_functions = true:refactoring + +# Pattern matching +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion # vs-default: true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion # vs-default: true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion # vs-default: true:suggestion + +# Null checking preferences +csharp_style_throw_expression = true:suggestion # vs-default: true:suggestion +csharp_style_conditional_delegate_call = true:suggestion # vs-default: true:suggestion + +# Other features +csharp_style_prefer_index_operator = false:none +csharp_style_prefer_range_operator = false:none +csharp_style_pattern_local_over_anonymous_function = false:none # 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 +csharp_space_after_cast = false # vs-default: false +csharp_space_after_colon_in_inheritance_clause = true # vs-default: true +csharp_space_after_comma = true # vs-default: true +csharp_space_after_dot = false # vs-default: false +csharp_space_after_keywords_in_control_flow_statements = true # vs-default: true +csharp_space_after_semicolon_in_for_statement = true # vs-default: true +csharp_space_around_binary_operators = before_and_after # vs-default: before_and_after +csharp_space_around_declaration_statements = do_not_ignore # vs-default: false +csharp_space_before_colon_in_inheritance_clause = true # vs-default: true +csharp_space_before_comma = false # vs-default: false +csharp_space_before_dot = false # vs-default: false +csharp_space_before_open_square_brackets = false # vs-default: false +csharp_space_before_semicolon_in_for_statement = false # vs-default: false +csharp_space_between_empty_square_brackets = false # vs-default: false +csharp_space_between_method_call_empty_parameter_list_parentheses = false # vs-default: false +csharp_space_between_method_call_name_and_opening_parenthesis = false # vs-default: false +csharp_space_between_method_call_parameter_list_parentheses = false # vs-default: false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false # vs-default: false +csharp_space_between_method_declaration_name_and_open_parenthesis = false # vs-default: false +csharp_space_between_method_declaration_parameter_list_parentheses = false # vs-default: false +csharp_space_between_parentheses = false # vs-default: false +csharp_space_between_square_brackets = false # vs-default: false -# Wrapping preferences -csharp_preserve_single_line_blocks = true -csharp_preserve_single_line_statements = true +# Require accessibility modifiers +dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion # vs-default: for_non_interface_members:none -#### Naming styles #### +# Analyzers +dotnet_code_quality.ca1802.api_surface = private, internal -# Naming rules +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 -dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion -dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface -dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i +# Xml build files +[*.builds] +indent_size = 2 -dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.types_should_be_pascal_case.symbols = types -dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 -dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members -dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 -# Symbol specifications - -dotnet_naming_symbols.interface.applicable_kinds = interface -dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.interface.required_modifiers = - -dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum -dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.types.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 = - -# Naming styles - -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = -dotnet_naming_style.pascal_case.capitalization = pascal_case - -dotnet_naming_style.begins_with_i.required_prefix = I -dotnet_naming_style.begins_with_i.required_suffix = -dotnet_naming_style.begins_with_i.word_separator = -dotnet_naming_style.begins_with_i.capitalization = pascal_case +# Shell scripts +[*.sh] +end_of_line = lf +[*.{cmd, bat}] +end_of_line = crlf \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..8ca23d74a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +* text=auto + +*.{bmp,dll,gif,jpg,png,snk,exe,wmv,mp4,ismv,isma} binary + +*.cs text diff=csharp +*.csproj text=auto +*.sln text=auto eol=crlf +*.sh text=auto eol=lf \ No newline at end of file diff --git a/src/Arguments/AppConfig/Account/AccountListArguments.cs b/src/Arguments/AppConfig/Account/AccountListArguments.cs index 08e23b38c..e4840b10a 100644 --- a/src/Arguments/AppConfig/Account/AccountListArguments.cs +++ b/src/Arguments/AppConfig/Account/AccountListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.AppConfig.Account; -public class AccountListArguments : SubscriptionArguments; \ No newline at end of file +public class AccountListArguments : SubscriptionArguments; diff --git a/src/Arguments/AppConfig/BaseAppConfigArguments.cs b/src/Arguments/AppConfig/BaseAppConfigArguments.cs index 1a00c3e73..b5cda86d5 100644 --- a/src/Arguments/AppConfig/BaseAppConfigArguments.cs +++ b/src/Arguments/AppConfig/BaseAppConfigArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.AppConfig; @@ -10,4 +10,4 @@ public class BaseAppConfigArguments : SubscriptionArguments { [JsonPropertyName(ArgumentDefinitions.AppConfig.AccountName)] public string? Account { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/AppConfig/KeyValue/BaseKeyValueArguments.cs b/src/Arguments/AppConfig/KeyValue/BaseKeyValueArguments.cs index 978c0a461..d42a89180 100644 --- a/src/Arguments/AppConfig/KeyValue/BaseKeyValueArguments.cs +++ b/src/Arguments/AppConfig/KeyValue/BaseKeyValueArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.AppConfig.KeyValue; @@ -13,4 +13,4 @@ public class BaseKeyValueArguments : BaseAppConfigArguments [JsonPropertyName(ArgumentDefinitions.AppConfig.LabelName)] public string? Label { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/AppConfig/KeyValue/KeyValueDeleteArguments.cs b/src/Arguments/AppConfig/KeyValue/KeyValueDeleteArguments.cs index 96abac0e0..238137063 100644 --- a/src/Arguments/AppConfig/KeyValue/KeyValueDeleteArguments.cs +++ b/src/Arguments/AppConfig/KeyValue/KeyValueDeleteArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.AppConfig.KeyValue; -public class KeyValueDeleteArguments : BaseKeyValueArguments; \ No newline at end of file +public class KeyValueDeleteArguments : BaseKeyValueArguments; diff --git a/src/Arguments/AppConfig/KeyValue/KeyValueListArguments.cs b/src/Arguments/AppConfig/KeyValue/KeyValueListArguments.cs index 681333751..f8adc8b33 100644 --- a/src/Arguments/AppConfig/KeyValue/KeyValueListArguments.cs +++ b/src/Arguments/AppConfig/KeyValue/KeyValueListArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.AppConfig.KeyValue; @@ -13,4 +13,4 @@ public class KeyValueListArguments : BaseAppConfigArguments [JsonPropertyName(ArgumentDefinitions.AppConfig.LabelName)] public string? Label { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/AppConfig/KeyValue/KeyValueLockArguments.cs b/src/Arguments/AppConfig/KeyValue/KeyValueLockArguments.cs index 9ae17d276..b9267d924 100644 --- a/src/Arguments/AppConfig/KeyValue/KeyValueLockArguments.cs +++ b/src/Arguments/AppConfig/KeyValue/KeyValueLockArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.AppConfig.KeyValue; -public class KeyValueLockArguments : BaseKeyValueArguments; \ No newline at end of file +public class KeyValueLockArguments : BaseKeyValueArguments; diff --git a/src/Arguments/AppConfig/KeyValue/KeyValueSetArguments.cs b/src/Arguments/AppConfig/KeyValue/KeyValueSetArguments.cs index 57763f9a8..5533b00fd 100644 --- a/src/Arguments/AppConfig/KeyValue/KeyValueSetArguments.cs +++ b/src/Arguments/AppConfig/KeyValue/KeyValueSetArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.AppConfig.KeyValue; @@ -10,4 +10,4 @@ public class KeyValueSetArguments : BaseKeyValueArguments { [JsonPropertyName(ArgumentDefinitions.AppConfig.ValueName)] public string? Value { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/AppConfig/KeyValue/KeyValueShowArguments.cs b/src/Arguments/AppConfig/KeyValue/KeyValueShowArguments.cs index 3fc4c581d..ca793425a 100644 --- a/src/Arguments/AppConfig/KeyValue/KeyValueShowArguments.cs +++ b/src/Arguments/AppConfig/KeyValue/KeyValueShowArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.AppConfig.KeyValue; -public class KeyValueShowArguments : BaseKeyValueArguments; \ No newline at end of file +public class KeyValueShowArguments : BaseKeyValueArguments; diff --git a/src/Arguments/AppConfig/KeyValue/KeyValueUnlockArguments.cs b/src/Arguments/AppConfig/KeyValue/KeyValueUnlockArguments.cs index 6a3c82274..738a3add1 100644 --- a/src/Arguments/AppConfig/KeyValue/KeyValueUnlockArguments.cs +++ b/src/Arguments/AppConfig/KeyValue/KeyValueUnlockArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.AppConfig.KeyValue; -public class KeyValueUnlockArguments : BaseKeyValueArguments; \ No newline at end of file +public class KeyValueUnlockArguments : BaseKeyValueArguments; diff --git a/src/Arguments/AuthMethodArgument.cs b/src/Arguments/AuthMethodArgument.cs index d8292721d..228bc7de9 100644 --- a/src/Arguments/AuthMethodArgument.cs +++ b/src/Arguments/AuthMethodArgument.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json.Serialization; using AzureMcp.Models; using AzureMcp.Models.Argument; -using System.Text.Json.Serialization; namespace AzureMcp.Arguments; @@ -40,4 +40,4 @@ public class AuthMethodArgument Name = GetDisplayName(authMethod), Id = authMethod.ToString() })]; -} \ No newline at end of file +} diff --git a/src/Arguments/Cosmos/AccountListArguments.cs b/src/Arguments/Cosmos/AccountListArguments.cs index 3d22e2c62..e55dd4a9c 100644 --- a/src/Arguments/Cosmos/AccountListArguments.cs +++ b/src/Arguments/Cosmos/AccountListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Cosmos; -public class AccountListArguments : SubscriptionArguments; \ No newline at end of file +public class AccountListArguments : SubscriptionArguments; diff --git a/src/Arguments/Cosmos/BaseContainerArguments.cs b/src/Arguments/Cosmos/BaseContainerArguments.cs index e868edf14..73a12b0a6 100644 --- a/src/Arguments/Cosmos/BaseContainerArguments.cs +++ b/src/Arguments/Cosmos/BaseContainerArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Cosmos; @@ -10,4 +10,4 @@ public class BaseContainerArguments : BaseDatabaseArguments { [JsonPropertyName(ArgumentDefinitions.Cosmos.ContainerName)] public string? Container { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Cosmos/BaseCosmosArguments.cs b/src/Arguments/Cosmos/BaseCosmosArguments.cs index 20c6d4031..cbd16c790 100644 --- a/src/Arguments/Cosmos/BaseCosmosArguments.cs +++ b/src/Arguments/Cosmos/BaseCosmosArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Cosmos; @@ -10,4 +10,4 @@ public class BaseCosmosArguments : SubscriptionArguments { [JsonPropertyName(ArgumentDefinitions.Cosmos.AccountName)] public string? Account { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Cosmos/BaseDatabaseArguments.cs b/src/Arguments/Cosmos/BaseDatabaseArguments.cs index f6198b42e..2e8e318b7 100644 --- a/src/Arguments/Cosmos/BaseDatabaseArguments.cs +++ b/src/Arguments/Cosmos/BaseDatabaseArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Cosmos; @@ -10,4 +10,4 @@ public class BaseDatabaseArguments : BaseCosmosArguments { [JsonPropertyName(ArgumentDefinitions.Cosmos.DatabaseName)] public string? Database { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Cosmos/ContainerListArguments.cs b/src/Arguments/Cosmos/ContainerListArguments.cs index 954c620ca..c18d3056c 100644 --- a/src/Arguments/Cosmos/ContainerListArguments.cs +++ b/src/Arguments/Cosmos/ContainerListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Cosmos; -public class ContainerListArguments : BaseDatabaseArguments; \ No newline at end of file +public class ContainerListArguments : BaseDatabaseArguments; diff --git a/src/Arguments/Cosmos/DatabaseListArguments.cs b/src/Arguments/Cosmos/DatabaseListArguments.cs index 4b9074ba1..78ab5a776 100644 --- a/src/Arguments/Cosmos/DatabaseListArguments.cs +++ b/src/Arguments/Cosmos/DatabaseListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Cosmos; -public class DatabaseListArguments : BaseCosmosArguments; \ No newline at end of file +public class DatabaseListArguments : BaseCosmosArguments; diff --git a/src/Arguments/Cosmos/ItemQueryArguments.cs b/src/Arguments/Cosmos/ItemQueryArguments.cs index 6191b661a..3ad983d1e 100644 --- a/src/Arguments/Cosmos/ItemQueryArguments.cs +++ b/src/Arguments/Cosmos/ItemQueryArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Cosmos; @@ -10,4 +10,4 @@ public class ItemQueryArguments : BaseContainerArguments { [JsonPropertyName(ArgumentDefinitions.Cosmos.QueryText)] public string? Query { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Extension/AzArguments.cs b/src/Arguments/Extension/AzArguments.cs index cc62dd5b4..04e11f9c6 100644 --- a/src/Arguments/Extension/AzArguments.cs +++ b/src/Arguments/Extension/AzArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Extension; @@ -10,4 +10,4 @@ public class AzArguments : GlobalArguments { [JsonPropertyName(ArgumentDefinitions.Extension.Az.CommandName)] public string? Command { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Extension/AzdArguments.cs b/src/Arguments/Extension/AzdArguments.cs index 2c9cad160..aeb18c6c3 100644 --- a/src/Arguments/Extension/AzdArguments.cs +++ b/src/Arguments/Extension/AzdArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Extension; @@ -10,4 +10,4 @@ public class AzdArguments : GlobalArguments { [JsonPropertyName(ArgumentDefinitions.Extension.Azd.CommandName)] public string? Command { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/GlobalArguments.cs b/src/Arguments/GlobalArguments.cs index 0f9576e32..7b8cf02f5 100644 --- a/src/Arguments/GlobalArguments.cs +++ b/src/Arguments/GlobalArguments.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json.Serialization; using AzureMcp.Models; using AzureMcp.Models.Argument; -using System.Text.Json.Serialization; namespace AzureMcp.Arguments; @@ -19,4 +19,4 @@ public class GlobalArguments public AuthMethod? AuthMethod { get; set; } public RetryPolicyArguments? RetryPolicy { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Group/BaseGroupArguments.cs b/src/Arguments/Group/BaseGroupArguments.cs index 44605286b..1a6e771e9 100644 --- a/src/Arguments/Group/BaseGroupArguments.cs +++ b/src/Arguments/Group/BaseGroupArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Group; -public class BaseGroupArguments : SubscriptionArguments; \ No newline at end of file +public class BaseGroupArguments : SubscriptionArguments; diff --git a/src/Arguments/Monitor/BaseMonitorArguments.cs b/src/Arguments/Monitor/BaseMonitorArguments.cs index 20a23a2a5..d348b59fe 100644 --- a/src/Arguments/Monitor/BaseMonitorArguments.cs +++ b/src/Arguments/Monitor/BaseMonitorArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Monitor; -public class BaseMonitorArguments : SubscriptionArguments; \ No newline at end of file +public class BaseMonitorArguments : SubscriptionArguments; diff --git a/src/Arguments/Monitor/IWorkspaceArguments.cs b/src/Arguments/Monitor/IWorkspaceArguments.cs index 78467ce4e..130df652f 100644 --- a/src/Arguments/Monitor/IWorkspaceArguments.cs +++ b/src/Arguments/Monitor/IWorkspaceArguments.cs @@ -6,4 +6,4 @@ namespace AzureMcp.Arguments.Monitor; public interface IWorkspaceArguments { string? Workspace { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Monitor/LogQueryArguments.cs b/src/Arguments/Monitor/LogQueryArguments.cs index bd34d5e34..19c599ce0 100644 --- a/src/Arguments/Monitor/LogQueryArguments.cs +++ b/src/Arguments/Monitor/LogQueryArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Monitor; @@ -15,4 +15,4 @@ public class LogQueryArguments : BaseMonitorArguments, IWorkspaceArguments public int? Limit { get; set; } [JsonPropertyName(ArgumentDefinitions.Monitor.TableNameName)] public string? TableName { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Monitor/TableListArguments.cs b/src/Arguments/Monitor/TableListArguments.cs index ec79166a3..aac4ad964 100644 --- a/src/Arguments/Monitor/TableListArguments.cs +++ b/src/Arguments/Monitor/TableListArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Monitor; @@ -13,4 +13,4 @@ public class TableListArguments : BaseMonitorArguments, IWorkspaceArguments [JsonPropertyName(ArgumentDefinitions.Monitor.TableTypeName)] public string? TableType { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Monitor/WorkspaceListArguments.cs b/src/Arguments/Monitor/WorkspaceListArguments.cs index eab38c835..7a1ea5fe5 100644 --- a/src/Arguments/Monitor/WorkspaceListArguments.cs +++ b/src/Arguments/Monitor/WorkspaceListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Monitor; -public class WorkspaceListArguments : SubscriptionArguments; \ No newline at end of file +public class WorkspaceListArguments : SubscriptionArguments; diff --git a/src/Arguments/ParseResultExtensions.cs b/src/Arguments/ParseResultExtensions.cs index 4c5795ac5..f6d7a9b38 100644 --- a/src/Arguments/ParseResultExtensions.cs +++ b/src/Arguments/ParseResultExtensions.cs @@ -9,4 +9,4 @@ public static class ParseResultExtensions // Check if any retry-related options were specified on the command line parseResult.CommandResult.Children .Any(token => token.Symbol.Name.StartsWith("retry-", StringComparison.OrdinalIgnoreCase)); -} \ No newline at end of file +} diff --git a/src/Arguments/RetryPolicyArguments.cs b/src/Arguments/RetryPolicyArguments.cs index eea6c2a6f..abe9c509d 100644 --- a/src/Arguments/RetryPolicyArguments.cs +++ b/src/Arguments/RetryPolicyArguments.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json.Serialization; using Azure.Core; using AzureMcp.Models.Argument; -using System.Text.Json.Serialization; namespace AzureMcp.Arguments; @@ -53,22 +53,27 @@ public class RetryPolicyArguments : IComparable, IEquatabl public int CompareTo(RetryPolicyArguments? other) { - if (other == null) return 1; + if (other == null) + return 1; // Compare by MaxRetries first var retryComparison = MaxRetries.CompareTo(other.MaxRetries); - if (retryComparison != 0) return retryComparison; + if (retryComparison != 0) + return retryComparison; // Then by Mode var modeComparison = Mode.CompareTo(other.Mode); - if (modeComparison != 0) return modeComparison; + if (modeComparison != 0) + return modeComparison; // Then by delay settings var delayComparison = DelaySeconds.CompareTo(other.DelaySeconds); - if (delayComparison != 0) return delayComparison; + if (delayComparison != 0) + return delayComparison; var maxDelayComparison = MaxDelaySeconds.CompareTo(other.MaxDelaySeconds); - if (maxDelayComparison != 0) return maxDelayComparison; + if (maxDelayComparison != 0) + return maxDelayComparison; // Finally by network timeout return NetworkTimeoutSeconds.CompareTo(other.NetworkTimeoutSeconds); @@ -93,4 +98,4 @@ public class RetryPolicyArguments : IComparable, IEquatabl public static bool operator >(RetryPolicyArguments? left, RetryPolicyArguments? right) => !(left <= right); public static bool operator >=(RetryPolicyArguments? left, RetryPolicyArguments? right) => !(left < right); -} \ No newline at end of file +} diff --git a/src/Arguments/Search/BaseSearchArguments.cs b/src/Arguments/Search/BaseSearchArguments.cs index 02b56af13..0ae0f975e 100644 --- a/src/Arguments/Search/BaseSearchArguments.cs +++ b/src/Arguments/Search/BaseSearchArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Search; @@ -10,4 +10,4 @@ public class BaseSearchArguments : GlobalArguments { [JsonPropertyName(ArgumentDefinitions.Search.ServiceName)] public string? Service { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Search/Index/BaseIndexArguments.cs b/src/Arguments/Search/Index/BaseIndexArguments.cs index f9444782f..decd12d72 100644 --- a/src/Arguments/Search/Index/BaseIndexArguments.cs +++ b/src/Arguments/Search/Index/BaseIndexArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Search.Index; @@ -10,4 +10,4 @@ public class BaseIndexArguments : BaseSearchArguments { [JsonPropertyName(ArgumentDefinitions.Search.IndexName)] public string? Index { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Search/Index/IndexDescribeArguments.cs b/src/Arguments/Search/Index/IndexDescribeArguments.cs index 4c9a3ef0c..2b8a482e1 100644 --- a/src/Arguments/Search/Index/IndexDescribeArguments.cs +++ b/src/Arguments/Search/Index/IndexDescribeArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Search.Index; -public class IndexDescribeArguments : BaseIndexArguments; \ No newline at end of file +public class IndexDescribeArguments : BaseIndexArguments; diff --git a/src/Arguments/Search/Index/IndexListArguments.cs b/src/Arguments/Search/Index/IndexListArguments.cs index 6fff3db73..3581325a9 100644 --- a/src/Arguments/Search/Index/IndexListArguments.cs +++ b/src/Arguments/Search/Index/IndexListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Search.Index; -public class IndexListArguments : BaseSearchArguments; \ No newline at end of file +public class IndexListArguments : BaseSearchArguments; diff --git a/src/Arguments/Search/Index/IndexQueryArguments.cs b/src/Arguments/Search/Index/IndexQueryArguments.cs index e7efce828..f00e59ab4 100644 --- a/src/Arguments/Search/Index/IndexQueryArguments.cs +++ b/src/Arguments/Search/Index/IndexQueryArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Search.Index; @@ -10,4 +10,4 @@ public class IndexQueryArguments : BaseIndexArguments { [JsonPropertyName(ArgumentDefinitions.Search.QueryName)] public string? Query { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Search/Service/ServiceListArguments.cs b/src/Arguments/Search/Service/ServiceListArguments.cs index f5b34cf05..9fe3a7be0 100644 --- a/src/Arguments/Search/Service/ServiceListArguments.cs +++ b/src/Arguments/Search/Service/ServiceListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Search.Service; -public class ServiceListArguments : SubscriptionArguments; \ No newline at end of file +public class ServiceListArguments : SubscriptionArguments; diff --git a/src/Arguments/Server/ServiceStartArguments.cs b/src/Arguments/Server/ServiceStartArguments.cs index d4e16359c..112336471 100644 --- a/src/Arguments/Server/ServiceStartArguments.cs +++ b/src/Arguments/Server/ServiceStartArguments.cs @@ -12,4 +12,4 @@ public class ServiceStartArguments [JsonPropertyName("port")] public int Port { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Server/TransportTypes.cs b/src/Arguments/Server/TransportTypes.cs index 6c4b0222d..7dd605486 100644 --- a/src/Arguments/Server/TransportTypes.cs +++ b/src/Arguments/Server/TransportTypes.cs @@ -7,4 +7,4 @@ internal static class TransportTypes { public const string StdIo = "stdio"; public const string Sse = "sse"; -} \ No newline at end of file +} diff --git a/src/Arguments/Storage/Account/AccountListArguments.cs b/src/Arguments/Storage/Account/AccountListArguments.cs index 939aa6c3a..e921115fe 100644 --- a/src/Arguments/Storage/Account/AccountListArguments.cs +++ b/src/Arguments/Storage/Account/AccountListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Storage.Account; -public class AccountListArguments : SubscriptionArguments; \ No newline at end of file +public class AccountListArguments : SubscriptionArguments; diff --git a/src/Arguments/Storage/BaseStorageArguments.cs b/src/Arguments/Storage/BaseStorageArguments.cs index 5bde385ff..6b95aefb5 100644 --- a/src/Arguments/Storage/BaseStorageArguments.cs +++ b/src/Arguments/Storage/BaseStorageArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Storage; @@ -10,4 +10,4 @@ public class BaseStorageArguments : SubscriptionArguments { [JsonPropertyName(ArgumentDefinitions.Storage.AccountName)] public string? Account { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Storage/Blob/BaseContainerArguments.cs b/src/Arguments/Storage/Blob/BaseContainerArguments.cs index 3b9603250..05163ac45 100644 --- a/src/Arguments/Storage/Blob/BaseContainerArguments.cs +++ b/src/Arguments/Storage/Blob/BaseContainerArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments.Storage.Blob; @@ -10,4 +10,4 @@ public class BaseContainerArguments : BaseStorageArguments { [JsonPropertyName(ArgumentDefinitions.Storage.ContainerName)] public string? Container { get; set; } -} \ No newline at end of file +} diff --git a/src/Arguments/Storage/Blob/BlobListArguments.cs b/src/Arguments/Storage/Blob/BlobListArguments.cs index 30c6d6414..0fb78d297 100644 --- a/src/Arguments/Storage/Blob/BlobListArguments.cs +++ b/src/Arguments/Storage/Blob/BlobListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Storage.Blob; -public class BlobListArguments : BaseContainerArguments; \ No newline at end of file +public class BlobListArguments : BaseContainerArguments; diff --git a/src/Arguments/Storage/Blob/Container/ContainerDetailsArguments.cs b/src/Arguments/Storage/Blob/Container/ContainerDetailsArguments.cs index 240386db7..307ac090e 100644 --- a/src/Arguments/Storage/Blob/Container/ContainerDetailsArguments.cs +++ b/src/Arguments/Storage/Blob/Container/ContainerDetailsArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Storage.Blob.Container; -public class ContainerDetailsArguments : BaseContainerArguments; \ No newline at end of file +public class ContainerDetailsArguments : BaseContainerArguments; diff --git a/src/Arguments/Storage/Blob/Container/ContainerListArguments.cs b/src/Arguments/Storage/Blob/Container/ContainerListArguments.cs index e7b57f521..522761283 100644 --- a/src/Arguments/Storage/Blob/Container/ContainerListArguments.cs +++ b/src/Arguments/Storage/Blob/Container/ContainerListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Storage.Blob.Container; -public class ContainerListArguments : BaseStorageArguments; \ No newline at end of file +public class ContainerListArguments : BaseStorageArguments; diff --git a/src/Arguments/Storage/Table/TableListArguments.cs b/src/Arguments/Storage/Table/TableListArguments.cs index d22efbc7b..6b60450c2 100644 --- a/src/Arguments/Storage/Table/TableListArguments.cs +++ b/src/Arguments/Storage/Table/TableListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Storage.Table; -public class TableListArguments : BaseStorageArguments; \ No newline at end of file +public class TableListArguments : BaseStorageArguments; diff --git a/src/Arguments/Subscription/BaseSubscriptionArguments.cs b/src/Arguments/Subscription/BaseSubscriptionArguments.cs index ac2e1ab53..d6457420b 100644 --- a/src/Arguments/Subscription/BaseSubscriptionArguments.cs +++ b/src/Arguments/Subscription/BaseSubscriptionArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Subscription; -public class BaseSubscriptionArguments : GlobalArguments; \ No newline at end of file +public class BaseSubscriptionArguments : GlobalArguments; diff --git a/src/Arguments/Subscription/SubscriptionListArguments.cs b/src/Arguments/Subscription/SubscriptionListArguments.cs index 4bdfd6212..41d4955b8 100644 --- a/src/Arguments/Subscription/SubscriptionListArguments.cs +++ b/src/Arguments/Subscription/SubscriptionListArguments.cs @@ -3,4 +3,4 @@ namespace AzureMcp.Arguments.Subscription; -public class SubscriptionListArguments : BaseSubscriptionArguments; \ No newline at end of file +public class SubscriptionListArguments : BaseSubscriptionArguments; diff --git a/src/Arguments/SubscriptionArguments.cs b/src/Arguments/SubscriptionArguments.cs index 354f3e315..f707e47d8 100644 --- a/src/Arguments/SubscriptionArguments.cs +++ b/src/Arguments/SubscriptionArguments.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Arguments; @@ -10,4 +10,4 @@ public class SubscriptionArguments : GlobalArguments { [JsonPropertyName(ArgumentDefinitions.Common.SubscriptionName)] public string? Subscription { get; set; } -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/Account/AccountListCommand.cs b/src/Commands/AppConfig/Account/AccountListCommand.cs index 75d7da2da..c8624035c 100644 --- a/src/Commands/AppConfig/Account/AccountListCommand.cs +++ b/src/Commands/AppConfig/Account/AccountListCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.AppConfig.Account; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.AppConfig.Account; @@ -52,4 +52,4 @@ public sealed class AccountListCommand(ILogger logger) : Sub return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/BaseAppConfigCommand.cs b/src/Commands/AppConfig/BaseAppConfigCommand.cs index 3eb1ad3ba..003cab28b 100644 --- a/src/Commands/AppConfig/BaseAppConfigCommand.cs +++ b/src/Commands/AppConfig/BaseAppConfigCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Arguments.AppConfig; -using AzureMcp.Models.Argument; -using AzureMcp.Services.Interfaces; using System.CommandLine; using System.CommandLine.Parsing; using System.Diagnostics.CodeAnalysis; +using AzureMcp.Arguments.AppConfig; +using AzureMcp.Models.Argument; +using AzureMcp.Services.Interfaces; namespace AzureMcp.Commands.AppConfig; @@ -40,4 +40,4 @@ public abstract class BaseAppConfigCommand< .Create(ArgumentDefinitions.AppConfig.Account.Name, ArgumentDefinitions.AppConfig.Account.Description) .WithValueAccessor(args => args.Account ?? string.Empty) .WithIsRequired(ArgumentDefinitions.AppConfig.Account.Required); -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/KeyValue/BaseKeyValueCommand.cs b/src/Commands/AppConfig/KeyValue/BaseKeyValueCommand.cs index 69eb69842..5138fe47f 100644 --- a/src/Commands/AppConfig/KeyValue/BaseKeyValueCommand.cs +++ b/src/Commands/AppConfig/KeyValue/BaseKeyValueCommand.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Arguments.AppConfig.KeyValue; -using AzureMcp.Models.Argument; using System.CommandLine; using System.CommandLine.Parsing; using System.Diagnostics.CodeAnalysis; +using AzureMcp.Arguments.AppConfig.KeyValue; +using AzureMcp.Models.Argument; namespace AzureMcp.Commands.AppConfig.KeyValue; @@ -49,4 +49,4 @@ public abstract class BaseKeyValueCommand< .Create(ArgumentDefinitions.AppConfig.Label.Name, ArgumentDefinitions.AppConfig.Label.Description) .WithValueAccessor(args => args.Label ?? string.Empty) .WithIsRequired(ArgumentDefinitions.AppConfig.Label.Required); -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/KeyValue/KeyValueDeleteCommand.cs b/src/Commands/AppConfig/KeyValue/KeyValueDeleteCommand.cs index 24a4ce12f..b327d08f6 100644 --- a/src/Commands/AppConfig/KeyValue/KeyValueDeleteCommand.cs +++ b/src/Commands/AppConfig/KeyValue/KeyValueDeleteCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.AppConfig.KeyValue; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.AppConfig.KeyValue; @@ -54,4 +54,4 @@ public sealed class KeyValueDeleteCommand(ILogger logger) return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/KeyValue/KeyValueListCommand.cs b/src/Commands/AppConfig/KeyValue/KeyValueListCommand.cs index b65e22a6b..e452551d3 100644 --- a/src/Commands/AppConfig/KeyValue/KeyValueListCommand.cs +++ b/src/Commands/AppConfig/KeyValue/KeyValueListCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.AppConfig.KeyValue; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.AppConfig.KeyValue; @@ -96,4 +96,4 @@ public sealed class KeyValueListCommand(ILogger logger) : B return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/KeyValue/KeyValueLockCommand.cs b/src/Commands/AppConfig/KeyValue/KeyValueLockCommand.cs index ecfd186a8..48f631872 100644 --- a/src/Commands/AppConfig/KeyValue/KeyValueLockCommand.cs +++ b/src/Commands/AppConfig/KeyValue/KeyValueLockCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.AppConfig.KeyValue; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.AppConfig.KeyValue; @@ -54,4 +54,4 @@ public sealed class KeyValueLockCommand(ILogger logger) : B return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/KeyValue/KeyValueSetCommand.cs b/src/Commands/AppConfig/KeyValue/KeyValueSetCommand.cs index 2405e8e07..4c8ee8efd 100644 --- a/src/Commands/AppConfig/KeyValue/KeyValueSetCommand.cs +++ b/src/Commands/AppConfig/KeyValue/KeyValueSetCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.AppConfig.KeyValue; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.AppConfig.KeyValue; @@ -83,4 +83,4 @@ public sealed class KeyValueSetCommand(ILogger logger) : Bas return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/KeyValue/KeyValueShowCommand.cs b/src/Commands/AppConfig/KeyValue/KeyValueShowCommand.cs index 527dd90b2..b8100dfa6 100644 --- a/src/Commands/AppConfig/KeyValue/KeyValueShowCommand.cs +++ b/src/Commands/AppConfig/KeyValue/KeyValueShowCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.AppConfig.KeyValue; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.AppConfig.KeyValue; @@ -54,4 +54,4 @@ public sealed class KeyValueShowCommand(ILogger logger) : B return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/AppConfig/KeyValue/KeyValueUnlockCommand.cs b/src/Commands/AppConfig/KeyValue/KeyValueUnlockCommand.cs index 7b1baf9ab..3322f0c77 100644 --- a/src/Commands/AppConfig/KeyValue/KeyValueUnlockCommand.cs +++ b/src/Commands/AppConfig/KeyValue/KeyValueUnlockCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.AppConfig.KeyValue; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.AppConfig.KeyValue; @@ -55,4 +55,4 @@ public sealed class KeyValueUnlockCommand(ILogger logger) return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/BaseCommand.cs b/src/Commands/BaseCommand.cs index 8353a7271..a4290d088 100644 --- a/src/Commands/BaseCommand.cs +++ b/src/Commands/BaseCommand.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; -using AzureMcp.Models.Command; using System.CommandLine; using System.CommandLine.Parsing; +using AzureMcp.Models.Argument; +using AzureMcp.Models.Command; namespace AzureMcp.Commands; @@ -67,4 +67,4 @@ public abstract class BaseCommand : IBaseCommand _arguments.Add(argument); } } -} \ No newline at end of file +} diff --git a/src/Commands/CommandFactory.cs b/src/Commands/CommandFactory.cs index 3bdc4a532..da1ff12de 100644 --- a/src/Commands/CommandFactory.cs +++ b/src/Commands/CommandFactory.cs @@ -1,6 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.Reflection; +using System.Text.Encodings.Web; +using System.Text.Json; +using System.Text.Json.Serialization; using AzureMcp.Commands.Cosmos; using AzureMcp.Commands.Server; using AzureMcp.Commands.Storage.Blob; @@ -9,11 +14,6 @@ using AzureMcp.Models; using AzureMcp.Models.Command; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using System.CommandLine; -using System.Reflection; -using System.Text.Encodings.Web; -using System.Text.Json; -using System.Text.Json.Serialization; namespace AzureMcp.Commands; @@ -404,4 +404,4 @@ public class CommandFactory .Where(kvp => kvp.Value.GetType().GetCustomAttribute() == null) .OrderBy(kvp => kvp.Key); } -} \ No newline at end of file +} diff --git a/src/Commands/CommandGroup.cs b/src/Commands/CommandGroup.cs index 27dce110b..a2bd042f7 100644 --- a/src/Commands/CommandGroup.cs +++ b/src/Commands/CommandGroup.cs @@ -59,4 +59,4 @@ public class CommandGroup(string name, string description) return subGroup.GetCommand(parts[1]); } } -} \ No newline at end of file +} diff --git a/src/Commands/Cosmos/AccountListCommand.cs b/src/Commands/Cosmos/AccountListCommand.cs index 731bf60c3..a0adad093 100644 --- a/src/Commands/Cosmos/AccountListCommand.cs +++ b/src/Commands/Cosmos/AccountListCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Cosmos; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Cosmos; @@ -52,4 +52,4 @@ public sealed class AccountListCommand(ILogger logger) : Sub return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Cosmos/BaseContainerCommand.cs b/src/Commands/Cosmos/BaseContainerCommand.cs index db09cdbf0..678d9227a 100644 --- a/src/Commands/Cosmos/BaseContainerCommand.cs +++ b/src/Commands/Cosmos/BaseContainerCommand.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.CommandLine; using System.CommandLine.Parsing; +using AzureMcp.Models.Argument; namespace AzureMcp.Commands.Cosmos; @@ -36,4 +36,4 @@ public abstract class BaseContainerCommand : BaseDatabaseCommand w .Create(ArgumentDefinitions.Cosmos.Container.Name, ArgumentDefinitions.Cosmos.Container.Description) .WithValueAccessor(args => args.Container ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Cosmos.Container.Required); -} \ No newline at end of file +} diff --git a/src/Commands/Cosmos/BaseCosmosCommand.cs b/src/Commands/Cosmos/BaseCosmosCommand.cs index 33eb270f2..ad8f60601 100644 --- a/src/Commands/Cosmos/BaseCosmosCommand.cs +++ b/src/Commands/Cosmos/BaseCosmosCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Diagnostics.CodeAnalysis; using AzureMcp.Arguments.Cosmos; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Azure.Cosmos; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Diagnostics.CodeAnalysis; namespace AzureMcp.Commands.Cosmos; @@ -33,7 +33,8 @@ public abstract class BaseCosmosCommand< // Common method to get account options protected async Task> GetAccountOptions(CommandContext context, string subscription) { - if (string.IsNullOrEmpty(subscription)) return []; + if (string.IsNullOrEmpty(subscription)) + return []; var cosmosService = context.GetService(); var accounts = await cosmosService.GetCosmosAccounts(subscription); @@ -90,4 +91,4 @@ public abstract class BaseCosmosCommand< .Create(ArgumentDefinitions.Cosmos.Account.Name, ArgumentDefinitions.Cosmos.Account.Description) .WithValueAccessor(args => args.Account ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Cosmos.Account.Required); -} \ No newline at end of file +} diff --git a/src/Commands/Cosmos/BaseDatabaseCommand.cs b/src/Commands/Cosmos/BaseDatabaseCommand.cs index 811c6a3ee..d85137d1f 100644 --- a/src/Commands/Cosmos/BaseDatabaseCommand.cs +++ b/src/Commands/Cosmos/BaseDatabaseCommand.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Arguments.Cosmos; -using AzureMcp.Models.Argument; using System.CommandLine; using System.CommandLine.Parsing; using System.Diagnostics.CodeAnalysis; +using AzureMcp.Arguments.Cosmos; +using AzureMcp.Models.Argument; namespace AzureMcp.Commands.Cosmos; @@ -40,4 +40,4 @@ public abstract class BaseDatabaseCommand< .Create(ArgumentDefinitions.Cosmos.Database.Name, ArgumentDefinitions.Cosmos.Database.Description) .WithValueAccessor(args => args.Database ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Cosmos.Database.Required); -} \ No newline at end of file +} diff --git a/src/Commands/Cosmos/ContainerListCommand.cs b/src/Commands/Cosmos/ContainerListCommand.cs index 9e13f0e64..5d302228b 100644 --- a/src/Commands/Cosmos/ContainerListCommand.cs +++ b/src/Commands/Cosmos/ContainerListCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Cosmos; using AzureMcp.Models; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Cosmos; @@ -57,4 +57,4 @@ public sealed class ContainerListCommand(ILogger logger) : return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Cosmos/DatabaseListCommand.cs b/src/Commands/Cosmos/DatabaseListCommand.cs index 8fef7b13f..60a3cca90 100644 --- a/src/Commands/Cosmos/DatabaseListCommand.cs +++ b/src/Commands/Cosmos/DatabaseListCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Cosmos; using AzureMcp.Models; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Cosmos; @@ -55,4 +55,4 @@ public sealed class DatabaseListCommand(ILogger logger) : B return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Cosmos/ItemQueryCommand.cs b/src/Commands/Cosmos/ItemQueryCommand.cs index 52fdf6dd8..9774bb9d9 100644 --- a/src/Commands/Cosmos/ItemQueryCommand.cs +++ b/src/Commands/Cosmos/ItemQueryCommand.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.Cosmos; using AzureMcp.Models; using AzureMcp.Models.Argument; @@ -8,8 +10,6 @@ using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Cosmos; @@ -93,4 +93,4 @@ public sealed class ItemQueryCommand(ILogger logger) : BaseCon return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Extension/AzCommand.cs b/src/Commands/Extension/AzCommand.cs index a2a66084f..bd9bba14f 100644 --- a/src/Commands/Extension/AzCommand.cs +++ b/src/Commands/Extension/AzCommand.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Runtime.InteropServices; using AzureMcp.Arguments.Extension; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Runtime.InteropServices; namespace AzureMcp.Commands.Extension; @@ -140,4 +140,4 @@ Your job is to answer questions about an Azure environment by executing Azure CL return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Extension/AzdCommand.cs b/src/Commands/Extension/AzdCommand.cs index 1f3338fd0..77945e3f2 100644 --- a/src/Commands/Extension/AzdCommand.cs +++ b/src/Commands/Extension/AzdCommand.cs @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Runtime.InteropServices; using AzureMcp.Arguments.Extension; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; @@ -8,9 +11,6 @@ using AzureMcp.Services.Azure; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Runtime.InteropServices; namespace AzureMcp.Commands.Extension; @@ -264,4 +264,4 @@ public sealed class AzdCommand(ILogger logger, int processTimeoutSec return response; } -} \ No newline at end of file +} diff --git a/src/Commands/GlobalCommand.cs b/src/Commands/GlobalCommand.cs index a419a97a8..6e8e56987 100644 --- a/src/Commands/GlobalCommand.cs +++ b/src/Commands/GlobalCommand.cs @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.Core; using Azure.Identity; @@ -9,9 +12,6 @@ using AzureMcp.Models; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Diagnostics.CodeAnalysis; #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously @@ -140,7 +140,8 @@ public abstract class GlobalCommand< protected async Task> GetResourceGroupOptions(CommandContext context, string subscription, string tenant = "") { - if (string.IsNullOrEmpty(subscription)) return []; + if (string.IsNullOrEmpty(subscription)) + return []; var resourceGroupService = context.GetService(); var resourceGroup = await resourceGroupService.GetResourceGroups(subscription, tenant); @@ -320,4 +321,4 @@ public abstract class GlobalCommand< HttpRequestException => 503, _ => 500 }; -} \ No newline at end of file +} diff --git a/src/Commands/Group/GroupListCommand.cs b/src/Commands/Group/GroupListCommand.cs index e5dbebc3b..a78f3c7db 100644 --- a/src/Commands/Group/GroupListCommand.cs +++ b/src/Commands/Group/GroupListCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Group; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Group; @@ -54,4 +54,4 @@ public sealed class GroupListCommand(ILogger logger) : Subscri return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/IBaseCommand.cs b/src/Commands/IBaseCommand.cs index 0ffe54ced..9298a8be6 100644 --- a/src/Commands/IBaseCommand.cs +++ b/src/Commands/IBaseCommand.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; -using AzureMcp.Models.Command; using System.CommandLine; using System.CommandLine.Parsing; using System.Diagnostics.CodeAnalysis; +using AzureMcp.Models.Argument; +using AzureMcp.Models.Command; namespace AzureMcp.Commands; @@ -39,4 +39,4 @@ public interface IBaseCommand /// Adds an argument /// void AddArgument(ArgumentDefinition argument); -} \ No newline at end of file +} diff --git a/src/Commands/Monitor/BaseMonitorCommand.cs b/src/Commands/Monitor/BaseMonitorCommand.cs index ca092ef9b..792361fb2 100644 --- a/src/Commands/Monitor/BaseMonitorCommand.cs +++ b/src/Commands/Monitor/BaseMonitorCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Diagnostics.CodeAnalysis; using AzureMcp.Arguments; using AzureMcp.Arguments.Monitor; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Diagnostics.CodeAnalysis; namespace AzureMcp.Commands.Monitor; @@ -33,7 +33,8 @@ public abstract class BaseMonitorCommand< protected async Task> GetWorkspaceOptions(CommandContext context, string subscription) { - if (string.IsNullOrEmpty(subscription)) return []; + if (string.IsNullOrEmpty(subscription)) + return []; var monitorService = context.GetService(); var workspaces = await monitorService.ListWorkspaces(subscription, null); @@ -56,4 +57,4 @@ public abstract class BaseMonitorCommand< args.Workspace = parseResult.GetValueForOption(_workspaceOption); return args; } -} \ No newline at end of file +} diff --git a/src/Commands/Monitor/Log/LogQueryCommand.cs b/src/Commands/Monitor/Log/LogQueryCommand.cs index 592c0accf..09d6338e2 100644 --- a/src/Commands/Monitor/Log/LogQueryCommand.cs +++ b/src/Commands/Monitor/Log/LogQueryCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.Monitor; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Monitor.Log; @@ -133,4 +133,4 @@ public sealed class LogQueryCommand(ILogger logger) : BaseMonit args.ResourceGroup = parseResult.GetValueForOption(_resourceGroupOption); return args; } -} \ No newline at end of file +} diff --git a/src/Commands/Monitor/Table/TableListCommand.cs b/src/Commands/Monitor/Table/TableListCommand.cs index 51cc32d06..8d7d9c90e 100644 --- a/src/Commands/Monitor/Table/TableListCommand.cs +++ b/src/Commands/Monitor/Table/TableListCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.Monitor; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Monitor.Table; @@ -90,4 +90,4 @@ public sealed class TableListCommand(ILogger logger) : BaseMon args.ResourceGroup = parseResult.GetValueForOption(_resourceGroupOption) ?? ArgumentDefinitions.Common.ResourceGroup.DefaultValue; return args; } -} \ No newline at end of file +} diff --git a/src/Commands/Monitor/Workspace/WorkspaceListCommand.cs b/src/Commands/Monitor/Workspace/WorkspaceListCommand.cs index d3f565b28..72ee76dda 100644 --- a/src/Commands/Monitor/Workspace/WorkspaceListCommand.cs +++ b/src/Commands/Monitor/Workspace/WorkspaceListCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Monitor; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Monitor.Workspace; @@ -53,4 +53,4 @@ public sealed class WorkspaceListCommand(ILogger logger) : return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Search/Index/IndexDescribeCommand.cs b/src/Commands/Search/Index/IndexDescribeCommand.cs index f916faaae..940524e7b 100644 --- a/src/Commands/Search/Index/IndexDescribeCommand.cs +++ b/src/Commands/Search/Index/IndexDescribeCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.Search.Index; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Search.Index; @@ -93,4 +93,4 @@ public sealed class IndexDescribeCommand(ILogger logger) : .Create(ArgumentDefinitions.Search.Index.Name, ArgumentDefinitions.Search.Index.Description) .WithValueAccessor(args => args.Index ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Search.Index.Required); -} \ No newline at end of file +} diff --git a/src/Commands/Search/Index/IndexListCommand.cs b/src/Commands/Search/Index/IndexListCommand.cs index 940396e87..88a8cad8f 100644 --- a/src/Commands/Search/Index/IndexListCommand.cs +++ b/src/Commands/Search/Index/IndexListCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.Search.Index; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Search.Index; @@ -79,4 +79,4 @@ public sealed class IndexListCommand(ILogger logger) : GlobalC .Create(ArgumentDefinitions.Search.Service.Name, ArgumentDefinitions.Search.Service.Description) .WithValueAccessor(args => args.Service ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Search.Service.Required); -} \ No newline at end of file +} diff --git a/src/Commands/Search/Index/IndexQueryCommand.cs b/src/Commands/Search/Index/IndexQueryCommand.cs index 25f9002ca..59510b40a 100644 --- a/src/Commands/Search/Index/IndexQueryCommand.cs +++ b/src/Commands/Search/Index/IndexQueryCommand.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; using AzureMcp.Arguments.Search.Index; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Search.Index; @@ -104,4 +104,4 @@ public sealed class IndexQueryCommand(ILogger logger) : Globa .Create(ArgumentDefinitions.Search.Query.Name, ArgumentDefinitions.Search.Query.Description) .WithValueAccessor(args => args.Query ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Search.Query.Required); -} \ No newline at end of file +} diff --git a/src/Commands/Search/Service/ServiceListCommand.cs b/src/Commands/Search/Service/ServiceListCommand.cs index 0ac65d081..a7c7f76df 100644 --- a/src/Commands/Search/Service/ServiceListCommand.cs +++ b/src/Commands/Search/Service/ServiceListCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Search.Service; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Search.Service; @@ -53,4 +53,4 @@ public sealed class ServiceListCommand(ILogger logger) : Sub return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Server/ServiceStartCommand.cs b/src/Commands/Server/ServiceStartCommand.cs index 2c6289494..18b7693ad 100644 --- a/src/Commands/Server/ServiceStartCommand.cs +++ b/src/Commands/Server/ServiceStartCommand.cs @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Reflection; using AzureMcp.Arguments.Server; using AzureMcp.Extensions; using AzureMcp.Models; @@ -18,9 +21,6 @@ using ModelContextProtocol.Server; using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Reflection; namespace AzureMcp.Commands.Server; @@ -216,4 +216,4 @@ public sealed class ServiceStartCommand(IServiceProvider serviceProvider) : Base _logForwarder.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/Commands/Server/ToolOperations.cs b/src/Commands/Server/ToolOperations.cs index 058d95f3b..f6f1dd555 100644 --- a/src/Commands/Server/ToolOperations.cs +++ b/src/Commands/Server/ToolOperations.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.Reflection; +using System.Text.Json; using AzureMcp.Models.Command; using Microsoft.Extensions.Logging; using ModelContextProtocol.Protocol.Types; using ModelContextProtocol.Server; using ModelContextProtocol.Utils.Json; -using System.CommandLine; -using System.Reflection; -using System.Text.Json; namespace AzureMcp.Commands.Server; @@ -172,4 +172,4 @@ public class ToolOperations return tool; } -} \ No newline at end of file +} diff --git a/src/Commands/Storage/Account/AccountListCommand.cs b/src/Commands/Storage/Account/AccountListCommand.cs index 12cb041bf..85f8b9364 100644 --- a/src/Commands/Storage/Account/AccountListCommand.cs +++ b/src/Commands/Storage/Account/AccountListCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Storage.Account; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Storage.Account; @@ -52,4 +52,4 @@ public sealed class AccountListCommand(ILogger logger) : Sub return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Storage/BaseStorageCommand.cs b/src/Commands/Storage/BaseStorageCommand.cs index e43b899fd..15ea6b027 100644 --- a/src/Commands/Storage/BaseStorageCommand.cs +++ b/src/Commands/Storage/BaseStorageCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Arguments.Storage; -using AzureMcp.Models.Argument; -using AzureMcp.Services.Interfaces; using System.CommandLine; using System.CommandLine.Parsing; using System.Diagnostics.CodeAnalysis; +using AzureMcp.Arguments.Storage; +using AzureMcp.Models.Argument; +using AzureMcp.Services.Interfaces; namespace AzureMcp.Commands.Storage; @@ -43,4 +43,4 @@ public abstract class BaseStorageCommand< .WithValueAccessor(args => args.Account ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Storage.Account.Required); } -} \ No newline at end of file +} diff --git a/src/Commands/Storage/Blob/BlobListCommand.cs b/src/Commands/Storage/Blob/BlobListCommand.cs index 09c1e689f..21361ab7a 100644 --- a/src/Commands/Storage/Blob/BlobListCommand.cs +++ b/src/Commands/Storage/Blob/BlobListCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Storage.Blob; using AzureMcp.Commands.Storage.Blob.Container; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Storage.Blob; @@ -55,4 +55,4 @@ public sealed class BlobListCommand(ILogger logger) : BaseConta return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Storage/Blob/Container/BaseContainerCommand.cs b/src/Commands/Storage/Blob/Container/BaseContainerCommand.cs index 64c827691..66f11259f 100644 --- a/src/Commands/Storage/Blob/Container/BaseContainerCommand.cs +++ b/src/Commands/Storage/Blob/Container/BaseContainerCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Arguments.Storage.Blob; -using AzureMcp.Models.Argument; -using AzureMcp.Services.Interfaces; using System.CommandLine; using System.CommandLine.Parsing; using System.Diagnostics.CodeAnalysis; +using AzureMcp.Arguments.Storage.Blob; +using AzureMcp.Models.Argument; +using AzureMcp.Services.Interfaces; namespace AzureMcp.Commands.Storage.Blob.Container; @@ -46,4 +46,4 @@ public abstract class BaseContainerCommand< .WithValueAccessor(args => args.Container ?? string.Empty) .WithIsRequired(ArgumentDefinitions.Storage.Container.Required); } -} \ No newline at end of file +} diff --git a/src/Commands/Storage/Blob/Container/ContainerDetailsCommand.cs b/src/Commands/Storage/Blob/Container/ContainerDetailsCommand.cs index 6cc5ff2b9..22b5d4616 100644 --- a/src/Commands/Storage/Blob/Container/ContainerDetailsCommand.cs +++ b/src/Commands/Storage/Blob/Container/ContainerDetailsCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Storage.Blob.Container; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Storage.Blob.Container; @@ -54,4 +54,4 @@ public sealed class ContainerDetailsCommand(ILogger log return context.Response; } } -} \ No newline at end of file +} diff --git a/src/Commands/Storage/Blob/Container/ContainerListCommand.cs b/src/Commands/Storage/Blob/Container/ContainerListCommand.cs index 7f685e904..6897a6810 100644 --- a/src/Commands/Storage/Blob/Container/ContainerListCommand.cs +++ b/src/Commands/Storage/Blob/Container/ContainerListCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Storage.Blob.Container; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Storage.Blob.Container; @@ -52,4 +52,4 @@ public sealed class ContainerListCommand(ILogger logger) : return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Storage/Table/TableListCommand.cs b/src/Commands/Storage/Table/TableListCommand.cs index 4474f8e0d..247523b32 100644 --- a/src/Commands/Storage/Table/TableListCommand.cs +++ b/src/Commands/Storage/Table/TableListCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Storage.Table; using AzureMcp.Models; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Storage.Table; @@ -75,4 +75,4 @@ public sealed class TableListCommand(ILogger logger) : BaseSto return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/Subscription/BaseSubscriptionCommand.cs b/src/Commands/Subscription/BaseSubscriptionCommand.cs index a830b6de4..6b703f167 100644 --- a/src/Commands/Subscription/BaseSubscriptionCommand.cs +++ b/src/Commands/Subscription/BaseSubscriptionCommand.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Arguments.Subscription; using System.Diagnostics.CodeAnalysis; +using AzureMcp.Arguments.Subscription; namespace AzureMcp.Commands.Subscription; @@ -13,4 +13,4 @@ public abstract class BaseSubscriptionCommand< protected BaseSubscriptionCommand() { } -} \ No newline at end of file +} diff --git a/src/Commands/Subscription/SubscriptionListCommand.cs b/src/Commands/Subscription/SubscriptionListCommand.cs index f837ceb2b..2ea7d6ceb 100644 --- a/src/Commands/Subscription/SubscriptionListCommand.cs +++ b/src/Commands/Subscription/SubscriptionListCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Arguments.Subscription; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Subscription; @@ -49,4 +49,4 @@ public sealed class SubscriptionListCommand(ILogger log return context.Response; } -} \ No newline at end of file +} diff --git a/src/Commands/SubscriptionCommand.cs b/src/Commands/SubscriptionCommand.cs index 622da3f1f..9e239bb90 100644 --- a/src/Commands/SubscriptionCommand.cs +++ b/src/Commands/SubscriptionCommand.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Diagnostics.CodeAnalysis; using AzureMcp.Arguments; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using AzureMcp.Services.Interfaces; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Diagnostics.CodeAnalysis; namespace AzureMcp.Commands; @@ -59,4 +59,4 @@ public abstract class SubscriptionCommand< args.Subscription = parseResult.GetValueForOption(_subscriptionOption); return args; } -} \ No newline at end of file +} diff --git a/src/Commands/Tools/ToolsListCommand.cs b/src/Commands/Tools/ToolsListCommand.cs index 4980459c7..4359da0e8 100644 --- a/src/Commands/Tools/ToolsListCommand.cs +++ b/src/Commands/Tools/ToolsListCommand.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine.Parsing; using AzureMcp.Models; using AzureMcp.Models.Argument; using AzureMcp.Models.Command; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; -using System.CommandLine.Parsing; namespace AzureMcp.Commands.Tools; @@ -67,4 +67,4 @@ public sealed class ToolsListCommand(ILogger logger) : BaseCom Arguments = argumentInfos, }; } -} \ No newline at end of file +} diff --git a/src/Extensions/ArgumentExtensions.cs b/src/Extensions/ArgumentExtensions.cs index 9d5eafbad..95a286fac 100644 --- a/src/Extensions/ArgumentExtensions.cs +++ b/src/Extensions/ArgumentExtensions.cs @@ -11,4 +11,4 @@ public static class ArgumentExtensions { arguments.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase)); } -} \ No newline at end of file +} diff --git a/src/Extensions/OpenTelemetryExtensions.cs b/src/Extensions/OpenTelemetryExtensions.cs index 029ffdbe6..adfb196e1 100644 --- a/src/Extensions/OpenTelemetryExtensions.cs +++ b/src/Extensions/OpenTelemetryExtensions.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Diagnostics; +using System.Reflection; using Azure.Monitor.OpenTelemetry.AspNetCore; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry; using OpenTelemetry.Metrics; using OpenTelemetry.Resources; using OpenTelemetry.Trace; -using System.Diagnostics; -using System.Reflection; namespace AzureMcp.Extensions; @@ -63,4 +63,4 @@ public static class OpenTelemetryExtensions return false; } -} \ No newline at end of file +} diff --git a/src/Helpers/EnvironmentVariableHelpers.cs b/src/Helpers/EnvironmentVariableHelpers.cs index c722ecfda..051135620 100644 --- a/src/Helpers/EnvironmentVariableHelpers.cs +++ b/src/Helpers/EnvironmentVariableHelpers.cs @@ -1,4 +1,7 @@ -namespace AzureMcp.Helpers +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace AzureMcp.Helpers { public static class EnvironmentHelpers { @@ -14,4 +17,4 @@ }; } } -} \ No newline at end of file +} diff --git a/src/Models/AppConfig/AppConfigurationAccount.cs b/src/Models/AppConfig/AppConfigurationAccount.cs index b8fc14119..60ad06c34 100644 --- a/src/Models/AppConfig/AppConfigurationAccount.cs +++ b/src/Models/AppConfig/AppConfigurationAccount.cs @@ -23,4 +23,4 @@ public class AppConfigurationAccount // Full encryption properties public EncryptionProperties? Encryption { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/AppConfig/EncryptionProperties.cs b/src/Models/AppConfig/EncryptionProperties.cs index 55e6ffcb9..cea03c988 100644 --- a/src/Models/AppConfig/EncryptionProperties.cs +++ b/src/Models/AppConfig/EncryptionProperties.cs @@ -9,4 +9,4 @@ public class EncryptionProperties public string? IdentityClientId { get; set; } public bool? IsKeyVaultKeyIdentifierValid { get; set; } public bool? IsIdentityClientIdValid { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/AppConfig/KeyValueSetting.cs b/src/Models/AppConfig/KeyValueSetting.cs index b8dedc90f..2e2c208cf 100644 --- a/src/Models/AppConfig/KeyValueSetting.cs +++ b/src/Models/AppConfig/KeyValueSetting.cs @@ -12,4 +12,4 @@ public class KeyValueSetting public ETag ETag { get; set; } = new(); public DateTimeOffset? LastModified { get; set; } public bool? Locked { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/Argument/ArgumentBuilder.cs b/src/Models/Argument/ArgumentBuilder.cs index fd5820e62..084fcb4ad 100644 --- a/src/Models/Argument/ArgumentBuilder.cs +++ b/src/Models/Argument/ArgumentBuilder.cs @@ -55,4 +55,4 @@ public class ArgumentBuilder : ArgumentDefinition where TArgs : G DefaultValue = defaultValue; return this; } -} \ No newline at end of file +} diff --git a/src/Models/Argument/ArgumentDefinition.cs b/src/Models/Argument/ArgumentDefinition.cs index d2b34754a..50d0b3de6 100644 --- a/src/Models/Argument/ArgumentDefinition.cs +++ b/src/Models/Argument/ArgumentDefinition.cs @@ -52,4 +52,4 @@ public class ArgumentDefinition(string name, string description, string? valu { return new JsonPropertyNameAttribute(Name); } -} \ No newline at end of file +} diff --git a/src/Models/Argument/ArgumentDefinitions.cs b/src/Models/Argument/ArgumentDefinitions.cs index 7b339b090..de9126b7e 100644 --- a/src/Models/Argument/ArgumentDefinitions.cs +++ b/src/Models/Argument/ArgumentDefinitions.cs @@ -316,4 +316,4 @@ public static class ArgumentDefinitions ); } } -} \ No newline at end of file +} diff --git a/src/Models/Argument/ArgumentInfo.cs b/src/Models/Argument/ArgumentInfo.cs index 91c9d4344..5d31e4f02 100644 --- a/src/Models/Argument/ArgumentInfo.cs +++ b/src/Models/Argument/ArgumentInfo.cs @@ -9,4 +9,4 @@ public class ArgumentInfo( string? value = "", string? defaultValue = default, bool required = false) : - ArgumentDefinition(name, description, value, defaultValue, required); \ No newline at end of file + ArgumentDefinition(name, description, value, defaultValue, required); diff --git a/src/Models/Argument/ArgumentOption.cs b/src/Models/Argument/ArgumentOption.cs index 0e5a4a697..137a4fe2b 100644 --- a/src/Models/Argument/ArgumentOption.cs +++ b/src/Models/Argument/ArgumentOption.cs @@ -12,4 +12,4 @@ public class ArgumentOption [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; -} \ No newline at end of file +} diff --git a/src/Models/AuthMethod.cs b/src/Models/AuthMethod.cs index f39d80698..27665a620 100644 --- a/src/Models/AuthMethod.cs +++ b/src/Models/AuthMethod.cs @@ -8,4 +8,4 @@ public enum AuthMethod Credential, Key, ConnectionString -} \ No newline at end of file +} diff --git a/src/Models/Command/CommandContext.cs b/src/Models/Command/CommandContext.cs index d821dda85..7182c26aa 100644 --- a/src/Models/Command/CommandContext.cs +++ b/src/Models/Command/CommandContext.cs @@ -44,4 +44,4 @@ public class CommandContext { return _serviceProvider.GetRequiredService(); } -} \ No newline at end of file +} diff --git a/src/Models/Command/CommandInfo.cs b/src/Models/Command/CommandInfo.cs index 571429afe..ec31c9543 100644 --- a/src/Models/Command/CommandInfo.cs +++ b/src/Models/Command/CommandInfo.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Models.Argument; using System.Text.Json.Serialization; +using AzureMcp.Models.Argument; namespace AzureMcp.Models.Command; @@ -24,4 +24,4 @@ public class CommandInfo [JsonPropertyName("args")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? Arguments { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/Command/CommandResponse.cs b/src/Models/Command/CommandResponse.cs index 14346db83..bffba6bd4 100644 --- a/src/Models/Command/CommandResponse.cs +++ b/src/Models/Command/CommandResponse.cs @@ -19,4 +19,4 @@ public class CommandResponse [JsonPropertyName("duration")] public long Duration { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/ETag.cs b/src/Models/ETag.cs index 53eaa0e14..82f6a1cc5 100644 --- a/src/Models/ETag.cs +++ b/src/Models/ETag.cs @@ -7,4 +7,4 @@ public class ETag { public string Value { get; set; } = string.Empty; public DateTime LastModified { get; set; } = DateTime.UtcNow; -} \ No newline at end of file +} diff --git a/src/Models/HiddenCommandAttribute.cs b/src/Models/HiddenCommandAttribute.cs index d91163dc2..03c2c9499 100644 --- a/src/Models/HiddenCommandAttribute.cs +++ b/src/Models/HiddenCommandAttribute.cs @@ -6,4 +6,4 @@ namespace AzureMcp.Models; [AttributeUsage(AttributeTargets.Class)] public class HiddenCommandAttribute : Attribute { -} \ No newline at end of file +} diff --git a/src/Models/Identity/ManagedIdentity.cs b/src/Models/Identity/ManagedIdentity.cs index 871fe5335..f09fb2b2a 100644 --- a/src/Models/Identity/ManagedIdentity.cs +++ b/src/Models/Identity/ManagedIdentity.cs @@ -7,4 +7,4 @@ public class ManagedIdentityInfo { public SystemAssignedIdentityInfo? SystemAssignedIdentity { get; set; } public UserAssignedIdentityInfo[]? UserAssignedIdentities { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/Identity/SystemAssignedIdentityInfo.cs b/src/Models/Identity/SystemAssignedIdentityInfo.cs index b9f590ee6..6c0ccff25 100644 --- a/src/Models/Identity/SystemAssignedIdentityInfo.cs +++ b/src/Models/Identity/SystemAssignedIdentityInfo.cs @@ -8,4 +8,4 @@ public class SystemAssignedIdentityInfo public bool Enabled { get; set; } public string? TenantId { get; set; } public string? PrincipalId { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/Identity/UserAssignedIdentityInfo.cs b/src/Models/Identity/UserAssignedIdentityInfo.cs index 7e69f729d..8f4dac770 100644 --- a/src/Models/Identity/UserAssignedIdentityInfo.cs +++ b/src/Models/Identity/UserAssignedIdentityInfo.cs @@ -7,4 +7,4 @@ public class UserAssignedIdentityInfo { public string? ClientId { get; set; } public string? PrincipalId { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/Monitor/WorkspaceInfo.cs b/src/Models/Monitor/WorkspaceInfo.cs index 499c53bd0..eb5daca1c 100644 --- a/src/Models/Monitor/WorkspaceInfo.cs +++ b/src/Models/Monitor/WorkspaceInfo.cs @@ -7,4 +7,4 @@ public class WorkspaceInfo { public required string Name { get; set; } public required string CustomerId { get; set; } -} \ No newline at end of file +} diff --git a/src/Models/ResourceGroup/ResourceGroupInfo.cs b/src/Models/ResourceGroup/ResourceGroupInfo.cs index baa7bfa8b..51bec80eb 100644 --- a/src/Models/ResourceGroup/ResourceGroupInfo.cs +++ b/src/Models/ResourceGroup/ResourceGroupInfo.cs @@ -8,4 +8,4 @@ public class ResourceGroupInfo(string name, string id, string location) public string Name { get; set; } = name; public string Id { get; set; } = id; public string Location { get; set; } = location; -} \ No newline at end of file +} diff --git a/src/Program.cs b/src/Program.cs index 761af111d..3ac8f0139 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.Text.Json; using AzureMcp.Commands; using AzureMcp.Extensions; using AzureMcp.Models.Command; @@ -17,8 +19,6 @@ using AzureMcp.Services.Interfaces; using AzureMcp.Services.ProcessExecution; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using System.CommandLine; -using System.Text.Json; try { @@ -64,4 +64,4 @@ static void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); -} \ No newline at end of file +} diff --git a/src/Services/Azure/AppConfig/AppConfigService.cs b/src/Services/Azure/AppConfig/AppConfigService.cs index 8293eee2d..f2622d5ed 100644 --- a/src/Services/Azure/AppConfig/AppConfigService.cs +++ b/src/Services/Azure/AppConfig/AppConfigService.cs @@ -28,7 +28,8 @@ public class AppConfigService(ISubscriptionService subscriptionService, ITenantS await foreach (var account in subscription.GetAppConfigurationStoresAsync()) { ResourceIdentifier resourceId = account.Id; - if (resourceId.ToString().Length == 0) continue; + if (resourceId.ToString().Length == 0) + continue; var acc = new AppConfigurationAccount { @@ -191,4 +192,4 @@ public class AppConfigService(ISubscriptionService subscriptionService, ITenantS return configStore; } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Authentication/CustomChainedCredential.cs b/src/Services/Azure/Authentication/CustomChainedCredential.cs index 11b8ff069..bdcdc6113 100644 --- a/src/Services/Azure/Authentication/CustomChainedCredential.cs +++ b/src/Services/Azure/Authentication/CustomChainedCredential.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text; using Azure.Core; using Azure.Identity; using Azure.Identity.Broker; using AzureMcp.Helpers; -using System.Text; namespace AzureMcp.Services.Azure.Authentication; @@ -103,4 +103,4 @@ public class CustomChainedCredential(string? tenantId = null) : TokenCredential ExcludeManagedIdentityCredential = !includeProdCreds }); } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Authentication/WindowHandleProvider.cs b/src/Services/Azure/Authentication/WindowHandleProvider.cs index 26cef5100..3c873a263 100644 --- a/src/Services/Azure/Authentication/WindowHandleProvider.cs +++ b/src/Services/Azure/Authentication/WindowHandleProvider.cs @@ -61,4 +61,4 @@ public static partial class WindowHandleProvider [LibraryImport("libX11.so.6")] [return: MarshalAs(UnmanagedType.SysInt)] private static partial IntPtr XDefaultRootWindow(IntPtr display); -} \ No newline at end of file +} diff --git a/src/Services/Azure/BaseAzureService.cs b/src/Services/Azure/BaseAzureService.cs index cc8ea39c7..c73e5199d 100644 --- a/src/Services/Azure/BaseAzureService.cs +++ b/src/Services/Azure/BaseAzureService.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Reflection; +using System.Runtime.Versioning; using Azure.Core; using Azure.ResourceManager; using AzureMcp.Arguments; using AzureMcp.Services.Azure.Authentication; using AzureMcp.Services.Interfaces; -using System.Reflection; -using System.Runtime.Versioning; namespace AzureMcp.Services.Azure; @@ -38,7 +38,8 @@ public abstract class BaseAzureService(ITenantService? tenantService = null) protected async Task ResolveTenantIdAsync(string? tenant) { - if (tenant == null || _tenantService == null) return tenant; + if (tenant == null || _tenantService == null) + return tenant; return await _tenantService.GetTenantId(tenant); } @@ -128,4 +129,4 @@ public abstract class BaseAzureService(ITenantService? tenantService = null) ArgumentException.ThrowIfNullOrEmpty(param); } } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Cosmos/CosmosService.cs b/src/Services/Azure/Cosmos/CosmosService.cs index 96b0d6ff3..650577669 100644 --- a/src/Services/Azure/Cosmos/CosmosService.cs +++ b/src/Services/Azure/Cosmos/CosmosService.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json; using Azure.ResourceManager.CosmosDB; using AzureMcp.Arguments; using AzureMcp.Models; using AzureMcp.Services.Interfaces; using Microsoft.Azure.Cosmos; -using System.Text.Json; namespace AzureMcp.Services.Azure.Cosmos; @@ -278,4 +278,4 @@ public class CosmosService(ISubscriptionService subscriptionService, ITenantServ return base.SendAsync(request, cancellationToken); } } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Monitor/MonitorService.cs b/src/Services/Azure/Monitor/MonitorService.cs index 6da8112f8..6c3f0bcc7 100644 --- a/src/Services/Azure/Monitor/MonitorService.cs +++ b/src/Services/Azure/Monitor/MonitorService.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json; using Azure; using Azure.Monitor.Query; using Azure.ResourceManager.OperationalInsights; using AzureMcp.Arguments; using AzureMcp.Models.Monitor; using AzureMcp.Services.Interfaces; -using System.Text.Json; namespace AzureMcp.Services.Azure.Monitor; @@ -301,4 +301,4 @@ public class MonitorService(ISubscriptionService subscriptionService, ITenantSer return (matchingWorkspace.CustomerId, matchingWorkspace.Name); } -} \ No newline at end of file +} diff --git a/src/Services/Azure/ResourceGroup/ResourceGroupService.cs b/src/Services/Azure/ResourceGroup/ResourceGroupService.cs index 7f0771d45..3ac3f368f 100644 --- a/src/Services/Azure/ResourceGroup/ResourceGroupService.cs +++ b/src/Services/Azure/ResourceGroup/ResourceGroupService.cs @@ -105,4 +105,4 @@ public class ResourceGroupService(ICacheService cacheService, ISubscriptionServi throw new Exception($"Error retrieving resource group {resourceGroupName}: {ex.Message}", ex); } } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Search/SearchService.cs b/src/Services/Azure/Search/SearchService.cs index 983deacc0..85e55d638 100644 --- a/src/Services/Azure/Search/SearchService.cs +++ b/src/Services/Azure/Search/SearchService.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json; using Azure; using Azure.ResourceManager.Search; using Azure.Search.Documents; @@ -9,7 +10,6 @@ using Azure.Search.Documents.Indexes.Models; using Azure.Search.Documents.Models; using AzureMcp.Arguments; using AzureMcp.Services.Interfaces; -using System.Text.Json; namespace AzureMcp.Services.Azure.Search; @@ -228,4 +228,4 @@ public sealed class SearchService(ISubscriptionService subscriptionService, ICac options.Retry.NetworkTimeout = TimeSpan.FromSeconds(retryPolicy.NetworkTimeoutSeconds); } } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Storage/StorageService.cs b/src/Services/Azure/Storage/StorageService.cs index 2ee1df809..2dc33a679 100644 --- a/src/Services/Azure/Storage/StorageService.cs +++ b/src/Services/Azure/Storage/StorageService.cs @@ -318,4 +318,4 @@ public class StorageService(ISubscriptionService subscriptionService, ITenantSer } return new BlobServiceClient(new Uri(uri), await GetCredential(tenant), options); } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Subscription/SubscriptionService.cs b/src/Services/Azure/Subscription/SubscriptionService.cs index d8f6773c0..9d9422a9b 100644 --- a/src/Services/Azure/Subscription/SubscriptionService.cs +++ b/src/Services/Azure/Subscription/SubscriptionService.cs @@ -108,4 +108,4 @@ public class SubscriptionService(ICacheService cacheService, ITenantService tena return await GetSubscriptionIdByName(subscription, tenant, retryPolicy); } -} \ No newline at end of file +} diff --git a/src/Services/Azure/Tenant/TenantService.cs b/src/Services/Azure/Tenant/TenantService.cs index 228350173..dad384ae5 100644 --- a/src/Services/Azure/Tenant/TenantService.cs +++ b/src/Services/Azure/Tenant/TenantService.cs @@ -76,4 +76,4 @@ public class TenantService(ICacheService cacheService) return tenant.Name; } -} \ No newline at end of file +} diff --git a/src/Services/Azure/UserAgentPolicy.cs b/src/Services/Azure/UserAgentPolicy.cs index cde88cd4b..094af8b2e 100644 --- a/src/Services/Azure/UserAgentPolicy.cs +++ b/src/Services/Azure/UserAgentPolicy.cs @@ -25,4 +25,4 @@ public class UserAgentPolicy : HttpPipelineSynchronousPolicy base.OnSendingRequest(message); } -} \ No newline at end of file +} diff --git a/src/Services/Caching/CacheService.cs b/src/Services/Caching/CacheService.cs index 6838da96f..f451150a7 100644 --- a/src/Services/Caching/CacheService.cs +++ b/src/Services/Caching/CacheService.cs @@ -17,7 +17,8 @@ public class CacheService(IMemoryCache memoryCache) : ICacheService public ValueTask SetAsync(string key, T data, TimeSpan? expiration = null) { - if (data == null) return default; + if (data == null) + return default; var options = new MemoryCacheEntryOptions { @@ -33,4 +34,4 @@ public class CacheService(IMemoryCache memoryCache) : ICacheService _memoryCache.Remove(key); return default; } -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/IAppConfigService.cs b/src/Services/Interfaces/IAppConfigService.cs index 7567c8db8..7fe572d26 100644 --- a/src/Services/Interfaces/IAppConfigService.cs +++ b/src/Services/Interfaces/IAppConfigService.cs @@ -20,4 +20,4 @@ public interface IAppConfigService Task UnlockKeyValue(string accountName, string key, string subscriptionId, string? tenant = null, RetryPolicyArguments? retryPolicy = null, string? label = null); Task SetKeyValue(string accountName, string key, string value, string subscriptionId, string? tenant = null, RetryPolicyArguments? retryPolicy = null, string? label = null); Task DeleteKeyValue(string accountName, string key, string subscriptionId, string? tenant = null, RetryPolicyArguments? retryPolicy = null, string? label = null); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/ICacheService.cs b/src/Services/Interfaces/ICacheService.cs index 8e8f1ac82..17ecbbdc7 100644 --- a/src/Services/Interfaces/ICacheService.cs +++ b/src/Services/Interfaces/ICacheService.cs @@ -8,4 +8,4 @@ public interface ICacheService ValueTask GetAsync(string key, TimeSpan? expiration = null); ValueTask SetAsync(string key, T data, TimeSpan? expiration = null); ValueTask DeleteAsync(string key); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/ICosmosService.cs b/src/Services/Interfaces/ICosmosService.cs index a36f2414c..42cfc9d70 100644 --- a/src/Services/Interfaces/ICosmosService.cs +++ b/src/Services/Interfaces/ICosmosService.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json; using AzureMcp.Arguments; using AzureMcp.Models; -using System.Text.Json; namespace AzureMcp.Services.Interfaces; @@ -38,4 +38,4 @@ public interface ICosmosService : IDisposable AuthMethod authMethod = AuthMethod.Credential, string? tenant = null, RetryPolicyArguments? retryPolicy = null); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/IExternalProcessService.cs b/src/Services/Interfaces/IExternalProcessService.cs index 03e572f89..6d14c3d00 100644 --- a/src/Services/Interfaces/IExternalProcessService.cs +++ b/src/Services/Interfaces/IExternalProcessService.cs @@ -39,4 +39,4 @@ public interface IExternalProcessService /// /// /// Dictionary of environment variables to set void SetEnvironmentVariables(IDictionary variables); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/IMonitorService.cs b/src/Services/Interfaces/IMonitorService.cs index 769872e6d..1ff3ad6ac 100644 --- a/src/Services/Interfaces/IMonitorService.cs +++ b/src/Services/Interfaces/IMonitorService.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json; using AzureMcp.Arguments; using AzureMcp.Models.Monitor; -using System.Text.Json; namespace AzureMcp.Services.Interfaces; @@ -37,4 +37,4 @@ public interface IMonitorService int? hours = 24, int? limit = 20, string? tenant = null, RetryPolicyArguments? retryPolicy = null); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/IResourceGroupService.cs b/src/Services/Interfaces/IResourceGroupService.cs index 4f7997670..bf9bb0259 100644 --- a/src/Services/Interfaces/IResourceGroupService.cs +++ b/src/Services/Interfaces/IResourceGroupService.cs @@ -12,4 +12,4 @@ public interface IResourceGroupService Task> GetResourceGroups(string subscriptionId, string? tenant = null, RetryPolicyArguments? retryPolicy = null); Task GetResourceGroup(string subscriptionId, string resourceGroupName, string? tenant = null, RetryPolicyArguments? retryPolicy = null); Task GetResourceGroupResource(string subscriptionId, string resourceGroupName, string? tenant = null, RetryPolicyArguments? retryPolicy = null); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/ISearchService.cs b/src/Services/Interfaces/ISearchService.cs index 130c4bfca..f7f40424c 100644 --- a/src/Services/Interfaces/ISearchService.cs +++ b/src/Services/Interfaces/ISearchService.cs @@ -41,4 +41,4 @@ public interface ISearchService string indexName, string searchText, RetryPolicyArguments? retryPolicy = null); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/IStorageService.cs b/src/Services/Interfaces/IStorageService.cs index 1312badf4..542e6cd79 100644 --- a/src/Services/Interfaces/IStorageService.cs +++ b/src/Services/Interfaces/IStorageService.cs @@ -25,4 +25,4 @@ public interface IStorageService string subscriptionId, string? tenant = null, RetryPolicyArguments? retryPolicy = null); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/ISubscriptionService.cs b/src/Services/Interfaces/ISubscriptionService.cs index 6f840a07d..673542f47 100644 --- a/src/Services/Interfaces/ISubscriptionService.cs +++ b/src/Services/Interfaces/ISubscriptionService.cs @@ -14,4 +14,4 @@ public interface ISubscriptionService bool IsSubscriptionId(string subscription, string? tenant = null); Task GetSubscriptionIdByName(string subscriptionName, string? tenant = null, RetryPolicyArguments? retryPolicy = null); Task GetSubscriptionNameById(string subscriptionId, string? tenant = null, RetryPolicyArguments? retryPolicy = null); -} \ No newline at end of file +} diff --git a/src/Services/Interfaces/ITenantService.cs b/src/Services/Interfaces/ITenantService.cs index f40ffae89..193eb1a2d 100644 --- a/src/Services/Interfaces/ITenantService.cs +++ b/src/Services/Interfaces/ITenantService.cs @@ -12,4 +12,4 @@ public interface ITenantService Task GetTenantIdByName(string tenantName); Task GetTenantNameById(string tenantId); bool IsTenantId(string tenant); -} \ No newline at end of file +} diff --git a/src/Services/ProcessExecution/ExternalProcessService.cs b/src/Services/ProcessExecution/ExternalProcessService.cs index 399013a17..40126ad54 100644 --- a/src/Services/ProcessExecution/ExternalProcessService.cs +++ b/src/Services/ProcessExecution/ExternalProcessService.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Services.Interfaces; using System.Diagnostics; using System.Text; using System.Text.Json; +using AzureMcp.Services.Interfaces; namespace AzureMcp.Services.ProcessExecution; @@ -128,4 +128,4 @@ public class ExternalProcessService : IExternalProcessService environmentVariables[pair.Key] = pair.Value; } } -} \ No newline at end of file +} diff --git a/tests/Arguments/RetryPolicyArgumentsTests.cs b/tests/Arguments/RetryPolicyArgumentsTests.cs index 7cd7ac4f1..48b7f75b2 100644 --- a/tests/Arguments/RetryPolicyArgumentsTests.cs +++ b/tests/Arguments/RetryPolicyArgumentsTests.cs @@ -60,4 +60,4 @@ public class RetryPolicyArgumentsTests NetworkTimeoutSeconds = timeout }; } -} \ No newline at end of file +} diff --git a/tests/Client/AppConfigCommandTests.cs b/tests/Client/AppConfigCommandTests.cs index 093f027a2..c70a0de6d 100644 --- a/tests/Client/AppConfigCommandTests.cs +++ b/tests/Client/AppConfigCommandTests.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Tests.Client.Helpers; using System.Text.Json; +using AzureMcp.Tests.Client.Helpers; using Xunit; namespace AzureMcp.Tests.Client; @@ -183,4 +183,4 @@ public class AppConfigCommandTests(McpClientFixture mcpClient, LiveTestSettingsF Assert.True(result.TryGetProperty("key", out var key)); Assert.Equal("foo3", key.GetString()); } -} \ No newline at end of file +} diff --git a/tests/Client/ClientToolTests.cs b/tests/Client/ClientToolTests.cs index 611d463cf..8678af5eb 100644 --- a/tests/Client/ClientToolTests.cs +++ b/tests/Client/ClientToolTests.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Text.Json; using AzureMcp.Tests.Client.Helpers; using ModelContextProtocol; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol.Types; -using System.Text.Json; using Xunit; namespace AzureMcp.Tests.Client; @@ -131,4 +131,4 @@ public class ClientToolTests(McpClientFixture fixture) : IClassFixture(content!); return root.GetProperty("results"); } -} \ No newline at end of file +} diff --git a/tests/Client/CosmosCommandTests.cs b/tests/Client/CosmosCommandTests.cs index 3f88ecffc..c54957e2b 100644 --- a/tests/Client/CosmosCommandTests.cs +++ b/tests/Client/CosmosCommandTests.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Tests.Client.Helpers; using System.Text.Json; +using AzureMcp.Tests.Client.Helpers; using Xunit; namespace AzureMcp.Tests.Client; @@ -98,4 +98,4 @@ public class CosmosCommandTests(McpClientFixture mcpClient, LiveTestSettingsFixt Assert.Equal(JsonValueKind.Array, accountsArray.ValueKind); Assert.NotEmpty(accountsArray.EnumerateArray()); } -} \ No newline at end of file +} diff --git a/tests/Client/Helpers/CosmosLocalAccessFixture.cs b/tests/Client/Helpers/CosmosLocalAccessFixture.cs index eb8c448fd..33b53b8f6 100644 --- a/tests/Client/Helpers/CosmosLocalAccessFixture.cs +++ b/tests/Client/Helpers/CosmosLocalAccessFixture.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using ModelContextProtocol.Client; using System.Text.Json; +using ModelContextProtocol.Client; using Xunit; namespace AzureMcp.Tests.Client.Helpers @@ -36,4 +36,4 @@ namespace AzureMcp.Tests.Client.Helpers _isInitialized = true; } } -} \ No newline at end of file +} diff --git a/tests/Client/Helpers/CustomTestTransport.cs b/tests/Client/Helpers/CustomTestTransport.cs index 4237fcc92..ee6d62b5b 100644 --- a/tests/Client/Helpers/CustomTestTransport.cs +++ b/tests/Client/Helpers/CustomTestTransport.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Threading.Channels; using ModelContextProtocol.Protocol.Messages; using ModelContextProtocol.Protocol.Transport; -using System.Threading.Channels; namespace AzureMcp.Tests.Client.Helpers; @@ -63,4 +63,4 @@ public sealed class CustomTestTransport : ITransport { await _messageChannel.Writer.WriteAsync(message, cancellationToken); } -} \ No newline at end of file +} diff --git a/tests/Client/Helpers/LiveTestSettings.cs b/tests/Client/Helpers/LiveTestSettings.cs index 7cd39b0c5..c3e420dcb 100644 --- a/tests/Client/Helpers/LiveTestSettings.cs +++ b/tests/Client/Helpers/LiveTestSettings.cs @@ -16,4 +16,4 @@ public class LiveTestSettings public string? CosmosContainerName { get; set; } public string? StorageAccountName { get; set; } public string? StorageContainerName { get; set; } -} \ No newline at end of file +} diff --git a/tests/Client/Helpers/LiveTestSettingsFixture.cs b/tests/Client/Helpers/LiveTestSettingsFixture.cs index 0168a1183..32c4daf39 100644 --- a/tests/Client/Helpers/LiveTestSettingsFixture.cs +++ b/tests/Client/Helpers/LiveTestSettingsFixture.cs @@ -34,4 +34,4 @@ public class LiveTestSettingsFixture : IAsyncLifetime } public ValueTask DisposeAsync() => ValueTask.CompletedTask; -} \ No newline at end of file +} diff --git a/tests/Client/Helpers/McpClientFixture.cs b/tests/Client/Helpers/McpClientFixture.cs index f36529287..698e2eb14 100644 --- a/tests/Client/Helpers/McpClientFixture.cs +++ b/tests/Client/Helpers/McpClientFixture.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Reflection; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol.Transport; -using System.Reflection; using Xunit; namespace AzureMcp.Tests.Client.Helpers; @@ -35,4 +35,4 @@ public class McpClientFixture : IAsyncLifetime if (Client is IAsyncDisposable disposable) await disposable.DisposeAsync(); } -} \ No newline at end of file +} diff --git a/tests/Client/MockClientTests.cs b/tests/Client/MockClientTests.cs index 59395b6eb..72612252b 100644 --- a/tests/Client/MockClientTests.cs +++ b/tests/Client/MockClientTests.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Text.Json; +using System.Text.Json.Nodes; using AzureMcp.Tests.Client.Helpers; using ModelContextProtocol.Protocol.Messages; using ModelContextProtocol.Protocol.Types; using ModelContextProtocol.Server; -using System.Text.Json; -using System.Text.Json.Nodes; using Xunit; namespace AzureMcp.Tests.Client; @@ -230,4 +230,4 @@ public class MockClientTests await transport.DisposeAsync(); await runTask; } -} \ No newline at end of file +} diff --git a/tests/Client/MonitorCommandTests.cs b/tests/Client/MonitorCommandTests.cs index 1798f863f..b01afa864 100644 --- a/tests/Client/MonitorCommandTests.cs +++ b/tests/Client/MonitorCommandTests.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Tests.Client.Helpers; using System.Text.Json; +using AzureMcp.Tests.Client.Helpers; using Xunit; namespace AzureMcp.Tests.Client; @@ -62,4 +62,4 @@ public class MonitorCommandTests(McpClientFixture mcpClient, LiveTestSettingsFix Assert.Equal(JsonValueKind.Array, result.ValueKind); } -} \ No newline at end of file +} diff --git a/tests/Client/StorageCommandTests.cs b/tests/Client/StorageCommandTests.cs index 1be4026f6..26ab876e6 100644 --- a/tests/Client/StorageCommandTests.cs +++ b/tests/Client/StorageCommandTests.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using AzureMcp.Tests.Client.Helpers; using System.Text.Json; +using AzureMcp.Tests.Client.Helpers; using Xunit; namespace AzureMcp.Tests.Client @@ -186,4 +186,4 @@ namespace AzureMcp.Tests.Client Assert.Equal(JsonValueKind.Object, actual.ValueKind); } } -} \ No newline at end of file +} diff --git a/tests/Commands/Cosmos/AccountListCommandTests.cs b/tests/Commands/Cosmos/AccountListCommandTests.cs index abaa9a810..dc29e6af4 100644 --- a/tests/Commands/Cosmos/AccountListCommandTests.cs +++ b/tests/Commands/Cosmos/AccountListCommandTests.cs @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Text.Json; +using System.Text.Json.Serialization; using AzureMcp.Arguments; using AzureMcp.Commands.Cosmos; using AzureMcp.Models.Argument; @@ -10,10 +14,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NSubstitute; using NSubstitute.ExceptionExtensions; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Text.Json; -using System.Text.Json.Serialization; using Xunit; namespace AzureMcp.Tests.Commands.Cosmos; @@ -116,4 +116,4 @@ public class AccountListCommandTests [JsonPropertyName("accounts")] public List Accounts { get; set; } = []; } -} \ No newline at end of file +} diff --git a/tests/Commands/Search/Index/IndexDescribeCommandTests.cs b/tests/Commands/Search/Index/IndexDescribeCommandTests.cs index 94d707646..9e7bd492a 100644 --- a/tests/Commands/Search/Index/IndexDescribeCommandTests.cs +++ b/tests/Commands/Search/Index/IndexDescribeCommandTests.cs @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Text.Json; +using System.Text.Json.Serialization; using AzureMcp.Arguments; using AzureMcp.Commands.Search.Index; using AzureMcp.Models.Command; @@ -9,10 +13,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NSubstitute; using NSubstitute.ExceptionExtensions; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Text.Json; -using System.Text.Json.Serialization; using Xunit; namespace AzureMcp.Tests.Commands.Search; @@ -210,4 +210,4 @@ public class IndexDescribeCommandTests [JsonPropertyName("filterable")] public bool Filterable { get; set; } } -} \ No newline at end of file +} diff --git a/tests/Commands/Search/Index/IndexListCommandTests.cs b/tests/Commands/Search/Index/IndexListCommandTests.cs index bdc254ad6..dc2223fd0 100644 --- a/tests/Commands/Search/Index/IndexListCommandTests.cs +++ b/tests/Commands/Search/Index/IndexListCommandTests.cs @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Text.Json; +using System.Text.Json.Serialization; using AzureMcp.Arguments; using AzureMcp.Commands.Search.Index; using AzureMcp.Models.Command; @@ -9,10 +13,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NSubstitute; using NSubstitute.ExceptionExtensions; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Text.Json; -using System.Text.Json.Serialization; using Xunit; namespace AzureMcp.Tests.Commands.Search; @@ -110,4 +110,4 @@ public class IndexListCommandTests [JsonPropertyName("indexes")] public List Indexes { get; set; } = []; } -} \ No newline at end of file +} diff --git a/tests/Commands/Search/Index/IndexQueryCommandTests.cs b/tests/Commands/Search/Index/IndexQueryCommandTests.cs index 111546a31..94994920d 100644 --- a/tests/Commands/Search/Index/IndexQueryCommandTests.cs +++ b/tests/Commands/Search/Index/IndexQueryCommandTests.cs @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Text.Json; using AzureMcp.Arguments; using AzureMcp.Commands.Search.Index; using AzureMcp.Models.Command; @@ -9,9 +12,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NSubstitute; using NSubstitute.ExceptionExtensions; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Text.Json; using Xunit; namespace AzureMcp.Tests.Commands.Search; @@ -138,4 +138,4 @@ public class IndexQueryCommandTests Assert.Equal("query", cmd.Name); Assert.NotEmpty(cmd.Description ?? string.Empty); } -} \ No newline at end of file +} diff --git a/tests/Commands/Search/Service/ServiceListCommandTests.cs b/tests/Commands/Search/Service/ServiceListCommandTests.cs index d74ca9bf6..22f089139 100644 --- a/tests/Commands/Search/Service/ServiceListCommandTests.cs +++ b/tests/Commands/Search/Service/ServiceListCommandTests.cs @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Text.Json; +using System.Text.Json.Serialization; using AzureMcp.Arguments; using AzureMcp.Commands.Search.Service; using AzureMcp.Models.Command; @@ -9,10 +13,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NSubstitute; using NSubstitute.ExceptionExtensions; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Text.Json; -using System.Text.Json.Serialization; using Xunit; namespace AzureMcp.Tests.Commands.Search; @@ -110,4 +110,4 @@ public class ServiceListCommandTests [JsonPropertyName("services")] public List Services { get; set; } = []; } -} \ No newline at end of file +} diff --git a/tests/Commands/Server/ServiceStartCommandTests.cs b/tests/Commands/Server/ServiceStartCommandTests.cs index 9bb02e4a9..dae589a04 100644 --- a/tests/Commands/Server/ServiceStartCommandTests.cs +++ b/tests/Commands/Server/ServiceStartCommandTests.cs @@ -91,4 +91,4 @@ public class ServiceStartCommandTests Assert.Equal(initialCount + 1, arguments.Count()); Assert.Contains(arguments, a => a.Name == "test"); } -} \ No newline at end of file +} diff --git a/tests/Commands/Server/ToolOperationsTest.cs b/tests/Commands/Server/ToolOperationsTest.cs index f468a6b52..a0f996580 100644 --- a/tests/Commands/Server/ToolOperationsTest.cs +++ b/tests/Commands/Server/ToolOperationsTest.cs @@ -50,4 +50,4 @@ public class ToolOperationsTest Assert.NotNull(tool.Description); } } -} \ No newline at end of file +} diff --git a/tests/Commands/Subscription/SubscriptionListCommandTests.cs b/tests/Commands/Subscription/SubscriptionListCommandTests.cs index 758667832..a35f1a168 100644 --- a/tests/Commands/Subscription/SubscriptionListCommandTests.cs +++ b/tests/Commands/Subscription/SubscriptionListCommandTests.cs @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Parsing; +using System.Text.Json; using AzureMcp.Arguments; using AzureMcp.Commands.Subscription; using AzureMcp.Models; @@ -11,9 +14,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; using NSubstitute; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.Text.Json; using Xunit; namespace AzureMcp.Tests.Commands.Subscription; @@ -221,4 +221,4 @@ public class SubscriptionListCommandTests Assert.Single(subscriptions); Assert.Equal(expectedSubscriptionName, subscriptions[0].Name); } -} \ No newline at end of file +} diff --git a/tests/Services/Azure/Authentication/AuthenticationIntegrationTests.cs b/tests/Services/Azure/Authentication/AuthenticationIntegrationTests.cs index 26b5a8dc9..4d155ed74 100644 --- a/tests/Services/Azure/Authentication/AuthenticationIntegrationTests.cs +++ b/tests/Services/Azure/Authentication/AuthenticationIntegrationTests.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Runtime.InteropServices; +using System.Text.Json; using Azure.Core; using Azure.Identity; using Azure.Identity.Broker; @@ -10,8 +12,6 @@ using AzureMcp.Services.Azure.Subscription; using AzureMcp.Services.Interfaces; using Microsoft.Extensions.DependencyInjection; using NSubstitute; -using System.Runtime.InteropServices; -using System.Text.Json; using Xunit; namespace AzureMcp.Tests.Services.Azure.Authentication; @@ -101,4 +101,4 @@ public class AuthenticationIntegrationTests : IAsyncLifetime } private static readonly JsonSerializerOptions _writeIndentedOptions = new() { WriteIndented = true }; -} \ No newline at end of file +} diff --git a/tests/Services/Azure/BaseAzureServiceTests.cs b/tests/Services/Azure/BaseAzureServiceTests.cs index 378499f86..e94a958a4 100644 --- a/tests/Services/Azure/BaseAzureServiceTests.cs +++ b/tests/Services/Azure/BaseAzureServiceTests.cs @@ -69,4 +69,4 @@ public class BaseAzureServiceTests public Task ResolveTenantId(string? tenant) => ResolveTenantIdAsync(tenant); } -} \ No newline at end of file +} diff --git a/tests/Services/Azure/UserAgentPolicyTests.cs b/tests/Services/Azure/UserAgentPolicyTests.cs index 7e37aaf3b..55f90b762 100644 --- a/tests/Services/Azure/UserAgentPolicyTests.cs +++ b/tests/Services/Azure/UserAgentPolicyTests.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Diagnostics.CodeAnalysis; using Azure.Core; using AzureMcp.Services.Azure; -using System.Diagnostics.CodeAnalysis; using Xunit; namespace AzureMcp.Tests.Services.Azure; @@ -126,4 +126,4 @@ public class UserAgentPolicyTests return false; } } -} \ No newline at end of file +} diff --git a/tests/SkipExtensions.cs b/tests/SkipExtensions.cs index 97d1df636..5075f3e35 100644 --- a/tests/SkipExtensions.cs +++ b/tests/SkipExtensions.cs @@ -23,4 +23,4 @@ public static class SkipExtensions return !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSTEST_HOST_DEBUG")) || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_HOST_PATH")); } -} \ No newline at end of file +}