Compare commits

...

76 commits
v0.3.1 ... main

Author SHA1 Message Date
D. Moonfire 5a993e85cb fix(html): added validatiors to Autofac module
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-21 21:49:41 -06:00
D. Moonfire aac4b4373d feat(html): added identify operations
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-21 21:14:36 -06:00
D. Moonfire 22ddae11f8 fix(temporal): added CurrentInstant and CurrentDateTime to TimeService
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-21 17:48:39 -06:00
D. Moonfire b32ca7582c fix(schedules): protect against null schedules 2023-01-21 12:13:09 -06:00
D. Moonfire 07eb12414a refactor(temporal)!: renamed Timekeeper to TimeService
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-21 01:52:52 -06:00
D. Moonfire 82e1bc3c28 feat(schedules)!: reworked schedule names and added a new style
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-20 23:28:41 -06:00
D. Moonfire 070cf2bfb8 fix(scheduler): added better error messages and regular expression for numerical paths
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-18 23:51:37 -06:00
D. Moonfire 185980b5c4 fix(schedules): corrected serialization of pathRegex
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-18 22:32:54 -06:00
D. Moonfire 2e93ebdb7c ci: add manual to the release process
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-18 15:52:39 -06:00
D. Moonfire bca501d4e5 ci: updating to not create 1.0.0 packages
Some checks failed
ci/woodpecker/manual/woodpecker Pipeline failed
2023-01-18 15:49:51 -06:00
D. Moonfire 189273692c feat(schedules): switched how periods were parsed to allow for "2 weeks"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-18 14:29:11 -06:00
D. Moonfire 2892ec3445 feat!: added cancellation token support to pipelines and operations
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-17 19:24:09 -06:00
D. Moonfire 08aafb144c feat(schedules): changed ApplySchedules.Schedules to a getter GetSchedules 2023-01-17 18:42:31 -06:00
D. Moonfire fc1ab22a0e build: no prettier left
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-01-16 22:13:58 -06:00
D. Moonfire d5b975c179 feat(schedules): implemented the basic schedule
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-01-16 22:10:24 -06:00
D. Moonfire c73805ae93 chore: fixed a reference to Gallium 2023-01-16 22:09:06 -06:00
D. Moonfire edda9a2773 refactor(temporal)!: cleaned up organization 2023-01-16 13:45:59 -06:00
D. Moonfire e02c56e77e feat: implemented SingletonComponent to wrap most of the Is* components 2023-01-16 12:38:29 -06:00
D. Moonfire a5694d0cee refactor!: moving generator attributes into Nitride.Generators namespace 2023-01-15 14:08:58 -06:00
D. Moonfire 0a36d70fb0 feat: implemented a JSON project as a variant of YAML 2023-01-15 13:57:43 -06:00
D. Moonfire c5c9b8bf9c refactor!: renamed GetText to GetTextContentString 2023-01-15 12:43:42 -06:00
D. Moonfire a8c6d0e582 feat: made PipelineBase.AddDependency be a params 2023-01-15 12:20:41 -06:00
D. Moonfire 084aa7e812 build: removed prettier and formatting in lefthook 2023-01-15 12:20:13 -06:00
D. Moonfire 7d388b09c2 chore: lowered verbosity on some pipeline operations
closes #2
2023-01-14 18:30:22 -06:00
D. Moonfire 9e93eb6ce6 refactor!: fixed missed namespaces
- reformatted code and cleaned up references
2023-01-14 18:19:42 -06:00
D. Moonfire 6a397f5284 build: removed old git versions
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-12-24 00:47:57 -06:00
D. Moonfire 0011dc715b refactor: cleaning up file 2022-12-24 00:41:34 -06:00
D. Moonfire 982e3b38c3 feat(markdown): implemented expanding single link list items
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline failed
2022-12-24 00:38:24 -06:00
D. Moonfire 16a888fe9e chore: adding a markdown test project 2022-11-02 20:46:15 -05:00
D. Moonfire 8a5967a05a feat: updating package dependencies 2022-09-06 17:50:34 -05:00
D. Moonfire 836e482d4a fix: correcting some package references 2022-09-06 01:03:59 -05:00
D. Moonfire d35410625a refactor: renaming namespaces 2022-09-06 00:53:22 -05:00
D. Moonfire 7a42ce2f00 build: updating test detection 2022-09-06 00:40:21 -05:00
D. Moonfire bd26d796e2 feat!: renaming files and projects 2022-09-06 00:40:00 -05:00
D. Moonfire 05a4bc14f7 chore: switching test detection 2022-09-06 00:39:35 -05:00
D. Moonfire 10f53bbe10 fix(template): added NuGet reference 2022-09-05 23:16:02 -05:00
D. Moonfire 4988f6ecbc fix(template): integrating new template layout 2022-09-05 23:14:48 -05:00
D. Moonfire 22ad49e46b build: preparing project layout 2022-09-05 23:14:29 -05:00
D. Moonfire 16880cb36e chore: making tests more intelligent 2022-09-05 22:23:39 -05:00
D. Moonfire aa1eae40e0 chore(release): modifying NuGet publishing 2022-09-05 17:44:50 -05:00
D. Moonfire 152428b235 chore: added an update-template script 2022-09-05 17:28:14 -05:00
D. Moonfire 962e1f0d11 chore(release): removing same source as in NuGet.config 2022-09-05 17:25:28 -05:00
D. Moonfire 0603603be0 chore: tweaking NuGet publish process 2022-09-05 17:15:21 -05:00
D. Moonfire 294d9c0a38 fix(release): changing NuGet publish and pack 2022-09-05 17:05:52 -05:00
D. Moonfire 4093d9c0cb fix(template): trying a tag push 2022-09-05 16:56:41 -05:00
D. Moonfire f3b18dc54a feat: initial commit 2022-09-05 16:41:27 -05:00
Dylan R. E. Moonfire 630c6ff120 docs: updating project information 2022-08-05 11:45:18 -05:00
Dylan R. E. Moonfire e029fc12f8 fix: added some error handling for YAML headers 2022-07-18 20:06:08 -05:00
Dylan R. E. Moonfire 42cae6b133 fix: adding some methods for getting text out of an entity easier 2022-07-18 19:42:16 -05:00
Dylan R. E. Moonfire 28c4ab850e fix: adding some entity methods for YAML 2022-07-18 17:49:21 -05:00
Dylan R. E. Moonfire 8ce9a12847 feat: added some YAML parsing methods 2022-07-18 17:13:33 -05:00
Dylan R. E. Moonfire d1c73f2bce feat: added some single entity processing methods 2022-07-18 17:03:30 -05:00
Dylan R. E. Moonfire 516aeb254b feat: added NitrideBuilder.UseModule() methods to simplify adding modules 2022-07-18 16:07:34 -05:00
Dylan R. E. Moonfire 6b4fb3f840 chore: added a package definition for mfgames.com 2022-07-18 16:07:10 -05:00
Dylan R. E. Moonfire c206cd6ef7 fix: FilterOutFutureInstant should not filter out all non-Instant components 2022-07-09 20:48:12 -05:00
Dylan R. E. Moonfire 88dc0e6fe7 feat: working on making handlebars a little less painful 2022-07-09 19:24:55 -05:00
Dylan R. E. Moonfire 858080f5fb feat: updating Gallium 2022-07-09 17:24:19 -05:00
Dylan R. E. Moonfire 1e6a8eb5d8 feat: switching pipelines to return IAsyncEnumerable<Entity> instead of Task<IEnumerable<Entity>> 2022-07-09 17:21:38 -05:00
Dylan R. E. Moonfire efb255aef2 fix: working on expire future instants and adding test 2022-07-09 01:56:23 -05:00
Dylan R. E. Moonfire 3cf8dc66c8 feat: updated Gallium 2022-07-09 00:07:28 -05:00
Dylan R. E. Moonfire 01fe15d772 refactor: code cleanup 2022-07-08 23:52:10 -05:00
Dylan R. E. Moonfire 7fca466dbb fix: corrected the sequence properties to handle empty lists 2022-06-28 02:23:20 -05:00
Dylan R. E. Moonfire 603c692d7f fix(temporal): added Format to the DateIndex 2022-06-28 00:20:07 -05:00
Dylan R. E. Moonfire ca13ae34d0 feat(temporal): implemented date time index creation 2022-06-27 23:38:50 -05:00
Dylan R. E. Moonfire 63ff163fbf feat: refactored the direct children processing 2022-06-26 13:50:51 -05:00
Dylan R. E. Moonfire 74caa6eefd feat: refactored entity sequences and added tests 2022-06-25 21:43:05 -05:00
Dylan R. E. Moonfire 86403060e7 feat: reimplemented index page generation 2022-06-25 21:15:33 -05:00
Dylan R. E. Moonfire 3898396afe fix(temporal): removing redundant information 2022-06-07 10:05:20 -05:00
Dylan R. E. Moonfire 8da6067bcc fix(temporal): fixing time zone issues 2022-06-07 09:40:31 -05:00
Dylan R. E. Moonfire 85fa0fe97e fix(temporal): set the date time zone properly 2022-06-07 08:55:13 -05:00
Dylan R. E. Moonfire 3a009b05cf fix: index entity keys are optional 2022-06-06 22:08:03 -05:00
Dylan R. E. Moonfire ee7228b601 fix(temporal): added a default parameter for adding date options 2022-06-06 22:07:39 -05:00
Dylan R. E. Moonfire 698e918836 fix: provide validators that Autofac is not handling well 2022-06-06 21:46:31 -05:00
Dylan R. E. Moonfire e913818e6f fix(temporal): simplifying the setup for the builder 2022-06-06 21:40:31 -05:00
Dylan R. E. Moonfire 2e952c84cd build(lefthook): tweaking setup 2022-06-06 21:10:00 -05:00
Dylan R. E. Moonfire fc0b016c3b fix(temporal): fixing Autofac issues 2022-06-06 21:03:02 -05:00
306 changed files with 7612 additions and 2527 deletions

View file

@ -15,4 +15,4 @@
]
}
}
}
}

View file

