From cef2769615ca060050174118b8cf20c06aee82b7 Mon Sep 17 00:00:00 2001 From: StevenTCramer <357219+StevenTCramer@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:30:53 +0000 Subject: [PATCH] Sync configurable files from parent repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated files: Source: TimeWarpEngineering/timewarp-architecture@master πŸ€– Generated with GitHub Actions --- .editorconfig | 298 ++++++ .gitattributes | 52 + .../timewarp-architecture-documentation.yml | 160 ++-- .github/workflows/timewarp-architecture.yml | 84 +- .gitignore | 906 +++++++++--------- .../.idea/.gitignore | 32 +- .../.idea/vcs.xml | 10 +- .idea/vcs.xml | 10 +- README.md | 70 +- TimeWarp.Console/.idea/.gitignore | 26 +- TimeWarp.Console/.idea/indexLayout.xml | 14 +- TimeWarp.Console/.idea/misc.xml | 10 +- TimeWarp.Console/.idea/vcs.xml | 10 +- .../B001_Create-Strongly-Typed-Id-Mixin.md | 86 +- .../Kanban/Backlog/Scratch/Scratch.md | 2 +- .../Backlog/TimeWarp.Console/ChatGPT.md | 168 ++-- .../Kanban/Backlog/TimeWarp.Console/Claude.md | 70 +- .../Done/001_Set-Up-Project-Structure.md | 124 +-- .../001_Set-Up-Project-Structure_Story.md | 140 +-- TimeWarp.Console/Kanban/Done/Overview.md | 898 ++++++++--------- .../InProgress/002_Implement-Generic-Host.md | 356 +++---- TimeWarp.Console/Kanban/ReadMe.md | 52 +- TimeWarp.Console/Kanban/Task-Template.md | 74 +- .../Source/ConsoleApp/ConsoleApp.csproj | 20 +- TimeWarp.Console/Source/ConsoleApp/Program.cs | 18 +- TimeWarp.Templates/.editorconfig | 476 ++++----- TimeWarp.Templates/.gitignore | 682 ++++++------- TimeWarp.Templates/.markdownlint.json | 14 +- TimeWarp.Templates/Build/Documentation.yml | 82 +- .../Build/PublishToGitHubPages.ps1 | 114 +-- .../Build/TimeWarp.Console.Template.yml | 110 +-- TimeWarp.Templates/Directory.Build.props | 12 +- TimeWarp.Templates/Documentation/.gitignore | 18 +- .../Documentation/Backlog/Todo.md | 6 +- .../Documentation/HowToRunDocfx.md | 12 +- .../Architecture.md | 136 +-- .../Documentation.md | 34 +- .../TimeWarpArchitectureTemplate/Features.md | 36 +- .../TimeWarpArchitectureTemplate/Overview.md | 232 ++--- .../TimeWarpConsoleTemplate/Overview.md | 52 +- TimeWarp.Templates/Documentation/docfx.json | 158 +-- TimeWarp.Templates/Documentation/index.md | 2 +- TimeWarp.Templates/Documentation/toc.yml | 10 +- TimeWarp.Templates/NuGet.config | 18 +- TimeWarp.Templates/RunDocServer.ps1 | 2 +- .../BuildAndInstallTemplate.ps1 | 24 +- .../Directory.Build.props | 36 +- .../Directory.Build.targets | 12 +- .../TimeWarp.Architecture.csproj | 98 +- .../global.json | 10 +- .../templates/Directory.Build.props | 4 +- .../templates/Directory.Build.targets | 4 +- .../.template.config/template.json | 92 +- ...Name___State___ActionName___Clone_Tests.cs | 54 +- ...eatureName___State___ActionName___Tests.cs | 98 +- .../__ActionName__/__ActionName__Action.cs | 24 +- .../__ActionName__/__ActionName__Handler.cs | 56 +- .../GeneratedCode/MoveIntoProjects.ps1 | 20 +- .../.template.config/template.json | 78 +- .../GeneratedCode/MoveIntoProjects.ps1 | 44 +- .../Delete__FeatureName__Request.cs | 34 +- .../Delete__FeatureName__RequestValidator.cs | 76 +- .../Delete__FeatureName__Response.cs | 26 +- .../Source/Api/Features/FeatureAnnotations.cs | 14 +- .../GetAll__FeatureName__Request.cs | 46 +- .../GetAll__FeatureName__RequestValidator.cs | 76 +- .../GetAll__FeatureName__Response.cs | 28 +- .../GetById__FeatureName__Request.cs | 36 +- .../GetById__FeatureName__RequestValidator.cs | 74 +- .../GetById__FeatureName__Response.cs | 28 +- .../Upsert__FeatureName__Request.cs | 58 +- .../Upsert__FeatureName__RequestValidator.cs | 80 +- .../Upsert__FeatureName__Response.cs | 26 +- .../Source/Api/Features/__FeatureName__Dto.cs | 46 +- .../Create/Create__FeatureName__Action.cs | 22 +- .../Create/Create__FeatureName__Handler.cs | 110 +-- .../Delete/Delete__FeatureName__Action.cs | 22 +- .../Delete/Delete__FeatureName__Handler.cs | 96 +- .../Fetch/Fetch__FeatureName__Action.cs | 18 +- .../Fetch/Fetch__FeatureName__Handler.cs | 86 +- .../Update/Update__FeatureName__Action.cs | 20 +- .../Update/Update__FeatureName__Handler.cs | 96 +- .../Client/__FeatureName__State.Debug.cs | 64 +- .../Source/Client/__FeatureName__State.cs | 66 +- .../Server/Data/ApplicationDbContext.cs | 22 +- .../Delete__FeatureName__Endpoint.cs | 46 +- .../Delete__FeatureName__Handler.cs | 66 +- .../GetAll__FeatureName__Endpoint.cs | 46 +- .../GetAll__FeatureName__Handler.cs | 104 +- .../GetById__FeatureName__Endpoint.cs | 46 +- .../GetById__FeatureName__Handler.cs | 80 +- .../Upsert__FeatureName__Endpoint.cs | 46 +- .../Upsert__FeatureName__Handler.cs | 104 +- .../Source/Server/Mappers/MappingProfiles.cs | 30 +- .../Server/Models/__FeatureName__Entity.cs | 22 +- .../__FeatureName__DeleteEndpoint_Tests.cs | 104 +- .../__FeatureName__DeleteHandler_Tests.cs | 72 +- ...atureName__DeleteRequestValidator_Tests.cs | 72 +- .../__FeatureName__GetEndpoint_Tests.cs | 104 +- .../__FeatureName__GetHandler_Tests.cs | 72 +- ..._FeatureName__GetRequestValidator_Tests.cs | 72 +- .../__FeatureName__UpsertEndpoint_Tests.cs | 104 +- .../__FeatureName__UpsertHandler_Tests.cs | 72 +- ...atureName__UpsertRequestValidator_Tests.cs | 72 +- .../Feature.CrudComponents/Create.razor.cs | 68 +- .../Feature.CrudComponents/Delete.razor.cs | 26 +- .../Feature.CrudComponents/Details.razor.cs | 30 +- .../Feature.CrudComponents/Edit.razor.cs | 76 +- .../Feature.CrudComponents/List.razor.cs | 24 +- .../Feature.CrudPages/Catalog/Create.razor.cs | 28 +- .../Feature.CrudPages/Catalog/Delete.razor.cs | 40 +- .../Catalog/Details.razor.cs | 40 +- .../Feature.CrudPages/Catalog/Edit.razor.cs | 40 +- .../Feature.CrudPages/Catalog/Index.razor.cs | 40 +- .../.template.config/template.json | 232 ++--- .../Api/__RequestName__Request.cs | 34 +- .../Api/__RequestName__RequestValidator.cs | 76 +- .../Api/__RequestName__Response.cs | 26 +- .../Feature.Endpoint/FeatureAnnotations.cs | 14 +- .../Feature.Endpoint/MoveIntoProjects.ps1 | 32 +- .../__RequestName__Endpoint_Tests.cs | 104 +- .../__RequestName__Handler_Tests.cs | 72 +- .../__RequestName__RequestValidator_Tests.cs | 72 +- .../Server/__RequestName__Endpoint.cs | 46 +- .../Server/__RequestName__Handler.cs | 48 +- .../.template.config/template.json | 78 +- .../__FeatureName__State_Clone_Tests.cs | 62 +- .../Client/__FeatureName__State.Debug.cs | 62 +- .../Client/__FeatureName__State.cs | 58 +- .../GeneratedCode/MoveIntoProjects.ps1 | 20 +- .../TimeWarp.Console-CSharp/.editorconfig | 546 +++++------ .../TimeWarp.Console-CSharp/.gitignore | 586 +++++------ .../.template.config/template.json | 42 +- .../.template.config/vs-2017.3.host.json | 42 +- .../Documentation/TemplateOverview.md | 342 +++---- .../TimeWarp.Console-CSharp/LICENSE.md | 48 +- .../TimeWarp.Console-CSharp/NuGet.config | 20 +- .../TimeWarp.Console-CSharp/Publish.ps1 | 16 +- .../content/TimeWarp.Console-CSharp/README.md | 190 ++-- .../Source/Behaviors/ValidationBehavior.cs | 78 +- .../Source/CommandHandler.cs | 110 +-- .../SampleCommand/SampleCommandHandler.cs | 34 +- .../SampleCommand/SampleCommandRequest.cs | 50 +- .../SampleCommand/SampleCommandValidator.cs | 36 +- .../Source/Console-CSharp.csproj | 38 +- .../Source/Constants.cs | 16 +- .../Source/GlobalSuppressions.cs | 16 +- .../Source/InternalsVisibleToTest.cs | 4 +- .../TimeWarp.Console-CSharp/Source/Program.cs | 30 +- .../Source/Services/GitService.cs | 76 +- .../TimeWarp.Console-CSharp/Source/Startup.cs | 68 +- .../Source/TimeWarpCommandLineBuilder.cs | 174 ++-- .../Source/XmlDocReader.cs | 70 +- .../Commands/SampleCommandTests.cs | 218 ++--- .../Console-CSharp.Tests.csproj | 36 +- .../TimeWarp.Console-CSharp.sln | 124 +-- .../TimeWarp.Console-CSharp/global.json | 14 +- .../.config/dotnet-tools.json | 22 +- .../EnumerableExtensions.cs | 44 +- .../ProjectExtensions.cs | 68 +- .../TemplateTest.cs | 658 ++++++------- .../Tools/BuildAndInstallTemplate.ps1 | 16 +- TimeWarp.Templates/global.json | 12 +- TimeWarp.Templates/testEnvironments.json | 32 +- TimeWarp.Templates/version.json | 24 +- 165 files changed, 7426 insertions(+), 7076 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..6b0fa597b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,298 @@ +# EditorConfig is awesome:http://EditorConfig.org +# For dotnet and Csharp specific see below +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference + +# top-most EditorConfig file +root = true + +#### Core EditorConfig Options #### + +# So code cleanup will not run on save. +[_Imports.cs] +generated_code = true + +[*.csproj] +generated_code = true + +[*] +# Indentation and spacing +indent_size = 2 +indent_style = space +tab_width = 2 + +# New line preferences +end_of_line = lf +insert_final_newline = true + +# ReSharper properties +resharper_html_attribute_indent = single_indent +resharper_convert_to_primary_constructor_highlighting = false + +# Development files +[*.{cs,csx,cshtml,csproj,razor,sln,props,targets,json,yml,gitignore,}] +charset = "utf-8" +trim_trailing_whitespace = true + +#### .NET Coding Conventions #### +[*.cs] + +# 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:silent +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_property = false:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent + +# Expression-level preferences +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_namespace_match_folder = false +dotnet_style_null_propagation = true:suggestion +dotnet_style_object_initializer = true:suggestion +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_collection_expression = true:suggestion +# dotnet_style_prefer_collection_expression = when_types_loosely_match # dotnet 9 +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion + +# Field preferences +dotnet_style_readonly_field = true:suggestion + +# Parameter preferences +dotnet_code_quality_unused_parameters = all:suggestion + +# Suppression preferences +dotnet_remove_unnecessary_suppression_exclusions = none + +# New line preferences +dotnet_style_allow_multiple_blank_lines_experimental = false:warning +dotnet_style_allow_statement_immediately_after_block_experimental = false:warning + +#### C# Coding Conventions #### + +# var preferences +csharp_style_var_elsewhere = false:warning +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:warning + +# Expression-bodied members +csharp_style_expression_bodied_accessors = when_on_single_line:warning +csharp_style_expression_bodied_constructors = false:warning +csharp_style_expression_bodied_indexers = when_on_single_line:warning +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = false:suggestion +csharp_style_expression_bodied_methods = false:none +csharp_style_expression_bodied_operators = when_on_single_line:warning +csharp_style_expression_bodied_properties = when_on_single_line:warning + +# Pattern Matching +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_prefer_extended_property_pattern = true +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:suggestion + +# Modifier preferences +csharp_prefer_static_local_function = true:suggestion +csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion +csharp_style_prefer_readonly_struct = true +csharp_style_prefer_readonly_struct_member = true + +# Code-block preferences +csharp_prefer_braces = when-multiline:suggestion +csharp_prefer_simple_using_statement = true:suggestion +csharp_style_namespace_declarations = file_scoped:error +csharp_style_prefer_method_group_conversion = true +csharp_style_prefer_primary_constructors = false +csharp_style_prefer_top_level_statements = false + +# Expression-level preferences +csharp_prefer_simple_default_expression = true +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_deconstructed_variable_declaration = true +csharp_style_implicit_object_creation_when_type_is_apparent = true +csharp_style_inlined_variable_declaration = true +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true +csharp_style_prefer_null_check_over_type_check = true +csharp_style_prefer_range_operator = true:suggestion +csharp_style_prefer_tuple_swap = true +csharp_style_prefer_utf8_string_literals = true +csharp_style_throw_expression = true +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +# 'using' directive preferences +csharp_using_directive_placement = inside_namespace:warning + +#### C# Formatting Rules #### + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +#### Naming styles #### + +# Naming rules + +# Interfaces should begin with an I and be PascalCase +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 = interface_style + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_style.interface_style.required_prefix = I +dotnet_naming_style.interface_style.required_suffix = +dotnet_naming_style.interface_style.word_separator = +dotnet_naming_style.interface_style.capitalization = pascal_case + +# Types should be PascalCase +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 = types_style + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_style.types_style.capitalization = pascal_case + +# Non-private static fields are PascalCase +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style + +dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected +dotnet_naming_symbols.non_private_static_fields.required_modifiers = static + +dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case + +# Constants are PascalCase +dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants +dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style + +dotnet_naming_symbols.constants.applicable_kinds = field, local +dotnet_naming_symbols.constants.required_modifiers = const + +dotnet_naming_style.constant_style.capitalization = pascal_case + +# Static fields are PascalCase +dotnet_naming_rule.static_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.static_fields_should_be_pascal_case.symbols = static_fields +dotnet_naming_rule.static_fields_should_be_pascal_case.style = static_field_style + +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static + +dotnet_naming_style.static_field_style.capitalization = pascal_case + +# local variables should be camelCase +dotnet_naming_rule.camel_case_for_local_variables.severity = suggestion +dotnet_naming_rule.camel_case_for_local_variables.symbols = local_variables +dotnet_naming_rule.camel_case_for_local_variables.style = local_variables_style + +dotnet_naming_symbols.local_variables.applicable_kinds = local + +dotnet_naming_style.local_variables_style.capitalization = camel_case + +# Local functions are PascalCase +dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function + +dotnet_naming_style.local_function_style.capitalization = pascal_case + + +#### Analyizer settings #### +dotnet_code_quality.null_check_validation_methods = NotNull + +# CA1308: Normalize strings to uppercase +dotnet_diagnostic.ca1308.severity = none + +# Global Usings Analyzer + +dotnet_diagnostic.globalusingsanalyzer0001.filename = GlobalUsings.cs +dotnet_diagnostic.globalusingsanalyzer0002.enabled = true +dotnet_diagnostic.globalusingsanalyzer0003.severity = warning diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..1400c7e2a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,52 @@ +# Enforce LF line endings for all files across all platforms +# Modern Windows tools support LF, so there's no need for CRLF conversion + +# Default behavior: LF line endings for all text files +* text=auto eol=lf + +# Specific file types - ensure LF line endings +*.cs text eol=lf +*.csproj text eol=lf +*.sln text eol=lf +*.json text eol=lf +*.js text eol=lf +*.ts text eol=lf +*.tsx text eol=lf +*.jsx text eol=lf +*.html text eol=lf +*.css text eol=lf +*.scss text eol=lf +*.sass text eol=lf +*.xml text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.md text eol=lf +*.txt text eol=lf +*.ps1 text eol=lf +*.sh text eol=lf +*.dockerfile text eol=lf +*.gitignore text eol=lf +*.gitattributes text eol=lf + +# Configuration files +*.config text eol=lf +*.props text eol=lf +*.targets text eol=lf +*.editorconfig text eol=lf + +# Source control files +.gitignore text eol=lf +.gitattributes text eol=lf + +# Binary files - don't convert line endings +*.dll binary +*.exe binary +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.pdf binary +*.zip binary +*.nupkg binary +*.snupkg binary \ No newline at end of file diff --git a/.github/workflows/timewarp-architecture-documentation.yml b/.github/workflows/timewarp-architecture-documentation.yml index 2e205c2be..266cc5609 100644 --- a/.github/workflows/timewarp-architecture-documentation.yml +++ b/.github/workflows/timewarp-architecture-documentation.yml @@ -1,81 +1,81 @@ -name: timewarp-architecture-documentation.yml - -on: - # Runs on pushes targeting the default branch - push: - branches: - - master - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -env: - DOTNET_NOLOGO: true # Disable the .NET logo in the console output - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience to skip caching NuGet packages and speed up the build - DOTNET_CLI_TELEMETRY_OPTOUT: true - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: windows-latest - defaults: - run: - shell: pwsh - steps: - - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner." - - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - name: Setup DocFX - uses: crazy-max/ghaction-chocolatey@v3 - with: - args: install docfx - - - name: Build TimeWarp.Templates solution - working-directory: TimeWarp.Templates - run: | - dotnet build --configuration Release - - - name: DocFX Build - working-directory: TimeWarp.Templates/Documentation - run: docfx docfx.json - continue-on-error: false - - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload documentation site - path: './TimeWarp.Templates/Documentation/_site' - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 - +name: timewarp-architecture-documentation.yml + +on: + # Runs on pushes targeting the default branch + push: + branches: + - master + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + DOTNET_NOLOGO: true # Disable the .NET logo in the console output + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience to skip caching NuGet packages and speed up the build + DOTNET_CLI_TELEMETRY_OPTOUT: true + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: windows-latest + defaults: + run: + shell: pwsh + steps: + - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner." + + - name: List files in the repository + run: | + ls ${{ github.workspace }} + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Setup DocFX + uses: crazy-max/ghaction-chocolatey@v3 + with: + args: install docfx + + - name: Build TimeWarp.Templates solution + working-directory: TimeWarp.Templates + run: | + dotnet build --configuration Release + + - name: DocFX Build + working-directory: TimeWarp.Templates/Documentation + run: docfx docfx.json + continue-on-error: false + + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload documentation site + path: './TimeWarp.Templates/Documentation/_site' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.github/workflows/timewarp-architecture.yml b/.github/workflows/timewarp-architecture.yml index 132aaad5b..0722e6c60 100644 --- a/.github/workflows/timewarp-architecture.yml +++ b/.github/workflows/timewarp-architecture.yml @@ -1,43 +1,43 @@ -name: timewarp-architecture.yml - -on: - push: - branches: - - master - -jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - defaults: - run: - shell: pwsh - steps: - - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner." - - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." - - - - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '9.0.x' - - - name: Pack - run: | - cd TimeWarp.Templates/Source/TimeWarp.Architecture.Template/ - dotnet build -c Release - - - name: Publish - run: dotnet nuget push TimeWarp.Templates/Source/TimeWarp.Architecture.Template/bin/Release/TimeWarp.Architecture.*.nupkg --skip-duplicate --no-symbols --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}} - env: +name: timewarp-architecture.yml + +on: + push: + branches: + - master + +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + defaults: + run: + shell: pwsh + steps: + - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner." + + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." + + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Pack + run: | + cd TimeWarp.Templates/Source/TimeWarp.Architecture.Template/ + dotnet build -c Release + + - name: Publish + run: dotnet nuget push TimeWarp.Templates/Source/TimeWarp.Architecture.Template/bin/Release/TimeWarp.Architecture.*.nupkg --skip-duplicate --no-symbols --source https://api.nuget.org/v3/index.json --api-key ${{secrets.PUBLISH_TO_NUGET_ORG}} + env: NUGET_AUTH_TOKEN: ${{secrets.PUBLISH_TO_NUGET_ORG}} \ No newline at end of file diff --git a/.gitignore b/.gitignore index fc03a1b26..52c22e593 100644 --- a/.gitignore +++ b/.gitignore @@ -1,453 +1,453 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml - -# ----- Custom .gitignore below ----- - -# Ignore all .idea files except these specific files and directories -.idea/* -!.idea/runConfigurations/ -!.idea/modules.xml -!.idea/vcs.xml -!.idea/encodings.xml -!.idea/misc.xml - -# aider chat AI files -/.aider.tags.cache* -/.aider.chat.history.md -/.aider.input.history - -# TimeWarp Architecture -/BlazorDefault2018-05-02.Client/ -/BlazorDefault2018-05-02.Server/ -/BlazorDefault2018-05-02.Shared/ - -# TimeWarp architecture templates Generated Code -GeneratedCode/ - -# Web.Spa generated code -/Source/ContainerApps/Web/Web.Spa/wwwroot/js/ - -# TimeWarp architecture templates Generated Code -/Source/ContainerApps/Web/Web.Contracts/Generated/** -/Source/ContainerApps/Web/Web.Spa/Generated/** -/Source/ContainerApps/Web/Web.Server/Generated/** -/Source/ContainerApps/Api/Api.Contracts/Generated/** -/Tests/TimeWarp.Testing/Generated/** - -# TimeWarp architecture Log files -/Source/ContainerApps/Web/Web.Server/Logs/log.txt - -# TimeWarp architecture templates Generated Documentation -/Documentation/Developer/Conceptual/ComponentNamingAndOrganization.pdf -/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Mutability_in_API_Contracts.pdf -/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Nullability_in_API_Contracts.pdf -/Documentation/Developer/HowToGuides/Api_Contracts/HowToWrite_BFF_API_Contracts.pdf - -# TimeWarp architecture templates Generated css -/Source/ContainerApps/Web/Web.Spa/wwwroot/css/site.css - -# Ignore launchsettings on non executable projects -/Source/ContainerApps/Web/Web.Spa/Properties/launchSettings.json - -#Claude AI files -.claude/settings.local.json - -# Misc -/output.txt -**/Generated/ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# ----- Custom .gitignore below ----- + +# Ignore all .idea files except these specific files and directories +.idea/* +!.idea/runConfigurations/ +!.idea/modules.xml +!.idea/vcs.xml +!.idea/encodings.xml +!.idea/misc.xml + +# aider chat AI files +/.aider.tags.cache* +/.aider.chat.history.md +/.aider.input.history + +# TimeWarp Architecture +/BlazorDefault2018-05-02.Client/ +/BlazorDefault2018-05-02.Server/ +/BlazorDefault2018-05-02.Shared/ + +# TimeWarp architecture templates Generated Code +GeneratedCode/ + +# Web.Spa generated code +/Source/ContainerApps/Web/Web.Spa/wwwroot/js/ + +# TimeWarp architecture templates Generated Code +/Source/ContainerApps/Web/Web.Contracts/Generated/** +/Source/ContainerApps/Web/Web.Spa/Generated/** +/Source/ContainerApps/Web/Web.Server/Generated/** +/Source/ContainerApps/Api/Api.Contracts/Generated/** +/Tests/TimeWarp.Testing/Generated/** + +# TimeWarp architecture Log files +/Source/ContainerApps/Web/Web.Server/Logs/log.txt + +# TimeWarp architecture templates Generated Documentation +/Documentation/Developer/Conceptual/ComponentNamingAndOrganization.pdf +/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Mutability_in_API_Contracts.pdf +/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Nullability_in_API_Contracts.pdf +/Documentation/Developer/HowToGuides/Api_Contracts/HowToWrite_BFF_API_Contracts.pdf + +# TimeWarp architecture templates Generated css +/Source/ContainerApps/Web/Web.Spa/wwwroot/css/site.css + +# Ignore launchsettings on non executable projects +/Source/ContainerApps/Web/Web.Spa/Properties/launchSettings.json + +#Claude AI files +.claude/settings.local.json + +# Misc +/output.txt +**/Generated/ diff --git a/.idea/.idea.timewarp-architecture.dir/.idea/.gitignore b/.idea/.idea.timewarp-architecture.dir/.idea/.gitignore index 97a9b1fc8..d4e55bf17 100644 --- a/.idea/.idea.timewarp-architecture.dir/.idea/.gitignore +++ b/.idea/.idea.timewarp-architecture.dir/.idea/.gitignore @@ -1,17 +1,17 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/.idea.timewarp-architecture.iml -/modules.xml -/contentModel.xml -/projectSettingsUpdater.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -#Cody files ignored -/cody_history.xml -# other +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/.idea.timewarp-architecture.iml +/modules.xml +/contentModel.xml +/projectSettingsUpdater.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +#Cody files ignored +/cody_history.xml +# other /indexLayout.xml \ No newline at end of file diff --git a/.idea/.idea.timewarp-architecture.dir/.idea/vcs.xml b/.idea/.idea.timewarp-architecture.dir/.idea/vcs.xml index c8397c94c..35eb1ddfb 100644 --- a/.idea/.idea.timewarp-architecture.dir/.idea/vcs.xml +++ b/.idea/.idea.timewarp-architecture.dir/.idea/vcs.xml @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index c8397c94c..35eb1ddfb 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/README.md b/README.md index e35f04d32..805b0f997 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,35 @@ -[![Dotnet](https://img.shields.io/badge/dotnet-6.0-blue)](https://dotnet.microsoft.com) -[![Stars](https://img.shields.io/github/stars/TimeWarpEngineering/blazor-state?logo=github)](https://github.com/TimeWarpEngineering/timewarp-architecture) -[![Discord](https://img.shields.io/discord/715274085940199487?logo=discord)](https://discord.gg/7F4bS2T) -[![workflow](https://github.com/TimeWarpEngineering/blazor-state/actions/workflows/release-build.yml/badge.svg)](https://github.com/TimeWarpEngineering/timewarp-architecture/actions) -[![NuGet](https://img.shields.io/nuget/v/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) -[![NuGet](https://img.shields.io/nuget/dt/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) - -[![Twitter](https://img.shields.io/twitter/follow/StevenTCramer.svg)](https://twitter.com/intent/follow?screen_name=StevenTCramer) -[![Twitter](https://img.shields.io/twitter/follow/TheFreezeTeam1.svg)](https://twitter.com/intent/follow?screen_name=TheFreezeTeam1) - -# TimeWarp Architecture - -## timewarp-architecture - - - -### Documentation - -https://timewarpengineering.github.io/timewarp-architecture/ - -### Installation - -```console -dotnet new --install TimeWarp.Architecture -``` - -### Usage - -```console -dotnet new timewarp-architecture -n MyTimeWarpApp -``` - -## Content - -The template creates the distributed app projects and their corresponding test projects. +[![Dotnet](https://img.shields.io/badge/dotnet-6.0-blue)](https://dotnet.microsoft.com) +[![Stars](https://img.shields.io/github/stars/TimeWarpEngineering/blazor-state?logo=github)](https://github.com/TimeWarpEngineering/timewarp-architecture) +[![Discord](https://img.shields.io/discord/715274085940199487?logo=discord)](https://discord.gg/7F4bS2T) +[![workflow](https://github.com/TimeWarpEngineering/blazor-state/actions/workflows/release-build.yml/badge.svg)](https://github.com/TimeWarpEngineering/timewarp-architecture/actions) +[![NuGet](https://img.shields.io/nuget/v/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) +[![NuGet](https://img.shields.io/nuget/dt/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) + +[![Twitter](https://img.shields.io/twitter/follow/StevenTCramer.svg)](https://twitter.com/intent/follow?screen_name=StevenTCramer) +[![Twitter](https://img.shields.io/twitter/follow/TheFreezeTeam1.svg)](https://twitter.com/intent/follow?screen_name=TheFreezeTeam1) + +# TimeWarp Architecture + +## timewarp-architecture + + + +### Documentation + +https://timewarpengineering.github.io/timewarp-architecture/ + +### Installation + +```console +dotnet new --install TimeWarp.Architecture +``` + +### Usage + +```console +dotnet new timewarp-architecture -n MyTimeWarpApp +``` + +## Content + +The template creates the distributed app projects and their corresponding test projects. diff --git a/TimeWarp.Console/.idea/.gitignore b/TimeWarp.Console/.idea/.gitignore index 6fc0d25f1..9bce2f5f2 100644 --- a/TimeWarp.Console/.idea/.gitignore +++ b/TimeWarp.Console/.idea/.gitignore @@ -1,13 +1,13 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/.idea.TimeWarp.Console.iml -/contentModel.xml -/projectSettingsUpdater.xml -/modules.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/.idea.TimeWarp.Console.iml +/contentModel.xml +/projectSettingsUpdater.xml +/modules.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/TimeWarp.Console/.idea/indexLayout.xml b/TimeWarp.Console/.idea/indexLayout.xml index f5a863a7c..7b08163ce 100644 --- a/TimeWarp.Console/.idea/indexLayout.xml +++ b/TimeWarp.Console/.idea/indexLayout.xml @@ -1,8 +1,8 @@ - - - - - - - + + + + + + + \ No newline at end of file diff --git a/TimeWarp.Console/.idea/misc.xml b/TimeWarp.Console/.idea/misc.xml index b9c7dc7fe..11eacdea6 100644 --- a/TimeWarp.Console/.idea/misc.xml +++ b/TimeWarp.Console/.idea/misc.xml @@ -1,6 +1,6 @@ - - - - + + + + \ No newline at end of file diff --git a/TimeWarp.Console/.idea/vcs.xml b/TimeWarp.Console/.idea/vcs.xml index 2e3f6920d..6c0b86358 100644 --- a/TimeWarp.Console/.idea/vcs.xml +++ b/TimeWarp.Console/.idea/vcs.xml @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/TimeWarp.Console/Kanban/Backlog/B001_Create-Strongly-Typed-Id-Mixin.md b/TimeWarp.Console/Kanban/Backlog/B001_Create-Strongly-Typed-Id-Mixin.md index f097e06b9..f5f68818c 100644 --- a/TimeWarp.Console/Kanban/Backlog/B001_Create-Strongly-Typed-Id-Mixin.md +++ b/TimeWarp.Console/Kanban/Backlog/B001_Create-Strongly-Typed-Id-Mixin.md @@ -1,43 +1,43 @@ -# Task Create Strongly Typed Id Mixin - -## Checklist - -### Design -- [ ] Update Model -- [ ] Add/Update Tests - -### Implementation -- [ ] Implement Strongly Typed Id Mixin -- [ ] Update Dependencies -- [ ] Update Relevant Configuration Settings -- [ ] Verify Functionality - -### Documentation -- [ ] Update Documentation -- [ ] Update ai-context.md - -### Review -- [ ] Consider Performance Implications -- [ ] Consider Security Implications -- [ ] Code Review - -## Description - -Create a strongly typed ID mixin to improve type safety and reduce the risk of using the wrong ID type when interacting with domain entities. - -## Requirements -- Use [StronglyTypedId] or [Mixin_StrongTypedId] as the attribute -- Research and review Pete and AndrewLocks' conversation on creating a strongly typed ID mixin. -- Design and implement a mixin that can be used to create strongly typed IDs for various domain entities. -- Update relevant domain entities to use the new strongly typed ID mixin. -- Ensure that the new mixin integrates seamlessly with the existing codebase. - -## Notes - -- The goal of this task is to improve type safety when working with domain entities by using a strongly typed ID mixin. -- Consider any implications on performance, security, and maintainability while implementing the mixin. - -## Implementation Notes - -- You may need to update the domain entities to use the new mixin. -- Ensure that the mixin is easy to use and understand. +# Task Create Strongly Typed Id Mixin + +## Checklist + +### Design +- [ ] Update Model +- [ ] Add/Update Tests + +### Implementation +- [ ] Implement Strongly Typed Id Mixin +- [ ] Update Dependencies +- [ ] Update Relevant Configuration Settings +- [ ] Verify Functionality + +### Documentation +- [ ] Update Documentation +- [ ] Update ai-context.md + +### Review +- [ ] Consider Performance Implications +- [ ] Consider Security Implications +- [ ] Code Review + +## Description + +Create a strongly typed ID mixin to improve type safety and reduce the risk of using the wrong ID type when interacting with domain entities. + +## Requirements +- Use [StronglyTypedId] or [Mixin_StrongTypedId] as the attribute +- Research and review Pete and AndrewLocks' conversation on creating a strongly typed ID mixin. +- Design and implement a mixin that can be used to create strongly typed IDs for various domain entities. +- Update relevant domain entities to use the new strongly typed ID mixin. +- Ensure that the new mixin integrates seamlessly with the existing codebase. + +## Notes + +- The goal of this task is to improve type safety when working with domain entities by using a strongly typed ID mixin. +- Consider any implications on performance, security, and maintainability while implementing the mixin. + +## Implementation Notes + +- You may need to update the domain entities to use the new mixin. +- Ensure that the mixin is easy to use and understand. diff --git a/TimeWarp.Console/Kanban/Backlog/Scratch/Scratch.md b/TimeWarp.Console/Kanban/Backlog/Scratch/Scratch.md index c2bde1ff3..e1f575215 100644 --- a/TimeWarp.Console/Kanban/Backlog/Scratch/Scratch.md +++ b/TimeWarp.Console/Kanban/Backlog/Scratch/Scratch.md @@ -1 +1 @@ -# Scratch pad for Kanban board stuff. +# Scratch pad for Kanban board stuff. diff --git a/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/ChatGPT.md b/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/ChatGPT.md index 8104dc61d..268c21efe 100644 --- a/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/ChatGPT.md +++ b/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/ChatGPT.md @@ -1,85 +1,85 @@ -# Goal: Create a .NET 8 Console App Template with Dependency Injection, Hosting, and System.CommandLine - -## Overview - -The aim of this project is to develop a custom .NET template for a console application that integrates the following features: - -- **Dependency Injection (DI):** Utilize the built-in DI container provided by `Microsoft.Extensions.DependencyInjection`. -- **.NET Generic Host:** Leverage the .NET hosting model to manage application lifetime, configuration, and logging. -- **System.CommandLine:** Incorporate command-line parsing capabilities to handle user inputs and commands. - -This template will support **.NET 8 or later**, ensuring compatibility with the latest features and improvements. By creating this template, developers can quickly scaffold new console applications that follow best practices and have a consistent structure. - -## Objectives - -- **Custom Template Creation:** Develop a .NET 8 template that can be installed and used via the `dotnet new` command. -- **Dependency Injection Setup:** Configure DI to manage application services and dependencies. -- **Hosting Model Integration:** Use the .NET Generic Host to control application startup, shutdown, and lifetime events. -- **Command-Line Parsing:** Implement command-line parsing using the `System.CommandLine` library to handle arguments and commands. -- **Documentation:** Provide clear instructions on how to use the template, including installation and customization. - -## Benefits - -- **Leverage Latest Features:** Utilize the new features and performance improvements available in .NET 8. -- **Consistent Structure:** Ensures new console applications have a standardized setup. -- **Productivity:** Reduces the time needed to set up boilerplate code for DI, hosting, and command-line parsing. -- **Best Practices:** Encourages the use of modern .NET practices in console applications. - -## Deliverables - -- **Template Files:** All necessary files for the .NET 8 template. -- **Installation Guide:** Steps to install the template locally or globally. -- **Usage Guide:** Instructions on how to create a new project using the template and how to extend it. -- **Sample Application:** An example console app generated from the template demonstrating the integrated features. - -## Tools and Technologies - -- **.NET SDK:** .NET 8.0 or later. -- **Microsoft.Extensions.DependencyInjection:** For setting up DI. -- **Microsoft.Extensions.Hosting:** To use the Generic Host. -- **System.CommandLine:** For command-line parsing. - -## Steps to Achieve the Goal - -1. **Set Up Project Structure:** - - Create a new console application project targeting .NET 8.0 that will serve as the template. -2. **Integrate Dependency Injection:** - - Configure services in a `ConfigureServices` method. - - Use constructor injection to inject dependencies. -3. **Implement the Generic Host:** - - Set up a `HostBuilder` in the `Program.cs` file. - - Configure logging and configuration providers if necessary. -4. **Add System.CommandLine:** - - Install the latest `System.CommandLine` NuGet package compatible with .NET 8. - - Define commands and options. - - Parse and handle command-line arguments. -5. **Leverage .NET 8 Features:** - - Utilize any new features in .NET 8 that enhance the application, such as performance improvements or new APIs. -6. **Create Template Configuration:** - - Add a `.template.config` folder with a `template.json` file. - - Define template parameters and symbols. -7. **Test the Template:** - - Install the template locally using `dotnet new --install`. - - Create a new project using the template and ensure all features work as expected. -8. **Document the Template:** - - Write clear installation and usage instructions. - - Provide examples and code snippets. - -## Timeline - -- **Week 1:** Set up the initial project targeting .NET 8 and integrate DI and hosting. -- **Week 2:** Add command-line parsing and finalize the template structure. -- **Week 3:** Test the template thoroughly on .NET 8 and make necessary adjustments. -- **Week 4:** Prepare documentation and sample applications. - -## References - -- [.NET 8 Documentation](https://learn.microsoft.com/en-us/dotnet/core/dotnet-eight) -- [.NET Generic Host Documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/generic-host) -- [Dependency Injection in .NET](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection) -- [System.CommandLine Repository](https://github.com/dotnet/command-line-api) -- [Creating Custom Templates for dotnet new](https://learn.microsoft.com/en-us/dotnet/core/tools/custom-templates) - ---- - +# Goal: Create a .NET 8 Console App Template with Dependency Injection, Hosting, and System.CommandLine + +## Overview + +The aim of this project is to develop a custom .NET template for a console application that integrates the following features: + +- **Dependency Injection (DI):** Utilize the built-in DI container provided by `Microsoft.Extensions.DependencyInjection`. +- **.NET Generic Host:** Leverage the .NET hosting model to manage application lifetime, configuration, and logging. +- **System.CommandLine:** Incorporate command-line parsing capabilities to handle user inputs and commands. + +This template will support **.NET 8 or later**, ensuring compatibility with the latest features and improvements. By creating this template, developers can quickly scaffold new console applications that follow best practices and have a consistent structure. + +## Objectives + +- **Custom Template Creation:** Develop a .NET 8 template that can be installed and used via the `dotnet new` command. +- **Dependency Injection Setup:** Configure DI to manage application services and dependencies. +- **Hosting Model Integration:** Use the .NET Generic Host to control application startup, shutdown, and lifetime events. +- **Command-Line Parsing:** Implement command-line parsing using the `System.CommandLine` library to handle arguments and commands. +- **Documentation:** Provide clear instructions on how to use the template, including installation and customization. + +## Benefits + +- **Leverage Latest Features:** Utilize the new features and performance improvements available in .NET 8. +- **Consistent Structure:** Ensures new console applications have a standardized setup. +- **Productivity:** Reduces the time needed to set up boilerplate code for DI, hosting, and command-line parsing. +- **Best Practices:** Encourages the use of modern .NET practices in console applications. + +## Deliverables + +- **Template Files:** All necessary files for the .NET 8 template. +- **Installation Guide:** Steps to install the template locally or globally. +- **Usage Guide:** Instructions on how to create a new project using the template and how to extend it. +- **Sample Application:** An example console app generated from the template demonstrating the integrated features. + +## Tools and Technologies + +- **.NET SDK:** .NET 8.0 or later. +- **Microsoft.Extensions.DependencyInjection:** For setting up DI. +- **Microsoft.Extensions.Hosting:** To use the Generic Host. +- **System.CommandLine:** For command-line parsing. + +## Steps to Achieve the Goal + +1. **Set Up Project Structure:** + - Create a new console application project targeting .NET 8.0 that will serve as the template. +2. **Integrate Dependency Injection:** + - Configure services in a `ConfigureServices` method. + - Use constructor injection to inject dependencies. +3. **Implement the Generic Host:** + - Set up a `HostBuilder` in the `Program.cs` file. + - Configure logging and configuration providers if necessary. +4. **Add System.CommandLine:** + - Install the latest `System.CommandLine` NuGet package compatible with .NET 8. + - Define commands and options. + - Parse and handle command-line arguments. +5. **Leverage .NET 8 Features:** + - Utilize any new features in .NET 8 that enhance the application, such as performance improvements or new APIs. +6. **Create Template Configuration:** + - Add a `.template.config` folder with a `template.json` file. + - Define template parameters and symbols. +7. **Test the Template:** + - Install the template locally using `dotnet new --install`. + - Create a new project using the template and ensure all features work as expected. +8. **Document the Template:** + - Write clear installation and usage instructions. + - Provide examples and code snippets. + +## Timeline + +- **Week 1:** Set up the initial project targeting .NET 8 and integrate DI and hosting. +- **Week 2:** Add command-line parsing and finalize the template structure. +- **Week 3:** Test the template thoroughly on .NET 8 and make necessary adjustments. +- **Week 4:** Prepare documentation and sample applications. + +## References + +- [.NET 8 Documentation](https://learn.microsoft.com/en-us/dotnet/core/dotnet-eight) +- [.NET Generic Host Documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/generic-host) +- [Dependency Injection in .NET](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection) +- [System.CommandLine Repository](https://github.com/dotnet/command-line-api) +- [Creating Custom Templates for dotnet new](https://learn.microsoft.com/en-us/dotnet/core/tools/custom-templates) + +--- + This document outlines the goal and steps required to create a robust .NET 8 console app template that integrates dependency injection, the hosting model, and command-line parsing using `System.CommandLine`, supporting only .NET 8 or later versions. \ No newline at end of file diff --git a/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/Claude.md b/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/Claude.md index dd975dc38..8fafb25e3 100644 --- a/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/Claude.md +++ b/TimeWarp.Console/Kanban/Backlog/TimeWarp.Console/Claude.md @@ -1,36 +1,36 @@ -# Goals for .NET Console App Template - -## Objective -Create a .NET template for a console application that incorporates: -1. Dependency Injection -2. .NET Hosting Model -3. System.CommandLine - -## Key Features -1. **Dependency Injection** - - Utilize Microsoft.Extensions.DependencyInjection - - Set up a service container for managing dependencies - - Demonstrate injection of services into the main application and commands - -2. **.NET Hosting Model** - - Implement IHostBuilder for application configuration - - Set up dependency injection, logging, and configuration as part of the host - -3. **System.CommandLine** - - Integrate System.CommandLine for parsing command-line arguments - - Define command structure with options and arguments - - Bind command-line inputs to strongly-typed objects - -## Benefits -- Modular and maintainable code structure -- Easier unit testing through dependency injection -- Consistent configuration and logging setup -- Robust command-line argument parsing and validation - -## Next Steps -1. Set up the basic project structure -2. Implement the hosting model -3. Add dependency injection -4. Integrate System.CommandLine -5. Create example commands and services +# Goals for .NET Console App Template + +## Objective +Create a .NET template for a console application that incorporates: +1. Dependency Injection +2. .NET Hosting Model +3. System.CommandLine + +## Key Features +1. **Dependency Injection** + - Utilize Microsoft.Extensions.DependencyInjection + - Set up a service container for managing dependencies + - Demonstrate injection of services into the main application and commands + +2. **.NET Hosting Model** + - Implement IHostBuilder for application configuration + - Set up dependency injection, logging, and configuration as part of the host + +3. **System.CommandLine** + - Integrate System.CommandLine for parsing command-line arguments + - Define command structure with options and arguments + - Bind command-line inputs to strongly-typed objects + +## Benefits +- Modular and maintainable code structure +- Easier unit testing through dependency injection +- Consistent configuration and logging setup +- Robust command-line argument parsing and validation + +## Next Steps +1. Set up the basic project structure +2. Implement the hosting model +3. Add dependency injection +4. Integrate System.CommandLine +5. Create example commands and services 6. Document usage and customization instructions \ No newline at end of file diff --git a/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure.md b/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure.md index 7b45f5616..eff45d2ed 100644 --- a/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure.md +++ b/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure.md @@ -1,62 +1,62 @@ -# Task 001: Set Up Project Structure - -## Description - -Create the initial project structure for the .NET 8 console application. This will serve as the foundation for integrating Dependency Injection, Hosting, and System.CommandLine in subsequent tasks. - -## Requirements - -- Create a new console application project targeting **.NET 8.0**. -- Use `ConsoleApp` as the project name. -- Organize project files and folders logically using the following structure: - - `Source` for source code. - - `Tests` for unit tests. - - `Documentation` for project documentation. -- Ensure the project runs successfully. - -## Checklist - -- **Organize Structure** - - [ ] Create the following folders at the root level: - - [ ] `Source` for source code: - - [ ] `Tests` for unit tests: - - [ ] `Documentation` for project documentation: - ```pwsh - New-Item -Path "Source/Index.md" -ItemType File -Force -Value "TODO" - New-Item -Path "Tests/Index.md" -ItemType File -Force -Value "TODO" - New-Item -Path "Documentation/Index.md" -ItemType File -Force -Value "TODO" - ``` -- **Initialize Project** - - [ ] From the root directory, run the following command to create the project directly in the `Source` folder: - ```pwsh - dotnet new console --framework net8.0 --name ConsoleApp --output Source/ConsoleApp --use-program-main - - ``` -- **Verify Build** - - [ ] Run the application to confirm it executes successfully: - ```pwsh - dotnet run --project Source/ConsoleApp/ConsoleApp.csproj - ``` -- **Documentation** - - [ ] Create a `ReadMe.md` placeholder file in the `Documentation` folder with the text `TODO`: - ```pwsh - New-Item -Path "Documentation/ReadMe.md" -ItemType File -Force -Value "TODO" - ``` -- **Version Control** - - [ ] Generate a `.gitignore` file tailored for .NET projects: - ```pwsh - dotnet new gitignore - ``` - -## Notes - -- **PowerShell Core (pwsh) Usage**: All commands are provided using PowerShell Core (`pwsh`), which is cross-platform. -- **Namespace Usage**: Use `ConsoleApp` as the namespace in your code files. -- **Clean Codebase**: Keep the initial code minimal to simplify the addition of features in future tasks. - -## Implementation Notes - -- **Avoid Unnecessary Additions**: - - Do not add extra packages or code at this stage to keep the project clean and focused. -- **Documentation**: - - The `ReadMe.md` in the `Documentation` folder and the `Index.md` files in each directory should contain `TODO` as their content. +# Task 001: Set Up Project Structure + +## Description + +Create the initial project structure for the .NET 8 console application. This will serve as the foundation for integrating Dependency Injection, Hosting, and System.CommandLine in subsequent tasks. + +## Requirements + +- Create a new console application project targeting **.NET 8.0**. +- Use `ConsoleApp` as the project name. +- Organize project files and folders logically using the following structure: + - `Source` for source code. + - `Tests` for unit tests. + - `Documentation` for project documentation. +- Ensure the project runs successfully. + +## Checklist + +- **Organize Structure** + - [ ] Create the following folders at the root level: + - [ ] `Source` for source code: + - [ ] `Tests` for unit tests: + - [ ] `Documentation` for project documentation: + ```pwsh + New-Item -Path "Source/Index.md" -ItemType File -Force -Value "TODO" + New-Item -Path "Tests/Index.md" -ItemType File -Force -Value "TODO" + New-Item -Path "Documentation/Index.md" -ItemType File -Force -Value "TODO" + ``` +- **Initialize Project** + - [ ] From the root directory, run the following command to create the project directly in the `Source` folder: + ```pwsh + dotnet new console --framework net8.0 --name ConsoleApp --output Source/ConsoleApp --use-program-main + + ``` +- **Verify Build** + - [ ] Run the application to confirm it executes successfully: + ```pwsh + dotnet run --project Source/ConsoleApp/ConsoleApp.csproj + ``` +- **Documentation** + - [ ] Create a `ReadMe.md` placeholder file in the `Documentation` folder with the text `TODO`: + ```pwsh + New-Item -Path "Documentation/ReadMe.md" -ItemType File -Force -Value "TODO" + ``` +- **Version Control** + - [ ] Generate a `.gitignore` file tailored for .NET projects: + ```pwsh + dotnet new gitignore + ``` + +## Notes + +- **PowerShell Core (pwsh) Usage**: All commands are provided using PowerShell Core (`pwsh`), which is cross-platform. +- **Namespace Usage**: Use `ConsoleApp` as the namespace in your code files. +- **Clean Codebase**: Keep the initial code minimal to simplify the addition of features in future tasks. + +## Implementation Notes + +- **Avoid Unnecessary Additions**: + - Do not add extra packages or code at this stage to keep the project clean and focused. +- **Documentation**: + - The `ReadMe.md` in the `Documentation` folder and the `Index.md` files in each directory should contain `TODO` as their content. diff --git a/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure_Story.md b/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure_Story.md index d3c3313c5..3357affbf 100644 --- a/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure_Story.md +++ b/TimeWarp.Console/Kanban/Done/001_Set-Up-Project-Structure_Story.md @@ -1,71 +1,71 @@ -# User Story: Establish Robust Project Foundation for .NET 8 Console Application Template - -**Summary:** - -As a **development team**, we want to **establish a robust and scalable project structure** for our .NET 8 console application template so that **future development is efficient, maintainable, and aligned with best practices**. - ---- - -## Description - -We aim to create a solid foundation for our console application template that will serve as the starting point for multiple projects across the organization. This involves setting up a standardized project structure that supports: - -- **Scalability**: Accommodate future features and integrations without significant restructuring. -- **Maintainability**: Simplify code management and updates over the project's lifespan. -- **Collaboration**: Enable seamless teamwork by providing a common framework understood by all developers. -- **Best Practices Alignment**: Ensure adherence to industry and organizational standards from the outset. - -By investing in a strong foundational structure now, we reduce technical debt, streamline future development efforts, and enhance overall productivity. - ---- - -## Acceptance Criteria - -- **Project Initialization**: A new .NET 8 console application project is established as the base template. -- **Standardized Structure**: The project includes organized directories for source code, unit tests, and documentation. -- **Naming Conventions**: All files and directories follow the organization's naming standards. -- **Build and Run**: The project builds and runs successfully without errors. -- **Foundation for Future Work**: The structure supports easy integration of advanced features like Dependency Injection, Hosting, and Command-Line Parsing in subsequent development phases. -- **Documentation Placeholders**: Placeholder files are included to facilitate future documentation efforts. - ---- - -## Business Value - -- **Improved Efficiency**: A well-organized project structure accelerates development time for current and future features. -- **Reduced Technical Debt**: Establishing best practices early prevents costly refactoring down the line. -- **Enhanced Collaboration**: A common project layout improves onboarding and team synergy. -- **Scalability**: Preparing for future integrations ensures the project can grow with organizational needs. -- **Quality Assurance**: Lays the groundwork for implementing testing and documentation practices effectively. - ---- - -## Story Points - -**Estimated Effort**: **13 Story Points** - -*Justification*: This task involves critical planning and setup that will impact all future development. It requires careful consideration to align with best practices and organizational standards, making it a substantial effort that warrants a higher story point allocation. - ---- - -## Dependencies - -- **None** - ---- - -## Risks and Mitigations - -- **Risk**: If the project foundation is not set up correctly, it could lead to increased technical debt and hinder future development. - - **Mitigation**: Allocate sufficient time for planning and reviewing the project structure to ensure it meets all requirements. - ---- - -## Additional Notes - -- This user story is pivotal for the success of subsequent tasks and features. -- Collaboration with senior developers or architects may be beneficial to ensure alignment with organizational standards. - ---- - +# User Story: Establish Robust Project Foundation for .NET 8 Console Application Template + +**Summary:** + +As a **development team**, we want to **establish a robust and scalable project structure** for our .NET 8 console application template so that **future development is efficient, maintainable, and aligned with best practices**. + +--- + +## Description + +We aim to create a solid foundation for our console application template that will serve as the starting point for multiple projects across the organization. This involves setting up a standardized project structure that supports: + +- **Scalability**: Accommodate future features and integrations without significant restructuring. +- **Maintainability**: Simplify code management and updates over the project's lifespan. +- **Collaboration**: Enable seamless teamwork by providing a common framework understood by all developers. +- **Best Practices Alignment**: Ensure adherence to industry and organizational standards from the outset. + +By investing in a strong foundational structure now, we reduce technical debt, streamline future development efforts, and enhance overall productivity. + +--- + +## Acceptance Criteria + +- **Project Initialization**: A new .NET 8 console application project is established as the base template. +- **Standardized Structure**: The project includes organized directories for source code, unit tests, and documentation. +- **Naming Conventions**: All files and directories follow the organization's naming standards. +- **Build and Run**: The project builds and runs successfully without errors. +- **Foundation for Future Work**: The structure supports easy integration of advanced features like Dependency Injection, Hosting, and Command-Line Parsing in subsequent development phases. +- **Documentation Placeholders**: Placeholder files are included to facilitate future documentation efforts. + +--- + +## Business Value + +- **Improved Efficiency**: A well-organized project structure accelerates development time for current and future features. +- **Reduced Technical Debt**: Establishing best practices early prevents costly refactoring down the line. +- **Enhanced Collaboration**: A common project layout improves onboarding and team synergy. +- **Scalability**: Preparing for future integrations ensures the project can grow with organizational needs. +- **Quality Assurance**: Lays the groundwork for implementing testing and documentation practices effectively. + +--- + +## Story Points + +**Estimated Effort**: **13 Story Points** + +*Justification*: This task involves critical planning and setup that will impact all future development. It requires careful consideration to align with best practices and organizational standards, making it a substantial effort that warrants a higher story point allocation. + +--- + +## Dependencies + +- **None** + +--- + +## Risks and Mitigations + +- **Risk**: If the project foundation is not set up correctly, it could lead to increased technical debt and hinder future development. + - **Mitigation**: Allocate sufficient time for planning and reviewing the project structure to ensure it meets all requirements. + +--- + +## Additional Notes + +- This user story is pivotal for the success of subsequent tasks and features. +- Collaboration with senior developers or architects may be beneficial to ensure alignment with organizational standards. + +--- + By focusing on establishing a strong project foundation, we set the stage for successful development cycles ahead, making this task a high-value and high-effort user story. \ No newline at end of file diff --git a/TimeWarp.Console/Kanban/Done/Overview.md b/TimeWarp.Console/Kanban/Done/Overview.md index dd9b649b8..fa7b84c87 100644 --- a/TimeWarp.Console/Kanban/Done/Overview.md +++ b/TimeWarp.Console/Kanban/Done/Overview.md @@ -1,449 +1,449 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml - -# ----- Custom .gitignore below ----- - -# Ignore all .idea files except these specific files and directories -.idea/* -!.idea/runConfigurations/ -!.idea/modules.xml -!.idea/vcs.xml -!.idea/encodings.xml -!.idea/misc.xml - -# aider chat AI files -/.aider.tags.cache* -/.aider.chat.history.md -/.aider.input.history - -# TimeWarp Architecture -/BlazorDefault2018-05-02.Client/ -/BlazorDefault2018-05-02.Server/ -/BlazorDefault2018-05-02.Shared/ - -# TimeWarp architecture templates Generated Code -GeneratedCode/ - -# Web.Spa generated code -/Source/ContainerApps/Web/Web.Spa/wwwroot/js/ - -# TimeWarp architecture templates Generated Code -/Source/ContainerApps/Web/Web.Contracts/Generated/** -/Source/ContainerApps/Web/Web.Spa/Generated/** -/Source/ContainerApps/Web/Web.Server/Generated/** -/Source/ContainerApps/Api/Api.Contracts/Generated/** -/Tests/TimeWarp.Testing/Generated/** - -# TimeWarp architecture Log files -/Source/ContainerApps/Web/Web.Server/Logs/log.txt - -# TimeWarp architecture templates Generated Documentation -/Documentation/Developer/Conceptual/ComponentNamingAndOrganization.pdf -/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Mutability_in_API_Contracts.pdf -/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Nullability_in_API_Contracts.pdf -/Documentation/Developer/HowToGuides/Api_Contracts/HowToWrite_BFF_API_Contracts.pdf - -# TimeWarp architecture templates Generated css -/Source/ContainerApps/Web/Web.Spa/wwwroot/css/site.css - -# Ignore launchsettings on non executable projects -/Source/ContainerApps/Web/Web.Spa/Properties/launchSettings.json - -# Misc -/output.txt +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# ----- Custom .gitignore below ----- + +# Ignore all .idea files except these specific files and directories +.idea/* +!.idea/runConfigurations/ +!.idea/modules.xml +!.idea/vcs.xml +!.idea/encodings.xml +!.idea/misc.xml + +# aider chat AI files +/.aider.tags.cache* +/.aider.chat.history.md +/.aider.input.history + +# TimeWarp Architecture +/BlazorDefault2018-05-02.Client/ +/BlazorDefault2018-05-02.Server/ +/BlazorDefault2018-05-02.Shared/ + +# TimeWarp architecture templates Generated Code +GeneratedCode/ + +# Web.Spa generated code +/Source/ContainerApps/Web/Web.Spa/wwwroot/js/ + +# TimeWarp architecture templates Generated Code +/Source/ContainerApps/Web/Web.Contracts/Generated/** +/Source/ContainerApps/Web/Web.Spa/Generated/** +/Source/ContainerApps/Web/Web.Server/Generated/** +/Source/ContainerApps/Api/Api.Contracts/Generated/** +/Tests/TimeWarp.Testing/Generated/** + +# TimeWarp architecture Log files +/Source/ContainerApps/Web/Web.Server/Logs/log.txt + +# TimeWarp architecture templates Generated Documentation +/Documentation/Developer/Conceptual/ComponentNamingAndOrganization.pdf +/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Mutability_in_API_Contracts.pdf +/Documentation/Developer/HowToGuides/Api_Contracts/Handling_Nullability_in_API_Contracts.pdf +/Documentation/Developer/HowToGuides/Api_Contracts/HowToWrite_BFF_API_Contracts.pdf + +# TimeWarp architecture templates Generated css +/Source/ContainerApps/Web/Web.Spa/wwwroot/css/site.css + +# Ignore launchsettings on non executable projects +/Source/ContainerApps/Web/Web.Spa/Properties/launchSettings.json + +# Misc +/output.txt diff --git a/TimeWarp.Console/Kanban/InProgress/002_Implement-Generic-Host.md b/TimeWarp.Console/Kanban/InProgress/002_Implement-Generic-Host.md index 28a9d4c8f..0a55fc541 100644 --- a/TimeWarp.Console/Kanban/InProgress/002_Implement-Generic-Host.md +++ b/TimeWarp.Console/Kanban/InProgress/002_Implement-Generic-Host.md @@ -1,178 +1,178 @@ -# Task 002: Integrate Cocona into the Console Application - -## Description - -Integrate **Cocona** into the console application to simplify command-line parsing and Dependency Injection. This will provide a streamlined foundation for managing commands, options, and services throughout the application. - -## Requirements - -- Add the `Cocona` package to the project. -- Modify `Program.cs` to use Cocona's application builder. -- Define a sample command using Cocona's attribute-based syntax. -- Ensure the application runs successfully with Cocona integrated. -- Adhere to the project's coding standards as specified in the `.ai` directory. - -## Checklist - -- **Add Cocona Package** - - [ ] Install the `Cocona` NuGet package: - - ```pwsh - dotnet add Source/ConsoleApp/ConsoleApp.csproj package Cocona - ``` - -- **Modify Program.cs** - - [ ] Update `Program.cs` to use Cocona's application builder: - - ```csharp - // File: Program.cs - namespace ConsoleApp; - - using Cocona; - using System.Threading.Tasks; - - public class Program - { - public static void Main(string[] args) - { - CoconaApp.Run(args); - } - - // Define a command method - public void Hello( - [Option('n', Description = "Your name")] string name = "World") - { - Console.WriteLine($"Hello, {name}!"); - } - } - ``` - -- **Verify Application** - - [ ] Run the application to ensure it works correctly with Cocona integrated: - - ```pwsh - dotnet run --project Source/ConsoleApp/ConsoleApp.csproj -- hello --name "Alice" - ``` - - - Expected output: - - ``` - Hello, Alice! - ``` - -- **Update Documentation** - - [ ] Add notes to `Documentation/ReadMe.md` about the integration of Cocona and how to use the application. - - ```markdown - # ConsoleApp - - ## Updates - - - Integrated Cocona for command-line parsing and Dependency Injection. - - ## Usage - - Run the application with the following command: - - ```sh - dotnet run --project Source/ConsoleApp/ConsoleApp.csproj -- hello --name "YourName" - ``` - - Replace `"YourName"` with your actual name. - - ## Available Commands - - - `hello`: Greets the user. - - Options: - - `-n`, `--name`: Specifies the name to greet. - ``` - -- **Ensure Coding Standards** - - [ ] Verify that all code changes comply with the coding standards specified in `.ai/coding-standards.md`. - -## Notes - -- **Simplicity**: Cocona reduces boilerplate code and simplifies command-line parsing and DI integration. -- **Attribute-Based Commands**: Commands and options are defined using attributes, making the code clean and easy to read. -- **Future Expansion**: This setup allows for easy addition of more commands and services in future tasks. - -## Implementation Notes - -- **Dependency Injection**: - - Cocona automatically sets up a service container using `Microsoft.Extensions.DependencyInjection`. - - You can register services in the `ConfigureServices` method if needed. -- **Asynchronous Commands**: - - If you need to perform asynchronous operations, you can define commands as `async Task` methods. - - ```csharp - public async Task FetchData() - { - // Asynchronous code here - await Task.Delay(1000); - } - ``` - -- **Multiple Commands**: - - You can define multiple command methods within the `Program` class or separate classes. - - ```csharp - public void Goodbye() - { - Console.WriteLine("Goodbye!"); - } - ``` - -- **Using Services**: - - Inject services into command methods via parameters. - - ```csharp - public void ProcessData(IMyService myService) - { - myService.Execute(); - } - ``` - -## Example of Registering Services - -If you need to register services for Dependency Injection, create a `ConfigureServices` method: - -```csharp -// File: Program.cs -namespace ConsoleApp; - -using Cocona; -using Microsoft.Extensions.DependencyInjection; -using System.Threading.Tasks; - -public class Program -{ - public static void Main(string[] args) - { - CoconaApp.CreateBuilder() - .ConfigureServices(services => - { - services.AddSingleton(); - }) - .Build() - .Run(); - } - - public void UseService(IMyService myService) - { - myService.Execute(); - } -} - -public interface IMyService -{ - void Execute(); -} - -public class MyService : IMyService -{ - public void Execute() - { - Console.WriteLine("Service Executed."); - } -} -``` +# Task 002: Integrate Cocona into the Console Application + +## Description + +Integrate **Cocona** into the console application to simplify command-line parsing and Dependency Injection. This will provide a streamlined foundation for managing commands, options, and services throughout the application. + +## Requirements + +- Add the `Cocona` package to the project. +- Modify `Program.cs` to use Cocona's application builder. +- Define a sample command using Cocona's attribute-based syntax. +- Ensure the application runs successfully with Cocona integrated. +- Adhere to the project's coding standards as specified in the `.ai` directory. + +## Checklist + +- **Add Cocona Package** + - [ ] Install the `Cocona` NuGet package: + + ```pwsh + dotnet add Source/ConsoleApp/ConsoleApp.csproj package Cocona + ``` + +- **Modify Program.cs** + - [ ] Update `Program.cs` to use Cocona's application builder: + + ```csharp + // File: Program.cs + namespace ConsoleApp; + + using Cocona; + using System.Threading.Tasks; + + public class Program + { + public static void Main(string[] args) + { + CoconaApp.Run(args); + } + + // Define a command method + public void Hello( + [Option('n', Description = "Your name")] string name = "World") + { + Console.WriteLine($"Hello, {name}!"); + } + } + ``` + +- **Verify Application** + - [ ] Run the application to ensure it works correctly with Cocona integrated: + + ```pwsh + dotnet run --project Source/ConsoleApp/ConsoleApp.csproj -- hello --name "Alice" + ``` + + - Expected output: + + ``` + Hello, Alice! + ``` + +- **Update Documentation** + - [ ] Add notes to `Documentation/ReadMe.md` about the integration of Cocona and how to use the application. + + ```markdown + # ConsoleApp + + ## Updates + + - Integrated Cocona for command-line parsing and Dependency Injection. + + ## Usage + + Run the application with the following command: + + ```sh + dotnet run --project Source/ConsoleApp/ConsoleApp.csproj -- hello --name "YourName" + ``` + + Replace `"YourName"` with your actual name. + + ## Available Commands + + - `hello`: Greets the user. + - Options: + - `-n`, `--name`: Specifies the name to greet. + ``` + +- **Ensure Coding Standards** + - [ ] Verify that all code changes comply with the coding standards specified in `.ai/coding-standards.md`. + +## Notes + +- **Simplicity**: Cocona reduces boilerplate code and simplifies command-line parsing and DI integration. +- **Attribute-Based Commands**: Commands and options are defined using attributes, making the code clean and easy to read. +- **Future Expansion**: This setup allows for easy addition of more commands and services in future tasks. + +## Implementation Notes + +- **Dependency Injection**: + - Cocona automatically sets up a service container using `Microsoft.Extensions.DependencyInjection`. + - You can register services in the `ConfigureServices` method if needed. +- **Asynchronous Commands**: + - If you need to perform asynchronous operations, you can define commands as `async Task` methods. + + ```csharp + public async Task FetchData() + { + // Asynchronous code here + await Task.Delay(1000); + } + ``` + +- **Multiple Commands**: + - You can define multiple command methods within the `Program` class or separate classes. + + ```csharp + public void Goodbye() + { + Console.WriteLine("Goodbye!"); + } + ``` + +- **Using Services**: + - Inject services into command methods via parameters. + + ```csharp + public void ProcessData(IMyService myService) + { + myService.Execute(); + } + ``` + +## Example of Registering Services + +If you need to register services for Dependency Injection, create a `ConfigureServices` method: + +```csharp +// File: Program.cs +namespace ConsoleApp; + +using Cocona; +using Microsoft.Extensions.DependencyInjection; +using System.Threading.Tasks; + +public class Program +{ + public static void Main(string[] args) + { + CoconaApp.CreateBuilder() + .ConfigureServices(services => + { + services.AddSingleton(); + }) + .Build() + .Run(); + } + + public void UseService(IMyService myService) + { + myService.Execute(); + } +} + +public interface IMyService +{ + void Execute(); +} + +public class MyService : IMyService +{ + public void Execute() + { + Console.WriteLine("Service Executed."); + } +} +``` diff --git a/TimeWarp.Console/Kanban/ReadMe.md b/TimeWarp.Console/Kanban/ReadMe.md index 7babe88c9..3698a79f4 100644 --- a/TimeWarp.Console/Kanban/ReadMe.md +++ b/TimeWarp.Console/Kanban/ReadMe.md @@ -1,26 +1,26 @@ -# Kanban Board - -This Kanban board helps manage and track tasks for the project using a simple folder structure. -Each task is represented by a Markdown file, and the status of a task is indicated by the folder it is in. - -## Folders - -1. **Backlog**: Contains tasks that are not yet ready to be worked on. These tasks have a temporary backlog scoped unique identifier. -2. **ToDo**: Contains tasks that are ready to be worked on. When a task from the Backlog becomes ready, it is assigned a unique identifier and moved to this folder. -3. **InProgress**: Contains tasks that are currently being worked on. -4. **Done**: Contains tasks that have been completed. - -## File Naming Convention - -- For tasks in the Backlog folder, use a short description with a 'B' prefix followed by a three-digit identifier, -such as `B001_Research-Authentication-Methods.md` or `B002_Design-Game-Rules.md`. -- When a task becomes "Ready," assign it a unique identifier (without the 'B' prefix) and move it to the ToDo folder, e.g., -`001_Implement-User-Registration.md` or `002_Create-Game-Logic.md`. -- `<3 digit Id>_` - -## Workflow - -1. Create a task in the Backlog folder with a short description as the filename. -2. When a task is ready to be worked on, assign it a unique identifier and move it to the ToDo folder. -3. As you work on tasks, move them to the InProgress folder. -4. When a task is complete, move it to the Done folder. +# Kanban Board + +This Kanban board helps manage and track tasks for the project using a simple folder structure. +Each task is represented by a Markdown file, and the status of a task is indicated by the folder it is in. + +## Folders + +1. **Backlog**: Contains tasks that are not yet ready to be worked on. These tasks have a temporary backlog scoped unique identifier. +2. **ToDo**: Contains tasks that are ready to be worked on. When a task from the Backlog becomes ready, it is assigned a unique identifier and moved to this folder. +3. **InProgress**: Contains tasks that are currently being worked on. +4. **Done**: Contains tasks that have been completed. + +## File Naming Convention + +- For tasks in the Backlog folder, use a short description with a 'B' prefix followed by a three-digit identifier, +such as `B001_Research-Authentication-Methods.md` or `B002_Design-Game-Rules.md`. +- When a task becomes "Ready," assign it a unique identifier (without the 'B' prefix) and move it to the ToDo folder, e.g., +`001_Implement-User-Registration.md` or `002_Create-Game-Logic.md`. +- `<3 digit Id>_` + +## Workflow + +1. Create a task in the Backlog folder with a short description as the filename. +2. When a task is ready to be worked on, assign it a unique identifier and move it to the ToDo folder. +3. As you work on tasks, move them to the InProgress folder. +4. When a task is complete, move it to the Done folder. diff --git a/TimeWarp.Console/Kanban/Task-Template.md b/TimeWarp.Console/Kanban/Task-Template.md index 39863c0f2..5bf51b974 100644 --- a/TimeWarp.Console/Kanban/Task-Template.md +++ b/TimeWarp.Console/Kanban/Task-Template.md @@ -1,38 +1,38 @@ -# Task 000: Title - -## Description - -- Provide a brief description of the task, outlining its purpose and goals. - -## Requirements - -- List any specific requirements or criteria that must be met for the task to be considered complete. - -## Checklist - -> Add relevant items to the checklist as necessary when creating the task or implementing it. - -### Design -- [ ] Update UX Design -- [ ] Update Model -### Implementation -- [ ] Update Dependencies -- [ ] Update Relevant Configuration Settings -- [ ] Verify Functionality -### Documentation -- [ ] Update Documentation -- [ ] Update `.ai` files -### Review -- [ ] Consider Accessibility Implications -- [ ] Consider Monitoring and Alerting Implications -- [ ] Consider Performance Implications -- [ ] Consider Security Implications -- [ ] Code Review - -## Notes - -- Include any additional information, resources, or references relevant to the task - -## Implementation Notes - +# Task 000: Title + +## Description + +- Provide a brief description of the task, outlining its purpose and goals. + +## Requirements + +- List any specific requirements or criteria that must be met for the task to be considered complete. + +## Checklist + +> Add relevant items to the checklist as necessary when creating the task or implementing it. + +### Design +- [ ] Update UX Design +- [ ] Update Model +### Implementation +- [ ] Update Dependencies +- [ ] Update Relevant Configuration Settings +- [ ] Verify Functionality +### Documentation +- [ ] Update Documentation +- [ ] Update `.ai` files +### Review +- [ ] Consider Accessibility Implications +- [ ] Consider Monitoring and Alerting Implications +- [ ] Consider Performance Implications +- [ ] Consider Security Implications +- [ ] Code Review + +## Notes + +- Include any additional information, resources, or references relevant to the task + +## Implementation Notes + - Include notes while task is in progress \ No newline at end of file diff --git a/TimeWarp.Console/Source/ConsoleApp/ConsoleApp.csproj b/TimeWarp.Console/Source/ConsoleApp/ConsoleApp.csproj index e8e1b5a40..fd4bd08da 100644 --- a/TimeWarp.Console/Source/ConsoleApp/ConsoleApp.csproj +++ b/TimeWarp.Console/Source/ConsoleApp/ConsoleApp.csproj @@ -1,10 +1,10 @@ -ο»Ώ - - - Exe - net9.0 - enable - enable - - - +ο»Ώ + + + Exe + net9.0 + enable + enable + + + diff --git a/TimeWarp.Console/Source/ConsoleApp/Program.cs b/TimeWarp.Console/Source/ConsoleApp/Program.cs index 8ae04b9ac..8f2130359 100644 --- a/TimeWarp.Console/Source/ConsoleApp/Program.cs +++ b/TimeWarp.Console/Source/ConsoleApp/Program.cs @@ -1,9 +1,9 @@ -ο»Ώnamespace ConsoleApp; - -class Program -{ - static void Main(string[] args) - { - Console.WriteLine("Hello, World!"); - } -} +ο»Ώnamespace ConsoleApp; + +class Program +{ + static void Main(string[] args) + { + Console.WriteLine("Hello, World!"); + } +} diff --git a/TimeWarp.Templates/.editorconfig b/TimeWarp.Templates/.editorconfig index 3b06bb0b0..8ebf34dcd 100644 --- a/TimeWarp.Templates/.editorconfig +++ b/TimeWarp.Templates/.editorconfig @@ -1,239 +1,239 @@ -ο»Ώ# EditorConfig is awesome:http://EditorConfig.org -# For dotnet and Csharp specific see below -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference - -############################### -# Core EditorConfig Options # -############################### - -# top-most EditorConfig file -root = true - -# Don't use tabs for indentation. -[*] -indent_style = space -indent_size = 2 -end_of_line = crlf - -# Development files -[*.{cs,csx,cshtml,csproj,sln,props,targets,json,md,yml,gitignore,razor,}] -charset = "utf-8" - -############################### -# .NET Code Style Settings # -############################### -[*.{cs,vb}] -# "this." and "Me." qualifiers -# Avoid "this." and "Me." if not necessary -dotnet_style_qualification_for_field = false:suggestion -dotnet_style_qualification_for_property = false:suggestion -dotnet_style_qualification_for_method = false:suggestion -dotnet_style_qualification_for_event = false:suggestion - -# Language keywords instead of framework type names for type references -# Use language keywords instead of framework type names for type references -dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion -dotnet_style_predefined_type_for_member_access = true:suggestion - -# Modifier preferences -dotnet_style_require_accessibility_modifiers = for_non_interface_members:none -csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion -# visual_basic_preferred_modifier_order Don't care -dotnet_style_readonly_field = true:suggestion - -# Parentheses preferences -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent - -# Expression-level preferences -dotnet_style_object_initializer = true:suggestion -dotnet_style_collection_initializer = true:suggestion -dotnet_style_explicit_tuple_names = 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_is_null_check_over_reference_equality_method = true:suggestion -dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion -dotnet_style_prefer_conditional_expression_over_return = true:suggestion -dotnet_style_prefer_compound_assignment = true:suggestion - -# "Null" checking preferences -dotnet_style_coalesce_expression = true:suggestion -dotnet_style_null_propagation = true:suggestion - - -############################### -# Formatting conventions # -############################### - -############################### -# .NET Formatting settings # -############################### -dotnet_sort_system_directives_first = true -dotnet_separate_import_directive_groups = true - - -############################### -# C# Formatting settings # -############################### - -# Newline options -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true - -# Indentation options -csharp_indent_case_contents = true -csharp_indent_switch_labels = true -csharp_indent_labels = no_change -csharp_indent_block_contents = true -csharp_indent_braces = false -csharp_indent_case_contents_when_block = false - -# Spacing options -csharp_space_after_cast = true -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_between_parentheses = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -csharp_space_between_method_declaration_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_call_parameter_list_parentheses = true -csharp_space_between_method_call_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_after_comma = true -csharp_space_before_comma = false -csharp_space_after_dot = false -csharp_space_before_dot = false -csharp_space_after_semicolon_in_for_statement = true -csharp_space_before_semicolon_in_for_statement = false -csharp_space_around_declaration_statements = false -csharp_space_before_open_square_brackets = false -csharp_space_between_empty_square_brackets = false -csharp_space_between_square_brackets = false - -# Wrapping options -csharp_preserve_single_line_statements = false -csharp_preserve_single_line_blocks = true - -############################### -# Naming Conventions # -############################### -# Example from coreclr -# https://github.com/dotnet/coreclr/blob/master/.editorconfig - -# Non-private static fields are PascalCase -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style - -dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field -dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected -dotnet_naming_symbols.non_private_static_fields.required_modifiers = static - -dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case - -# Constants are PascalCase -dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants -dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style - -dotnet_naming_symbols.constants.applicable_kinds = field, local -dotnet_naming_symbols.constants.required_modifiers = const - -dotnet_naming_style.constant_style.capitalization = pascal_case - -# local variables should be camelCase -dotnet_naming_rule.camel_case_for_local_variables.severity = suggestion -dotnet_naming_rule.camel_case_for_local_variables.symbols = local_variables -dotnet_naming_rule.camel_case_for_local_variables.style = local_variables_style - -dotnet_naming_symbols.local_variables.applicable_kinds = local - -dotnet_naming_style.local_variables_style.capitalization = camel_case - -# Local functions are PascalCase -dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions -dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style - -dotnet_naming_symbols.local_functions.applicable_kinds = local_function - -dotnet_naming_style.local_function_style.capitalization = pascal_case - -# By default, name items with PascalCase -dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members -dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style - -dotnet_naming_symbols.all_members.applicable_kinds = * - -dotnet_naming_style.pascal_case_style.capitalization = pascal_case - -############################### -# CSharp code style settings: # -############################### -[*.cs] -# Implicit and explicit types - -csharp_style_var_elsewhere = false:warning -csharp_style_var_for_built_in_types = false:warning -csharp_style_var_when_type_is_apparent = true:warning - -# Expression-bodied members -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_bodied_members -csharp_style_expression_bodied_methods = when_on_single_line:warning -csharp_style_expression_bodied_constructors = false:warning -csharp_style_expression_bodied_operators = when_on_single_line:warning -csharp_style_expression_bodied_properties = when_on_single_line:warning -csharp_style_expression_bodied_indexers = when_on_single_line:warning -csharp_style_expression_bodied_accessors = when_on_single_line:warning -csharp_style_expression_bodied_lambdas = true:silent -csharp_style_expression_bodied_local_functions = false:silent - -# Pattern Matching -#https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#pattern_matching -# Suggest more modern language features when available -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion - -# Inlined variable declarations -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#inlined_variable_declarations -csharp_style_inlined_variable_declaration = true:suggestion - -# Expression-level preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level_csharp -csharp_prefer_simple_default_expression = true:suggestion - -#"Null" checking preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking_csharp -csharp_style_throw_expression = true:suggestion -csharp_style_conditional_delegate_call = true:suggestion - -# Code block preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#code_block -csharp_prefer_braces = false:suggestion - -# Unused value preferences -csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion -csharp_style_unused_value_assignment_preference = discard_variable:suggestion - -# Index and range preferences -csharp_style_prefer_index_operator = true:suggestion -csharp_style_prefer_range_operator = true:suggestion - -# Miscellaneous preferences -csharp_style_deconstructed_variable_declaration = true:suggestion -csharp_style_pattern_local_over_anonymous_function = true:suggestion -csharp_using_directive_placement = inside_namespace :suggestion -csharp_prefer_static_local_function = true:suggestion -csharp_prefer_simple_using_statement = true:suggestion +ο»Ώ# EditorConfig is awesome:http://EditorConfig.org +# For dotnet and Csharp specific see below +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference + +############################### +# Core EditorConfig Options # +############################### + +# top-most EditorConfig file +root = true + +# Don't use tabs for indentation. +[*] +indent_style = space +indent_size = 2 +end_of_line = crlf + +# Development files +[*.{cs,csx,cshtml,csproj,sln,props,targets,json,md,yml,gitignore,razor,}] +charset = "utf-8" + +############################### +# .NET Code Style Settings # +############################### +[*.{cs,vb}] +# "this." and "Me." qualifiers +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +# Language keywords instead of framework type names for type references +# Use language keywords instead of framework type names for type references +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:none +csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion +# visual_basic_preferred_modifier_order Don't care +dotnet_style_readonly_field = true:suggestion + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent + +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = 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_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_return = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion + +# "Null" checking preferences +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion + + +############################### +# Formatting conventions # +############################### + +############################### +# .NET Formatting settings # +############################### +dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = true + + +############################### +# C# Formatting settings # +############################### + +# Newline options +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +# Indentation options +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = no_change +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents_when_block = false + +# Spacing options +csharp_space_after_cast = true +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_between_parentheses = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_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_call_parameter_list_parentheses = true +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_after_comma = true +csharp_space_before_comma = false +csharp_space_after_dot = false +csharp_space_before_dot = false +csharp_space_after_semicolon_in_for_statement = true +csharp_space_before_semicolon_in_for_statement = false +csharp_space_around_declaration_statements = false +csharp_space_before_open_square_brackets = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_square_brackets = false + +# Wrapping options +csharp_preserve_single_line_statements = false +csharp_preserve_single_line_blocks = true + +############################### +# Naming Conventions # +############################### +# Example from coreclr +# https://github.com/dotnet/coreclr/blob/master/.editorconfig + +# Non-private static fields are PascalCase +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style + +dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected +dotnet_naming_symbols.non_private_static_fields.required_modifiers = static + +dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case + +# Constants are PascalCase +dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants +dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style + +dotnet_naming_symbols.constants.applicable_kinds = field, local +dotnet_naming_symbols.constants.required_modifiers = const + +dotnet_naming_style.constant_style.capitalization = pascal_case + +# local variables should be camelCase +dotnet_naming_rule.camel_case_for_local_variables.severity = suggestion +dotnet_naming_rule.camel_case_for_local_variables.symbols = local_variables +dotnet_naming_rule.camel_case_for_local_variables.style = local_variables_style + +dotnet_naming_symbols.local_variables.applicable_kinds = local + +dotnet_naming_style.local_variables_style.capitalization = camel_case + +# Local functions are PascalCase +dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function + +dotnet_naming_style.local_function_style.capitalization = pascal_case + +# By default, name items with PascalCase +dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members +dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style + +dotnet_naming_symbols.all_members.applicable_kinds = * + +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +############################### +# CSharp code style settings: # +############################### +[*.cs] +# Implicit and explicit types + +csharp_style_var_elsewhere = false:warning +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:warning + +# Expression-bodied members +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_bodied_members +csharp_style_expression_bodied_methods = when_on_single_line:warning +csharp_style_expression_bodied_constructors = false:warning +csharp_style_expression_bodied_operators = when_on_single_line:warning +csharp_style_expression_bodied_properties = when_on_single_line:warning +csharp_style_expression_bodied_indexers = when_on_single_line:warning +csharp_style_expression_bodied_accessors = when_on_single_line:warning +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent + +# Pattern Matching +#https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#pattern_matching +# Suggest more modern language features when available +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion + +# Inlined variable declarations +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#inlined_variable_declarations +csharp_style_inlined_variable_declaration = true:suggestion + +# Expression-level preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level_csharp +csharp_prefer_simple_default_expression = true:suggestion + +#"Null" checking preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking_csharp +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Code block preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#code_block +csharp_prefer_braces = false:suggestion + +# Unused value preferences +csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion + +# Index and range preferences +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion + +# Miscellaneous preferences +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_using_directive_placement = inside_namespace :suggestion +csharp_prefer_static_local_function = true:suggestion +csharp_prefer_simple_using_statement = true:suggestion csharp_style_prefer_switch_expression = true:suggestion \ No newline at end of file diff --git a/TimeWarp.Templates/.gitignore b/TimeWarp.Templates/.gitignore index ddb8e9cbc..375befec0 100644 --- a/TimeWarp.Templates/.gitignore +++ b/TimeWarp.Templates/.gitignore @@ -1,341 +1,341 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ -**/Properties/launchSettings.json - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ -/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/TimeWarpBlazor.js -/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/TimeWarpBlazor.js.map -/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/js/ -/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/css/site.css -/Source/TimeWarp.Blazor.Template/templates/Feature.CrudComponents/.template.config/icon.png -/Source/TimeWarp.Blazor.Template/templates/Feature.CrudComponents/.template.config/template.json -/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Documentation/C4/ -/Source/TimeWarp.Architecture.Template/templates/TimeWarp.Architecture/Source/ContainerApps/Web/Web.Spa/wwwroot/css/site.css -TimeWarp.Architecture.sln.EasyRun.json -/Source/TimeWarp.Architecture.Template/templates/TimeWarp.Architecture/Documentation/StarUml/Generated/html-docs -/.vscode +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/TimeWarpBlazor.js +/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/TimeWarpBlazor.js.map +/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/js/ +/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Source/Client/wwwroot/css/site.css +/Source/TimeWarp.Blazor.Template/templates/Feature.CrudComponents/.template.config/icon.png +/Source/TimeWarp.Blazor.Template/templates/Feature.CrudComponents/.template.config/template.json +/Source/TimeWarp.Blazor.Template/templates/TimeWarp.Blazor/Documentation/C4/ +/Source/TimeWarp.Architecture.Template/templates/TimeWarp.Architecture/Source/ContainerApps/Web/Web.Spa/wwwroot/css/site.css +TimeWarp.Architecture.sln.EasyRun.json +/Source/TimeWarp.Architecture.Template/templates/TimeWarp.Architecture/Documentation/StarUml/Generated/html-docs +/.vscode diff --git a/TimeWarp.Templates/.markdownlint.json b/TimeWarp.Templates/.markdownlint.json index 7f34c86f3..71ed6b13b 100644 --- a/TimeWarp.Templates/.markdownlint.json +++ b/TimeWarp.Templates/.markdownlint.json @@ -1,8 +1,8 @@ -{ - "MD013": { - "code_block_line_length": 120, - "line_length": 120, - "heading_line_length": 80 - }, - "MD025": { "front_matter_title": ""} +{ + "MD013": { + "code_block_line_length": 120, + "line_length": 120, + "heading_line_length": 80 + }, + "MD025": { "front_matter_title": ""} } \ No newline at end of file diff --git a/TimeWarp.Templates/Build/Documentation.yml b/TimeWarp.Templates/Build/Documentation.yml index e05498315..855a192ea 100644 --- a/TimeWarp.Templates/Build/Documentation.yml +++ b/TimeWarp.Templates/Build/Documentation.yml @@ -1,41 +1,41 @@ -trigger: - branches: - include: - - master - -# no PR builds -pr: none - -queue: - name: TimeWarpEnterprises - -steps: -- script: echo Build TimeWarp-Architecture Docs - -- task: CmdLine@2 - inputs: - script: 'docfx Documentation/docfx.json' - #workingDirectory: # Optional - #failOnStderr: false # Optional - -- task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: documentationSite' - inputs: - PathtoPublish: 'Documentation/_site' - ArtifactName: _site - -- task: DeleteFiles@1 - displayName: 'Delete files from ' - inputs: - Contents: ghpages - -- task: GitHubPagesPublish@1 - displayName: 'Deploy to Github pages' - inputs: - docPath: '$(System.DefaultWorkingDirectory)\Documentation\_site\*' - githubusername: 'TimeWarpEngineering' - githubemail: 'Steven.Cramer@TimeWarp.Enterprises' - githubaccesstoken: $(GitHubPersonalAccessToken) - repositoryname: 'timewarp-architecture' - branchname: 'gh-pages' - commitmessage: 'Automated Release $(Release.ReleaseId)' +trigger: + branches: + include: + - master + +# no PR builds +pr: none + +queue: + name: TimeWarpEnterprises + +steps: +- script: echo Build TimeWarp-Architecture Docs + +- task: CmdLine@2 + inputs: + script: 'docfx Documentation/docfx.json' + #workingDirectory: # Optional + #failOnStderr: false # Optional + +- task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: documentationSite' + inputs: + PathtoPublish: 'Documentation/_site' + ArtifactName: _site + +- task: DeleteFiles@1 + displayName: 'Delete files from ' + inputs: + Contents: ghpages + +- task: GitHubPagesPublish@1 + displayName: 'Deploy to Github pages' + inputs: + docPath: '$(System.DefaultWorkingDirectory)\Documentation\_site\*' + githubusername: 'TimeWarpEngineering' + githubemail: 'Steven.Cramer@TimeWarp.Enterprises' + githubaccesstoken: $(GitHubPersonalAccessToken) + repositoryname: 'timewarp-architecture' + branchname: 'gh-pages' + commitmessage: 'Automated Release $(Release.ReleaseId)' diff --git a/TimeWarp.Templates/Build/PublishToGitHubPages.ps1 b/TimeWarp.Templates/Build/PublishToGitHubPages.ps1 index 16bb0de06..2f17efe62 100644 --- a/TimeWarp.Templates/Build/PublishToGitHubPages.ps1 +++ b/TimeWarp.Templates/Build/PublishToGitHubPages.ps1 @@ -1,57 +1,57 @@ -# Display inputs. -Write-Host "DocPath:$env:DocPath" -Write-Host "GitHubUsername:$env:GitHubUsername" -Write-Host "RepositoryName:$env:RepositoryName" -Write-Host "CommitMessage:$env:CommitMessage" -Write-Host "GitHubEmailSecret:$env:GitHubEmail" -Write-Host "GitHubAccessTokenSecret:$env:GitHubAccessTokenSecret" -Write-Host "DefaultWorkingDirectory:$env:System_DefaultWorkingDirectory" - -$repoUrl = "https://$env:GitHubUsername`:$env:GitHubAccessTokenSecret" + "@github.com/$env:GitHubUsername/$env:RepositoryName.git" - -Write-Host "Cloning existing GitHub Pages branch" - -git clone $repoUrl --branch=gh-pages $env:System_DefaultWorkingDirectory\ghpages --quiet - -if ($lastexitcode -gt 0) -{ - Write-Host "##vso[task.logissue type=error;]Unable to clone repository - check username, access token and repository name. Error code $lastexitcode" - [Environment]::Exit(1) -} - -$to = "$env:System_DefaultWorkingDirectory\ghpages" - -Write-Host "Copying new documentation into branch" - -Copy-Item $env:DocPath $to -recurse -Force - -cd $env:System_DefaultWorkingDirectory\ghpages -Write-Host "config git" -git config core.autocrlf false -git config user.email $env:GitHubEmail -git config user.name $env:GitHubUsername -git config --list - -Write-Host "git add *" -git add * - -Write-Host "Committing the GitHub Pages Branch" -Write-Host "git commit -m $env:CommitMessage" -git commit -m $env:CommitMessage - -if ($lastexitcode -gt 0) -{ - Write-Host "##vso[task.logissue type=error;]Error committing - see earlier log, error code $lastexitcode" - [Environment]::Exit(1) -} - -Write-Host "git push the GitHub Pages Branch" - -git push --quiet - - -if ($lastexitcode -gt 0) -{ - Write-Host "##vso[task.logissue type=error;]Error pushing to gh-pages branch, probably an incorrect Personal Access Token, error code $lastexitcode" - [Environment]::Exit(1) -} +# Display inputs. +Write-Host "DocPath:$env:DocPath" +Write-Host "GitHubUsername:$env:GitHubUsername" +Write-Host "RepositoryName:$env:RepositoryName" +Write-Host "CommitMessage:$env:CommitMessage" +Write-Host "GitHubEmailSecret:$env:GitHubEmail" +Write-Host "GitHubAccessTokenSecret:$env:GitHubAccessTokenSecret" +Write-Host "DefaultWorkingDirectory:$env:System_DefaultWorkingDirectory" + +$repoUrl = "https://$env:GitHubUsername`:$env:GitHubAccessTokenSecret" + "@github.com/$env:GitHubUsername/$env:RepositoryName.git" + +Write-Host "Cloning existing GitHub Pages branch" + +git clone $repoUrl --branch=gh-pages $env:System_DefaultWorkingDirectory\ghpages --quiet + +if ($lastexitcode -gt 0) +{ + Write-Host "##vso[task.logissue type=error;]Unable to clone repository - check username, access token and repository name. Error code $lastexitcode" + [Environment]::Exit(1) +} + +$to = "$env:System_DefaultWorkingDirectory\ghpages" + +Write-Host "Copying new documentation into branch" + +Copy-Item $env:DocPath $to -recurse -Force + +cd $env:System_DefaultWorkingDirectory\ghpages +Write-Host "config git" +git config core.autocrlf false +git config user.email $env:GitHubEmail +git config user.name $env:GitHubUsername +git config --list + +Write-Host "git add *" +git add * + +Write-Host "Committing the GitHub Pages Branch" +Write-Host "git commit -m $env:CommitMessage" +git commit -m $env:CommitMessage + +if ($lastexitcode -gt 0) +{ + Write-Host "##vso[task.logissue type=error;]Error committing - see earlier log, error code $lastexitcode" + [Environment]::Exit(1) +} + +Write-Host "git push the GitHub Pages Branch" + +git push --quiet + + +if ($lastexitcode -gt 0) +{ + Write-Host "##vso[task.logissue type=error;]Error pushing to gh-pages branch, probably an incorrect Personal Access Token, error code $lastexitcode" + [Environment]::Exit(1) +} diff --git a/TimeWarp.Templates/Build/TimeWarp.Console.Template.yml b/TimeWarp.Templates/Build/TimeWarp.Console.Template.yml index bf6d5dc45..9f0b74148 100644 --- a/TimeWarp.Templates/Build/TimeWarp.Console.Template.yml +++ b/TimeWarp.Templates/Build/TimeWarp.Console.Template.yml @@ -1,55 +1,55 @@ -ο»Ώ# Primary output is a new Nuget Package for TimeWarp Console Templates -name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) -trigger: - branches: - include: - - master - paths: - include: - - Source/TimeWarp.Console.Template/* - -pool: - name: TimeWarpEnterprises - -variables: - Major: '5' - Minor: '0' - MajorAndMinor: '$(Major).$(Minor)' - Patch: $[counter(variables.MajorAndMinor,0)] - DotNetSdkVersion: 5.0.301 - Version: '$(Major).$(Minor).$(Patch)+$(DotNetSdkVersion)' - Configuration: debug - -steps: -- script: dotnet --version -- script: echo Version $(Version) - -- task: DotNetCoreCLI@2 - displayName: Build Timewarp Console Template projects - inputs: - command: build - projects: 'source/TimeWarp.Console.Template/**/*.csproj' - configuration: $(Configuration) - -- task: DotNetCoreCLI@2 - displayName: Test - inputs: - command: test - projects: "source/TimeWarp.Console.Template/**/*Tests/*.csproj" - configurationToPack: $(Configuration) - -- task: DotNetCoreCLI@2 - displayName: Pack into Nuget - inputs: - command: pack - packagesToPack: $(Build.SourcesDirectory)/source/TimeWarp.Console.Template/TimeWarp.Console.Template.nuspec - configurationToPack: $(Configuration) - versioningScheme: byEnvVar - versionEnvVar: Version - -- task: PublishBuildArtifacts@1 - displayName: Publish Artifact - inputs: - PathtoPublish: '$(build.artifactstagingdirectory)' - ArtifactName: drop - publishLocation: Container +ο»Ώ# Primary output is a new Nuget Package for TimeWarp Console Templates +name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) +trigger: + branches: + include: + - master + paths: + include: + - Source/TimeWarp.Console.Template/* + +pool: + name: TimeWarpEnterprises + +variables: + Major: '5' + Minor: '0' + MajorAndMinor: '$(Major).$(Minor)' + Patch: $[counter(variables.MajorAndMinor,0)] + DotNetSdkVersion: 5.0.301 + Version: '$(Major).$(Minor).$(Patch)+$(DotNetSdkVersion)' + Configuration: debug + +steps: +- script: dotnet --version +- script: echo Version $(Version) + +- task: DotNetCoreCLI@2 + displayName: Build Timewarp Console Template projects + inputs: + command: build + projects: 'source/TimeWarp.Console.Template/**/*.csproj' + configuration: $(Configuration) + +- task: DotNetCoreCLI@2 + displayName: Test + inputs: + command: test + projects: "source/TimeWarp.Console.Template/**/*Tests/*.csproj" + configurationToPack: $(Configuration) + +- task: DotNetCoreCLI@2 + displayName: Pack into Nuget + inputs: + command: pack + packagesToPack: $(Build.SourcesDirectory)/source/TimeWarp.Console.Template/TimeWarp.Console.Template.nuspec + configurationToPack: $(Configuration) + versioningScheme: byEnvVar + versionEnvVar: Version + +- task: PublishBuildArtifacts@1 + displayName: Publish Artifact + inputs: + PathtoPublish: '$(build.artifactstagingdirectory)' + ArtifactName: drop + publishLocation: Container diff --git a/TimeWarp.Templates/Directory.Build.props b/TimeWarp.Templates/Directory.Build.props index 51606e3ae..823c28e14 100644 --- a/TimeWarp.Templates/Directory.Build.props +++ b/TimeWarp.Templates/Directory.Build.props @@ -1,6 +1,6 @@ -ο»Ώ - - - Steven T. Cramer - - +ο»Ώ + + + Steven T. Cramer + + diff --git a/TimeWarp.Templates/Documentation/.gitignore b/TimeWarp.Templates/Documentation/.gitignore index 2781f6d58..4378419e7 100644 --- a/TimeWarp.Templates/Documentation/.gitignore +++ b/TimeWarp.Templates/Documentation/.gitignore @@ -1,9 +1,9 @@ -############### -# folder # -############### -/**/DROP/ -/**/TEMP/ -/**/packages/ -/**/bin/ -/**/obj/ -_site +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site diff --git a/TimeWarp.Templates/Documentation/Backlog/Todo.md b/TimeWarp.Templates/Documentation/Backlog/Todo.md index 616cf2bbb..7cf6b9c91 100644 --- a/TimeWarp.Templates/Documentation/Backlog/Todo.md +++ b/TimeWarp.Templates/Documentation/Backlog/Todo.md @@ -1,3 +1,3 @@ -- [ ] Add Javascript project to the Freeze Team template. - -- [ ] Create Pull Request template to show what each pull request should have. Investigate if I can get AzureDevOps to default to that template. This should go in the architecture template +- [ ] Add Javascript project to the Freeze Team template. + +- [ ] Create Pull Request template to show what each pull request should have. Investigate if I can get AzureDevOps to default to that template. This should go in the architecture template diff --git a/TimeWarp.Templates/Documentation/HowToRunDocfx.md b/TimeWarp.Templates/Documentation/HowToRunDocfx.md index bb36e52e6..04848faac 100644 --- a/TimeWarp.Templates/Documentation/HowToRunDocfx.md +++ b/TimeWarp.Templates/Documentation/HowToRunDocfx.md @@ -1,7 +1,7 @@ -# How to run docfx server locally - -To serve up the docs locally execute the `RunDocServer.ps1` script. - -# Reference - +# How to run docfx server locally + +To serve up the docs locally execute the `RunDocServer.ps1` script. + +# Reference + [Getting started with docfx](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html) \ No newline at end of file diff --git a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Architecture.md b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Architecture.md index 923db71ea..332718766 100644 --- a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Architecture.md +++ b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Architecture.md @@ -1,69 +1,69 @@ -Everything is subjective: - -The primary goal of the TimeWarp Architecture is to maximize the efficiency of producing impactful software. - -Lets try and break this down: - -Impactful software -: Software that has a significant effect in accomplishing a business/personal goal. - -The software isn't the goal but a means to a goal. - -Functional software -: Software that correctly produces an expect output given a set of inputs. -As an example a sort function given a list of unsorted items will return a sorted list. - -Quality software -: Software that has low to zero defects. - -* Efficiency -* Quality -* Functional -* Force Multiplier -* Flexibility - -Does quality matter? - -What is quality? - -> "When software is done right, ... Changes are simple and rapid. -> Defects are few and far between. -> Effort is minimized, and functionality and flexibility are maximized. -> -> Martin, Robert C. (2017-09-11T22:58:59). Clean Architecture (Robert C. Martin Series) . Pearson Education. Kindle Edition." - -Quality is NOT the goal impact is the goal but quality is a means to the goal. - -## "Changes are simple and rapid." - -Actor: Existing Dev or new Dev: -Test Case: Given a change request -So what would be test case for this? - -Clean Architecture is primarily about decoupling. TimeWarp architecture is also about decoupling but more. - -TimeWarp Documentation is about building and rebuilding the mental model required to accomplish a given task as quickly as possible. - -TimeWarp Mentoring is about empowering developers to bring their current and future visions into reality. - -Developer Documentation UX (DevDocX) is about transferring clarity and understanding of the holistic view and concepts so that a developer can travase their chosen path with maximum effeciency to realize their given goal. Effeciency implies reducing the time being spent on things not needed for their goal. And also transfering of information as rapidly as possible for those things needed for their goal. - -Test cases to validate TimeWarp Architecture: - -Test cases to validate DevDocX: - -Given - -Testing - -# Possible UX methods -Text based docs -Example based docs -Live Notebooks -Videos -Practice based lessons. - -There are multiple concepts at play here: -1. Teaching. Building the mental model the first time. -2. Recall. Recalling what you learned before. +Everything is subjective: + +The primary goal of the TimeWarp Architecture is to maximize the efficiency of producing impactful software. + +Lets try and break this down: + +Impactful software +: Software that has a significant effect in accomplishing a business/personal goal. + +The software isn't the goal but a means to a goal. + +Functional software +: Software that correctly produces an expect output given a set of inputs. +As an example a sort function given a list of unsorted items will return a sorted list. + +Quality software +: Software that has low to zero defects. + +* Efficiency +* Quality +* Functional +* Force Multiplier +* Flexibility + +Does quality matter? + +What is quality? + +> "When software is done right, ... Changes are simple and rapid. +> Defects are few and far between. +> Effort is minimized, and functionality and flexibility are maximized. +> +> Martin, Robert C. (2017-09-11T22:58:59). Clean Architecture (Robert C. Martin Series) . Pearson Education. Kindle Edition." + +Quality is NOT the goal impact is the goal but quality is a means to the goal. + +## "Changes are simple and rapid." + +Actor: Existing Dev or new Dev: +Test Case: Given a change request +So what would be test case for this? + +Clean Architecture is primarily about decoupling. TimeWarp architecture is also about decoupling but more. + +TimeWarp Documentation is about building and rebuilding the mental model required to accomplish a given task as quickly as possible. + +TimeWarp Mentoring is about empowering developers to bring their current and future visions into reality. + +Developer Documentation UX (DevDocX) is about transferring clarity and understanding of the holistic view and concepts so that a developer can travase their chosen path with maximum effeciency to realize their given goal. Effeciency implies reducing the time being spent on things not needed for their goal. And also transfering of information as rapidly as possible for those things needed for their goal. + +Test cases to validate TimeWarp Architecture: + +Test cases to validate DevDocX: + +Given + +Testing + +# Possible UX methods +Text based docs +Example based docs +Live Notebooks +Videos +Practice based lessons. + +There are multiple concepts at play here: +1. Teaching. Building the mental model the first time. +2. Recall. Recalling what you learned before. 3. Discovery/Expansion: Expanding on the concepts to create new ones. \ No newline at end of file diff --git a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Documentation.md b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Documentation.md index d57f15a1d..f37ef51ef 100644 --- a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Documentation.md +++ b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Documentation.md @@ -1,17 +1,17 @@ -# Documentation - -Documentation with a purpose. - -Before writing documentation, first ask what is the use case for it and -then think of a test case to validate if your docs fulfill the purpose. - -* User Documentation -* Developer Documentation -* Getting Started -* Installation -* Building -* Architecture -* File Structure -* Contributing -* Prerequisites -* Development environment setup. +# Documentation + +Documentation with a purpose. + +Before writing documentation, first ask what is the use case for it and +then think of a test case to validate if your docs fulfill the purpose. + +* User Documentation +* Developer Documentation +* Getting Started +* Installation +* Building +* Architecture +* File Structure +* Contributing +* Prerequisites +* Development environment setup. diff --git a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Features.md b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Features.md index 6cac57172..67325678a 100644 --- a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Features.md +++ b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Features.md @@ -1,18 +1,18 @@ - -* Blazor-State State Management -* Dynamic Duel Mode -* TailwindCss -* Feature Folder structure -* Entity Framework -* EF Cosmos DB -* EF SQL Server -* Integration Tests (Fixie) -* End-to-end Playwright Tests -* Tye -* YARP -* Swagger - -## Upcoming - -* Serilog -* Did Auth + +* Blazor-State State Management +* Dynamic Duel Mode +* TailwindCss +* Feature Folder structure +* Entity Framework +* EF Cosmos DB +* EF SQL Server +* Integration Tests (Fixie) +* End-to-end Playwright Tests +* Tye +* YARP +* Swagger + +## Upcoming + +* Serilog +* Did Auth diff --git a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Overview.md b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Overview.md index e9d7edc5a..13fabdf98 100644 --- a/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Overview.md +++ b/TimeWarp.Templates/Documentation/TimeWarpArchitectureTemplate/Overview.md @@ -1,116 +1,116 @@ ---- -uid: TimeWarp.Architecture.Template:Overview -title: TimeWarp Architecture ---- - -# TimeWarp Architecture - -[![NuGet](https://img.shields.io/nuget/v/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) -[![NuGet](https://img.shields.io/nuget/dt/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) - -TimeWarp Architecture is a dotnet net 6 template for creating a distributed or monolithic application. - -## Prerequisites - -* Install the **latest** [Powershell](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell) - > `winget install Microsoft.PowerShell` -* Install the latest released [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) - > trust the developer cert with - > `dotnet dev-certs https --trust` - -* Install the latest **LTS** of [Node.js ](https://nodejs.org/en/) -* Install the latest [Cosmos Db Emulator](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator?tabs=ssl-netstd21) -* Edit your powershell profile (`code $Profile`) to include the following [^1] : - -```powershell -$env:PSModulePath += ";$env:ProgramFiles\Azure Cosmos DB Emulator\PSModules" -Import-Module Microsoft.Azure.CosmosDB.Emulator -``` - -* Install Tye dotnet tool - -```console -dotnet tool install -g Microsoft.Tye --version "0.11.0-alpha.22111.1" -``` -> [!CAUTION] -> Currently Project Tye will use the latest installed SDK regardless of the `global.json` settings when building the projects. -> It will not work with Visual Studio 2022 preview 3,4 or 5. installed. -## Installation - -* Install TimeWarp Architecture Templates - -```console -dotnet new --install TimeWarp.Architecture -``` - -## Usage - -To create new solution enter the following: - -```console -dotnet new timewarp-architecture -n MyTimeWarpApp -``` - -To run the new solution change to the newly created directory. - -```console -cd .\MyTimeWarpApp\ -``` - -Execute the `Run.ps1` powershell script - -```console -./Run.ps1 -``` - -You should see the Tye Dashboard opened in your browser. - -## Technologies - -* [Dotnet 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) -* [Blazor](https://docs.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-6.0) -* [Tailwind](https://tailwindcss.com/) -* [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) -* [MediatR](https://github.com/jbogard/MediatR) -* [Automapper](https://automapper.org/) -* [FluentValidation](https://fluentvalidation.net/) -* [Fixie](https://github.com/fixie/fixie/wiki) -* [FluentAssertions](https://fluentassertions.com/) -* [Playwright](https://playwright.dev/) -* [Project Tye](https://github.com/dotnet/tye) -* [YARP](https://microsoft.github.io/reverse-proxy/) -* [Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/introduction) - -## Content - -The template creates the distributed app projects and their corresponding test projects. - -### Projects - -* Api.Contracts -* Api.Server -* Grpc.Contracts -* Grpc.Server -* Web.Server -* Web.Shared -* Web.Spa - The Blazor Single Page Application (SPA) -* Web.TypeScript - Project that contains any needed TypeScript for Web.Spa -* Yarp -* SourceCodeGenerators - -### Test Projects - -* Spa.Integration.Tests - contains integration tests for the SPA -* Server.Integration.Tests - contains integration tests for the web api -* EndToEnd.Playwright.Tests - contains TestCafe based end-to-end tests. -* TimeWarp.Testing - a shared library used for testing. -* EndToEnd.TestCafe.Tests - contains TestCafe based end-to-end tests. -* SourceCodeGenerators.Tests - -### Test Library - -TimeWarp.Testing - Share testing library. - -#### Footnotes - -[^1]: https://docs.microsoft.com/en-us/azure/cosmos-db/emulator-command-line-parameters#:%7E:text=Install%20the%20latest%20version%20of,Azure. +--- +uid: TimeWarp.Architecture.Template:Overview +title: TimeWarp Architecture +--- + +# TimeWarp Architecture + +[![NuGet](https://img.shields.io/nuget/v/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) +[![NuGet](https://img.shields.io/nuget/dt/TimeWarp.Architecture.svg)](https://www.nuget.org/packages/TimeWarp.Architecture/) + +TimeWarp Architecture is a dotnet net 6 template for creating a distributed or monolithic application. + +## Prerequisites + +* Install the **latest** [Powershell](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell) + > `winget install Microsoft.PowerShell` +* Install the latest released [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) + > trust the developer cert with + > `dotnet dev-certs https --trust` + +* Install the latest **LTS** of [Node.js ](https://nodejs.org/en/) +* Install the latest [Cosmos Db Emulator](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator?tabs=ssl-netstd21) +* Edit your powershell profile (`code $Profile`) to include the following [^1] : + +```powershell +$env:PSModulePath += ";$env:ProgramFiles\Azure Cosmos DB Emulator\PSModules" +Import-Module Microsoft.Azure.CosmosDB.Emulator +``` + +* Install Tye dotnet tool + +```console +dotnet tool install -g Microsoft.Tye --version "0.11.0-alpha.22111.1" +``` +> [!CAUTION] +> Currently Project Tye will use the latest installed SDK regardless of the `global.json` settings when building the projects. +> It will not work with Visual Studio 2022 preview 3,4 or 5. installed. +## Installation + +* Install TimeWarp Architecture Templates + +```console +dotnet new --install TimeWarp.Architecture +``` + +## Usage + +To create new solution enter the following: + +```console +dotnet new timewarp-architecture -n MyTimeWarpApp +``` + +To run the new solution change to the newly created directory. + +```console +cd .\MyTimeWarpApp\ +``` + +Execute the `Run.ps1` powershell script + +```console +./Run.ps1 +``` + +You should see the Tye Dashboard opened in your browser. + +## Technologies + +* [Dotnet 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) +* [Blazor](https://docs.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-6.0) +* [Tailwind](https://tailwindcss.com/) +* [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) +* [MediatR](https://github.com/jbogard/MediatR) +* [Automapper](https://automapper.org/) +* [FluentValidation](https://fluentvalidation.net/) +* [Fixie](https://github.com/fixie/fixie/wiki) +* [FluentAssertions](https://fluentassertions.com/) +* [Playwright](https://playwright.dev/) +* [Project Tye](https://github.com/dotnet/tye) +* [YARP](https://microsoft.github.io/reverse-proxy/) +* [Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/introduction) + +## Content + +The template creates the distributed app projects and their corresponding test projects. + +### Projects + +* Api.Contracts +* Api.Server +* Grpc.Contracts +* Grpc.Server +* Web.Server +* Web.Shared +* Web.Spa - The Blazor Single Page Application (SPA) +* Web.TypeScript - Project that contains any needed TypeScript for Web.Spa +* Yarp +* SourceCodeGenerators + +### Test Projects + +* Spa.Integration.Tests - contains integration tests for the SPA +* Server.Integration.Tests - contains integration tests for the web api +* EndToEnd.Playwright.Tests - contains TestCafe based end-to-end tests. +* TimeWarp.Testing - a shared library used for testing. +* EndToEnd.TestCafe.Tests - contains TestCafe based end-to-end tests. +* SourceCodeGenerators.Tests + +### Test Library + +TimeWarp.Testing - Share testing library. + +#### Footnotes + +[^1]: https://docs.microsoft.com/en-us/azure/cosmos-db/emulator-command-line-parameters#:%7E:text=Install%20the%20latest%20version%20of,Azure. diff --git a/TimeWarp.Templates/Documentation/TimeWarpConsoleTemplate/Overview.md b/TimeWarp.Templates/Documentation/TimeWarpConsoleTemplate/Overview.md index 6483edf80..043c27b08 100644 --- a/TimeWarp.Templates/Documentation/TimeWarpConsoleTemplate/Overview.md +++ b/TimeWarp.Templates/Documentation/TimeWarpConsoleTemplate/Overview.md @@ -1,26 +1,26 @@ ---- -uid: TimeWarp.Console.Template:Overview -title: TimeWarp Console Template Overview ---- - -# TimeWarp-Console Template - -[![NuGet](https://img.shields.io/nuget/v/TimeWarp.Console.Template.svg)](https://www.nuget.org/packages/TimeWarp.Console.Template) -[![NuGet](https://img.shields.io/nuget/dt/TimeWarp.Console.Template.svg)](https://www.nuget.org/packages/TimeWarp.Console.Template) -[![Build Status](https://timewarpenterprises.visualstudio.com/timewarp-console/_apis/build/status/TimeWarpEngineering.timewarp-console?branchName=master)](https://timewarpenterprises.visualstudio.com/timewarp-console/_build/latest?definitionId=19&branchName=master) - -Console template for dotnet core applications utilizing MediatR - -## Installation - -```console -dotnet new -i TimeWarp.Console.Templates -``` - -## Usage - -To create new solution enter the following: - -```console -dotnet new timewarp-console -n MyBlazorApp -``` +--- +uid: TimeWarp.Console.Template:Overview +title: TimeWarp Console Template Overview +--- + +# TimeWarp-Console Template + +[![NuGet](https://img.shields.io/nuget/v/TimeWarp.Console.Template.svg)](https://www.nuget.org/packages/TimeWarp.Console.Template) +[![NuGet](https://img.shields.io/nuget/dt/TimeWarp.Console.Template.svg)](https://www.nuget.org/packages/TimeWarp.Console.Template) +[![Build Status](https://timewarpenterprises.visualstudio.com/timewarp-console/_apis/build/status/TimeWarpEngineering.timewarp-console?branchName=master)](https://timewarpenterprises.visualstudio.com/timewarp-console/_build/latest?definitionId=19&branchName=master) + +Console template for dotnet core applications utilizing MediatR + +## Installation + +```console +dotnet new -i TimeWarp.Console.Templates +``` + +## Usage + +To create new solution enter the following: + +```console +dotnet new timewarp-console -n MyBlazorApp +``` diff --git a/TimeWarp.Templates/Documentation/docfx.json b/TimeWarp.Templates/Documentation/docfx.json index 660d70673..eeca0a0e1 100644 --- a/TimeWarp.Templates/Documentation/docfx.json +++ b/TimeWarp.Templates/Documentation/docfx.json @@ -1,80 +1,80 @@ -{ - "metadata": [ - { - "src": [ - { - "files": [ - - ], - "src": "../" - } - ], - "dest": "Blazor-State/api", - "disableGitFeatures": false, - "disableDefaultFilter": false - } - ], - "build": { - "content": [ - { - "files": [ - "**/**.md", - "**/**.yml" - ], - "exclude": [ "images/**", "**/Model**", "_site/**" ] - }, - { - "src":"../", - "files":[ - "*.md" - ] - } - ], - "resource": [ - { - "files": [ - "Images/**" - ] - }, - { - "src": "../", - "files": [ - "Assets/**" - ] - } - - ], - "overwrite": [ - { - "files": [ - "apidoc/**.md" - ], - "exclude": [ - "obj/**", - "_site/**" - ] - } - ], - "dest": "_site", - "globalMetadata": { - "_appFaviconPath": "Assets/Logo.png", - "_appLogoPath":"Assets/LogoResized.png" - }, - "globalMetadataFiles": [], - "fileMetadataFiles": [], - "template": [ - "default" - ], - "postProcessors": [], - "markdownEngineName": "markdig", - "markdownEngineProperties": { - "markdigExtensions": [ - "footnotes" - ] - }, - "noLangKeyword": false, - "keepFileLink": false, - "cleanupCacheHistory": false, - "disableGitFeatures": false - } +{ + "metadata": [ + { + "src": [ + { + "files": [ + + ], + "src": "../" + } + ], + "dest": "Blazor-State/api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "**/**.md", + "**/**.yml" + ], + "exclude": [ "images/**", "**/Model**", "_site/**" ] + }, + { + "src":"../", + "files":[ + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "Images/**" + ] + }, + { + "src": "../", + "files": [ + "Assets/**" + ] + } + + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadata": { + "_appFaviconPath": "Assets/Logo.png", + "_appLogoPath":"Assets/LogoResized.png" + }, + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "markdownEngineProperties": { + "markdigExtensions": [ + "footnotes" + ] + }, + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Documentation/index.md b/TimeWarp.Templates/Documentation/index.md index 9b11893f4..2703ef2de 100644 --- a/TimeWarp.Templates/Documentation/index.md +++ b/TimeWarp.Templates/Documentation/index.md @@ -1 +1 @@ -[!include[Overview](TimeWarpArchitectureTemplate/Overview.md)] +[!include[Overview](TimeWarpArchitectureTemplate/Overview.md)] diff --git a/TimeWarp.Templates/Documentation/toc.yml b/TimeWarp.Templates/Documentation/toc.yml index 1efb3566f..5a548d8e2 100644 --- a/TimeWarp.Templates/Documentation/toc.yml +++ b/TimeWarp.Templates/Documentation/toc.yml @@ -1,5 +1,5 @@ -ο»Ώ# auto-generated -- name: TimeWarp-Architecture Template Overview - topicUid: TimeWarp.Architecture.Template:Overview -- name: TimeWarp-Console Template Overview - topicUid: TimeWarp.Console.Template:Overview +ο»Ώ# auto-generated +- name: TimeWarp-Architecture Template Overview + topicUid: TimeWarp.Architecture.Template:Overview +- name: TimeWarp-Console Template Overview + topicUid: TimeWarp.Console.Template:Overview diff --git a/TimeWarp.Templates/NuGet.config b/TimeWarp.Templates/NuGet.config index 85dd6c04d..aef8c1562 100644 --- a/TimeWarp.Templates/NuGet.config +++ b/TimeWarp.Templates/NuGet.config @@ -1,10 +1,10 @@ -ο»Ώ - - - - - - - - +ο»Ώ + + + + + + + + \ No newline at end of file diff --git a/TimeWarp.Templates/RunDocServer.ps1 b/TimeWarp.Templates/RunDocServer.ps1 index 8a8fb2b6a..a849d86a4 100644 --- a/TimeWarp.Templates/RunDocServer.ps1 +++ b/TimeWarp.Templates/RunDocServer.ps1 @@ -1 +1 @@ -docfx .\Documentation\docfx.json --serve +docfx .\Documentation\docfx.json --serve diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/BuildAndInstallTemplate.ps1 b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/BuildAndInstallTemplate.ps1 index 40b0a955f..b5281c2f2 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/BuildAndInstallTemplate.ps1 +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/BuildAndInstallTemplate.ps1 @@ -1,13 +1,13 @@ -# Save the current location -Push-Location $PSScriptRoot - -try { - $Version = '10.2.3' - dotnet pack .\TimeWarp.Architecture.csproj -o . /p:PackageVersion=$Version - dotnet new uninstall TimeWarp.Architecture - dotnet new install TimeWarp.Architecture.$Version.nupkg -} -finally { - # Always restore the original location, even if an error occurs - Pop-Location +# Save the current location +Push-Location $PSScriptRoot + +try { + $Version = '10.2.3' + dotnet pack .\TimeWarp.Architecture.csproj -o . /p:PackageVersion=$Version + dotnet new uninstall TimeWarp.Architecture + dotnet new install TimeWarp.Architecture.$Version.nupkg +} +finally { + # Always restore the original location, even if an error occurs + Pop-Location } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.props b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.props index de88e4060..27cd91b15 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.props +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.props @@ -1,18 +1,18 @@ - - - Steven T. Cramer - TimeWarp.Blazor - https://github.com/TimeWarpEngineering/timewarp-architecture/raw/master/Assets/Logo.png - https://timewarpengineering.github.io/timewarp-architecture/TimeWarpArchitectureTemplate/Overview.html - Microsoft ASP.NET Core Blazor State Blazor-State MediatR Mediator Pipeline Redux - TODO - https://github.com/TimeWarpEngineering/timewarp-architecture.git - git - true - - - - false - - - + + + Steven T. Cramer + TimeWarp.Blazor + https://github.com/TimeWarpEngineering/timewarp-architecture/raw/master/Assets/Logo.png + https://timewarpengineering.github.io/timewarp-architecture/TimeWarpArchitectureTemplate/Overview.html + Microsoft ASP.NET Core Blazor State Blazor-State MediatR Mediator Pipeline Redux + TODO + https://github.com/TimeWarpEngineering/timewarp-architecture.git + git + true + + + + false + + + diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.targets b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.targets index 79342b89e..3a11a51bf 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.targets +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/Directory.Build.targets @@ -1,6 +1,6 @@ - - - false - false - - + + + false + false + + diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/TimeWarp.Architecture.csproj b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/TimeWarp.Architecture.csproj index 1a17e7680..52a7832a3 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/TimeWarp.Architecture.csproj +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/TimeWarp.Architecture.csproj @@ -1,49 +1,49 @@ -ο»Ώ - - - Template - TimeWarp.Architecture - 2.0.0-alpha.11+9.0.300 - Unlicense - TimeWarp Architecture - Steven T. Cramer - TimeWarp Architecture Templates - dotnet-new;templates;aspnet;blazor;spa;pwa;timewarp;gRPC;Tye;Aspire;YARP;Clean Architecture;Domain Driven Design - Logo.png - ReadMe.md - true - net9.0 - true - false - content - true - true - - - - - - - - - - - - - - - - - - True - \ - - - - - +ο»Ώ + + + Template + TimeWarp.Architecture + 2.0.0-alpha.11+9.0.300 + Unlicense + TimeWarp Architecture + Steven T. Cramer + TimeWarp Architecture Templates + dotnet-new;templates;aspnet;blazor;spa;pwa;timewarp;gRPC;Tye;Aspire;YARP;Clean Architecture;Domain Driven Design + Logo.png + ReadMe.md + true + net9.0 + true + false + content + true + true + + + + + + + + + + + + + + + + + + True + \ + + + + + diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/global.json b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/global.json index 5500b56e1..dff1ca08d 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/global.json +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/global.json @@ -1,6 +1,6 @@ -{ - "sdk": { - "version": "9.0.300", - "rollForward": "latestMinor" - } +{ + "sdk": { + "version": "9.0.300", + "rollForward": "latestMinor" + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.props b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.props index 54f0e35d6..27d23a2dc 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.props +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.props @@ -1,2 +1,2 @@ - - + + diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.targets b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.targets index ad8076fe6..49d1bd634 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.targets +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Directory.Build.targets @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/.template.config/template.json b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/.template.config/template.json index 4eb47a2ca..e43a6dc80 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/.template.config/template.json +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/.template.config/template.json @@ -1,47 +1,47 @@ -{ - "$schema": "http://json.schemastore.org/template", - "author": "Steven T. Cramer", - "classifications": [ - "TimeWarp", - "Web", - "Blazor", - "Hosted", - "Feature", - "Action" - ], - "name": "TimeWarp Feature Action", - "groupIdentity": "TimeWarp.Feature.Action", - "identity": "TimeWarp.Feature.Action", - "preferNameDirectory": false, - "shortName": "timewarp-feature-action", - "description": "Template for adding actions to timewarp-blazor.", - "symbols": { - "ActionName": { - "type": "parameter", - "isRequired": true, - "datatype": "text", - "description": "Specify the name of the action ", - "FileRename": "__ActionName__", - "replaces": "__ActionName__" - }, - "RootNamespace": { - "type": "parameter", - "isRequired": true, - "description": "The first part of namespace ", - "datatype": "text", - "replaces": "__RootNamespace__" - }, - "FeatureName": { - "type": "parameter", - "isRequired": true, - "description": "The last part of the namespace .Features.", - "datatype": "text", - "replaces": "__FeatureName__", - "FileRename": "__FeatureName__" - } - }, - "tags": { - "language": "C#", - "type": "item" - } +{ + "$schema": "http://json.schemastore.org/template", + "author": "Steven T. Cramer", + "classifications": [ + "TimeWarp", + "Web", + "Blazor", + "Hosted", + "Feature", + "Action" + ], + "name": "TimeWarp Feature Action", + "groupIdentity": "TimeWarp.Feature.Action", + "identity": "TimeWarp.Feature.Action", + "preferNameDirectory": false, + "shortName": "timewarp-feature-action", + "description": "Template for adding actions to timewarp-blazor.", + "symbols": { + "ActionName": { + "type": "parameter", + "isRequired": true, + "datatype": "text", + "description": "Specify the name of the action ", + "FileRename": "__ActionName__", + "replaces": "__ActionName__" + }, + "RootNamespace": { + "type": "parameter", + "isRequired": true, + "description": "The first part of namespace ", + "datatype": "text", + "replaces": "__RootNamespace__" + }, + "FeatureName": { + "type": "parameter", + "isRequired": true, + "description": "The last part of the namespace .Features.", + "datatype": "text", + "replaces": "__FeatureName__", + "FileRename": "__FeatureName__" + } + }, + "tags": { + "language": "C#", + "type": "item" + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Clone_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Clone_Tests.cs index 3cd456468..175600bc5 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Clone_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Clone_Tests.cs @@ -1,27 +1,27 @@ -namespace __FeatureName__State -{ - using AnyClone; - using Shouldly; - using HobbyAnime.Client.Integration.Tests.Infrastructure; - using HobbyAnime.Features.__FeatureName__s; - - public class Clone_Should : BaseTest - { - private __FeatureName__State __FeatureName__State => Store.GetState<__FeatureName__State>(); - - public Clone_Should(ClientHost aWebAssemblyHost) : base(aWebAssemblyHost) { } - - public void Clone() - { - //Arrange - __FeatureName__State.Initialize(aPageIndex: 15); - - //Act - var clone = __FeatureName__State.Clone() as __FeatureName__State; - - //Assert - __FeatureName__State.ShouldNotBeSameAs(clone); - __FeatureName__State.PageIndex.ShouldBe(clone.PageIndex); - } - } -} +namespace __FeatureName__State +{ + using AnyClone; + using Shouldly; + using HobbyAnime.Client.Integration.Tests.Infrastructure; + using HobbyAnime.Features.__FeatureName__s; + + public class Clone_Should : BaseTest + { + private __FeatureName__State __FeatureName__State => Store.GetState<__FeatureName__State>(); + + public Clone_Should(ClientHost aWebAssemblyHost) : base(aWebAssemblyHost) { } + + public void Clone() + { + //Arrange + __FeatureName__State.Initialize(aPageIndex: 15); + + //Act + var clone = __FeatureName__State.Clone() as __FeatureName__State; + + //Assert + __FeatureName__State.ShouldNotBeSameAs(clone); + __FeatureName__State.PageIndex.ShouldBe(clone.PageIndex); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Tests.cs index a0ac32f50..ca172dbbc 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client.Tests/__FeatureName___State___ActionName___Tests.cs @@ -1,49 +1,49 @@ -namespace __FeatureName__State -{ - using Shouldly; - using System.Threading.Tasks; - using HobbyAnime.Client.Integration.Tests.Infrastructure; - using HobbyAnime.Features.__FeatureName__s; - using static HobbyAnime.Features.__FeatureName__s.__FeatureName__State; - - public class __ActionName__Action_Should : BaseTest - { - private __FeatureName__State __FeatureName__State => Store.GetState<__FeatureName__State>(); - - public __ActionName__Action_Should(ClientHost aWebAssemblyHost) : base(aWebAssemblyHost) { } - - public async Task Decrement_PageIndex_Given_NegativeAmount() - { - //Arrange - CounterState.Initialize(aPageIndex: 15); - - var incrementPageIndexRequest = new __ActionName__Action - { - PageIndex = -2 - }; - - //Act - await Send(incrementPageIndexRequest); - - //Assert - __FeatureName__State.PageIndex.ShouldBe(13); - } - - public async Task Increment_PageIndex() - { - //Arrange - __FeatureName__State.Initialize(aPageIndex: 22); - - var incrementPageIndexRequest = new __ActionName__Action - { - PageIndex = 5 - }; - - //Act - await Send(incrementPageIndexRequest); - - //Assert - CounterState.PageIndex.ShouldBe(27); - } - } -} +namespace __FeatureName__State +{ + using Shouldly; + using System.Threading.Tasks; + using HobbyAnime.Client.Integration.Tests.Infrastructure; + using HobbyAnime.Features.__FeatureName__s; + using static HobbyAnime.Features.__FeatureName__s.__FeatureName__State; + + public class __ActionName__Action_Should : BaseTest + { + private __FeatureName__State __FeatureName__State => Store.GetState<__FeatureName__State>(); + + public __ActionName__Action_Should(ClientHost aWebAssemblyHost) : base(aWebAssemblyHost) { } + + public async Task Decrement_PageIndex_Given_NegativeAmount() + { + //Arrange + CounterState.Initialize(aPageIndex: 15); + + var incrementPageIndexRequest = new __ActionName__Action + { + PageIndex = -2 + }; + + //Act + await Send(incrementPageIndexRequest); + + //Assert + __FeatureName__State.PageIndex.ShouldBe(13); + } + + public async Task Increment_PageIndex() + { + //Arrange + __FeatureName__State.Initialize(aPageIndex: 22); + + var incrementPageIndexRequest = new __ActionName__Action + { + PageIndex = 5 + }; + + //Act + await Send(incrementPageIndexRequest); + + //Assert + CounterState.PageIndex.ShouldBe(27); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Action.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Action.cs index 8f96f7833..a1c65f082 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Action.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Action.cs @@ -1,13 +1,13 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using __RootNamespace__.Features.Bases; - - internal partial class __FeatureName__State - { - public class __ActionName__Action : BaseAction { - - public int IncreasePageIndex { get; set; } - - } - } +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using __RootNamespace__.Features.Bases; + + internal partial class __FeatureName__State + { + public class __ActionName__Action : BaseAction { + + public int IncreasePageIndex { get; set; } + + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Handler.cs index f9176d0f8..154b66946 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/Client/__ActionName__/__ActionName__Handler.cs @@ -1,28 +1,28 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using BlazorState; - using MediatR; - using System.Threading; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - using System.Linq; - using System; - - internal partial class __FeatureName__sState - { - public class __ActionName__Handler : BaseHandler<__ActionName__Action> - { - public __ActionName__Handler(IStore aStore) : base(aStore) { } - - public override async Task Handle - ( - __ActionName__Action a__ActionName__Action, - CancellationToken aCancellationToken - ) - { - __FeatureName__State.PageIndex = a__ActionName__Action.IncreasePageIndex; - return Unit.Value; - } - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using BlazorState; + using MediatR; + using System.Threading; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + using System.Linq; + using System; + + internal partial class __FeatureName__sState + { + public class __ActionName__Handler : BaseHandler<__ActionName__Action> + { + public __ActionName__Handler(IStore aStore) : base(aStore) { } + + public override async Task Handle + ( + __ActionName__Action a__ActionName__Action, + CancellationToken aCancellationToken + ) + { + __FeatureName__State.PageIndex = a__ActionName__Action.IncreasePageIndex; + return Unit.Value; + } + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/MoveIntoProjects.ps1 b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/MoveIntoProjects.ps1 index 6e3da21d3..9de329a47 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/MoveIntoProjects.ps1 +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Action/GeneratedCode/MoveIntoProjects.ps1 @@ -1,11 +1,11 @@ -ο»Ώ$FeatureName = "__FeatureName__" - - -$ClientFeaturePath = "..\Source\Client\Features\$FeatureName\Actions" -$ClientTestPath = "..\Tests\Client.Integration.Tests\Features\$FeatureName" - -New-Item -ItemType Directory -Force -Path $ClientFeaturePath -New-Item -ItemType Directory -Force -Path $ClientTestPath - -Move-Item "Client\*" -Destination $ClientFeaturePath +ο»Ώ$FeatureName = "__FeatureName__" + + +$ClientFeaturePath = "..\Source\Client\Features\$FeatureName\Actions" +$ClientTestPath = "..\Tests\Client.Integration.Tests\Features\$FeatureName" + +New-Item -ItemType Directory -Force -Path $ClientFeaturePath +New-Item -ItemType Directory -Force -Path $ClientTestPath + +Move-Item "Client\*" -Destination $ClientFeaturePath Move-Item "Client.Tests\*" -Destination $ClientTestPath \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/.template.config/template.json b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/.template.config/template.json index 5f0ae99c0..fb32d91c9 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/.template.config/template.json +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/.template.config/template.json @@ -1,40 +1,40 @@ -{ - "$schema": "http://json.schemastore.org/template", - "author": "Mike Yoshino", - "classifications": [ - "TimeWarp", - "Web", - "Blazor", - "Hosted", - "Feature", - "CRUD" - ], - "name": "TimeWarp Feature CRUD", - "groupIdentity": "TimeWarp.Feature.Crud", - "identity": "TimeWarp.Feature.Crud", - "preferNameDirectory": false, - "shortName": "timewarp-feature-Crud", - "defaultName": "GeneratedCode", - - "symbols": { - "FeatureName": { - "type": "parameter", - "isRequired": true, - "description": "Specify Feature Name ", - "datatype": "text", - "replaces": "__FeatureName__", - "FileRename": "__FeatureName__" - }, - "RootNamespace": { - "type": "parameter", - "isRequired": true, - "description": "The first portion of the namespace .Features.", - "datatype": "text", - "replaces": "__RootNamespace__" - } - }, - "tags": { - "language": "C#", - "type": "item" - } +{ + "$schema": "http://json.schemastore.org/template", + "author": "Mike Yoshino", + "classifications": [ + "TimeWarp", + "Web", + "Blazor", + "Hosted", + "Feature", + "CRUD" + ], + "name": "TimeWarp Feature CRUD", + "groupIdentity": "TimeWarp.Feature.Crud", + "identity": "TimeWarp.Feature.Crud", + "preferNameDirectory": false, + "shortName": "timewarp-feature-Crud", + "defaultName": "GeneratedCode", + + "symbols": { + "FeatureName": { + "type": "parameter", + "isRequired": true, + "description": "Specify Feature Name ", + "datatype": "text", + "replaces": "__FeatureName__", + "FileRename": "__FeatureName__" + }, + "RootNamespace": { + "type": "parameter", + "isRequired": true, + "description": "The first portion of the namespace .Features.", + "datatype": "text", + "replaces": "__RootNamespace__" + } + }, + "tags": { + "language": "C#", + "type": "item" + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/MoveIntoProjects.ps1 b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/MoveIntoProjects.ps1 index c29bcd465..1cc7a145b 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/MoveIntoProjects.ps1 +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/MoveIntoProjects.ps1 @@ -1,23 +1,23 @@ -ο»Ώ$FeatureName = "__FeatureName__" - -$ApiFeaturePath = "..\Source\Api\Features\$FeatureName" -$ClientFeaturePath = "..\Source\Client\Features\$FeatureName" -$ServerDataPath = "..\Source\Server\DataAccess" -$ServerFeaturePath = "..\Source\Server\Features" -$ServerMapperPath = "..\Source\Server\Mappers" -$ServerModelPath = "..\Source\Server\Models" -$ServerTestsPath = "..\Tests\Server.Integration.Tests\Features\$FeatureName\$RequestName" - -New-Item -ItemType Directory -Force -Path $ApiFeaturePath -New-Item -ItemType Directory -Force -Path $ClientFeaturePath -New-Item -ItemType Directory -Force -Path $ServerTestsPath -New-Item -ItemType Directory -Force -Path $ServerMapperPath -New-Item -ItemType Directory -Force -Path $ServerModelPath -New-Item -ItemType Directory -Force -Path $ServerDataPath - -Move-Item "Source\Api\Features\*" -Destination $ApiFeaturePath -Move-Item "Source\Client\*" -Destination $ClientFeaturePath -Move-Item "Source\Server\Data\*" -Destination $ServerDataPath -Move-Item "Source\Server\Features\*" -Destination $ServerFeaturePath -Move-Item "Source\Server\Mappers\*" -Destination $ServerMapperPath +ο»Ώ$FeatureName = "__FeatureName__" + +$ApiFeaturePath = "..\Source\Api\Features\$FeatureName" +$ClientFeaturePath = "..\Source\Client\Features\$FeatureName" +$ServerDataPath = "..\Source\Server\DataAccess" +$ServerFeaturePath = "..\Source\Server\Features" +$ServerMapperPath = "..\Source\Server\Mappers" +$ServerModelPath = "..\Source\Server\Models" +$ServerTestsPath = "..\Tests\Server.Integration.Tests\Features\$FeatureName\$RequestName" + +New-Item -ItemType Directory -Force -Path $ApiFeaturePath +New-Item -ItemType Directory -Force -Path $ClientFeaturePath +New-Item -ItemType Directory -Force -Path $ServerTestsPath +New-Item -ItemType Directory -Force -Path $ServerMapperPath +New-Item -ItemType Directory -Force -Path $ServerModelPath +New-Item -ItemType Directory -Force -Path $ServerDataPath + +Move-Item "Source\Api\Features\*" -Destination $ApiFeaturePath +Move-Item "Source\Client\*" -Destination $ClientFeaturePath +Move-Item "Source\Server\Data\*" -Destination $ServerDataPath +Move-Item "Source\Server\Features\*" -Destination $ServerFeaturePath +Move-Item "Source\Server\Mappers\*" -Destination $ServerMapperPath Move-Item "Source\Server\Models\*" -Destination $ServerModelPath \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Request.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Request.cs index 08d77ec8d..100c1a172 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Request.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Request.cs @@ -1,18 +1,18 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using __RootNamespace__.Features.Bases; - - public class Delete__FeatureName__Request : BaseApiRequest, IRequest - { - public const string RouteTemplate = "api/__FeatureName__s/Delete"; - - /// - /// Guid ID uses to identify product item that you want to delete. - /// - /// efd66079-23a4-4166-a806-08d8de1257c1 - public string ItemId { get; set; } - - internal override string GetRoute() => $"{RouteTemplate}?{nameof(ItemId)}={ItemId}"; - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using __RootNamespace__.Features.Bases; + + public class Delete__FeatureName__Request : BaseApiRequest, IRequest + { + public const string RouteTemplate = "api/__FeatureName__s/Delete"; + + /// + /// Guid ID uses to identify product item that you want to delete. + /// + /// efd66079-23a4-4166-a806-08d8de1257c1 + public string ItemId { get; set; } + + internal override string GetRoute() => $"{RouteTemplate}?{nameof(ItemId)}={ItemId}"; + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__RequestValidator.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__RequestValidator.cs index 713dd3560..b1b0f63cc 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__RequestValidator.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__RequestValidator.cs @@ -1,39 +1,39 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using FluentValidation; - - public class Delete__FeatureName__RequestValidator : AbstractValidator - { - - public Delete__FeatureName__RequestValidator() - { - - // Declare message as const here. Or could use an injected Language Service - - // public const string InsufficentFundsMessage = "You can not send more than your balance"; - // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; - - RuleFor(aDelete__FeatureName__Request => aDelete__FeatureName__Request.ItemId) - .NotEmpty(); - - // https://docs.fluentvalidation.net/ - // Example Rules - - // RuleFor(aSendAction => aSendAction.Fee) - // .NotEmpty(); - - // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) - // .Must(aToken => validTokens.Contains(aToken)); - - // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) - // .Equal(UsdCurrencyCode.ToLower()); - - // RuleFor(aSendAction => aSendAction) - // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) - // .WithMessage(InsufficentFundsMessage) - // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) - // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) - // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); - } - } +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using FluentValidation; + + public class Delete__FeatureName__RequestValidator : AbstractValidator + { + + public Delete__FeatureName__RequestValidator() + { + + // Declare message as const here. Or could use an injected Language Service + + // public const string InsufficentFundsMessage = "You can not send more than your balance"; + // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; + + RuleFor(aDelete__FeatureName__Request => aDelete__FeatureName__Request.ItemId) + .NotEmpty(); + + // https://docs.fluentvalidation.net/ + // Example Rules + + // RuleFor(aSendAction => aSendAction.Fee) + // .NotEmpty(); + + // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) + // .Must(aToken => validTokens.Contains(aToken)); + + // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) + // .Equal(UsdCurrencyCode.ToLower()); + + // RuleFor(aSendAction => aSendAction) + // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) + // .WithMessage(InsufficentFundsMessage) + // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) + // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) + // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Response.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Response.cs index f1851f2e1..0093c4adc 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Response.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Delete__FeatureName__/Delete__FeatureName__Response.cs @@ -1,13 +1,13 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using System; - using System.Collections.Generic; - using __RootNamespace__.Features.Bases; - - public class Delete__FeatureName__Response : BaseResponse - { - public Delete__FeatureName__Response() { } - - public Delete__FeatureName__Response() : base() { } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using System; + using System.Collections.Generic; + using __RootNamespace__.Features.Bases; + + public class Delete__FeatureName__Response : BaseResponse + { + public Delete__FeatureName__Response() { } + + public Delete__FeatureName__Response() : base() { } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/FeatureAnnotations.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/FeatureAnnotations.cs index 3b2e6a297..44a2c70b6 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/FeatureAnnotations.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/FeatureAnnotations.cs @@ -1,7 +1,7 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - public static class FeatureAnnotations - { - public const string FeatureGroup = "__FeatureName__"; - } -} +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + public static class FeatureAnnotations + { + public const string FeatureGroup = "__FeatureName__"; + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Request.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Request.cs index 778e99c67..6b6e39f9e 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Request.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Request.cs @@ -1,24 +1,24 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using __RootNamespace__.Features.Bases; - - public class GetAll__FeatureName__Request : BaseApiRequest, IRequest - { - public const string RouteTemplate = "api/__FeatureName__s/GetAll"; - - /// - /// Number of items that display in one page. - /// - /// 5 - public int PageSize { get; set; } - - /// - /// Number of pages for displaying items. - /// - /// 1 - public int PageIndex { get; set; } - - internal override string GetRoute() => $"{RouteTemplate}?{nameof(PageIndex)}={PageIndex}?{nameof(PageSize)}={PageSize}"; - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using __RootNamespace__.Features.Bases; + + public class GetAll__FeatureName__Request : BaseApiRequest, IRequest + { + public const string RouteTemplate = "api/__FeatureName__s/GetAll"; + + /// + /// Number of items that display in one page. + /// + /// 5 + public int PageSize { get; set; } + + /// + /// Number of pages for displaying items. + /// + /// 1 + public int PageIndex { get; set; } + + internal override string GetRoute() => $"{RouteTemplate}?{nameof(PageIndex)}={PageIndex}?{nameof(PageSize)}={PageSize}"; + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__RequestValidator.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__RequestValidator.cs index ef2939cbc..6152916ac 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__RequestValidator.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__RequestValidator.cs @@ -1,39 +1,39 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using FluentValidation; - - public class GetAll__FeatureName__RequestValidator : AbstractValidator - { - - public GetAll__FeatureName__RequestValidator() - { - - // Declare message as const here. Or could use an injected Language Service - - // public const string InsufficentFundsMessage = "You can not send more than your balance"; - // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; - - //RuleFor(a__FeatureName__Request => a__FeatureName__Request.PageIndex) - // .NotEmpty(); - - // https://docs.fluentvalidation.net/ - // Example Rules - - // RuleFor(aSendAction => aSendAction.Fee) - // .NotEmpty(); - - // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) - // .Must(aToken => validTokens.Contains(aToken)); - - // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) - // .Equal(UsdCurrencyCode.ToLower()); - - // RuleFor(aSendAction => aSendAction) - // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) - // .WithMessage(InsufficentFundsMessage) - // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) - // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) - // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); - } - } +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using FluentValidation; + + public class GetAll__FeatureName__RequestValidator : AbstractValidator + { + + public GetAll__FeatureName__RequestValidator() + { + + // Declare message as const here. Or could use an injected Language Service + + // public const string InsufficentFundsMessage = "You can not send more than your balance"; + // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; + + //RuleFor(a__FeatureName__Request => a__FeatureName__Request.PageIndex) + // .NotEmpty(); + + // https://docs.fluentvalidation.net/ + // Example Rules + + // RuleFor(aSendAction => aSendAction.Fee) + // .NotEmpty(); + + // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) + // .Must(aToken => validTokens.Contains(aToken)); + + // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) + // .Equal(UsdCurrencyCode.ToLower()); + + // RuleFor(aSendAction => aSendAction) + // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) + // .WithMessage(InsufficentFundsMessage) + // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) + // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) + // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Response.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Response.cs index 70cf66404..c03d8c906 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Response.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetAll__FeatureName__/GetAll__FeatureName__Response.cs @@ -1,14 +1,14 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using System; - using System.Collections.Generic; - using __RootNamespace__.Features.Bases; - - public class GetAll__FeatureName__Response : BaseResponse - { - public List<__FeatureName__Dto> __FeatureName__s { get; set; } - public GetAll__FeatureName__Response() { } - - public GetAll__FeatureName__Response() : base() { } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using System; + using System.Collections.Generic; + using __RootNamespace__.Features.Bases; + + public class GetAll__FeatureName__Response : BaseResponse + { + public List<__FeatureName__Dto> __FeatureName__s { get; set; } + public GetAll__FeatureName__Response() { } + + public GetAll__FeatureName__Response() : base() { } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Request.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Request.cs index a46f44ee3..c36a93abb 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Request.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Request.cs @@ -1,19 +1,19 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using System; - using __RootNamespace__.Features.Bases; - - public class GetById__FeatureName__Request : BaseApiRequest, IRequest - { - public const string RouteTemplate = "api/__FeatureName__s/Get"; - - /// - /// Guid ID for individual item. - /// - /// 82b85a2c-c5e4-4306-a803-08d8de1257c1 - public Guid Id { get; set; } - - internal override string GetRoute() => $"{RouteTemplate}?{nameof(Id)}={Id}"; - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using System; + using __RootNamespace__.Features.Bases; + + public class GetById__FeatureName__Request : BaseApiRequest, IRequest + { + public const string RouteTemplate = "api/__FeatureName__s/Get"; + + /// + /// Guid ID for individual item. + /// + /// 82b85a2c-c5e4-4306-a803-08d8de1257c1 + public Guid Id { get; set; } + + internal override string GetRoute() => $"{RouteTemplate}?{nameof(Id)}={Id}"; + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__RequestValidator.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__RequestValidator.cs index 6dea9eb2f..80f2bce1c 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__RequestValidator.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__RequestValidator.cs @@ -1,38 +1,38 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using FluentValidation; - - public class GetById__FeatureName__RequestValidator : AbstractValidator - { - - public GetById__FeatureName__RequestValidator() - { - - // Declare message as const here. Or could use an injected Language Service - - // public const string InsufficentFundsMessage = "You can not send more than your balance"; - // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; - - RuleFor(aGetById__FeatureName__Request => aGetById__FeatureName__Request.Id).NotEmpty(); - - // https://docs.fluentvalidation.net/ - // Example Rules - - // RuleFor(aSendAction => aSendAction.Fee) - // .NotEmpty(); - - // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) - // .Must(aToken => validTokens.Contains(aToken)); - - // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) - // .Equal(UsdCurrencyCode.ToLower()); - - // RuleFor(aSendAction => aSendAction) - // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) - // .WithMessage(InsufficentFundsMessage) - // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) - // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) - // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); - } - } +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using FluentValidation; + + public class GetById__FeatureName__RequestValidator : AbstractValidator + { + + public GetById__FeatureName__RequestValidator() + { + + // Declare message as const here. Or could use an injected Language Service + + // public const string InsufficentFundsMessage = "You can not send more than your balance"; + // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; + + RuleFor(aGetById__FeatureName__Request => aGetById__FeatureName__Request.Id).NotEmpty(); + + // https://docs.fluentvalidation.net/ + // Example Rules + + // RuleFor(aSendAction => aSendAction.Fee) + // .NotEmpty(); + + // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) + // .Must(aToken => validTokens.Contains(aToken)); + + // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) + // .Equal(UsdCurrencyCode.ToLower()); + + // RuleFor(aSendAction => aSendAction) + // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) + // .WithMessage(InsufficentFundsMessage) + // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) + // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) + // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Response.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Response.cs index dde0bb7e2..d2bbad1dc 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Response.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/GetById__FeatureName__/GetById__FeatureName__Response.cs @@ -1,14 +1,14 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using System; - using System.Collections.Generic; - using __RootNamespace__.Features.Bases; - - public class GetById__FeatureName__Response : BaseResponse - { - public __FeatureName__Dto __FeatureName__ { get; set; } - public GetById__FeatureName__Response() { } - - public GetById__FeatureName__Response() : base() { } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using System; + using System.Collections.Generic; + using __RootNamespace__.Features.Bases; + + public class GetById__FeatureName__Response : BaseResponse + { + public __FeatureName__Dto __FeatureName__ { get; set; } + public GetById__FeatureName__Response() { } + + public GetById__FeatureName__Response() : base() { } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Request.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Request.cs index fab7bb6d8..88b63b385 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Request.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Request.cs @@ -1,30 +1,30 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using __RootNamespace__.Features.Bases; - using System; - - public class Upsert__FeatureName__Request : BaseApiRequest, IRequest - { - public const string RouteTemplate = "api/__FeatureName__s/Upsert"; - public Guid Id { get; set; } - /// - /// Name of the Item - /// - /// Super Cool Item - public string Name { get; set; } - /// - /// Description of the Item - /// - /// Super cool thing. - public string Description { get; set; } - - /// - /// The Price of the Item - /// - /// 999.99 - public decimal Price { get; set; } - - internal override string GetRoute() => $"{RouteTemplate}?{nameof(Id)}={Id}"; - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using __RootNamespace__.Features.Bases; + using System; + + public class Upsert__FeatureName__Request : BaseApiRequest, IRequest + { + public const string RouteTemplate = "api/__FeatureName__s/Upsert"; + public Guid Id { get; set; } + /// + /// Name of the Item + /// + /// Super Cool Item + public string Name { get; set; } + /// + /// Description of the Item + /// + /// Super cool thing. + public string Description { get; set; } + + /// + /// The Price of the Item + /// + /// 999.99 + public decimal Price { get; set; } + + internal override string GetRoute() => $"{RouteTemplate}?{nameof(Id)}={Id}"; + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__RequestValidator.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__RequestValidator.cs index ed3572290..23d105bec 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__RequestValidator.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__RequestValidator.cs @@ -1,41 +1,41 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using FluentValidation; - - public class Upsert__FeatureName__RequestValidator : AbstractValidator - { - - public Upsert__FeatureName__RequestValidator() - { - - // Declare message as const here. Or could use an injected Language Service - - // public const string InsufficentFundsMessage = "You can not send more than your balance"; - // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; - - RuleFor(aUpsert__FeatureName__Request => aUpsert__FeatureName__Request.Price) - .NotEmpty().GreaterThan(0); - RuleFor(aUpsert__FeatureName__Request => aUpsert__FeatureName__Request.Name) - .NotEmpty().MinimumLength(2); - - // https://docs.fluentvalidation.net/ - // Example Rules - - // RuleFor(aSendAction => aSendAction.Fee) - // .NotEmpty(); - - // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) - // .Must(aToken => validTokens.Contains(aToken)); - - // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) - // .Equal(UsdCurrencyCode.ToLower()); - - // RuleFor(aSendAction => aSendAction) - // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) - // .WithMessage(InsufficentFundsMessage) - // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) - // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) - // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); - } - } +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using FluentValidation; + + public class Upsert__FeatureName__RequestValidator : AbstractValidator + { + + public Upsert__FeatureName__RequestValidator() + { + + // Declare message as const here. Or could use an injected Language Service + + // public const string InsufficentFundsMessage = "You can not send more than your balance"; + // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; + + RuleFor(aUpsert__FeatureName__Request => aUpsert__FeatureName__Request.Price) + .NotEmpty().GreaterThan(0); + RuleFor(aUpsert__FeatureName__Request => aUpsert__FeatureName__Request.Name) + .NotEmpty().MinimumLength(2); + + // https://docs.fluentvalidation.net/ + // Example Rules + + // RuleFor(aSendAction => aSendAction.Fee) + // .NotEmpty(); + + // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) + // .Must(aToken => validTokens.Contains(aToken)); + + // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) + // .Equal(UsdCurrencyCode.ToLower()); + + // RuleFor(aSendAction => aSendAction) + // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) + // .WithMessage(InsufficentFundsMessage) + // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) + // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) + // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Response.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Response.cs index 8a7e1262f..36a5f7fe9 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Response.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/Upsert__FeatureName__/Upsert__FeatureName__Response.cs @@ -1,13 +1,13 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using System; - using System.Collections.Generic; - using __RootNamespace__.Features.Bases; - - public class Upsert__FeatureName__Response : BaseResponse - { - public Upsert__FeatureName__Response() { } - - public Upsert__FeatureName__Response() : base() { } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using System; + using System.Collections.Generic; + using __RootNamespace__.Features.Bases; + + public class Upsert__FeatureName__Response : BaseResponse + { + public Upsert__FeatureName__Response() { } + + public Upsert__FeatureName__Response() : base() { } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/__FeatureName__Dto.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/__FeatureName__Dto.cs index 703739459..5991199d3 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/__FeatureName__Dto.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Api/Features/__FeatureName__Dto.cs @@ -1,24 +1,24 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using System; - public class __FeatureName__Dto - { - public Guid Id { get; set; } - public string Name { get; set; } - public string Description { get; set; } - public decimal Price { get; set; } - - public __FeatureName__Dto(){ } - public __FeatureName__Dto - ( - string aDescription, - string aName, - decimal aPrice - ) - { - Description = aDescription; - Name = aName; - Price = aPrice; - } - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using System; + public class __FeatureName__Dto + { + public Guid Id { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public decimal Price { get; set; } + + public __FeatureName__Dto(){ } + public __FeatureName__Dto + ( + string aDescription, + string aName, + decimal aPrice + ) + { + Description = aDescription; + Name = aName; + Price = aPrice; + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Action.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Action.cs index 00cb9c1c1..d898b6b6d 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Action.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Action.cs @@ -1,12 +1,12 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using __RootNamespace__.Features.Bases; - - internal partial class __FeatureName__State - { - public class Create__FeatureName__Action : BaseAction - { - public Upsert__FeatureName__Request Upsert__FeatureName__Request { get; set; } - } - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using __RootNamespace__.Features.Bases; + + internal partial class __FeatureName__State + { + public class Create__FeatureName__Action : BaseAction + { + public Upsert__FeatureName__Request Upsert__FeatureName__Request { get; set; } + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Handler.cs index 5e66a6ec4..2dfc187b3 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Create/Create__FeatureName__Handler.cs @@ -1,56 +1,56 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using BlazorState; - using MediatR; - using System.Net.Http; - using System.Net.Http.Json; - using System.Threading; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - using System; - using System.Text.Json; - internal partial class __FeatureName__State - { - public class Create__FeatureName__Handler : BaseHandler { - - private readonly HttpClient HttpClient; - private readonly JsonSerializerOptions JsonSerializerOptions; - - public Create__FeatureName__Handler - ( - IStore aStore, - HttpClient aHttpClient, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aStore) - { - HttpClient = aHttpClient; - JsonSerializerOptions = aJsonSerializerOptions; - } - - public override async Task Handle - ( - Create__FeatureName__Action aCreate__FeatureName__Action, - CancellationToken aCancellationToken - ) - { - Console.WriteLine($"Name:{aCreate__FeatureName__Action.Upsert__FeatureName__Request.Name}"); - HttpResponseMessage httpResponseMessage = - await HttpClient.PostAsJsonAsync - ( - aCreate__FeatureName__Action.Upsert__FeatureName__Request.GetRoute(), - aCreate__FeatureName__Action.Upsert__FeatureName__Request, - aCancellationToken - ); - - httpResponseMessage.EnsureSuccessStatusCode(); - - string json = await httpResponseMessage.Content.ReadAsStringAsync(); - - Console.WriteLine("=============="); - Console.WriteLine(json); - - return Unit.Value; - } - } - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using BlazorState; + using MediatR; + using System.Net.Http; + using System.Net.Http.Json; + using System.Threading; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + using System; + using System.Text.Json; + internal partial class __FeatureName__State + { + public class Create__FeatureName__Handler : BaseHandler { + + private readonly HttpClient HttpClient; + private readonly JsonSerializerOptions JsonSerializerOptions; + + public Create__FeatureName__Handler + ( + IStore aStore, + HttpClient aHttpClient, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aStore) + { + HttpClient = aHttpClient; + JsonSerializerOptions = aJsonSerializerOptions; + } + + public override async Task Handle + ( + Create__FeatureName__Action aCreate__FeatureName__Action, + CancellationToken aCancellationToken + ) + { + Console.WriteLine($"Name:{aCreate__FeatureName__Action.Upsert__FeatureName__Request.Name}"); + HttpResponseMessage httpResponseMessage = + await HttpClient.PostAsJsonAsync + ( + aCreate__FeatureName__Action.Upsert__FeatureName__Request.GetRoute(), + aCreate__FeatureName__Action.Upsert__FeatureName__Request, + aCancellationToken + ); + + httpResponseMessage.EnsureSuccessStatusCode(); + + string json = await httpResponseMessage.Content.ReadAsStringAsync(); + + Console.WriteLine("=============="); + Console.WriteLine(json); + + return Unit.Value; + } + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Action.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Action.cs index 14a6a59e8..dad623909 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Action.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Action.cs @@ -1,12 +1,12 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using __RootNamespace__.Features.Bases; - - internal partial class __FeatureName__State - { - public class Delete__FeatureName__Action : BaseAction - { - public Delete__FeatureName__Request Delete__FeatureName__Request { get; set; } - } - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using __RootNamespace__.Features.Bases; + + internal partial class __FeatureName__State + { + public class Delete__FeatureName__Action : BaseAction + { + public Delete__FeatureName__Request Delete__FeatureName__Request { get; set; } + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Handler.cs index bdc4bf16a..f7bcf95ba 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Delete/Delete__FeatureName__Handler.cs @@ -1,48 +1,48 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using __RootNamespace__.Features.Bases; - using BlazorState; - using MediatR; - using System.Net.Http; - using System.Net.Http.Json; - using System.Threading; - using System.Threading.Tasks; - using System; - using System.Text.Json; - - internal partial class __FeatureName__State - { - internal class Delete__FeatureName__Handler : BaseHandler - { - private readonly HttpClient HttpClient; - private readonly JsonSerializerOptions JsonSerializerOptions; - public Delete__FeatureName__Handler( - IStore aStore, - HttpClient aHttpClient, - JsonSerializerOptions aJsonSerializerOptions) : base(aStore) - { - HttpClient = aHttpClient; - JsonSerializerOptions = aJsonSerializerOptions; - } - public override async Task Handle - ( - Delete__FeatureName__Action aDelete__FeatureName__Action, - CancellationToken aCancellationToken - ) - { - Console.WriteLine($"Delete Item Id : {aDelete__FeatureName__Action.Delete__FeatureName__Request.ItemId}"); - HttpResponseMessage httpResponseMessage = - await HttpClient.PostAsJsonAsync - ( - aDelete__FeatureName__Action.Delete__FeatureName__Request.GetRoute(), - aDelete__FeatureName__Action.Delete__FeatureName__Request, - aCancellationToken - ); - httpResponseMessage.EnsureSuccessStatusCode(); - - return await Unit.Task; - } - } - - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using __RootNamespace__.Features.Bases; + using BlazorState; + using MediatR; + using System.Net.Http; + using System.Net.Http.Json; + using System.Threading; + using System.Threading.Tasks; + using System; + using System.Text.Json; + + internal partial class __FeatureName__State + { + internal class Delete__FeatureName__Handler : BaseHandler + { + private readonly HttpClient HttpClient; + private readonly JsonSerializerOptions JsonSerializerOptions; + public Delete__FeatureName__Handler( + IStore aStore, + HttpClient aHttpClient, + JsonSerializerOptions aJsonSerializerOptions) : base(aStore) + { + HttpClient = aHttpClient; + JsonSerializerOptions = aJsonSerializerOptions; + } + public override async Task Handle + ( + Delete__FeatureName__Action aDelete__FeatureName__Action, + CancellationToken aCancellationToken + ) + { + Console.WriteLine($"Delete Item Id : {aDelete__FeatureName__Action.Delete__FeatureName__Request.ItemId}"); + HttpResponseMessage httpResponseMessage = + await HttpClient.PostAsJsonAsync + ( + aDelete__FeatureName__Action.Delete__FeatureName__Request.GetRoute(), + aDelete__FeatureName__Action.Delete__FeatureName__Request, + aCancellationToken + ); + httpResponseMessage.EnsureSuccessStatusCode(); + + return await Unit.Task; + } + } + + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Action.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Action.cs index 970fb267f..05f7c1211 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Action.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Action.cs @@ -1,9 +1,9 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using __RootNamespace__.Features.Bases; - - internal partial class __FeatureName__State - { - public class Fetch__FeatureName__Action : BaseAction { } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using __RootNamespace__.Features.Bases; + + internal partial class __FeatureName__State + { + public class Fetch__FeatureName__Action : BaseAction { } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Handler.cs index 570aa9ba0..5854ad9a2 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Fetch/Fetch__FeatureName__Handler.cs @@ -1,43 +1,43 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using BlazorState; - using MediatR; - using System.Net.Http; - using System.Net.Http.Json; - using System.Threading; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - using System.Collections.Generic; - using System.Linq; - - internal partial class __FeatureName__State - { - public class Fetch__FeatureName__Handler : BaseHandler - { - private readonly HttpClient HttpClient; - - public Fetch__FeatureName__Handler(IStore aStore, HttpClient aHttpClient) : base(aStore) - { - HttpClient = aHttpClient; - } - - public override async Task Handle - ( - Fetch__FeatureName__Action aFetch__FeatureName__Action, - CancellationToken aCancellationToken - ) - { - //var a__FeatureName__ReadRequest = new __FeatureName__ReadRequest { ItemNumber = 10 }; - var Get__FeatureName__sRequest = new GetAll__FeatureName__Request(); - GetAll__FeatureName__Response get__FeatureName__sResponse = await HttpClient.GetFromJsonAsync(Get__FeatureName__sRequest.GetRoute(), aCancellationToken).ConfigureAwait(false); - List<__FeatureName__Dto> __FeatureName__s = get__FeatureName__sResponse.Cars; - __FeatureName__State.___FeatureName__s.Clear(); - __FeatureName__State.___FeatureName__s = __FeatureName__s.ToDictionary( - a__FeatureName__ => a__FeatureName__.Id, - a__FeatureName__ => a__FeatureName__ - ); - return Unit.Value; - } - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using BlazorState; + using MediatR; + using System.Net.Http; + using System.Net.Http.Json; + using System.Threading; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + using System.Collections.Generic; + using System.Linq; + + internal partial class __FeatureName__State + { + public class Fetch__FeatureName__Handler : BaseHandler + { + private readonly HttpClient HttpClient; + + public Fetch__FeatureName__Handler(IStore aStore, HttpClient aHttpClient) : base(aStore) + { + HttpClient = aHttpClient; + } + + public override async Task Handle + ( + Fetch__FeatureName__Action aFetch__FeatureName__Action, + CancellationToken aCancellationToken + ) + { + //var a__FeatureName__ReadRequest = new __FeatureName__ReadRequest { ItemNumber = 10 }; + var Get__FeatureName__sRequest = new GetAll__FeatureName__Request(); + GetAll__FeatureName__Response get__FeatureName__sResponse = await HttpClient.GetFromJsonAsync(Get__FeatureName__sRequest.GetRoute(), aCancellationToken).ConfigureAwait(false); + List<__FeatureName__Dto> __FeatureName__s = get__FeatureName__sResponse.Cars; + __FeatureName__State.___FeatureName__s.Clear(); + __FeatureName__State.___FeatureName__s = __FeatureName__s.ToDictionary( + a__FeatureName__ => a__FeatureName__.Id, + a__FeatureName__ => a__FeatureName__ + ); + return Unit.Value; + } + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Action.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Action.cs index 8298f28ad..60efee55c 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Action.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Action.cs @@ -1,11 +1,11 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using __RootNamespace__.Features.Bases; - - internal partial class __FeatureName__State - { - public class Update__FeatureName__Action : BaseAction { - public Upsert__FeatureName__Request Upsert__FeatureName__Request { get; set; } - } - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using __RootNamespace__.Features.Bases; + + internal partial class __FeatureName__State + { + public class Update__FeatureName__Action : BaseAction { + public Upsert__FeatureName__Request Upsert__FeatureName__Request { get; set; } + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Handler.cs index d9a6174a1..fb67b2f86 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/Actions/Update/Update__FeatureName__Handler.cs @@ -1,48 +1,48 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using __RootNamespace__.Features.Bases; - using BlazorState; - using MediatR; - using System.Net.Http; - using System.Net.Http.Json; - using System.Threading; - using System.Threading.Tasks; - using System; - using System.Text.Json; - - internal partial class __FeatureName__State - { - internal class Update__FeatureName__Handler : BaseHandler - { - private readonly HttpClient HttpClient; - private readonly JsonSerializerOptions JsonSerializerOptions; - public Update__FeatureName__Handler( - IStore aStore, - HttpClient aHttpClient, - JsonSerializerOptions aJsonSerializerOptions) : base(aStore) - { - HttpClient = aHttpClient; - JsonSerializerOptions = aJsonSerializerOptions; - } - public override async Task Handle - ( - Update__FeatureName__Action aUpdate__FeatureName__Action, - CancellationToken aCancellationToken - ) - { - Console.WriteLine($"Update Name : {aUpdate__FeatureName__Action.Upsert__FeatureName__Request.Name}"); - HttpResponseMessage httpResponseMessage = - await HttpClient.PostAsJsonAsync - ( - aUpdate__FeatureName__Action.Upsert__FeatureName__Request.GetRoute(), - aUpdate__FeatureName__Action.Upsert__FeatureName__Request, - aCancellationToken - ); - httpResponseMessage.EnsureSuccessStatusCode(); - - return await Unit.Task; - } - } - - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using __RootNamespace__.Features.Bases; + using BlazorState; + using MediatR; + using System.Net.Http; + using System.Net.Http.Json; + using System.Threading; + using System.Threading.Tasks; + using System; + using System.Text.Json; + + internal partial class __FeatureName__State + { + internal class Update__FeatureName__Handler : BaseHandler + { + private readonly HttpClient HttpClient; + private readonly JsonSerializerOptions JsonSerializerOptions; + public Update__FeatureName__Handler( + IStore aStore, + HttpClient aHttpClient, + JsonSerializerOptions aJsonSerializerOptions) : base(aStore) + { + HttpClient = aHttpClient; + JsonSerializerOptions = aJsonSerializerOptions; + } + public override async Task Handle + ( + Update__FeatureName__Action aUpdate__FeatureName__Action, + CancellationToken aCancellationToken + ) + { + Console.WriteLine($"Update Name : {aUpdate__FeatureName__Action.Upsert__FeatureName__Request.Name}"); + HttpResponseMessage httpResponseMessage = + await HttpClient.PostAsJsonAsync + ( + aUpdate__FeatureName__Action.Upsert__FeatureName__Request.GetRoute(), + aUpdate__FeatureName__Action.Upsert__FeatureName__Request, + aCancellationToken + ); + httpResponseMessage.EnsureSuccessStatusCode(); + + return await Unit.Task; + } + } + + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.Debug.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.Debug.cs index 059c04e97..b8d4d9eae 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.Debug.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.Debug.cs @@ -1,32 +1,32 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using BlazorState; - using Dawn; - using System; - using Microsoft.JSInterop; - using System.Collections.Generic; - using System.Reflection; - using System.Text.Json; - //using static __RootNamespace__.Features.__FeatureName__s.Get__FeatureName__sResponse; - internal partial class __FeatureName__State : State<__FeatureName__State> - { - public override __FeatureName__State Hydrate(IDictionary aKeyValuePairs) - { - string json = aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(__FeatureName__s))].ToString(); - var __FeatureName__State = new __FeatureName__State() - { - ___FeatureName__s = JsonSerializer.Deserialize> - ( - json, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } - ), - Guid = new System.Guid(aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(Guid))].ToString()), - }; - return __FeatureName__State; - } - internal void Initialize(Dictionary a__FeatureName__s) - { - ThrowIfNotTestAssembly(Assembly.GetCallingAssembly()); - ___FeatureName__s = Guard.Argument(a__FeatureName__s, nameof(a__FeatureName__s)).NotNull(); - } - } -} +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using BlazorState; + using Dawn; + using System; + using Microsoft.JSInterop; + using System.Collections.Generic; + using System.Reflection; + using System.Text.Json; + //using static __RootNamespace__.Features.__FeatureName__s.Get__FeatureName__sResponse; + internal partial class __FeatureName__State : State<__FeatureName__State> + { + public override __FeatureName__State Hydrate(IDictionary aKeyValuePairs) + { + string json = aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(__FeatureName__s))].ToString(); + var __FeatureName__State = new __FeatureName__State() + { + ___FeatureName__s = JsonSerializer.Deserialize> + ( + json, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } + ), + Guid = new System.Guid(aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(Guid))].ToString()), + }; + return __FeatureName__State; + } + internal void Initialize(Dictionary a__FeatureName__s) + { + ThrowIfNotTestAssembly(Assembly.GetCallingAssembly()); + ___FeatureName__s = Guard.Argument(a__FeatureName__s, nameof(a__FeatureName__s)).NotNull(); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.cs index d19071835..72c3d1583 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Client/__FeatureName__State.cs @@ -1,33 +1,33 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using BlazorState; - using System.Collections.Generic; - using System.Linq; - using System; - - internal partial class __FeatureName__State : State<__FeatureName__State> - { - public int PageSize { get; private set; } - public int PageIndex { get; private set; } - - private Dictionary ___FeatureName__s; - - public __FeatureName__Dto Current__FeatureName__ { get; private set; } - - public IReadOnlyDictionary __FeatureName__s => ___FeatureName__s; - - public IReadOnlyList<__FeatureName__Dto> __FeatureName__sAsList => ___FeatureName__s.Values.ToList(); - - public __FeatureName__State() - { - Initialize(); - } - - public override void Initialize() - { - PageIndex = 0; - PageSize = 20; - ___FeatureName__s = new Dictionary(); - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using BlazorState; + using System.Collections.Generic; + using System.Linq; + using System; + + internal partial class __FeatureName__State : State<__FeatureName__State> + { + public int PageSize { get; private set; } + public int PageIndex { get; private set; } + + private Dictionary ___FeatureName__s; + + public __FeatureName__Dto Current__FeatureName__ { get; private set; } + + public IReadOnlyDictionary __FeatureName__s => ___FeatureName__s; + + public IReadOnlyList<__FeatureName__Dto> __FeatureName__sAsList => ___FeatureName__s.Values.ToList(); + + public __FeatureName__State() + { + Initialize(); + } + + public override void Initialize() + { + PageIndex = 0; + PageSize = 20; + ___FeatureName__s = new Dictionary(); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Data/ApplicationDbContext.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Data/ApplicationDbContext.cs index cfd62b0a9..ccf5996ea 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Data/ApplicationDbContext.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Data/ApplicationDbContext.cs @@ -1,12 +1,12 @@ -namespace __RootNamespace__.Data -{ - using Microsoft.EntityFrameworkCore; - using __RootNamespace__.Models; - - public class ApplicationDbContext : DbContext - { - public ApplicationDbContext(DbContextOptions options) : base(options) { } - - public DbSet<__FeatureName__Entity> __FeatureName__Entities { get; set; } - } +namespace __RootNamespace__.Data +{ + using Microsoft.EntityFrameworkCore; + using __RootNamespace__.Models; + + public class ApplicationDbContext : DbContext + { + public ApplicationDbContext(DbContextOptions options) : base(options) { } + + public DbSet<__FeatureName__Entity> __FeatureName__Entities { get; set; } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Endpoint.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Endpoint.cs index cde3d950d..ed7c12567 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Endpoint.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Endpoint.cs @@ -1,23 +1,23 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using Microsoft.AspNetCore.Mvc; - using Swashbuckle.AspNetCore.Annotations; - using System.Net; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - - public class Delete__FeatureName__Endpoint : BaseEndpoint - { - /// - /// Your summary these comments will show in the Open API Docs - /// - /// - /// - [HttpDelete(Delete__FeatureName__Request.RouteTemplate)] - [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] - [ProducesResponseType(typeof(Delete__FeatureName__Response), (int)HttpStatusCode.OK)] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - public Task Process([FromQuery]Delete__FeatureName__Request aDelete__FeatureName__Request) => - Send(aDelete__FeatureName__Request); - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using Microsoft.AspNetCore.Mvc; + using Swashbuckle.AspNetCore.Annotations; + using System.Net; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + + public class Delete__FeatureName__Endpoint : BaseEndpoint + { + /// + /// Your summary these comments will show in the Open API Docs + /// + /// + /// + [HttpDelete(Delete__FeatureName__Request.RouteTemplate)] + [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] + [ProducesResponseType(typeof(Delete__FeatureName__Response), (int)HttpStatusCode.OK)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] + public Task Process([FromQuery]Delete__FeatureName__Request aDelete__FeatureName__Request) => + Send(aDelete__FeatureName__Request); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Handler.cs index a10835e05..a705b80e7 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Delete__FeatureName__/Delete__FeatureName__Handler.cs @@ -1,33 +1,33 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using System; - using System.Collections.Generic; - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using __RootNamespace__.Data; - using __RootNamespace__.Models; - - public class Delete__FeatureName__Handler : IRequestHandler - { - private readonly ApplicationDbContext DbContext; - public Delete__FeatureName__Handler(ApplicationDbContext aDbContext) - { - DbContext = aDbContext; - } - public async Task Handle - ( - Delete__FeatureName__Request aDelete__FeatureName__Request, - CancellationToken aCancellationToken - ) - { - __FeatureName__Entity itemById = DbContext.__FeatureName__Entities.SingleOrDefault(i => i.Id.ToString().Contains(aDelete__FeatureName__Request.ItemId)); - DbContext.__FeatureName__Entities.Remove(itemById); - DbContext.SaveChanges(); - var response = new Delete__FeatureName__Response(); - - return await Task.FromResult(response); - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading; + using System.Threading.Tasks; + using __RootNamespace__.Data; + using __RootNamespace__.Models; + + public class Delete__FeatureName__Handler : IRequestHandler + { + private readonly ApplicationDbContext DbContext; + public Delete__FeatureName__Handler(ApplicationDbContext aDbContext) + { + DbContext = aDbContext; + } + public async Task Handle + ( + Delete__FeatureName__Request aDelete__FeatureName__Request, + CancellationToken aCancellationToken + ) + { + __FeatureName__Entity itemById = DbContext.__FeatureName__Entities.SingleOrDefault(i => i.Id.ToString().Contains(aDelete__FeatureName__Request.ItemId)); + DbContext.__FeatureName__Entities.Remove(itemById); + DbContext.SaveChanges(); + var response = new Delete__FeatureName__Response(); + + return await Task.FromResult(response); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Endpoint.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Endpoint.cs index 74974a8b3..6895821a2 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Endpoint.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Endpoint.cs @@ -1,23 +1,23 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using Microsoft.AspNetCore.Mvc; - using Swashbuckle.AspNetCore.Annotations; - using System.Net; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - - public class GetAll__FeatureName__Endpoint : BaseEndpoint - { - /// - /// Your summary these comments will show in the Open API Docs - /// - /// - /// - [HttpGet(GetAll__FeatureName__Request.RouteTemplate)] - [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] - [ProducesResponseType(typeof(GetAll__FeatureName__Response), (int)HttpStatusCode.OK)] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - public Task Process(GetAll__FeatureName__Request aGetAll__FeatureName__Request) => - Send(aGetAll__FeatureName__Request); - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using Microsoft.AspNetCore.Mvc; + using Swashbuckle.AspNetCore.Annotations; + using System.Net; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + + public class GetAll__FeatureName__Endpoint : BaseEndpoint + { + /// + /// Your summary these comments will show in the Open API Docs + /// + /// + /// + [HttpGet(GetAll__FeatureName__Request.RouteTemplate)] + [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] + [ProducesResponseType(typeof(GetAll__FeatureName__Response), (int)HttpStatusCode.OK)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] + public Task Process(GetAll__FeatureName__Request aGetAll__FeatureName__Request) => + Send(aGetAll__FeatureName__Request); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Handler.cs index 1c510f705..1654a5a4c 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetAll__FeatureName__/GetAll__FeatureName__Handler.cs @@ -1,52 +1,52 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using System; - using System.Collections.Generic; - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using __RootNamespace__.Data; - using AutoMapper; - using AutoMapper.QueryableExtensions; - using Microsoft.EntityFrameworkCore; - - public class GetAll__FeatureName__Handler : IRequestHandler - { - private readonly ApplicationDbContext DbContext; - private IConfigurationProvider ConfigurationProvider; - public GetAll__FeatureName__Handler - ( - ApplicationDbContext aDbContext, - IConfigurationProvider aConfigurationProvider - ) - { - ConfigurationProvider = aConfigurationProvider; - DbContext = aDbContext; - } - - public async Task Handle - ( - GetAll__FeatureName__Request aGetAll__FeatureName__Request, - CancellationToken aCancellationToken - ) - { - GetAll__FeatureName__Response response; - if (aGetAll__FeatureName__Request.PageIndex == 0 && aGetAll__FeatureName__Request.PageSize == 0) - { - response = new GetAll__FeatureName__Response() - { - __FeatureName__s = await DbContext.__FeatureName__Entities.ProjectTo<__FeatureName__Dto>(ConfigurationProvider).ToListAsync() - }; - } else - { - response = new GetAll__FeatureName__Response() - { - __FeatureName__s = await DbContext.__FeatureName__Entities.ProjectTo<__FeatureName__Dto>(ConfigurationProvider).Take(aGetAll__FeatureName__Request.PageSize).ToListAsync() - }; - } - return await Task.FromResult(response); - } - } -} - +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading; + using System.Threading.Tasks; + using __RootNamespace__.Data; + using AutoMapper; + using AutoMapper.QueryableExtensions; + using Microsoft.EntityFrameworkCore; + + public class GetAll__FeatureName__Handler : IRequestHandler + { + private readonly ApplicationDbContext DbContext; + private IConfigurationProvider ConfigurationProvider; + public GetAll__FeatureName__Handler + ( + ApplicationDbContext aDbContext, + IConfigurationProvider aConfigurationProvider + ) + { + ConfigurationProvider = aConfigurationProvider; + DbContext = aDbContext; + } + + public async Task Handle + ( + GetAll__FeatureName__Request aGetAll__FeatureName__Request, + CancellationToken aCancellationToken + ) + { + GetAll__FeatureName__Response response; + if (aGetAll__FeatureName__Request.PageIndex == 0 && aGetAll__FeatureName__Request.PageSize == 0) + { + response = new GetAll__FeatureName__Response() + { + __FeatureName__s = await DbContext.__FeatureName__Entities.ProjectTo<__FeatureName__Dto>(ConfigurationProvider).ToListAsync() + }; + } else + { + response = new GetAll__FeatureName__Response() + { + __FeatureName__s = await DbContext.__FeatureName__Entities.ProjectTo<__FeatureName__Dto>(ConfigurationProvider).Take(aGetAll__FeatureName__Request.PageSize).ToListAsync() + }; + } + return await Task.FromResult(response); + } + } +} + diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Endpoint.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Endpoint.cs index 7d467a758..07814599f 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Endpoint.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Endpoint.cs @@ -1,23 +1,23 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using Microsoft.AspNetCore.Mvc; - using Swashbuckle.AspNetCore.Annotations; - using System.Net; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - - public class GetById__FeatureName__Endpoint : BaseEndpoint - { - /// - /// Your summary these comments will show in the Open API Docs - /// - /// - /// - [HttpGet(GetById__FeatureName__Request.RouteTemplate)] - [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] - [ProducesResponseType(typeof(GetById__FeatureName__Response), (int)HttpStatusCode.OK)] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - public Task Process([FromQuery]GetById__FeatureName__Request aGetById__FeatureName__Request) => - Send(aGetById__FeatureName__Request); - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using Microsoft.AspNetCore.Mvc; + using Swashbuckle.AspNetCore.Annotations; + using System.Net; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + + public class GetById__FeatureName__Endpoint : BaseEndpoint + { + /// + /// Your summary these comments will show in the Open API Docs + /// + /// + /// + [HttpGet(GetById__FeatureName__Request.RouteTemplate)] + [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] + [ProducesResponseType(typeof(GetById__FeatureName__Response), (int)HttpStatusCode.OK)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] + public Task Process([FromQuery]GetById__FeatureName__Request aGetById__FeatureName__Request) => + Send(aGetById__FeatureName__Request); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Handler.cs index 4e16cecf1..8afb5335b 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/GetById__FeatureName__/GetById__FeatureName__Handler.cs @@ -1,40 +1,40 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using System; - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using __RootNamespace__.Data; - using __RootNamespace__.Models; - using AutoMapper; - - public class GetById__FeatureName__Handler : IRequestHandler - { - private readonly ApplicationDbContext DbContext; - private IMapper Mapper; - public GetById__FeatureName__Handler - ( - ApplicationDbContext aDbContext, - IMapper aMapper - ) - { - Mapper = aMapper; - DbContext = aDbContext; - } - - public async Task Handle - ( - GetById__FeatureName__Request aGetById__FeatureName__Request, - CancellationToken aCancellationToken - ) - { - __FeatureName__Entity __FeatureName__ = DbContext.__FeatureName__Entities.Find(aGetById__FeatureName__Request.Id); - var response = new GetById__FeatureName__Response() - { - __FeatureName__ = Mapper.Map<__FeatureName__Dto>(__FeatureName__) - }; - return await Task.FromResult(response); - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using System; + using System.Linq; + using System.Threading; + using System.Threading.Tasks; + using __RootNamespace__.Data; + using __RootNamespace__.Models; + using AutoMapper; + + public class GetById__FeatureName__Handler : IRequestHandler + { + private readonly ApplicationDbContext DbContext; + private IMapper Mapper; + public GetById__FeatureName__Handler + ( + ApplicationDbContext aDbContext, + IMapper aMapper + ) + { + Mapper = aMapper; + DbContext = aDbContext; + } + + public async Task Handle + ( + GetById__FeatureName__Request aGetById__FeatureName__Request, + CancellationToken aCancellationToken + ) + { + __FeatureName__Entity __FeatureName__ = DbContext.__FeatureName__Entities.Find(aGetById__FeatureName__Request.Id); + var response = new GetById__FeatureName__Response() + { + __FeatureName__ = Mapper.Map<__FeatureName__Dto>(__FeatureName__) + }; + return await Task.FromResult(response); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Endpoint.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Endpoint.cs index 91c0b27ef..da9eee722 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Endpoint.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Endpoint.cs @@ -1,23 +1,23 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using Microsoft.AspNetCore.Mvc; - using Swashbuckle.AspNetCore.Annotations; - using System.Net; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - - public class Upsert__FeatureName__Endpoint : BaseEndpoint - { - /// - /// Your summary these comments will show in the Open API Docs - /// - /// - /// - [HttpPost(Upsert__FeatureName__Request.RouteTemplate)] - [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] - [ProducesResponseType(typeof(Upsert__FeatureName__Response), (int)HttpStatusCode.Created)] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - public Task Process([FromBody]Upsert__FeatureName__Request aUpsert__FeatureName__Request) => - Send(aUpsert__FeatureName__Request); - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using Microsoft.AspNetCore.Mvc; + using Swashbuckle.AspNetCore.Annotations; + using System.Net; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + + public class Upsert__FeatureName__Endpoint : BaseEndpoint + { + /// + /// Your summary these comments will show in the Open API Docs + /// + /// + /// + [HttpPost(Upsert__FeatureName__Request.RouteTemplate)] + [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] + [ProducesResponseType(typeof(Upsert__FeatureName__Response), (int)HttpStatusCode.Created)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] + public Task Process([FromBody]Upsert__FeatureName__Request aUpsert__FeatureName__Request) => + Send(aUpsert__FeatureName__Request); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Handler.cs index 111c04f14..25c9bea3e 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Features/__FeatureName__/Upsert__FeatureName__/Upsert__FeatureName__Handler.cs @@ -1,52 +1,52 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using System; - using System.Collections.Generic; - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using __RootNamespace__.Data; - using AutoMapper; - using __RootNamespace__.Models; - - - public class Upsert__FeatureName__Handler : IRequestHandler - { - private readonly ApplicationDbContext DbContext; - private readonly IMapper Mapper; - - public Upsert__FeatureName__Handler( - ApplicationDbContext aDbContext, - IMapper aMapper - ) - { - Mapper = aMapper; - DbContext = aDbContext; - } - - public async Task Handle - ( - Upsert__FeatureName__Request aUpsert__FeatureName__Request, - CancellationToken aCancellationToken - ) - { - Upsert__FeatureName__Response response; - if (aUpsert__FeatureName__Request.Id != Guid.Empty) - { - __FeatureName__Entity itemInDb = DbContext.__FeatureName__Entities.SingleOrDefault(i => i.Id.ToString().Contains(aUpsert__FeatureName__Request.Id.ToString())); - itemInDb.Name = aUpsert__FeatureName__Request.Name; - itemInDb.Description = aUpsert__FeatureName__Request.Description; - itemInDb.Price = aUpsert__FeatureName__Request.Price; - DbContext.SaveChanges(); - response = new Upsert__FeatureName__Response(); - } else { - __FeatureName__Entity mapped__FeatureName__ = Mapper.Map<__FeatureName__Entity>(aUpsert__FeatureName__Request); - DbContext.__FeatureName__Entities.Add(mapped__FeatureName__); - DbContext.SaveChanges(); - response = new Upsert__FeatureName__Response(); - } - return await Task.FromResult(response); - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading; + using System.Threading.Tasks; + using __RootNamespace__.Data; + using AutoMapper; + using __RootNamespace__.Models; + + + public class Upsert__FeatureName__Handler : IRequestHandler + { + private readonly ApplicationDbContext DbContext; + private readonly IMapper Mapper; + + public Upsert__FeatureName__Handler( + ApplicationDbContext aDbContext, + IMapper aMapper + ) + { + Mapper = aMapper; + DbContext = aDbContext; + } + + public async Task Handle + ( + Upsert__FeatureName__Request aUpsert__FeatureName__Request, + CancellationToken aCancellationToken + ) + { + Upsert__FeatureName__Response response; + if (aUpsert__FeatureName__Request.Id != Guid.Empty) + { + __FeatureName__Entity itemInDb = DbContext.__FeatureName__Entities.SingleOrDefault(i => i.Id.ToString().Contains(aUpsert__FeatureName__Request.Id.ToString())); + itemInDb.Name = aUpsert__FeatureName__Request.Name; + itemInDb.Description = aUpsert__FeatureName__Request.Description; + itemInDb.Price = aUpsert__FeatureName__Request.Price; + DbContext.SaveChanges(); + response = new Upsert__FeatureName__Response(); + } else { + __FeatureName__Entity mapped__FeatureName__ = Mapper.Map<__FeatureName__Entity>(aUpsert__FeatureName__Request); + DbContext.__FeatureName__Entities.Add(mapped__FeatureName__); + DbContext.SaveChanges(); + response = new Upsert__FeatureName__Response(); + } + return await Task.FromResult(response); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Mappers/MappingProfiles.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Mappers/MappingProfiles.cs index 25024f3e5..163f1e13a 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Mappers/MappingProfiles.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Mappers/MappingProfiles.cs @@ -1,16 +1,16 @@ -namespace __RootNamespace__.Mapper -{ - using AutoMapper; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Models; - - public class MappingProfiles : Profile - { - public MappingProfiles() - { - //Map from UpsertRequest to Entity - CreateMap(); - CreateMap<__FeatureName__Entity, __FeatureName__Dto>(); - } - } +namespace __RootNamespace__.Mapper +{ + using AutoMapper; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Models; + + public class MappingProfiles : Profile + { + public MappingProfiles() + { + //Map from UpsertRequest to Entity + CreateMap(); + CreateMap<__FeatureName__Entity, __FeatureName__Dto>(); + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Models/__FeatureName__Entity.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Models/__FeatureName__Entity.cs index a54c0c693..41d46adb3 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Models/__FeatureName__Entity.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Source/Server/Models/__FeatureName__Entity.cs @@ -1,12 +1,12 @@ -namespace __RootNamespace__.Models -{ - using System; - public class __FeatureName__Entity - { - public Guid Id { get; set; } - public string Name { get; set; } - public string Description { get; set; } - public decimal Price { get; set; } - - } +namespace __RootNamespace__.Models +{ + using System; + public class __FeatureName__Entity + { + public Guid Id { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public decimal Price { get; set; } + + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteEndpoint_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteEndpoint_Tests.cs index aa06bb2a1..df4c5cf43 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteEndpoint_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteEndpoint_Tests.cs @@ -1,53 +1,53 @@ -ο»Ώnamespace __RequestName__Endpoint -{ - using FluentAssertions; - using Microsoft.AspNetCore.Mvc.Testing; - using System.Net; - using System.Net.Http; - using System.Text.Json; - using System.Threading.Tasks; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Server; - - public class Returns : BaseTest - { - private readonly __RequestName__Request __RequestName__Request; - - public Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; - } - - public async Task __RequestName__Response() - { - __RequestName__Response __RequestName__Response = - await GetJsonAsync<__RequestName__Response>(__RequestName__Request.GetRoute()); - - Validate__RequestName__Response(__RequestName__Response); - } - - public async Task ValidationError() - { - // Set invalid value - __RequestName__Request.SampleProperty = string.Empty; - - HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); - - string json = await httpResponseMessage.Content.ReadAsStringAsync(); - - httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); - json.Should().Contain("errors"); - json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // check Other properties here - } - } +ο»Ώnamespace __RequestName__Endpoint +{ + using FluentAssertions; + using Microsoft.AspNetCore.Mvc.Testing; + using System.Net; + using System.Net.Http; + using System.Text.Json; + using System.Threading.Tasks; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Server; + + public class Returns : BaseTest + { + private readonly __RequestName__Request __RequestName__Request; + + public Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; + } + + public async Task __RequestName__Response() + { + __RequestName__Response __RequestName__Response = + await GetJsonAsync<__RequestName__Response>(__RequestName__Request.GetRoute()); + + Validate__RequestName__Response(__RequestName__Response); + } + + public async Task ValidationError() + { + // Set invalid value + __RequestName__Request.SampleProperty = string.Empty; + + HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); + + string json = await httpResponseMessage.Content.ReadAsStringAsync(); + + httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); + json.Should().Contain("errors"); + json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // check Other properties here + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteHandler_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteHandler_Tests.cs index 92d4ffdc4..c016c7918 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteHandler_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteHandler_Tests.cs @@ -1,37 +1,37 @@ -ο»Ώnamespace __RequestName__Handler -{ - using System.Threading.Tasks; - using System.Text.Json; - using Microsoft.AspNetCore.Mvc.Testing; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server; - using FluentAssertions; - - public class Handle_Returns : BaseTest - { - private readonly __RequestName__Request __RequestName__Request; - - public Handle_Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; - } - - public async Task __RequestName__Response() - { - __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); - - Validate__RequestName__Response(__RequestName__Response); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // #TODO: check Other properties here - } - - } +ο»Ώnamespace __RequestName__Handler +{ + using System.Threading.Tasks; + using System.Text.Json; + using Microsoft.AspNetCore.Mvc.Testing; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server; + using FluentAssertions; + + public class Handle_Returns : BaseTest + { + private readonly __RequestName__Request __RequestName__Request; + + public Handle_Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; + } + + public async Task __RequestName__Response() + { + __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); + + Validate__RequestName__Response(__RequestName__Response); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // #TODO: check Other properties here + } + + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteRequestValidator_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteRequestValidator_Tests.cs index ea2a52128..edcdcd868 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteRequestValidator_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__DeleteRequestValidator_Tests.cs @@ -1,36 +1,36 @@ -ο»Ώnamespace __RequestName__RequestValidator -{ - using FluentAssertions; - using FluentValidation.Results; - using FluentValidation.TestHelper; - using __RootNamespace__.Features.__FeatureName__s; - - public class Validate_Should - { - private __RequestName__RequestValidator __RequestName__RequestValidator; - - public Validate_Should() - { - __RequestName__RequestValidator = new __RequestName__RequestValidator(); - } - - public void Be_Valid() - { - var __requestName__Request = new __RequestName__Request - { - // Set Valid values here - // #TODO - SampleProperty = "sample" - }; - - ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); - - validationResult.IsValid.Should().BeTrue(); - } - - // #TODO Rename thie test and add tests for all validation rules - public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator - .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); - - } -} +ο»Ώnamespace __RequestName__RequestValidator +{ + using FluentAssertions; + using FluentValidation.Results; + using FluentValidation.TestHelper; + using __RootNamespace__.Features.__FeatureName__s; + + public class Validate_Should + { + private __RequestName__RequestValidator __RequestName__RequestValidator; + + public Validate_Should() + { + __RequestName__RequestValidator = new __RequestName__RequestValidator(); + } + + public void Be_Valid() + { + var __requestName__Request = new __RequestName__Request + { + // Set Valid values here + // #TODO + SampleProperty = "sample" + }; + + ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); + + validationResult.IsValid.Should().BeTrue(); + } + + // #TODO Rename thie test and add tests for all validation rules + public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator + .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); + + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetEndpoint_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetEndpoint_Tests.cs index 3eb2bbfa4..164f7a39e 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetEndpoint_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetEndpoint_Tests.cs @@ -1,53 +1,53 @@ -ο»Ώnamespace __FeatureName__GetEndpoint -{ - using FluentAssertions; - using Microsoft.AspNetCore.Mvc.Testing; - using System.Net; - using System.Net.Http; - using System.Text.Json; - using System.Threading.Tasks; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Server; - - public class Returns : BaseTest - { - private readonly __FeatureName__GetRequest __FeatureName__GetRequest; - - public Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __FeatureName__GetRequest = new __FeatureName__GetRequest { PageSize = 5, PageIndex = 1 }; - } - - public async Task __FeatureName__GetResponse() - { - __FeatureName__GetResponse __FeatureName__GetResponse = - await GetJsonAsync<__FeatureName__GetResponse>(__FeatureName__GetRequest.GetRoute()); - - Validate__FeatureName__GetResponse(__FeatureName__GetResponse); - } - - public async Task ValidationError() - { - // Set invalid value - __FeatureName__GetRequest.PageSize = string.Empty; - - HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); - - string json = await httpResponseMessage.Content.ReadAsStringAsync(); - - httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); - json.Should().Contain("errors"); - json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // check Other properties here - } - } +ο»Ώnamespace __FeatureName__GetEndpoint +{ + using FluentAssertions; + using Microsoft.AspNetCore.Mvc.Testing; + using System.Net; + using System.Net.Http; + using System.Text.Json; + using System.Threading.Tasks; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Server; + + public class Returns : BaseTest + { + private readonly __FeatureName__GetRequest __FeatureName__GetRequest; + + public Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __FeatureName__GetRequest = new __FeatureName__GetRequest { PageSize = 5, PageIndex = 1 }; + } + + public async Task __FeatureName__GetResponse() + { + __FeatureName__GetResponse __FeatureName__GetResponse = + await GetJsonAsync<__FeatureName__GetResponse>(__FeatureName__GetRequest.GetRoute()); + + Validate__FeatureName__GetResponse(__FeatureName__GetResponse); + } + + public async Task ValidationError() + { + // Set invalid value + __FeatureName__GetRequest.PageSize = string.Empty; + + HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); + + string json = await httpResponseMessage.Content.ReadAsStringAsync(); + + httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); + json.Should().Contain("errors"); + json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // check Other properties here + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetHandler_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetHandler_Tests.cs index 92d4ffdc4..c016c7918 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetHandler_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetHandler_Tests.cs @@ -1,37 +1,37 @@ -ο»Ώnamespace __RequestName__Handler -{ - using System.Threading.Tasks; - using System.Text.Json; - using Microsoft.AspNetCore.Mvc.Testing; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server; - using FluentAssertions; - - public class Handle_Returns : BaseTest - { - private readonly __RequestName__Request __RequestName__Request; - - public Handle_Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; - } - - public async Task __RequestName__Response() - { - __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); - - Validate__RequestName__Response(__RequestName__Response); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // #TODO: check Other properties here - } - - } +ο»Ώnamespace __RequestName__Handler +{ + using System.Threading.Tasks; + using System.Text.Json; + using Microsoft.AspNetCore.Mvc.Testing; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server; + using FluentAssertions; + + public class Handle_Returns : BaseTest + { + private readonly __RequestName__Request __RequestName__Request; + + public Handle_Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; + } + + public async Task __RequestName__Response() + { + __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); + + Validate__RequestName__Response(__RequestName__Response); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // #TODO: check Other properties here + } + + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetRequestValidator_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetRequestValidator_Tests.cs index ea2a52128..edcdcd868 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetRequestValidator_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__GetRequestValidator_Tests.cs @@ -1,36 +1,36 @@ -ο»Ώnamespace __RequestName__RequestValidator -{ - using FluentAssertions; - using FluentValidation.Results; - using FluentValidation.TestHelper; - using __RootNamespace__.Features.__FeatureName__s; - - public class Validate_Should - { - private __RequestName__RequestValidator __RequestName__RequestValidator; - - public Validate_Should() - { - __RequestName__RequestValidator = new __RequestName__RequestValidator(); - } - - public void Be_Valid() - { - var __requestName__Request = new __RequestName__Request - { - // Set Valid values here - // #TODO - SampleProperty = "sample" - }; - - ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); - - validationResult.IsValid.Should().BeTrue(); - } - - // #TODO Rename thie test and add tests for all validation rules - public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator - .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); - - } -} +ο»Ώnamespace __RequestName__RequestValidator +{ + using FluentAssertions; + using FluentValidation.Results; + using FluentValidation.TestHelper; + using __RootNamespace__.Features.__FeatureName__s; + + public class Validate_Should + { + private __RequestName__RequestValidator __RequestName__RequestValidator; + + public Validate_Should() + { + __RequestName__RequestValidator = new __RequestName__RequestValidator(); + } + + public void Be_Valid() + { + var __requestName__Request = new __RequestName__Request + { + // Set Valid values here + // #TODO + SampleProperty = "sample" + }; + + ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); + + validationResult.IsValid.Should().BeTrue(); + } + + // #TODO Rename thie test and add tests for all validation rules + public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator + .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); + + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertEndpoint_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertEndpoint_Tests.cs index aa06bb2a1..df4c5cf43 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertEndpoint_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertEndpoint_Tests.cs @@ -1,53 +1,53 @@ -ο»Ώnamespace __RequestName__Endpoint -{ - using FluentAssertions; - using Microsoft.AspNetCore.Mvc.Testing; - using System.Net; - using System.Net.Http; - using System.Text.Json; - using System.Threading.Tasks; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Server; - - public class Returns : BaseTest - { - private readonly __RequestName__Request __RequestName__Request; - - public Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; - } - - public async Task __RequestName__Response() - { - __RequestName__Response __RequestName__Response = - await GetJsonAsync<__RequestName__Response>(__RequestName__Request.GetRoute()); - - Validate__RequestName__Response(__RequestName__Response); - } - - public async Task ValidationError() - { - // Set invalid value - __RequestName__Request.SampleProperty = string.Empty; - - HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); - - string json = await httpResponseMessage.Content.ReadAsStringAsync(); - - httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); - json.Should().Contain("errors"); - json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // check Other properties here - } - } +ο»Ώnamespace __RequestName__Endpoint +{ + using FluentAssertions; + using Microsoft.AspNetCore.Mvc.Testing; + using System.Net; + using System.Net.Http; + using System.Text.Json; + using System.Threading.Tasks; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Server; + + public class Returns : BaseTest + { + private readonly __RequestName__Request __RequestName__Request; + + public Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; + } + + public async Task __RequestName__Response() + { + __RequestName__Response __RequestName__Response = + await GetJsonAsync<__RequestName__Response>(__RequestName__Request.GetRoute()); + + Validate__RequestName__Response(__RequestName__Response); + } + + public async Task ValidationError() + { + // Set invalid value + __RequestName__Request.SampleProperty = string.Empty; + + HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); + + string json = await httpResponseMessage.Content.ReadAsStringAsync(); + + httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); + json.Should().Contain("errors"); + json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // check Other properties here + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertHandler_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertHandler_Tests.cs index 92d4ffdc4..c016c7918 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertHandler_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertHandler_Tests.cs @@ -1,37 +1,37 @@ -ο»Ώnamespace __RequestName__Handler -{ - using System.Threading.Tasks; - using System.Text.Json; - using Microsoft.AspNetCore.Mvc.Testing; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server; - using FluentAssertions; - - public class Handle_Returns : BaseTest - { - private readonly __RequestName__Request __RequestName__Request; - - public Handle_Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; - } - - public async Task __RequestName__Response() - { - __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); - - Validate__RequestName__Response(__RequestName__Response); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // #TODO: check Other properties here - } - - } +ο»Ώnamespace __RequestName__Handler +{ + using System.Threading.Tasks; + using System.Text.Json; + using Microsoft.AspNetCore.Mvc.Testing; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server; + using FluentAssertions; + + public class Handle_Returns : BaseTest + { + private readonly __RequestName__Request __RequestName__Request; + + public Handle_Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; + } + + public async Task __RequestName__Response() + { + __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); + + Validate__RequestName__Response(__RequestName__Response); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // #TODO: check Other properties here + } + + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertRequestValidator_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertRequestValidator_Tests.cs index ea2a52128..edcdcd868 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertRequestValidator_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.AutoCrud/GeneratedCode/Test/ServerTests/Endpoint.Test/__FeatureName__UpsertRequestValidator_Tests.cs @@ -1,36 +1,36 @@ -ο»Ώnamespace __RequestName__RequestValidator -{ - using FluentAssertions; - using FluentValidation.Results; - using FluentValidation.TestHelper; - using __RootNamespace__.Features.__FeatureName__s; - - public class Validate_Should - { - private __RequestName__RequestValidator __RequestName__RequestValidator; - - public Validate_Should() - { - __RequestName__RequestValidator = new __RequestName__RequestValidator(); - } - - public void Be_Valid() - { - var __requestName__Request = new __RequestName__Request - { - // Set Valid values here - // #TODO - SampleProperty = "sample" - }; - - ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); - - validationResult.IsValid.Should().BeTrue(); - } - - // #TODO Rename thie test and add tests for all validation rules - public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator - .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); - - } -} +ο»Ώnamespace __RequestName__RequestValidator +{ + using FluentAssertions; + using FluentValidation.Results; + using FluentValidation.TestHelper; + using __RootNamespace__.Features.__FeatureName__s; + + public class Validate_Should + { + private __RequestName__RequestValidator __RequestName__RequestValidator; + + public Validate_Should() + { + __RequestName__RequestValidator = new __RequestName__RequestValidator(); + } + + public void Be_Valid() + { + var __requestName__Request = new __RequestName__Request + { + // Set Valid values here + // #TODO + SampleProperty = "sample" + }; + + ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); + + validationResult.IsValid.Should().BeTrue(); + } + + // #TODO Rename thie test and add tests for all validation rules + public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator + .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); + + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Create.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Create.razor.cs index 0586df2cb..767d691d4 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Create.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Create.razor.cs @@ -1,34 +1,34 @@ -ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components -{ - using eShopOnBlazorWasm.Features.Bases; - using eShopOnBlazorWasm.Features.CatalogBrands; - using eShopOnBlazorWasm.Features.CatalogTypes; - using Microsoft.AspNetCore.Components; - using System.Collections.Generic; - using System.Threading.Tasks; - using static BlazorState.Features.Routing.RouteState; - using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; - - public partial class Create: BaseComponent - { - public CreateCatalogItemRequest CreateCatalogItemRequest { get; set; } - - private IReadOnlyList CatalogBrands => CatalogBrandState.CatalogBrandsAsList; - private IReadOnlyList CatalogTypes => CatalogTypeState.CatalogTypesAsList; - - [Parameter] public string RedirectRoute { get; set; } - - protected override Task OnInitializedAsync() - { - CreateCatalogItemRequest = new CreateCatalogItemRequest(); - - return base.OnInitializedAsync(); - } - - protected async Task HandleValidSubmit() - { - _ = await Mediator.Send(new CreateCatalogItemAction { CreateCatalogItemRequest = CreateCatalogItemRequest }); - _ = await Mediator.Send(new ChangeRouteAction { NewRoute = RedirectRoute }); - } - } -} +ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components +{ + using eShopOnBlazorWasm.Features.Bases; + using eShopOnBlazorWasm.Features.CatalogBrands; + using eShopOnBlazorWasm.Features.CatalogTypes; + using Microsoft.AspNetCore.Components; + using System.Collections.Generic; + using System.Threading.Tasks; + using static BlazorState.Features.Routing.RouteState; + using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; + + public partial class Create: BaseComponent + { + public CreateCatalogItemRequest CreateCatalogItemRequest { get; set; } + + private IReadOnlyList CatalogBrands => CatalogBrandState.CatalogBrandsAsList; + private IReadOnlyList CatalogTypes => CatalogTypeState.CatalogTypesAsList; + + [Parameter] public string RedirectRoute { get; set; } + + protected override Task OnInitializedAsync() + { + CreateCatalogItemRequest = new CreateCatalogItemRequest(); + + return base.OnInitializedAsync(); + } + + protected async Task HandleValidSubmit() + { + _ = await Mediator.Send(new CreateCatalogItemAction { CreateCatalogItemRequest = CreateCatalogItemRequest }); + _ = await Mediator.Send(new ChangeRouteAction { NewRoute = RedirectRoute }); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Delete.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Delete.razor.cs index b0cbffab4..726c43b09 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Delete.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Delete.razor.cs @@ -1,13 +1,13 @@ -ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components -{ - using Microsoft.AspNetCore.Components; - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - public partial class Delete - { - [Parameter] public int CatalogItemId { get; set; } - } -} +ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components +{ + using Microsoft.AspNetCore.Components; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + public partial class Delete + { + [Parameter] public int CatalogItemId { get; set; } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Details.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Details.razor.cs index 25458aac1..221050f22 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Details.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Details.razor.cs @@ -1,15 +1,15 @@ -ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components -{ - using eShopOnBlazorWasm.Features.Bases; - using Microsoft.AspNetCore.Components; - public partial class Details:BaseComponent - { - public CatalogItemDto CatalogItem => - CatalogItemState.CatalogItems[CatalogItemId]; - - [Parameter] public int CatalogItemId { get; set; } - - public string CatalogBrand => CatalogBrandState.CatalogBrands[CatalogItem.CatalogBrandId].Brand; - public string CatalogType => CatalogTypeState.CatalogTypes[CatalogItem.CatalogTypeId].Type; - } -} +ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components +{ + using eShopOnBlazorWasm.Features.Bases; + using Microsoft.AspNetCore.Components; + public partial class Details:BaseComponent + { + public CatalogItemDto CatalogItem => + CatalogItemState.CatalogItems[CatalogItemId]; + + [Parameter] public int CatalogItemId { get; set; } + + public string CatalogBrand => CatalogBrandState.CatalogBrands[CatalogItem.CatalogBrandId].Brand; + public string CatalogType => CatalogTypeState.CatalogTypes[CatalogItem.CatalogTypeId].Type; + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Edit.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Edit.razor.cs index 75aa1ca42..93f8da54c 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Edit.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/Edit.razor.cs @@ -1,38 +1,38 @@ -ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components -{ - using eShopOnBlazorWasm.Features.Bases; - using eShopOnBlazorWasm.Features.CatalogBrands; - using eShopOnBlazorWasm.Features.CatalogTypes; - using Microsoft.AspNetCore.Components; - using System.Collections.Generic; - using System.Threading.Tasks; - using static BlazorState.Features.Routing.RouteState; - using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; - - public partial class Edit : BaseComponent - { - public UpdateCatalogItemRequest UpdateCatalogItemRequest { get; set; } - - private IReadOnlyList CatalogBrands => CatalogBrandState.CatalogBrandsAsList; - private IReadOnlyList CatalogTypes => CatalogTypeState.CatalogTypesAsList; - - [Parameter] public int CatalogItemId { get; set; } - [Parameter] public string RedirectRoute { get; set; } - - protected override Task OnInitializedAsync() - { - UpdateCatalogItemRequest = new UpdateCatalogItemRequest(); - - return base.OnInitializedAsync(); - } - - protected async Task HandleValidSubmit() - { - _ = await Mediator.Send(new EditCatalogItemAction { UpdateCatalogItemRequest = UpdateCatalogItemRequest }); - if (!string.IsNullOrEmpty(RedirectRoute)) - { - _ = await Mediator.Send(new ChangeRouteAction { NewRoute = RedirectRoute }); - } - } - } -} +ο»Ώnamespace eShopOnBlazorWasm.Features.CatalogItems.Components +{ + using eShopOnBlazorWasm.Features.Bases; + using eShopOnBlazorWasm.Features.CatalogBrands; + using eShopOnBlazorWasm.Features.CatalogTypes; + using Microsoft.AspNetCore.Components; + using System.Collections.Generic; + using System.Threading.Tasks; + using static BlazorState.Features.Routing.RouteState; + using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; + + public partial class Edit : BaseComponent + { + public UpdateCatalogItemRequest UpdateCatalogItemRequest { get; set; } + + private IReadOnlyList CatalogBrands => CatalogBrandState.CatalogBrandsAsList; + private IReadOnlyList CatalogTypes => CatalogTypeState.CatalogTypesAsList; + + [Parameter] public int CatalogItemId { get; set; } + [Parameter] public string RedirectRoute { get; set; } + + protected override Task OnInitializedAsync() + { + UpdateCatalogItemRequest = new UpdateCatalogItemRequest(); + + return base.OnInitializedAsync(); + } + + protected async Task HandleValidSubmit() + { + _ = await Mediator.Send(new EditCatalogItemAction { UpdateCatalogItemRequest = UpdateCatalogItemRequest }); + if (!string.IsNullOrEmpty(RedirectRoute)) + { + _ = await Mediator.Send(new ChangeRouteAction { NewRoute = RedirectRoute }); + } + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/List.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/List.razor.cs index 2938632a1..26e5eeb4a 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/List.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudComponents/List.razor.cs @@ -1,12 +1,12 @@ -namespace eShopOnBlazorWasm.Features.CatalogItems.Components -{ - using eShopOnBlazorWasm.Features.Bases; - using System.Threading.Tasks; - using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; - - public partial class CatalogItemList:BaseComponent - { - protected async Task HandlePageChange(int aPageIndex) => - _ = await Mediator.Send(new ChangePageAction { PageIndex = aPageIndex }); - } -} +namespace eShopOnBlazorWasm.Features.CatalogItems.Components +{ + using eShopOnBlazorWasm.Features.Bases; + using System.Threading.Tasks; + using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; + + public partial class CatalogItemList:BaseComponent + { + protected async Task HandlePageChange(int aPageIndex) => + _ = await Mediator.Send(new ChangePageAction { PageIndex = aPageIndex }); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Create.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Create.razor.cs index 7d13df8de..3450c6f83 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Create.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Create.razor.cs @@ -1,14 +1,14 @@ -namespace eShopOnBlazorWasm.Pages.Catalog -{ - using BlazorState.Features.Routing; - using System.Threading.Tasks; - using eShopOnBlazorWasm.Features.Bases; - - public partial class Create: BaseComponent - { - public const string Route = "/Catalog/Create"; - - protected async Task ButtonClick() => - _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); - } -} +namespace eShopOnBlazorWasm.Pages.Catalog +{ + using BlazorState.Features.Routing; + using System.Threading.Tasks; + using eShopOnBlazorWasm.Features.Bases; + + public partial class Create: BaseComponent + { + public const string Route = "/Catalog/Create"; + + protected async Task ButtonClick() => + _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Delete.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Delete.razor.cs index 7a9540b4b..346bad25a 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Delete.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Delete.razor.cs @@ -1,20 +1,20 @@ -namespace eShopOnBlazorWasm.Pages.Catalog -{ - using BlazorState.Features.Routing; - using System.Threading.Tasks; - using eShopOnBlazorWasm.Features.Bases; - using Microsoft.AspNetCore.Components; - - public partial class Delete: BaseComponent - { - public const string Route = "/Catalog/Delete/{EntityId}"; - - public static string RouteFactory(int aEntityId) => - Route.Replace($"{{{nameof(EntityId)}}}", aEntityId.ToString(), System.StringComparison.OrdinalIgnoreCase); - - [Parameter] public int EntityId { get; set; } - - protected async Task ButtonClick() => - _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); - } -} +namespace eShopOnBlazorWasm.Pages.Catalog +{ + using BlazorState.Features.Routing; + using System.Threading.Tasks; + using eShopOnBlazorWasm.Features.Bases; + using Microsoft.AspNetCore.Components; + + public partial class Delete: BaseComponent + { + public const string Route = "/Catalog/Delete/{EntityId}"; + + public static string RouteFactory(int aEntityId) => + Route.Replace($"{{{nameof(EntityId)}}}", aEntityId.ToString(), System.StringComparison.OrdinalIgnoreCase); + + [Parameter] public int EntityId { get; set; } + + protected async Task ButtonClick() => + _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Details.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Details.razor.cs index e5356eb84..3aab729df 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Details.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Details.razor.cs @@ -1,20 +1,20 @@ -namespace eShopOnBlazorWasm.Pages.Catalog -{ - using BlazorState.Features.Routing; - using System.Threading.Tasks; - using eShopOnBlazorWasm.Features.Bases; - using Microsoft.AspNetCore.Components; - - public partial class Details: BaseComponent - { - public const string Route = "/Catalog/Details/{EntityId}"; - - public static string RouteFactory(int aEntityId) => - Route.Replace($"{{{nameof(EntityId)}}}", aEntityId.ToString(), System.StringComparison.OrdinalIgnoreCase); - - [Parameter] public int EntityId { get; set; } - - protected async Task ButtonClick() => - _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); - } -} +namespace eShopOnBlazorWasm.Pages.Catalog +{ + using BlazorState.Features.Routing; + using System.Threading.Tasks; + using eShopOnBlazorWasm.Features.Bases; + using Microsoft.AspNetCore.Components; + + public partial class Details: BaseComponent + { + public const string Route = "/Catalog/Details/{EntityId}"; + + public static string RouteFactory(int aEntityId) => + Route.Replace($"{{{nameof(EntityId)}}}", aEntityId.ToString(), System.StringComparison.OrdinalIgnoreCase); + + [Parameter] public int EntityId { get; set; } + + protected async Task ButtonClick() => + _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Edit.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Edit.razor.cs index 6811bd0f0..537d1e1b8 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Edit.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Edit.razor.cs @@ -1,20 +1,20 @@ -namespace eShopOnBlazorWasm.Pages.Catalog -{ - using BlazorState.Features.Routing; - using System.Threading.Tasks; - using eShopOnBlazorWasm.Features.Bases; - using Microsoft.AspNetCore.Components; - - public partial class Edit: BaseComponent - { - public const string Route = "/Catalog/Edit/{EntityId}"; - - public static string RouteFactory(int aEntityId) => - Route.Replace($"{{{nameof(EntityId)}}}", aEntityId.ToString(), System.StringComparison.OrdinalIgnoreCase); - - [Parameter] public int EntityId { get; set; } - - protected async Task ButtonClick() => - _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); - } -} +namespace eShopOnBlazorWasm.Pages.Catalog +{ + using BlazorState.Features.Routing; + using System.Threading.Tasks; + using eShopOnBlazorWasm.Features.Bases; + using Microsoft.AspNetCore.Components; + + public partial class Edit: BaseComponent + { + public const string Route = "/Catalog/Edit/{EntityId}"; + + public static string RouteFactory(int aEntityId) => + Route.Replace($"{{{nameof(EntityId)}}}", aEntityId.ToString(), System.StringComparison.OrdinalIgnoreCase); + + [Parameter] public int EntityId { get; set; } + + protected async Task ButtonClick() => + _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Index.razor.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Index.razor.cs index b6f68bb84..d7d06f974 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Index.razor.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.CrudPages/Catalog/Index.razor.cs @@ -1,20 +1,20 @@ -namespace eShopOnBlazorWasm.Pages.Catalog -{ - using BlazorState.Features.Routing; - using eShopOnBlazorWasm.Features.Bases; - using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; - using System.Threading.Tasks; - - public partial class Index: BaseComponent - { - public const string Route = "/Catalog"; - - protected async Task CreateClick() => - _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = Create.Route }); - - protected override async Task OnAfterRenderAsync(bool aFirstRender) - { - _ = await Mediator.Send(new FetchCatalogItemsAction()); - } - } -} +namespace eShopOnBlazorWasm.Pages.Catalog +{ + using BlazorState.Features.Routing; + using eShopOnBlazorWasm.Features.Bases; + using static eShopOnBlazorWasm.Features.CatalogItems.CatalogItemState; + using System.Threading.Tasks; + + public partial class Index: BaseComponent + { + public const string Route = "/Catalog"; + + protected async Task CreateClick() => + _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = Create.Route }); + + protected override async Task OnAfterRenderAsync(bool aFirstRender) + { + _ = await Mediator.Send(new FetchCatalogItemsAction()); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/.template.config/template.json b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/.template.config/template.json index 49d4c17ad..0d305e06f 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/.template.config/template.json +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/.template.config/template.json @@ -1,117 +1,117 @@ -{ - "$schema": "http://json.schemastore.org/template", - "author": "Steven T. Cramer", - "classifications": [ - "TimeWarp", - "Web", - "Blazor", - "Hosted", - "Feature", - "Endpoint" - ], - "name": "TimeWarp Feature Endpoint", - "groupIdentity": "TimeWarp.Feature.Endpoint", - "identity": "TimeWarp.Feature.Endpoint", - "preferNameDirectory": true, - "shortName": "timewarp-feature-endpoint", - "sourceName": "__RequestName__", - "symbols": { - "RootNamespace": { - "type": "parameter", - "description": "The first portion of the namespace .Features.", - "datatype": "text", - "replaces": "__RootNamespace__" - }, - "FeatureName": { - "type": "parameter", - "description": "The last part of the namespace .Features.", - "datatype": "text", - "replaces": "__FeatureName__" - }, - "firstLetterToUpperCase": { - "type": "derived", - "valueSource": "name", - "valueTransform": "upperCaseFirstLetter" - }, - "firstLetterToLowerCase": { - "type": "derived", - "valueSource": "name", - "valueTransform": "lowerCaseFirstLetter" - }, - "copyOtherChars": { - "type": "derived", - "valueSource": "name", - "valueTransform": "afterFirstLetter" - }, - "requestNameCamelCase": { - "type": "generated", - "generator": "join", - "replaces": "__requestName__", - "parameters": { - "symbols": [ - { - "type": "ref", - "value": "firstLetterToLowerCase" - }, - { - "type": "ref", - "value": "copyOtherChars" - } - ] - } - }, - "requestNamePascalCase": { - "type": "generated", - "generator": "join", - "replaces": "__RequestName__", - "parameters": { - "symbols": [ - { - "type": "ref", - "value": "firstLetterToUpperCase" - }, - { - "type": "ref", - "value": "copyOtherChars" - } - ] - } - } - }, - "forms": { - "lowerCaseFirstLetter": { - "identifier": "chain", - "steps": [ - "firstLetter", - "lowerCase" - ] - }, - "upperCaseFirstLetter": { - "identifier": "chain", - "steps": [ - "firstLetter", - "upperCase" - ] - }, - "firstLetter": { - "identifier": "replace", - "pattern": "^(.)(.*)", - "replacement": "$1" - }, - "afterFirstLetter": { - "identifier": "replace", - "pattern": "^(.)(.*)", - "replacement": "$2" - }, - "lowerCase": { - "identifier": "lowerCase" - }, - "upperCase": { - "identifier": "upperCase" - } - }, - "tags": { - "language": "C#", - "type": "item" - } +{ + "$schema": "http://json.schemastore.org/template", + "author": "Steven T. Cramer", + "classifications": [ + "TimeWarp", + "Web", + "Blazor", + "Hosted", + "Feature", + "Endpoint" + ], + "name": "TimeWarp Feature Endpoint", + "groupIdentity": "TimeWarp.Feature.Endpoint", + "identity": "TimeWarp.Feature.Endpoint", + "preferNameDirectory": true, + "shortName": "timewarp-feature-endpoint", + "sourceName": "__RequestName__", + "symbols": { + "RootNamespace": { + "type": "parameter", + "description": "The first portion of the namespace .Features.", + "datatype": "text", + "replaces": "__RootNamespace__" + }, + "FeatureName": { + "type": "parameter", + "description": "The last part of the namespace .Features.", + "datatype": "text", + "replaces": "__FeatureName__" + }, + "firstLetterToUpperCase": { + "type": "derived", + "valueSource": "name", + "valueTransform": "upperCaseFirstLetter" + }, + "firstLetterToLowerCase": { + "type": "derived", + "valueSource": "name", + "valueTransform": "lowerCaseFirstLetter" + }, + "copyOtherChars": { + "type": "derived", + "valueSource": "name", + "valueTransform": "afterFirstLetter" + }, + "requestNameCamelCase": { + "type": "generated", + "generator": "join", + "replaces": "__requestName__", + "parameters": { + "symbols": [ + { + "type": "ref", + "value": "firstLetterToLowerCase" + }, + { + "type": "ref", + "value": "copyOtherChars" + } + ] + } + }, + "requestNamePascalCase": { + "type": "generated", + "generator": "join", + "replaces": "__RequestName__", + "parameters": { + "symbols": [ + { + "type": "ref", + "value": "firstLetterToUpperCase" + }, + { + "type": "ref", + "value": "copyOtherChars" + } + ] + } + } + }, + "forms": { + "lowerCaseFirstLetter": { + "identifier": "chain", + "steps": [ + "firstLetter", + "lowerCase" + ] + }, + "upperCaseFirstLetter": { + "identifier": "chain", + "steps": [ + "firstLetter", + "upperCase" + ] + }, + "firstLetter": { + "identifier": "replace", + "pattern": "^(.)(.*)", + "replacement": "$1" + }, + "afterFirstLetter": { + "identifier": "replace", + "pattern": "^(.)(.*)", + "replacement": "$2" + }, + "lowerCase": { + "identifier": "lowerCase" + }, + "upperCase": { + "identifier": "upperCase" + } + }, + "tags": { + "language": "C#", + "type": "item" + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Request.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Request.cs index b24c5bbd9..8d6633526 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Request.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Request.cs @@ -1,18 +1,18 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using __RootNamespace__.Features.Bases; - - public class __RequestName__Request : BaseApiRequest, IRequest<__RequestName__Response> - { - public const string RouteTemplate = "api/__FeatureName__s/__RequestName__"; - - /// - /// Set Properties and Update Docs - /// - /// TODO - public string SampleProperty { get; set; } - - internal override string GetRoute() => $"{RouteTemplate}?{nameof(SampleProperty)}={SampleProperty}"; - } +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using __RootNamespace__.Features.Bases; + + public class __RequestName__Request : BaseApiRequest, IRequest<__RequestName__Response> + { + public const string RouteTemplate = "api/__FeatureName__s/__RequestName__"; + + /// + /// Set Properties and Update Docs + /// + /// TODO + public string SampleProperty { get; set; } + + internal override string GetRoute() => $"{RouteTemplate}?{nameof(SampleProperty)}={SampleProperty}"; + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__RequestValidator.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__RequestValidator.cs index 2b44b07b0..3583761fb 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__RequestValidator.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__RequestValidator.cs @@ -1,39 +1,39 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using FluentValidation; - - public class __RequestName__RequestValidator : AbstractValidator<__RequestName__Request> - { - - public __RequestName__RequestValidator() - { - - // Declare message as const here. Or could use an injected Language Service - - // public const string InsufficentFundsMessage = "You can not send more than your balance"; - // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; - - RuleFor(a__RequestName__Request => a__RequestName__Request.SampleProperty) - .NotEmpty(); - - // https://docs.fluentvalidation.net/ - // Example Rules - - // RuleFor(aSendAction => aSendAction.Fee) - // .NotEmpty(); - - // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) - // .Must(aToken => validTokens.Contains(aToken)); - - // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) - // .Equal(UsdCurrencyCode.ToLower()); - - // RuleFor(aSendAction => aSendAction) - // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) - // .WithMessage(InsufficentFundsMessage) - // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) - // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) - // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); - } - } +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using FluentValidation; + + public class __RequestName__RequestValidator : AbstractValidator<__RequestName__Request> + { + + public __RequestName__RequestValidator() + { + + // Declare message as const here. Or could use an injected Language Service + + // public const string InsufficentFundsMessage = "You can not send more than your balance"; + // public const string MustBeGreaterThanZeroMessage = "'{PropertyName}' must be greater than zero"; + + RuleFor(a__RequestName__Request => a__RequestName__Request.SampleProperty) + .NotEmpty(); + + // https://docs.fluentvalidation.net/ + // Example Rules + + // RuleFor(aSendAction => aSendAction.Fee) + // .NotEmpty(); + + // RuleFor(aConversionRequest => aConversionRequest.FromCurrency.ToLower()) + // .Must(aToken => validTokens.Contains(aToken)); + + // RuleFor(aGetNativeAmountRequest => aGetNativeAmountRequest.ToCurrency.ToLower()) + // .Equal(UsdCurrencyCode.ToLower()); + + // RuleFor(aSendAction => aSendAction) + // .Must(aSendAction => BalanceGreaterThanSendAmount(aSendAction)) + // .WithMessage(InsufficentFundsMessage) + // .When(aSendAction => CurrencyMustExistInWallet(aSendAction)) + // .When(aSendAction => WalletMustExist(aSendAction.EdgeCurrencyWalletId)) + // .When(aSendAction => !string.IsNullOrWhiteSpace(aSendAction.NativeAmount)); + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Response.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Response.cs index 01c33eacd..10e29ff13 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Response.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Api/__RequestName__Response.cs @@ -1,13 +1,13 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using System; - using System.Collections.Generic; - using __RootNamespace__.Features.Bases; - - public class __RequestName__Response : BaseResponse - { - public __RequestName__Response() { } - - public __RequestName__Response() : base() { } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using System; + using System.Collections.Generic; + using __RootNamespace__.Features.Bases; + + public class __RequestName__Response : BaseResponse + { + public __RequestName__Response() { } + + public __RequestName__Response() : base() { } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/FeatureAnnotations.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/FeatureAnnotations.cs index 3b2e6a297..44a2c70b6 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/FeatureAnnotations.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/FeatureAnnotations.cs @@ -1,7 +1,7 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - public static class FeatureAnnotations - { - public const string FeatureGroup = "__FeatureName__"; - } -} +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + public static class FeatureAnnotations + { + public const string FeatureGroup = "__FeatureName__"; + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/MoveIntoProjects.ps1 b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/MoveIntoProjects.ps1 index b3037d5b3..9f14f2ba3 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/MoveIntoProjects.ps1 +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/MoveIntoProjects.ps1 @@ -1,17 +1,17 @@ -ο»Ώ$FeatureName = "__FeatureName__" -$RootNamespace = "__RootNamespace__" -$RequestName = "__RequestName__" - -$ApiFeaturePath = "..\Source\Api\Features\$FeatureName" -$ApiRequestPath = "$ApiFeaturePath\$RequestName" -$ServerPath = "..\Source\Server\Features\$FeatureName\$RequestName" -$ServerTestsPath = "..\Tests\Server.Integration.Tests\Features\$FeatureName\$RequestName" - -New-Item -ItemType Directory -Force -Path $ApiRequestPath -New-Item -ItemType Directory -Force -Path $ServerPath -New-Item -ItemType Directory -Force -Path $ServerTestsPath - -Move-Item "Api\*" -Destination $ApiRequestPath -Move-Item "Server\*" -Destination $ServerPath -Move-Item "Server.Tests\*" -Destination $ServerTestsPath +ο»Ώ$FeatureName = "__FeatureName__" +$RootNamespace = "__RootNamespace__" +$RequestName = "__RequestName__" + +$ApiFeaturePath = "..\Source\Api\Features\$FeatureName" +$ApiRequestPath = "$ApiFeaturePath\$RequestName" +$ServerPath = "..\Source\Server\Features\$FeatureName\$RequestName" +$ServerTestsPath = "..\Tests\Server.Integration.Tests\Features\$FeatureName\$RequestName" + +New-Item -ItemType Directory -Force -Path $ApiRequestPath +New-Item -ItemType Directory -Force -Path $ServerPath +New-Item -ItemType Directory -Force -Path $ServerTestsPath + +Move-Item "Api\*" -Destination $ApiRequestPath +Move-Item "Server\*" -Destination $ServerPath +Move-Item "Server.Tests\*" -Destination $ServerTestsPath Move-Item "FeatureAnnotations.cs" -Destination $ApiFeaturePath \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Endpoint_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Endpoint_Tests.cs index aa06bb2a1..df4c5cf43 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Endpoint_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Endpoint_Tests.cs @@ -1,53 +1,53 @@ -ο»Ώnamespace __RequestName__Endpoint -{ - using FluentAssertions; - using Microsoft.AspNetCore.Mvc.Testing; - using System.Net; - using System.Net.Http; - using System.Text.Json; - using System.Threading.Tasks; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Server; - - public class Returns : BaseTest - { - private readonly __RequestName__Request __RequestName__Request; - - public Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; - } - - public async Task __RequestName__Response() - { - __RequestName__Response __RequestName__Response = - await GetJsonAsync<__RequestName__Response>(__RequestName__Request.GetRoute()); - - Validate__RequestName__Response(__RequestName__Response); - } - - public async Task ValidationError() - { - // Set invalid value - __RequestName__Request.SampleProperty = string.Empty; - - HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); - - string json = await httpResponseMessage.Content.ReadAsStringAsync(); - - httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); - json.Should().Contain("errors"); - json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // check Other properties here - } - } +ο»Ώnamespace __RequestName__Endpoint +{ + using FluentAssertions; + using Microsoft.AspNetCore.Mvc.Testing; + using System.Net; + using System.Net.Http; + using System.Text.Json; + using System.Threading.Tasks; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Server; + + public class Returns : BaseTest + { + private readonly __RequestName__Request __RequestName__Request; + + public Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; + } + + public async Task __RequestName__Response() + { + __RequestName__Response __RequestName__Response = + await GetJsonAsync<__RequestName__Response>(__RequestName__Request.GetRoute()); + + Validate__RequestName__Response(__RequestName__Response); + } + + public async Task ValidationError() + { + // Set invalid value + __RequestName__Request.SampleProperty = string.Empty; + + HttpResponseMessage httpResponseMessage = await HttpClient.GetAsync(__RequestName__Request.GetRoute()); + + string json = await httpResponseMessage.Content.ReadAsStringAsync(); + + httpResponseMessage.StatusCode.Should().Be(HttpStatusCode.BadRequest); + json.Should().Contain("errors"); + json.Should().Contain(nameof(__RequestName__Request.SampleProperty)); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // check Other properties here + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Handler_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Handler_Tests.cs index 92d4ffdc4..c016c7918 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Handler_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__Handler_Tests.cs @@ -1,37 +1,37 @@ -ο»Ώnamespace __RequestName__Handler -{ - using System.Threading.Tasks; - using System.Text.Json; - using Microsoft.AspNetCore.Mvc.Testing; - using __RootNamespace__.Server.Integration.Tests.Infrastructure; - using __RootNamespace__.Features.__FeatureName__s; - using __RootNamespace__.Server; - using FluentAssertions; - - public class Handle_Returns : BaseTest - { - private readonly __RequestName__Request __RequestName__Request; - - public Handle_Returns - ( - WebApplicationFactory aWebApplicationFactory, - JsonSerializerOptions aJsonSerializerOptions - ) : base(aWebApplicationFactory, aJsonSerializerOptions) - { - __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; - } - - public async Task __RequestName__Response() - { - __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); - - Validate__RequestName__Response(__RequestName__Response); - } - - private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) - { - // #TODO: check Other properties here - } - - } +ο»Ώnamespace __RequestName__Handler +{ + using System.Threading.Tasks; + using System.Text.Json; + using Microsoft.AspNetCore.Mvc.Testing; + using __RootNamespace__.Server.Integration.Tests.Infrastructure; + using __RootNamespace__.Features.__FeatureName__s; + using __RootNamespace__.Server; + using FluentAssertions; + + public class Handle_Returns : BaseTest + { + private readonly __RequestName__Request __RequestName__Request; + + public Handle_Returns + ( + WebApplicationFactory aWebApplicationFactory, + JsonSerializerOptions aJsonSerializerOptions + ) : base(aWebApplicationFactory, aJsonSerializerOptions) + { + __RequestName__Request = new __RequestName__Request { SampleProperty = "sample" }; + } + + public async Task __RequestName__Response() + { + __RequestName__Response __RequestName__Response = await Send(__RequestName__Request); + + Validate__RequestName__Response(__RequestName__Response); + } + + private void Validate__RequestName__Response(__RequestName__Response a__RequestName__Response) + { + // #TODO: check Other properties here + } + + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__RequestValidator_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__RequestValidator_Tests.cs index ea2a52128..edcdcd868 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__RequestValidator_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server.Tests/__RequestName__RequestValidator_Tests.cs @@ -1,36 +1,36 @@ -ο»Ώnamespace __RequestName__RequestValidator -{ - using FluentAssertions; - using FluentValidation.Results; - using FluentValidation.TestHelper; - using __RootNamespace__.Features.__FeatureName__s; - - public class Validate_Should - { - private __RequestName__RequestValidator __RequestName__RequestValidator; - - public Validate_Should() - { - __RequestName__RequestValidator = new __RequestName__RequestValidator(); - } - - public void Be_Valid() - { - var __requestName__Request = new __RequestName__Request - { - // Set Valid values here - // #TODO - SampleProperty = "sample" - }; - - ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); - - validationResult.IsValid.Should().BeTrue(); - } - - // #TODO Rename thie test and add tests for all validation rules - public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator - .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); - - } -} +ο»Ώnamespace __RequestName__RequestValidator +{ + using FluentAssertions; + using FluentValidation.Results; + using FluentValidation.TestHelper; + using __RootNamespace__.Features.__FeatureName__s; + + public class Validate_Should + { + private __RequestName__RequestValidator __RequestName__RequestValidator; + + public Validate_Should() + { + __RequestName__RequestValidator = new __RequestName__RequestValidator(); + } + + public void Be_Valid() + { + var __requestName__Request = new __RequestName__Request + { + // Set Valid values here + // #TODO + SampleProperty = "sample" + }; + + ValidationResult validationResult = __RequestName__RequestValidator.TestValidate(__requestName__Request); + + validationResult.IsValid.Should().BeTrue(); + } + + // #TODO Rename thie test and add tests for all validation rules + public void Have_error_when_SampleProperty_is_empty() => __RequestName__RequestValidator + .ShouldHaveValidationErrorFor(a__RequestName__Request => a__RequestName__Request.SampleProperty, string.Empty); + + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Endpoint.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Endpoint.cs index 383a99a47..5b711b033 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Endpoint.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Endpoint.cs @@ -1,23 +1,23 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using Microsoft.AspNetCore.Mvc; - using Swashbuckle.AspNetCore.Annotations; - using System.Net; - using System.Threading.Tasks; - using __RootNamespace__.Features.Bases; - - public class __RequestName__Endpoint : BaseEndpoint<__RequestName__Request, __RequestName__Response> - { - /// - /// Your summary these comments will show in the Open API Docs - /// - /// - /// - [HttpGet(__RequestName__Request.RouteTemplate)] - [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] - [ProducesResponseType(typeof(__RequestName__Response), (int)HttpStatusCode.OK)] - [ProducesResponseType((int)HttpStatusCode.BadRequest)] - public Task Process(__RequestName__Request a__RequestName__Request) => - Send(a__RequestName__Request); - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using Microsoft.AspNetCore.Mvc; + using Swashbuckle.AspNetCore.Annotations; + using System.Net; + using System.Threading.Tasks; + using __RootNamespace__.Features.Bases; + + public class __RequestName__Endpoint : BaseEndpoint<__RequestName__Request, __RequestName__Response> + { + /// + /// Your summary these comments will show in the Open API Docs + /// + /// + /// + [HttpGet(__RequestName__Request.RouteTemplate)] + [SwaggerOperation(Tags = new[] { FeatureAnnotations.FeatureGroup })] + [ProducesResponseType(typeof(__RequestName__Response), (int)HttpStatusCode.OK)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] + public Task Process(__RequestName__Request a__RequestName__Request) => + Send(a__RequestName__Request); + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Handler.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Handler.cs index 21ac1b7e6..fcf98a99b 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Handler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.Endpoint/Server/__RequestName__Handler.cs @@ -1,24 +1,24 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using MediatR; - using System; - using System.Collections.Generic; - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - - public class __RequestName__Handler : IRequestHandler<__RequestName__Request, __RequestName__Response> - { - - public async Task<__RequestName__Response> Handle - ( - __RequestName__Request a__RequestName__Request, - CancellationToken aCancellationToken - ) - { - var response = new __RequestName__Response(); - - return await Task.FromResult(response); - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using MediatR; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading; + using System.Threading.Tasks; + + public class __RequestName__Handler : IRequestHandler<__RequestName__Request, __RequestName__Response> + { + + public async Task<__RequestName__Response> Handle + ( + __RequestName__Request a__RequestName__Request, + CancellationToken aCancellationToken + ) + { + var response = new __RequestName__Response(); + + return await Task.FromResult(response); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/.template.config/template.json b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/.template.config/template.json index d9cf24962..723199087 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/.template.config/template.json +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/.template.config/template.json @@ -1,40 +1,40 @@ -{ - "$schema": "http://json.schemastore.org/template", - "author": "Steven T. Cramer", - "classifications": [ - "TimeWarp", - "Web", - "Blazor", - "Hosted", - "Feature", - "State" - ], - "name": "TimeWarp Feature State", - "groupIdentity": "TimeWarp.Feature.State", - "identity": "TimeWarp.Feature.State", - "preferNameDirectory": false, - "shortName": "timewarp-feature-state", - "defaultName": "GeneratedCode", - - "symbols": { - "FeatureName": { - "type": "parameter", - "isRequired": true, - "description": "Specify Feature Name ", - "datatype": "text", - "replaces": "__FeatureName__", - "FileRename": "__FeatureName__" - }, - "RootNamespace": { - "type": "parameter", - "isRequired": true, - "description": "The first portion of the namespace .Features.", - "datatype": "text", - "replaces": "__RootNamespace__" - } - }, - "tags": { - "language": "C#", - "type": "item" - } +{ + "$schema": "http://json.schemastore.org/template", + "author": "Steven T. Cramer", + "classifications": [ + "TimeWarp", + "Web", + "Blazor", + "Hosted", + "Feature", + "State" + ], + "name": "TimeWarp Feature State", + "groupIdentity": "TimeWarp.Feature.State", + "identity": "TimeWarp.Feature.State", + "preferNameDirectory": false, + "shortName": "timewarp-feature-state", + "defaultName": "GeneratedCode", + + "symbols": { + "FeatureName": { + "type": "parameter", + "isRequired": true, + "description": "Specify Feature Name ", + "datatype": "text", + "replaces": "__FeatureName__", + "FileRename": "__FeatureName__" + }, + "RootNamespace": { + "type": "parameter", + "isRequired": true, + "description": "The first portion of the namespace .Features.", + "datatype": "text", + "replaces": "__RootNamespace__" + } + }, + "tags": { + "language": "C#", + "type": "item" + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client.Tests/__FeatureName__/__FeatureName__State_Clone_Tests.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client.Tests/__FeatureName__/__FeatureName__State_Clone_Tests.cs index 0213229b0..68bd337ec 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client.Tests/__FeatureName__/__FeatureName__State_Clone_Tests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client.Tests/__FeatureName__/__FeatureName__State_Clone_Tests.cs @@ -1,31 +1,31 @@ -namespace __FeatureName__State -{ - using AnyClone; - using Shouldly; - using TimeWarp.Blazor.Client.Integration.Tests.Infrastructure; - using TimeWarp.Blazor.Features.__FeatureName__s; - - public class Clone_Should : BaseTest - { - private __FeatureName__State __FeatureName__State => Store.GetState<__FeatureName__State>(); - - public Clone_Should(ClientHost aWebAssemblyHost) : base(aWebAssemblyHost) { } - - public void Clone() - { - var objectByDictionary = new Dictionary(); - objectByDictionary.Add("Sample01", new object { aName = "SampleName" }); - //Arrange - __FeatureName__State.Initialize(aPageIndex: 1, aPageSize: 21, objectByDictionary); - //Act - var clone = __FeatureName__State.Clone() as __FeatureName__State; - - //Assert - __FeatureName__State.ShouldNotBeSameAs(clone); - __FeatureName__State.PageSize.ShouldBe(clone.PageSize); - __FeatureName__State.PageIndex.ShouldBe(clone.PageIndex); - __FeatureName__State.Current__FeatureName__[0].ShouldNotBe(clone.objectByDictionary[0]) - __FeatureName__State.Guid.ShouldNotBe(clone.Guid); - } - } -} +namespace __FeatureName__State +{ + using AnyClone; + using Shouldly; + using TimeWarp.Blazor.Client.Integration.Tests.Infrastructure; + using TimeWarp.Blazor.Features.__FeatureName__s; + + public class Clone_Should : BaseTest + { + private __FeatureName__State __FeatureName__State => Store.GetState<__FeatureName__State>(); + + public Clone_Should(ClientHost aWebAssemblyHost) : base(aWebAssemblyHost) { } + + public void Clone() + { + var objectByDictionary = new Dictionary(); + objectByDictionary.Add("Sample01", new object { aName = "SampleName" }); + //Arrange + __FeatureName__State.Initialize(aPageIndex: 1, aPageSize: 21, objectByDictionary); + //Act + var clone = __FeatureName__State.Clone() as __FeatureName__State; + + //Assert + __FeatureName__State.ShouldNotBeSameAs(clone); + __FeatureName__State.PageSize.ShouldBe(clone.PageSize); + __FeatureName__State.PageIndex.ShouldBe(clone.PageIndex); + __FeatureName__State.Current__FeatureName__[0].ShouldNotBe(clone.objectByDictionary[0]) + __FeatureName__State.Guid.ShouldNotBe(clone.Guid); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.Debug.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.Debug.cs index 5a2768a6d..9e7de3120 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.Debug.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.Debug.cs @@ -1,31 +1,31 @@ -ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s -{ - using BlazorState; - using Dawn; - using Microsoft.JSInterop; - using System.Collections.Generic; - using System.Reflection; - using System.Text.Json; - using static __RootNamespace__.Features.__FeatureName__s.Get__FeatureName__sResponse; - internal partial class __FeatureName__State : State<__FeatureName__State> - { - public override __FeatureName__State Hydrate(IDictionary aKeyValuePairs) - { - string json = aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(__FeatureName__s))].ToString(); - var __FeatureName__State = new ProviderKeyState() - { - ___FeatureName__s = JsonSerializer.Deserialize> - ( - json, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } - ), - Guid = new System.Guid(aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(Guid))].ToString()), - }; - return __FeatureName__State; - } - internal void Initialize(Dictionary a__FeatureName__s) - { - ThrowIfNotTestAssembly(Assembly.GetCallingAssembly()); - ___FeatureName__s = Guard.Argument(a__FeatureName__s, nameof(a__FeatureName__s)).NotNull(); - } - } -} +ο»Ώnamespace __RootNamespace__.Features.__FeatureName__s +{ + using BlazorState; + using Dawn; + using Microsoft.JSInterop; + using System.Collections.Generic; + using System.Reflection; + using System.Text.Json; + using static __RootNamespace__.Features.__FeatureName__s.Get__FeatureName__sResponse; + internal partial class __FeatureName__State : State<__FeatureName__State> + { + public override __FeatureName__State Hydrate(IDictionary aKeyValuePairs) + { + string json = aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(__FeatureName__s))].ToString(); + var __FeatureName__State = new ProviderKeyState() + { + ___FeatureName__s = JsonSerializer.Deserialize> + ( + json, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } + ), + Guid = new System.Guid(aKeyValuePairs[CamelCase.MemberNameToCamelCase(nameof(Guid))].ToString()), + }; + return __FeatureName__State; + } + internal void Initialize(Dictionary a__FeatureName__s) + { + ThrowIfNotTestAssembly(Assembly.GetCallingAssembly()); + ___FeatureName__s = Guard.Argument(a__FeatureName__s, nameof(a__FeatureName__s)).NotNull(); + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.cs b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.cs index f8ef3b6c7..01b945ebe 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/Client/__FeatureName__State.cs @@ -1,30 +1,30 @@ -namespace __RootNamespace__.Features.__FeatureName__s -{ - using BlazorState; - public partial class __FeatureName__State : State<__FeatureName__State> - { - public int PageSize { get; private set; } - public int PageIndex { get; private set; } - - private Dictionary ___FeatureName__s; - - public __FeatureName__ Current__FeatureName__ { get; private set; } - - public IReadOnlyDictionary __FeatureName__s => ___FeatureName__s; - - public IReadOnlyList<__FeatureName__> __FeatureName__sAsList => ___FeatureName__s.Values.ToList(); - - public ProviderKeyState() - { - Initialize(); - } - - public override void Initialize() - { - PageIndex = 0; - PageSize = 20; - ___FeatureName__s = new Dictionary(); - } - } -} +namespace __RootNamespace__.Features.__FeatureName__s +{ + using BlazorState; + public partial class __FeatureName__State : State<__FeatureName__State> + { + public int PageSize { get; private set; } + public int PageIndex { get; private set; } + + private Dictionary ___FeatureName__s; + + public __FeatureName__ Current__FeatureName__ { get; private set; } + + public IReadOnlyDictionary __FeatureName__s => ___FeatureName__s; + + public IReadOnlyList<__FeatureName__> __FeatureName__sAsList => ___FeatureName__s.Values.ToList(); + + public ProviderKeyState() + { + Initialize(); + } + + public override void Initialize() + { + PageIndex = 0; + PageSize = 20; + ___FeatureName__s = new Dictionary(); + } + } +} } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/MoveIntoProjects.ps1 b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/MoveIntoProjects.ps1 index ba198d8ac..6c363ddff 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/MoveIntoProjects.ps1 +++ b/TimeWarp.Templates/Source/TimeWarp.Architecture.Template/templates/Feature.State/GeneratedCode/MoveIntoProjects.ps1 @@ -1,11 +1,11 @@ -ο»Ώ$FeatureName = "__FeatureName__" -$RootNamespace = "__RootNamespace__" - -$ClientFeaturePath = "..\Source\Client\Features\$FeatureName" -$ClientTestPath = "..\Tests\Client.Integration.Tests\Features" - -New-Item -ItemType Directory -Force -Path $ClientFeaturePath -New-Item -ItemType Directory -Force -Path $ClientTestPath - -Move-Item "Client\*" -Destination $ClientFeaturePath +ο»Ώ$FeatureName = "__FeatureName__" +$RootNamespace = "__RootNamespace__" + +$ClientFeaturePath = "..\Source\Client\Features\$FeatureName" +$ClientTestPath = "..\Tests\Client.Integration.Tests\Features" + +New-Item -ItemType Directory -Force -Path $ClientFeaturePath +New-Item -ItemType Directory -Force -Path $ClientTestPath + +Move-Item "Client\*" -Destination $ClientFeaturePath Move-Item "Client.Tests\*" -Destination $ClientTestPath \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.editorconfig b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.editorconfig index c8882ca56..17341b080 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.editorconfig +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.editorconfig @@ -1,273 +1,273 @@ -ο»Ώ# EditorConfig is awesome:http://EditorConfig.org -# For dotnet and Csharp specific see below -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference - -# Remove the line below if you want to inherit .editorconfig settings from higher directories -root = true - -#### Core EditorConfig Options #### - -# So code cleanup will not run on save. -[_Imports.cs] -generated_code = true - -[*.csproj] -generated_code = true - -[*] -# Indentation and spacing -indent_size = 2 -indent_style = space -tab_width = 2 - -# New line preferences -end_of_line = lf -insert_final_newline = true - -# Development files -[*.{cs,csx,cshtml,csproj,razor,sln,props,targets,json,yml,gitignore,}] -charset = "utf-8" -trim_trailing_whitespace = true - -#### .NET Coding Conventions #### -[*.cs] - -# Organize usings -dotnet_separate_import_directive_groups = false -dotnet_sort_system_directives_first = false - -# this. and Me. preferences -dotnet_style_qualification_for_event = false:silent -dotnet_style_qualification_for_field = false:silent -dotnet_style_qualification_for_method = false:silent -dotnet_style_qualification_for_property = false:silent - -# Language keywords vs BCL types preferences -dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion -dotnet_style_predefined_type_for_member_access = true:suggestion - -# Parentheses preferences -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent - -# Modifier preferences -dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent - -# Expression-level preferences -csharp_style_deconstructed_variable_declaration = true:suggestion -csharp_style_inlined_variable_declaration = true:suggestion -csharp_style_throw_expression = true:suggestion -dotnet_style_coalesce_expression = true:suggestion -dotnet_style_collection_initializer = true:suggestion -dotnet_style_explicit_tuple_names = true:suggestion -dotnet_style_null_propagation = true:suggestion -dotnet_style_object_initializer = true:suggestion -dotnet_style_prefer_auto_properties = true:suggestion -dotnet_style_prefer_compound_assignment = true:suggestion -dotnet_style_prefer_conditional_expression_over_assignment = true:silent -dotnet_style_prefer_conditional_expression_over_return = true:silent -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion -dotnet_style_prefer_inferred_tuple_names = true:suggestion -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion - -# Field preferences -dotnet_style_readonly_field = true:suggestion - -# Parameter preferences -dotnet_code_quality_unused_parameters = all:suggestion - -#### C# Coding Conventions #### - -# var preferences -csharp_style_var_elsewhere = false:warning -csharp_style_var_for_built_in_types = false:warning -csharp_style_var_when_type_is_apparent = true:warning - -# Expression-bodied members -csharp_style_expression_bodied_accessors = when_on_single_line:warning -csharp_style_expression_bodied_constructors = false:warning -csharp_style_expression_bodied_indexers = when_on_single_line:warning -csharp_style_expression_bodied_lambdas = true:suggestion -csharp_style_expression_bodied_local_functions = false:suggestion -csharp_style_expression_bodied_methods = when_on_single_line:warning -csharp_style_expression_bodied_operators = when_on_single_line:warning -csharp_style_expression_bodied_properties = when_on_single_line:warning - -# Pattern Matching -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion - - -# "Null" checking preferences -csharp_style_conditional_delegate_call = true:suggestion - -# Modifier preferences -csharp_prefer_static_local_function = true:suggestion -csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion - -# Code-block preferences -csharp_prefer_braces = when-multiline:suggestion -csharp_prefer_simple_using_statement = true:suggestion - -# Expression-level preferences -csharp_prefer_simple_default_expression = true:suggestion -csharp_style_pattern_local_over_anonymous_function = true:suggestion -csharp_style_prefer_index_operator = true:suggestion -csharp_style_prefer_range_operator = true:suggestion -csharp_style_unused_value_assignment_preference = discard_variable:suggestion -csharp_style_unused_value_expression_statement_preference = discard_variable:silent - -# 'using' directive preferences -csharp_using_directive_placement = inside_namespace:suggestion - -# Namespace preferences -csharp_style_namespace_declarations = file_scoped:error - -#### C# Formatting Rules #### - -# New line preferences -csharp_new_line_before_catch = true -csharp_new_line_before_else = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_open_brace = all -csharp_new_line_between_query_expression_clauses = true - -# Indentation preferences -csharp_indent_block_contents = true -csharp_indent_braces = false -csharp_indent_case_contents = true -csharp_indent_case_contents_when_block = true -csharp_indent_labels = one_less_than_current -csharp_indent_switch_labels = true - -# Space preferences -csharp_space_after_cast = false -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_after_comma = true -csharp_space_after_dot = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_after_semicolon_in_for_statement = true -csharp_space_around_binary_operators = before_and_after -csharp_space_around_declaration_statements = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_before_comma = false -csharp_space_before_dot = false -csharp_space_before_open_square_brackets = false -csharp_space_before_semicolon_in_for_statement = false -csharp_space_between_empty_square_brackets = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_declaration_name_and_open_parenthesis = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_between_square_brackets = false - -# Wrapping preferences -csharp_preserve_single_line_blocks = true -csharp_preserve_single_line_statements = true - -#### Naming styles #### - -# Naming rules - -# Interfaces should begin with an I and be PascalCase -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 = interface_style - -dotnet_naming_symbols.interface.applicable_kinds = interface -dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal -dotnet_naming_symbols.interface.required_modifiers = - -dotnet_naming_style.interface_style.required_prefix = I -dotnet_naming_style.interface_style.required_suffix = -dotnet_naming_style.interface_style.word_separator = -dotnet_naming_style.interface_style.capitalization = pascal_case - -# Types should be PascalCase -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 = types_style - -dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum -dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal -dotnet_naming_symbols.types.required_modifiers = - -dotnet_naming_style.types_style.capitalization = pascal_case - -# Non-private static fields are PascalCase -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style - -dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field -dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected -dotnet_naming_symbols.non_private_static_fields.required_modifiers = static - -dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case - -# Constants are PascalCase -dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants -dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style - -dotnet_naming_symbols.constants.applicable_kinds = field, local -dotnet_naming_symbols.constants.required_modifiers = const - -dotnet_naming_style.constant_style.capitalization = pascal_case - -# Static fields are camelCase and start with s_ -dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion -dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields -dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style - -dotnet_naming_symbols.static_fields.applicable_kinds = field -dotnet_naming_symbols.static_fields.required_modifiers = static - -dotnet_naming_style.static_field_style.capitalization = pascal_case -dotnet_naming_style.static_field_style.required_prefix = s_ - -# local variables should be camelCase -dotnet_naming_rule.camel_case_for_local_variables.severity = suggestion -dotnet_naming_rule.camel_case_for_local_variables.symbols = local_variables -dotnet_naming_rule.camel_case_for_local_variables.style = local_variables_style - -dotnet_naming_symbols.local_variables.applicable_kinds = local - -dotnet_naming_style.local_variables_style.capitalization = camel_case - -# Parameters should be prefixed with an 'a' -dotnet_naming_rule.parameters_should_be_prefixed.severity = suggestion -dotnet_naming_rule.parameters_should_be_prefixed.symbols = parameters -dotnet_naming_rule.parameters_should_be_prefixed.style = parameter_style - -dotnet_naming_symbols.parameters.applicable_kinds = parameter - -dotnet_naming_style.parameter_style.required_prefix = a -dotnet_naming_style.parameter_style.capitalization = pascal_case - -# Local functions are PascalCase -dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions -dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style - -dotnet_naming_symbols.local_functions.applicable_kinds = local_function - -dotnet_naming_style.local_function_style.capitalization = pascal_case - - -#### Analyizer settings #### -dotnet_code_quality.null_check_validation_methods = NotNull - -# CA1062: Validate arguments of public methods -# TODO: Turn this back on when figure out how to get Dawn.Guard to not trigger it. -dotnet_diagnostic.CA1062.severity = silent - -# CA1308: Normalize strings to uppercase -dotnet_diagnostic.CA1308.severity = none +ο»Ώ# EditorConfig is awesome:http://EditorConfig.org +# For dotnet and Csharp specific see below +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference + +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +#### Core EditorConfig Options #### + +# So code cleanup will not run on save. +[_Imports.cs] +generated_code = true + +[*.csproj] +generated_code = true + +[*] +# Indentation and spacing +indent_size = 2 +indent_style = space +tab_width = 2 + +# New line preferences +end_of_line = lf +insert_final_newline = true + +# Development files +[*.{cs,csx,cshtml,csproj,razor,sln,props,targets,json,yml,gitignore,}] +charset = "utf-8" +trim_trailing_whitespace = true + +#### .NET Coding Conventions #### +[*.cs] + +# Organize usings +dotnet_separate_import_directive_groups = false +dotnet_sort_system_directives_first = false + +# this. and Me. preferences +dotnet_style_qualification_for_event = false:silent +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_property = false:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent + +# Expression-level preferences +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_object_initializer = true:suggestion +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion + +# Field preferences +dotnet_style_readonly_field = true:suggestion + +# Parameter preferences +dotnet_code_quality_unused_parameters = all:suggestion + +#### C# Coding Conventions #### + +# var preferences +csharp_style_var_elsewhere = false:warning +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:warning + +# Expression-bodied members +csharp_style_expression_bodied_accessors = when_on_single_line:warning +csharp_style_expression_bodied_constructors = false:warning +csharp_style_expression_bodied_indexers = when_on_single_line:warning +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = false:suggestion +csharp_style_expression_bodied_methods = when_on_single_line:warning +csharp_style_expression_bodied_operators = when_on_single_line:warning +csharp_style_expression_bodied_properties = when_on_single_line:warning + +# Pattern Matching +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion + + +# "Null" checking preferences +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_prefer_static_local_function = true:suggestion +csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion + +# Code-block preferences +csharp_prefer_braces = when-multiline:suggestion +csharp_prefer_simple_using_statement = true:suggestion + +# Expression-level preferences +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +# 'using' directive preferences +csharp_using_directive_placement = inside_namespace:suggestion + +# Namespace preferences +csharp_style_namespace_declarations = file_scoped:error + +#### C# Formatting Rules #### + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +#### Naming styles #### + +# Naming rules + +# Interfaces should begin with an I and be PascalCase +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 = interface_style + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_style.interface_style.required_prefix = I +dotnet_naming_style.interface_style.required_suffix = +dotnet_naming_style.interface_style.word_separator = +dotnet_naming_style.interface_style.capitalization = pascal_case + +# Types should be PascalCase +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 = types_style + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_style.types_style.capitalization = pascal_case + +# Non-private static fields are PascalCase +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style + +dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected +dotnet_naming_symbols.non_private_static_fields.required_modifiers = static + +dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case + +# Constants are PascalCase +dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants +dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style + +dotnet_naming_symbols.constants.applicable_kinds = field, local +dotnet_naming_symbols.constants.required_modifiers = const + +dotnet_naming_style.constant_style.capitalization = pascal_case + +# Static fields are camelCase and start with s_ +dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion +dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields +dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style + +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static + +dotnet_naming_style.static_field_style.capitalization = pascal_case +dotnet_naming_style.static_field_style.required_prefix = s_ + +# local variables should be camelCase +dotnet_naming_rule.camel_case_for_local_variables.severity = suggestion +dotnet_naming_rule.camel_case_for_local_variables.symbols = local_variables +dotnet_naming_rule.camel_case_for_local_variables.style = local_variables_style + +dotnet_naming_symbols.local_variables.applicable_kinds = local + +dotnet_naming_style.local_variables_style.capitalization = camel_case + +# Parameters should be prefixed with an 'a' +dotnet_naming_rule.parameters_should_be_prefixed.severity = suggestion +dotnet_naming_rule.parameters_should_be_prefixed.symbols = parameters +dotnet_naming_rule.parameters_should_be_prefixed.style = parameter_style + +dotnet_naming_symbols.parameters.applicable_kinds = parameter + +dotnet_naming_style.parameter_style.required_prefix = a +dotnet_naming_style.parameter_style.capitalization = pascal_case + +# Local functions are PascalCase +dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function + +dotnet_naming_style.local_function_style.capitalization = pascal_case + + +#### Analyizer settings #### +dotnet_code_quality.null_check_validation_methods = NotNull + +# CA1062: Validate arguments of public methods +# TODO: Turn this back on when figure out how to get Dawn.Guard to not trigger it. +dotnet_diagnostic.CA1062.severity = silent + +# CA1308: Normalize strings to uppercase +dotnet_diagnostic.CA1308.severity = none diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.gitignore b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.gitignore index df8c3204d..0dbeacad6 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.gitignore +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.gitignore @@ -1,293 +1,293 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ -**/Properties/launchSettings.json - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Typescript v1 declaration files -typings/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs -/BlazorDefault2018-05-02.Client/ -/BlazorDefault2018-05-02.Server/ -/BlazorDefault2018-05-02.Shared/ -/.vscode/ -/source/BlazorState.Js/dist/ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs +/BlazorDefault2018-05-02.Client/ +/BlazorDefault2018-05-02.Server/ +/BlazorDefault2018-05-02.Shared/ +/.vscode/ +/source/BlazorState.Js/dist/ diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/template.json b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/template.json index 2fc9d66f5..c743fd6e0 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/template.json +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/template.json @@ -1,21 +1,21 @@ -{ - "$schema": "http://json.schemastore.org/template", - "author": "Steven T. Cramer", - "classifications": [ - "TimeWarp", - "Console" - ], - "groupIdentity": "TimeWarp.Console", - "guids": [ ], - "identity": "TimeWarp.Console.CSharp", - "name": "TimeWarp Console", - "preferNameDirectory": true, - "shortName": "timewarp-console", - "sourceName": "Console-CSharp", - "sources": [{ - }], - "tags": { - "language": "C#", - "type": "project" - } -} +{ + "$schema": "http://json.schemastore.org/template", + "author": "Steven T. Cramer", + "classifications": [ + "TimeWarp", + "Console" + ], + "groupIdentity": "TimeWarp.Console", + "guids": [ ], + "identity": "TimeWarp.Console.CSharp", + "name": "TimeWarp Console", + "preferNameDirectory": true, + "shortName": "timewarp-console", + "sourceName": "Console-CSharp", + "sources": [{ + }], + "tags": { + "language": "C#", + "type": "project" + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/vs-2017.3.host.json b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/vs-2017.3.host.json index c72caba03..fbab17a68 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/vs-2017.3.host.json +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/.template.config/vs-2017.3.host.json @@ -1,22 +1,22 @@ -{ - "$schema": "http://json.schemastore.org/vs-2017.3.host", - "name": { - "text": "Blazor-State (ASP.NET Core hosted)", - "package": "{19b70607-96c6-4da2-9ac2-945105fba6eb}", - "id": "1050" - }, - "description": { - "text": "A project template for creating a Blazor application that runs on WebAssembly and is hosted on an ASP.NET Core server. Utilizing MediatR and Blazor-State", - "package": "{19b70607-96c6-4da2-9ac2-945105fba6eb}", - "id": "1051" - }, - "order": 300, - "icon": "icon.png", - "learnMoreLink": "https://timewarpengineering.github.io/blazor-state/", - "uiFilters": [ - "oneaspnet" - ], - "additionalWizardParameters": { - "$isMultiProjectTemplate$": "true" - } +{ + "$schema": "http://json.schemastore.org/vs-2017.3.host", + "name": { + "text": "Blazor-State (ASP.NET Core hosted)", + "package": "{19b70607-96c6-4da2-9ac2-945105fba6eb}", + "id": "1050" + }, + "description": { + "text": "A project template for creating a Blazor application that runs on WebAssembly and is hosted on an ASP.NET Core server. Utilizing MediatR and Blazor-State", + "package": "{19b70607-96c6-4da2-9ac2-945105fba6eb}", + "id": "1051" + }, + "order": 300, + "icon": "icon.png", + "learnMoreLink": "https://timewarpengineering.github.io/blazor-state/", + "uiFilters": [ + "oneaspnet" + ], + "additionalWizardParameters": { + "$isMultiProjectTemplate$": "true" + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Documentation/TemplateOverview.md b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Documentation/TemplateOverview.md index 8c5888944..dee3e22d5 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Documentation/TemplateOverview.md +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Documentation/TemplateOverview.md @@ -1,171 +1,171 @@ -ο»Ώ![TimeWarp Logo](https://github.com/TimeWarpEngineering/timewarp-architecture/raw/master/Assets/Logo.png) - -# TimeWarp Console Template -A dotnet core template with MediatR based console commands. -The command line help is derived from xml documentation comments. - -## Motivation - -* Increase the speed of developing command-line tools -* use consistent architecture pattern -* allow for the ability to expose other MediatR based functionality to the command-line. - -## Github - - Currently this template is part of the blazor-state mono-repo located on github @ - https://github.com/TimeWarpEngineering/blazor-state - -## Features - -* Utilizes the experimental [CliCommandLineParser](https://github.com/dotnet/CliCommandLineParser) for consistent cli behavior. - -* Automatic commandline parameters and help. - - The `TimeWarpCommandLineBuilder` class automaticaly builds commandline parameters and cli help -from your MediatR `IRequest` base on your xml doc comments. - - > See `\Source\Commands\SampleCommand\SampleCommandRequest.cs` for an example. - -## Build Status - -Master: - -[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/ConsoleTemplate-Yaml?branchName=master)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=14?branchName=master) - -Development: - -[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/Development/ConsoleTemplate-Yaml?branchName=dev)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=13?branchName=dev) - -## Installation - -### Installation requirements - -* [dotnet sdk 2.2 or later](https://dotnet.microsoft.com/download) -* [powershell core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-6) - > used to run the Publish.ps1 script which will publish the Operating system dependent version. - -### Install Template - -``` -dotnet new --install TimeWarp.Console.Template -``` - - - -## Usage - -### Generate the template -``` -dotnet new timewarp-console -n MyConsoleApp -``` - -Change to the newly created directory -``` -cd MyConsoleApp -``` - -### Publish - - -``` -.\Publish.ps1 -``` - -This will run `dotnet publish` and build the Operating system specific -output version and add that output directory to your PowerShell path. - - -### Run - -``` -MyConsoleApp --help -``` - -#### Output - -``` -Ξ» MyConsoleApp --help -Usage: - MyConsoleApp [options] [command] - -Options: - --version Display version information - -Commands: - SampleCommand Sample Command. -``` -### Run sub-command - -``` -MyConsoleApp SampleCommand --help -``` - -#### Output - -``` -Ξ» MyConsoleApp SampleCommand --help -SampleCommand: - Sample Command. - -Usage: - MyConsoleApp SampleCommand [options] - -Options: - --Parameter1 Some string - --Parameter2 Some integer - --Parameter3 Another Integer - -``` -### Test Execution - -From the test project directory. Run: -``` -dotnet test -``` - -#### Output - -``` -Ξ» dotnet test -Build started, please wait... -Build completed. - -Test run for C:\git\temp\Test1\MyConsoleApp\Tests\MyConsoleApp.Tests\bin\Debug\netcoreapp2.2\MyConsoleApp.Tests.dll(.NETCoreApp,Version=v2.2) -Microsoft (R) Test Execution Command Line Tool Version 15.9.0 -Copyright (c) Microsoft Corporation. All rights reserved. - -Starting test execution, please wait... - -Total tests: 4. Passed: 4. Failed: 0. Skipped: 0. -Test Run Successful. -Test execution time: 2.2818 Seconds -``` - -## Template Contents - -### Projects - -Source\MyConsoleApp.csproj - -### Test Projects - -Tests\MyConsoleApp.Tests\MyConsoleApp.Tests.csproj - -### Code style -The template includes the following coding style configurations. -* .editorconfig -* CodeMaid.config - -and should follow the [TimeWarp Coding Standards](TODO) - -https://github.com/aspnet/AspNetCore/wiki/Engineering-guidelines#coding-guidelines - -## Contribute - -When contributing to this repository, -please first discuss the change you wish to make via an issue, -before making a change. - -## License - -The [Unlicense](https://choosealicense.com/licenses/unlicense/) +ο»Ώ![TimeWarp Logo](https://github.com/TimeWarpEngineering/timewarp-architecture/raw/master/Assets/Logo.png) + +# TimeWarp Console Template +A dotnet core template with MediatR based console commands. +The command line help is derived from xml documentation comments. + +## Motivation + +* Increase the speed of developing command-line tools +* use consistent architecture pattern +* allow for the ability to expose other MediatR based functionality to the command-line. + +## Github + + Currently this template is part of the blazor-state mono-repo located on github @ + https://github.com/TimeWarpEngineering/blazor-state + +## Features + +* Utilizes the experimental [CliCommandLineParser](https://github.com/dotnet/CliCommandLineParser) for consistent cli behavior. + +* Automatic commandline parameters and help. + + The `TimeWarpCommandLineBuilder` class automaticaly builds commandline parameters and cli help +from your MediatR `IRequest` base on your xml doc comments. + + > See `\Source\Commands\SampleCommand\SampleCommandRequest.cs` for an example. + +## Build Status + +Master: + +[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/ConsoleTemplate-Yaml?branchName=master)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=14?branchName=master) + +Development: + +[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/Development/ConsoleTemplate-Yaml?branchName=dev)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=13?branchName=dev) + +## Installation + +### Installation requirements + +* [dotnet sdk 2.2 or later](https://dotnet.microsoft.com/download) +* [powershell core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-6) + > used to run the Publish.ps1 script which will publish the Operating system dependent version. + +### Install Template + +``` +dotnet new --install TimeWarp.Console.Template +``` + + + +## Usage + +### Generate the template +``` +dotnet new timewarp-console -n MyConsoleApp +``` + +Change to the newly created directory +``` +cd MyConsoleApp +``` + +### Publish + + +``` +.\Publish.ps1 +``` + +This will run `dotnet publish` and build the Operating system specific +output version and add that output directory to your PowerShell path. + + +### Run + +``` +MyConsoleApp --help +``` + +#### Output + +``` +Ξ» MyConsoleApp --help +Usage: + MyConsoleApp [options] [command] + +Options: + --version Display version information + +Commands: + SampleCommand Sample Command. +``` +### Run sub-command + +``` +MyConsoleApp SampleCommand --help +``` + +#### Output + +``` +Ξ» MyConsoleApp SampleCommand --help +SampleCommand: + Sample Command. + +Usage: + MyConsoleApp SampleCommand [options] + +Options: + --Parameter1 Some string + --Parameter2 Some integer + --Parameter3 Another Integer + +``` +### Test Execution + +From the test project directory. Run: +``` +dotnet test +``` + +#### Output + +``` +Ξ» dotnet test +Build started, please wait... +Build completed. + +Test run for C:\git\temp\Test1\MyConsoleApp\Tests\MyConsoleApp.Tests\bin\Debug\netcoreapp2.2\MyConsoleApp.Tests.dll(.NETCoreApp,Version=v2.2) +Microsoft (R) Test Execution Command Line Tool Version 15.9.0 +Copyright (c) Microsoft Corporation. All rights reserved. + +Starting test execution, please wait... + +Total tests: 4. Passed: 4. Failed: 0. Skipped: 0. +Test Run Successful. +Test execution time: 2.2818 Seconds +``` + +## Template Contents + +### Projects + +Source\MyConsoleApp.csproj + +### Test Projects + +Tests\MyConsoleApp.Tests\MyConsoleApp.Tests.csproj + +### Code style +The template includes the following coding style configurations. +* .editorconfig +* CodeMaid.config + +and should follow the [TimeWarp Coding Standards](TODO) + +https://github.com/aspnet/AspNetCore/wiki/Engineering-guidelines#coding-guidelines + +## Contribute + +When contributing to this repository, +please first discuss the change you wish to make via an issue, +before making a change. + +## License + +The [Unlicense](https://choosealicense.com/licenses/unlicense/) diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/LICENSE.md b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/LICENSE.md index edeed7901..68a49daad 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/LICENSE.md +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/LICENSE.md @@ -1,24 +1,24 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/NuGet.config b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/NuGet.config index 8495a6842..e59e698f5 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/NuGet.config +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/NuGet.config @@ -1,10 +1,10 @@ -ο»Ώ - - - - - - - - - +ο»Ώ + + + + + + + + + diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Publish.ps1 b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Publish.ps1 index 94c673026..5699e0007 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Publish.ps1 +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Publish.ps1 @@ -1,8 +1,8 @@ -# TODO build for other environments -dotnet publish .\Source\Console-CSharp.csproj --configuration Release --runtime win10-x64 - - -$CommandDir = $PSScriptRoot + "\bin\netcoreapp2.2\win10-x64" -if (!$env:Path.Contains($CommandDir)) { - $env:Path += ";" + $CommandDir -} +# TODO build for other environments +dotnet publish .\Source\Console-CSharp.csproj --configuration Release --runtime win10-x64 + + +$CommandDir = $PSScriptRoot + "\bin\netcoreapp2.2\win10-x64" +if (!$env:Path.Contains($CommandDir)) { + $env:Path += ";" + $CommandDir +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/README.md b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/README.md index e6d1860cd..e81030822 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/README.md +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/README.md @@ -1,95 +1,95 @@ -ο»Ώ![TimeWarp Logo](https://github.com/TimeWarpEngineering/timewarp-architecture/raw/master/Assets/Logo.png) - -# TimeWarp.Console-CSharp -A dotnet core template with MediatR based console commands. -The command line help is derived from xml documentation comments. - -## Motivation - -* Point 1 -* Point 2 - -## Github - - Reference the repository location. - -## Features - -* Feature 1 -* Feature 2 - -## Build Status - -*TODO: Replace these badges with proper ones from Azure DevOps.* - -Master: - -[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/ConsoleTemplate-Yaml?branchName=master)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=14?branchName=master) - -Development: - -[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/Development/ConsoleTemplate-Yaml?branchName=dev)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=13?branchName=dev) - -## Installation - -*TODO: Add your Installation instructions here* - -## Usage - -### Publish - -``` -.\Publish.ps1 -``` - -This will run `dotnet publish` and build the Windows specific -output version and add that output directory to your powershell path. - -### Run - -``` -TimeWarp.Console-CSharp --help -``` - -#### Output - -*TODO: show the output of the help command here -``` -TODO: -``` -### Run sub-command - -*TODO: update subcommand as needed -``` -TimeWarp.Console-CSharp SampleCommand --help -``` - -#### Output -*TODO: show the output of the help command here -``` -TODO: -``` - -### Test Execution - -From the test project directory. Run: -``` -dotnet test -``` - -#### Output -*TODO: show the output of the help command here - -``` -TODO: -``` - -## Contribute - -When contributing to this repository, -please first discuss the change you wish to make via an issue, -before making a change. - -## License - -The [Unlicense](https://choosealicense.com/licenses/unlicense/) +ο»Ώ![TimeWarp Logo](https://github.com/TimeWarpEngineering/timewarp-architecture/raw/master/Assets/Logo.png) + +# TimeWarp.Console-CSharp +A dotnet core template with MediatR based console commands. +The command line help is derived from xml documentation comments. + +## Motivation + +* Point 1 +* Point 2 + +## Github + + Reference the repository location. + +## Features + +* Feature 1 +* Feature 2 + +## Build Status + +*TODO: Replace these badges with proper ones from Azure DevOps.* + +Master: + +[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/ConsoleTemplate-Yaml?branchName=master)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=14?branchName=master) + +Development: + +[![Build Status](https://timewarpenterprises.visualstudio.com/Blazor-State/_apis/build/status/Development/ConsoleTemplate-Yaml?branchName=dev)](https://timewarpenterprises.visualstudio.com/Blazor-State/_build/latest?definitionId=13?branchName=dev) + +## Installation + +*TODO: Add your Installation instructions here* + +## Usage + +### Publish + +``` +.\Publish.ps1 +``` + +This will run `dotnet publish` and build the Windows specific +output version and add that output directory to your powershell path. + +### Run + +``` +TimeWarp.Console-CSharp --help +``` + +#### Output + +*TODO: show the output of the help command here +``` +TODO: +``` +### Run sub-command + +*TODO: update subcommand as needed +``` +TimeWarp.Console-CSharp SampleCommand --help +``` + +#### Output +*TODO: show the output of the help command here +``` +TODO: +``` + +### Test Execution + +From the test project directory. Run: +``` +dotnet test +``` + +#### Output +*TODO: show the output of the help command here + +``` +TODO: +``` + +## Contribute + +When contributing to this repository, +please first discuss the change you wish to make via an issue, +before making a change. + +## License + +The [Unlicense](https://choosealicense.com/licenses/unlicense/) diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Behaviors/ValidationBehavior.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Behaviors/ValidationBehavior.cs index 163bfc79d..4ced1ecce 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Behaviors/ValidationBehavior.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Behaviors/ValidationBehavior.cs @@ -1,39 +1,39 @@ -ο»Ώnamespace Console_CSharp.Behaviors; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using FluentValidation; -using FluentValidation.Results; -using MediatR.Pipeline; - -internal class ValidationBehavior : IRequestPreProcessor -{ - private IEnumerable> Validators { get; } - - public ValidationBehavior(IEnumerable> aValidators) - { - Validators = aValidators; - } - - public Task Process(TRequest aRequest, CancellationToken aCancellationToken) - { - var validationContext = new ValidationContext(aRequest); - List validationFailures = Validators - .Select(aValidationResult => aValidationResult.Validate(validationContext)) - .SelectMany(aValidationResult => aValidationResult.Errors) - .Where(aValidationFailure => aValidationFailure != null) - .ToList(); - - if (validationFailures.Count != 0) - { - validationFailures.ForEach(aValidationFailure => Console.Error.WriteLine(aValidationFailure.ErrorMessage)); - - throw new ValidationException(validationFailures); - } - - return Task.CompletedTask; - } -} +ο»Ώnamespace Console_CSharp.Behaviors; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using FluentValidation; +using FluentValidation.Results; +using MediatR.Pipeline; + +internal class ValidationBehavior : IRequestPreProcessor +{ + private IEnumerable> Validators { get; } + + public ValidationBehavior(IEnumerable> aValidators) + { + Validators = aValidators; + } + + public Task Process(TRequest aRequest, CancellationToken aCancellationToken) + { + var validationContext = new ValidationContext(aRequest); + List validationFailures = Validators + .Select(aValidationResult => aValidationResult.Validate(validationContext)) + .SelectMany(aValidationResult => aValidationResult.Errors) + .Where(aValidationFailure => aValidationFailure != null) + .ToList(); + + if (validationFailures.Count != 0) + { + validationFailures.ForEach(aValidationFailure => Console.Error.WriteLine(aValidationFailure.ErrorMessage)); + + throw new ValidationException(validationFailures); + } + + return Task.CompletedTask; + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/CommandHandler.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/CommandHandler.cs index 3de3eded2..9bae3eeb2 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/CommandHandler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/CommandHandler.cs @@ -1,55 +1,55 @@ -ο»Ώnamespace Console_CSharp; - -using System; -using System.CommandLine; -using System.CommandLine.Invocation; -using System.CommandLine.Parsing; -using System.Reflection; -using System.Threading.Tasks; -using MediatR; - -internal class MediatorCommandHandler : ICommandHandler -{ - private IMediator Mediator { get; } - - private Type Type { get; } - - public MediatorCommandHandler(Type aType, IMediator aMediator) - { - Type = aType; - Mediator = aMediator; - } - - public async Task InvokeAsync(InvocationContext aInvocationContext) - { - try - { - var request = (IRequest)Activator.CreateInstance(Type); - foreach (SymbolResult symbolResult in aInvocationContext.ParseResult.CommandResult.Children) - { - Type optionResultType = typeof(OptionResult); - - object theArgumentConversionResult = - optionResultType.GetProperty("ArgumentConversionResult", BindingFlags.NonPublic | BindingFlags.Instance) - ?.GetValue(symbolResult); - - Type successfulArgumentConversionResultType = - optionResultType.Assembly.GetType("System.CommandLine.Binding.SuccessfulArgumentConversionResult"); - - object theValue = - successfulArgumentConversionResultType.GetProperty("Value")?.GetValue(theArgumentConversionResult); - - Type.GetProperty(symbolResult.Symbol.Name).SetValue(request, theValue); // "Haa",9,7,"Ha" - } - - await Mediator.Send(request); - - return 0; - } - catch (Exception excpetion) - { - Console.Error.WriteLine(excpetion.Message); - return 1; - } - } -} +ο»Ώnamespace Console_CSharp; + +using System; +using System.CommandLine; +using System.CommandLine.Invocation; +using System.CommandLine.Parsing; +using System.Reflection; +using System.Threading.Tasks; +using MediatR; + +internal class MediatorCommandHandler : ICommandHandler +{ + private IMediator Mediator { get; } + + private Type Type { get; } + + public MediatorCommandHandler(Type aType, IMediator aMediator) + { + Type = aType; + Mediator = aMediator; + } + + public async Task InvokeAsync(InvocationContext aInvocationContext) + { + try + { + var request = (IRequest)Activator.CreateInstance(Type); + foreach (SymbolResult symbolResult in aInvocationContext.ParseResult.CommandResult.Children) + { + Type optionResultType = typeof(OptionResult); + + object theArgumentConversionResult = + optionResultType.GetProperty("ArgumentConversionResult", BindingFlags.NonPublic | BindingFlags.Instance) + ?.GetValue(symbolResult); + + Type successfulArgumentConversionResultType = + optionResultType.Assembly.GetType("System.CommandLine.Binding.SuccessfulArgumentConversionResult"); + + object theValue = + successfulArgumentConversionResultType.GetProperty("Value")?.GetValue(theArgumentConversionResult); + + Type.GetProperty(symbolResult.Symbol.Name).SetValue(request, theValue); // "Haa",9,7,"Ha" + } + + await Mediator.Send(request); + + return 0; + } + catch (Exception excpetion) + { + Console.Error.WriteLine(excpetion.Message); + return 1; + } + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandHandler.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandHandler.cs index 10d47fcd9..11732a53d 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandHandler.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandHandler.cs @@ -1,17 +1,17 @@ -ο»Ώnamespace Console_CSharp.Commands.SampleCommand; - -using System; -using System.Threading; -using System.Threading.Tasks; -using MediatR; - -internal class SampleCommandHandler: IRequestHandler -{ - public Task Handle(SampleCommandRequest aSampleCommandRequest, CancellationToken aCancellationToken) - { - Console.WriteLine($"Parameter1:{aSampleCommandRequest.Parameter1}"); - Console.WriteLine($"Parameter1:{aSampleCommandRequest.Parameter2}"); - Console.WriteLine($"Parameter1:{aSampleCommandRequest.Parameter3}"); - return Unit.Task; - } -} +ο»Ώnamespace Console_CSharp.Commands.SampleCommand; + +using System; +using System.Threading; +using System.Threading.Tasks; +using MediatR; + +internal class SampleCommandHandler: IRequestHandler +{ + public Task Handle(SampleCommandRequest aSampleCommandRequest, CancellationToken aCancellationToken) + { + Console.WriteLine($"Parameter1:{aSampleCommandRequest.Parameter1}"); + Console.WriteLine($"Parameter1:{aSampleCommandRequest.Parameter2}"); + Console.WriteLine($"Parameter1:{aSampleCommandRequest.Parameter3}"); + return Unit.Task; + } +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandRequest.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandRequest.cs index b92b04640..5452d10bf 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandRequest.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandRequest.cs @@ -1,26 +1,26 @@ -ο»Ώnamespace Console_CSharp.Commands.SampleCommand; - -using MediatR; - -/// -/// Sample Command. -/// -public class SampleCommandRequest : IRequest -{ - - /// - /// Some string - /// - public string Parameter1 { get; set; } - - /// - /// Some integer - /// - public int Parameter2 { get; set; } - - /// - /// Another Integer - /// - public int Parameter3 { get; set; } - +ο»Ώnamespace Console_CSharp.Commands.SampleCommand; + +using MediatR; + +/// +/// Sample Command. +/// +public class SampleCommandRequest : IRequest +{ + + /// + /// Some string + /// + public string Parameter1 { get; set; } + + /// + /// Some integer + /// + public int Parameter2 { get; set; } + + /// + /// Another Integer + /// + public int Parameter3 { get; set; } + } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandValidator.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandValidator.cs index ad3716c3a..869dae65b 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandValidator.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Commands/SampleCommand/SampleCommandValidator.cs @@ -1,19 +1,19 @@ -ο»Ώnamespace Console_CSharp.Commands.SampleCommand; - -using FluentValidation; - -internal class SampleCommandValidator : AbstractValidator -{ - public SampleCommandValidator() - { - RuleFor(aSampleCommandRequest => aSampleCommandRequest) - .Must(ValidateParameter3GreaterthanParameter2) - .WithMessage("Parameter3 must be greater than Parameter2"); - RuleFor(aSetVersionRequest => aSetVersionRequest.Parameter1).MinimumLength(3); - RuleFor(aSetVersionRequest => aSetVersionRequest.Parameter2).GreaterThanOrEqualTo(0); - RuleFor(aSetVersionRequest => aSetVersionRequest.Parameter3).LessThanOrEqualTo(10); - } - - private bool ValidateParameter3GreaterthanParameter2(SampleCommandRequest aSampleCommandRequest) => - (aSampleCommandRequest.Parameter3 > aSampleCommandRequest.Parameter2); +ο»Ώnamespace Console_CSharp.Commands.SampleCommand; + +using FluentValidation; + +internal class SampleCommandValidator : AbstractValidator +{ + public SampleCommandValidator() + { + RuleFor(aSampleCommandRequest => aSampleCommandRequest) + .Must(ValidateParameter3GreaterthanParameter2) + .WithMessage("Parameter3 must be greater than Parameter2"); + RuleFor(aSetVersionRequest => aSetVersionRequest.Parameter1).MinimumLength(3); + RuleFor(aSetVersionRequest => aSetVersionRequest.Parameter2).GreaterThanOrEqualTo(0); + RuleFor(aSetVersionRequest => aSetVersionRequest.Parameter3).LessThanOrEqualTo(10); + } + + private bool ValidateParameter3GreaterthanParameter2(SampleCommandRequest aSampleCommandRequest) => + (aSampleCommandRequest.Parameter3 > aSampleCommandRequest.Parameter2); } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Console-CSharp.csproj b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Console-CSharp.csproj index e73f47151..a9df2babb 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Console-CSharp.csproj +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Console-CSharp.csproj @@ -1,19 +1,19 @@ -ο»Ώ - - - Exe - ..\bin - net9.0 - ..\bin\$(TargetFramework)\$(AssemblyName).xml - - - - - - - - - - - - +ο»Ώ + + + Exe + ..\bin + net9.0 + ..\bin\$(TargetFramework)\$(AssemblyName).xml + + + + + + + + + + + + diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Constants.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Constants.cs index 75bd34652..0b50791d4 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Constants.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Constants.cs @@ -1,9 +1,9 @@ -ο»Ώnamespace Console_CSharp; - -internal static class Constants -{ - /// - /// Example constant this one is not used in this template - /// - public const string SplitStringRegEx = @"(^[a-z\-\d]+|[A-Z]+(?![a-z])|[A-Z\-\d][a-z\-\d]+)"; +ο»Ώnamespace Console_CSharp; + +internal static class Constants +{ + /// + /// Example constant this one is not used in this template + /// + public const string SplitStringRegEx = @"(^[a-z\-\d]+|[A-Z]+(?![a-z])|[A-Z\-\d][a-z\-\d]+)"; } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/GlobalSuppressions.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/GlobalSuppressions.cs index d47d3bda5..2414b9dde 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/GlobalSuppressions.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/GlobalSuppressions.cs @@ -1,8 +1,8 @@ -ο»Ώ -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0007:Use implicit type", Justification = "", Scope = "member", Target = "~M:Console_CSharp.Behaviors.ValidationBehavior`1.Process(`0,System.Threading.CancellationToken)~System.Threading.Tasks.Task")] - +ο»Ώ +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. + +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0007:Use implicit type", Justification = "", Scope = "member", Target = "~M:Console_CSharp.Behaviors.ValidationBehavior`1.Process(`0,System.Threading.CancellationToken)~System.Threading.Tasks.Task")] + diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/InternalsVisibleToTest.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/InternalsVisibleToTest.cs index ab84154d6..057471e9f 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/InternalsVisibleToTest.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/InternalsVisibleToTest.cs @@ -1,3 +1,3 @@ -ο»Ώusing System.Runtime.CompilerServices; - +ο»Ώusing System.Runtime.CompilerServices; + [assembly: InternalsVisibleTo("Console-CSharp.Tests")] \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Program.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Program.cs index 86035c96d..bea984589 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Program.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Program.cs @@ -1,16 +1,16 @@ -ο»Ώnamespace Console_CSharp; - -using System.CommandLine; -using System.CommandLine.Builder; -using System.CommandLine.Parsing; -using System.Threading.Tasks; - -internal class Program -{ - internal static Task Main(string[] aArgumentArray) - { - Parser parser = new TimeWarpCommandLineBuilder().Build(); - - return parser.InvokeAsync(aArgumentArray); - } +ο»Ώnamespace Console_CSharp; + +using System.CommandLine; +using System.CommandLine.Builder; +using System.CommandLine.Parsing; +using System.Threading.Tasks; + +internal class Program +{ + internal static Task Main(string[] aArgumentArray) + { + Parser parser = new TimeWarpCommandLineBuilder().Build(); + + return parser.InvokeAsync(aArgumentArray); + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Services/GitService.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Services/GitService.cs index 71cb1f324..841df3887 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Services/GitService.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Services/GitService.cs @@ -1,39 +1,39 @@ -ο»Ώnamespace Console_CSharp.Services; - -using System; -using System.IO; -using System.Linq; - -/// -/// Services related to git -/// -internal class GitService -{ - /// - /// Get the root of the git repo if this is one. - /// - /// DirectoryInfo or null - public DirectoryInfo GitRootDirectoryInfo() - { - var directory = new DirectoryInfo(Environment.CurrentDirectory); - bool found = IsGitDirectory(directory); - while (!found && directory.Parent != null) - { - directory = directory.Parent; - found = IsGitDirectory(directory); - } - - return directory; - } - - /// - /// Checks if the current directory is the root of a git repo. - /// - /// - /// - public bool IsGitDirectory(DirectoryInfo aDirectoryInfo) - { - const string GitDirectoryName = ".git"; - return aDirectoryInfo.GetDirectories(GitDirectoryName).Any(); - } +ο»Ώnamespace Console_CSharp.Services; + +using System; +using System.IO; +using System.Linq; + +/// +/// Services related to git +/// +internal class GitService +{ + /// + /// Get the root of the git repo if this is one. + /// + /// DirectoryInfo or null + public DirectoryInfo GitRootDirectoryInfo() + { + var directory = new DirectoryInfo(Environment.CurrentDirectory); + bool found = IsGitDirectory(directory); + while (!found && directory.Parent != null) + { + directory = directory.Parent; + found = IsGitDirectory(directory); + } + + return directory; + } + + /// + /// Checks if the current directory is the root of a git repo. + /// + /// + /// + public bool IsGitDirectory(DirectoryInfo aDirectoryInfo) + { + const string GitDirectoryName = ".git"; + return aDirectoryInfo.GetDirectories(GitDirectoryName).Any(); + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Startup.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Startup.cs index b6ce913b6..25a29ae72 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Startup.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/Startup.cs @@ -1,35 +1,35 @@ -ο»Ώnamespace Console_CSharp; - -using System.CommandLine.Builder; -using System.CommandLine.Invocation; -using FluentValidation; -using MediatR.Pipeline; -using Microsoft.Extensions.DependencyInjection; -using Console_CSharp.Behaviors; -using Console_CSharp.Services; -using Console_CSharp.Commands.SampleCommand; - -internal class Startup -{ - public void Configure(TimeWarpCommandLineBuilder aTimeWarpCommandLineBuilder) - { - aTimeWarpCommandLineBuilder - .UseVersionOption() - // middleware - .UseHelp() - .UseParseDirective() - .UseDebugDirective() - .UseSuggestDirective() - .RegisterWithDotnetSuggest() - .UseParseErrorReporting() - .UseExceptionHandler(); - } - - public void ConfigureServices(IServiceCollection aServiceCollection) - { - aServiceCollection.AddScoped(typeof(IRequestPreProcessor<>), typeof(ValidationBehavior<>)); - aServiceCollection.AddScoped(typeof(IValidator), typeof(SampleCommandValidator)); - aServiceCollection.AddLogging(); - aServiceCollection.AddSingleton(); - } +ο»Ώnamespace Console_CSharp; + +using System.CommandLine.Builder; +using System.CommandLine.Invocation; +using FluentValidation; +using MediatR.Pipeline; +using Microsoft.Extensions.DependencyInjection; +using Console_CSharp.Behaviors; +using Console_CSharp.Services; +using Console_CSharp.Commands.SampleCommand; + +internal class Startup +{ + public void Configure(TimeWarpCommandLineBuilder aTimeWarpCommandLineBuilder) + { + aTimeWarpCommandLineBuilder + .UseVersionOption() + // middleware + .UseHelp() + .UseParseDirective() + .UseDebugDirective() + .UseSuggestDirective() + .RegisterWithDotnetSuggest() + .UseParseErrorReporting() + .UseExceptionHandler(); + } + + public void ConfigureServices(IServiceCollection aServiceCollection) + { + aServiceCollection.AddScoped(typeof(IRequestPreProcessor<>), typeof(ValidationBehavior<>)); + aServiceCollection.AddScoped(typeof(IValidator), typeof(SampleCommandValidator)); + aServiceCollection.AddLogging(); + aServiceCollection.AddSingleton(); + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/TimeWarpCommandLineBuilder.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/TimeWarpCommandLineBuilder.cs index 7b9afee9e..3f476bc85 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/TimeWarpCommandLineBuilder.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/TimeWarpCommandLineBuilder.cs @@ -1,88 +1,88 @@ -ο»Ώnamespace System.CommandLine.Builder; - -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using MediatR; -using Microsoft.Extensions.DependencyInjection; -using Console_CSharp; - -internal class TimeWarpCommandLineBuilder : CommandLineBuilder -{ - private static ServiceProvider ServiceProvider { get; set; } - - private IServiceCollection ServiceCollection { get; set; } - - private XmlDocReader XmlDocReader { get; } - - public TimeWarpCommandLineBuilder(Command aRootCommand = null) - : base(aRootCommand ?? new RootCommand()) - { - var startup = new Startup(); - ServiceCollection = new ServiceCollection(); - - startup.ConfigureServices(ServiceCollection); - startup.Configure(this); - - ServiceCollection.AddMediatR(typeof(Startup).Assembly); - - ServiceProvider = ServiceCollection.BuildServiceProvider(); - - //string xmlPath = Assembly.GetEntryAssembly().Location.Replace(".dll", ".xml"); - string xmlPath = Assembly.GetAssembly(typeof(TimeWarpCommandLineBuilder)).Location.Replace(".dll", ".xml"); - XmlDocReader = new XmlDocReader(xmlPath); - - UseMediatorCommands(); - } - - public TimeWarpCommandLineBuilder UseMediatorCommands() - { - // Get all serviceDescriptors that implement IRequestHandler - string iRequestHandlerName = typeof(IRequestHandler<>).Name; - const char GenericBackTic = '`'; - iRequestHandlerName = iRequestHandlerName.Substring(0, iRequestHandlerName.IndexOf(GenericBackTic)); - - IEnumerable serviceDescriptors = ServiceCollection.Where(aServiceDescriptor => - aServiceDescriptor.ServiceType.IsConstructedGenericType && aServiceDescriptor.Lifetime == ServiceLifetime.Transient && - aServiceDescriptor.ServiceType.Name.Contains(iRequestHandlerName) && - aServiceDescriptor.ServiceType.IsVisible); - - // Add Command for each IRequest Handled - foreach (ServiceDescriptor serviceDescriptor in serviceDescriptors) - { - BuildCommandForRequest(serviceDescriptor.ServiceType.GenericTypeArguments[0]); - } - return this; - } - - private void BuildCommandForRequest(Type aType) - { - var command = new Command - ( - name: aType.Name.Replace("Request", ""), - description: XmlDocReader.GetDescriptionForType(aType) - ); - command.Handler = new MediatorCommandHandler(aType, ServiceProvider.GetService()); - - // Add command Options from properties - foreach (PropertyInfo propertyInfo in aType.GetProperties()) - { - var option = new Option - ( - alias: $"--{propertyInfo.Name}", - description: XmlDocReader.GetDescriptionForPropertyInfo(propertyInfo), - argumentType: propertyInfo.PropertyType - ); - command.AddOption(option); - } - - this.AddCommand(command); - } - - private Argument CreateGenericArgument(Type aPropertyType) - { - Type argumentType = typeof(Argument<>); - Type genericArgumentType = argumentType.MakeGenericType(aPropertyType); - return Activator.CreateInstance(genericArgumentType) as Argument; - } +ο»Ώnamespace System.CommandLine.Builder; + +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using MediatR; +using Microsoft.Extensions.DependencyInjection; +using Console_CSharp; + +internal class TimeWarpCommandLineBuilder : CommandLineBuilder +{ + private static ServiceProvider ServiceProvider { get; set; } + + private IServiceCollection ServiceCollection { get; set; } + + private XmlDocReader XmlDocReader { get; } + + public TimeWarpCommandLineBuilder(Command aRootCommand = null) + : base(aRootCommand ?? new RootCommand()) + { + var startup = new Startup(); + ServiceCollection = new ServiceCollection(); + + startup.ConfigureServices(ServiceCollection); + startup.Configure(this); + + ServiceCollection.AddMediatR(typeof(Startup).Assembly); + + ServiceProvider = ServiceCollection.BuildServiceProvider(); + + //string xmlPath = Assembly.GetEntryAssembly().Location.Replace(".dll", ".xml"); + string xmlPath = Assembly.GetAssembly(typeof(TimeWarpCommandLineBuilder)).Location.Replace(".dll", ".xml"); + XmlDocReader = new XmlDocReader(xmlPath); + + UseMediatorCommands(); + } + + public TimeWarpCommandLineBuilder UseMediatorCommands() + { + // Get all serviceDescriptors that implement IRequestHandler + string iRequestHandlerName = typeof(IRequestHandler<>).Name; + const char GenericBackTic = '`'; + iRequestHandlerName = iRequestHandlerName.Substring(0, iRequestHandlerName.IndexOf(GenericBackTic)); + + IEnumerable serviceDescriptors = ServiceCollection.Where(aServiceDescriptor => + aServiceDescriptor.ServiceType.IsConstructedGenericType && aServiceDescriptor.Lifetime == ServiceLifetime.Transient && + aServiceDescriptor.ServiceType.Name.Contains(iRequestHandlerName) && + aServiceDescriptor.ServiceType.IsVisible); + + // Add Command for each IRequest Handled + foreach (ServiceDescriptor serviceDescriptor in serviceDescriptors) + { + BuildCommandForRequest(serviceDescriptor.ServiceType.GenericTypeArguments[0]); + } + return this; + } + + private void BuildCommandForRequest(Type aType) + { + var command = new Command + ( + name: aType.Name.Replace("Request", ""), + description: XmlDocReader.GetDescriptionForType(aType) + ); + command.Handler = new MediatorCommandHandler(aType, ServiceProvider.GetService()); + + // Add command Options from properties + foreach (PropertyInfo propertyInfo in aType.GetProperties()) + { + var option = new Option + ( + alias: $"--{propertyInfo.Name}", + description: XmlDocReader.GetDescriptionForPropertyInfo(propertyInfo), + argumentType: propertyInfo.PropertyType + ); + command.AddOption(option); + } + + this.AddCommand(command); + } + + private Argument CreateGenericArgument(Type aPropertyType) + { + Type argumentType = typeof(Argument<>); + Type genericArgumentType = argumentType.MakeGenericType(aPropertyType); + return Activator.CreateInstance(genericArgumentType) as Argument; + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/XmlDocReader.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/XmlDocReader.cs index 84714e5db..a706bef72 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/XmlDocReader.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Source/XmlDocReader.cs @@ -1,36 +1,36 @@ -ο»Ώnamespace Console_CSharp; - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Xml.Linq; - -internal class XmlDocReader -{ - private IEnumerable MemberElements { get; } - - public XmlDocReader(string aPath) - { - XDocument xDocument; - using (TextReader reader = File.OpenText(aPath)) - { - xDocument = XDocument.Load(reader); - } - - MemberElements = xDocument.Root.Descendants("member"); - } - - public string GetDescriptionForName(string aName) - { - XElement memberElement = MemberElements.First(aElement => aElement.Attribute("name").Value == aName); - XElement summary = memberElement.Descendants("summary").FirstOrDefault(); - return summary.Value; - } - - public string GetDescriptionForPropertyInfo(PropertyInfo aPropertyInfo) => - GetDescriptionForName($"P:{aPropertyInfo.DeclaringType.FullName}.{aPropertyInfo.Name}"); - - public string GetDescriptionForType(Type aType) => GetDescriptionForName($"T:{aType.FullName}"); +ο»Ώnamespace Console_CSharp; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Xml.Linq; + +internal class XmlDocReader +{ + private IEnumerable MemberElements { get; } + + public XmlDocReader(string aPath) + { + XDocument xDocument; + using (TextReader reader = File.OpenText(aPath)) + { + xDocument = XDocument.Load(reader); + } + + MemberElements = xDocument.Root.Descendants("member"); + } + + public string GetDescriptionForName(string aName) + { + XElement memberElement = MemberElements.First(aElement => aElement.Attribute("name").Value == aName); + XElement summary = memberElement.Descendants("summary").FirstOrDefault(); + return summary.Value; + } + + public string GetDescriptionForPropertyInfo(PropertyInfo aPropertyInfo) => + GetDescriptionForName($"P:{aPropertyInfo.DeclaringType.FullName}.{aPropertyInfo.Name}"); + + public string GetDescriptionForType(Type aType) => GetDescriptionForName($"T:{aType.FullName}"); } \ No newline at end of file diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Commands/SampleCommandTests.cs b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Commands/SampleCommandTests.cs index 5b8227d7c..6d5df7a32 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Commands/SampleCommandTests.cs +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Commands/SampleCommandTests.cs @@ -1,109 +1,109 @@ -ο»Ώnamespace Console_CSharp.Tests.Commands; - -using System; -using System.IO; -using System.Threading.Tasks; -using Console_CSharp; -using Shouldly; - -internal class SampleCommandTests -{ - public SampleCommandTests() - { - - } - public async Task ShouldFailValidateParameter2GreaterthanParameter3() - { - string[] argumentArray = new string[] - { - "SampleCommand", - "--Parameter1", - "Haa", - "--Parameter2", - "9", - "--Parameter3", - "7" - }; - TextWriter textWriter = Console.Out; - int exitCode = 0; - string error = null; - - using (var stringWriter = new StringWriter()) - { - Console.SetError(stringWriter); - exitCode = await Program.Main(argumentArray); - error = stringWriter.ToString(); - } - Console.SetError(textWriter); - - exitCode.ShouldBe(1); - error.ShouldContain("Parameter3 must be greater than Parameter2"); - - } - - - public async Task ShouldReturnFailure() - { - string[] argumentArray = new string[] - { - "SampleCommand", - "--Parameter1", - "Ha", - "--Parameter2", - "-2", - "--Parameter3", - "11" - }; - TextWriter textWriter = Console.Out; - int exitCode = 0; - string error = null; - - using (var stringWriter = new StringWriter()) - { - Console.SetError(stringWriter); - exitCode = await Program.Main(argumentArray); - error = stringWriter.ToString(); - } - Console.SetError(textWriter); - - exitCode.ShouldBe(1); - error.ShouldContain("'Parameter2' must be greater than or equal to '0'."); - - } - - public async Task NoArgumentsFailsAsync() - { - int exitCode = await Program.Main(null); - exitCode.ShouldBe(1); - } - - public async Task ShouldReturnSuccess() - { - string[] argumentArray = new string[] - { - "SampleCommand", - "--Parameter1", - "ABC", - "--Parameter2", - "2", - "--Parameter3", - "9" - }; - TextWriter textWriter = Console.Out; - int exitCode = 0; - string error = null; - - using (var stringWriter = new StringWriter()) - { - Console.SetError(stringWriter); - exitCode = await Program.Main(argumentArray); - error = stringWriter.ToString(); - } - Console.SetError(textWriter); - - exitCode.ShouldBe(0); - error.ShouldBeNullOrEmpty(); - - } - -} +ο»Ώnamespace Console_CSharp.Tests.Commands; + +using System; +using System.IO; +using System.Threading.Tasks; +using Console_CSharp; +using Shouldly; + +internal class SampleCommandTests +{ + public SampleCommandTests() + { + + } + public async Task ShouldFailValidateParameter2GreaterthanParameter3() + { + string[] argumentArray = new string[] + { + "SampleCommand", + "--Parameter1", + "Haa", + "--Parameter2", + "9", + "--Parameter3", + "7" + }; + TextWriter textWriter = Console.Out; + int exitCode = 0; + string error = null; + + using (var stringWriter = new StringWriter()) + { + Console.SetError(stringWriter); + exitCode = await Program.Main(argumentArray); + error = stringWriter.ToString(); + } + Console.SetError(textWriter); + + exitCode.ShouldBe(1); + error.ShouldContain("Parameter3 must be greater than Parameter2"); + + } + + + public async Task ShouldReturnFailure() + { + string[] argumentArray = new string[] + { + "SampleCommand", + "--Parameter1", + "Ha", + "--Parameter2", + "-2", + "--Parameter3", + "11" + }; + TextWriter textWriter = Console.Out; + int exitCode = 0; + string error = null; + + using (var stringWriter = new StringWriter()) + { + Console.SetError(stringWriter); + exitCode = await Program.Main(argumentArray); + error = stringWriter.ToString(); + } + Console.SetError(textWriter); + + exitCode.ShouldBe(1); + error.ShouldContain("'Parameter2' must be greater than or equal to '0'."); + + } + + public async Task NoArgumentsFailsAsync() + { + int exitCode = await Program.Main(null); + exitCode.ShouldBe(1); + } + + public async Task ShouldReturnSuccess() + { + string[] argumentArray = new string[] + { + "SampleCommand", + "--Parameter1", + "ABC", + "--Parameter2", + "2", + "--Parameter3", + "9" + }; + TextWriter textWriter = Console.Out; + int exitCode = 0; + string error = null; + + using (var stringWriter = new StringWriter()) + { + Console.SetError(stringWriter); + exitCode = await Program.Main(argumentArray); + error = stringWriter.ToString(); + } + Console.SetError(textWriter); + + exitCode.ShouldBe(0); + error.ShouldBeNullOrEmpty(); + + } + +} diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Console-CSharp.Tests.csproj b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Console-CSharp.Tests.csproj index 465792ff1..606c07343 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Console-CSharp.Tests.csproj +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/Tests/Console-CSharp.Tests/Console-CSharp.Tests.csproj @@ -1,18 +1,18 @@ -ο»Ώ - - - net9.0 - Console_CSharp.Tests - - - - - - - - - - - - - +ο»Ώ + + + net9.0 + Console_CSharp.Tests + + + + + + + + + + + + + diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/TimeWarp.Console-CSharp.sln b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/TimeWarp.Console-CSharp.sln index d557c5c9d..ae6dd4989 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/TimeWarp.Console-CSharp.sln +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/TimeWarp.Console-CSharp.sln @@ -1,62 +1,62 @@ -ο»Ώ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28917.182 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console-CSharp", "Source\Console-CSharp.csproj", "{182F0FF1-3BCB-443D-8842-15ADB4778353}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console-CSharp.Tests", "Tests\Console-CSharp.Tests\Console-CSharp.Tests.csproj", "{54906E27-45D8-42A1-9D3D-43A742423EB7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{E3982F33-88EF-4375-89D1-47A9589D07EA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{137360F6-53B1-4004-8196-24A31A3E80FF}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - NuGet.config = NuGet.config - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|Any CPU.Build.0 = Debug|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x64.ActiveCfg = Debug|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x64.Build.0 = Debug|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x86.ActiveCfg = Debug|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x86.Build.0 = Debug|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|Any CPU.ActiveCfg = Release|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|Any CPU.Build.0 = Release|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x64.ActiveCfg = Release|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x64.Build.0 = Release|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x86.ActiveCfg = Release|Any CPU - {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x86.Build.0 = Release|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x64.ActiveCfg = Debug|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x64.Build.0 = Debug|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x86.ActiveCfg = Debug|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x86.Build.0 = Debug|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|Any CPU.Build.0 = Release|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x64.ActiveCfg = Release|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x64.Build.0 = Release|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x86.ActiveCfg = Release|Any CPU - {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {54906E27-45D8-42A1-9D3D-43A742423EB7} = {E3982F33-88EF-4375-89D1-47A9589D07EA} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4433FF6C-C287-47B2-A6B6-3D2547ED478A} - EndGlobalSection -EndGlobal +ο»Ώ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28917.182 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console-CSharp", "Source\Console-CSharp.csproj", "{182F0FF1-3BCB-443D-8842-15ADB4778353}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console-CSharp.Tests", "Tests\Console-CSharp.Tests\Console-CSharp.Tests.csproj", "{54906E27-45D8-42A1-9D3D-43A742423EB7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{E3982F33-88EF-4375-89D1-47A9589D07EA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{137360F6-53B1-4004-8196-24A31A3E80FF}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + NuGet.config = NuGet.config + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|Any CPU.Build.0 = Debug|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x64.ActiveCfg = Debug|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x64.Build.0 = Debug|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x86.ActiveCfg = Debug|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Debug|x86.Build.0 = Debug|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|Any CPU.ActiveCfg = Release|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|Any CPU.Build.0 = Release|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x64.ActiveCfg = Release|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x64.Build.0 = Release|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x86.ActiveCfg = Release|Any CPU + {182F0FF1-3BCB-443D-8842-15ADB4778353}.Release|x86.Build.0 = Release|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x64.ActiveCfg = Debug|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x64.Build.0 = Debug|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x86.ActiveCfg = Debug|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Debug|x86.Build.0 = Debug|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|Any CPU.Build.0 = Release|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x64.ActiveCfg = Release|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x64.Build.0 = Release|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x86.ActiveCfg = Release|Any CPU + {54906E27-45D8-42A1-9D3D-43A742423EB7}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {54906E27-45D8-42A1-9D3D-43A742423EB7} = {E3982F33-88EF-4375-89D1-47A9589D07EA} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4433FF6C-C287-47B2-A6B6-3D2547ED478A} + EndGlobalSection +EndGlobal diff --git a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/global.json b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/global.json index 65303851b..f6db8b0d0 100644 --- a/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/global.json +++ b/TimeWarp.Templates/Source/TimeWarp.Console.Template/content/TimeWarp.Console-CSharp/global.json @@ -1,7 +1,7 @@ -{ - "sdk": { - "version": "7.0.100", - "allowPrerelease": false, - "rollForward": "latestMinor" - } -} +{ + "sdk": { + "version": "7.0.100", + "allowPrerelease": false, + "rollForward": "latestMinor" + } +} diff --git a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/.config/dotnet-tools.json b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/.config/dotnet-tools.json index 901a73b76..5a8591386 100644 --- a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/.config/dotnet-tools.json +++ b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/.config/dotnet-tools.json @@ -1,12 +1,12 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "fixie.console": { - "version": "3.3.0", - "commands": [ - "fixie" - ] - } - } +{ + "version": 1, + "isRoot": true, + "tools": { + "fixie.console": { + "version": "3.3.0", + "commands": [ + "fixie" + ] + } + } } \ No newline at end of file diff --git a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/EnumerableExtensions.cs b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/EnumerableExtensions.cs index 68b750dc7..6efd03b26 100644 --- a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/EnumerableExtensions.cs +++ b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/EnumerableExtensions.cs @@ -1,22 +1,22 @@ -namespace Boxed.Templates.FunctionalTest; - -using System; -using System.Collections.Generic; -using System.Linq; - -using TimeWarp.Fixie; - -[NotTest] -public static class EnumerableExtensions -{ - public static IDictionary ToArguments(this string[] arguments) => - arguments - .Select(x => x.Split('=', StringSplitOptions.RemoveEmptyEntries)) - .ToDictionary(x => x.First(), x => x.Last()); - - public static IDictionary ToArguments(this string[] arguments1, string[] arguments2) => - arguments1 - .Concat(arguments2) - .Select(x => x.Split('=', StringSplitOptions.RemoveEmptyEntries)) - .ToDictionary(x => x.First(), x => x.Last()); -} +namespace Boxed.Templates.FunctionalTest; + +using System; +using System.Collections.Generic; +using System.Linq; + +using TimeWarp.Fixie; + +[NotTest] +public static class EnumerableExtensions +{ + public static IDictionary ToArguments(this string[] arguments) => + arguments + .Select(x => x.Split('=', StringSplitOptions.RemoveEmptyEntries)) + .ToDictionary(x => x.First(), x => x.Last()); + + public static IDictionary ToArguments(this string[] arguments1, string[] arguments2) => + arguments1 + .Concat(arguments2) + .Select(x => x.Split('=', StringSplitOptions.RemoveEmptyEntries)) + .ToDictionary(x => x.First(), x => x.Last()); +} diff --git a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/ProjectExtensions.cs b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/ProjectExtensions.cs index c048cacc0..cd3af1d41 100644 --- a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/ProjectExtensions.cs +++ b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/ProjectExtensions.cs @@ -1,34 +1,34 @@ -namespace Boxed.Templates.FunctionalTest; - -using System; -using System.Threading.Tasks; -using Boxed.DotnetNewTest; - -using TimeWarp.Fixie; - -[NotTest] -public static class ProjectExtensions -{ - private const int DefaultRetries = 2; - - public static async Task DotnetRestoreWithRetryAsync(this Project project, TimeSpan? timeout = null, bool showShellWindow = false) - { - for (var i = 0; i < DefaultRetries; ++i) - { - try - { - await project.DotnetRestoreAsync(timeout, showShellWindow).ConfigureAwait(false); - return; - } - catch (Exception exception) - { - TestLogger.WriteMessage?.Invoke($"Retry {i} failed with exception:{Environment.NewLine}{exception}"); - - if (i == DefaultRetries - 1) - { - throw; - } - } - } - } -} +namespace Boxed.Templates.FunctionalTest; + +using System; +using System.Threading.Tasks; +using Boxed.DotnetNewTest; + +using TimeWarp.Fixie; + +[NotTest] +public static class ProjectExtensions +{ + private const int DefaultRetries = 2; + + public static async Task DotnetRestoreWithRetryAsync(this Project project, TimeSpan? timeout = null, bool showShellWindow = false) + { + for (var i = 0; i < DefaultRetries; ++i) + { + try + { + await project.DotnetRestoreAsync(timeout, showShellWindow).ConfigureAwait(false); + return; + } + catch (Exception exception) + { + TestLogger.WriteMessage?.Invoke($"Retry {i} failed with exception:{Environment.NewLine}{exception}"); + + if (i == DefaultRetries - 1) + { + throw; + } + } + } + } +} diff --git a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/TemplateTest.cs b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/TemplateTest.cs index 1cebd6100..78bfcefda 100644 --- a/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/TemplateTest.cs +++ b/TimeWarp.Templates/Tests/TimeWarp.Architecture.Template.Tests/TemplateTest.cs @@ -1,330 +1,330 @@ -ο»Ώnamespace TimeWarp.Architecture.Template.Tests; -using TimeWarp.Fixie; -using Boxed.DotnetNewTest; -using Boxed.Templates.FunctionalTest; - -public class TestingConvention : TimeWarp.Fixie.TestingConvention { } - -public class TemplateTest -{ - private const string ShortName = "timewarp-architecture"; - private const string solutionName = "TimeWarp.Architecture.sln"; - private static readonly string[] DefaultArguments = new string[] - { - }; - private static readonly TempDirectory TempDirectoryName; - - /// - /// - //Template options: - //-p, --process Include the TimeWarp Process Documents, an editable minimalist process based in markdown documents - // Type: bool - // Default: true - //-g, --grpc Include the grpc container app(Superheros) - // Type: bool - // Default: true - //-ap, --api Include the api container app(Weather) - // Type: bool - // Default: true - //-w, --web Include the web container app - // Type: bool - // Default: true - //-y, --yarp Include the yarp proxy server - // Type: bool - // Default: true - //-c, --cosmosdb Add CosmosDb Features - // Type: bool - // Default: true - //-co, --counter Add Counter Features to Web.Spa - // Type: bool - // Default: true - //-e, --eventstream Eventstream is an example of how to implement middleware in Web.Spa - // Type: bool - // Default: true - /// - /// - /// - /// - - [Input( "Test_0", new string[] { "allow-scripts=yes" } )] - [Input( "Test_1", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_2", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_3", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_4", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_5", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_6", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_7", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_8", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_9", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_10", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_11", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_12", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_13", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_14", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_15", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_16", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_17", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_18", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_19", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_20", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_21", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_22", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_23", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_24", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_25", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_26", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_27", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_28", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_29", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_30", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_31", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_32", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_33", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_34", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_35", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_36", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_37", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_38", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_39", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_40", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_41", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_42", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_43", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_44", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_45", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_46", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_47", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_48", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_49", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_50", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_51", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_52", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_53", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_54", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_55", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_56", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_57", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_58", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_59", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_60", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_61", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_62", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_63", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_64", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_65", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_66", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_67", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_68", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_69", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_70", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_71", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_72", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_73", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_74", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_75", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_76", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_77", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_78", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_79", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_80", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_81", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_82", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_83", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_84", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_85", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_86", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_87", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_88", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_89", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_90", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_91", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_92", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_93", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_94", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_95", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_96", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_97", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_98", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_99", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_100", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_101", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_102", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_103", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_104", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_105", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_106", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_107", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_108", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_109", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_110", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_111", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_112", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_113", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_114", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_115", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_116", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_117", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_118", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_119", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_120", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_121", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_122", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_123", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_124", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_125", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_126", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_127", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_128", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] - [Input( "Test_129", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_130", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_131", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_132", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_133", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_134", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_135", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_136", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_137", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_138", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_139", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_140", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_141", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_142", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_143", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_144", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_145", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_146", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_147", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_148", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_149", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_150", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_151", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_152", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_153", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_154", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_155", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_156", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_157", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_158", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_159", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_160", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_161", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_162", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_163", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_164", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_165", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_166", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_167", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_168", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_169", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_170", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_171", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_172", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_173", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_174", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_175", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_176", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_177", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_178", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_179", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_180", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_181", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_182", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_183", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_184", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_185", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_186", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_187", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_188", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_189", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_190", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_191", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_192", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_193", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_194", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_195", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_196", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_197", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_198", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_199", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_200", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_201", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_202", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_203", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_204", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_205", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_206", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_207", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_208", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_209", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_210", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_211", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_212", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_213", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_214", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_215", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_216", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_217", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_218", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_219", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_220", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_221", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_222", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_223", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_224", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_225", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_226", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_227", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_228", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_229", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_230", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_231", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_232", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_233", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_234", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_235", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_236", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_237", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_238", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_239", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_240", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_241", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_242", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_243", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_244", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_245", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_246", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_247", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_248", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_249", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_250", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_251", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_252", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_253", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_254", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_255", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - [Input( "Test_256", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] - public async Task RestoreAndBuild_CustomArguments_IsSuccessful(string name, params string[] arguments) - { - var tempDirectory = TempDirectory.NewTempDirectory(); - - var project = await tempDirectory - .DotnetNewAsync( ShortName, name, DefaultArguments.ToArguments( arguments ) ) - .ConfigureAwait( false ); - await project.DotnetRestoreWithRetryAsync().ConfigureAwait(false); - //await project.DotnetBuildAsync().ConfigureAwait( false ); - if (project.DotnetBuildAsync().IsCompletedSuccessfully) - { - Directory.Delete( project.DirectoryPath ); - } - } - - private static Task InstallTemplateAsync() => DotnetNew.InstallAsync( solutionName ); - - private static Task UnInstallTemplateAsync() - { - return DotnetNew.UninstallAsync(solutionName); - } - - public async static Task Setup() => await InstallTemplateAsync(); - public async static Task Cleanup() => await UnInstallTemplateAsync(); +ο»Ώnamespace TimeWarp.Architecture.Template.Tests; +using TimeWarp.Fixie; +using Boxed.DotnetNewTest; +using Boxed.Templates.FunctionalTest; + +public class TestingConvention : TimeWarp.Fixie.TestingConvention { } + +public class TemplateTest +{ + private const string ShortName = "timewarp-architecture"; + private const string solutionName = "TimeWarp.Architecture.sln"; + private static readonly string[] DefaultArguments = new string[] + { + }; + private static readonly TempDirectory TempDirectoryName; + + /// + /// + //Template options: + //-p, --process Include the TimeWarp Process Documents, an editable minimalist process based in markdown documents + // Type: bool + // Default: true + //-g, --grpc Include the grpc container app(Superheros) + // Type: bool + // Default: true + //-ap, --api Include the api container app(Weather) + // Type: bool + // Default: true + //-w, --web Include the web container app + // Type: bool + // Default: true + //-y, --yarp Include the yarp proxy server + // Type: bool + // Default: true + //-c, --cosmosdb Add CosmosDb Features + // Type: bool + // Default: true + //-co, --counter Add Counter Features to Web.Spa + // Type: bool + // Default: true + //-e, --eventstream Eventstream is an example of how to implement middleware in Web.Spa + // Type: bool + // Default: true + /// + /// + /// + /// + + [Input( "Test_0", new string[] { "allow-scripts=yes" } )] + [Input( "Test_1", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_2", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_3", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_4", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_5", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_6", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_7", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_8", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_9", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_10", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_11", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_12", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_13", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_14", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_15", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_16", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_17", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_18", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_19", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_20", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_21", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_22", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_23", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_24", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_25", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_26", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_27", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_28", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_29", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_30", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_31", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_32", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_33", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_34", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_35", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_36", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_37", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_38", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_39", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_40", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_41", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_42", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_43", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_44", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_45", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_46", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_47", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_48", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_49", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_50", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_51", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_52", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_53", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_54", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_55", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_56", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_57", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_58", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_59", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_60", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_61", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_62", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_63", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_64", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_65", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_66", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_67", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_68", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_69", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_70", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_71", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_72", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_73", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_74", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_75", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_76", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_77", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_78", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_79", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_80", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_81", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_82", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_83", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_84", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_85", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_86", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_87", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_88", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_89", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_90", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_91", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_92", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_93", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_94", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_95", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_96", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_97", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_98", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_99", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_100", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_101", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_102", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_103", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_104", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_105", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_106", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_107", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_108", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_109", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_110", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_111", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_112", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_113", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_114", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_115", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_116", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_117", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_118", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_119", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_120", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_121", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_122", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_123", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_124", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_125", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_126", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_127", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_128", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=true", "allow-scripts=yes" } )] + [Input( "Test_129", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_130", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_131", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_132", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_133", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_134", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_135", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_136", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_137", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_138", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_139", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_140", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_141", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_142", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_143", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_144", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_145", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_146", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_147", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_148", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_149", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_150", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_151", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_152", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_153", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_154", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_155", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_156", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_157", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_158", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_159", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_160", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_161", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_162", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_163", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_164", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_165", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_166", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_167", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_168", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_169", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_170", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_171", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_172", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_173", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_174", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_175", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_176", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_177", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_178", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_179", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_180", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_181", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_182", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_183", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_184", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_185", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_186", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_187", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_188", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_189", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_190", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_191", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_192", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=true", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_193", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_194", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_195", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_196", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_197", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_198", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_199", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_200", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_201", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_202", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_203", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_204", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_205", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_206", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_207", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_208", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_209", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_210", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_211", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_212", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_213", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_214", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_215", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_216", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_217", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_218", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_219", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_220", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_221", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_222", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_223", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_224", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=true", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_225", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_226", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_227", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_228", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_229", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_230", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_231", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_232", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_233", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_234", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_235", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_236", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_237", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_238", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_239", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_240", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=true", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_241", new string[] { "process=true", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_242", new string[] { "process=false", "grpc=true", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_243", new string[] { "process=true", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_244", new string[] { "process=false", "grpc=false", "api=true", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_245", new string[] { "process=true", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_246", new string[] { "process=false", "grpc=true", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_247", new string[] { "process=true", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_248", new string[] { "process=false", "grpc=false", "api=false", "web=true", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_249", new string[] { "process=true", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_250", new string[] { "process=false", "grpc=true", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_251", new string[] { "process=true", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_252", new string[] { "process=false", "grpc=false", "api=true", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_253", new string[] { "process=true", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_254", new string[] { "process=false", "grpc=true", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_255", new string[] { "process=true", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + [Input( "Test_256", new string[] { "process=false", "grpc=false", "api=false", "web=false", "yarp=false", "cosmosdb=false", "counter=false", "eventstream=false", "allow-scripts=yes" } )] + public async Task RestoreAndBuild_CustomArguments_IsSuccessful(string name, params string[] arguments) + { + var tempDirectory = TempDirectory.NewTempDirectory(); + + var project = await tempDirectory + .DotnetNewAsync( ShortName, name, DefaultArguments.ToArguments( arguments ) ) + .ConfigureAwait( false ); + await project.DotnetRestoreWithRetryAsync().ConfigureAwait(false); + //await project.DotnetBuildAsync().ConfigureAwait( false ); + if (project.DotnetBuildAsync().IsCompletedSuccessfully) + { + Directory.Delete( project.DirectoryPath ); + } + } + + private static Task InstallTemplateAsync() => DotnetNew.InstallAsync( solutionName ); + + private static Task UnInstallTemplateAsync() + { + return DotnetNew.UninstallAsync(solutionName); + } + + public async static Task Setup() => await InstallTemplateAsync(); + public async static Task Cleanup() => await UnInstallTemplateAsync(); } \ No newline at end of file diff --git a/TimeWarp.Templates/Tools/BuildAndInstallTemplate.ps1 b/TimeWarp.Templates/Tools/BuildAndInstallTemplate.ps1 index 44f045f7f..2385e9741 100644 --- a/TimeWarp.Templates/Tools/BuildAndInstallTemplate.ps1 +++ b/TimeWarp.Templates/Tools/BuildAndInstallTemplate.ps1 @@ -1,9 +1,9 @@ -Push-Location $PSScriptRoot -try { - nuget pack ..\Source\TimeWarp.Console.Template\TimeWarp.Console.Template.nuspec -Version 0.0.1 - dotnet new -u TimeWarp.Console.Template - dotnet new -i TimeWarp.Console.Template.0.0.1.nupkg -} -finally { - Pop-Location +Push-Location $PSScriptRoot +try { + nuget pack ..\Source\TimeWarp.Console.Template\TimeWarp.Console.Template.nuspec -Version 0.0.1 + dotnet new -u TimeWarp.Console.Template + dotnet new -i TimeWarp.Console.Template.0.0.1.nupkg +} +finally { + Pop-Location } \ No newline at end of file diff --git a/TimeWarp.Templates/global.json b/TimeWarp.Templates/global.json index 2bb02e9c3..72e987316 100644 --- a/TimeWarp.Templates/global.json +++ b/TimeWarp.Templates/global.json @@ -1,6 +1,6 @@ -{ - "sdk": { - "version": "9.0.200", - "rollForward": "latestMinor" - } -} +{ + "sdk": { + "version": "9.0.200", + "rollForward": "latestMinor" + } +} diff --git a/TimeWarp.Templates/testEnvironments.json b/TimeWarp.Templates/testEnvironments.json index 91562d7a7..a110b57df 100644 --- a/TimeWarp.Templates/testEnvironments.json +++ b/TimeWarp.Templates/testEnvironments.json @@ -1,17 +1,17 @@ -ο»Ώ{ - "version": "1", - "environments": [ - // See https://aka.ms/remotetesting for more details - // about how to configure remote environments. - //{ - // "name": "WSL Ubuntu", - // "type": "wsl", - // "wslDistribution": "Ubuntu" - //}, - //{ - // "name": "Docker dotnet/sdk", - // "type": "docker", - // "dockerImage": "mcr.microsoft.com/dotnet/sdk" - //} - ] +ο»Ώ{ + "version": "1", + "environments": [ + // See https://aka.ms/remotetesting for more details + // about how to configure remote environments. + //{ + // "name": "WSL Ubuntu", + // "type": "wsl", + // "wslDistribution": "Ubuntu" + //}, + //{ + // "name": "Docker dotnet/sdk", + // "type": "docker", + // "dockerImage": "mcr.microsoft.com/dotnet/sdk" + //} + ] } \ No newline at end of file diff --git a/TimeWarp.Templates/version.json b/TimeWarp.Templates/version.json index 50edde216..96d924a45 100644 --- a/TimeWarp.Templates/version.json +++ b/TimeWarp.Templates/version.json @@ -1,13 +1,13 @@ -{ - "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "1.0-beta", - "publicReleaseRefSpec": [ - "^refs/heads/master$", - "^refs/heads/v\\d+(?:\\.\\d+)?$" - ], - "cloudBuild": { - "buildNumber": { - "enabled": true - } - } +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "1.0-beta", + "publicReleaseRefSpec": [ + "^refs/heads/master$", + "^refs/heads/v\\d+(?:\\.\\d+)?$" + ], + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } } \ No newline at end of file