@ -1,6 +1,7 @@
root = true
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
@ -11,106 +12,47 @@ indent_size = 4
# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers = false
csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
csharp_style_var_elsewhere = false:suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_space_after_cast = false
csharp_style_var_elsewhere = false:hint
csharp_style_var_for_built_in_types = false:hint
csharp_style_var_when_type_is_apparent = true:hint
csharp_preserve_single_line_statements = false
dotnet_naming_rule.event_rule.import_to_resharper = as_predefined
dotnet_naming_rule.event_rule.severity = warning
dotnet_naming_rule.event_rule.style = upper_camel_case_underscore_tolerant_style
dotnet_naming_rule.event_rule.symbols = event_symbols
dotnet_naming_rule.local_constants_rule.import_to_resharper = as_predefined
dotnet_naming_rule.local_constants_rule.severity = warning
dotnet_naming_rule.local_constants_rule.style = upper_camel_case_style
dotnet_naming_rule.local_constants_rule.symbols = local_constants_symbols
dotnet_naming_rule.private_constants_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_constants_rule.severity = warning
dotnet_naming_rule.private_constants_rule.style = upper_camel_case_style
dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols
dotnet_naming_rule.private_instance_fields_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_instance_fields_rule.severity = warning
dotnet_naming_rule.private_instance_fields_rule.style = lower_camel_case_style
dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols
dotnet_naming_rule.private_static_fields_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_static_fields_rule.resharper_style = AaBb, aaBb
dotnet_naming_rule.private_static_fields_rule.severity = warning
dotnet_naming_rule.private_static_fields_rule.style = upper_camel_case_style
dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols
dotnet_naming_rule.private_static_readonly_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_static_readonly_rule.severity = warning
dotnet_naming_rule.private_static_readonly_rule.style = upper_camel_case_style
dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case
dotnet_naming_style.upper_camel_case_underscore_tolerant_style.capitalization = pascal_case
dotnet_naming_style.upper_camel_case_underscore_tolerant_style.word_separator = _
dotnet_naming_symbols.event_symbols.applicable_accessibilities = *
dotnet_naming_symbols.event_symbols.applicable_kinds = event
dotnet_naming_symbols.local_constants_symbols.applicable_accessibilities = *
dotnet_naming_symbols.local_constants_symbols.applicable_kinds = local
dotnet_naming_symbols.local_constants_symbols.required_modifiers = const
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly
dotnet_separate_import_directive_groups = true
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_qualification_for_event = true:suggestion
dotnet_style_qualification_for_field = true:suggestion
dotnet_style_qualification_for_method = true:suggestion
dotnet_style_qualification_for_property = true:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
csharp_preserve_single_line_blocks = true
dotnet_style_predefined_type_for_locals_parameters_members = true:hint
dotnet_style_predefined_type_for_member_access = true:hint
dotnet_style_qualification_for_event = true:hint
dotnet_style_qualification_for_field = true:hint
dotnet_style_qualification_for_method = true:hint
dotnet_style_qualification_for_property = true:hint
dotnet_style_require_accessibility_modifiers = for_non_interface_members:hint
# ReSharper properties
resharper_alignment_tab_fill_style = optimal_fill
resharper_align_multiline_binary_expressions_chain = false
resharper_apply_on_completion = true
resharper_autodetect_indent_settings = true
resharper_blank_lines_after_control_transfer_statements = 1
resharper_blank_lines_around_single_line_auto_property = 1
resharper_blank_lines_around_single_line_property = 1
resharper_blank_lines_before_single_line_comment = 1
resharper_blank_lines_between_using_groups = 1
resharper_braces_for_for = required
resharper_braces_for_foreach = required
resharper_braces_for_ifelse = required
resharper_braces_for_while = required
resharper_can_use_global_alias = false
resharper_continuous_indent_multiplier = 1
resharper_cpp_alignment_tab_fill_style = optimal_fill
resharper_cpp_insert_final_newline = true
resharper_csharp_alignment_tab_fill_style = use_spaces
resharper_csharp_blank_lines_around_single_line_field = 1
resharper_csharp_blank_lines_around_single_line_invocable = 1
resharper_csharp_indent_style = space
resharper_csharp_indent_style = tab
resharper_csharp_insert_final_newline = true
resharper_csharp_keep_blank_lines_in_code = 1
resharper_csharp_keep_blank_lines_in_declarations = 1
resharper_csharp_max_line_length = 120
resharper_csharp_naming_rule.method_property_event = AaBb_AaBb
resharper_csharp_naming_rule.private_constants = AaBb
resharper_csharp_naming_rule.private_static_fields = AaBb, aaBb
resharper_csharp_naming_rule.private_static_readonly = AaBb
resharper_csharp_stick_comment = false
resharper_csharp_new_line_before_while = true
resharper_csharp_use_indent_from_vs = false
resharper_csharp_wrap_arguments_style = chop_if_long
resharper_csharp_wrap_before_binary_opsign = true
resharper_csharp_wrap_extends_list_style = chop_if_long
resharper_csharp_wrap_parameters_style = chop_if_long
resharper_css_insert_final_newline = true
resharper_default_exception_variable_name = exception
resharper_css_insert_final_newline = false
resharper_enforce_line_ending_style = true
resharper_event_handler_pattern_long = On$event$
resharper_html_alignment_tab_fill_style = optimal_fill
resharper_html_insert_final_newline = false
resharper_indent_nested_fixed_stmt = true
resharper_js_indent_style = tab
resharper_js_insert_final_newline = true
@ -120,47 +62,27 @@ resharper_js_use_indent_from_vs = false
resharper_js_wrap_before_binary_opsign = true
resharper_js_wrap_chained_method_calls = chop_if_long
resharper_keep_blank_lines_between_declarations = 1
resharper_keep_existing_declaration_block_arrangement = true
resharper_keep_existing_declaration_parens_arrangement = false
resharper_keep_existing_embedded_block_arrangement = true
resharper_keep_existing_enum_arrangement = true
resharper_min_blank_lines_after_imports = 1
resharper_nested_ternary_style = expanded
resharper_new_line_before_while = true
resharper_place_attribute_on_same_line = false
resharper_place_attribute_on_same_line = False
resharper_place_constructor_initializer_on_same_line = false
resharper_place_type_constraints_on_same_line = false
resharper_protobuf_insert_final_newline = true
resharper_protobuf_insert_final_newline = false
resharper_qualified_using_at_nested_scope = true
resharper_resx_alignment_tab_fill_style = optimal_fill
resharper_T4_alignment_tab_fill_style = optimal_fill
resharper_t4_insert_final_newline = true
resharper_use_continuous_indent_inside_initializer_braces = false
resharper_resx_insert_final_newline = false
resharper_space_within_single_line_array_initializer_braces = true
resharper_use_indents_from_main_language_in_file = false
resharper_use_indent_from_vs = false
resharper_vb_alignment_tab_fill_style = optimal_fill
resharper_vb_insert_final_newline = false
resharper_wrap_after_declaration_lpar = true
resharper_wrap_after_invocation_lpar = true
resharper_wrap_array_initializer_style = chop_if_long
resharper_wrap_before_extends_colon = true
resharper_wrap_before_first_type_parameter_constraint = true
resharper_wrap_before_type_parameter_langle = true
resharper_wrap_chained_binary_expressions = chop_if_long
resharper_wrap_chained_method_calls = chop_if_long
resharper_wrap_object_and_collection_initializer_style = chop_always
resharper_xmldoc_alignment_tab_fill_style = optimal_fill
resharper_xmldoc_indent_child_elements = ZeroIndent
resharper_xmldoc_indent_text = ZeroIndent
resharper_xmldoc_max_line_length = 80
resharper_xml_alignment_tab_fill_style = optimal_fill
resharper_xmldoc_insert_final_newline = false
resharper_xml_insert_final_newline = false
# ReSharper inspection severities
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_check_namespace_highlighting = none
resharper_convert_to_auto_property_highlighting = none
resharper_localizable_element_highlighting = none
@ -169,16 +91,9 @@ resharper_redundant_comma_in_enum_declaration_highlighting = none
resharper_redundant_comma_in_initializer_highlighting = none
resharper_string_compare_to_is_culture_specific_highlighting = none
resharper_string_index_of_is_culture_specific_1_highlighting = none
resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
resharper_use_null_propagation_highlighting = none
resharper_use_object_or_collection_initializer_highlighting = hint
resharper_use_string_interpolation_highlighting = hint
resharper_web_config_module_not_resolved_highlighting = warning
resharper_web_config_type_not_resolved_highlighting = warning
resharper_web_config_wrong_module_highlighting = warning
trim_trailing_whitespace = false
# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
@ -186,6 +101,16 @@ indent_style = space
indent_size = 2
tab_width = 2
[*.{cs,js,json,jsx,proto,resjson,ts,tsx}]
indent_style = space
indent_size = 4
tab_width = 4
[*.{asax,ascx,aspx,cshtml,css,htm,html,master,razor,skin,vb,xaml,xamlx,xoml}]
indent_style = space
indent_size = 4
tab_width = 4
[*.{appxmanifest,build,config,csproj,dbml,discomap,dtd,jsproj,lsproj,njsproj,nuspec,proj,props,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
indent_style = space
indent_size = 2
@ -195,13 +120,3 @@ tab_width = 2
indent_style = space
indent_size = 2
tab_width = 2
[*.cs]
indent_style = space
indent_size = 4
tab_width = 4
[*.{appxmanifest,asax,ascx,aspx,axaml,build,cg,cginc,compute,cs,cshtml,dtd,hlsl,hlsli,hlslinc,master,nuspec,paml,razor,resw,resx,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}]
indent_style = space
indent_size = 4
tab_width = 4

6
.envrc
View file

@ -1,5 +1,3 @@
# Insert our scripts into the path.
use flake || use nix
export PATH=$PWD/scripts:$PATH
# Nix flakes are awesome.
use flake
export DOTNET_ROOT=$(dirname $(dirname $(which dotnet)))

9
.gitignore vendored
View file

@ -11,8 +11,15 @@ obj/
.idea/
_ReSharper.Caches/
node_modules/
# NixOS
.direnv/
# Tests and Coverage
coverage
TestResults/
tests/artifacts/
.lefthook*
# Lefthook
.lefthook-local/
lefthook-local.yml

View file

@ -1,46 +0,0 @@
include:
- template: Security/SAST.gitlab-ci.yml
stages:
- build
- test
- release
default:
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
build:
stage: build
script:
- nix develop --command scripts/build.sh
rules:
- if: $CI_COMMIT_BRANCH
test:
stage: test
script:
- nix develop --command scripts/test.sh
artifacts:
when: always
paths:
- ./**/*test-result.xml
- ./coverage/Cobertura.xml
- ./coverage/Summary.*
- ./**/*.nupkg
reports:
coverage_report:
coverage_format: cobertura
path: ./coverage/Cobertura.xml
junit:
- ./**/*test-result.xml
publish:
stage: release
before_script:
# Set it up so we can push the tag
- project_url=$(echo $CI_PROJECT_URL | sed 's/https:\/\///')
- git remote set-url origin https://oauth2:$GITLAB_TOKEN@$project_url
script:
- nix develop --command scripts/release.sh
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

30
.woodpecker.yml Normal file
View file

@ -0,0 +1,30 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
tags: true
pipeline:
build:
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
commands:
- nix develop --command scripts/build.sh
when:
event: [push, pull_request, manual]
test:
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
commands:
- nix develop --command scripts/test.sh
when:
event: [push, pull_request, manual]
release-main:
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
commands:
- nix develop --command scripts/release.sh
secrets:
- gitea_token
when:
event: [push, manual]
branch: main

21
LICENSE.txt Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) Moonfire Games
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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 OR COPYRIGHT HOLDERS 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.

View file

@ -1,283 +1,373 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{570184FD-ECE4-4EC8-86E1-C1265E17D647}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Calendar", "src\Nitride.Calendar\Nitride.Calendar.csproj", "{D480943C-764D-4A8A-B546-642ED10586BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Feeds", "src\Nitride.Feeds\Nitride.Feeds.csproj", "{1204DECC-654A-433A-BF82-53F98AB24DCF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Gemtext", "src\Nitride.Gemtext\Nitride.Gemtext.csproj", "{23C7CBF7-9624-457A-8296-C03F75BC9BC6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Generators", "src\Nitride.Generators\Nitride.Generators.csproj", "{4ACB11B7-1EEB-48E7-845A-528770839125}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Handlebars", "src\Nitride.Handlebars\Nitride.Handlebars.csproj", "{56E595A6-7880-416E-B328-93B9617F92A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Html", "src\Nitride.Html\Nitride.Html.csproj", "{3F9292D3-DA50-4DBA-AE90-E33E462470A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.IO", "src\Nitride.IO\Nitride.IO.csproj", "{534BF940-25B2-4948-A101-7890CC9C4EA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Markdown", "src\Nitride.Markdown\Nitride.Markdown.csproj", "{41FF3823-7008-43B1-AD6A-92437E0600B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride", "src\Nitride\Nitride.csproj", "{757BA115-3465-46C5-ADDB-7B96D6900F33}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Slugs", "src\Nitride.Slugs\Nitride.Slugs.csproj", "{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Temporal", "src\Nitride.Temporal\Nitride.Temporal.csproj", "{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Yaml", "src\Nitride.Yaml\Nitride.Yaml.csproj", "{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{251D9C68-34EB-439D-B167-688BCC47DA17}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.IO.Tests", "tests\Nitride.IO.Tests\Nitride.IO.Tests.csproj", "{72A3E65B-8E73-40E9-8325-641BAF6B8744}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Tests", "tests\Nitride.Tests\Nitride.Tests.csproj", "{F940CD28-6867-4E5B-BC27-F476B3BEB49A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Yaml.Tests", "tests\Nitride.Yaml.Tests\Nitride.Yaml.Tests.csproj", "{29743817-A401-458F-9DD0-AF3579965953}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{47461A29-E502-4B0E-AAF5-D87C4B93AB6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopyFiles", "examples\CopyFiles\CopyFiles.csproj", "{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nitride.Slugs.Tests", "tests\Nitride.Slugs.Tests\Nitride.Slugs.Tests.csproj", "{C49E07D0-CD32-4332-90FA-07494195CAC4}"
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(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x64.ActiveCfg = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x64.Build.0 = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x86.ActiveCfg = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x86.Build.0 = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|Any CPU.Build.0 = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x64.ActiveCfg = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x64.Build.0 = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x86.ActiveCfg = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x86.Build.0 = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x64.ActiveCfg = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x64.Build.0 = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x86.ActiveCfg = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x86.Build.0 = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|Any CPU.Build.0 = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x64.ActiveCfg = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x64.Build.0 = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x86.ActiveCfg = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x86.Build.0 = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x64.ActiveCfg = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x64.Build.0 = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x86.ActiveCfg = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x86.Build.0 = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|Any CPU.Build.0 = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x64.ActiveCfg = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x64.Build.0 = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x86.ActiveCfg = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x86.Build.0 = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x64.ActiveCfg = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x64.Build.0 = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x86.ActiveCfg = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x86.Build.0 = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|Any CPU.Build.0 = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x64.ActiveCfg = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x64.Build.0 = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x86.ActiveCfg = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x86.Build.0 = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x64.ActiveCfg = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x64.Build.0 = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x86.ActiveCfg = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x86.Build.0 = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|Any CPU.Build.0 = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x64.ActiveCfg = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x64.Build.0 = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x86.ActiveCfg = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x86.Build.0 = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x64.ActiveCfg = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x64.Build.0 = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x86.ActiveCfg = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x86.Build.0 = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|Any CPU.Build.0 = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x64.ActiveCfg = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x64.Build.0 = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x86.ActiveCfg = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x86.Build.0 = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x64.ActiveCfg = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x64.Build.0 = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x86.ActiveCfg = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x86.Build.0 = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|Any CPU.Build.0 = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x64.ActiveCfg = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x64.Build.0 = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x86.ActiveCfg = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x86.Build.0 = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x64.ActiveCfg = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x64.Build.0 = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x86.ActiveCfg = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x86.Build.0 = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|Any CPU.Build.0 = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x64.ActiveCfg = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x64.Build.0 = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x86.ActiveCfg = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x86.Build.0 = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x64.ActiveCfg = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x64.Build.0 = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x86.ActiveCfg = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x86.Build.0 = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|Any CPU.Build.0 = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x64.ActiveCfg = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x64.Build.0 = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x86.ActiveCfg = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x86.Build.0 = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x64.ActiveCfg = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x64.Build.0 = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x86.ActiveCfg = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x86.Build.0 = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|Any CPU.Build.0 = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x64.ActiveCfg = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x64.Build.0 = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x86.ActiveCfg = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x86.Build.0 = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x64.ActiveCfg = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x64.Build.0 = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x86.ActiveCfg = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x86.Build.0 = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|Any CPU.Build.0 = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x64.ActiveCfg = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x64.Build.0 = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x86.ActiveCfg = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x86.Build.0 = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x64.ActiveCfg = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x64.Build.0 = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x86.ActiveCfg = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x86.Build.0 = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|Any CPU.Build.0 = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x64.ActiveCfg = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x64.Build.0 = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x86.ActiveCfg = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x86.Build.0 = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x64.ActiveCfg = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x64.Build.0 = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x86.ActiveCfg = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x86.Build.0 = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|Any CPU.Build.0 = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x64.ActiveCfg = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x64.Build.0 = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x86.ActiveCfg = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x86.Build.0 = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x64.ActiveCfg = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x64.Build.0 = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x86.ActiveCfg = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x86.Build.0 = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|Any CPU.Build.0 = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x64.ActiveCfg = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x64.Build.0 = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x86.ActiveCfg = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x86.Build.0 = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x64.ActiveCfg = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x64.Build.0 = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x86.ActiveCfg = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x86.Build.0 = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|Any CPU.Build.0 = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x64.ActiveCfg = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x64.Build.0 = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x86.ActiveCfg = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x86.Build.0 = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x64.ActiveCfg = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x64.Build.0 = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x86.ActiveCfg = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x86.Build.0 = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|Any CPU.Build.0 = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x64.ActiveCfg = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x64.Build.0 = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x86.ActiveCfg = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x86.Build.0 = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x64.ActiveCfg = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x64.Build.0 = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x86.ActiveCfg = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x86.Build.0 = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|Any CPU.Build.0 = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x64.ActiveCfg = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x64.Build.0 = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x86.ActiveCfg = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D480943C-764D-4A8A-B546-642ED10586BB} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{1204DECC-654A-433A-BF82-53F98AB24DCF} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{23C7CBF7-9624-457A-8296-C03F75BC9BC6} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{4ACB11B7-1EEB-48E7-845A-528770839125} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{56E595A6-7880-416E-B328-93B9617F92A6} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{3F9292D3-DA50-4DBA-AE90-E33E462470A1} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{534BF940-25B2-4948-A101-7890CC9C4EA5} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{41FF3823-7008-43B1-AD6A-92437E0600B7} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{757BA115-3465-46C5-ADDB-7B96D6900F33} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{72A3E65B-8E73-40E9-8325-641BAF6B8744} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{F940CD28-6867-4E5B-BC27-F476B3BEB49A} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{29743817-A401-458F-9DD0-AF3579965953} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1} = {47461A29-E502-4B0E-AAF5-D87C4B93AB6D}
{C49E07D0-CD32-4332-90FA-07494195CAC4} = {251D9C68-34EB-439D-B167-688BCC47DA17}
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{570184FD-ECE4-4EC8-86E1-C1265E17D647}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Calendar", "src\MfGames.Nitride.Calendar\MfGames.Nitride.Calendar.csproj", "{D480943C-764D-4A8A-B546-642ED10586BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Feeds", "src\MfGames.Nitride.Feeds\MfGames.Nitride.Feeds.csproj", "{1204DECC-654A-433A-BF82-53F98AB24DCF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Gemtext", "src\MfGames.Nitride.Gemtext\MfGames.Nitride.Gemtext.csproj", "{23C7CBF7-9624-457A-8296-C03F75BC9BC6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Generators", "src\MfGames.Nitride.Generators\MfGames.Nitride.Generators.csproj", "{4ACB11B7-1EEB-48E7-845A-528770839125}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Handlebars", "src\MfGames.Nitride.Handlebars\MfGames.Nitride.Handlebars.csproj", "{56E595A6-7880-416E-B328-93B9617F92A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Html", "src\MfGames.Nitride.Html\MfGames.Nitride.Html.csproj", "{3F9292D3-DA50-4DBA-AE90-E33E462470A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.IO", "src\MfGames.Nitride.IO\MfGames.Nitride.IO.csproj", "{534BF940-25B2-4948-A101-7890CC9C4EA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Markdown", "src\MfGames.Nitride.Markdown\MfGames.Nitride.Markdown.csproj", "{41FF3823-7008-43B1-AD6A-92437E0600B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride", "src\MfGames.Nitride\MfGames.Nitride.csproj", "{757BA115-3465-46C5-ADDB-7B96D6900F33}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Slugs", "src\MfGames.Nitride.Slugs\MfGames.Nitride.Slugs.csproj", "{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Temporal", "src\MfGames.Nitride.Temporal\MfGames.Nitride.Temporal.csproj", "{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Yaml", "src\MfGames.Nitride.Yaml\MfGames.Nitride.Yaml.csproj", "{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{251D9C68-34EB-439D-B167-688BCC47DA17}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.IO.Tests", "tests\MfGames.Nitride.IO.Tests\MfGames.Nitride.IO.Tests.csproj", "{72A3E65B-8E73-40E9-8325-641BAF6B8744}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Tests", "tests\MfGames.Nitride.Tests\MfGames.Nitride.Tests.csproj", "{F940CD28-6867-4E5B-BC27-F476B3BEB49A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Yaml.Tests", "tests\MfGames.Nitride.Yaml.Tests\MfGames.Nitride.Yaml.Tests.csproj", "{29743817-A401-458F-9DD0-AF3579965953}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{47461A29-E502-4B0E-AAF5-D87C4B93AB6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopyFiles", "examples\CopyFiles\CopyFiles.csproj", "{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Slugs.Tests", "tests\MfGames.Nitride.Slugs.Tests\MfGames.Nitride.Slugs.Tests.csproj", "{C49E07D0-CD32-4332-90FA-07494195CAC4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Temporal.Tests", "tests\MfGames.Nitride.Temporal.Tests\MfGames.Nitride.Temporal.Tests.csproj", "{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Markdown.Tests", "tests\MfGames.Nitride.Markdown.Tests\MfGames.Nitride.Markdown.Tests.csproj", "{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Json", "src\MfGames.Nitride.Json\MfGames.Nitride.Json.csproj", "{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Json.Tests", "tests\MfGames.Nitride.Json.Tests\MfGames.Nitride.Json.Tests.csproj", "{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Temporal.Schedules", "src\MfGames.Nitride.Temporal.Schedules\MfGames.Nitride.Temporal.Schedules.csproj", "{6AC8F985-B11B-44F4-A000-DFEAFEF59754}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.Temporal.Schedules.Tests", "tests\MfGames.Nitride.Temporal.Schedules.Tests\MfGames.Nitride.Temporal.Schedules.Tests.csproj", "{CA009524-E64A-4380-874E-C9D19D868572}"
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(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x64.ActiveCfg = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x64.Build.0 = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x86.ActiveCfg = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Debug|x86.Build.0 = Debug|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|Any CPU.Build.0 = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x64.ActiveCfg = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x64.Build.0 = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x86.ActiveCfg = Release|Any CPU
{D480943C-764D-4A8A-B546-642ED10586BB}.Release|x86.Build.0 = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x64.ActiveCfg = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x64.Build.0 = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x86.ActiveCfg = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Debug|x86.Build.0 = Debug|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|Any CPU.Build.0 = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x64.ActiveCfg = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x64.Build.0 = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x86.ActiveCfg = Release|Any CPU
{1204DECC-654A-433A-BF82-53F98AB24DCF}.Release|x86.Build.0 = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x64.ActiveCfg = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x64.Build.0 = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x86.ActiveCfg = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Debug|x86.Build.0 = Debug|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|Any CPU.Build.0 = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x64.ActiveCfg = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x64.Build.0 = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x86.ActiveCfg = Release|Any CPU
{23C7CBF7-9624-457A-8296-C03F75BC9BC6}.Release|x86.Build.0 = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x64.ActiveCfg = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x64.Build.0 = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x86.ActiveCfg = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Debug|x86.Build.0 = Debug|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|Any CPU.Build.0 = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x64.ActiveCfg = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x64.Build.0 = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x86.ActiveCfg = Release|Any CPU
{4ACB11B7-1EEB-48E7-845A-528770839125}.Release|x86.Build.0 = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x64.ActiveCfg = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x64.Build.0 = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x86.ActiveCfg = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Debug|x86.Build.0 = Debug|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|Any CPU.Build.0 = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x64.ActiveCfg = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x64.Build.0 = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x86.ActiveCfg = Release|Any CPU
{56E595A6-7880-416E-B328-93B9617F92A6}.Release|x86.Build.0 = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x64.ActiveCfg = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x64.Build.0 = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x86.ActiveCfg = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Debug|x86.Build.0 = Debug|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|Any CPU.Build.0 = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x64.ActiveCfg = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x64.Build.0 = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x86.ActiveCfg = Release|Any CPU
{3F9292D3-DA50-4DBA-AE90-E33E462470A1}.Release|x86.Build.0 = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x64.ActiveCfg = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x64.Build.0 = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x86.ActiveCfg = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Debug|x86.Build.0 = Debug|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|Any CPU.Build.0 = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x64.ActiveCfg = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x64.Build.0 = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x86.ActiveCfg = Release|Any CPU
{534BF940-25B2-4948-A101-7890CC9C4EA5}.Release|x86.Build.0 = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x64.ActiveCfg = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x64.Build.0 = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x86.ActiveCfg = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Debug|x86.Build.0 = Debug|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|Any CPU.Build.0 = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x64.ActiveCfg = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x64.Build.0 = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x86.ActiveCfg = Release|Any CPU
{41FF3823-7008-43B1-AD6A-92437E0600B7}.Release|x86.Build.0 = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x64.ActiveCfg = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x64.Build.0 = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x86.ActiveCfg = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Debug|x86.Build.0 = Debug|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|Any CPU.Build.0 = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x64.ActiveCfg = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x64.Build.0 = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x86.ActiveCfg = Release|Any CPU
{757BA115-3465-46C5-ADDB-7B96D6900F33}.Release|x86.Build.0 = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x64.ActiveCfg = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x64.Build.0 = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x86.ActiveCfg = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Debug|x86.Build.0 = Debug|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|Any CPU.Build.0 = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x64.ActiveCfg = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x64.Build.0 = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x86.ActiveCfg = Release|Any CPU
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5}.Release|x86.Build.0 = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x64.ActiveCfg = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x64.Build.0 = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x86.ActiveCfg = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Debug|x86.Build.0 = Debug|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|Any CPU.Build.0 = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x64.ActiveCfg = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x64.Build.0 = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x86.ActiveCfg = Release|Any CPU
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9}.Release|x86.Build.0 = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x64.ActiveCfg = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x64.Build.0 = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x86.ActiveCfg = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Debug|x86.Build.0 = Debug|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|Any CPU.Build.0 = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x64.ActiveCfg = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x64.Build.0 = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x86.ActiveCfg = Release|Any CPU
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837}.Release|x86.Build.0 = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x64.ActiveCfg = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x64.Build.0 = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x86.ActiveCfg = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Debug|x86.Build.0 = Debug|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|Any CPU.Build.0 = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x64.ActiveCfg = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x64.Build.0 = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x86.ActiveCfg = Release|Any CPU
{72A3E65B-8E73-40E9-8325-641BAF6B8744}.Release|x86.Build.0 = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x64.ActiveCfg = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x64.Build.0 = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x86.ActiveCfg = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Debug|x86.Build.0 = Debug|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|Any CPU.Build.0 = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x64.ActiveCfg = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x64.Build.0 = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x86.ActiveCfg = Release|Any CPU
{F940CD28-6867-4E5B-BC27-F476B3BEB49A}.Release|x86.Build.0 = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x64.ActiveCfg = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x64.Build.0 = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x86.ActiveCfg = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Debug|x86.Build.0 = Debug|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|Any CPU.Build.0 = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x64.ActiveCfg = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x64.Build.0 = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x86.ActiveCfg = Release|Any CPU
{29743817-A401-458F-9DD0-AF3579965953}.Release|x86.Build.0 = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x64.ActiveCfg = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x64.Build.0 = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x86.ActiveCfg = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Debug|x86.Build.0 = Debug|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|Any CPU.Build.0 = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x64.ActiveCfg = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x64.Build.0 = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x86.ActiveCfg = Release|Any CPU
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1}.Release|x86.Build.0 = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x64.ActiveCfg = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x64.Build.0 = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x86.ActiveCfg = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Debug|x86.Build.0 = Debug|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|Any CPU.Build.0 = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x64.ActiveCfg = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x64.Build.0 = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x86.ActiveCfg = Release|Any CPU
{C49E07D0-CD32-4332-90FA-07494195CAC4}.Release|x86.Build.0 = Release|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Debug|x64.ActiveCfg = Debug|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Debug|x64.Build.0 = Debug|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Debug|x86.ActiveCfg = Debug|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Debug|x86.Build.0 = Debug|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Release|Any CPU.Build.0 = Release|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Release|x64.ActiveCfg = Release|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Release|x64.Build.0 = Release|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Release|x86.ActiveCfg = Release|Any CPU
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266}.Release|x86.Build.0 = Release|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Debug|x64.ActiveCfg = Debug|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Debug|x64.Build.0 = Debug|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Debug|x86.ActiveCfg = Debug|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Debug|x86.Build.0 = Debug|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Release|Any CPU.Build.0 = Release|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Release|x64.ActiveCfg = Release|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Release|x64.Build.0 = Release|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Release|x86.ActiveCfg = Release|Any CPU
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65}.Release|x86.Build.0 = Release|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Debug|x64.ActiveCfg = Debug|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Debug|x64.Build.0 = Debug|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Debug|x86.ActiveCfg = Debug|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Debug|x86.Build.0 = Debug|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Release|Any CPU.Build.0 = Release|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Release|x64.ActiveCfg = Release|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Release|x64.Build.0 = Release|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Release|x86.ActiveCfg = Release|Any CPU
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113}.Release|x86.Build.0 = Release|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Debug|x64.ActiveCfg = Debug|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Debug|x64.Build.0 = Debug|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Debug|x86.ActiveCfg = Debug|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Debug|x86.Build.0 = Debug|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Release|Any CPU.Build.0 = Release|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Release|x64.ActiveCfg = Release|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Release|x64.Build.0 = Release|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Release|x86.ActiveCfg = Release|Any CPU
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26}.Release|x86.Build.0 = Release|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Debug|x64.ActiveCfg = Debug|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Debug|x64.Build.0 = Debug|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Debug|x86.ActiveCfg = Debug|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Debug|x86.Build.0 = Debug|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Release|Any CPU.Build.0 = Release|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Release|x64.ActiveCfg = Release|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Release|x64.Build.0 = Release|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Release|x86.ActiveCfg = Release|Any CPU
{6AC8F985-B11B-44F4-A000-DFEAFEF59754}.Release|x86.Build.0 = Release|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Debug|x64.ActiveCfg = Debug|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Debug|x64.Build.0 = Debug|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Debug|x86.ActiveCfg = Debug|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Debug|x86.Build.0 = Debug|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Release|Any CPU.Build.0 = Release|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Release|x64.ActiveCfg = Release|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Release|x64.Build.0 = Release|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Release|x86.ActiveCfg = Release|Any CPU
{CA009524-E64A-4380-874E-C9D19D868572}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D480943C-764D-4A8A-B546-642ED10586BB} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{1204DECC-654A-433A-BF82-53F98AB24DCF} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{23C7CBF7-9624-457A-8296-C03F75BC9BC6} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{4ACB11B7-1EEB-48E7-845A-528770839125} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{56E595A6-7880-416E-B328-93B9617F92A6} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{3F9292D3-DA50-4DBA-AE90-E33E462470A1} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{534BF940-25B2-4948-A101-7890CC9C4EA5} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{41FF3823-7008-43B1-AD6A-92437E0600B7} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{757BA115-3465-46C5-ADDB-7B96D6900F33} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{17BF2A03-2C1D-4F75-9C18-B4341FAAF1A5} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{FEFFA469-245E-45A7-A094-3F0E89CEF3A9} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{1A5B4B4D-CF32-4458-8F2C-83A2AE494837} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{72A3E65B-8E73-40E9-8325-641BAF6B8744} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{F940CD28-6867-4E5B-BC27-F476B3BEB49A} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{29743817-A401-458F-9DD0-AF3579965953} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{2C92A626-7A14-4FDB-906B-E7FA5FF18CC1} = {47461A29-E502-4B0E-AAF5-D87C4B93AB6D}
{C49E07D0-CD32-4332-90FA-07494195CAC4} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{0B74A4DE-4F92-44EE-8273-E5A15EAB4266} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{2AAE2B69-A93D-4045-B7E6-A32ED08D0D65} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{9A0D2BEE-859A-4E74-8CA7-5E0FB7C2B113} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{7CCC3A82-D5FE-4D54-9751-5E7985DE1F26} = {251D9C68-34EB-439D-B167-688BCC47DA17}
{6AC8F985-B11B-44F4-A000-DFEAFEF59754} = {570184FD-ECE4-4EC8-86E1-C1265E17D647}
{CA009524-E64A-4380-874E-C9D19D868572} = {251D9C68-34EB-439D-B167-688BCC47DA17}
EndGlobalSection
EndGlobal

View file

@ -85,7 +85,10 @@
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_CODE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_DECLARATION_PARENS_ARRANGEMENT/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_INVOCATION_PARENS_ARRANGEMENT/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/LINE_FEED_AT_FILE_END/@EntryValue">True</s:Boolean>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/MAX_ENUM_MEMBERS_ON_LINE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/MAX_FORMAL_PARAMETERS_ON_LINE/@EntryValue">1</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/NESTED_TERNARY_STYLE/@EntryValue">EXPANDED</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSOR_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
@ -115,7 +118,9 @@
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_CHAINED_METHOD_CALLS/@EntryValue">CHOP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_EXTENDS_LIST_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">80</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_MULTIPLE_TYPE_PARAMEER_CONSTRAINTS_STYLE/@EntryValue">CHOP_ALWAYS</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_PARAMETERS_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_VERBATIM_INTERPOLATED_STRINGS/@EntryValue">CHOP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CssFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">OPTIMAL_FILL</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/HtmlFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">OPTIMAL_FILL</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/JavaScriptCodeFormatting/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">OPTIMAL_FILL</s:String>
@ -1366,6 +1371,7 @@ using(DataAccessAdapter dataAccessAdapter = new DataAccessAdapter(ConnectionStri
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=F87CBA43E9CDCC41A45B39A2A2A25764/Scope/=2C285F182AC98D44B0B4F29D4D2149EC/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=F87CBA43E9CDCC41A45B39A2A2A25764/Scope/=2C285F182AC98D44B0B4F29D4D2149EC/CustomProperties/=minimumLanguageVersion/@EntryIndexedValue">2.0</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=F87CBA43E9CDCC41A45B39A2A2A25764/Scope/=2C285F182AC98D44B0B4F29D4D2149EC/Type/@EntryValue">InCSharpStatement</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gemtext/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=gemtext/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tocks/@EntryIndexedValue">True</s:Boolean>
</wpf:ResourceDictionary>

View file

@ -1,7 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="mfgames" value="https://www.myget.org/F/mfgames/api/v3/index.json" protocolVersion="3" />
<add key="mfgames.com" value="https://src.mfgames.com/api/packages/mfgames-cil/nuget/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="mfgames.com">
<package pattern="MfGames.*" />
</packageSource>
</packageSourceMapping>
</configuration>

1
examples/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
artifacts/

View file

@ -7,20 +7,20 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Nitride.IO\Nitride.IO.csproj"/>
<ProjectReference Include="..\..\src\Nitride\Nitride.csproj"/>
<ProjectReference Include="..\..\tests\Nitride.Tests\Nitride.Tests.csproj"/>
<ProjectReference Include="..\..\src\MfGames.Nitride.IO\MfGames.Nitride.IO.csproj"/>
<ProjectReference Include="..\..\src\MfGames.Nitride\MfGames.Nitride.csproj"/>
<ProjectReference Include="..\..\tests\MfGames.Nitride.Tests\MfGames.Nitride.Tests.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CliWrap" Version="3.4.4"/>
<PackageReference Include="CliWrap" Version="3.5.0"/>
<PackageReference Include="JunitXml.TestLogger" Version="3.0.114"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit" Version="2.4.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MfGames.IO" Version="1.2.3"/>
<PackageReference Include="MfGames.IO" Version="1.2.7"/>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>

View file

@ -10,6 +10,11 @@ public class CopyFilesModule : Module
// This just registers all the non-static classes as singletons
// within the system. We use lifetimes in other components depending
// on how they are used, but in this case, we don't need it.
builder.RegisterAssemblyTypes(this.GetType().Assembly).AsSelf().AsImplementedInterfaces().SingleInstance();
builder.RegisterAssemblyTypes(
this.GetType()
.Assembly)
.AsSelf()
.AsImplementedInterfaces()
.SingleInstance();
}
}

View file

@ -1,13 +1,13 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Linq;
using System.Threading;
using Gallium;
using Nitride;
using Nitride.IO.Contents;
using Nitride.IO.Directories;
using Nitride.IO.Paths;
using Nitride.Pipelines;
using MfGames.Gallium;
using MfGames.Nitride;
using MfGames.Nitride.IO.Contents;
using MfGames.Nitride.IO.Directories;
using MfGames.Nitride.IO.Paths;
using MfGames.Nitride.Pipelines;
namespace CopyFiles;
@ -44,7 +44,9 @@ public class CopyFilesPipeline : PipelineBase
}
/// <inheritdoc />
public override Task<IEnumerable<Entity>> RunAsync(IEnumerable<Entity> _)
public override IAsyncEnumerable<Entity> RunAsync(
IEnumerable<Entity> _,
CancellationToken cancellationToken = default)
{
// We don't care about the incoming entities which means we can
// ignore them and use the entities from the ReadFiles operation
@ -74,7 +76,9 @@ public class CopyFilesPipeline : PipelineBase
// read. Coming out of this, we will have one entity that fulfills:
//
// entity.Get<UPath> == "/output/a.txt"
entities = entities.Run(this.removePathPrefix).Run(this.addPathPrefix);
entities = entities
.Run(this.removePathPrefix, cancellationToken)
.Run(this.addPathPrefix, cancellationToken);
// Then we write out the files to the output. First we make sure we
// clear out the output. This operation performs an action when it
@ -95,12 +99,14 @@ public class CopyFilesPipeline : PipelineBase
// The third way is to use an extension on entities which lets us
// chain calls, ala Gulp's pipelines. The below code does this along
// with writing the files to the output.
entities = entities.Run(this.clearDirectory).Run(this.writeFiles);
entities = entities
.Run(this.clearDirectory, cancellationToken)
.Run(this.writeFiles, cancellationToken);
// If we are chaining this pipeline into another, we return the
// entities. Otherwise, we can just return an empty list. The
// pipeline is async, so it is wrapped in a task, but most
// operations are not (or are both).
return Task.FromResult(entities);
return entities.ToAsyncEnumerable();
}
}

View file

@ -4,9 +4,8 @@ using System.Threading.Tasks;
using Autofac;
using MfGames.IO.Extensions;
using Nitride;
using Nitride.IO;
using MfGames.Nitride;
using MfGames.Nitride.IO;
namespace CopyFiles;
@ -27,7 +26,8 @@ public static class CopyFilesProgram
// system. At the moment, we set the "root" directory which will
// contains all the paths, both input and output.
DirectoryInfo rootDir =
typeof(CopyFilesProgram).GetDirectory()!.FindGitRoot()!.GetDirectory("examples/CopyFiles");
typeof(CopyFilesProgram).GetDirectory()!.FindGitRoot()!
.GetDirectory("examples/CopyFiles");
builder.WithRootDirectory(rootDir);

View file

@ -1,11 +1,12 @@
using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using CliWrap;
using MfGames.IO.Extensions;
using Nitride.Tests;
using MfGames.Nitride.Tests;
using Xunit;
using Xunit.Abstractions;
@ -26,8 +27,11 @@ public class CopyFilesTest : NitrideTestBase
public async Task Run()
{
// Figure out the paths for this test.
DirectoryInfo rootDir =
typeof(CopyFilesProgram).GetDirectory()!.FindGitRoot()!.GetDirectory("examples/CopyFiles");
DirectoryInfo rootDir = typeof(CopyFilesProgram)
.GetDirectory()
!.FindGitRoot()!
.GetDirectory("examples/CopyFiles");
DirectoryInfo outputDir = rootDir.GetDirectory("output");
FileInfo projectFile = rootDir.GetFile("CopyFiles.csproj");
@ -40,16 +44,39 @@ public class CopyFilesTest : NitrideTestBase
}
// Execute the generator. This will throw if there is an exception.
await Cli.Wrap("dotnet")
.WithArguments(x => x.Add("run").Add("--project").Add(projectFile.FullName).Add("--").Add("build"))
.ExecuteAsync();
StringBuilder output = new();
try
{
await Cli
.Wrap("dotnet")
.WithWorkingDirectory(projectFile.DirectoryName!)
.WithArguments(
argumentsBuilder => argumentsBuilder
.Add("run")
.Add("--no-build")
.Add("--")
.Add("build"))
.WithStandardOutputPipe(PipeTarget.ToStringBuilder(output))
.WithStandardErrorPipe(PipeTarget.ToStringBuilder(output))
.ExecuteAsync();
}
catch (Exception exception)
{
this.Logger.Fatal(
exception,
"There was an exception running the command:\n\n{Log:l}",
output);
throw;
}
// Make sure we have our output.
FileInfo aFile = outputDir.GetFile("a.txt");
Assert.True(aFile.Exists);
string aText = aFile.ReadAllText().Trim();
string aText = aFile.ReadAllText()
.Trim();
Assert.Equal("This is the 'A' file.", aText);
}

View file

@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1649676176,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1651558728,
"narHash": "sha256-8HzyRnWlgZluUrVFNOfZAOlA1fghpOSezXvxhalGMUo=",
"lastModified": 1673631141,
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cbe587c735b734405f56803e267820ee1559e6c1",
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
"type": "github"
},
"original": {

View file

@ -15,7 +15,6 @@
pkgs.dotnet-sdk
pkgs.lefthook
pkgs.convco
pkgs.nodePackages.prettier
pkgs.nixfmt
pkgs.jq
];

View file

@ -1,19 +1,11 @@
pre-push:
parallel: true
commit-msg:
commands:
commit-check:
run: convco check
run: convco check -n 1
pre-commit:
parallel: false
commands:
dotnet-format-style:
glob: "*.cs"
run: dotnet format style
dotnet-format-whitespace:
glob: "*.cs"
run: dotnet format whitespace
prettier:
run: prettier . --write --loglevel warn
nixfmt:
run: nixfmt flake.nix
skip_output:
- meta # Skips lefthook version printing
- summary # Skips summary block (successful and failed steps) printing
- success # Skips successful steps printing
- failure # Skips failed steps printing
- execution # Skips printing successfully executed commands and their output (but still prints failed executions)

7
mfgames-project.json Normal file
View file

@ -0,0 +1,7 @@
{
"title": "Nitride CIL",
"slug": "nitride-cil",
"status": "Active",
"maturity": "Unstable",
"summary": "An entity-component-system (ECS) framework for building static websites and documentation."
}

View file

@ -3,4 +3,5 @@
cd $(dirname $0)/..
./scripts/setup.sh || exit 1
echo "$(basename $0): building project"
dotnet build

View file

@ -1,14 +1,4 @@
#!/usr/bin/env sh
# Normalize our environment.
cd $(dirname $0)/..
./scripts/setup.sh || exit 1
# Format the .NET code
dotnet format || exit 1
# Format using Prettier.
prettier . --write --loglevel warn
# Format the Flake.
nixfmt flake.nix
lefthook run pre-commit

View file

@ -4,43 +4,49 @@ cd $(dirname $0)/..
./scripts/setup.sh || exit 1
# Verify the input.
if [ "x$NUGET_TOKEN" = "x" ]
if [ "x$GITEA_TOKEN" = "x" ]
then
echo "the environment variable NUGET_TOKEN is not defined"
exit 1
fi
if [ "x$NUGET_PUSH_URL" = "x" ]
then
echo "the environment variable NUGET_PUSH_URL is not defined"
echo "the environment variable GITEA_TOKEN is not defined"
exit 1
fi
# Clean up everything from the previous runs.
echo "$(basename $0): cleaning project"
dotnet clean
rm -f src/*/bin/Debug/*.nupkg
# Version the file based on the Git repository.
echo "$(basename $0): setting project version"
(cd src && dotnet dotnet-gitversion /updateprojectfiles)
SEMVER="v$(dotnet gitversion /output json | jq -r .SemVer)"
if [ "x$SEMVER" = "x" ]
then
echo "cannot figure out the semantic version"
echo "$(basename $0): cannot figure out the semantic version"
exit 1
fi
# Build to pick up the new version.
dotnet build
echo "$(basename $0): building project $SEMVER"
dotnet build || exit 1
# Create and publish the NuGet packages.
dotnet pack --include-symbols --include-source
dotnet nuget push src/*/bin/Debug/*.nupkg --api-key $NUGET_TOKEN --source $NUGET_PUSH_URL
echo "$(basename $0): creating NuGet packages"
dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg || exit 1
echo "$(basename $0): publishing NuGet package"
dotnet nuget remove source mfgames.com >& /dev/null
dotnet nuget add source --name mfgames.com https://src.mfgames.com/api/packages/mfgames-cil/nuget/index.json || exit 1
dotnet nuget push --api-key $GITEA_TOKEN --skip-duplicate --source mfgames.com src/*/bin/Debug/*.nupkg || exit 1
# Tag and push, but only if we don't have a tag.
if ! git tag | grep $SEMVER >& /dev/null
then
echo "tagging and pushing"
echo "$(basename $0): tagging and pushing"
git remote add publish https://dmoonfire:$GITEA_TOKEN@src.mfgames.com/mfgames-cil/$(basename $(git config --get remote.origin.url))
git tag $SEMVER
git push origin $SEMVER
git push publish $SEMVER || exit 1
git remote remove publish
else
echo "not tagging, already exists"
echo "$(basename $0): not tagging, already exists"
fi

View file

@ -4,7 +4,7 @@
cd $(dirname $0)/..
# Make sure we have the needed executables installed.
for e in dotnet lefthook prettier nixfmt
for e in dotnet lefthook nixfmt
do
if ! which $e >& /dev/null
then
@ -14,13 +14,15 @@ do
done
# Make sure we have lefthook is installed.
lefthook install
if [ ! -f .git/hooks/pre-commit ]
then
echo "$(basename $0): installing lefthook"
lefthook install
fi
# Make sure our tools are installed.
echo "$(basename $0): install .NET tools"
dotnet tool restore
# Make sure everything is the right version.
dotnet gitversion /updateprojectfiles
# Everything is good.
exit 0

View file

@ -1,8 +1,12 @@
#!/usr/bin/env sh
cd $(dirname $0)/..
./scripts/setup.sh || exit 1
dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage"
dotnet tool run reportgenerator -reports:tests/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
grep "Line coverage" coverage/Summary.txt
if ls ./tests/*/*.csproj >& /dev/null
then
./scripts/setup.sh || exit 1
dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage"
dotnet tool run reportgenerator -reports:tests/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
grep "Line coverage" coverage/Summary.txt
fi

4
scripts/update-template.sh Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env sh
cd $(dirname $0)/..
git pull template main --no-rebase

View file

@ -1,13 +0,0 @@
mode: ContinuousDelivery
increment: Inherit
continuous-delivery-fallback-tag: ci
major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:"
patch-version-bump-message: "^(build|chore|ci|docs|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?:"
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
assembly-informational-format: "{InformationalVersion}"
tag-prefix: "[vV]"

View file

@ -0,0 +1,18 @@
using FluentValidation;
namespace MfGames.Nitride.Calendar;
public class CreateCalendarValidator : AbstractValidator<CreateCalender>
{
public CreateCalendarValidator()
{
this.RuleFor(x => x.Path)
.NotNull();
this.RuleFor(x => x.GetEventSummary)
.NotNull();
this.RuleFor(x => x.GetEventUrl)
.NotNull();
}
}

View file

@ -1,23 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using FluentValidation;
using Gallium;
using Ical.Net.CalendarComponents;
using Ical.Net.DataTypes;
using Ical.Net.Serialization;
using Nitride.Contents;
using Nitride.Temporal;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
using MfGames.Nitride.Generators;
using MfGames.Nitride.Temporal;
using NodaTime;
using Zio;
namespace Nitride.Calendar;
namespace MfGames.Nitride.Calendar;
/// <summary>
/// Creates an iCalendar file from all the entities passed into the method
@ -27,11 +28,13 @@ namespace Nitride.Calendar;
[WithProperties]
public partial class CreateCalender : OperationBase
{
private readonly Timekeeper clock;
private readonly TimeService clock;
private readonly IValidator<CreateCalender> validator;
public CreateCalender(IValidator<CreateCalender> validator, Timekeeper clock)
public CreateCalender(
IValidator<CreateCalender> validator,
TimeService clock)
{
this.validator = validator;
this.clock = clock;
@ -55,16 +58,21 @@ public partial class CreateCalender : OperationBase
public UPath? Path { get; set; }
/// <inheritdoc />
public override IEnumerable<Entity> Run(IEnumerable<Entity> input)
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
IEnumerable<Entity> output = input.ForEntities<Instant>(this.CreateCalendarEntity);
SplitEntityEnumerations split = input.SplitEntity<Instant>();
IEnumerable<Entity> datedAndCalendars =
this.CreateCalendarEntity(split.HasAll);
return output;
return datedAndCalendars.Union(split.NotHasAll);
}
private IEnumerable<Entity> CreateCalendarEntity(IEnumerable<Entity> entities)
private IEnumerable<Entity> CreateCalendarEntity(
IEnumerable<Entity> entities)
{
// Create the calendar in the same time zone as the rest of the system.
var calendar = new Ical.Net.Calendar();
@ -73,7 +81,8 @@ public partial class CreateCalender : OperationBase
// Go through the events and add all of them.
var input = entities.ToList();
IEnumerable<CalendarEvent> events = input.Select(this.CreateCalendarEvent);
IEnumerable<CalendarEvent> events =
input.Select(this.CreateCalendarEvent);
calendar.Events.AddRange(events);
@ -96,6 +105,7 @@ public partial class CreateCalender : OperationBase
var when = this.clock.ToDateTime(instant);
string summary = this.GetEventSummary!(entity);
Uri? url = this.GetEventUrl?.Invoke(entity);
var calendarEvent = new CalendarEvent
{
Summary = summary,

View file

@ -0,0 +1,11 @@
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Calendar;
/// <summary>
/// A marker component for identifying an entity that represents a calendar.
/// </summary>
[SingletonComponent]
public partial class IsCalendar
{
}

View file

@ -10,15 +10,15 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.IO\Nitride.IO.csproj"/>
<ProjectReference Include="..\Nitride.Temporal\Nitride.Temporal.csproj"/>
<ProjectReference Include="..\Nitride\Nitride.csproj"/>
<ProjectReference Include="..\MfGames.Nitride.IO\MfGames.Nitride.IO.csproj"/>
<ProjectReference Include="..\MfGames.Nitride.Temporal\MfGames.Nitride.Temporal.csproj"/>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Gallium" Version="1.0.2"/>
<PackageReference Include="MfGames.Gallium" Version="0.4.0"/>
<PackageReference Include="Ical.Net" Version="4.2.0"/>
<PackageReference Include="NodaTime" Version="3.1.0"/>
<PackageReference Include="NodaTime" Version="3.1.2"/>
<PackageReference Include="Zio" Version="0.15.0"/>
</ItemGroup>
@ -28,7 +28,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.Generators\Nitride.Generators.csproj">
<ProjectReference Include="..\MfGames.Nitride.Generators\MfGames.Nitride.Generators.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>

View file

@ -0,0 +1,15 @@
using Autofac;
using MfGames.Nitride.Temporal.Setup;
namespace MfGames.Nitride.Calendar;
public static class NitrideCalendarBuilderExtensions
{
public static NitrideBuilder UseCalendar(this NitrideBuilder builder)
{
return builder
.UseTemporal()
.ConfigureContainer(x => x.RegisterModule<NitrideCalendarModule>());
}
}

View file

@ -1,6 +1,6 @@
using Autofac;
namespace Nitride.Calendar;
namespace MfGames.Nitride.Calendar;
public class NitrideCalendarModule : Module
{

View file

@ -1,13 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using FluentValidation;
using Gallium;
using Nitride.Contents;
using Nitride.Feeds.Structure;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
using MfGames.Nitride.Feeds.Structure;
using MfGames.Nitride.Generators;
using NodaTime;
@ -15,7 +16,7 @@ using Serilog;
using Zio;
namespace Nitride.Feeds;
namespace MfGames.Nitride.Feeds;
/// <summary>
/// Creates various feeds from the given input.
@ -27,7 +28,9 @@ public partial class CreateAtomFeed : OperationBase
private readonly IValidator<CreateAtomFeed> validator;
public CreateAtomFeed(ILogger logger, IValidator<CreateAtomFeed> validator)
public CreateAtomFeed(
ILogger logger,
IValidator<CreateAtomFeed> validator)
{
this.logger = logger;
this.validator = validator;
@ -91,7 +94,9 @@ public partial class CreateAtomFeed : OperationBase
public Func<Entity, Uri>? GetUrl { get; set; }
/// <inheritdoc />
public override IEnumerable<Entity> Run(IEnumerable<Entity> input)
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
@ -121,7 +126,9 @@ public partial class CreateAtomFeed : OperationBase
}
// Create the feed entity and return both objects.
Entity feedEntity = new Entity().Set(IsFeed.Instance).Set(this.GetPath!(entity)).SetTextContent(feed + "\n");
Entity feedEntity = new Entity().Set(IsFeed.Instance)
.Set(this.GetPath!(entity))
.SetTextContent(feed + "\n");
return new[] { entity, feedEntity };
}

View file

@ -0,0 +1,18 @@
using FluentValidation;
namespace MfGames.Nitride.Feeds;
public class CreateAtomFeedValidator : AbstractValidator<CreateAtomFeed>
{
public CreateAtomFeedValidator()
{
this.RuleFor(x => x.GetEntries)
.NotNull();
this.RuleFor(x => x.GetPath)
.NotNull();
this.RuleFor(x => x.GetTitle)
.NotNull();
}
}

View file

@ -1,4 +1,4 @@
namespace Nitride.Feeds;
namespace MfGames.Nitride.Feeds;
/// <summary>
/// A marker component that indicates this entity has a feed associated with

View file

@ -0,0 +1,11 @@
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Feeds;
/// <summary>
/// A marker component that indicates this page is a feed.
/// </summary>
[SingletonComponent]
public partial class IsFeed
{
}

View file

@ -10,14 +10,14 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.IO\Nitride.IO.csproj"/>
<ProjectReference Include="..\Nitride.Temporal\Nitride.Temporal.csproj"/>
<ProjectReference Include="..\Nitride\Nitride.csproj"/>
<ProjectReference Include="..\MfGames.Nitride.IO\MfGames.Nitride.IO.csproj"/>
<ProjectReference Include="..\MfGames.Nitride.Temporal\MfGames.Nitride.Temporal.csproj"/>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Gallium" Version="1.0.2"/>
<PackageReference Include="NodaTime" Version="3.1.0"/>
<PackageReference Include="MfGames.Gallium" Version="0.4.0"/>
<PackageReference Include="NodaTime" Version="3.1.2"/>
<PackageReference Include="Zio" Version="0.15.0"/>
</ItemGroup>
@ -27,7 +27,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.Generators\Nitride.Generators.csproj">
<ProjectReference Include="..\MfGames.Nitride.Generators\MfGames.Nitride.Generators.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>

View file

@ -0,0 +1,14 @@
using Autofac;
using MfGames.Nitride.Temporal.Setup;
namespace MfGames.Nitride.Feeds;
public static class NitrideFeedsBuilderExtensions
{
public static NitrideBuilder UseFeeds(this NitrideBuilder builder)
{
return builder.UseTemporal()
.ConfigureContainer(x => x.RegisterModule<NitrideFeedsModule>());
}
}

View file

@ -1,6 +1,6 @@
using Autofac;
namespace Nitride.Feeds;
namespace MfGames.Nitride.Feeds;
public class NitrideFeedsModule : Module
{

View file

@ -1,6 +1,8 @@
using System.Xml.Linq;
namespace Nitride.Feeds.Structure;
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Feeds.Structure;
/// <summary>
/// The type-safe structure for an author element.
@ -29,7 +31,10 @@ public partial class AtomAuthor
if (!string.IsNullOrEmpty(this.Name))
{
author.Add(new XElement(XmlConstants.AtomNamespace + "name", new XText(this.Name)));
author.Add(
new XElement(
XmlConstants.AtomNamespace + "name",
new XText(this.Name)));
}
return author;

View file

@ -1,7 +1,9 @@
using System;
using System.Xml.Linq;
namespace Nitride.Feeds.Structure;
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Feeds.Structure;
/// <summary>
/// The type-safe structure for a entry's category element.
@ -36,7 +38,9 @@ public partial class AtomCategory
throw new NullReferenceException("Category term cannot be null.");
}
var elem = new XElement(XmlConstants.AtomNamespace + "category", new XAttribute("term", this.Term));
var elem = new XElement(
XmlConstants.AtomNamespace + "category",
new XAttribute("term", this.Term));
if (this.Scheme != null)
{

View file

@ -2,11 +2,13 @@ using System;
using System.Collections.Generic;
using System.Xml.Linq;
using MfGames.Nitride.Generators;
using NodaTime;
using static Nitride.Feeds.Structure.XmlConstants;
using static MfGames.Nitride.Feeds.Structure.XmlConstants;
namespace Nitride.Feeds.Structure;
namespace MfGames.Nitride.Feeds.Structure;
/// <summary>
/// The type-safe structure for an entry in the Atom feed.

View file

@ -3,9 +3,9 @@ using System.Xml.Linq;
using NodaTime;
using static Nitride.Feeds.Structure.XmlConstants;
using static MfGames.Nitride.Feeds.Structure.XmlConstants;
namespace Nitride.Feeds.Structure;
namespace MfGames.Nitride.Feeds.Structure;
/// <summary>
/// The type-safe structure of the top-level feed.

View file

@ -0,0 +1,33 @@
using System.Xml.Linq;
namespace MfGames.Nitride.Feeds.Structure;
/// <summary>
/// Helper methods for working with XML elements.
/// </summary>
public static class AtomHelper
{
public static void AddIfSet(
XElement root,
XElement? elem)
{
if (elem != null)
{
root.Add(elem);
}
}
public static void AddIfSet(
XElement elem,
string name,
string? text)
{
if (!string.IsNullOrWhiteSpace(text))
{
elem.Add(
new XElement(
XmlConstants.AtomNamespace + name,
new XText(text)));
}
}
}

View file

@ -1,6 +1,6 @@
using System.Xml.Linq;
namespace Nitride.Feeds.Structure;
namespace MfGames.Nitride.Feeds.Structure;
/// <summary>
/// Common constants used while generating feeds.
@ -10,10 +10,12 @@ public static class XmlConstants
/// <summary>
/// The XML namespace for Atom feeds.
/// </summary>
public static readonly XNamespace AtomNamespace = "http://www.w3.org/2005/Atom";
public static readonly XNamespace AtomNamespace =
"http://www.w3.org/2005/Atom";
/// <summary>
/// The XML namespace for media.
/// </summary>
public static readonly XNamespace MediaNamespace = "http://search.yahoo.com/mrss/";
public static readonly XNamespace MediaNamespace =
"http://search.yahoo.com/mrss/";
}

View file

@ -1,10 +1,12 @@
namespace Nitride.Gemtext;
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Gemtext;
/// <summary>
/// A marker component for indicating that an entity is Gemtext, the format
/// for text files using the Gemini protocol.
/// </summary>
public record IsGemtext
[SingletonComponent]
public partial class IsGemtext
{
public static IsGemtext Instance { get; } = new();
}

View file

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride\Nitride.csproj"/>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj"/>
</ItemGroup>
<!-- Include the source generator -->
@ -18,7 +18,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.Generators\Nitride.Generators.csproj">
<ProjectReference Include="..\MfGames.Nitride.Generators\MfGames.Nitride.Generators.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>

View file

@ -1,11 +1,12 @@
using Autofac;
namespace Nitride.Gemtext;
namespace MfGames.Nitride.Gemtext;
public static class NitrideGemtextBuilderExtensions
{
public static NitrideBuilder UseGemtext(this NitrideBuilder builder)
{
return builder.ConfigureContainer(x => x.RegisterModule<NitrideGemtextModule>());
return builder.ConfigureContainer(
x => x.RegisterModule<NitrideGemtextModule>());
}
}

View file

@ -1,6 +1,6 @@
using Autofac;
namespace Nitride.Gemtext;
namespace MfGames.Nitride.Gemtext;
public class NitrideGemtextModule : Module
{

View file

@ -2,13 +2,13 @@ using System.Collections.Generic;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Nitride.Generators;
namespace MfGames.Nitride.Generators;
/// <summary>
/// Internal class that consolidates all of the information needed to generate a
/// file.
/// class for adding With* properties.
/// </summary>
internal class WithPropertyClass
public class ClassAttributeReference
{
/// <summary>
/// Gets the syntax for the class declaration.

View file

@ -0,0 +1,66 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
namespace MfGames.Nitride.Generators;
/// <summary>
/// Base class for classes marked with an attribute.
/// </summary>
public abstract class ClassAttributeSourceGeneratorBase<TSyntaxReceiver>
: ISourceGenerator
where TSyntaxReceiver : ClassAttributeSyntaxReceiverBase
{
public void Execute(GeneratorExecutionContext context)
{
// Get the generator infrastructure will create a receiver and
// populate it we can retrieve the populated instance via the
// context.
if (context.SyntaxReceiver is not TSyntaxReceiver syntaxReceiver)
{
return;
}
// Report any messages.
foreach (string? message in syntaxReceiver.Messages)
{
context.Warning(
MessageCode.Debug,
Location.Create(
"Temporary.g.cs",
TextSpan.FromBounds(0, 0),
new LinePositionSpan(
new LinePosition(0, 0),
new LinePosition(0, 0))),
"{0}: Syntax Message: {1}",
this.GetType().Name,
message);
}
// If we didn't find anything, then there is nothing to do.
if (syntaxReceiver.ReferenceList.Count == 0)
{
return;
}
// Go through each one.
foreach (ClassAttributeReference reference in syntaxReceiver
.ReferenceList)
{
this.GenerateClassFile(context, reference);
}
}
public void Initialize(GeneratorInitializationContext context)
{
// Register a factory that can create our custom syntax receiver
context.RegisterForSyntaxNotifications(
() => this.CreateSyntaxReceiver(context));
}
protected abstract TSyntaxReceiver CreateSyntaxReceiver(
GeneratorInitializationContext context);
protected abstract void GenerateClassFile(
GeneratorExecutionContext context,
ClassAttributeReference reference);
}

View file

@ -4,20 +4,28 @@ using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Nitride.Generators;
namespace MfGames.Nitride.Generators;
internal class WithPropertySyntaxReceiver : ISyntaxReceiver
public abstract class ClassAttributeSyntaxReceiverBase : ISyntaxReceiver
{
private readonly string attributeName;
private readonly GeneratorInitializationContext context;
public WithPropertySyntaxReceiver(GeneratorInitializationContext context)
public ClassAttributeSyntaxReceiverBase(
GeneratorInitializationContext context,
string attributeName)
{
this.context = context;
this.ClassList = new List<WithPropertyClass>();
this.attributeName = attributeName;
this.ReferenceList = new List<ClassAttributeReference>();
this.Messages = new List<string>();
}
public List<WithPropertyClass> ClassList { get; }
/// <summary>
/// Gets or sets a value indicating whether we should debug parsing attributes.
/// </summary>
public bool DebugAttributes { get; set; }
public List<string> Messages { get; }
@ -26,6 +34,8 @@ internal class WithPropertySyntaxReceiver : ISyntaxReceiver
/// </summary>
public string? Namespace { get; private set; }
public List<ClassAttributeReference> ReferenceList { get; }
public List<UsingDirectiveSyntax> UsingDirectiveList { get; set; } = new();
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
@ -37,15 +47,19 @@ internal class WithPropertySyntaxReceiver : ISyntaxReceiver
// Reset everything.
this.Namespace = null!;
this.UsingDirectiveList = new List<UsingDirectiveSyntax>();
break;
case NamespaceDeclarationSyntax syntax:
this.Namespace = syntax.Name.ToString();
return;
case FileScopedNamespaceDeclarationSyntax syntax:
this.Namespace = syntax.Name.ToString();
return;
case UsingDirectiveSyntax syntax:
this.UsingDirectiveList.Add(syntax);
return;
case ClassDeclarationSyntax:
break;
@ -60,21 +74,30 @@ internal class WithPropertySyntaxReceiver : ISyntaxReceiver
}
// See if the class has our set properties attribute.
bool found = cds.AttributeLists.AsEnumerable()
var attributes = cds.AttributeLists
.AsEnumerable()
.SelectMany(x => x.Attributes)
.Select(x => x.Name.ToString())
.ToList();
bool found = attributes
.Any(
x => x switch
{
"WithProperties" => true,
"WithPropertiesAttribute" => true,
_ => false,
});
x => x == this.attributeName
|| x == $"{this.attributeName}Attribute");
if (this.DebugAttributes)
{
this.Messages.Add(
string.Format(
"Parsing {0} found? {1} from attributes [{2}]",
cds.Identifier,
found,
string.Join(", ", attributes)));
}
if (found)
{
this.ClassList.Add(
new WithPropertyClass
this.ReferenceList.Add(
new ClassAttributeReference
{
Namespace = this.Namespace!,
UsingDirectiveList = this.UsingDirectiveList,

View file

@ -1,6 +1,6 @@
using Microsoft.CodeAnalysis;
namespace Nitride.Generators;
namespace MfGames.Nitride.Generators;
/// <summary>
/// Various wrappers around the diagnostics to simplify generation.
@ -18,7 +18,7 @@ public static class CodeAnalysisExtensions
this GeneratorExecutionContext context,
MessageCode messageCode,
string format,
params object[] parameters)
params object?[] parameters)
{
Error(context, messageCode, null, format, parameters);
}
@ -36,9 +36,14 @@ public static class CodeAnalysisExtensions
MessageCode messageCode,
Location? location,
string format,
params object[] parameters)
params object?[] parameters)
{
context.Message(messageCode, location, DiagnosticSeverity.Error, format, parameters);
context.Message(
messageCode,
location,
DiagnosticSeverity.Error,
format,
parameters);
}
/// <summary>
@ -52,7 +57,7 @@ public static class CodeAnalysisExtensions
this GeneratorExecutionContext context,
MessageCode messageCode,
string format,
params object[] parameters)
params object?[] parameters)
{
Information(context, messageCode, null, format, parameters);
}
@ -70,9 +75,14 @@ public static class CodeAnalysisExtensions
MessageCode messageCode,
Location? location,
string format,
params object[] parameters)
params object?[] parameters)
{
context.Message(messageCode, location, DiagnosticSeverity.Info, format, parameters);
context.Message(
messageCode,
location,
DiagnosticSeverity.Info,
format,
parameters);
}
/// <summary>
@ -86,7 +96,7 @@ public static class CodeAnalysisExtensions
this GeneratorExecutionContext context,
MessageCode messageCode,
string format,
params object[] parameters)
params object?[] parameters)
{
Warning(context, messageCode, null, format, parameters);
}
@ -104,9 +114,14 @@ public static class CodeAnalysisExtensions
MessageCode messageCode,
Location? location,
string format,
params object[] parameters)
params object?[] parameters)
{
context.Message(messageCode, location, DiagnosticSeverity.Warning, format, parameters);
context.Message(
messageCode,
location,
DiagnosticSeverity.Warning,
format,
parameters);
}
/// <summary>
@ -124,7 +139,7 @@ public static class CodeAnalysisExtensions
Location? location,
DiagnosticSeverity severity,
string format,
params object[] parameters)
params object?[] parameters)
{
context.ReportDiagnostic(
Diagnostic.Create(
@ -134,7 +149,10 @@ public static class CodeAnalysisExtensions
severity,
severity,
true,
severity is DiagnosticSeverity.Warning or DiagnosticSeverity.Info ? 4 : 0,
severity is DiagnosticSeverity.Warning
or DiagnosticSeverity.Info
? 4
: 0,
location: location));
}
}

View file

@ -1,4 +1,4 @@
namespace Nitride.Generators;
namespace MfGames.Nitride.Generators;
/// <summary>
/// All the error messages produced by the generators.

View file

@ -10,10 +10,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Gallium" Version="1.0.2"/>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.1.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.1.0"/>
<PackageReference Include="MfGames.Gallium" Version="0.4.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.3.1"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.1"/>
</ItemGroup>
</Project>

View file

@ -0,0 +1,91 @@
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
namespace MfGames.Nitride.Generators;
/// <summary>
/// Implements a source generator that creates the additional properties
/// and methods for a singleton component including the constructor and
/// instance methods, along with extension methods for adding them to entities.
/// </summary>
[Generator]
public class SingletonComponentSourceGenerator
: ClassAttributeSourceGeneratorBase<SingletonComponentSyntaxReceiver>
{
protected override SingletonComponentSyntaxReceiver CreateSyntaxReceiver(
GeneratorInitializationContext context)
{
return new SingletonComponentSyntaxReceiver(context);
}
protected override void GenerateClassFile(
GeneratorExecutionContext context,
ClassAttributeReference unit)
{
// Pull out some fields.
ClassDeclarationSyntax cds = unit.ClassDeclaration;
// Create the partial class.
StringBuilder buffer = new();
buffer.AppendLine("#nullable enable");
// Copy the using statements from the file.
foreach (UsingDirectiveSyntax? uds in unit.UsingDirectiveList)
{
buffer.AppendLine(uds.ToString());
}
buffer.AppendLine();
// Create the namespace.
SyntaxToken cls = cds.Identifier;
buffer.AppendLine(
string.Join(
"\n",
$"using MfGames.Gallium;",
$"",
$"namespace {unit.Namespace}",
$"{{",
$" public partial class {cls}",
$" {{",
$" static {cls}()",
$" {{",
$" Instance = new {cls}();",
$" }}",
$"",
$" private {cls}()",
$" {{",
$" }}",
$"",
$" public static {cls} Instance {{ get; }}",
$" }}",
$"",
$" public static class {cls}Extensions",
$" {{",
$" public static bool Has{cls}(this Entity entity)",
$" {{",
$" return entity.Has<{cls}>();",
$" }}",
$"",
$" public static Entity Remove{cls}(this Entity entity)",
$" {{",
$" return entity.Remove<{cls}>();",
$" }}",
$"",
$" public static Entity Set{cls}(this Entity entity)",
$" {{",
$" return entity.Set({cls}.Instance);",
$" }}",
$" }}",
$"}}",
""));
// Create the source text and write out the file.
var sourceText = SourceText.From(buffer.ToString(), Encoding.UTF8);
context.AddSource(cls + ".Generated.cs", sourceText);
}
}

View file

@ -0,0 +1,13 @@
using Microsoft.CodeAnalysis;
namespace MfGames.Nitride.Generators;
public class SingletonComponentSyntaxReceiver : ClassAttributeSyntaxReceiverBase
{
/// <inheritdoc />
public SingletonComponentSyntaxReceiver(
GeneratorInitializationContext context)
: base(context, "SingletonComponent")
{
}
}

View file

@ -7,7 +7,7 @@ using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
namespace Nitride.Generators;
namespace MfGames.Nitride.Generators;
/// <summary>
/// Implements a source generator that creates Set* methods for the various
@ -15,56 +15,22 @@ namespace Nitride.Generators;
/// together calls.
/// </summary>
[Generator]
public class WithPropertySourceGenerator : ISourceGenerator
public class WithPropertiesSourceGenerator
: ClassAttributeSourceGeneratorBase<WithPropertiesSyntaxReceiver>
{
public void Execute(GeneratorExecutionContext context)
/// <inheritdoc />
protected override WithPropertiesSyntaxReceiver CreateSyntaxReceiver(
GeneratorInitializationContext context)
{
// Get the generator infrastructure will create a receiver and
// populate it we can retrieve the populated instance via the
// context.
var syntaxReceiver = (WithPropertySyntaxReceiver?)context.SyntaxReceiver;
if (syntaxReceiver == null)
{
return;
}
// Report any messages.
foreach (string? message in syntaxReceiver.Messages)
{
context.Information(
MessageCode.Debug,
Location.Create(
"Temporary.g.cs",
TextSpan.FromBounds(0, 0),
new LinePositionSpan(new LinePosition(0, 0), new LinePosition(0, 0))),
"Generating additional identifier code: {0}",
message);
}
// If we didn't find anything, then there is nothing to do.
if (syntaxReceiver.ClassList.Count == 0)
{
return;
}
// Go through each one.
foreach (WithPropertyClass classInfo in syntaxReceiver.ClassList)
{
this.GenerateClassFile(context, classInfo);
}
return new WithPropertiesSyntaxReceiver(context);
}
public void Initialize(GeneratorInitializationContext context)
{
// Register a factory that can create our custom syntax receiver
context.RegisterForSyntaxNotifications(() => new WithPropertySyntaxReceiver(context));
}
private void GenerateClassFile(GeneratorExecutionContext context, WithPropertyClass unit)
protected override void GenerateClassFile(
GeneratorExecutionContext context,
ClassAttributeReference unit)
{
// Pull out some fields.
ClassDeclarationSyntax? cds = unit.ClassDeclaration;
ClassDeclarationSyntax cds = unit.ClassDeclaration;
// Create the partial class.
StringBuilder buffer = new();
@ -88,12 +54,15 @@ public class WithPropertySourceGenerator : ISourceGenerator
IEnumerable<PropertyDeclarationSyntax> properties = cds.Members
.Where(m => m.Kind() == SyntaxKind.PropertyDeclaration)
.Cast<PropertyDeclarationSyntax>();
bool first = true;
foreach (PropertyDeclarationSyntax pds in properties)
{
// See if we have a setter.
bool found = pds.AccessorList?.Accessors.Any(x => x.Keyword.ToString() == "set") ?? false;
bool found = pds.AccessorList?.Accessors
.Any(x => x.Keyword.ToString() == "set")
?? false;
if (!found)
{
@ -112,10 +81,12 @@ public class WithPropertySourceGenerator : ISourceGenerator
// Write some documentation.
buffer.AppendLine(" /// <summary>");
buffer.AppendLine(
string.Format(
" /// Sets the {0} value and returns the operation for chaining.",
pds.Identifier.ToString()));
buffer.AppendLine(" /// </summary>");
// We have the components for writing out a setter.
@ -125,8 +96,10 @@ public class WithPropertySourceGenerator : ISourceGenerator
cds.Identifier,
pds.Identifier,
pds.Type));
buffer.AppendLine(" {");
buffer.AppendLine(string.Format(" this.{0} = value;", pds.Identifier));
buffer.AppendLine(
string.Format(" this.{0} = value;", pds.Identifier));
buffer.AppendLine(" return this;");
buffer.AppendLine(" }");
}

View file

@ -0,0 +1,12 @@
using Microsoft.CodeAnalysis;
namespace MfGames.Nitride.Generators;
public class WithPropertiesSyntaxReceiver : ClassAttributeSyntaxReceiverBase
{
/// <inheritdoc />
public WithPropertiesSyntaxReceiver(GeneratorInitializationContext context)
: base(context, "WithProperties")
{
}
}

View file

@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Threading;
using FluentValidation;
using HandlebarsDotNet;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Handlebars;
/// <summary>
/// An operation that applies a common or shared template on the content of
/// a document that includes theme or styling information.
/// </summary>
[WithProperties]
public partial class ApplyStyleTemplate : OperationBase
{
private readonly HandlebarsTemplateCache cache;
private readonly IValidator<ApplyStyleTemplate> validator;
public ApplyStyleTemplate(
IValidator<ApplyStyleTemplate> validator,
HandlebarsTemplateCache cache)
{
this.validator = validator;
this.cache = cache;
}
/// <summary>
/// Gets or sets the callback used to create a model from a given
/// entity. This allows for the website to customize what information is
/// being passed to the template.
/// </summary>
public Func<Entity, object>? CreateModelCallback { get; set; }
/// <summary>
/// Gets or sets the callback used to determine which template to use
/// for a given entity. This lets one have a per-page template change.
/// </summary>
public Func<Entity, string>? GetTemplateName { get; set; }
public IHandlebars? Handlebars { get; set; }
/// <inheritdoc />
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
// Make sure we have sane data.
this.validator.ValidateAndThrow(this);
// Create and set up the Handlebars.
return input.SelectEntity<ITextContent>(this.Apply);
}
private Entity Apply(
Entity entity,
ITextContent content)
{
object model = this.CreateModelCallback!(entity);
string name = this.GetTemplateName!(entity);
HandlebarsTemplate<object, object> template =
this.cache.GetNamedTemplate(name);
string result = template(model!);
return entity.SetTextContent(result);
}
}

View file

@ -0,0 +1,18 @@
using FluentValidation;
namespace MfGames.Nitride.Handlebars;
public class ApplyStyleTemplateValidator : AbstractValidator<ApplyStyleTemplate>
{
public ApplyStyleTemplateValidator()
{
this.RuleFor(x => x.Handlebars)
.NotNull();
this.RuleFor(x => x.GetTemplateName)
.NotNull();
this.RuleFor(x => x.CreateModelCallback)
.NotNull();
}
}

View file

@ -0,0 +1,35 @@
using System.IO;
using HandlebarsDotNet;
namespace MfGames.Nitride.Handlebars.Configuration;
/// <summary>
/// Loads the templates from the given directory.
/// </summary>
public class FileSystemHandlebarsTemplateLoader : IHandlebarsLoader
{
private readonly DirectoryInfo directory;
private readonly string pattern;
public FileSystemHandlebarsTemplateLoader(
DirectoryInfo directory,
string pattern = "*.hbs")
{
this.directory = directory;
this.pattern = pattern;
}
/// <inheritdoc />
public void Register(IHandlebars handlebars)
{
foreach (FileInfo file in this.directory.GetFiles(this.pattern))
{
string name = Path.GetFileNameWithoutExtension(file.Name);
string content = File.ReadAllText(file.FullName);
handlebars.RegisterTemplate(name, content);
}
}
}

View file

@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using HandlebarsDotNet;
namespace MfGames.Nitride.Handlebars.Configuration;
/// <summary>
/// </summary>
/// <typeparam name="TModel">A typesafe model of the template.</typeparam>
public class ForEachHandlebarsBlock<TModel> : HandlebarsBlockBase
{
public ForEachHandlebarsBlock(string helperName)
{
this.HelperName = helperName;
}
/// <summary>
/// Gets or sets the list that needs to be rendered.
/// </summary>
public Func<TModel, IEnumerable<object>>? GetList { get; set; }
/// <summary>
/// Gets or sets the callback that is called when nothing is found.
/// </summary>
public Action<EncodedTextWriter, BlockHelperOptions, Context, Arguments>?
NothingFound
{
get;
set;
}
/// <inheritdoc />
protected override string HelperName { get; }
public ForEachHandlebarsBlock<TModel> WithGetList(
Func<TModel, IEnumerable<object>>? callback)
{
this.GetList = callback;
return this;
}
public ForEachHandlebarsBlock<TModel> WithNothingFoundText(
Action<EncodedTextWriter, BlockHelperOptions, Context, Arguments>?
callback)
{
this.NothingFound = callback;
return this;
}
/// <summary>
/// Sets the output to write out text when no items are found.
/// </summary>
/// <param name="text">The text to write out.</param>
/// <returns>The same object for chained methods.</returns>
public ForEachHandlebarsBlock<TModel> WithNothingFoundText(string text)
{
this.NothingFound = (
output,
_1,
_2,
_3) => output.Write(text);
return this;
}
/// <inheritdoc />
protected override void Render(
EncodedTextWriter output,
BlockHelperOptions options,
Context context,
Arguments input)
{
if (context.Value is not TModel model)
{
throw new InvalidOperationException(
string.Format(
"Cannot apply the {0} on context value because it is {1}.",
nameof(ForEachHandlebarsBlock<TModel>),
context.Value.GetType()));
}
IEnumerable<object>? list = this.GetList?.Invoke(model);
bool hasItems = false;
if (list != null)
{
foreach (object item in list)
{
hasItems = true;
options.Template(output, item);
}
}
if (!hasItems)
{
this.NothingFound?.Invoke(output, options, context, input);
}
}
}

View file

@ -0,0 +1,30 @@
using HandlebarsDotNet;
namespace MfGames.Nitride.Handlebars.Configuration;
/// <summary>
/// Describes a block helper which can be registered.
/// </summary>
public abstract class HandlebarsBlockBase : IHandlebarsLoader
{
/// <summary>
/// Gets the name of the helper, which is how it is called in the template.
/// </summary>
protected abstract string HelperName { get; }
public void Register(IHandlebars handlebars)
{
HandlebarsBlockHelper blockHelper = this.Render;
handlebars.RegisterHelper(this.HelperName, blockHelper);
}
/// <summary>
/// Renders the helper to the template.
/// </summary>
protected abstract void Render(
EncodedTextWriter output,
BlockHelperOptions options,
Context context,
Arguments input);
}

View file

@ -0,0 +1,15 @@
using HandlebarsDotNet;
namespace MfGames.Nitride.Handlebars.Configuration;
/// <summary>
/// Describes a dependency injected loader of templates or modules.
/// </summary>
public interface IHandlebarsLoader
{
/// <summary>
/// Registers the given helper into the handlebars engine.
/// </summary>
/// <param name="handlebars">The handlebars to register the helper into.</param>
void Register(IHandlebars handlebars);
}

View file

@ -4,7 +4,7 @@ using HandlebarsDotNet;
using Open.Threading;
namespace Nitride.Handlebars;
namespace MfGames.Nitride.Handlebars;
/// <summary>
/// Implements a cache for templates to prevent compiling the same template
@ -16,13 +16,15 @@ public class HandlebarsTemplateCache
private readonly ModificationSynchronizer locker;
private readonly Dictionary<string, HandlebarsTemplate<object, object>> templates;
private readonly Dictionary<string, HandlebarsTemplate<object, object>>
templates;
public HandlebarsTemplateCache(IHandlebars handlebars)
{
this.handlebars = handlebars;
this.locker = new ModificationSynchronizer();
this.templates = new Dictionary<string, HandlebarsTemplate<object, object>>();
this.templates =
new Dictionary<string, HandlebarsTemplate<object, object>>();
}
/// <summary>
@ -39,7 +41,8 @@ public class HandlebarsTemplateCache
() => !this.templates.ContainsKey(literal),
() =>
{
HandlebarsTemplate<object, object> template = this.handlebars!.Compile(literal);
HandlebarsTemplate<object, object> template =
this.handlebars!.Compile(literal);
this.templates[literal] = template;
@ -56,7 +59,8 @@ public class HandlebarsTemplateCache
/// </summary>
/// <param name="templateName"></param>
/// <returns></returns>
public HandlebarsTemplate<object, object> GetNamedTemplate(string templateName)
public HandlebarsTemplate<object, object> GetNamedTemplate(
string templateName)
{
string template = $"{{{{> {templateName}}}}}";

View file

@ -1,4 +1,4 @@
namespace Nitride.Handlebars;
namespace MfGames.Nitride.Handlebars;
/// <summary>
/// A marker component that indicates that a given file with text component

View file

@ -1,12 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using FluentValidation;
using Gallium;
using MfGames.Gallium;
using MfGames.Nitride.Generators;
namespace Nitride.Handlebars;
namespace MfGames.Nitride.Handlebars;
/// <summary>
/// An operation that discovers which text files have a Handlebars template
@ -17,7 +19,8 @@ public partial class IdentifyHandlebarsFromComponent : IOperation
{
private readonly IValidator<IdentifyHandlebarsFromComponent> validator;
public IdentifyHandlebarsFromComponent(IValidator<IdentifyHandlebarsFromComponent> validator)
public IdentifyHandlebarsFromComponent(
IValidator<IdentifyHandlebarsFromComponent> validator)
{
this.validator = validator;
}
@ -25,11 +28,15 @@ public partial class IdentifyHandlebarsFromComponent : IOperation
public Func<Entity, bool> HasHandlebarsTest { get; set; } = null!;
/// <inheritdoc />
public IEnumerable<Entity> Run(IEnumerable<Entity> input)
public IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
return input.Select(
(entity) => this.HasHandlebarsTest.Invoke(entity) ? entity.Set(HasHandlebarsTemplate.Instance) : entity);
(entity) => this.HasHandlebarsTest.Invoke(entity)
? entity.Set(HasHandlebarsTemplate.Instance)
: entity);
}
}

View file

@ -0,0 +1,13 @@
using FluentValidation;
namespace MfGames.Nitride.Handlebars;
public class IdentifyHandlebarsFromComponentValidator
: AbstractValidator<IdentifyHandlebarsFromComponent>
{
public IdentifyHandlebarsFromComponentValidator()
{
this.RuleFor(x => x.HasHandlebarsTest)
.NotNull();
}
}

View file

@ -0,0 +1,36 @@
using System.Collections.Generic;
using System.Threading;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
namespace MfGames.Nitride.Handlebars;
/// <summary>
/// An operation that discovers which text files have a Handlebars template
/// inside them.
/// </summary>
public class IdentifyHandlebarsFromContent : IOperation
{
/// <inheritdoc />
public IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
return input.SelectEntity<ITextContent>(this.ScanContent);
}
private Entity ScanContent(
Entity entity,
ITextContent content)
{
string text = content.GetTextContentString();
if (text.Contains("{{") && text.Contains("}}"))
{
return entity.Set(HasHandlebarsTemplate.Instance);
}
return entity;
}
}

View file

@ -11,14 +11,14 @@
<ItemGroup>
<PackageReference Include="Autofac" Version="6.4.0"/>
<PackageReference Include="Gallium" Version="1.0.2"/>
<PackageReference Include="MfGames.Gallium" Version="0.4.0"/>
<PackageReference Include="Handlebars.Net" Version="2.1.2"/>
<PackageReference Include="NodaTime.Testing" Version="3.1.0"/>
<PackageReference Include="Open.Threading" Version="2.2.0"/>
<PackageReference Include="NodaTime.Testing" Version="3.1.2"/>
<PackageReference Include="Open.Threading" Version="2.2.1"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride\Nitride.csproj"/>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj"/>
</ItemGroup>
<!-- Include the source generator -->
@ -27,7 +27,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.Generators\Nitride.Generators.csproj">
<ProjectReference Include="..\MfGames.Nitride.Generators\MfGames.Nitride.Generators.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>

View file

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using Autofac;
using MfGames.Nitride.Handlebars.Configuration;
namespace MfGames.Nitride.Handlebars;
public static class NitrideHandlebarsBuilderExtensions
{
public static NitrideBuilder UseHandlebars(this NitrideBuilder builder)
{
return builder
.ConfigureContainer(
x => x.RegisterModule<NitrideHandlebarsModule>());
}
public static NitrideBuilder UseHandlebars(
this NitrideBuilder builder,
Func<ContainerBuilder, IEnumerable<IHandlebarsLoader>> configure)
{
builder.UseHandlebars();
builder.ConfigureContainer(
c =>
{
IEnumerable<IHandlebarsLoader> loaders = configure(c);
foreach (IHandlebarsLoader loader in loaders)
{
c.RegisterInstance(loader)
.As<IHandlebarsLoader>()
.SingleInstance();
}
});
return builder;
}
}

View file

@ -0,0 +1,41 @@
using System.Collections.Generic;
using Autofac;
using HandlebarsDotNet;
using MfGames.Nitride.Handlebars.Configuration;
namespace MfGames.Nitride.Handlebars;
public class NitrideHandlebarsModule : Module
{
/// <inheritdoc />
protected override void Load(ContainerBuilder builder)
{
builder.RegisterOperators(this);
builder.RegisterValidators(this);
builder.RegisterType<HandlebarsTemplateCache>()
.AsSelf()
.SingleInstance();
builder.Register(
(context) =>
{
IHandlebars handlebars =
HandlebarsDotNet.Handlebars.Create();
IEnumerable<IHandlebarsLoader> helpers =
context.Resolve<IEnumerable<IHandlebarsLoader>>();
foreach (IHandlebarsLoader helper in helpers)
{
helper.Register(handlebars);
}
return handlebars;
})
.As<IHandlebars>()
.SingleInstance();
}
}

View file

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Threading;
using FluentValidation;
using HandlebarsDotNet;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Handlebars;
/// <summary>
/// An operation that uses the content to create a template that is then
/// applied against the content and metadata and then replaces the content
/// of that entity.
/// </summary>
[WithProperties]
public partial class RenderContentTemplate : OperationBase
{
private readonly HandlebarsTemplateCache cache;
private readonly IValidator<RenderContentTemplate> validator;
public RenderContentTemplate(
IValidator<RenderContentTemplate> validator,
HandlebarsTemplateCache cache)
{
this.validator = validator;
this.cache = cache;
}
/// <summary>
/// Gets or sets the callback used to create a model from a given
/// entity. This allows for the website to customize what information is
/// being passed to the template.
/// </summary>
public Func<Entity, object>? CreateModelCallback { get; set; }
/// <inheritdoc />
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
return input.SelectEntity<HasHandlebarsTemplate, ITextContent>(
this.Apply);
}
private Entity Apply(
Entity entity,
HasHandlebarsTemplate _,
ITextContent content)
{
string text = content.GetTextContentString();
HandlebarsTemplate<object, object> template =
this.cache.GetLiteralTemplate(text);
object model = this.CreateModelCallback!(entity);
string result = template(model!);
return entity
.Remove<HasHandlebarsTemplate>()
.SetTextContent(result);
}
}

View file

@ -0,0 +1,13 @@
using FluentValidation;
namespace MfGames.Nitride.Handlebars;
public class RenderContentTemplateValidator
: AbstractValidator<RenderContentTemplate>
{
public RenderContentTemplateValidator()
{
this.RuleFor(x => x.CreateModelCallback)
.NotNull();
}
}

View file

@ -0,0 +1,33 @@
using System.Collections.Generic;
using System.Net;
using System.Threading;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
namespace MfGames.Nitride.Html;
/// <summary>
/// Converts the text input that uses HTML entities and turns them into
/// Unicode variations.
/// </summary>
public class ConvertHtmlEntitiesToUnicode : OperationBase
{
/// <inheritdoc />
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
return input.SelectEntity<ITextContent>(this.ResolveHtmlEntities);
}
private Entity ResolveHtmlEntities(
Entity entity,
ITextContent content)
{
string text = content.GetTextContentString();
string resolved = WebUtility.HtmlDecode(text);
return entity.SetTextContent(resolved);
}
}

View file

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Threading;
using FluentValidation;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
using MfGames.Nitride.Generators;
using Zio;
namespace MfGames.Nitride.Html;
/// <summary>
/// An operation that identifies Markdown files by their common extensions
/// and converts them to text input while also adding the IsMarkdown
/// component to identify them.
/// </summary>
[WithProperties]
public partial class IdentifyHtml : IOperation
{
private readonly IValidator<IdentifyHtml> validator;
public IdentifyHtml(IValidator<IdentifyHtml> validator)
{
this.validator = validator;
}
public Func<Entity, UPath, bool> IsHtmlTest { get; set; } = null!;
/// <inheritdoc />
public IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
return input.SelectEntity<UPath, ITextContent>(this.MarkTextEntities)
.SelectEntity<UPath, IBinaryContent>(this.MarkBinaryEntities);
}
private Entity MarkBinaryEntities(
Entity entity,
UPath path,
IBinaryContent binary)
{
// If we aren't a Markdown file, then there is nothing we can do about that.
if (!this.IsHtmlTest(entity, path))
{
return entity;
}
// Convert the file as a binary.
if (binary is ITextContentConvertable textConvertable)
{
entity = entity.SetTextContent(textConvertable.ToTextContent())
.SetIsHtml();
}
else
{
throw new InvalidOperationException(
"Cannot convert a binary content to a text without ITextContentConvertable.");
}
return entity;
}
private Entity MarkTextEntities(
Entity entity,
UPath path,
ITextContent _)
{
return this.IsHtmlTest(entity, path)
? entity.SetIsHtml()
: entity;
}
}

View file

@ -0,0 +1,29 @@
using FluentValidation;
using MfGames.Gallium;
using Zio;
namespace MfGames.Nitride.Html;
public class IdentifyHtmlFromPath : IdentifyHtml
{
public IdentifyHtmlFromPath(IValidator<IdentifyHtml> validator)
: base(validator)
{
this.IsHtmlTest = DefaultIsHtml;
}
private static bool DefaultIsHtml(
Entity entity,
UPath path)
{
return (path.GetExtensionWithDot() ?? string.Empty).ToLowerInvariant()
switch
{
".htm" => true,
".html" => true,
_ => false,
};
}
}

View file

@ -0,0 +1,11 @@
using MfGames.Nitride.Generators;
namespace MfGames.Nitride.Html;
/// <summary>
/// A marker component that indicates that the entity is an HTML file.
/// </summary>
[SingletonComponent]
public partial class IsHtml
{
}

View file

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride\Nitride.csproj"/>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj" />
</ItemGroup>
<!-- Include the source generator -->
@ -18,14 +18,14 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.Generators\Nitride.Generators.csproj">
<ProjectReference Include="..\MfGames.Nitride.Generators\MfGames.Nitride.Generators.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Gallium" Version="1.0.2"/>
<PackageReference Include="MfGames.Gallium" Version="0.4.0" />
</ItemGroup>
</Project>

View file

@ -1,11 +1,12 @@
using Autofac;
namespace Nitride.Html;
namespace MfGames.Nitride.Html;
public static class NitrideHtmlBuilderExtensions
{
public static NitrideBuilder UseHtml(this NitrideBuilder builder)
{
return builder.ConfigureContainer(x => x.RegisterModule<NitrideHtmlModule>());
return builder.ConfigureContainer(
x => x.RegisterModule<NitrideHtmlModule>());
}
}

View file

@ -1,6 +1,6 @@
using Autofac;
namespace Nitride.Html;
namespace MfGames.Nitride.Html;
public class NitrideHtmlModule : Module
{
@ -8,5 +8,6 @@ public class NitrideHtmlModule : Module
protected override void Load(ContainerBuilder builder)
{
builder.RegisterOperators(this);
builder.RegisterValidators(this);
}
}

View file

@ -0,0 +1,12 @@
using FluentValidation;
namespace MfGames.Nitride.Html.Validators;
public class IdentifyHtmlValidator : AbstractValidator<IdentifyHtml>
{
public IdentifyHtmlValidator()
{
this.RuleFor(x => x.IsHtmlTest)
.NotNull();
}
}

View file

@ -1,10 +1,10 @@
using System.IO;
using Nitride.Contents;
using MfGames.Nitride.Contents;
using Zio;
namespace Nitride.IO.Contents;
namespace MfGames.Nitride.IO.Contents;
/// <summary>
/// Contains a wrapper around a file entry to retrieve the binary data.

View file

@ -1,11 +1,11 @@
using System.IO;
using System.Text;
using Nitride.Contents;
using MfGames.Nitride.Contents;
using Zio;
namespace Nitride.IO.Contents;
namespace MfGames.Nitride.IO.Contents;
/// <summary>
/// Contains a wrapper around a file entry to retrieve text data.
@ -22,7 +22,9 @@ public class FileEntryTextContent : ITextContent, IBinaryContentConvertable
/// <inheritdoc />
public TextReader GetReader()
{
return new StreamReader(this.entry.Open(FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8);
return new StreamReader(
this.entry.Open(FileMode.Open, FileAccess.Read, FileShare.Read),
Encoding.UTF8);
}
/// <inheritdoc />

View file

@ -2,18 +2,19 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using DotNet.Globbing;
using FluentValidation;
using Gallium;
using Nitride.Contents;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
using MfGames.Nitride.Generators;
using Zio;
namespace Nitride.IO.Contents;
namespace MfGames.Nitride.IO.Contents;
/// <summary>
/// A module that reads files from the file system and wraps them in an
@ -24,7 +25,9 @@ public partial class ReadFiles : FileSystemOperationBase
{
private readonly IValidator<ReadFiles> validator;
public ReadFiles(IValidator<ReadFiles> validator, IFileSystem fileSystem)
public ReadFiles(
IValidator<ReadFiles> validator,
IFileSystem fileSystem)
: base(fileSystem)
{
this.validator = validator;
@ -41,9 +44,10 @@ public partial class ReadFiles : FileSystemOperationBase
/// minimatch pattern (as defined by DotNet.Blob).
/// </summary>
/// <returns>A populated collection of entities.</returns>
public IEnumerable<Entity> Run()
public IEnumerable<Entity> Run(
CancellationToken cancellationToken = default)
{
return this.Run(Array.Empty<Entity>());
return this.Run(Array.Empty<Entity>(), cancellationToken);
}
/// <summary>
@ -51,13 +55,18 @@ public partial class ReadFiles : FileSystemOperationBase
/// minimatch pattern (as defined by DotNet.Blob).
/// </summary>
/// <returns>A populated collection of entities.</returns>
public override IEnumerable<Entity> Run(IEnumerable<Entity> input)
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
var glob = Glob.Parse(this.Pattern);
IEnumerable<FileEntry> files = this.FileSystem.EnumerateFileEntries("/", "*", SearchOption.AllDirectories)
IEnumerable<FileEntry> files = this.FileSystem
.EnumerateFileEntries("/", "*", SearchOption.AllDirectories)
.Where(x => glob.IsMatch(x.Path.ToString()));
IEnumerable<Entity> entities = files.Select(this.ToEntity);
return entities;
@ -66,6 +75,7 @@ public partial class ReadFiles : FileSystemOperationBase
public ReadFiles WithFileSystem(IFileSystem value)
{
this.FileSystem = value;
return this;
}
@ -78,7 +88,8 @@ public partial class ReadFiles : FileSystemOperationBase
/// <returns>An Entity with appropriate content.</returns>
private Entity ToEntity(FileEntry file)
{
Entity entity = new Entity().Set(file.Path).SetBinaryContent(new FileEntryBinaryContent(file));
Entity entity = new Entity().Set(file.Path)
.SetBinaryContent(new FileEntryBinaryContent(file));
return entity;
}

View file

@ -0,0 +1,15 @@
using FluentValidation;
namespace MfGames.Nitride.IO.Contents;
public class ReadFilesValidator : AbstractValidator<ReadFiles>
{
public ReadFilesValidator()
{
this.RuleFor(x => x.Pattern)
.NotNull();
this.RuleFor(x => x.FileSystem)
.NotNull();
}
}

View file

@ -3,18 +3,19 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using FluentValidation;
using Gallium;
using Nitride.Contents;
using MfGames.Gallium;
using MfGames.Nitride.Contents;
using MfGames.Nitride.Generators;
using Serilog;
using Zio;
namespace Nitride.IO.Contents;
namespace MfGames.Nitride.IO.Contents;
/// <summary>
/// An operation that writes out entities to a file system.
@ -26,12 +27,16 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
private Dictionary<Type, Func<IContent, Stream>> factories;
public WriteFiles(IValidator<WriteFiles> validator, ILogger logger, IFileSystem fileSystem)
public WriteFiles(
IValidator<WriteFiles> validator,
ILogger logger,
IFileSystem fileSystem)
: base(fileSystem)
{
this.Logger = logger;
this.validator = validator;
this.TextEncoding = Encoding.UTF8;
this.factories = new Dictionary<Type, Func<IContent, Stream>>
{
[typeof(IBinaryContent)] = GetBinaryStream,
@ -44,7 +49,8 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
public Dictionary<Type, Func<IContent, Stream>> StreamFactories
{
get => this.factories;
set => this.factories = value ?? throw new ArgumentNullException(nameof(value));
set => this.factories =
value ?? throw new ArgumentNullException(nameof(value));
}
/// <summary>
@ -58,12 +64,16 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
/// a path and a registered writer will be written.
/// </summary>
/// <param name="entities">The entities to parse.</param>
/// <param name="cancellationToken"></param>
/// <returns>The same list of entities without changes.</returns>
public override IEnumerable<Entity> Run(IEnumerable<Entity> entities)
public override IEnumerable<Entity> Run(
IEnumerable<Entity> entities,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
IEnumerable<Entity> results = entities.ForEachEntity<UPath>(this.Process).ToList();
IEnumerable<Entity> results = entities.SelectEntity<UPath>(this.Process)
.ToList();
return results;
}
@ -71,6 +81,7 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
public WriteFiles WithFileSystem(IFileSystem fileSystem)
{
this.FileSystem = fileSystem;
return this;
}
@ -85,14 +96,20 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
// we don't have to load it entirely in memory.
if (content is IBinaryContentConvertable convertable)
{
return convertable.ToBinaryContent().GetStream();
return convertable.ToBinaryContent()
.GetStream();
}
// We have the load the text into memory and convert it.
var textContent = (ITextContent)content;
string text = textContent.GetReader().ReadToEnd();
string text = textContent.GetReader()
.ReadToEnd();
var stream = new MemoryStream();
var writer = new StreamWriter(stream, this.TextEncoding ?? Encoding.UTF8);
var writer = new StreamWriter(
stream,
this.TextEncoding ?? Encoding.UTF8);
writer.Write(text);
writer.Flush();
@ -109,7 +126,9 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
/// <param name="entity">The entity to write out.</param>
/// <param name="path">The path of the entity.</param>
/// <returns>The entity passed in.</returns>
private Entity Process(Entity entity, UPath path)
private Entity Process(
Entity entity,
UPath path)
{
// See if we have any content. If we don't, then there is nothing
// to do.
@ -121,7 +140,9 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
// First see if we have a factory for the exact type of content.
IContent content = entity.GetContent();
if (this.factories.TryGetValue(content.GetType(), out Func<IContent, Stream>? getStream))
if (this.factories.TryGetValue(
content.GetType(),
out Func<IContent, Stream>? getStream))
{
Stream stream = getStream(content);
@ -131,7 +152,9 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
// If we have an easy conversion, then use that so we don't have to
// walk up the tree looking for one we do have.
if (content is IBinaryContentConvertable binaryConvertable
&& this.factories.TryGetValue(typeof(IBinaryContent), out Func<IContent, Stream>? binaryContent))
&& this.factories.TryGetValue(
typeof(IBinaryContent),
out Func<IContent, Stream>? binaryContent))
{
Stream stream = binaryContent(binaryConvertable.ToBinaryContent());
@ -139,7 +162,9 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
}
if (content is ITextContentConvertable textConvertable
&& this.factories.TryGetValue(typeof(ITextContent), out Func<IContent, Stream>? textContent))
&& this.factories.TryGetValue(
typeof(ITextContent),
out Func<IContent, Stream>? textContent))
{
Stream stream = textContent(textConvertable.ToTextContent());
@ -155,7 +180,12 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
{
// Check to see if we have any of these types.
Func<IContent, Stream>? found = types
.Select(x => this.factories.TryGetValue(x, out Func<IContent, Stream>? factory) ? factory : null)
.Select(
x => this.factories.TryGetValue(
x,
out Func<IContent, Stream>? factory)
? factory
: null)
.FirstOrDefault(x => x != null);
if (found != null)
@ -167,7 +197,8 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
// We didn't find one, so add all the parent types and try
// again with the new list.
types = types.SelectMany(x => new[] { x.BaseType }.Union(x.GetInterfaces()))
types = types
.SelectMany(x => new[] { x.BaseType }.Union(x.GetInterfaces()))
.Where(x => x != null)
.Select(x => x!)
.ToList();
@ -178,7 +209,8 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
"Cannot write out entity "
+ path
+ " because cannot determine how to get a stream out content type "
+ content.GetType().FullName
+ content.GetType()
.FullName
+ ". To resolve, register a function to this.StreamFactories.");
}
@ -189,7 +221,10 @@ public partial class WriteFiles : FileSystemOperationBase, IOperation
/// <param name="path">The path to write out, directories will be created.</param>
/// <param name="stream">The stream to write out.</param>
/// <returns>The entity passed in.</returns>
private Entity Process(Entity entity, UPath path, Stream stream)
private Entity Process(
Entity entity,
UPath path,
Stream stream)
{
// Make sure we have the directory structure.
UPath directory = path.GetDirectory();

View file

@ -0,0 +1,21 @@
using FluentValidation;
namespace MfGames.Nitride.IO.Contents;
public class WriteFilesValidator : AbstractValidator<WriteFiles>
{
public WriteFilesValidator()
{
this.RuleFor(x => x.StreamFactories)
.NotNull();
this.RuleFor(x => x.TextEncoding)
.NotNull();
this.RuleFor(x => x.FileSystem)
.NotNull();
this.RuleFor(x => x.Logger)
.NotNull();
}
}

View file

@ -1,15 +1,17 @@
using System;
using System.Collections.Generic;
using System.Threading;
using FluentValidation;
using Gallium;
using MfGames.Gallium;
using MfGames.Nitride.Generators;
using Serilog;
using Zio;
namespace Nitride.IO.Directories;
namespace MfGames.Nitride.IO.Directories;
/// <summary>
/// A Nitride operation that removes the contents of a directory but not
@ -22,7 +24,10 @@ public partial class ClearDirectory : FileSystemOperationBase, IOperation
{
private readonly IValidator<ClearDirectory> validator;
public ClearDirectory(IValidator<ClearDirectory> validator, IFileSystem fileSystem, ILogger logger)
public ClearDirectory(
IValidator<ClearDirectory> validator,
IFileSystem fileSystem,
ILogger logger)
: base(fileSystem)
{
this.Logger = logger;
@ -36,13 +41,16 @@ public partial class ClearDirectory : FileSystemOperationBase, IOperation
/// </summary>
public UPath? Path { get; set; }
public IEnumerable<Entity> Run()
public IEnumerable<Entity> Run(
CancellationToken cancellationToken = default)
{
return this.Run(new List<Entity>());
return this.Run(new List<Entity>(), cancellationToken);
}
/// <inheritdoc />
public override IEnumerable<Entity> Run(IEnumerable<Entity> input)
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
@ -68,7 +76,8 @@ public partial class ClearDirectory : FileSystemOperationBase, IOperation
// Clear out the contents.
IEnumerable<UPath> files = this.FileSystem.EnumerateFiles(path);
IEnumerable<UPath> directories = this.FileSystem.EnumerateDirectories(path);
IEnumerable<UPath> directories =
this.FileSystem.EnumerateDirectories(path);
foreach (UPath file in files)
{
@ -87,6 +96,7 @@ public partial class ClearDirectory : FileSystemOperationBase, IOperation
public ClearDirectory WithFileSystem(IFileSystem value)
{
this.FileSystem = value;
return this;
}
}

View file

@ -0,0 +1,18 @@
using FluentValidation;
namespace MfGames.Nitride.IO.Directories;
public class ClearDirectoryValidator : AbstractValidator<ClearDirectory>
{
public ClearDirectoryValidator()
{
this.RuleFor(x => x.Path)
.NotNull();
this.RuleFor(x => x.FileSystem)
.NotNull();
this.RuleFor(x => x.Logger)
.NotNull();
}
}

View file

@ -1,10 +1,11 @@
using System.Collections.Generic;
using System.Threading;
using Gallium;
using MfGames.Gallium;
using Zio;
namespace Nitride.IO;
namespace MfGames.Nitride.IO;
public abstract class FileSystemOperationBase : IOperation
{
@ -16,5 +17,7 @@ public abstract class FileSystemOperationBase : IOperation
public IFileSystem FileSystem { get; set; }
/// <inheritdoc />
public abstract IEnumerable<Entity> Run(IEnumerable<Entity> input);
public abstract IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default);
}

View file

@ -0,0 +1,14 @@
namespace MfGames.Nitride.IO;
public enum IfFoundOutput
{
/// <summary>
/// If the entity is found, then remove it from output.
/// </summary>
RemoveFromOutput,
/// <summary>
/// If the entity is found, then keep it in the output sequence.
/// </summary>
ReturnInOutput,
}

View file

@ -10,14 +10,15 @@
<ItemGroup>
<PackageReference Include="Autofac" Version="6.4.0"/>
<PackageReference Include="DotNet.Glob" Version="3.1.3"/>
<PackageReference Include="FluentValidation" Version="11.0.2"/>
<PackageReference Include="Gallium" Version="1.0.2"/>
<PackageReference Include="FluentValidation" Version="11.2.1"/>
<PackageReference Include="MfGames.Gallium" Version="0.4.0"/>
<PackageReference Include="MAB.DotIgnore" Version="3.0.2"/>
<PackageReference Include="Serilog" Version="2.11.0"/>
<PackageReference Include="Zio" Version="0.15.0"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride\Nitride.csproj"/>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj"/>
</ItemGroup>
<!-- Include the source generator -->
@ -26,7 +27,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nitride.Generators\Nitride.Generators.csproj">
<ProjectReference Include="..\MfGames.Nitride.Generators\MfGames.Nitride.Generators.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>

View file

@ -1,11 +1,12 @@
using Autofac;
namespace Nitride.IO;
namespace MfGames.Nitride.IO;
public static class NitrideIOBuilderExtensions
{
public static NitrideBuilder UseIO(this NitrideBuilder builder)
{
return builder.ConfigureContainer(x => x.RegisterModule<NitrideIOModule>());
return builder.ConfigureContainer(
x => x.RegisterModule<NitrideIOModule>());
}
}

View file

@ -0,0 +1,90 @@
using System.Collections.Generic;
using MAB.DotIgnore;
using MfGames.Gallium;
using Zio;
namespace MfGames.Nitride.IO;
/// <summary>
/// Extension methods for working with paths.
/// </summary>
public static class NitrideIOEnumerableEntityExtensions
{
/// <summary>
/// Retrieves an entity from the sequence of entities.
/// </summary>
/// <param name="input">The sequence of iterations to parse.</param>
/// <param name="path">The path to search for.</param>
/// <param name="foundEntity">The entity pulled out, if found. Otherwise null.</param>
/// <param name="removeFromResults">If true, then remove the entity from the list.</param>
/// <returns>The sequence of entities, optionally without one.</returns>
public static IEnumerable<Entity> GetEntityByPath(
this IEnumerable<Entity> input,
UPath path,
out Entity? foundEntity,
IfFoundOutput removeFromResults = IfFoundOutput.RemoveFromOutput)
{
List<Entity> output = new();
foundEntity = null;
foreach (Entity entity in input)
{
// If we don't have a path, it isn't it.
if (!entity.TryGet(out UPath entityPath))
{
output.Add(entity);
continue;
}
// See if the path matches. If it doesn't, then return it.
if (entityPath != path)
{
output.Add(entity);
continue;
}
// We found the entity, so optionally return it.
foundEntity = entity;
if (removeFromResults == IfFoundOutput.ReturnInOutput)
{
output.Add(entity);
}
}
// Return the resulting output.
return output;
}
/// <summary>
/// Filters out entities that match a .gitignore style list and returns
/// the remaining entities.
/// </summary>
public static IEnumerable<Entity> WhereNotIgnored(
this IEnumerable<Entity> input,
IgnoreList ignoreList)
{
foreach (Entity entity in input)
{
// If we don't have a path, nothing to do.
if (!entity.TryGet(out UPath path))
{
yield return entity;
}
// See if the path matches. We use the "path is directory" set to false
// because Entity represents files, not directories.
string text = path.ToString();
if (!ignoreList.IsIgnored(text, false))
{
yield return entity;
}
}
}
}

View file

@ -1,6 +1,6 @@
using Autofac;
namespace Nitride.IO;
namespace MfGames.Nitride.IO;
public class NitrideIOModule : Module
{

View file

@ -0,0 +1,53 @@
using System.Collections.Generic;
using System.Threading;
using FluentValidation;
using MfGames.Gallium;
using MfGames.Nitride.Generators;
using Zio;
namespace MfGames.Nitride.IO.Paths;
[WithProperties]
public partial class AddPathPrefix : OperationBase
{
private readonly ReplacePath replacePath;
private readonly IValidator<AddPathPrefix> validator;
public AddPathPrefix(
IValidator<AddPathPrefix> validator,
ReplacePath replacePath)
{
this.validator = validator;
this.replacePath = replacePath;
}
/// <summary>
/// Gets or sets the prefix for the path operations.
/// </summary>
public UPath? PathPrefix { get; set; }
public override IEnumerable<Entity> Run(
IEnumerable<Entity> input,
CancellationToken cancellationToken = default)
{
this.validator.ValidateAndThrow(this);
return this.replacePath
.WithReplacement(this.RunReplacement)
.Run(input);
}
private UPath RunReplacement(
Entity _,
UPath path)
{
string innerRelativePath = path.ToString()
.TrimStart('/');
return this.PathPrefix!.Value / innerRelativePath;
}
}

Some files were not shown because too many files have changed in this diff Show more