diff --git a/.editorconfig b/.editorconfig index 8b506dab..9181fe50 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,252 +1,252 @@ root = true [*] -charset=utf-8 -next_line=crlf -insert_final_newline=false -indent_style=space -indent_size=4 +charset = utf-8 +next_line = crlf +insert_final_newline = false +indent_style = space +indent_size = 4 # Generic non-language specific ones for Resharper and friends -brace_style=next_line -int_align=true -keep_existing_arrangement=false -place_simple_blocks_on_single_line=true -place_simple_declaration_blocks_on_single_line=true -place_attribute_on_same_line=false -space_after_unary_operator=false -space_after_comma=true -space_around_ternary_operator=true -space_around_binary_operator=true -space_around_member_access_operator=false -space_before_open_square_brackets=false -space_after_keywords_in_control_flow_statements=true -space_before_comma=false -space_between_method_call_name_and_opening_parenthesis=false -space_between_method_declaration_name_and_open_parenthesis=false -space_between_square_brackets=false -space_between_parentheses_of_control_flow_statements=false -accessor_owner_declaration_braces=next_line -accessor_declaration_braces=next_line -case_block_braces=next_line -initializer_braces=next_line -other_braces=next_line -allow_comment_after_lbrace=false -empty_block_style=together_same_line -braces_for_ifelse=not_required -braces_for_for=not_required -braces_for_foreach=not_required -braces_for_while=not_required -braces_for_dowhile=not_required -braces_for_using=not_required -braces_for_lock=not_required -braces_for_fixed=not_required -method_or_operator_body=expression_body -local_function_body=expression_body -constructor_or_destructor_body=expression_body -accessor_owner_body=expression_body -force_attribute_style=join -function_braces=next_line -force_control_statements_braces=always_remove -space_in_singleline_accessorholder=true -type_declaration_braces=next_line -invocable_declaration_braces=next_line -anonymous_method_declaration_braces=next_line -space_between_accessors_in_singleline_property=true -indent_nested_usings_stmt=true -space_within_empty_braces=false -indent_nested_fixed_stmt=true -indent_nested_lock_stmt=true -indent_nested_for_stmt=true -indent_nested_foreach_stmt=true -indent_nested_while_stmt=true -use_continuous_indent_inside_parens=true -indent_method_decl_pars=inside -indent_invocation_pars=inside -indent_statement_pars=inside -indent_typeparam_angles=inside -indent_typearg_angles=inside -indent_pars=inside -indent_preprocessor_if=outdent -indent_preprocessor_region=usual_indent -indent_preprocessor_other=usual_indent -indent_switch_labels=true -indent_type_constraints=true -stick_comment=false -alignment_tab_fill_style=use_spaces -align_multiline_parameter=true -align_multiline_extends_list=true -align_linq_query=true -align_multiline_binary_expressions_chain=true -outdent_binary_ops=true -align_multiline_calls_chain=true -outdent_dots=true -align_multiline_array_and_object_initializer=false -indent_anonymous_method_block=false -align_first_arg_by_paren=true -align_multiline_argument=true -align_tuple_components=true -align_multiline_expression=true -align_multiline_for_stmt=true -align_multiple_declaration=true -align_multline_type_parameter_list=true -align_multline_type_parameter_constrains=true -int_align_fields=true -int_align_properties=true -int_align_methods=true -int_align_parameters=false -int_align_variables=true -int_align_assignments=true -int_align_nested_ternary=true -int_align_invocations=false -int_align_binary_expressions=true -int_align_comments=true -int_align_switch_sections=true -keep_user_linebreaks=false -keep_existing_arrangement=false -keep_existing_linebreaks=false -max_line_length=120 -wrap_before_comma=false -special_else_if_treatment=true -place_type_attribute_on_same_line=never -place_method_attribute_on_same_line=never -place_accessorholder_attribute_on_same_line=never -place_attribute_on_same_line=never -place_accessor_attribute_on_same_line=never -place_attribute_on_same_line=never -place_field_attribute_on_same_line=never -place_attribute_on_same_line=never -wrap_parameters_style=wrap_if_long -keep_existing_declaration_parens_arrangement=false -wrap_before_declaration_lpar=false -wrap_after_declaration_lpar=false -wrap_before_declaration_rpar=false -place_constructor_initializer_on_same_line=true -keep_existing_expr_member_arrangement=false -place_expr_method_on_single_line=true -place_expr_property_on_single_line=true -place_expr_accessor_on_single_line=true -wrap_before_arrow_with_expressions=false -place_type_constraints_on_same_line=true -wrap_before_first_type_parameter_constraint=true -wrap_multiple_type_parameter_constraints_style=wrap_if_long -wrap_before_type_parameter_langle=true -wrap_before_extends_colon=false -wrap_extends_list_style=wrap_if_long -keep_existing_declaration_block_arrangement=false -place_abstract_accessorholder_on_single_line=true -place_simple_accessorholder_on_single_line=false -place_accessor_with_attrs_holder_on_single_line=false -place_simple_accessor_on_single_line=true -place_simple_method_on_single_line=false -keep_existing_enum_arrangement=false -place_simple_enum_on_single_line=false -wrap_enum_declaration=wrap_if_long -new_line_before_else=true -new_line_before_while=false -wrap_for_stmt_header_style=wrap_if_long -wrap_multiple_declaration_style=wrap_if_long -keep_existing_embedded_arrangement=false -place_simple_embedded_statement_on_same_line=false -place_simple_case_statement_on_same_line=true -keep_existing_embedded_block_arrangement=false -place_simple_embedded_block_on_same_line=false -place_simple_anonymousmethod_on_single_line=false -keep_existing_initializer_arrangement=false -place_simple_initializer_on_single_line=false -wrap_object_and_collection_initializer_style=chop_always -wrap_array_initializer_style=wrap_if_long -wrap_arguments_style=wrap_if_long -keep_existing_invocation_parens_arrangement=false -wrap_after_invocation_lpar=false -wrap_before_invocation_rpar=false -wrap_after_dot_in_method_calls=true -wrap_chained_method_calls=wrap_if_long -wrap_before_binary_opsign=false -wrap_chained_binary_expressions=wrap_if_long -force_chop_compound_if_expression=true -force_chop_compound_while_expression=true -force_chop_compound_do_expression=true -wrap_before_ternary_opsigns=true -wrap_ternary_expr_style=wrap_if_long -nested_ternary_style=expanded -wrap_linq_expressions=wrap_if_long -wrap_before_linq_expression=false -place_linq_into_on_new_line=false -wrap_verbatim_interpolated_strings=wrap_if_long -extra_spaces=remove_all -space_after_keywords_in_control_flow_statements=false -space_between_method_call_name_and_opening_parenthesis=false -space_between_method_declaration_name_and_open_parenthesis=false -space_before_typeof_parentheses=false -space_before_checked_parentheses=false -space_before_sizeof_parentheses=false -space_before_nameof_parentheses=false -space_between_keyword_and_expression=true -space_between_keyword_and_type=true -space_around_assignment_op=true -space_around_logical_op=true -space_around_binary_operator=true -space_around_equality_op=true -space_around_relational_op=true -space_around_bitwise_op=true -space_around_additive_op=true -space_around_multiplicative_op=true -space_around_shift_op=true -space_around_nullcoalescing_op=true -space_around_arrow_op=false -space_after_logical_not_op=false -space_after_unary_operator=false -space_after_cast=false -space_around_dot=false -space_around_lambda_arrow=true -space_before_pointer_asterik_declaration=false -space_before_nullable_mark=false -blank_lines_around_class_definition=1 -namespace_indentation=all -space_within_template_argument=false -align_union_type_usage=true -space_in_singleline_method=true -space_in_singleline_anonymous_method=true -space_within_single_line_array_initializer_braces=true -space_around_arrow_op=false +brace_style = next_line +int_align = true +keep_existing_arrangement = false +place_simple_blocks_on_single_line = true +place_simple_declaration_blocks_on_single_line = true +place_attribute_on_same_line = false +space_after_unary_operator = false +space_after_comma = true +space_around_ternary_operator = true +space_around_binary_operator = true +space_around_member_access_operator = false +space_before_open_square_brackets = false +space_after_keywords_in_control_flow_statements = true +space_before_comma = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_between_square_brackets = false +space_between_parentheses_of_control_flow_statements = false +accessor_owner_declaration_braces = next_line +accessor_declaration_braces = next_line +case_block_braces = next_line +initializer_braces = next_line +other_braces = next_line +allow_comment_after_lbrace = false +empty_block_style = together_same_line +braces_for_ifelse = not_required +braces_for_for = not_required +braces_for_foreach = not_required +braces_for_while = not_required +braces_for_dowhile = not_required +braces_for_using = not_required +braces_for_lock = not_required +braces_for_fixed = not_required +method_or_operator_body = expression_body +local_function_body = expression_body +constructor_or_destructor_body = expression_body +accessor_owner_body = expression_body +force_attribute_style = join +function_braces = next_line +force_control_statements_braces = always_remove +space_in_singleline_accessorholder = true +type_declaration_braces = next_line +invocable_declaration_braces = next_line +anonymous_method_declaration_braces = next_line +space_between_accessors_in_singleline_property = true +indent_nested_usings_stmt = true +space_within_empty_braces = false +indent_nested_fixed_stmt = true +indent_nested_lock_stmt = true +indent_nested_for_stmt = true +indent_nested_foreach_stmt = true +indent_nested_while_stmt = true +use_continuous_indent_inside_parens = true +indent_method_decl_pars = inside +indent_invocation_pars = inside +indent_statement_pars = inside +indent_typeparam_angles = inside +indent_typearg_angles = inside +indent_pars = inside +indent_preprocessor_if = outdent +indent_preprocessor_region = usual_indent +indent_preprocessor_other = usual_indent +indent_switch_labels = true +indent_type_constraints = true +stick_comment = false +alignment_tab_fill_style = use_spaces +align_multiline_parameter = true +align_multiline_extends_list = true +align_linq_query = true +align_multiline_binary_expressions_chain = true +outdent_binary_ops = true +align_multiline_calls_chain = true +outdent_dots = true +align_multiline_array_and_object_initializer = false +indent_anonymous_method_block = false +align_first_arg_by_paren = true +align_multiline_argument = true +align_tuple_components = true +align_multiline_expression = true +align_multiline_for_stmt = true +align_multiple_declaration = true +align_multline_type_parameter_list = true +align_multline_type_parameter_constrains = true +int_align_fields = true +int_align_properties = true +int_align_methods = true +int_align_parameters = false +int_align_variables = true +int_align_assignments = true +int_align_nested_ternary = true +int_align_invocations = false +int_align_binary_expressions = true +int_align_comments = true +int_align_switch_sections = true +keep_user_linebreaks = false +keep_existing_arrangement = false +keep_existing_linebreaks = false +max_line_length = 120 +wrap_before_comma = false +special_else_if_treatment = true +place_type_attribute_on_same_line = never +place_method_attribute_on_same_line = never +place_accessorholder_attribute_on_same_line = never +place_attribute_on_same_line = never +place_accessor_attribute_on_same_line = never +place_attribute_on_same_line = never +place_field_attribute_on_same_line = never +place_attribute_on_same_line = never +wrap_parameters_style = wrap_if_long +keep_existing_declaration_parens_arrangement = false +wrap_before_declaration_lpar = false +wrap_after_declaration_lpar = false +wrap_before_declaration_rpar = false +place_constructor_initializer_on_same_line = true +keep_existing_expr_member_arrangement = false +place_expr_method_on_single_line = true +place_expr_property_on_single_line = true +place_expr_accessor_on_single_line = true +wrap_before_arrow_with_expressions = false +place_type_constraints_on_same_line = true +wrap_before_first_type_parameter_constraint = true +wrap_multiple_type_parameter_constraints_style = wrap_if_long +wrap_before_type_parameter_langle = true +wrap_before_extends_colon = false +wrap_extends_list_style = wrap_if_long +keep_existing_declaration_block_arrangement = false +place_abstract_accessorholder_on_single_line = true +place_simple_accessorholder_on_single_line = false +place_accessor_with_attrs_holder_on_single_line = false +place_simple_accessor_on_single_line = true +place_simple_method_on_single_line = false +keep_existing_enum_arrangement = false +place_simple_enum_on_single_line = false +wrap_enum_declaration = wrap_if_long +new_line_before_else = true +new_line_before_while = false +wrap_for_stmt_header_style = wrap_if_long +wrap_multiple_declaration_style = wrap_if_long +keep_existing_embedded_arrangement = false +place_simple_embedded_statement_on_same_line = false +place_simple_case_statement_on_same_line = true +keep_existing_embedded_block_arrangement = false +place_simple_embedded_block_on_same_line = false +place_simple_anonymousmethod_on_single_line = false +keep_existing_initializer_arrangement = false +place_simple_initializer_on_single_line = false +wrap_object_and_collection_initializer_style = chop_always +wrap_array_initializer_style = wrap_if_long +wrap_arguments_style = wrap_if_long +keep_existing_invocation_parens_arrangement = false +wrap_after_invocation_lpar = false +wrap_before_invocation_rpar = false +wrap_after_dot_in_method_calls = true +wrap_chained_method_calls = wrap_if_long +wrap_before_binary_opsign = false +wrap_chained_binary_expressions = wrap_if_long +force_chop_compound_if_expression = true +force_chop_compound_while_expression = true +force_chop_compound_do_expression = true +wrap_before_ternary_opsigns = true +wrap_ternary_expr_style = wrap_if_long +nested_ternary_style = expanded +wrap_linq_expressions = wrap_if_long +wrap_before_linq_expression = false +place_linq_into_on_new_line = false +wrap_verbatim_interpolated_strings = wrap_if_long +extra_spaces = remove_all +space_after_keywords_in_control_flow_statements = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_before_typeof_parentheses = false +space_before_checked_parentheses = false +space_before_sizeof_parentheses = false +space_before_nameof_parentheses = false +space_between_keyword_and_expression = true +space_between_keyword_and_type = true +space_around_assignment_op = true +space_around_logical_op = true +space_around_binary_operator = true +space_around_equality_op = true +space_around_relational_op = true +space_around_bitwise_op = true +space_around_additive_op = true +space_around_multiplicative_op = true +space_around_shift_op = true +space_around_nullcoalescing_op = true +space_around_arrow_op = false +space_after_logical_not_op = false +space_after_unary_operator = false +space_after_cast = false +space_around_dot = false +space_around_lambda_arrow = true +space_before_pointer_asterik_declaration = false +space_before_nullable_mark = false +blank_lines_around_class_definition = 1 +namespace_indentation = all +space_within_template_argument = false +align_union_type_usage = true +space_in_singleline_method = true +space_in_singleline_anonymous_method = true +space_within_single_line_array_initializer_braces = true +space_around_arrow_op = false # These are for markup languages (HTML, XML, etc) -spaces_around_eq_in_pi_attribute=false -space_after_last_pi_attribute=true -pi_attributes_indent=align_by_first_attribute -blank_line_after_pi=true -spaces_around_eq_in_attribute=false -space_after_last_attribute=false -space_before_self_closing=true -attribute_style=on_single_line -attribute_indent=align_by_first_attribute -sort_attributes=true -sort_class_selectors=true -max_blank_lines_between_tags=0 -linebreak_before_all_elements=true -linebreak_before_multiline_elements=true -quote_style=doublequoted -delete_quotes_from_solid_values=false -normalize_tag_names=true +spaces_around_eq_in_pi_attribute = false +space_after_last_pi_attribute = true +pi_attributes_indent = align_by_first_attribute +blank_line_after_pi = true +spaces_around_eq_in_attribute = false +space_after_last_attribute = false +space_before_self_closing = true +attribute_style = on_single_line +attribute_indent = align_by_first_attribute +sort_attributes = true +sort_class_selectors = true +max_blank_lines_between_tags = 0 +linebreak_before_all_elements = true +linebreak_before_multiline_elements = true +quote_style = doublequoted +delete_quotes_from_solid_values = false +normalize_tag_names = true [{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] -indent_size=2 +indent_size = 2 [*.js.map] -indent_size=2 +indent_size = 2 [*.{css,scss}] -indent_size=2 -declarations_style=separate_lines_for_nonsingle -media_query_style=separate_lines -selector_style=same_line -properties_style=separate_lines_for_nonsingle -brace_style=next_line +indent_size = 2 +declarations_style = separate_lines_for_nonsingle +media_query_style = separate_lines +selector_style = same_line +properties_style = separate_lines_for_nonsingle +brace_style = next_line [{.analysis_options,*.yml,*.yaml}] -indent_size=2 +indent_size = 2 # Xml project files [*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] @@ -263,38 +263,38 @@ indent_size = 2 # .net files [*.{cs,vb}] # These set the this. / Me. -dotnet_style_qualification_for_field=false:warning -dotnet_style_qualification_for_property=false:warning -dotnet_style_qualification_for_method=false:warning -dotnet_style_qualification_for_event=false:warning +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning # These make it suggest Int32 instead of int, etc. -dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion -dotnet_style_predefined_type_for_member_access=true:suggestion +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion # This controls implicit access modifiers -dotnet_style_require_accessibility_modifiers=never:suggestion +dotnet_style_require_accessibility_modifiers = never:suggestion # Prefer non modified fields to be marked readonly -dotnet_style_readonly_field=true:warning +dotnet_style_readonly_field = true:warning # Parenthesis settings -dotnet_style_parentheses_in_arithmetic_binary_operators=always_for_clarity:warning -dotnet_style_parentheses_in_relational_binary_operators=always_for_clarity:warning -dotnet_style_parentheses_in_other_binary_operators=always_for_clarity:warning -dotnet_style_parentheses_in_other_operators=always_for_clarity:warning +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_operators = always_for_clarity:warning -dotnet_style_object_initializer=true:suggestion -dotnet_style_collection_initializer=true:suggestion -dotnet_style_explicit_tuple_names=true:error -dotnet_style_prefer_inferred_tuple_names=true:warning -dotnet_style_prefer_inferred_anonymous_type_member_names=true:warning -dotnet_style_prefer_is_null_check_over_reference_equality_method=true:warning -dotnet_style_prefer_conditional_expression_over_return=true:warning -dotnet_style_coalesce_expression=true:warning -dotnet_style_null_propagation=true:error +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:error +dotnet_style_prefer_inferred_tuple_names = true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning +dotnet_style_prefer_conditional_expression_over_return = true:warning +dotnet_style_coalesce_expression = true:warning +dotnet_style_null_propagation = true:error -dotnet_sort_system_directives_first=true +dotnet_sort_system_directives_first = true # Constants in C style, all-caps dotnet_naming_rule.constant_fields_caps.symbols = constant_fields @@ -306,16 +306,16 @@ dotnet_naming_style.caps_style.capitalization = all_upper # interfaces should be prefixed with I dotnet_naming_rule.pascal_case_for_interface.severity = error -dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields -dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style +dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields +dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface dotnet_naming_style.pascal_case_interface_style.required_prefix = I dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case ## internal and private fields should be _camelCase dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning -dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields -dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style dotnet_naming_symbols.private_internal_fields.applicable_kinds = field dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal dotnet_naming_style.camel_case_underscore_style.required_prefix = _ @@ -331,302 +331,302 @@ dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case [*.cs] # var var var -csharp_style_var_for_built_in_types=false:warning -csharp_style_var_when_type_is_apparent=true:suggestion -csharp_style_var_elsewhere=false:warning +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:warning -csharp_style_expression_bodied_methods=when_on_single_line:suggestion -csharp_style_expression_bodied_constructors=when_on_single_line:suggestion -csharp_style_expression_bodied_operators=when_on_single_line:suggestion -csharp_style_expression_bodied_properties=when_on_single_line:suggestion -csharp_style_expression_bodied_indexers=when_on_single_line:suggestion -csharp_style_expression_bodied_accessors=when_on_single_line:suggestion +csharp_style_expression_bodied_methods = when_on_single_line:suggestion +csharp_style_expression_bodied_constructors = when_on_single_line:suggestion +csharp_style_expression_bodied_operators = when_on_single_line:suggestion +csharp_style_expression_bodied_properties = when_on_single_line:suggestion +csharp_style_expression_bodied_indexers = when_on_single_line:suggestion +csharp_style_expression_bodied_accessors = when_on_single_line:suggestion -csharp_style_pattern_matching_over_is_with_cast_check=true:warning -csharp_style_pattern_matching_over_as_with_null_check=when_on_single_line:warning +csharp_style_pattern_matching_over_is_with_cast_check = true:warning +csharp_style_pattern_matching_over_as_with_null_check = when_on_single_line:warning -csharp_style_inlined_variable_declaration=true:warning +csharp_style_inlined_variable_declaration = true:warning -csharp_prefer_simple_default_expression=true:warning -csharp_style_deconstructed_variable_declaration=false:warning +csharp_prefer_simple_default_expression = true:warning +csharp_style_deconstructed_variable_declaration = false:warning -csharp_style_throw_expression=true:warning -csharp_style_conditional_delegate_call=true:warning +csharp_style_throw_expression = true:warning +csharp_style_conditional_delegate_call = true:warning -csharp_prefer_braces=false +csharp_prefer_braces = false -csharp_new_line_before_open_brace=all -csharp_new_line_before_else=true -csharp_new_line_before_catch=true -csharp_new_line_before_finally=true -csharp_new_line_before_members_in_object_initializers=true -csharp_new_line_before_members_in_anonymous_types=true -csharp_new_line_between_query_expression_clauses=true +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true -csharp_indent_case_contents=true -csharp_indent_switch_labels=true -csharp_indent_labels=flush_left +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left -csharp_space_after_cast=false -csharp_space_after_keywords_in_control_flow_statements=false -csharp_space_between_method_declaration_parameter_list_parentheses=false -csharp_space_between_parentheses=none -csharp_space_before_colon_in_inheritance_clause=true -csharp_space_after_colon_in_inheritance_clause=true -csharp_space_around_binary_operators=before_and_after -csharp_space_between_method_declaration_empty_parameter_list_parentheses=false -csharp_space_between_method_call_name_and_opening_parenthesis=false -csharp_space_between_method_call_empty_parameter_list_parentheses=false +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = none +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false -csharp_preserve_single_line_statements=false -csharp_preserve_single_line_blocks=true +csharp_preserve_single_line_statements = false +csharp_preserve_single_line_blocks = true -csharp_blank_lines_around_region=0 -csharp_blank_lines_inside_region=0 -csharp_blank_lines_before_single_line_comment=1 -csharp_keep_blank_lines_in_declarations=1 -csharp_remove_blank_lines_near_braces_in_declarations=true -csharp_blank_lines_after_start_comment=false -csharp_blank_lines_between_using_groups=0 -csharp_blank_lines_after_using_list=1 -csharp_blank_lines_around_namespace=1 -csharp_blank_lines_inside_namespace=0 -csharp_blank_lines_around_type=1 -csharp_blank_lines_inside_type=0 -csharp_blank_lines_around_field=0 -csharp_blank_lines_around_single_line_field=0 -csharp_blank_lines_around_property=1 -csharp_blank_lines_around_single_line_property=0 -csharp_blank_lines_around_auto_property=0 -csharp_blank_lines_around_single_line_auto_property=0 -csharp_blank_lines_around_invocable=1 -csharp_blank_lines_around_single_line_invocable=1 -csharp_keep_blank_lines_in_code=1 -csharp_remove_blank_lines_near_braces_in_code=true -csharp_blank_lines_around_local_method=1 -csharp_blank_lines_around_single_line_local_method=1 -csharp_blank_lines_before_control_transfer_statements=1 -csharp_blank_lines_after_control_transfer_statements=1 -csharp_blank_lines_before_block_statements=1 -csharp_blank_lines_after_block_statements=1 -csharp_blank_lines_before_multiline_statements=1 -csharp_blank_lines_after_multiline_statements=1 +csharp_blank_lines_around_region = 0 +csharp_blank_lines_inside_region = 0 +csharp_blank_lines_before_single_line_comment = 1 +csharp_keep_blank_lines_in_declarations = 1 +csharp_remove_blank_lines_near_braces_in_declarations = true +csharp_blank_lines_after_start_comment = false +csharp_blank_lines_between_using_groups = 0 +csharp_blank_lines_after_using_list = 1 +csharp_blank_lines_around_namespace = 1 +csharp_blank_lines_inside_namespace = 0 +csharp_blank_lines_around_type = 1 +csharp_blank_lines_inside_type = 0 +csharp_blank_lines_around_field = 0 +csharp_blank_lines_around_single_line_field = 0 +csharp_blank_lines_around_property = 1 +csharp_blank_lines_around_single_line_property = 0 +csharp_blank_lines_around_auto_property = 0 +csharp_blank_lines_around_single_line_auto_property = 0 +csharp_blank_lines_around_invocable = 1 +csharp_blank_lines_around_single_line_invocable = 1 +csharp_keep_blank_lines_in_code = 1 +csharp_remove_blank_lines_near_braces_in_code = true +csharp_blank_lines_around_local_method = 1 +csharp_blank_lines_around_single_line_local_method = 1 +csharp_blank_lines_before_control_transfer_statements = 1 +csharp_blank_lines_after_control_transfer_statements = 1 +csharp_blank_lines_before_block_statements = 1 +csharp_blank_lines_after_block_statements = 1 +csharp_blank_lines_before_multiline_statements = 1 +csharp_blank_lines_after_multiline_statements = 1 -csharp_type_declaration_braces=next_line -csharp_brace_style=next_line -csharp_indent_inside_namespace=true -csharp_invocable_declaration_braces=next_line -csharp_anonymous_method_declaration_braces=next_line -csharp_accessor_owner_declaration_braces=next_line -csharp_accessor_declaration_braces=next_line -csharp_case_block_braces=next_line -csharp_initializer_braces=next_line -csharp_other_braces=next_line -csharp_allow_comment_after_lbrace=false -csharp_empty_block_style=together_same_line +csharp_type_declaration_braces = next_line +csharp_brace_style = next_line +csharp_indent_inside_namespace = true +csharp_invocable_declaration_braces = next_line +csharp_anonymous_method_declaration_braces = next_line +csharp_accessor_owner_declaration_braces = next_line +csharp_accessor_declaration_braces = next_line +csharp_case_block_braces = next_line +csharp_initializer_braces = next_line +csharp_other_braces = next_line +csharp_allow_comment_after_lbrace = false +csharp_empty_block_style = together_same_line -csharp_for_built_in_types=use_explicit_type -csharp_for_simple_types=use_var_when_evident -csharp_for_other_types=use_explicit_type -csharp_prefer_separate_deconstructed_variables_declaration=true -csharp_prefer_explicit_discard_declaration=false +csharp_for_built_in_types = use_explicit_type +csharp_for_simple_types = use_var_when_evident +csharp_for_other_types = use_explicit_type +csharp_prefer_separate_deconstructed_variables_declaration = true +csharp_prefer_explicit_discard_declaration = false -csharp_instance_members_qualify_members=none -csharp_builtin_type_reference_style=use_keyword -csharp_prefer_qualified_reference=false -csharp_add_imports_to_deepest_scope=false -csharp_allow_alias=true -csharp_default_private_modifier=implicit -csharp_default_internal_modifier=explicit -csharp_arguments_literal=positional -csharp_arguments_string_literal=positional -csharp_arguments_named=positional -csharp_arguments_anonymous_function=positional -csharp_arguments_other=positional -csharp_braces_for_ifelse=not_required -csharp_braces_for_for=not_required -csharp_braces_for_foreach=not_required -csharp_braces_for_while=not_required -csharp_braces_for_dowhile=not_required -csharp_braces_for_using=not_required -csharp_braces_for_lock=not_required -csharp_braces_for_fixed=not_required -csharp_method_or_operator_body=expression_body -csharp_local_function_body=expression_body -csharp_constructor_or_destructor_body=expression_body -csharp_accessor_owner_body=expression_body -csharp_force_attribute_style=join -csharp_indent_nested_usings_stmt=true +csharp_instance_members_qualify_members = none +csharp_builtin_type_reference_style = use_keyword +csharp_prefer_qualified_reference = false +csharp_add_imports_to_deepest_scope = false +csharp_allow_alias = true +csharp_default_private_modifier = implicit +csharp_default_internal_modifier = explicit +csharp_arguments_literal = positional +csharp_arguments_string_literal = positional +csharp_arguments_named = positional +csharp_arguments_anonymous_function = positional +csharp_arguments_other = positional +csharp_braces_for_ifelse = not_required +csharp_braces_for_for = not_required +csharp_braces_for_foreach = not_required +csharp_braces_for_while = not_required +csharp_braces_for_dowhile = not_required +csharp_braces_for_using = not_required +csharp_braces_for_lock = not_required +csharp_braces_for_fixed = not_required +csharp_method_or_operator_body = expression_body +csharp_local_function_body = expression_body +csharp_constructor_or_destructor_body = expression_body +csharp_accessor_owner_body = expression_body +csharp_force_attribute_style = join +csharp_indent_nested_usings_stmt = true -csharp_builtin_type_reference_for_member_access_style=use_keyword -csharp_indent_nested_fixed_stmt=true -csharp_indent_nested_lock_stmt=true -csharp_indent_nested_for_stmt=true -csharp_indent_nested_foreach_stmt=true -csharp_indent_nested_while_stmt=true -csharp_use_continuous_indent_inside_parens=true -csharp_indent_method_decl_pars=inside -csharp_indent_invocation_pars=inside -csharp_indent_statement_pars=inside -csharp_indent_typeparam_angles=inside -csharp_indent_typearg_angles=inside -csharp_indent_pars=inside -csharp_indent_preprocessor_if=outdent -csharp_indent_preprocessor_region=usual_indent -csharp_indent_preprocessor_other=usual_indent -csharp_indent_switch_labels=true -csharp_indent_type_constraints=true -csharp_stick_comment=false -csharp_alignment_tab_fill_style=use_spaces -csharp_align_multiline_parameter=true -csharp_align_multiline_extends_list=true -csharp_align_linq_query=true -csharp_align_multiline_binary_expressions_chain=true -csharp_outdent_binary_ops=true -csharp_align_multiline_calls_chain=true -csharp_outdent_dots=true -csharp_align_multiline_array_and_object_initializer=false -csharp_indent_anonymous_method_block=false -csharp_align_first_arg_by_paren=true -csharp_align_multiline_argument=true -csharp_align_tuple_components=true -csharp_align_multiline_expression=true -csharp_align_multiline_for_stmt=true -csharp_align_multiple_declaration=true -csharp_align_multline_type_parameter_list=true -csharp_align_multline_type_parameter_constrains=true -csharp_int_align_fields=true -csharp_int_align_properties=true -csharp_int_align_methods=true -csharp_int_align_parameters=false -csharp_int_align_variables=true -csharp_int_align_assignments=true -csharp_int_align_nested_ternary=true -csharp_int_align_invocations=false -csharp_int_align_binary_expressions=true -csharp_int_align_comments=true -csharp_int_align_switch_sections=true -csharp_int_align=true -csharp_keep_user_linebreaks=false -csharp_keep_existing_arrangement=false -csharp_keep_existing_linebreaks=false -csharp_max_line_length=120 -csharp_wrap_before_comma=false -csharp_special_else_if_treatment=true -csharp_insert_final_newline=false -csharp_place_type_attribute_on_same_line=never -csharp_place_method_attribute_on_same_line=never -csharp_place_accessorholder_attribute_on_same_line=never -csharp_place_attribute_on_same_line=never -csharp_place_accessor_attribute_on_same_line=never -csharp_place_attribute_on_same_line=never -csharp_place_field_attribute_on_same_line=never -csharp_place_attribute_on_same_line=never -csharp_wrap_parameters_style=wrap_if_long -csharp_keep_existing_declaration_parens_arrangement=false -csharp_wrap_before_declaration_lpar=false -csharp_wrap_after_declaration_lpar=false -csharp_wrap_before_declaration_rpar=false -csharp_place_constructor_initializer_on_same_line=true -csharp_keep_existing_expr_member_arrangement=false -csharp_place_expr_method_on_single_line=true -csharp_place_expr_property_on_single_line=true -csharp_place_expr_accessor_on_single_line=true -csharp_wrap_before_arrow_with_expressions=false -csharp_place_type_constraints_on_same_line=true -csharp_wrap_before_first_type_parameter_constraint=true -csharp_wrap_multiple_type_parameter_constraints_style=wrap_if_long -csharp_wrap_before_type_parameter_langle=true -csharp_wrap_before_extends_colon=false -csharp_wrap_extends_list_style=wrap_if_long -csharp_keep_existing_declaration_block_arrangement=false -csharp_place_abstract_accessorholder_on_single_line=true -csharp_place_simple_accessorholder_on_single_line=false -csharp_place_accessor_with_attrs_holder_on_single_line=false -csharp_place_simple_accessor_on_single_line=true -csharp_place_simple_method_on_single_line=false -csharp_keep_existing_enum_arrangement=false -csharp_place_simple_enum_on_single_line=false -csharp_wrap_enum_declaration=wrap_if_long -csharp_new_line_before_else=true -csharp_new_line_before_while=false -csharp_wrap_for_stmt_header_style=wrap_if_long -csharp_wrap_multiple_declaration_style=wrap_if_long -csharp_keep_existing_embedded_arrangement=false -csharp_place_simple_embedded_statement_on_same_line=false -csharp_place_simple_case_statement_on_same_line=true -csharp_keep_existing_embedded_block_arrangement=false -csharp_place_simple_embedded_block_on_same_line=false -csharp_place_simple_anonymousmethod_on_single_line=false -csharp_keep_existing_initializer_arrangement=false -csharp_place_simple_initializer_on_single_line=false -csharp_wrap_object_and_collection_initializer_style=chop_always -csharp_wrap_array_initializer_style=wrap_if_long -csharp_wrap_arguments_style=wrap_if_long -csharp_keep_existing_invocation_parens_arrangement=false -csharp_wrap_after_invocation_lpar=false -csharp_wrap_before_invocation_rpar=false -csharp_wrap_after_dot_in_method_calls=true -csharp_wrap_chained_method_calls=wrap_if_long -csharp_wrap_before_binary_opsign=false -csharp_wrap_chained_binary_expressions=wrap_if_long -csharp_force_chop_compound_if_expression=true -csharp_force_chop_compound_while_expression=true -csharp_force_chop_compound_do_expression=true -csharp_wrap_before_ternary_opsigns=true -csharp_wrap_ternary_expr_style=wrap_if_long -csharp_nested_ternary_style=expanded -csharp_wrap_linq_expressions=wrap_if_long -csharp_wrap_before_linq_expression=false -csharp_place_linq_into_on_new_line=false -csharp_wrap_verbatim_interpolated_strings=wrap_if_long -csharp_extra_spaces=remove_all -csharp_space_after_keywords_in_control_flow_statements=false -csharp_space_between_method_call_name_and_opening_parenthesis=false -csharp_space_between_method_declaration_name_and_open_parenthesis=false -csharp_space_before_typeof_parentheses=false -csharp_space_before_checked_parentheses=false -csharp_space_before_sizeof_parentheses=false -csharp_space_before_nameof_parentheses=false -csharp_space_between_keyword_and_expression=true -csharp_space_between_keyword_and_type=true -csharp_space_around_assignment_op=true -csharp_space_around_logical_op=true -csharp_space_around_binary_operator=true -csharp_space_around_equality_op=true -csharp_space_around_relational_op=true -csharp_space_around_bitwise_op=true -csharp_space_around_additive_op=true -csharp_space_around_multiplicative_op=true -csharp_space_around_shift_op=true -csharp_space_around_nullcoalescing_op=true -csharp_space_around_arrow_op=false -csharp_space_after_logical_not_op=false -csharp_space_after_unary_operator=false -csharp_space_after_cast=false -csharp_space_around_dot=false -csharp_space_around_lambda_arrow=true -csharp_space_before_pointer_asterik_declaration=false -csharp_space_before_nullable_mark=false +csharp_builtin_type_reference_for_member_access_style = use_keyword +csharp_indent_nested_fixed_stmt = true +csharp_indent_nested_lock_stmt = true +csharp_indent_nested_for_stmt = true +csharp_indent_nested_foreach_stmt = true +csharp_indent_nested_while_stmt = true +csharp_use_continuous_indent_inside_parens = true +csharp_indent_method_decl_pars = inside +csharp_indent_invocation_pars = inside +csharp_indent_statement_pars = inside +csharp_indent_typeparam_angles = inside +csharp_indent_typearg_angles = inside +csharp_indent_pars = inside +csharp_indent_preprocessor_if = outdent +csharp_indent_preprocessor_region = usual_indent +csharp_indent_preprocessor_other = usual_indent +csharp_indent_switch_labels = true +csharp_indent_type_constraints = true +csharp_stick_comment = false +csharp_alignment_tab_fill_style = use_spaces +csharp_align_multiline_parameter = true +csharp_align_multiline_extends_list = true +csharp_align_linq_query = true +csharp_align_multiline_binary_expressions_chain = true +csharp_outdent_binary_ops = true +csharp_align_multiline_calls_chain = true +csharp_outdent_dots = true +csharp_align_multiline_array_and_object_initializer = false +csharp_indent_anonymous_method_block = false +csharp_align_first_arg_by_paren = true +csharp_align_multiline_argument = true +csharp_align_tuple_components = true +csharp_align_multiline_expression = true +csharp_align_multiline_for_stmt = true +csharp_align_multiple_declaration = true +csharp_align_multline_type_parameter_list = true +csharp_align_multline_type_parameter_constrains = true +csharp_int_align_fields = true +csharp_int_align_properties = true +csharp_int_align_methods = true +csharp_int_align_parameters = false +csharp_int_align_variables = true +csharp_int_align_assignments = true +csharp_int_align_nested_ternary = true +csharp_int_align_invocations = false +csharp_int_align_binary_expressions = true +csharp_int_align_comments = true +csharp_int_align_switch_sections = true +csharp_int_align = true +csharp_keep_user_linebreaks = false +csharp_keep_existing_arrangement = false +csharp_keep_existing_linebreaks = false +csharp_max_line_length = 120 +csharp_wrap_before_comma = false +csharp_special_else_if_treatment = true +csharp_insert_final_newline = false +csharp_place_type_attribute_on_same_line = never +csharp_place_method_attribute_on_same_line = never +csharp_place_accessorholder_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_accessor_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_field_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_wrap_parameters_style = wrap_if_long +csharp_keep_existing_declaration_parens_arrangement = false +csharp_wrap_before_declaration_lpar = false +csharp_wrap_after_declaration_lpar = false +csharp_wrap_before_declaration_rpar = false +csharp_place_constructor_initializer_on_same_line = true +csharp_keep_existing_expr_member_arrangement = false +csharp_place_expr_method_on_single_line = true +csharp_place_expr_property_on_single_line = true +csharp_place_expr_accessor_on_single_line = true +csharp_wrap_before_arrow_with_expressions = false +csharp_place_type_constraints_on_same_line = true +csharp_wrap_before_first_type_parameter_constraint = true +csharp_wrap_multiple_type_parameter_constraints_style = wrap_if_long +csharp_wrap_before_type_parameter_langle = true +csharp_wrap_before_extends_colon = false +csharp_wrap_extends_list_style = wrap_if_long +csharp_keep_existing_declaration_block_arrangement = false +csharp_place_abstract_accessorholder_on_single_line = true +csharp_place_simple_accessorholder_on_single_line = false +csharp_place_accessor_with_attrs_holder_on_single_line = false +csharp_place_simple_accessor_on_single_line = true +csharp_place_simple_method_on_single_line = false +csharp_keep_existing_enum_arrangement = false +csharp_place_simple_enum_on_single_line = false +csharp_wrap_enum_declaration = wrap_if_long +csharp_new_line_before_else = true +csharp_new_line_before_while = false +csharp_wrap_for_stmt_header_style = wrap_if_long +csharp_wrap_multiple_declaration_style = wrap_if_long +csharp_keep_existing_embedded_arrangement = false +csharp_place_simple_embedded_statement_on_same_line = false +csharp_place_simple_case_statement_on_same_line = true +csharp_keep_existing_embedded_block_arrangement = false +csharp_place_simple_embedded_block_on_same_line = false +csharp_place_simple_anonymousmethod_on_single_line = false +csharp_keep_existing_initializer_arrangement = false +csharp_place_simple_initializer_on_single_line = false +csharp_wrap_object_and_collection_initializer_style = chop_always +csharp_wrap_array_initializer_style = wrap_if_long +csharp_wrap_arguments_style = wrap_if_long +csharp_keep_existing_invocation_parens_arrangement = false +csharp_wrap_after_invocation_lpar = false +csharp_wrap_before_invocation_rpar = false +csharp_wrap_after_dot_in_method_calls = true +csharp_wrap_chained_method_calls = wrap_if_long +csharp_wrap_before_binary_opsign = false +csharp_wrap_chained_binary_expressions = wrap_if_long +csharp_force_chop_compound_if_expression = true +csharp_force_chop_compound_while_expression = true +csharp_force_chop_compound_do_expression = true +csharp_wrap_before_ternary_opsigns = true +csharp_wrap_ternary_expr_style = wrap_if_long +csharp_nested_ternary_style = expanded +csharp_wrap_linq_expressions = wrap_if_long +csharp_wrap_before_linq_expression = false +csharp_place_linq_into_on_new_line = false +csharp_wrap_verbatim_interpolated_strings = wrap_if_long +csharp_extra_spaces = remove_all +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_before_typeof_parentheses = false +csharp_space_before_checked_parentheses = false +csharp_space_before_sizeof_parentheses = false +csharp_space_before_nameof_parentheses = false +csharp_space_between_keyword_and_expression = true +csharp_space_between_keyword_and_type = true +csharp_space_around_assignment_op = true +csharp_space_around_logical_op = true +csharp_space_around_binary_operator = true +csharp_space_around_equality_op = true +csharp_space_around_relational_op = true +csharp_space_around_bitwise_op = true +csharp_space_around_additive_op = true +csharp_space_around_multiplicative_op = true +csharp_space_around_shift_op = true +csharp_space_around_nullcoalescing_op = true +csharp_space_around_arrow_op = false +csharp_space_after_logical_not_op = false +csharp_space_after_unary_operator = false +csharp_space_after_cast = false +csharp_space_around_dot = false +csharp_space_around_lambda_arrow = true +csharp_space_before_pointer_asterik_declaration = false +csharp_space_before_nullable_mark = false [*.cshtml] -linebreaks_around_razor_statements=true -blank_lines_around_razor_functions=true -blank_lines_around_razor_helpers=true -blank_lines_around_razor_sections=true +linebreaks_around_razor_statements = true +blank_lines_around_razor_functions = true +blank_lines_around_razor_helpers = true +blank_lines_around_razor_sections = true # C++ [*.{cc,cpp,cxx,h,hpp,hxx}] -cpp_indent_access_specifiers_from_class=true -cpp_indent_wrapped_function_names=false -cpp_align_multiline_type_argument=true +cpp_indent_access_specifiers_from_class = true +cpp_indent_wrapped_function_names = false +cpp_align_multiline_type_argument = true # C, C++ and ObjectiveC [*.{c,h,cc,cpp,cxx,m,hpp,hxx}] -indent_preprocessor_directives=normal -indent_type_constraints=true +indent_preprocessor_directives = normal +indent_type_constraints = true # Javascript and Typescript [*.{js,js.map,ts}] -quote_style=doublequoted -termination_style=ensure_semicolon \ No newline at end of file +quote_style = doublequoted +termination_style = ensure_semicolon \ No newline at end of file diff --git a/Aaru.Server.Task/Program.cs b/Aaru.Server.Task/Program.cs index 333f7029..a341a145 100644 --- a/Aaru.Server.Task/Program.cs +++ b/Aaru.Server.Task/Program.cs @@ -174,8 +174,8 @@ internal class Program vendor = new UsbVendor(number, name); ctx.UsbVendors.Add(vendor); - System.Console.WriteLine("{0}: Will add vendor {1} with ID {2:X4}", DateTime.UtcNow, - vendor.Vendor, vendor.VendorId); + System.Console.WriteLine("{0}: Will add vendor {1} with ID {2:X4}", DateTime.UtcNow, vendor.Vendor, + vendor.VendorId); newVendors++; counter++; @@ -221,8 +221,7 @@ internal class Program System.Console.WriteLine("{0}: Looking up a product", DateTime.UtcNow); start = DateTime.UtcNow; - UsbProduct prd = - ctx.UsbProducts.FirstOrDefault(p => p.ProductId == 0x0001 && p.Vendor.VendorId == 0x8086); + UsbProduct prd = ctx.UsbProducts.FirstOrDefault(p => p.ProductId == 0x0001 && p.Vendor.VendorId == 0x8086); if(prd is null) System.Console.WriteLine("{0}: Error, could not find product.", DateTime.UtcNow); @@ -258,8 +257,7 @@ internal class Program try { - System.Console.WriteLine("{0}: Retrieving CompactDisc read offsets from AccurateRip...", - DateTime.UtcNow); + System.Console.WriteLine("{0}: Retrieving CompactDisc read offsets from AccurateRip...", DateTime.UtcNow); start = DateTime.UtcNow; @@ -290,8 +288,7 @@ internal class Program if(columns.Length != 4) { - System.Console.WriteLine("{0}: Row does not have correct number of columns...", - DateTime.UtcNow); + System.Console.WriteLine("{0}: Row does not have correct number of columns...", DateTime.UtcNow); continue; } diff --git a/Aaru.Server/Aaru.Server.csproj b/Aaru.Server/Aaru.Server.csproj index a474285a..83e8a2d6 100644 --- a/Aaru.Server/Aaru.Server.csproj +++ b/Aaru.Server/Aaru.Server.csproj @@ -24,25 +24,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -76,60 +76,60 @@ PreserveNewest - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - <_ContentIncludedByDefault Remove="wwwroot\js\site.js" /> - <_ContentIncludedByDefault Remove="wwwroot\css\js\colors\dos.js" /> - <_ContentIncludedByDefault Remove="wwwroot\css\js\colors\mac.js" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Shared\Error.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_Layout.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_LoginPartial.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Create.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Delete.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Details.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Edit.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Index.cshtml" /> - <_ContentIncludedByDefault Remove="Areas\Admin\Views\Atas\EditorTemplates\IdHashModel.cshtml" /> - <_ContentIncludedByDefault Remove="Views\Home\Changelog.cshtml" /> - <_ContentIncludedByDefault Remove="Views\Home\CODE_OF_CONDUCT.cshtml" /> - <_ContentIncludedByDefault Remove="Views\Home\CONTRIBUTING.cshtml" /> - <_ContentIncludedByDefault Remove="Views\Home\ISSUE_TEMPLATE.cshtml" /> - <_ContentIncludedByDefault Remove="Views\Home\NEEDED.cshtml" /> - <_ContentIncludedByDefault Remove="Views\Home\NEEDINFO.cshtml" /> - <_ContentIncludedByDefault Remove="Views\Home\PULL_REQUEST_TEMPLATE.cshtml" /> + <_ContentIncludedByDefault Remove="wwwroot\js\site.js"/> + <_ContentIncludedByDefault Remove="wwwroot\css\js\colors\dos.js"/> + <_ContentIncludedByDefault Remove="wwwroot\css\js\colors\mac.js"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Shared\Error.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_Layout.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_LoginPartial.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Create.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Delete.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Details.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Edit.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Index.cshtml"/> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Atas\EditorTemplates\IdHashModel.cshtml"/> + <_ContentIncludedByDefault Remove="Views\Home\Changelog.cshtml"/> + <_ContentIncludedByDefault Remove="Views\Home\CODE_OF_CONDUCT.cshtml"/> + <_ContentIncludedByDefault Remove="Views\Home\CONTRIBUTING.cshtml"/> + <_ContentIncludedByDefault Remove="Views\Home\ISSUE_TEMPLATE.cshtml"/> + <_ContentIncludedByDefault Remove="Views\Home\NEEDED.cshtml"/> + <_ContentIncludedByDefault Remove="Views\Home\NEEDINFO.cshtml"/> + <_ContentIncludedByDefault Remove="Views\Home\PULL_REQUEST_TEMPLATE.cshtml"/> - - - - - + + + + + diff --git a/Aaru.Server/Areas/Admin/Controllers/AtasController.cs b/Aaru.Server/Areas/Admin/Controllers/AtasController.cs index 415e1e9e..a27bbadb 100644 --- a/Aaru.Server/Areas/Admin/Controllers/AtasController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/AtasController.cs @@ -67,8 +67,7 @@ public sealed class AtasController : Controller public IActionResult Consolidate() { - List hashes = _context.Ata.Select(m => new IdHashModel(m.Id, Hash.Sha512(m.Identify))). - ToList(); + List hashes = _context.Ata.Select(m => new IdHashModel(m.Id, Hash.Sha512(m.Identify))).ToList(); List dups = hashes.GroupBy(x => x.Hash).Where(g => g.Count() > 1). Select(x => hashes.FirstOrDefault(y => y.Hash == x.Key)).ToList(); diff --git a/Aaru.Server/Areas/Admin/Controllers/ChsController.cs b/Aaru.Server/Areas/Admin/Controllers/ChsController.cs index 7d3f889b..3d952d0a 100644 --- a/Aaru.Server/Areas/Admin/Controllers/ChsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/ChsController.cs @@ -11,9 +11,8 @@ public sealed class ChsController : Controller public ChsController(AaruServerContext context) => _context = context; // GET: Admin/Chs - public async Task Index() => View(await _context.Chs.OrderBy(c => c.Cylinders). - ThenBy(c => c.Heads).ThenBy(c => c.Sectors). - ToListAsync()); + public async Task Index() => View(await _context.Chs.OrderBy(c => c.Cylinders).ThenBy(c => c.Heads). + ThenBy(c => c.Sectors).ToListAsync()); public IActionResult Consolidate() { @@ -56,15 +55,14 @@ public sealed class ChsController : Controller foreach(ChsModel duplicate in duplicates) { Chs master = _context.Chs.FirstOrDefault(m => m.Cylinders == duplicate.Cylinders && - m.Heads == duplicate.Heads && - m.Sectors == duplicate.Sectors); + m.Heads == duplicate.Heads && m.Sectors == duplicate.Sectors); if(master is null) continue; foreach(Chs chs in _context.Chs.Where(m => m.Cylinders == duplicate.Cylinders && - m.Heads == duplicate.Heads && - m.Sectors == duplicate.Sectors).Skip(1).ToArray()) + m.Heads == duplicate.Heads && m.Sectors == duplicate.Sectors). + Skip(1).ToArray()) { foreach(TestedMedia media in _context.TestedMedia.Where(d => d.CHS.Id == chs.Id)) { diff --git a/Aaru.Server/Areas/Admin/Controllers/CompactDiscOffsetsController.cs b/Aaru.Server/Areas/Admin/Controllers/CompactDiscOffsetsController.cs index 03045a6e..6566257d 100644 --- a/Aaru.Server/Areas/Admin/Controllers/CompactDiscOffsetsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/CompactDiscOffsetsController.cs @@ -34,8 +34,8 @@ public sealed class CompactDiscOffsetsController : Controller // To protect from overposting attacks, please enable the specific properties you want to bind to, for // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost, ValidateAntiForgeryToken] - public async Task Edit(int id, [Bind("Id,Manufacturer,Model,Offset,Submissions,Agreement")] - CompactDiscOffset changedModel) + public async Task Edit( + int id, [Bind("Id,Manufacturer,Model,Offset,Submissions,Agreement")] CompactDiscOffset changedModel) { if(id != changedModel.Id) return NotFound(); diff --git a/Aaru.Server/Areas/Admin/Controllers/DeviceStatsController.cs b/Aaru.Server/Areas/Admin/Controllers/DeviceStatsController.cs index d84bf140..2b6144e8 100644 --- a/Aaru.Server/Areas/Admin/Controllers/DeviceStatsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/DeviceStatsController.cs @@ -34,8 +34,7 @@ public sealed class DeviceStatsController : Controller // To protect from overposting attacks, please enable the specific properties you want to bind to, for // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost, ValidateAntiForgeryToken] - public async Task Edit(int id, [Bind("Id,Manufacturer,Model,Revision,Bus")] - DeviceStat changedModel) + public async Task Edit(int id, [Bind("Id,Manufacturer,Model,Revision,Bus")] DeviceStat changedModel) { if(id != changedModel.Id) return NotFound(); diff --git a/Aaru.Server/Areas/Admin/Controllers/DevicesController.cs b/Aaru.Server/Areas/Admin/Controllers/DevicesController.cs index 64ea69b4..58a397c2 100644 --- a/Aaru.Server/Areas/Admin/Controllers/DevicesController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/DevicesController.cs @@ -76,8 +76,8 @@ public sealed class DevicesController : Controller model.TestedMedias = _context.TestedMedia. Where(t => t.AtaId == ataId || t.AtaId == atapiId || t.ScsiId == scsiId || - t.MmcId == mmcId).OrderBy(t => t.Manufacturer). - ThenBy(t => t.Model).ThenBy(t => t.MediumTypeName).ToList(); + t.MmcId == mmcId).OrderBy(t => t.Manufacturer).ThenBy(t => t.Model). + ThenBy(t => t.MediumTypeName).ToList(); model.TestedSequentialMedias = _context.TestedSequentialMedia.Where(t => t.SscId == sscId). OrderBy(t => t.Manufacturer).ThenBy(t => t.Model). @@ -109,8 +109,8 @@ public sealed class DevicesController : Controller // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost, ValidateAntiForgeryToken] public async Task Edit( - int id, [Bind("OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")] - Device changedModel) + int id, + [Bind("OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")] Device changedModel) { if(id != changedModel.Id) return NotFound(); @@ -328,8 +328,8 @@ public sealed class DevicesController : Controller else if(device.SCSI?.MultiMediaDevice != null && report.SCSI?.MultiMediaDevice != null) { - foreach(TestedMedia testedMedia in - _context.TestedMedia.Where(d => d.MmcId == report.SCSI.MultiMediaDevice.Id)) + foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.MmcId == report.SCSI. + MultiMediaDevice.Id)) { testedMedia.MmcId = device.SCSI.MultiMediaDevice.Id; _context.Update(testedMedia); diff --git a/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs b/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs index ca8c5ab1..813873ce 100644 --- a/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs @@ -37,8 +37,7 @@ public sealed class FireWiresController : Controller // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost, ValidateAntiForgeryToken] public async Task Edit( - int id, [Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")] - FireWire changedModel) + int id, [Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")] FireWire changedModel) { if(id != changedModel.Id) return NotFound(); diff --git a/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs b/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs index 1028f653..5f9b75d0 100644 --- a/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs @@ -21,8 +21,7 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller return NotFound(); } - GdRomSwapDiscCapabilities caps = - await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id); + GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id); if(caps == null) { @@ -40,8 +39,7 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller return NotFound(); } - GdRomSwapDiscCapabilities caps = - await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id); + GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id); if(caps == null) { diff --git a/Aaru.Server/Areas/Admin/Controllers/MediaFormatsController.cs b/Aaru.Server/Areas/Admin/Controllers/MediaFormatsController.cs index 7978d103..ffa9e45e 100644 --- a/Aaru.Server/Areas/Admin/Controllers/MediaFormatsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/MediaFormatsController.cs @@ -8,8 +8,7 @@ public sealed class MediaFormatsController : Controller public MediaFormatsController(AaruServerContext context) => _context = context; // GET: Admin/MediaFormats - public async Task Index() => - View(await _context.MediaFormats.OrderBy(mf => mf.Name).ToListAsync()); + public async Task Index() => View(await _context.MediaFormats.OrderBy(mf => mf.Name).ToListAsync()); // GET: Admin/MediaFormats/Delete/5 public async Task Delete(int? id) diff --git a/Aaru.Server/Areas/Admin/Controllers/MmcController.cs b/Aaru.Server/Areas/Admin/Controllers/MmcController.cs index 0e1ed56c..e124adba 100644 --- a/Aaru.Server/Areas/Admin/Controllers/MmcController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/MmcController.cs @@ -16,14 +16,13 @@ public sealed class MmcController : Controller Id = m.Id, FeaturesId = m.FeaturesId, DataLength = m.ModeSense2AData.Length - }).ToList(). - Concat(_context.Mmc.Where(m => m.ModeSense2AData == null). - Select(m => new MmcModelForView - { - Id = m.Id, - FeaturesId = m.FeaturesId, - DataLength = 0 - }).ToList()).OrderBy(m => m.Id)); + }).ToList().Concat(_context.Mmc.Where(m => m.ModeSense2AData == null). + Select(m => new MmcModelForView + { + Id = m.Id, + FeaturesId = m.FeaturesId, + DataLength = 0 + }).ToList()).OrderBy(m => m.Id)); // GET: Admin/Mmc/Details/5 public async Task Details(int? id) diff --git a/Aaru.Server/Areas/Admin/Controllers/ReportsController.cs b/Aaru.Server/Areas/Admin/Controllers/ReportsController.cs index 905ca496..cd38d6f4 100644 --- a/Aaru.Server/Areas/Admin/Controllers/ReportsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/ReportsController.cs @@ -66,8 +66,8 @@ public sealed class ReportsController : Controller model.TestedMedias = _context.TestedMedia. Where(t => t.AtaId == ataId || t.AtaId == atapiId || t.ScsiId == scsiId || - t.MmcId == mmcId).OrderBy(t => t.Manufacturer). - ThenBy(t => t.Model).ThenBy(t => t.MediumTypeName).ToList(); + t.MmcId == mmcId).OrderBy(t => t.Manufacturer).ThenBy(t => t.Model). + ThenBy(t => t.MediumTypeName).ToList(); model.TestedSequentialMedias = _context.TestedSequentialMedia.Where(t => t.SscId == sscId). OrderBy(t => t.Manufacturer).ThenBy(t => t.Model). @@ -98,8 +98,8 @@ public sealed class ReportsController : Controller // To protect from overposting attacks, please enable the specific properties you want to bind to, for // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost, ValidateAntiForgeryToken] - public async Task Edit(int id, [Bind("Id,CompactFlash,Manufacturer,Model,Revision,Type")] - UploadedReport changedModel) + public async Task Edit( + int id, [Bind("Id,CompactFlash,Manufacturer,Model,Revision,Type")] UploadedReport changedModel) { if(id != changedModel.Id) return NotFound(); diff --git a/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs b/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs index f5e068d4..e2b73287 100644 --- a/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs @@ -17,10 +17,12 @@ public sealed class ScsisController : Controller // GET: Admin/Scsis public IActionResult Index() => View(_context.Scsi.AsEnumerable(). - OrderBy(m => StringHandlers.CToString(m.Inquiry?. - VendorIdentification)). - ThenBy(m => StringHandlers.CToString(m.Inquiry?. - ProductIdentification)). + OrderBy(m => + StringHandlers. + CToString(m.Inquiry?.VendorIdentification)). + ThenBy(m => + StringHandlers. + CToString(m.Inquiry?.ProductIdentification)). ThenBy(m => StringHandlers.CToString(m.Inquiry?. ProductRevisionLevel))); diff --git a/Aaru.Server/Areas/Admin/Controllers/SscsController.cs b/Aaru.Server/Areas/Admin/Controllers/SscsController.cs index a954667d..223bb797 100644 --- a/Aaru.Server/Areas/Admin/Controllers/SscsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/SscsController.cs @@ -13,8 +13,7 @@ public sealed class SscsController : Controller // GET: Admin/Sscs public async Task Index() => View(await _context.Ssc.OrderBy(s => s.MinBlockLength). ThenBy(s => s.MaxBlockLength). - ThenBy(s => s.BlockSizeGranularity). - ToListAsync()); + ThenBy(s => s.BlockSizeGranularity).ToListAsync()); // GET: Admin/Sscs/Delete/5 public async Task Delete(int? id) @@ -85,18 +84,16 @@ public sealed class SscsController : Controller foreach(SscModel duplicate in duplicates) { - Ssc master = - _context.Ssc.FirstOrDefault(m => m.BlockSizeGranularity == duplicate.BlockSizeGranularity && - m.MaxBlockLength == duplicate.MaxBlockLength && - m.MinBlockLength == duplicate.MinBlockLength); + Ssc master = _context.Ssc.FirstOrDefault(m => m.BlockSizeGranularity == duplicate.BlockSizeGranularity && + m.MaxBlockLength == duplicate.MaxBlockLength && + m.MinBlockLength == duplicate.MinBlockLength); if(master is null) continue; foreach(Ssc ssc in _context.Ssc.Where(m => m.BlockSizeGranularity == duplicate.BlockSizeGranularity && - m.MaxBlockLength == duplicate.MaxBlockLength && - m.MinBlockLength == duplicate.MinBlockLength).Skip(1). - ToArray()) + m.MaxBlockLength == duplicate.MaxBlockLength && + m.MinBlockLength == duplicate.MinBlockLength).Skip(1).ToArray()) { foreach(TestedSequentialMedia media in _context.TestedSequentialMedia.Where(d => d.SscId == ssc.Id)) { diff --git a/Aaru.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs b/Aaru.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs index cf9728bf..0ef9f891 100644 --- a/Aaru.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs @@ -12,14 +12,12 @@ public sealed class SupportedDensitiesController : Controller // GET: Admin/SupportedDensities public async Task Index() => View(await _context.SupportedDensity.OrderBy(d => d.Organization). ThenBy(d => d.Name).ThenBy(d => d.Description). - ThenBy(d => d.Capacity). - ThenBy(d => d.PrimaryCode). + ThenBy(d => d.Capacity).ThenBy(d => d.PrimaryCode). ThenBy(d => d.SecondaryCode). ThenBy(d => d.BitsPerMm).ThenBy(d => d.Width). - ThenBy(d => d.Tracks). - ThenBy(d => d.DefaultDensity). - ThenBy(d => d.Writable). - ThenBy(d => d.Duplicate).ToListAsync()); + ThenBy(d => d.Tracks).ThenBy(d => d.DefaultDensity). + ThenBy(d => d.Writable).ThenBy(d => d.Duplicate). + ToListAsync()); // GET: Admin/SupportedDensities/Delete/5 public async Task Delete(int? id) diff --git a/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs b/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs index 5501a572..dfb8016a 100644 --- a/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs @@ -24,8 +24,7 @@ public sealed class TestedMediasController : Controller // GET: Admin/TestedMedias public async Task Index() => View(await _context.TestedMedia.OrderBy(m => m.Manufacturer). - ThenBy(m => m.Model). - ThenBy(m => m.MediumTypeName). + ThenBy(m => m.Model).ThenBy(m => m.MediumTypeName). ThenBy(m => m.MediaIsRecognized). ThenBy(m => m.LongBlockSize). ThenBy(m => m.BlockSize).ThenBy(m => m.Blocks). @@ -72,8 +71,7 @@ public sealed class TestedMediasController : Controller // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost, ValidateAntiForgeryToken] public async Task Edit( - int id, [Bind("Id,Blocks,BlockSize,LongBlockSize,Manufacturer,MediumTypeName,Model")] - TestedMedia changedModel) + int id, [Bind("Id,Blocks,BlockSize,LongBlockSize,Manufacturer,MediumTypeName,Model")] TestedMedia changedModel) { if(id != changedModel.Id) return NotFound(); diff --git a/Aaru.Server/Areas/Admin/Controllers/TestedSequentialMediasController.cs b/Aaru.Server/Areas/Admin/Controllers/TestedSequentialMediasController.cs index bbe3d495..a546d5a9 100644 --- a/Aaru.Server/Areas/Admin/Controllers/TestedSequentialMediasController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/TestedSequentialMediasController.cs @@ -10,10 +10,9 @@ public sealed class TestedSequentialMediasController : Controller public TestedSequentialMediasController(AaruServerContext context) => _context = context; // GET: Admin/TestedSequentialMedias - public async Task Index() => View(await _context.TestedSequentialMedia. - OrderBy(m => m.Manufacturer). - ThenBy(m => m.Model). - ThenBy(m => m.MediumTypeName).ToListAsync()); + public async Task Index() => View(await _context.TestedSequentialMedia.OrderBy(m => m.Manufacturer). + ThenBy(m => m.Model).ThenBy(m => m.MediumTypeName). + ToListAsync()); // GET: Admin/TestedSequentialMedias/Edit/5 public async Task Edit(int? id) @@ -37,8 +36,8 @@ public sealed class TestedSequentialMediasController : Controller // To protect from overposting attacks, please enable the specific properties you want to bind to, for // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost, ValidateAntiForgeryToken] - public async Task Edit(int id, [Bind("Id,Manufacturer,MediumTypeName,Model")] - TestedSequentialMedia changedModel) + public async Task Edit( + int id, [Bind("Id,Manufacturer,MediumTypeName,Model")] TestedSequentialMedia changedModel) { if(id != changedModel.Id) return NotFound(); diff --git a/Aaru.Server/Areas/Admin/Views/DeviceStats/Index.cshtml b/Aaru.Server/Areas/Admin/Views/DeviceStats/Index.cshtml index ddfedeb1..bac0a020 100644 --- a/Aaru.Server/Areas/Admin/Views/DeviceStats/Index.cshtml +++ b/Aaru.Server/Areas/Admin/Views/DeviceStats/Index.cshtml @@ -75,10 +75,12 @@ @if(item.Report is null) { @("No") - (Find) } + (Find) + } else { - Yes } + Yes + } Edit diff --git a/Aaru.Server/Areas/Admin/Views/Devices/Details.cshtml b/Aaru.Server/Areas/Admin/Views/Devices/Details.cshtml index 964e09c7..57a03510 100644 --- a/Aaru.Server/Areas/Admin/Views/Devices/Details.cshtml +++ b/Aaru.Server/Areas/Admin/Views/Devices/Details.cshtml @@ -392,7 +392,8 @@ } else { - Yes } + Yes + } Link diff --git a/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Delete.cshtml b/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Delete.cshtml index 851b46bc..56131ac1 100644 --- a/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Delete.cshtml +++ b/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Delete.cshtml @@ -92,7 +92,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba0Data != null) { - @Model.Lba0Data.Length bytes } + @Model.Lba0Data.Length bytes + } @if(Model.Lba0DecodedSense != null) @@ -119,7 +120,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba0ScrambledData != null) { - @Model.Lba0ScrambledData.Length bytes } + @Model.Lba0ScrambledData.Length bytes + } @if(Model.Lba0ScrambledDecodedSense != null) @@ -146,7 +148,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990Data != null) { - @Model.Lba44990Data.Length bytes } + @Model.Lba44990Data.Length bytes + } @if(Model.Lba44990DecodedSense != null) @@ -173,7 +176,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990PqData != null) { - @Model.Lba44990PqData.Length bytes } + @Model.Lba44990PqData.Length bytes + } @if(Model.Lba44990PqDecodedSense != null) @@ -200,7 +204,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990RwData != null) { - @Model.Lba44990RwData.Length bytes } + @Model.Lba44990RwData.Length bytes + } @if(Model.Lba44990RwDecodedSense != null) @@ -227,7 +232,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990AudioData != null) { - @Model.Lba44990AudioData.Length bytes } + @Model.Lba44990AudioData.Length bytes + } @if(Model.Lba44990AudioDecodedSense != null) @@ -254,7 +260,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990AudioRwData != null) { - @Model.Lba44990AudioRwData.Length bytes } + @Model.Lba44990AudioRwData.Length bytes + } @if(Model.Lba44990AudioPqDecodedSense != null) @@ -281,7 +288,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990AudioRwData != null) { - @Model.Lba44990AudioRwData.Length bytes } + @Model.Lba44990AudioRwData.Length bytes + } @if(Model.Lba44990AudioRwDecodedSense != null) @@ -308,7 +316,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000Data != null) { - @Model.Lba45000Data.Length bytes } + @Model.Lba45000Data.Length bytes + } @if(Model.Lba45000DecodedSense != null) @@ -335,7 +344,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000PqData != null) { - @Model.Lba45000PqData.Length bytes } + @Model.Lba45000PqData.Length bytes + } @if(Model.Lba45000PqDecodedSense != null) @@ -362,7 +372,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000RwData != null) { - @Model.Lba45000RwData.Length bytes } + @Model.Lba45000RwData.Length bytes + } @if(Model.Lba45000RwDecodedSense != null) @@ -389,7 +400,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000AudioData != null) { - @Model.Lba45000AudioData.Length bytes } + @Model.Lba45000AudioData.Length bytes + } @if(Model.Lba45000AudioDecodedSense != null) @@ -416,7 +428,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000AudioRwData != null) { - @Model.Lba45000AudioRwData.Length bytes } + @Model.Lba45000AudioRwData.Length bytes + } @if(Model.Lba45000AudioPqDecodedSense != null) @@ -443,7 +456,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000AudioRwData != null) { - @Model.Lba45000AudioRwData.Length bytes } + @Model.Lba45000AudioRwData.Length bytes + } @if(Model.Lba45000AudioRwDecodedSense != null) @@ -470,7 +484,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000Data != null) { - @Model.Lba50000Data.Length bytes } + @Model.Lba50000Data.Length bytes + } @if(Model.Lba50000DecodedSense != null) @@ -497,7 +512,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000PqData != null) { - @Model.Lba50000PqData.Length bytes } + @Model.Lba50000PqData.Length bytes + } @if(Model.Lba50000PqDecodedSense != null) @@ -524,7 +540,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000RwData != null) { - @Model.Lba50000RwData.Length bytes } + @Model.Lba50000RwData.Length bytes + } @if(Model.Lba50000RwDecodedSense != null) @@ -551,7 +568,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000AudioData != null) { - @Model.Lba50000AudioData.Length bytes } + @Model.Lba50000AudioData.Length bytes + } @if(Model.Lba50000AudioDecodedSense != null) @@ -578,7 +596,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000AudioRwData != null) { - @Model.Lba50000AudioRwData.Length bytes } + @Model.Lba50000AudioRwData.Length bytes + } @if(Model.Lba50000AudioPqDecodedSense != null) @@ -605,7 +624,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000AudioRwData != null) { - @Model.Lba50000AudioRwData.Length bytes } + @Model.Lba50000AudioRwData.Length bytes + } @if(Model.Lba50000AudioRwDecodedSense != null) @@ -632,7 +652,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000Data != null) { - @Model.Lba100000Data.Length bytes } + @Model.Lba100000Data.Length bytes + } @if(Model.Lba100000DecodedSense != null) @@ -659,7 +680,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000PqData != null) { - @Model.Lba100000PqData.Length bytes } + @Model.Lba100000PqData.Length bytes + } @if(Model.Lba100000PqDecodedSense != null) @@ -686,7 +708,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000RwData != null) { - @Model.Lba100000RwData.Length bytes } + @Model.Lba100000RwData.Length bytes + } @if(Model.Lba100000RwDecodedSense != null) @@ -713,7 +736,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000AudioData != null) { - @Model.Lba100000AudioData.Length bytes } + @Model.Lba100000AudioData.Length bytes + } @if(Model.Lba100000AudioDecodedSense != null) @@ -740,7 +764,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000AudioRwData != null) { - @Model.Lba100000AudioRwData.Length bytes } + @Model.Lba100000AudioRwData.Length bytes + } @if(Model.Lba100000AudioPqDecodedSense != null) @@ -767,7 +792,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000AudioRwData != null) { - @Model.Lba100000AudioRwData.Length bytes } + @Model.Lba100000AudioRwData.Length bytes + } @if(Model.Lba100000AudioRwDecodedSense != null) @@ -794,7 +820,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000Data != null) { - @Model.Lba400000Data.Length bytes } + @Model.Lba400000Data.Length bytes + } @if(Model.Lba400000DecodedSense != null) @@ -821,7 +848,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000PqData != null) { - @Model.Lba400000PqData.Length bytes } + @Model.Lba400000PqData.Length bytes + } @if(Model.Lba400000PqDecodedSense != null) @@ -848,7 +876,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000RwData != null) { - @Model.Lba400000RwData.Length bytes } + @Model.Lba400000RwData.Length bytes + } @if(Model.Lba400000RwDecodedSense != null) @@ -875,7 +904,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000AudioData != null) { - @Model.Lba400000AudioData.Length bytes } + @Model.Lba400000AudioData.Length bytes + } @if(Model.Lba400000AudioDecodedSense != null) @@ -902,7 +932,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000AudioRwData != null) { - @Model.Lba400000AudioRwData.Length bytes } + @Model.Lba400000AudioRwData.Length bytes + } @if(Model.Lba400000AudioPqDecodedSense != null) @@ -929,7 +960,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000AudioRwData != null) { - @Model.Lba400000AudioRwData.Length bytes } + @Model.Lba400000AudioRwData.Length bytes + } @if(Model.Lba400000AudioRwDecodedSense != null) @@ -956,7 +988,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000Data != null) { - @Model.Lba450000Data.Length bytes } + @Model.Lba450000Data.Length bytes + } @if(Model.Lba450000DecodedSense != null) @@ -983,7 +1016,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000PqData != null) { - @Model.Lba450000PqData.Length bytes } + @Model.Lba450000PqData.Length bytes + } @if(Model.Lba450000PqDecodedSense != null) @@ -1010,7 +1044,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000RwData != null) { - @Model.Lba450000RwData.Length bytes } + @Model.Lba450000RwData.Length bytes + } @if(Model.Lba450000RwDecodedSense != null) @@ -1037,7 +1072,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000AudioData != null) { - @Model.Lba450000AudioData.Length bytes } + @Model.Lba450000AudioData.Length bytes + } @if(Model.Lba450000AudioDecodedSense != null) @@ -1064,7 +1100,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000AudioRwData != null) { - @Model.Lba450000AudioRwData.Length bytes } + @Model.Lba450000AudioRwData.Length bytes + } @if(Model.Lba450000AudioPqDecodedSense != null) @@ -1091,7 +1128,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000AudioRwData != null) { - @Model.Lba450000AudioRwData.Length bytes } + @Model.Lba450000AudioRwData.Length bytes + } @if(Model.Lba450000AudioRwDecodedSense != null) diff --git a/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Details.cshtml b/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Details.cshtml index 30b89cf4..6346aa89 100644 --- a/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Details.cshtml +++ b/Aaru.Server/Areas/Admin/Views/GdRomSwapDiscCapabilities/Details.cshtml @@ -91,7 +91,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba0Data != null) { - @Model.Lba0Data.Length bytes } + @Model.Lba0Data.Length bytes + } @if(Model.Lba0DecodedSense != null) @@ -118,7 +119,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba0ScrambledData != null) { - @Model.Lba0ScrambledData.Length bytes } + @Model.Lba0ScrambledData.Length bytes + } @if(Model.Lba0ScrambledDecodedSense != null) @@ -145,7 +147,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990Data != null) { - @Model.Lba44990Data.Length bytes } + @Model.Lba44990Data.Length bytes + } @if(Model.Lba44990DecodedSense != null) @@ -172,7 +175,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990PqData != null) { - @Model.Lba44990PqData.Length bytes } + @Model.Lba44990PqData.Length bytes + } @if(Model.Lba44990PqDecodedSense != null) @@ -199,7 +203,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990RwData != null) { - @Model.Lba44990RwData.Length bytes } + @Model.Lba44990RwData.Length bytes + } @if(Model.Lba44990RwDecodedSense != null) @@ -226,7 +231,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990AudioData != null) { - @Model.Lba44990AudioData.Length bytes } + @Model.Lba44990AudioData.Length bytes + } @if(Model.Lba44990AudioDecodedSense != null) @@ -253,7 +259,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990AudioRwData != null) { - @Model.Lba44990AudioRwData.Length bytes } + @Model.Lba44990AudioRwData.Length bytes + } @if(Model.Lba44990AudioPqDecodedSense != null) @@ -280,7 +287,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba44990AudioRwData != null) { - @Model.Lba44990AudioRwData.Length bytes } + @Model.Lba44990AudioRwData.Length bytes + } @if(Model.Lba44990AudioRwDecodedSense != null) @@ -307,7 +315,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000Data != null) { - @Model.Lba45000Data.Length bytes } + @Model.Lba45000Data.Length bytes + } @if(Model.Lba45000DecodedSense != null) @@ -334,7 +343,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000PqData != null) { - @Model.Lba45000PqData.Length bytes } + @Model.Lba45000PqData.Length bytes + } @if(Model.Lba45000PqDecodedSense != null) @@ -361,7 +371,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000RwData != null) { - @Model.Lba45000RwData.Length bytes } + @Model.Lba45000RwData.Length bytes + } @if(Model.Lba45000RwDecodedSense != null) @@ -388,7 +399,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000AudioData != null) { - @Model.Lba45000AudioData.Length bytes } + @Model.Lba45000AudioData.Length bytes + } @if(Model.Lba45000AudioDecodedSense != null) @@ -415,7 +427,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000AudioRwData != null) { - @Model.Lba45000AudioRwData.Length bytes } + @Model.Lba45000AudioRwData.Length bytes + } @if(Model.Lba45000AudioPqDecodedSense != null) @@ -442,7 +455,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba45000AudioRwData != null) { - @Model.Lba45000AudioRwData.Length bytes } + @Model.Lba45000AudioRwData.Length bytes + } @if(Model.Lba45000AudioRwDecodedSense != null) @@ -469,7 +483,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000Data != null) { - @Model.Lba50000Data.Length bytes } + @Model.Lba50000Data.Length bytes + } @if(Model.Lba50000DecodedSense != null) @@ -496,7 +511,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000PqData != null) { - @Model.Lba50000PqData.Length bytes } + @Model.Lba50000PqData.Length bytes + } @if(Model.Lba50000PqDecodedSense != null) @@ -523,7 +539,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000RwData != null) { - @Model.Lba50000RwData.Length bytes } + @Model.Lba50000RwData.Length bytes + } @if(Model.Lba50000RwDecodedSense != null) @@ -550,7 +567,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000AudioData != null) { - @Model.Lba50000AudioData.Length bytes } + @Model.Lba50000AudioData.Length bytes + } @if(Model.Lba50000AudioDecodedSense != null) @@ -577,7 +595,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000AudioRwData != null) { - @Model.Lba50000AudioRwData.Length bytes } + @Model.Lba50000AudioRwData.Length bytes + } @if(Model.Lba50000AudioPqDecodedSense != null) @@ -604,7 +623,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba50000AudioRwData != null) { - @Model.Lba50000AudioRwData.Length bytes } + @Model.Lba50000AudioRwData.Length bytes + } @if(Model.Lba50000AudioRwDecodedSense != null) @@ -631,7 +651,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000Data != null) { - @Model.Lba100000Data.Length bytes } + @Model.Lba100000Data.Length bytes + } @if(Model.Lba100000DecodedSense != null) @@ -658,7 +679,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000PqData != null) { - @Model.Lba100000PqData.Length bytes } + @Model.Lba100000PqData.Length bytes + } @if(Model.Lba100000PqDecodedSense != null) @@ -685,7 +707,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000RwData != null) { - @Model.Lba100000RwData.Length bytes } + @Model.Lba100000RwData.Length bytes + } @if(Model.Lba100000RwDecodedSense != null) @@ -712,7 +735,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000AudioData != null) { - @Model.Lba100000AudioData.Length bytes } + @Model.Lba100000AudioData.Length bytes + } @if(Model.Lba100000AudioDecodedSense != null) @@ -739,7 +763,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000AudioRwData != null) { - @Model.Lba100000AudioRwData.Length bytes } + @Model.Lba100000AudioRwData.Length bytes + } @if(Model.Lba100000AudioPqDecodedSense != null) @@ -766,7 +791,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba100000AudioRwData != null) { - @Model.Lba100000AudioRwData.Length bytes } + @Model.Lba100000AudioRwData.Length bytes + } @if(Model.Lba100000AudioRwDecodedSense != null) @@ -793,7 +819,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000Data != null) { - @Model.Lba400000Data.Length bytes } + @Model.Lba400000Data.Length bytes + } @if(Model.Lba400000DecodedSense != null) @@ -820,7 +847,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000PqData != null) { - @Model.Lba400000PqData.Length bytes } + @Model.Lba400000PqData.Length bytes + } @if(Model.Lba400000PqDecodedSense != null) @@ -847,7 +875,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000RwData != null) { - @Model.Lba400000RwData.Length bytes } + @Model.Lba400000RwData.Length bytes + } @if(Model.Lba400000RwDecodedSense != null) @@ -874,7 +903,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000AudioData != null) { - @Model.Lba400000AudioData.Length bytes } + @Model.Lba400000AudioData.Length bytes + } @if(Model.Lba400000AudioDecodedSense != null) @@ -901,7 +931,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000AudioRwData != null) { - @Model.Lba400000AudioRwData.Length bytes } + @Model.Lba400000AudioRwData.Length bytes + } @if(Model.Lba400000AudioPqDecodedSense != null) @@ -928,7 +959,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba400000AudioRwData != null) { - @Model.Lba400000AudioRwData.Length bytes } + @Model.Lba400000AudioRwData.Length bytes + } @if(Model.Lba400000AudioRwDecodedSense != null) @@ -955,7 +987,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000Data != null) { - @Model.Lba450000Data.Length bytes } + @Model.Lba450000Data.Length bytes + } @if(Model.Lba450000DecodedSense != null) @@ -982,7 +1015,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000PqData != null) { - @Model.Lba450000PqData.Length bytes } + @Model.Lba450000PqData.Length bytes + } @if(Model.Lba450000PqDecodedSense != null) @@ -1009,7 +1043,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000RwData != null) { - @Model.Lba450000RwData.Length bytes } + @Model.Lba450000RwData.Length bytes + } @if(Model.Lba450000RwDecodedSense != null) @@ -1036,7 +1071,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000AudioData != null) { - @Model.Lba450000AudioData.Length bytes } + @Model.Lba450000AudioData.Length bytes + } @if(Model.Lba450000AudioDecodedSense != null) @@ -1063,7 +1099,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000AudioRwData != null) { - @Model.Lba450000AudioRwData.Length bytes } + @Model.Lba450000AudioRwData.Length bytes + } @if(Model.Lba450000AudioPqDecodedSense != null) @@ -1090,7 +1127,8 @@ else if(Model.RecognizedSwapDisc) @if(Model.Lba450000AudioRwData != null) { - @Model.Lba450000AudioRwData.Length bytes } + @Model.Lba450000AudioRwData.Length bytes + } @if(Model.Lba450000AudioRwDecodedSense != null) diff --git a/Aaru.Server/Areas/Admin/Views/Mmc/Index.cshtml b/Aaru.Server/Areas/Admin/Views/Mmc/Index.cshtml index 3ab60f68..2bfb4e0b 100644 --- a/Aaru.Server/Areas/Admin/Views/Mmc/Index.cshtml +++ b/Aaru.Server/Areas/Admin/Views/Mmc/Index.cshtml @@ -60,7 +60,8 @@ @if(item.FeaturesId != null) { - @Html.DisplayFor(modelItem => item.FeaturesId) } + @Html.DisplayFor(modelItem => item.FeaturesId) + } else { @Html.DisplayFor(modelItem => item.FeaturesId) diff --git a/Aaru.Server/Areas/Admin/Views/TestedMedias/Delete.cshtml b/Aaru.Server/Areas/Admin/Views/TestedMedias/Delete.cshtml index ab8f1537..04fe130c 100644 --- a/Aaru.Server/Areas/Admin/Views/TestedMedias/Delete.cshtml +++ b/Aaru.Server/Areas/Admin/Views/TestedMedias/Delete.cshtml @@ -44,7 +44,8 @@
@if(Model.IdentifyData != null) { - @Model.IdentifyData.Length bytes } + @Model.IdentifyData.Length bytes + } else { @("") @@ -418,7 +419,8 @@
@if(Model.ModeSense6Data != null) { - @Model.ModeSense6Data.Length bytes } + @Model.ModeSense6Data.Length bytes + } else { @("") @@ -430,7 +432,8 @@
@if(Model.ModeSense10Data != null) { - @Model.ModeSense10Data.Length bytes } + @Model.ModeSense10Data.Length bytes + } else { @("") @@ -606,7 +609,8 @@
@if(Model.IntersessionLeadInData != null) { - @Model.IntersessionLeadInData.Length bytes } + @Model.IntersessionLeadInData.Length bytes + } else { @("") @@ -618,7 +622,8 @@
@if(Model.IntersessionLeadOutData != null) { - @Model.IntersessionLeadOutData.Length bytes } + @Model.IntersessionLeadOutData.Length bytes + } else { @("") @@ -630,7 +635,8 @@
@if(Model.Read6Data != null) { - @Model.Read6Data.Length bytes } + @Model.Read6Data.Length bytes + } else { @("") @@ -642,7 +648,8 @@
@if(Model.Read10Data != null) { - @Model.Read10Data.Length bytes } + @Model.Read10Data.Length bytes + } else { @("") @@ -654,7 +661,8 @@
@if(Model.Read12Data != null) { - @Model.Read12Data.Length bytes } + @Model.Read12Data.Length bytes + } else { @("") @@ -666,7 +674,8 @@
@if(Model.Read16Data != null) { - @Model.Read16Data.Length bytes } + @Model.Read16Data.Length bytes + } else { @("") @@ -678,7 +687,8 @@
@if(Model.ReadLong10Data != null) { - @Model.ReadLong10Data.Length bytes } + @Model.ReadLong10Data.Length bytes + } else { @("") @@ -690,7 +700,8 @@
@if(Model.ReadLong16Data != null) { - @Model.ReadLong16Data.Length bytes } + @Model.ReadLong16Data.Length bytes + } else { @("") @@ -702,7 +713,8 @@
@if(Model.ReadSectorsData != null) { - @Model.ReadSectorsData.Length bytes } + @Model.ReadSectorsData.Length bytes + } else { @("") @@ -714,7 +726,8 @@
@if(Model.ReadSectorsRetryData != null) { - @Model.ReadSectorsRetryData.Length bytes } + @Model.ReadSectorsRetryData.Length bytes + } else { @("") @@ -726,7 +739,8 @@
@if(Model.ReadDmaData != null) { - @Model.ReadDmaData.Length bytes } + @Model.ReadDmaData.Length bytes + } else { @("") @@ -738,7 +752,8 @@
@if(Model.ReadDmaRetryData != null) { - @Model.ReadDmaRetryData.Length bytes } + @Model.ReadDmaRetryData.Length bytes + } else { @("") @@ -750,7 +765,8 @@
@if(Model.ReadLbaData != null) { - @Model.ReadLbaData.Length bytes } + @Model.ReadLbaData.Length bytes + } else { @("") @@ -762,7 +778,8 @@
@if(Model.ReadRetryLbaData != null) { - @Model.ReadRetryLbaData.Length bytes } + @Model.ReadRetryLbaData.Length bytes + } else { @("") @@ -774,7 +791,8 @@
@if(Model.ReadDmaLbaData != null) { - @Model.ReadDmaLbaData.Length bytes } + @Model.ReadDmaLbaData.Length bytes + } else { @("") @@ -786,7 +804,8 @@
@if(Model.ReadDmaRetryLbaData != null) { - @Model.ReadDmaRetryLbaData.Length bytes } + @Model.ReadDmaRetryLbaData.Length bytes + } else { @("") @@ -798,7 +817,8 @@
@if(Model.ReadLba48Data != null) { - @Model.ReadLba48Data.Length bytes } + @Model.ReadLba48Data.Length bytes + } else { @("") @@ -810,7 +830,8 @@
@if(Model.ReadDmaLba48Data != null) { - @Model.ReadDmaLba48Data.Length bytes } + @Model.ReadDmaLba48Data.Length bytes + } else { @("") @@ -822,7 +843,8 @@
@if(Model.ReadLongData != null) { - @Model.ReadLongData.Length bytes } + @Model.ReadLongData.Length bytes + } else { @("") @@ -834,7 +856,8 @@
@if(Model.ReadLongRetryData != null) { - @Model.ReadLongRetryData.Length bytes } + @Model.ReadLongRetryData.Length bytes + } else { @("") @@ -846,7 +869,8 @@
@if(Model.ReadLongLbaData != null) { - @Model.ReadLongLbaData.Length bytes } + @Model.ReadLongLbaData.Length bytes + } else { @("") @@ -858,7 +882,8 @@
@if(Model.ReadLongRetryLbaData != null) { - @Model.ReadLongRetryLbaData.Length bytes } + @Model.ReadLongRetryLbaData.Length bytes + } else { @("") @@ -870,7 +895,8 @@
@if(Model.TocData != null) { - @Model.TocData.Length bytes } + @Model.TocData.Length bytes + } else { @("") @@ -882,7 +908,8 @@
@if(Model.FullTocData != null) { - @Model.FullTocData.Length bytes } + @Model.FullTocData.Length bytes + } else { @("") @@ -894,7 +921,8 @@
@if(Model.AtipData != null) { - @Model.AtipData.Length bytes } + @Model.AtipData.Length bytes + } else { @("") @@ -906,7 +934,8 @@
@if(Model.PmaData != null) { - @Model.PmaData.Length bytes } + @Model.PmaData.Length bytes + } else { @("") @@ -918,7 +947,8 @@
@if(Model.ReadCdData != null) { - @Model.ReadCdData.Length bytes } + @Model.ReadCdData.Length bytes + } else { @("") @@ -930,7 +960,8 @@
@if(Model.ReadCdMsfData != null) { - @Model.ReadCdMsfData.Length bytes } + @Model.ReadCdMsfData.Length bytes + } else { @("") @@ -942,7 +973,8 @@
@if(Model.ReadCdFullData != null) { - @Model.ReadCdFullData.Length bytes } + @Model.ReadCdFullData.Length bytes + } else { @("") @@ -954,7 +986,8 @@
@if(Model.ReadCdMsfFullData != null) { - @Model.ReadCdMsfFullData.Length bytes } + @Model.ReadCdMsfFullData.Length bytes + } else { @("") @@ -966,7 +999,8 @@
@if(Model.Track1PregapData != null) { - @Model.Track1PregapData.Length bytes } + @Model.Track1PregapData.Length bytes + } else { @("") @@ -978,7 +1012,8 @@
@if(Model.LeadInData != null) { - @Model.LeadInData.Length bytes } + @Model.LeadInData.Length bytes + } else { @("") @@ -990,7 +1025,8 @@
@if(Model.LeadOutData != null) { - @Model.LeadOutData.Length bytes } + @Model.LeadOutData.Length bytes + } else { @("") @@ -1002,7 +1038,8 @@
@if(Model.C2PointersData != null) { - @Model.C2PointersData.Length bytes } + @Model.C2PointersData.Length bytes + } else { @("") @@ -1014,7 +1051,8 @@
@if(Model.PQSubchannelData != null) { - @Model.PQSubchannelData.Length bytes } + @Model.PQSubchannelData.Length bytes + } else { @("") @@ -1026,7 +1064,8 @@
@if(Model.RWSubchannelData != null) { - @Model.RWSubchannelData.Length bytes } + @Model.RWSubchannelData.Length bytes + } else { @("") @@ -1038,7 +1077,8 @@
@if(Model.CorrectedSubchannelData != null) { - @Model.CorrectedSubchannelData.Length bytes } + @Model.CorrectedSubchannelData.Length bytes + } else { @("") @@ -1050,7 +1090,8 @@
@if(Model.PQSubchannelWithC2Data != null) { - @Model.PQSubchannelWithC2Data.Length bytes } + @Model.PQSubchannelWithC2Data.Length bytes + } else { @("") @@ -1062,7 +1103,8 @@
@if(Model.RWSubchannelWithC2Data != null) { - @Model.RWSubchannelWithC2Data.Length bytes } + @Model.RWSubchannelWithC2Data.Length bytes + } else { @("") @@ -1074,7 +1116,8 @@
@if(Model.CorrectedSubchannelWithC2Data != null) { - @Model.CorrectedSubchannelWithC2Data.Length bytes } + @Model.CorrectedSubchannelWithC2Data.Length bytes + } else { @("") @@ -1086,7 +1129,8 @@
@if(Model.PfiData != null) { - @Model.PfiData.Length bytes } + @Model.PfiData.Length bytes + } else { @("") @@ -1098,7 +1142,8 @@
@if(Model.DmiData != null) { - @Model.DmiData.Length bytes } + @Model.DmiData.Length bytes + } else { @("") @@ -1110,7 +1155,8 @@
@if(Model.CmiData != null) { - @Model.CmiData.Length bytes } + @Model.CmiData.Length bytes + } else { @("") @@ -1122,7 +1168,8 @@
@if(Model.DvdBcaData != null) { - @Model.DvdBcaData.Length bytes } + @Model.DvdBcaData.Length bytes + } else { @("") @@ -1134,7 +1181,8 @@
@if(Model.DvdAacsData != null) { - @Model.DvdAacsData.Length bytes } + @Model.DvdAacsData.Length bytes + } else { @("") @@ -1146,7 +1194,8 @@
@if(Model.DvdDdsData != null) { - @Model.DvdDdsData.Length bytes } + @Model.DvdDdsData.Length bytes + } else { @("") @@ -1158,7 +1207,8 @@
@if(Model.DvdSaiData != null) { - @Model.DvdSaiData.Length bytes } + @Model.DvdSaiData.Length bytes + } else { @("") @@ -1170,7 +1220,8 @@
@if(Model.PriData != null) { - @Model.PriData.Length bytes } + @Model.PriData.Length bytes + } else { @("") @@ -1182,7 +1233,8 @@
@if(Model.EmbossedPfiData != null) { - @Model.EmbossedPfiData.Length bytes } + @Model.EmbossedPfiData.Length bytes + } else { @("") @@ -1194,7 +1246,8 @@
@if(Model.AdipData != null) { - @Model.AdipData.Length bytes } + @Model.AdipData.Length bytes + } else { @("") @@ -1206,7 +1259,8 @@
@if(Model.DcbData != null) { - @Model.DcbData.Length bytes } + @Model.DcbData.Length bytes + } else { @("") @@ -1218,7 +1272,8 @@
@if(Model.HdCmiData != null) { - @Model.HdCmiData.Length bytes } + @Model.HdCmiData.Length bytes + } else { @("") @@ -1230,7 +1285,8 @@
@if(Model.DvdLayerData != null) { - @Model.DvdLayerData.Length bytes } + @Model.DvdLayerData.Length bytes + } else { @("") @@ -1242,7 +1298,8 @@
@if(Model.BluBcaData != null) { - @Model.BluBcaData.Length bytes } + @Model.BluBcaData.Length bytes + } else { @("") @@ -1254,7 +1311,8 @@
@if(Model.BluDdsData != null) { - @Model.BluDdsData.Length bytes } + @Model.BluDdsData.Length bytes + } else { @("") @@ -1266,7 +1324,8 @@
@if(Model.BluSaiData != null) { - @Model.BluSaiData.Length bytes } + @Model.BluSaiData.Length bytes + } else { @("") @@ -1278,7 +1337,8 @@
@if(Model.BluDiData != null) { - @Model.BluDiData.Length bytes } + @Model.BluDiData.Length bytes + } else { @("") @@ -1290,7 +1350,8 @@
@if(Model.PlextorReadCddaData != null) { - @Model.PlextorReadCddaData.Length bytes } + @Model.PlextorReadCddaData.Length bytes + } else { @("") @@ -1302,7 +1363,8 @@
@if(Model.PlextorReadCddaData != null) { - @Model.PlextorReadCddaData.Length bytes } + @Model.PlextorReadCddaData.Length bytes + } else { @("") @@ -1314,7 +1376,8 @@
@if(Model.PioneerReadCddaData != null) { - @Model.PioneerReadCddaData.Length bytes } + @Model.PioneerReadCddaData.Length bytes + } else { @("") @@ -1326,7 +1389,8 @@
@if(Model.PioneerReadCddaMsfData != null) { - @Model.PioneerReadCddaMsfData.Length bytes } + @Model.PioneerReadCddaMsfData.Length bytes + } else { @("") @@ -1338,7 +1402,8 @@
@if(Model.NecReadCddaData != null) { - @Model.NecReadCddaData.Length bytes } + @Model.NecReadCddaData.Length bytes + } else { @("") @@ -1350,7 +1415,8 @@
@if(Model.PlextorReadRawDVDData != null) { - @Model.PlextorReadRawDVDData.Length bytes } + @Model.PlextorReadRawDVDData.Length bytes + } else { @("") @@ -1362,7 +1428,8 @@
@if(Model.HLDTSTReadRawDVDData != null) { - @Model.HLDTSTReadRawDVDData.Length bytes } + @Model.HLDTSTReadRawDVDData.Length bytes + } else { @("") @@ -1380,7 +1447,8 @@
@if(Model.ReadCdScrambledData != null) { - @Model.ReadCdScrambledData.Length bytes } + @Model.ReadCdScrambledData.Length bytes + } else { @("") @@ -1398,7 +1466,8 @@
@if(Model.ReadF1_06Data != null) { - @Model.ReadF1_06Data.Length bytes } + @Model.ReadF1_06Data.Length bytes + } else { @("") @@ -1416,7 +1485,8 @@
@if(Model.ReadF1_06LeadOutData != null) { - @Model.ReadF1_06Data.Length bytes } + @Model.ReadF1_06Data.Length bytes + } else { @("") diff --git a/Aaru.Server/Areas/Admin/Views/TestedMedias/Details.cshtml b/Aaru.Server/Areas/Admin/Views/TestedMedias/Details.cshtml index d919dff8..8bd74ae7 100644 --- a/Aaru.Server/Areas/Admin/Views/TestedMedias/Details.cshtml +++ b/Aaru.Server/Areas/Admin/Views/TestedMedias/Details.cshtml @@ -43,7 +43,8 @@
@if(Model.IdentifyData != null) { - @Model.IdentifyData.Length bytes } + @Model.IdentifyData.Length bytes + } else { @("") @@ -417,7 +418,8 @@
@if(Model.ModeSense6Data != null) { - @Model.ModeSense6Data.Length bytes } + @Model.ModeSense6Data.Length bytes + } else { @("") @@ -429,7 +431,8 @@
@if(Model.ModeSense10Data != null) { - @Model.ModeSense10Data.Length bytes } + @Model.ModeSense10Data.Length bytes + } else { @("") @@ -605,7 +608,8 @@
@if(Model.IntersessionLeadInData != null) { - @Model.IntersessionLeadInData.Length bytes } + @Model.IntersessionLeadInData.Length bytes + } else { @("") @@ -617,7 +621,8 @@
@if(Model.IntersessionLeadOutData != null) { - @Model.IntersessionLeadOutData.Length bytes } + @Model.IntersessionLeadOutData.Length bytes + } else { @("") @@ -629,7 +634,8 @@
@if(Model.Read6Data != null) { - @Model.Read6Data.Length bytes } + @Model.Read6Data.Length bytes + } else { @("") @@ -641,7 +647,8 @@
@if(Model.Read10Data != null) { - @Model.Read10Data.Length bytes } + @Model.Read10Data.Length bytes + } else { @("") @@ -653,7 +660,8 @@
@if(Model.Read12Data != null) { - @Model.Read12Data.Length bytes } + @Model.Read12Data.Length bytes + } else { @("") @@ -665,7 +673,8 @@
@if(Model.Read16Data != null) { - @Model.Read16Data.Length bytes } + @Model.Read16Data.Length bytes + } else { @("") @@ -677,7 +686,8 @@
@if(Model.ReadLong10Data != null) { - @Model.ReadLong10Data.Length bytes } + @Model.ReadLong10Data.Length bytes + } else { @("") @@ -689,7 +699,8 @@
@if(Model.ReadLong16Data != null) { - @Model.ReadLong16Data.Length bytes } + @Model.ReadLong16Data.Length bytes + } else { @("") @@ -701,7 +712,8 @@
@if(Model.ReadSectorsData != null) { - @Model.ReadSectorsData.Length bytes } + @Model.ReadSectorsData.Length bytes + } else { @("") @@ -713,7 +725,8 @@
@if(Model.ReadSectorsRetryData != null) { - @Model.ReadSectorsRetryData.Length bytes } + @Model.ReadSectorsRetryData.Length bytes + } else { @("") @@ -725,7 +738,8 @@
@if(Model.ReadDmaData != null) { - @Model.ReadDmaData.Length bytes } + @Model.ReadDmaData.Length bytes + } else { @("") @@ -737,7 +751,8 @@
@if(Model.ReadDmaRetryData != null) { - @Model.ReadDmaRetryData.Length bytes } + @Model.ReadDmaRetryData.Length bytes + } else { @("") @@ -749,7 +764,8 @@
@if(Model.ReadLbaData != null) { - @Model.ReadLbaData.Length bytes } + @Model.ReadLbaData.Length bytes + } else { @("") @@ -761,7 +777,8 @@
@if(Model.ReadRetryLbaData != null) { - @Model.ReadRetryLbaData.Length bytes } + @Model.ReadRetryLbaData.Length bytes + } else { @("") @@ -773,7 +790,8 @@
@if(Model.ReadDmaLbaData != null) { - @Model.ReadDmaLbaData.Length bytes } + @Model.ReadDmaLbaData.Length bytes + } else { @("") @@ -785,7 +803,8 @@
@if(Model.ReadDmaRetryLbaData != null) { - @Model.ReadDmaRetryLbaData.Length bytes } + @Model.ReadDmaRetryLbaData.Length bytes + } else { @("") @@ -797,7 +816,8 @@
@if(Model.ReadLba48Data != null) { - @Model.ReadLba48Data.Length bytes } + @Model.ReadLba48Data.Length bytes + } else { @("") @@ -809,7 +829,8 @@
@if(Model.ReadDmaLba48Data != null) { - @Model.ReadDmaLba48Data.Length bytes } + @Model.ReadDmaLba48Data.Length bytes + } else { @("") @@ -821,7 +842,8 @@
@if(Model.ReadLongData != null) { - @Model.ReadLongData.Length bytes } + @Model.ReadLongData.Length bytes + } else { @("") @@ -833,7 +855,8 @@
@if(Model.ReadLongRetryData != null) { - @Model.ReadLongRetryData.Length bytes } + @Model.ReadLongRetryData.Length bytes + } else { @("") @@ -845,7 +868,8 @@
@if(Model.ReadLongLbaData != null) { - @Model.ReadLongLbaData.Length bytes } + @Model.ReadLongLbaData.Length bytes + } else { @("") @@ -857,7 +881,8 @@
@if(Model.ReadLongRetryLbaData != null) { - @Model.ReadLongRetryLbaData.Length bytes } + @Model.ReadLongRetryLbaData.Length bytes + } else { @("") @@ -869,7 +894,8 @@
@if(Model.TocData != null) { - @Model.TocData.Length bytes } + @Model.TocData.Length bytes + } else { @("") @@ -881,7 +907,8 @@
@if(Model.FullTocData != null) { - @Model.FullTocData.Length bytes } + @Model.FullTocData.Length bytes + } else { @("") @@ -893,7 +920,8 @@
@if(Model.AtipData != null) { - @Model.AtipData.Length bytes } + @Model.AtipData.Length bytes + } else { @("") @@ -905,7 +933,8 @@
@if(Model.PmaData != null) { - @Model.PmaData.Length bytes } + @Model.PmaData.Length bytes + } else { @("") @@ -917,7 +946,8 @@
@if(Model.ReadCdData != null) { - @Model.ReadCdData.Length bytes } + @Model.ReadCdData.Length bytes + } else { @("") @@ -929,7 +959,8 @@
@if(Model.ReadCdMsfData != null) { - @Model.ReadCdMsfData.Length bytes } + @Model.ReadCdMsfData.Length bytes + } else { @("") @@ -941,7 +972,8 @@
@if(Model.ReadCdFullData != null) { - @Model.ReadCdFullData.Length bytes } + @Model.ReadCdFullData.Length bytes + } else { @("") @@ -953,7 +985,8 @@
@if(Model.ReadCdMsfFullData != null) { - @Model.ReadCdMsfFullData.Length bytes } + @Model.ReadCdMsfFullData.Length bytes + } else { @("") @@ -965,7 +998,8 @@
@if(Model.Track1PregapData != null) { - @Model.Track1PregapData.Length bytes } + @Model.Track1PregapData.Length bytes + } else { @("") @@ -977,7 +1011,8 @@
@if(Model.LeadInData != null) { - @Model.LeadInData.Length bytes } + @Model.LeadInData.Length bytes + } else { @("") @@ -989,7 +1024,8 @@
@if(Model.LeadOutData != null) { - @Model.LeadOutData.Length bytes } + @Model.LeadOutData.Length bytes + } else { @("") @@ -1001,7 +1037,8 @@
@if(Model.C2PointersData != null) { - @Model.C2PointersData.Length bytes } + @Model.C2PointersData.Length bytes + } else { @("") @@ -1013,7 +1050,8 @@
@if(Model.PQSubchannelData != null) { - @Model.PQSubchannelData.Length bytes } + @Model.PQSubchannelData.Length bytes + } else { @("") @@ -1025,7 +1063,8 @@
@if(Model.RWSubchannelData != null) { - @Model.RWSubchannelData.Length bytes } + @Model.RWSubchannelData.Length bytes + } else { @("") @@ -1037,7 +1076,8 @@
@if(Model.CorrectedSubchannelData != null) { - @Model.CorrectedSubchannelData.Length bytes } + @Model.CorrectedSubchannelData.Length bytes + } else { @("") @@ -1049,7 +1089,8 @@
@if(Model.PQSubchannelWithC2Data != null) { - @Model.PQSubchannelWithC2Data.Length bytes } + @Model.PQSubchannelWithC2Data.Length bytes + } else { @("") @@ -1061,7 +1102,8 @@
@if(Model.RWSubchannelWithC2Data != null) { - @Model.RWSubchannelWithC2Data.Length bytes } + @Model.RWSubchannelWithC2Data.Length bytes + } else { @("") @@ -1073,7 +1115,8 @@
@if(Model.CorrectedSubchannelWithC2Data != null) { - @Model.CorrectedSubchannelWithC2Data.Length bytes } + @Model.CorrectedSubchannelWithC2Data.Length bytes + } else { @("") @@ -1085,7 +1128,8 @@
@if(Model.PfiData != null) { - @Model.PfiData.Length bytes } + @Model.PfiData.Length bytes + } else { @("") @@ -1097,7 +1141,8 @@
@if(Model.DmiData != null) { - @Model.DmiData.Length bytes } + @Model.DmiData.Length bytes + } else { @("") @@ -1109,7 +1154,8 @@
@if(Model.CmiData != null) { - @Model.CmiData.Length bytes } + @Model.CmiData.Length bytes + } else { @("") @@ -1121,7 +1167,8 @@
@if(Model.DvdBcaData != null) { - @Model.DvdBcaData.Length bytes } + @Model.DvdBcaData.Length bytes + } else { @("") @@ -1133,7 +1180,8 @@
@if(Model.DvdAacsData != null) { - @Model.DvdAacsData.Length bytes } + @Model.DvdAacsData.Length bytes + } else { @("") @@ -1145,7 +1193,8 @@
@if(Model.DvdDdsData != null) { - @Model.DvdDdsData.Length bytes } + @Model.DvdDdsData.Length bytes + } else { @("") @@ -1157,7 +1206,8 @@
@if(Model.DvdSaiData != null) { - @Model.DvdSaiData.Length bytes } + @Model.DvdSaiData.Length bytes + } else { @("") @@ -1169,7 +1219,8 @@
@if(Model.PriData != null) { - @Model.PriData.Length bytes } + @Model.PriData.Length bytes + } else { @("") @@ -1181,7 +1232,8 @@
@if(Model.EmbossedPfiData != null) { - @Model.EmbossedPfiData.Length bytes } + @Model.EmbossedPfiData.Length bytes + } else { @("") @@ -1193,7 +1245,8 @@
@if(Model.AdipData != null) { - @Model.AdipData.Length bytes } + @Model.AdipData.Length bytes + } else { @("") @@ -1205,7 +1258,8 @@
@if(Model.DcbData != null) { - @Model.DcbData.Length bytes } + @Model.DcbData.Length bytes + } else { @("") @@ -1217,7 +1271,8 @@
@if(Model.HdCmiData != null) { - @Model.HdCmiData.Length bytes } + @Model.HdCmiData.Length bytes + } else { @("") @@ -1229,7 +1284,8 @@
@if(Model.DvdLayerData != null) { - @Model.DvdLayerData.Length bytes } + @Model.DvdLayerData.Length bytes + } else { @("") @@ -1241,7 +1297,8 @@
@if(Model.BluBcaData != null) { - @Model.BluBcaData.Length bytes } + @Model.BluBcaData.Length bytes + } else { @("") @@ -1253,7 +1310,8 @@
@if(Model.BluDdsData != null) { - @Model.BluDdsData.Length bytes } + @Model.BluDdsData.Length bytes + } else { @("") @@ -1265,7 +1323,8 @@
@if(Model.BluSaiData != null) { - @Model.BluSaiData.Length bytes } + @Model.BluSaiData.Length bytes + } else { @("") @@ -1277,7 +1336,8 @@
@if(Model.BluDiData != null) { - @Model.BluDiData.Length bytes } + @Model.BluDiData.Length bytes + } else { @("") @@ -1289,7 +1349,8 @@
@if(Model.PlextorReadCddaData != null) { - @Model.PlextorReadCddaData.Length bytes } + @Model.PlextorReadCddaData.Length bytes + } else { @("") @@ -1301,7 +1362,8 @@
@if(Model.PlextorReadCddaData != null) { - @Model.PlextorReadCddaData.Length bytes } + @Model.PlextorReadCddaData.Length bytes + } else { @("") @@ -1313,7 +1375,8 @@
@if(Model.PioneerReadCddaData != null) { - @Model.PioneerReadCddaData.Length bytes } + @Model.PioneerReadCddaData.Length bytes + } else { @("") @@ -1325,7 +1388,8 @@
@if(Model.PioneerReadCddaMsfData != null) { - @Model.PioneerReadCddaMsfData.Length bytes } + @Model.PioneerReadCddaMsfData.Length bytes + } else { @("") @@ -1337,7 +1401,8 @@
@if(Model.NecReadCddaData != null) { - @Model.NecReadCddaData.Length bytes } + @Model.NecReadCddaData.Length bytes + } else { @("") @@ -1349,7 +1414,8 @@
@if(Model.PlextorReadRawDVDData != null) { - @Model.PlextorReadRawDVDData.Length bytes } + @Model.PlextorReadRawDVDData.Length bytes + } else { @("") @@ -1361,7 +1427,8 @@
@if(Model.HLDTSTReadRawDVDData != null) { - @Model.HLDTSTReadRawDVDData.Length bytes } + @Model.HLDTSTReadRawDVDData.Length bytes + } else { @("") @@ -1379,7 +1446,8 @@
@if(Model.ReadCdScrambledData != null) { - @Model.ReadCdScrambledData.Length bytes } + @Model.ReadCdScrambledData.Length bytes + } else { @("") @@ -1397,7 +1465,8 @@
@if(Model.ReadF1_06Data != null) { - @Model.ReadF1_06Data.Length bytes } + @Model.ReadF1_06Data.Length bytes + } else { @("") @@ -1415,7 +1484,8 @@
@if(Model.ReadF1_06LeadOutData != null) { - @Model.ReadF1_06LeadOutData.Length bytes } + @Model.ReadF1_06LeadOutData.Length bytes + } else { @("") diff --git a/Aaru.Server/BasicAuthMiddleware.cs b/Aaru.Server/BasicAuthMiddleware.cs index 4fcc66f2..69b21812 100644 --- a/Aaru.Server/BasicAuthMiddleware.cs +++ b/Aaru.Server/BasicAuthMiddleware.cs @@ -28,12 +28,10 @@ public sealed class BasicAuthMiddleware if(authHeader?.StartsWith("Basic ") == true) { // Get the encoded username and password - string encodedUsernamePassword = - authHeader.Split(' ', 2, StringSplitOptions.RemoveEmptyEntries)[1]?.Trim(); + string encodedUsernamePassword = authHeader.Split(' ', 2, StringSplitOptions.RemoveEmptyEntries)[1]?.Trim(); // Decode from Base64 to string - string decodedUsernamePassword = - Encoding.UTF8.GetString(Convert.FromBase64String(encodedUsernamePassword)); + string decodedUsernamePassword = Encoding.UTF8.GetString(Convert.FromBase64String(encodedUsernamePassword)); // Split username and password string username = decodedUsernamePassword.Split(':', 2)[0]; diff --git a/Aaru.Server/Controllers/ReportController.cs b/Aaru.Server/Controllers/ReportController.cs index 9b8b01ee..3fd9808b 100644 --- a/Aaru.Server/Controllers/ReportController.cs +++ b/Aaru.Server/Controllers/ReportController.cs @@ -366,12 +366,12 @@ public sealed class ReportController : Controller scsiOneValue. Add($"Device has {report.SCSI.ReadCapabilities.Blocks} blocks of {report.SCSI.ReadCapabilities.BlockSize} bytes each"); - if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1024 / - 1024 > 1000000) + if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1024 / 1024 > + 1000000) scsiOneValue. Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB"); - else if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / - 1024 / 1024 > 1000) + else if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1024 / + 1024 > 1000) scsiOneValue. Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024:F2} GiB"); else diff --git a/Aaru.Server/Controllers/StatsController.cs b/Aaru.Server/Controllers/StatsController.cs index 6b548ac6..62d3c29e 100644 --- a/Aaru.Server/Controllers/StatsController.cs +++ b/Aaru.Server/Controllers/StatsController.cs @@ -80,9 +80,8 @@ public sealed class StatsController : Controller StatsConverter.Convert(statistics); - System.IO.File. - Delete(Path.Combine(_env.ContentRootPath ?? throw new InvalidOperationException(), - "Statistics", "Statistics.xml")); + System.IO.File.Delete(Path.Combine(_env.ContentRootPath ?? throw new InvalidOperationException(), + "Statistics", "Statistics.xml")); } catch(XmlException) { @@ -142,8 +141,8 @@ public sealed class StatsController : Controller try { (string type, string subType) mediaType = - MediaType.MediaTypeToString((CommonTypes.MediaType) - Enum.Parse(typeof(CommonTypes.MediaType), nvs.Type)); + MediaType.MediaTypeToString((CommonTypes.MediaType)Enum.Parse(typeof(CommonTypes.MediaType), + nvs.Type)); if(nvs.Real) realMedia.Add(new MediaItem @@ -183,8 +182,8 @@ public sealed class StatsController : Controller ToList(); if(virtualMedia.Count > 0) - ViewBag.repVirtualMedia = virtualMedia.OrderBy(media => media.Type). - ThenBy(media => media.SubType).ToList(); + ViewBag.repVirtualMedia = virtualMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType). + ToList(); } if(_ctx.DeviceStats.Any()) @@ -244,8 +243,7 @@ public sealed class StatsController : Controller } ViewBag.repDevices = devices.OrderBy(device => device.Manufacturer).ThenBy(device => device.Model). - ThenBy(device => device.Revision).ThenBy(device => device.Bus). - ToList(); + ThenBy(device => device.Revision).ThenBy(device => device.Bus).ToList(); } } catch(Exception) @@ -330,13 +328,13 @@ public sealed class StatsController : Controller { string[][] result = { - _ctx.OperatingSystems.Where(o => o.Name == PlatformID.MacOSX.ToString()). - OrderByDescending(o => o.Count).Take(10). + _ctx.OperatingSystems.Where(o => o.Name == PlatformID.MacOSX.ToString()).OrderByDescending(o => o.Count). + Take(10). Select(x => $"{DetectOS.GetPlatformName(PlatformID.MacOSX, x.Version)}{(string.IsNullOrEmpty(x.Version) ? "" : " ")}{x.Version}"). ToArray(), - _ctx.OperatingSystems.Where(o => o.Name == PlatformID.MacOSX.ToString()). - OrderByDescending(o => o.Count).Take(10).Select(x => x.Count.ToString()).ToArray() + _ctx.OperatingSystems.Where(o => o.Name == PlatformID.MacOSX.ToString()).OrderByDescending(o => o.Count). + Take(10).Select(x => x.Count.ToString()).ToArray() }; if(result[0].Length < 10) @@ -354,13 +352,13 @@ public sealed class StatsController : Controller { string[][] result = { - _ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString()). - OrderByDescending(o => o.Count).Take(10). + _ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString()).OrderByDescending(o => o.Count). + Take(10). Select(x => $"{DetectOS.GetPlatformName(PlatformID.Win32NT, x.Version)}{(string.IsNullOrEmpty(x.Version) ? "" : " ")}{x.Version}"). ToArray(), - _ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString()). - OrderByDescending(o => o.Count).Take(10).Select(x => x.Count.ToString()).ToArray() + _ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString()).OrderByDescending(o => o.Count). + Take(10).Select(x => x.Count.ToString()).ToArray() }; if(result[0].Length < 10) @@ -368,9 +366,8 @@ public sealed class StatsController : Controller result[0][9] = "Other"; - result[1][9] = - (_ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString()).Sum(o => o.Count) - - result[1].Take(9).Sum(long.Parse)).ToString(); + result[1][9] = (_ctx.OperatingSystems.Where(o => o.Name == PlatformID.Win32NT.ToString()).Sum(o => o.Count) - + result[1].Take(9).Sum(long.Parse)).ToString(); return Json(result); } @@ -514,8 +511,8 @@ public sealed class StatsController : Controller result[0][9] = "Other"; - result[1][9] = (_ctx.Medias.Where(o => !o.Real).Sum(o => o.Count) - result[1].Take(9).Sum(long.Parse)). - ToString(); + result[1][9] = + (_ctx.Medias.Where(o => !o.Real).Sum(o => o.Count) - result[1].Take(9).Sum(long.Parse)).ToString(); return Json(result); } diff --git a/Aaru.Server/Controllers/UploadReportController.cs b/Aaru.Server/Controllers/UploadReportController.cs index 87380790..0106e109 100644 --- a/Aaru.Server/Controllers/UploadReportController.cs +++ b/Aaru.Server/Controllers/UploadReportController.cs @@ -75,8 +75,7 @@ public sealed class UploadReportController : Controller var xs = new XmlSerializer(newReport.GetType()); newReport = - (DeviceReport) - xs.Deserialize(new StringReader(await new StreamReader(request.Body).ReadToEndAsync())); + (DeviceReport)xs.Deserialize(new StringReader(await new StreamReader(request.Body).ReadToEndAsync())); if(newReport == null) { @@ -118,11 +117,9 @@ public sealed class UploadReportController : Controller if(newUploadedReport.ATA?.ReadCapabilities?.CHS != null) { Chs existingChs = - _ctx.Chs.FirstOrDefault(c => - c.Cylinders == newUploadedReport.ATA.ReadCapabilities.CHS. - Cylinders && - c.Heads == newUploadedReport.ATA.ReadCapabilities.CHS.Heads && - c.Sectors == newUploadedReport.ATA.ReadCapabilities.CHS.Sectors); + _ctx.Chs.FirstOrDefault(c => c.Cylinders == newUploadedReport.ATA.ReadCapabilities.CHS.Cylinders && + c.Heads == newUploadedReport.ATA.ReadCapabilities.CHS.Heads && + c.Sectors == newUploadedReport.ATA.ReadCapabilities.CHS.Sectors); if(existingChs != null) newUploadedReport.ATA.ReadCapabilities.CHS = existingChs; @@ -133,10 +130,9 @@ public sealed class UploadReportController : Controller Chs existingChs = _ctx.Chs.FirstOrDefault(c => c.Cylinders == newUploadedReport.ATA.ReadCapabilities.CurrentCHS. - Cylinders && - c.Heads == newUploadedReport.ATA.ReadCapabilities.CurrentCHS. - Heads && c.Sectors == newUploadedReport.ATA.ReadCapabilities. - CurrentCHS.Sectors); + Cylinders && + c.Heads == newUploadedReport.ATA.ReadCapabilities.CurrentCHS.Heads && + c.Sectors == newUploadedReport.ATA.ReadCapabilities.CurrentCHS.Sectors); if(existingChs != null) newUploadedReport.ATA.ReadCapabilities.CurrentCHS = existingChs; @@ -161,8 +157,7 @@ public sealed class UploadReportController : Controller { Chs existingChs = _ctx.Chs.FirstOrDefault(c => c.Cylinders == media.CHS.Cylinders && - c.Heads == media.CHS.Heads && - c.Sectors == media.CHS.Sectors); + c.Heads == media.CHS.Heads && c.Sectors == media.CHS.Sectors); if(existingChs != null) media.CHS = existingChs; @@ -279,11 +274,9 @@ public sealed class UploadReportController : Controller if(newUploadedReport.ATA?.ReadCapabilities?.CHS != null) { Chs existingChs = - _ctx.Chs.FirstOrDefault(c => - c.Cylinders == newUploadedReport.ATA.ReadCapabilities.CHS. - Cylinders && - c.Heads == newUploadedReport.ATA.ReadCapabilities.CHS.Heads && - c.Sectors == newUploadedReport.ATA.ReadCapabilities.CHS.Sectors); + _ctx.Chs.FirstOrDefault(c => c.Cylinders == newUploadedReport.ATA.ReadCapabilities.CHS.Cylinders && + c.Heads == newUploadedReport.ATA.ReadCapabilities.CHS.Heads && + c.Sectors == newUploadedReport.ATA.ReadCapabilities.CHS.Sectors); if(existingChs != null) newUploadedReport.ATA.ReadCapabilities.CHS = existingChs; @@ -294,10 +287,9 @@ public sealed class UploadReportController : Controller Chs existingChs = _ctx.Chs.FirstOrDefault(c => c.Cylinders == newUploadedReport.ATA.ReadCapabilities.CurrentCHS. - Cylinders && - c.Heads == newUploadedReport.ATA.ReadCapabilities.CurrentCHS. - Heads && c.Sectors == newUploadedReport.ATA.ReadCapabilities. - CurrentCHS.Sectors); + Cylinders && + c.Heads == newUploadedReport.ATA.ReadCapabilities.CurrentCHS.Heads && + c.Sectors == newUploadedReport.ATA.ReadCapabilities.CurrentCHS.Sectors); if(existingChs != null) newUploadedReport.ATA.ReadCapabilities.CurrentCHS = existingChs; @@ -322,8 +314,7 @@ public sealed class UploadReportController : Controller { Chs existingChs = _ctx.Chs.FirstOrDefault(c => c.Cylinders == media.CHS.Cylinders && - c.Heads == media.CHS.Heads && - c.Sectors == media.CHS.Sectors); + c.Heads == media.CHS.Heads && c.Sectors == media.CHS.Sectors); if(existingChs != null) media.CHS = existingChs; diff --git a/Aaru.Server/Controllers/UploadStatsController.cs b/Aaru.Server/Controllers/UploadStatsController.cs index a6a2140b..98c12728 100644 --- a/Aaru.Server/Controllers/UploadStatsController.cs +++ b/Aaru.Server/Controllers/UploadStatsController.cs @@ -41,299 +41,296 @@ using Newtonsoft.Json; using OperatingSystem = Aaru.Server.Models.OperatingSystem; using Version = Aaru.Server.Models.Version; -namespace Aaru.Server.Controllers +namespace Aaru.Server.Controllers; + +public sealed class UploadStatsController : Controller { - public sealed class UploadStatsController : Controller + readonly AaruServerContext _ctx; + + public UploadStatsController(AaruServerContext ctx) => _ctx = ctx; + + /// Receives statistics from Aaru.Core, processes them and adds them to a server-side global statistics XML + /// HTTP response + [Route("api/uploadstats"), HttpPost] + public async Task UploadStats() { - readonly AaruServerContext _ctx; - - public UploadStatsController(AaruServerContext ctx) => _ctx = ctx; - - /// Receives statistics from Aaru.Core, processes them and adds them to a server-side global statistics XML - /// HTTP response - [Route("api/uploadstats"), HttpPost] - public async Task UploadStats() + var response = new ContentResult { - var response = new ContentResult + StatusCode = (int)HttpStatusCode.OK, + ContentType = "text/plain" + }; + + try + { + var newStats = new Stats(); + HttpRequest request = HttpContext.Request; + + var xs = new XmlSerializer(newStats.GetType()); + + newStats = (Stats)xs.Deserialize(new StringReader(await new StreamReader(request.Body).ReadToEndAsync())); + + if(newStats == null) { - StatusCode = (int)HttpStatusCode.OK, - ContentType = "text/plain" - }; + response.Content = "notstats"; - try + return response; + } + + StatsConverter.Convert(newStats); + + response.Content = "ok"; + + return response; + } + catch(Exception) + { + #if DEBUG + if(Debugger.IsAttached) + throw; + #endif + response.Content = "error"; + + return response; + } + } + + /// Receives a report from Aaru.Core, verifies it's in the correct format and stores it on the server + /// HTTP response + [Route("api/uploadstatsv2"), HttpPost] + public async Task UploadStatsV2() + { + var response = new ContentResult + { + StatusCode = (int)HttpStatusCode.OK, + ContentType = "text/plain" + }; + + try + { + HttpRequest request = HttpContext.Request; + + var sr = new StreamReader(request.Body); + string statsString = await sr.ReadToEndAsync(); + StatsDto newstats = JsonConvert.DeserializeObject(statsString); + + if(newstats == null) { - var newStats = new Stats(); - HttpRequest request = HttpContext.Request; + response.Content = "notstats"; - var xs = new XmlSerializer(newStats.GetType()); + return response; + } - newStats = - (Stats)xs.Deserialize(new StringReader(await new StreamReader(request.Body).ReadToEndAsync())); - - if(newStats == null) + if(newstats.Commands != null) + foreach(NameValueStats nvs in newstats.Commands) { - response.Content = "notstats"; + if(nvs.name == "analyze") + nvs.name = "fs-info"; - return response; + Command existing = _ctx.Commands.FirstOrDefault(c => c.Name == nvs.name); + + if(existing == null) + await _ctx.Commands.AddAsync(new Command + { + Name = nvs.name, + Count = nvs.Value + }); + else + existing.Count += nvs.Value; } - StatsConverter.Convert(newStats); + if(newstats.Versions != null) + foreach(NameValueStats nvs in newstats.Versions) + { + Version existing = _ctx.Versions.FirstOrDefault(c => c.Name == nvs.name); - response.Content = "ok"; + if(existing == null) + await _ctx.Versions.AddAsync(new Version + { + Name = nvs.name, + Count = nvs.Value + }); + else + existing.Count += nvs.Value; + } - return response; - } - catch(Exception) - { - #if DEBUG - if(Debugger.IsAttached) - throw; - #endif - response.Content = "error"; + if(newstats.Filesystems != null) + foreach(NameValueStats nvs in newstats.Filesystems) + { + Filesystem existing = _ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name); - return response; - } + if(existing == null) + await _ctx.Filesystems.AddAsync(new Filesystem + { + Name = nvs.name, + Count = nvs.Value + }); + else + existing.Count += nvs.Value; + } + + if(newstats.Partitions != null) + foreach(NameValueStats nvs in newstats.Partitions) + { + Partition existing = _ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name); + + if(existing == null) + await _ctx.Partitions.AddAsync(new Partition + { + Name = nvs.name, + Count = nvs.Value + }); + else + existing.Count += nvs.Value; + } + + if(newstats.MediaFormats != null) + foreach(NameValueStats nvs in newstats.MediaFormats) + { + MediaFormat existing = _ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name); + + if(existing == null) + await _ctx.MediaFormats.AddAsync(new MediaFormat + { + Name = nvs.name, + Count = nvs.Value + }); + else + existing.Count += nvs.Value; + } + + if(newstats.Filters != null) + foreach(NameValueStats nvs in newstats.Filters) + { + Filter existing = _ctx.Filters.FirstOrDefault(c => c.Name == nvs.name); + + if(existing == null) + await _ctx.Filters.AddAsync(new Filter + { + Name = nvs.name, + Count = nvs.Value + }); + else + existing.Count += nvs.Value; + } + + if(newstats.OperatingSystems != null) + foreach(OsStats operatingSystem in newstats.OperatingSystems) + { + OperatingSystem existing = + _ctx.OperatingSystems.FirstOrDefault(c => c.Name == operatingSystem.name && + c.Version == operatingSystem.version); + + if(existing == null) + await _ctx.OperatingSystems.AddAsync(new OperatingSystem + { + Name = operatingSystem.name, + Version = operatingSystem.version, + Count = operatingSystem.Value + }); + else + existing.Count += operatingSystem.Value; + } + + if(newstats.Medias != null) + foreach(MediaStats media in newstats.Medias) + { + Media existing = _ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real); + + if(existing == null) + await _ctx.Medias.AddAsync(new Media + { + Type = media.type, + Real = media.real, + Count = media.Value + }); + else + existing.Count += media.Value; + } + + if(newstats.Devices != null) + foreach(DeviceStats device in from device in newstats.Devices let existing = + _ctx.DeviceStats.FirstOrDefault(c => c.Bus == device.Bus && + c.Manufacturer == device.Manufacturer && + c.Model == device.Model && c.Revision == device.Revision) + where existing == null select device) + { + await _ctx.DeviceStats.AddAsync(new DeviceStat + { + Bus = device.Bus, + Manufacturer = device.Manufacturer, + Model = device.Model, + Revision = device.Revision + }); + } + + if(newstats.RemoteApplications != null) + foreach(OsStats application in newstats.RemoteApplications) + { + RemoteApplication existing = + _ctx.RemoteApplications.FirstOrDefault(c => c.Name == application.name && + c.Version == application.version); + + if(existing == null) + await _ctx.RemoteApplications.AddAsync(new RemoteApplication + { + Name = application.name, + Version = application.version, + Count = application.Value + }); + else + existing.Count += application.Value; + } + + if(newstats.RemoteArchitectures != null) + foreach(NameValueStats nvs in newstats.RemoteArchitectures) + { + RemoteArchitecture existing = _ctx.RemoteArchitectures.FirstOrDefault(c => c.Name == nvs.name); + + if(existing == null) + await _ctx.RemoteArchitectures.AddAsync(new RemoteArchitecture + { + Name = nvs.name, + Count = nvs.Value + }); + else + existing.Count += nvs.Value; + } + + if(newstats.RemoteOperatingSystems != null) + foreach(OsStats remoteOperatingSystem in newstats.RemoteOperatingSystems) + { + RemoteOperatingSystem existing = + _ctx.RemoteOperatingSystems.FirstOrDefault(c => c.Name == remoteOperatingSystem.name && + c.Version == remoteOperatingSystem.version); + + if(existing == null) + await _ctx.RemoteOperatingSystems.AddAsync(new RemoteOperatingSystem + { + Name = remoteOperatingSystem.name, + Version = remoteOperatingSystem.version, + Count = remoteOperatingSystem.Value + }); + else + existing.Count += remoteOperatingSystem.Value; + } + + await _ctx.SaveChangesAsync(); + + response.Content = "ok"; + + return response; } - /// Receives a report from Aaru.Core, verifies it's in the correct format and stores it on the server - /// HTTP response - [Route("api/uploadstatsv2"), HttpPost] - public async Task UploadStatsV2() + // ReSharper disable once RedundantCatchClause + catch { - var response = new ContentResult - { - StatusCode = (int)HttpStatusCode.OK, - ContentType = "text/plain" - }; + #if DEBUG + if(Debugger.IsAttached) + throw; + #endif + response.Content = "error"; - try - { - HttpRequest request = HttpContext.Request; - - var sr = new StreamReader(request.Body); - string statsString = await sr.ReadToEndAsync(); - StatsDto newstats = JsonConvert.DeserializeObject(statsString); - - if(newstats == null) - { - response.Content = "notstats"; - - return response; - } - - if(newstats.Commands != null) - foreach(NameValueStats nvs in newstats.Commands) - { - if(nvs.name == "analyze") - nvs.name = "fs-info"; - - Command existing = _ctx.Commands.FirstOrDefault(c => c.Name == nvs.name); - - if(existing == null) - await _ctx.Commands.AddAsync(new() - { - Name = nvs.name, - Count = nvs.Value - }); - else - existing.Count += nvs.Value; - } - - if(newstats.Versions != null) - foreach(NameValueStats nvs in newstats.Versions) - { - Version existing = _ctx.Versions.FirstOrDefault(c => c.Name == nvs.name); - - if(existing == null) - await _ctx.Versions.AddAsync(new() - { - Name = nvs.name, - Count = nvs.Value - }); - else - existing.Count += nvs.Value; - } - - if(newstats.Filesystems != null) - foreach(NameValueStats nvs in newstats.Filesystems) - { - Filesystem existing = _ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name); - - if(existing == null) - await _ctx.Filesystems.AddAsync(new() - { - Name = nvs.name, - Count = nvs.Value - }); - else - existing.Count += nvs.Value; - } - - if(newstats.Partitions != null) - foreach(NameValueStats nvs in newstats.Partitions) - { - Partition existing = _ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name); - - if(existing == null) - await _ctx.Partitions.AddAsync(new() - { - Name = nvs.name, - Count = nvs.Value - }); - else - existing.Count += nvs.Value; - } - - if(newstats.MediaFormats != null) - foreach(NameValueStats nvs in newstats.MediaFormats) - { - MediaFormat existing = _ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name); - - if(existing == null) - await _ctx.MediaFormats.AddAsync(new() - { - Name = nvs.name, - Count = nvs.Value - }); - else - existing.Count += nvs.Value; - } - - if(newstats.Filters != null) - foreach(NameValueStats nvs in newstats.Filters) - { - Filter existing = _ctx.Filters.FirstOrDefault(c => c.Name == nvs.name); - - if(existing == null) - await _ctx.Filters.AddAsync(new() - { - Name = nvs.name, - Count = nvs.Value - }); - else - existing.Count += nvs.Value; - } - - if(newstats.OperatingSystems != null) - foreach(OsStats operatingSystem in newstats.OperatingSystems) - { - OperatingSystem existing = - _ctx.OperatingSystems.FirstOrDefault(c => c.Name == operatingSystem.name && - c.Version == operatingSystem.version); - - if(existing == null) - await _ctx.OperatingSystems.AddAsync(new() - { - Name = operatingSystem.name, - Version = operatingSystem.version, - Count = operatingSystem.Value - }); - else - existing.Count += operatingSystem.Value; - } - - if(newstats.Medias != null) - foreach(MediaStats media in newstats.Medias) - { - Media existing = _ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real); - - if(existing == null) - await _ctx.Medias.AddAsync(new() - { - Type = media.type, - Real = media.real, - Count = media.Value - }); - else - existing.Count += media.Value; - } - - if(newstats.Devices != null) - foreach(DeviceStats device in from device in newstats.Devices let existing = - _ctx.DeviceStats.FirstOrDefault(c => c.Bus == device.Bus && - c.Manufacturer == device.Manufacturer && - c.Model == device.Model && - c.Revision == device.Revision) where existing == null - select device) - { - await _ctx.DeviceStats.AddAsync(new() - { - Bus = device.Bus, - Manufacturer = device.Manufacturer, - Model = device.Model, - Revision = device.Revision - }); - } - - if(newstats.RemoteApplications != null) - foreach(OsStats application in newstats.RemoteApplications) - { - RemoteApplication existing = - _ctx.RemoteApplications.FirstOrDefault(c => c.Name == application.name && - c.Version == application.version); - - if(existing == null) - await _ctx.RemoteApplications.AddAsync(new() - { - Name = application.name, - Version = application.version, - Count = application.Value - }); - else - existing.Count += application.Value; - } - - if(newstats.RemoteArchitectures != null) - foreach(NameValueStats nvs in newstats.RemoteArchitectures) - { - RemoteArchitecture existing = _ctx.RemoteArchitectures.FirstOrDefault(c => c.Name == nvs.name); - - if(existing == null) - await _ctx.RemoteArchitectures.AddAsync(new() - { - Name = nvs.name, - Count = nvs.Value - }); - else - existing.Count += nvs.Value; - } - - if(newstats.RemoteOperatingSystems != null) - foreach(OsStats remoteOperatingSystem in newstats.RemoteOperatingSystems) - { - RemoteOperatingSystem existing = - _ctx.RemoteOperatingSystems.FirstOrDefault(c => c.Name == remoteOperatingSystem.name && - c.Version == remoteOperatingSystem.version); - - if(existing == null) - await _ctx.RemoteOperatingSystems.AddAsync(new() - { - Name = remoteOperatingSystem.name, - Version = remoteOperatingSystem.version, - Count = remoteOperatingSystem.Value - }); - else - existing.Count += remoteOperatingSystem.Value; - } - - await _ctx.SaveChangesAsync(); - - response.Content = "ok"; - - return response; - } - - // ReSharper disable once RedundantCatchClause - catch - { - #if DEBUG - if(Debugger.IsAttached) - throw; - #endif - response.Content = "error"; - - return response; - } + return response; } } } \ No newline at end of file diff --git a/Aaru.Server/Core/Ata.cs b/Aaru.Server/Core/Ata.cs index 5ea7d287..428949af 100644 --- a/Aaru.Server/Core/Ata.cs +++ b/Aaru.Server/Core/Ata.cs @@ -465,8 +465,7 @@ public static class Ata break; default: - ataTwoValue.Add("Unknown transport type", - $"0x{(ataIdentify.TransportMajorVersion & 0xF000) >> 12:X1}"); + ataTwoValue.Add("Unknown transport type", $"0x{(ataIdentify.TransportMajorVersion & 0xF000) >> 12:X1}"); break; } @@ -652,8 +651,7 @@ public static class Ata if(ataIdentify.GeneralConfiguration.HasFlag(Identify.GeneralConfigurationBit.DataStrobeOffset)) ataOneValue.Add("Data strobe offset option is available"); - if(ataIdentify.GeneralConfiguration.HasFlag(Identify.GeneralConfigurationBit. - RotationalSpeedTolerance)) + if(ataIdentify.GeneralConfiguration.HasFlag(Identify.GeneralConfigurationBit.RotationalSpeedTolerance)) ataOneValue.Add("Rotational speed tolerance is higher than 0,5%"); if(ataIdentify.GeneralConfiguration.HasFlag(Identify.GeneralConfigurationBit.SpindleControl)) @@ -1023,9 +1021,8 @@ public static class Ata if(ataIdentify.MinMDMACycleTime != 0 && ataIdentify.RecMDMACycleTime != 0) - ataOneValue. - Add($"At minimum {ataIdentify.MinMDMACycleTime} ns. transfer cycle time per word in MDMA, " + - $"{ataIdentify.RecMDMACycleTime} ns. recommended"); + ataOneValue.Add($"At minimum {ataIdentify.MinMDMACycleTime} ns. transfer cycle time per word in MDMA, " + + $"{ataIdentify.RecMDMACycleTime} ns. recommended"); if(ataIdentify.MinPIOCycleTimeNoFlow != 0) ataOneValue. @@ -1033,9 +1030,8 @@ public static class Ata "without flow control"); if(ataIdentify.MinPIOCycleTimeFlow != 0) - ataOneValue. - Add($"At minimum {ataIdentify.MinPIOCycleTimeFlow} ns. transfer cycle time per word in PIO, " + - "with IORDY flow control"); + ataOneValue.Add($"At minimum {ataIdentify.MinPIOCycleTimeFlow} ns. transfer cycle time per word in PIO, " + + "with IORDY flow control"); if(ataIdentify.MaxQueueDepth != 0) ataOneValue.Add($"{ataIdentify.MaxQueueDepth + 1} depth of queue maximum"); @@ -1043,12 +1039,10 @@ public static class Ata if(atapi) { if(ataIdentify.PacketBusRelease != 0) - ataOneValue. - Add($"{ataIdentify.PacketBusRelease} ns. typical to release bus from receipt of PACKET"); + ataOneValue.Add($"{ataIdentify.PacketBusRelease} ns. typical to release bus from receipt of PACKET"); if(ataIdentify.ServiceBusyClear != 0) - ataOneValue. - Add($"{ataIdentify.ServiceBusyClear} ns. typical to clear BSY bit from receipt of SERVICE"); + ataOneValue.Add($"{ataIdentify.ServiceBusyClear} ns. typical to clear BSY bit from receipt of SERVICE"); } if((ataIdentify.TransportMajorVersion & 0xF000) >> 12 == 0x1 || @@ -1181,8 +1175,7 @@ public static class Ata if(ataIdentify.CommandSet.HasFlag(Identify.CommandSetBit.HPA)) ataOneValue.Add(ataIdentify.EnabledCommandSet.HasFlag(Identify.CommandSetBit.HPA) - ? "Host Protected Area is supported and enabled" - : "Host Protected Area is supported"); + ? "Host Protected Area is supported and enabled" : "Host Protected Area is supported"); if(ataIdentify.CommandSet.HasFlag(Identify.CommandSetBit.DeviceReset)) ataOneValue.Add(ataIdentify.EnabledCommandSet.HasFlag(Identify.CommandSetBit.DeviceReset) @@ -1269,8 +1262,7 @@ public static class Ata : "Power-up in standby is supported"); if(ataIdentify.CommandSet2.HasFlag(Identify.CommandSetBit2.RemovableNotification)) - ataOneValue.Add(ataIdentify.EnabledCommandSet2.HasFlag(Identify.CommandSetBit2. - RemovableNotification) + ataOneValue.Add(ataIdentify.EnabledCommandSet2.HasFlag(Identify.CommandSetBit2.RemovableNotification) ? "Removable Media Status Notification is supported and enabled" : "Removable Media Status Notification is supported"); @@ -1405,8 +1397,7 @@ public static class Ata if(ataIdentify.CommandSet4.HasFlag(Identify.CommandSetBit4.WRV)) { ataOneValue.Add(ataIdentify.EnabledCommandSet4.HasFlag(Identify.CommandSetBit4.WRV) - ? "Write/Read/Verify is supported and enabled" - : "Write/Read/Verify is supported"); + ? "Write/Read/Verify is supported and enabled" : "Write/Read/Verify is supported"); ataOneValue.Add($"{ataIdentify.WRVSectorCountMode2} sectors for Write/Read/Verify mode 2"); ataOneValue.Add($"{ataIdentify.WRVSectorCountMode3} sectors for Write/Read/Verify mode 3"); @@ -1528,14 +1519,12 @@ public static class Ata : "DMA Setup auto-activation is supported"); if(ataIdentify.SATAFeatures.HasFlag(Identify.SATAFeaturesBit.InitPowerMgmt)) - ataOneValue.Add(ataIdentify.EnabledSATAFeatures.HasFlag(Identify.SATAFeaturesBit. - InitPowerMgmt) + ataOneValue.Add(ataIdentify.EnabledSATAFeatures.HasFlag(Identify.SATAFeaturesBit.InitPowerMgmt) ? "Device-initiated power management is supported and enabled" : "Device-initiated power management is supported"); if(ataIdentify.SATAFeatures.HasFlag(Identify.SATAFeaturesBit.InOrderData)) - ataOneValue.Add(ataIdentify.EnabledSATAFeatures.HasFlag(Identify.SATAFeaturesBit. - InOrderData) + ataOneValue.Add(ataIdentify.EnabledSATAFeatures.HasFlag(Identify.SATAFeaturesBit.InOrderData) ? "In-order data delivery is supported and enabled" : "In-order data delivery is supported"); @@ -1687,16 +1676,14 @@ public static class Ata } if(ataReport.ReadCapabilities.PhysicalBlockSize != null) - ataTwoValue.Add("Physical sector size", - $"{ataReport.ReadCapabilities.PhysicalBlockSize} bytes"); + ataTwoValue.Add("Physical sector size", $"{ataReport.ReadCapabilities.PhysicalBlockSize} bytes"); if(ataReport.ReadCapabilities.LongBlockSize != null) ataTwoValue.Add("READ LONG sector size", $"{ataReport.ReadCapabilities.LongBlockSize} bytes"); - if(ataReport.ReadCapabilities.BlockSize != null && + if(ataReport.ReadCapabilities.BlockSize != null && ataReport.ReadCapabilities.PhysicalBlockSize != null && - ataReport.ReadCapabilities.BlockSize.Value != - ataReport.ReadCapabilities.PhysicalBlockSize.Value && + ataReport.ReadCapabilities.BlockSize.Value != ataReport.ReadCapabilities.PhysicalBlockSize.Value && (ataReport.ReadCapabilities.LogicalAlignment & 0x8000) == 0x0000 && (ataReport.ReadCapabilities.LogicalAlignment & 0x4000) == 0x4000) ataOneValue. @@ -1727,8 +1714,7 @@ public static class Ata else if(ataReport.ReadCapabilities.CHS != null) { int currentSectors = ataReport.ReadCapabilities.CHS.Cylinders * - ataReport.ReadCapabilities.CHS.Heads * - ataReport.ReadCapabilities.CHS.Sectors; + ataReport.ReadCapabilities.CHS.Heads * ataReport.ReadCapabilities.CHS.Sectors; ataTwoValue.Add("Cylinders", $"{ataReport.ReadCapabilities.CHS.Cylinders}"); ataTwoValue.Add("Heads", $"{ataReport.ReadCapabilities.CHS.Heads}"); @@ -1774,12 +1760,10 @@ public static class Ata if(ata1 || cfa) { if(ataReport.ReadCapabilities.UnformattedBPT > 0) - ataTwoValue.Add("Bytes per unformatted track", - $"{ataReport.ReadCapabilities.UnformattedBPT}"); + ataTwoValue.Add("Bytes per unformatted track", $"{ataReport.ReadCapabilities.UnformattedBPT}"); if(ataReport.ReadCapabilities.UnformattedBPS > 0) - ataTwoValue.Add("Bytes per unformatted sector", - $"{ataReport.ReadCapabilities.UnformattedBPS}"); + ataTwoValue.Add("Bytes per unformatted sector", $"{ataReport.ReadCapabilities.UnformattedBPS}"); } } diff --git a/Aaru.Server/Core/ScsiInquiry.cs b/Aaru.Server/Core/ScsiInquiry.cs index 14cd73df..fce36bb1 100644 --- a/Aaru.Server/Core/ScsiInquiry.cs +++ b/Aaru.Server/Core/ScsiInquiry.cs @@ -2024,8 +2024,7 @@ internal static class ScsiInquiry break; case 0x1622: - scsiOneValue. - Add("Device complies with ATA/ATAPI-8 ATA8-AST Serial Transport (no version claimed)"); + scsiOneValue.Add("Device complies with ATA/ATAPI-8 ATA8-AST Serial Transport (no version claimed)"); break; case 0x1623: @@ -2038,8 +2037,7 @@ internal static class ScsiInquiry break; case 0x162A: - scsiOneValue. - Add("Device complies with ATA/ATAPI-8 ATA8-ACS ANSI INCITS 452-2009 w/ Amendment 1"); + scsiOneValue.Add("Device complies with ATA/ATAPI-8 ATA8-ACS ANSI INCITS 452-2009 w/ Amendment 1"); break; case 0x1728: @@ -2051,8 +2049,7 @@ internal static class ScsiInquiry break; case 0x1730: - scsiOneValue. - Add("Device complies with USB Mass Storage Class Bulk-Only Transport, Revision 1.0"); + scsiOneValue.Add("Device complies with USB Mass Storage Class Bulk-Only Transport, Revision 1.0"); break; case 0x1740: diff --git a/Aaru.Server/Core/ScsiMmcFeatures.cs b/Aaru.Server/Core/ScsiMmcFeatures.cs index 3f3e4fd5..7c8b2c3f 100644 --- a/Aaru.Server/Core/ScsiMmcFeatures.cs +++ b/Aaru.Server/Core/ScsiMmcFeatures.cs @@ -299,8 +299,7 @@ public static class ScsiMmcFeatures break; default: - mmcOneValue. - Add($"Drive uses an unknown interface with code {(uint)ftr.PhysicalInterfaceStandard}"); + mmcOneValue.Add($"Drive uses an unknown interface with code {(uint)ftr.PhysicalInterfaceStandard}"); break; } diff --git a/Aaru.Server/Core/ScsiMmcMode.cs b/Aaru.Server/Core/ScsiMmcMode.cs index 8977cc8f..7ef1b930 100644 --- a/Aaru.Server/Core/ScsiMmcMode.cs +++ b/Aaru.Server/Core/ScsiMmcMode.cs @@ -117,8 +117,7 @@ public static class ScsiMmcMode } else { - mmcOneValue.Add(mode.LockState - ? "Drive is locked, media cannot be ejected, but if empty, can be inserted" + mmcOneValue.Add(mode.LockState ? "Drive is locked, media cannot be ejected, but if empty, can be inserted" : "Drive is not locked, media can be ejected and inserted"); } @@ -194,8 +193,8 @@ public static class ScsiMmcMode } if(mode.WriteSpeedPerformanceDescriptors != null) - foreach(ModePage_2A_WriteDescriptor descriptor in - mode.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0)) + foreach(ModePage_2A_WriteDescriptor descriptor in mode.WriteSpeedPerformanceDescriptors.Where(descriptor => + descriptor.WriteSpeed > 0)) if(descriptor.RotationControl == 0) mmcOneValue.Add($"Drive supports writing at {descriptor.WriteSpeed} Kbyte/sec. in CLV mode"); else if(descriptor.RotationControl == 1) diff --git a/Aaru.Server/Core/ScsiModeSense.cs b/Aaru.Server/Core/ScsiModeSense.cs index 634e043b..e75df822 100644 --- a/Aaru.Server/Core/ScsiModeSense.cs +++ b/Aaru.Server/Core/ScsiModeSense.cs @@ -409,9 +409,8 @@ public static class ScsiModeSense } default: { - modePages. - Add(page.subpage != 0 ? $"MODE page {page.page:X2}h subpage {page.subpage:X2}h" : $"MODE page {page.page:X2}h", - "Unknown mode page"); + modePages.Add(page.subpage != 0 ? $"MODE page {page.page:X2}h subpage {page.subpage:X2}h" : $"MODE page {page.page:X2}h", + "Unknown mode page"); } break; diff --git a/Aaru.Server/Core/StatsConverter.cs b/Aaru.Server/Core/StatsConverter.cs index 783f28e1..b7402a90 100644 --- a/Aaru.Server/Core/StatsConverter.cs +++ b/Aaru.Server/Core/StatsConverter.cs @@ -47,7 +47,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "fs-info"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Analyze, Name = "fs-info" @@ -61,7 +61,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "benchmark"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Benchmark, Name = "benchmark" @@ -75,7 +75,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "checksum"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Checksum, Name = "checksum" @@ -89,7 +89,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "compare"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Compare, Name = "compare" @@ -103,7 +103,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "create-sidecar"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.CreateSidecar, Name = "create-sidecar" @@ -117,7 +117,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "decode"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Decode, Name = "decode" @@ -131,7 +131,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "device-info"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.DeviceInfo, Name = "device-info" @@ -145,7 +145,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "device-report"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.DeviceReport, Name = "device-report" @@ -159,7 +159,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "dump-media"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.DumpMedia, Name = "dump-media" @@ -173,7 +173,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "entropy"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Entropy, Name = "entropy" @@ -187,7 +187,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "formats"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Formats, Name = "formats" @@ -201,7 +201,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "media-info"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.MediaInfo, Name = "media-info" @@ -215,7 +215,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "media-scan"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.MediaScan, Name = "media-scan" @@ -229,7 +229,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "printhex"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.PrintHex, Name = "printhex" @@ -243,7 +243,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "verify"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Verify, Name = "verify" @@ -257,7 +257,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "ls"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.Ls, Name = "ls" @@ -271,7 +271,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "extract-files"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.ExtractFiles, Name = "extract-files" @@ -285,7 +285,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "list-devices"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.ListDevices, Name = "list-devices" @@ -299,7 +299,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "list-encodings"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.ListEncodings, Name = "list-encodings" @@ -313,7 +313,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "convert-image"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.ConvertImage, Name = "convert-image" @@ -327,7 +327,7 @@ public static class StatsConverter Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "image-info"); if(existing == null) - ctx.Commands.Add(new() + ctx.Commands.Add(new Command { Count = newStats.Commands.ImageInfo, Name = "image-info" @@ -349,7 +349,7 @@ public static class StatsConverter c.Version == operatingSystem.version); if(existing == null) - ctx.OperatingSystems.Add(new() + ctx.OperatingSystems.Add(new OperatingSystem { Count = operatingSystem.Value, Name = operatingSystem.name, @@ -361,11 +361,10 @@ public static class StatsConverter } else { - OperatingSystem existing = - ctx.OperatingSystems.FirstOrDefault(c => c.Name == "Linux" && c.Version == null); + OperatingSystem existing = ctx.OperatingSystems.FirstOrDefault(c => c.Name == "Linux" && c.Version == null); if(existing == null) - ctx.OperatingSystems.Add(new() + ctx.OperatingSystems.Add(new OperatingSystem { Count = 1, Name = "Linux" @@ -384,7 +383,7 @@ public static class StatsConverter Version existing = ctx.Versions.FirstOrDefault(c => c.Name == nvs.name); if(existing == null) - ctx.Versions.Add(new() + ctx.Versions.Add(new Version { Count = nvs.Value, Name = nvs.name @@ -398,7 +397,7 @@ public static class StatsConverter Version existing = ctx.Versions.FirstOrDefault(c => c.Name == "previous"); if(existing == null) - ctx.Versions.Add(new() + ctx.Versions.Add(new Version { Count = 1, Name = "previous" @@ -416,7 +415,7 @@ public static class StatsConverter Filesystem existing = ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name); if(existing == null) - ctx.Filesystems.Add(new() + ctx.Filesystems.Add(new Filesystem { Count = nvs.Value, Name = nvs.name @@ -434,7 +433,7 @@ public static class StatsConverter Partition existing = ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name); if(existing == null) - ctx.Partitions.Add(new() + ctx.Partitions.Add(new Partition { Count = nvs.Value, Name = nvs.name @@ -452,7 +451,7 @@ public static class StatsConverter MediaFormat existing = ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name); if(existing == null) - ctx.MediaFormats.Add(new() + ctx.MediaFormats.Add(new MediaFormat { Count = nvs.Value, Name = nvs.name @@ -470,7 +469,7 @@ public static class StatsConverter Filter existing = ctx.Filters.FirstOrDefault(c => c.Name == nvs.name); if(existing == null) - ctx.Filters.Add(new() + ctx.Filters.Add(new Filter { Count = nvs.Value, Name = nvs.name @@ -480,15 +479,13 @@ public static class StatsConverter } if(newStats.Devices != null) - foreach(DeviceStats device in newStats.Devices. - Where(device => !string.IsNullOrWhiteSpace(device.Model)). + foreach(DeviceStats device in newStats.Devices.Where(device => !string.IsNullOrWhiteSpace(device.Model)). Where(device => !ctx.DeviceStats.Any(c => c.Bus == device.Bus && - c.Manufacturer == - device.Manufacturer && - c.Model == device.Model && + c.Manufacturer == device.Manufacturer && + c.Model == device.Model && c.Revision == device.Revision))) { - ctx.DeviceStats.Add(new() + ctx.DeviceStats.Add(new DeviceStat { Bus = device.Bus, Manufacturer = device.Manufacturer, @@ -506,7 +503,7 @@ public static class StatsConverter Media existing = ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real); if(existing == null) - ctx.Medias.Add(new() + ctx.Medias.Add(new Media { Count = media.Value, Real = media.real, diff --git a/Aaru.Server/Core/TestedMedia.cs b/Aaru.Server/Core/TestedMedia.cs index 7a556021..21d1d3cb 100644 --- a/Aaru.Server/Core/TestedMedia.cs +++ b/Aaru.Server/Core/TestedMedia.cs @@ -349,8 +349,7 @@ public static class TestedMedia mediaOneValue.Add("Device can read the P to Q subchannels from this medium"); if(testedMedia.CanReadPQSubchannelWithC2 == true) - mediaOneValue. - Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers"); + mediaOneValue.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers"); if(testedMedia.CanReadPRI == true) mediaOneValue.Add("Device can read the Pre-Recorded Information from this medium"); @@ -359,8 +358,7 @@ public static class TestedMedia mediaOneValue.Add("Device can read the R to W subchannels from this medium"); if(testedMedia.CanReadRWSubchannelWithC2 == true) - mediaOneValue. - Add("Device can read the R to W subchannels from this medium reporting the C2 pointers"); + mediaOneValue.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers"); if(testedMedia.CanReadRecordablePFI == true) mediaOneValue.Add("Device can read the Physical Format Information from Lead-In from this medium"); diff --git a/Aaru.Server/Globals.cs b/Aaru.Server/Globals.cs index 38729b15..7cb09f46 100644 --- a/Aaru.Server/Globals.cs +++ b/Aaru.Server/Globals.cs @@ -5,6 +5,4 @@ global using System.Linq; global using Microsoft.AspNetCore.Authorization; global using Microsoft.AspNetCore.Mvc; global using Microsoft.EntityFrameworkCore; -global using System.Threading.Tasks; - - +global using System.Threading.Tasks; \ No newline at end of file diff --git a/Aaru.Server/Models/Context.cs b/Aaru.Server/Models/Context.cs index d09eeeca..8cfc77cb 100644 --- a/Aaru.Server/Models/Context.cs +++ b/Aaru.Server/Models/Context.cs @@ -105,9 +105,8 @@ public sealed class AaruServerContext : IdentityDbContext HasForeignKey("ScsiModeId").OnDelete(DeleteBehavior.Cascade)); modelBuilder.Entity("Aaru.CommonTypes.Metadata.DensityCode", - b => b.HasOne("Aaru.CommonTypes.Metadata.SscSupportedMedia", null). - WithMany("DensityCodes").HasForeignKey("SscSupportedMediaId"). - OnDelete(DeleteBehavior.Cascade)); + b => b.HasOne("Aaru.CommonTypes.Metadata.SscSupportedMedia", null).WithMany("DensityCodes"). + HasForeignKey("SscSupportedMediaId").OnDelete(DeleteBehavior.Cascade)); modelBuilder.Entity("Aaru.CommonTypes.Metadata.Mmc", b => b.HasOne("Aaru.CommonTypes.Metadata.MmcFeatures", "Features").WithMany(). @@ -191,8 +190,8 @@ public sealed class AaruServerContext : IdentityDbContext b.HasOne("Aaru.CommonTypes.Metadata.FireWire", "FireWire").WithMany().HasForeignKey("FireWireId"). OnDelete(DeleteBehavior.SetNull); - b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "MultiMediaCard").WithMany(). - HasForeignKey("MultiMediaCardId").OnDelete(DeleteBehavior.SetNull); + b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "MultiMediaCard").WithMany().HasForeignKey("MultiMediaCardId"). + OnDelete(DeleteBehavior.SetNull); b.HasOne("Aaru.CommonTypes.Metadata.Pcmcia", "PCMCIA").WithMany().HasForeignKey("PCMCIAId"). OnDelete(DeleteBehavior.SetNull); @@ -200,16 +199,16 @@ public sealed class AaruServerContext : IdentityDbContext b.HasOne("Aaru.CommonTypes.Metadata.Scsi", "SCSI").WithMany().HasForeignKey("SCSIId"). OnDelete(DeleteBehavior.SetNull); - b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "SecureDigital").WithMany(). - HasForeignKey("SecureDigitalId").OnDelete(DeleteBehavior.SetNull); + b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "SecureDigital").WithMany().HasForeignKey("SecureDigitalId"). + OnDelete(DeleteBehavior.SetNull); b.HasOne("Aaru.CommonTypes.Metadata.Usb", "USB").WithMany().HasForeignKey("USBId"). OnDelete(DeleteBehavior.SetNull); }); modelBuilder.Entity("Aaru.Server.Models.DeviceStat", - b => b.HasOne("Aaru.Server.Models.Device", "Report").WithMany(). - HasForeignKey("ReportId").OnDelete(DeleteBehavior.SetNull)); + b => b.HasOne("Aaru.Server.Models.Device", "Report").WithMany().HasForeignKey("ReportId"). + OnDelete(DeleteBehavior.SetNull)); modelBuilder.Entity("Aaru.Server.Models.UploadedReport", b => { @@ -222,8 +221,8 @@ public sealed class AaruServerContext : IdentityDbContext b.HasOne("Aaru.CommonTypes.Metadata.FireWire", "FireWire").WithMany().HasForeignKey("FireWireId"). OnDelete(DeleteBehavior.SetNull); - b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "MultiMediaCard").WithMany(). - HasForeignKey("MultiMediaCardId").OnDelete(DeleteBehavior.SetNull); + b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "MultiMediaCard").WithMany().HasForeignKey("MultiMediaCardId"). + OnDelete(DeleteBehavior.SetNull); b.HasOne("Aaru.CommonTypes.Metadata.Pcmcia", "PCMCIA").WithMany().HasForeignKey("PCMCIAId"). OnDelete(DeleteBehavior.SetNull); @@ -231,8 +230,8 @@ public sealed class AaruServerContext : IdentityDbContext b.HasOne("Aaru.CommonTypes.Metadata.Scsi", "SCSI").WithMany().HasForeignKey("SCSIId"). OnDelete(DeleteBehavior.SetNull); - b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "SecureDigital").WithMany(). - HasForeignKey("SecureDigitalId").OnDelete(DeleteBehavior.SetNull); + b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "SecureDigital").WithMany().HasForeignKey("SecureDigitalId"). + OnDelete(DeleteBehavior.SetNull); b.HasOne("Aaru.CommonTypes.Metadata.Usb", "USB").WithMany().HasForeignKey("USBId"). OnDelete(DeleteBehavior.SetNull); diff --git a/Aaru.Server/Models/Device.cs b/Aaru.Server/Models/Device.cs index 10622a89..e0821da8 100644 --- a/Aaru.Server/Models/Device.cs +++ b/Aaru.Server/Models/Device.cs @@ -60,10 +60,9 @@ public class Device : DeviceReportV2 GdRomSwapDiscCapabilities = report.GdRomSwapDiscCapabilities; } - public Device(int? ataId, int? atapiId, int? firewireId, int? multimediacardId, int? pcmciaId, - int? securedigitalId, int? scsiId, int? usbId, DateTime uploadedWhen, string manufacturer, - string model, string revision, bool compactFlash, DeviceType type, - int? gdRomSwapDiscCapabilitiesId) + public Device(int? ataId, int? atapiId, int? firewireId, int? multimediacardId, int? pcmciaId, int? securedigitalId, + int? scsiId, int? usbId, DateTime uploadedWhen, string manufacturer, string model, string revision, + bool compactFlash, DeviceType type, int? gdRomSwapDiscCapabilitiesId) { ATAId = ataId; ATAPIId = atapiId; diff --git a/Aaru.Server/Program.cs b/Aaru.Server/Program.cs index e275b9bf..bdf0325a 100644 --- a/Aaru.Server/Program.cs +++ b/Aaru.Server/Program.cs @@ -77,8 +77,9 @@ public sealed class Program builder.Services.AddDbContext(options => options. UseMySql(builder.Configuration.GetConnectionString("DefaultConnection"), - new MariaDbServerVersion(new System. - Version(10, 4, 0))). + new + MariaDbServerVersion(new System. + Version(10, 4, 0))). UseLazyLoadingProxies()); builder.Services.AddDefaultIdentity(options => diff --git a/Aaru.Server/Properties/launchSettings.json b/Aaru.Server/Properties/launchSettings.json index f6ef8732..0a557df9 100644 --- a/Aaru.Server/Properties/launchSettings.json +++ b/Aaru.Server/Properties/launchSettings.json @@ -1,24 +1,24 @@ { "iisSettings": { - "windowsAuthentication": false, + "windowsAuthentication" : false, "anonymousAuthentication": true, - "iisExpress": { + "iisExpress" : { "applicationUrl": "http://localhost:62005", - "sslPort": 44393 + "sslPort" : 44393 } }, - "profiles": { + "profiles" : { "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, + "commandName" : "IISExpress", + "launchBrowser" : true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, "Aaru.Server": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:5000", + "commandName" : "Project", + "launchBrowser" : true, + "applicationUrl" : "http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/Aaru.Server/SecurityHeadersMiddleware.cs b/Aaru.Server/SecurityHeadersMiddleware.cs index 68d414ac..edef255a 100644 --- a/Aaru.Server/SecurityHeadersMiddleware.cs +++ b/Aaru.Server/SecurityHeadersMiddleware.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Primitives; namespace Aaru.Server; @@ -12,19 +13,19 @@ public sealed class SecurityHeadersMiddleware { // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy // TODO Change the value depending of your needs - context.Response.Headers.Add("referrer-policy", new("strict-origin-when-cross-origin")); + context.Response.Headers.Add("referrer-policy", new StringValues("strict-origin-when-cross-origin")); // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options - context.Response.Headers.Add("x-content-type-options", new("nosniff")); + context.Response.Headers.Add("x-content-type-options", new StringValues("nosniff")); // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options - context.Response.Headers.Add("x-frame-options", new("DENY")); + context.Response.Headers.Add("x-frame-options", new StringValues("DENY")); // https://security.stackexchange.com/questions/166024/does-the-x-permitted-cross-domain-policies-header-have-any-benefit-for-my-websit - context.Response.Headers.Add("X-Permitted-Cross-Domain-Policies", new("none")); + context.Response.Headers.Add("X-Permitted-Cross-Domain-Policies", new StringValues("none")); // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection - context.Response.Headers.Add("x-xss-protection", new("1; mode=block")); + context.Response.Headers.Add("x-xss-protection", new StringValues("1; mode=block")); // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy // https://github.com/w3c/webappsec-feature-policy/blob/master/features.md diff --git a/Aaru.Server/appsettings.Development.json b/Aaru.Server/appsettings.Development.json index 19c8f3a7..424a156b 100644 --- a/Aaru.Server/appsettings.Development.json +++ b/Aaru.Server/appsettings.Development.json @@ -1,11 +1,11 @@ { - "ConnectionStrings": { - "DefaultConnection": "server=zeus.claunia.com;port=3306;database=discimagechef;uid=dic;password=dicpass" + "ConnectionStrings" : { + "DefaultConnection": "server=localhost;port=3306;database=discimagechef;uid=dic;password=dicpass" }, - "Logging": { + "Logging" : { "LogLevel": { - "Default": "Debug", - "System": "Information", + "Default" : "Debug", + "System" : "Information", "Microsoft": "Information" } }, diff --git a/Aaru.Server/appsettings.json b/Aaru.Server/appsettings.json index 5acea4cd..b3d9c672 100644 --- a/Aaru.Server/appsettings.json +++ b/Aaru.Server/appsettings.json @@ -1,8 +1,8 @@ { - "Logging": { + "Logging" : { "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", + "Default" : "Information", + "Microsoft" : "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, diff --git a/Aaru.Server/docs/CODE_OF_CONDUCT.md b/Aaru.Server/docs/CODE_OF_CONDUCT.md index 95199aa1..918ab68c 100644 --- a/Aaru.Server/docs/CODE_OF_CONDUCT.md +++ b/Aaru.Server/docs/CODE_OF_CONDUCT.md @@ -2,17 +2,14 @@ ## Our Pledge -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -education, socio-economic status, nationality, personal appearance, race, -religion, or sexual identity and orientation. +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making +participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, +disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards -Examples of behavior that contributes to creating a positive environment -include: +Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences @@ -22,52 +19,42 @@ include: Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances +* The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take +appropriate and fair corrective action in response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, +issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the +project or its community. Examples of representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed representative at an online or offline +event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at [claunia@claunia.com](mailto:claunia@claunia.com). All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team +at [claunia@claunia.com](mailto:claunia@claunia.com). All complaints will be reviewed and investigated and will result +in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain +confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be +posted separately. -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent +repercussions as determined by other members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available +at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org diff --git a/Aaru.Server/docs/CONTRIBUTING.md b/Aaru.Server/docs/CONTRIBUTING.md index da6f7f5a..7bcded23 100644 --- a/Aaru.Server/docs/CONTRIBUTING.md +++ b/Aaru.Server/docs/CONTRIBUTING.md @@ -2,9 +2,8 @@ :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: -The following is a set of guidelines for contributing to Aaru and its modules. -These are mostly guidelines, not rules. Use your best judgment, and feel free to propose -changes to this document in a pull request. +The following is a set of guidelines for contributing to Aaru and its modules. These are mostly guidelines, not rules. +Use your best judgment, and feel free to propose changes to this document in a pull request. #### Table Of Contents @@ -13,9 +12,11 @@ changes to this document in a pull request. [I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) [What should I know before I get started?](#what-should-i-know-before-i-get-started) + * [Aaru and modules](#aaru-and-modules) [How Can I Contribute?](#how-can-i-contribute) + * [Reporting Devices](#reporting-devices) * [Reporting Bugs](#reporting-bugs) * [Suggesting Enhancements](#suggesting-enhancements) @@ -26,19 +27,19 @@ changes to this document in a pull request. * [Providing information](#needed-information) [Styleguides](#styleguides) + * [Git Commit Messages](#git-commit-messages) * [Code Styleguide](#code-styleguide) ## Code of Conduct This project and everyone participating in it is governed by the -[Aaru Code of Conduct](.github/CODE_OF_CONDUCT.md). By participating, you are expected -to uphold this code. Please report unacceptable behavior to [claunia@claunia.com](mailto:claunia@claunia.com). +[Aaru Code of Conduct](.github/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please +report unacceptable behavior to [claunia@claunia.com](mailto:claunia@claunia.com). ## I don't want to read this whole thing I just have a question!!! -> **Note:** Please don't file an issue to ask a question. You'll get faster results by -using the resources below. +> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below. You can join our IRC channel on chat.freenode.net at channel #Aaru @@ -46,179 +47,165 @@ You can join our IRC channel on chat.freenode.net at channel #Aaru ### Aaru and modules -Aaru is a large open source project — it's made up of 18 modules. When you initially consider contributing to Aaru, you might be unsure about which of those modules implements the functionality you want to change or report a bug for. This section should help you with that. +Aaru is a large open source project — it's made up of 18 modules. When you initially consider contributing to +Aaru, you might be unsure about which of those modules implements the functionality you want to change or report a bug +for. This section should help you with that. Aaru is intentionally very modular. Here's a list of them: -* [Claunia.RsrcFork](https://github.com/claunia/Claunia.RsrcFork) - - This library includes code for handling Mac OS resource forks, and decoding them, so any - code related to Mac OS resource forks should be added here. -* [Claunia.Encoding](https://github.com/claunia/Claunia.Encoding) - - This library includes code for converting codepages not supported by .NET, like those used - by ancient operating systems, to/from UTF-8. -* [plist-cil](https://github.com/claunia/plist-cil) - - This library includes code for handling Apple property lists. -* [SharpCompress](https://github.com/adamhathcock/sharpcompress) - - This library includes code for handling compression algorithms and compressed archives. Any - need you have of compression or decompression should be handled with this library, and any new algorithm should be added here. -* [Aaru](https://github.com/aaru-dps/Aaru/tree/master/Aaru) - - This module contains the command line interface. In the future a GUI will be added. -* [AaruRemote](https://github.com/aaru-dps/aaruremote) - - Standalone small application designed to run on older machines where Aaru does not run to allow device commands to be executed remotely. -* [Aaru.Checksums](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Checksums) - - This module contains the checksum, hashing and error correction algorithms. -* [Aaru.CommonTypes](https://github.com/aaru-dps/Aaru.CommonTypes) - - This module contains interfaces, structures and enumerations needed by more than one of the other modules. -* [Aaru.Console](https://github.com/aaru-dps/Aaru.Console) - - This module abstracts consoles used by other modules to output information, so they can be - redirected to a CLI or to a GUI output. -* [Aaru.Core](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Core) - - This module contains the implementation of the functions and commands that are called by the - user interface itself. -* [Aaru.Decoders](https://github.com/aaru-dps/Aaru.Decoders) - - This module contains internal disk, drive and protocol structures as well as code to marshal, - decode and print them. -* [Aaru.Devices](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Devices) - - This module contains code to talk with hardware devices in different platforms. Each platform - has lowlevel calls in its own folder, and each device protocol has highlevel calls in its own - folder. Device commands are separated by protocol standard, or vendor name. -* [Aaru.Device.Report](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Device.Report) - - This is a separate application in C89 designed to create device reports on enviroments where - you can't run .NET or Mono but can run Linux. -* [Aaru.DiscImages](https://github.com/aaru-dps/Aaru/tree/master/Aaru.DiscImages) - - This module provides reading capabilities for the disk/disc images, one per file. -* [Aaru.DiscImages](https://github.com/aaru-dps/Aaru.Dto) - - This module provides common structures between Aaru and Aaru.Server. -* [Aaru.Filesystems](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Filesystems) - - This module provides the filesystem support. If only identification is implemented a single - file should be used. For full read-only support, a folder should be used. -* [Aaru.Filters](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Filters) - - A filter is a modification of the data before it can be passed to the disk image module - (compression, fork union, etc), and this module provides support for them. If a image is - compressed, say in gzip, or encoded, say in AppleDouble, a filter is the responsible of - decompressing or decoding it on-the-fly. -* [Aaru.Helpers](https://github.com/aaru-dps/Aaru.Helpers) - - This module contains a collection of helpers for array manipulation, big-endian marshalling, - datetime conversion, hexadecimal printing, string manipulation and byte swapping. -* [Aaru.Partitions](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Partitions) - - This module contains code for reading partition schemes. -* [Aaru.Server](https://github.com/aaru-dps/Aaru.Server) - - This module contains the server-side code that's running at https://www.aaru.app -* [Aaru.Settings](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Settings) - - This module contains code for handling Aaru settings. -* [Aaru.Tests](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Tests) - - This module contains the unit tests for the rest of the modules. You should add new unit - tests here but cannot run all of them because the test images they require amount to more - than 100GiB. -* [Aaru.Tests.Devices](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Tests.Devices) - - This module presents a menu driven interface to send commands to devices, as a way to test - the Core module, as those tests cannot be automated. It can be used to debug drive responses. +* [Claunia.RsrcFork](https://github.com/claunia/Claunia.RsrcFork) - This library includes code for handling Mac OS + resource forks, and decoding them, so any code related to Mac OS resource forks should be added here. +* [Claunia.Encoding](https://github.com/claunia/Claunia.Encoding) - This library includes code for converting codepages + not supported by .NET, like those used by ancient operating systems, to/from UTF-8. +* [plist-cil](https://github.com/claunia/plist-cil) - This library includes code for handling Apple property lists. +* [SharpCompress](https://github.com/adamhathcock/sharpcompress) - This library includes code for handling compression + algorithms and compressed archives. Any need you have of compression or decompression should be handled with this + library, and any new algorithm should be added here. +* [Aaru](https://github.com/aaru-dps/Aaru/tree/master/Aaru) - This module contains the command line interface. In the + future a GUI will be added. +* [AaruRemote](https://github.com/aaru-dps/aaruremote) - Standalone small application designed to run on older machines + where Aaru does not run to allow device commands to be executed remotely. +* [Aaru.Checksums](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Checksums) - This module contains the checksum, + hashing and error correction algorithms. +* [Aaru.CommonTypes](https://github.com/aaru-dps/Aaru.CommonTypes) - This module contains interfaces, structures and + enumerations needed by more than one of the other modules. +* [Aaru.Console](https://github.com/aaru-dps/Aaru.Console) - This module abstracts consoles used by other modules to + output information, so they can be redirected to a CLI or to a GUI output. +* [Aaru.Core](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Core) - This module contains the implementation of the + functions and commands that are called by the user interface itself. +* [Aaru.Decoders](https://github.com/aaru-dps/Aaru.Decoders) - This module contains internal disk, drive and protocol + structures as well as code to marshal, decode and print them. +* [Aaru.Devices](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Devices) - This module contains code to talk with + hardware devices in different platforms. Each platform has lowlevel calls in its own folder, and each device protocol + has highlevel calls in its own folder. Device commands are separated by protocol standard, or vendor name. +* [Aaru.Device.Report](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Device.Report) - This is a separate application + in C89 designed to create device reports on enviroments where you can't run .NET or Mono but can run Linux. +* [Aaru.DiscImages](https://github.com/aaru-dps/Aaru/tree/master/Aaru.DiscImages) - This module provides reading + capabilities for the disk/disc images, one per file. +* [Aaru.DiscImages](https://github.com/aaru-dps/Aaru.Dto) - This module provides common structures between Aaru and + Aaru.Server. +* [Aaru.Filesystems](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Filesystems) - This module provides the + filesystem support. If only identification is implemented a single file should be used. For full read-only support, a + folder should be used. +* [Aaru.Filters](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Filters) - A filter is a modification of the data + before it can be passed to the disk image module + (compression, fork union, etc), and this module provides support for them. If a image is compressed, say in gzip, or + encoded, say in AppleDouble, a filter is the responsible of decompressing or decoding it on-the-fly. +* [Aaru.Helpers](https://github.com/aaru-dps/Aaru.Helpers) - This module contains a collection of helpers for array + manipulation, big-endian marshalling, datetime conversion, hexadecimal printing, string manipulation and byte + swapping. +* [Aaru.Partitions](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Partitions) - This module contains code for + reading partition schemes. +* [Aaru.Server](https://github.com/aaru-dps/Aaru.Server) - This module contains the server-side code that's running + at https://www.aaru.app +* [Aaru.Settings](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Settings) - This module contains code for handling + Aaru settings. +* [Aaru.Tests](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Tests) - This module contains the unit tests for the + rest of the modules. You should add new unit tests here but cannot run all of them because the test images they + require amount to more than 100GiB. +* [Aaru.Tests.Devices](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Tests.Devices) - This module presents a menu + driven interface to send commands to devices, as a way to test the Core module, as those tests cannot be automated. It + can be used to debug drive responses. ## How Can I Contribute? ### Reporting Devices -Aaru tries to be as universal as possible. However some devices do not behave in -the expected ways, some media is unknown and needs to be known prior to enabling dumping of it, -etc. +Aaru tries to be as universal as possible. However some devices do not behave in the expected ways, some media is +unknown and needs to be known prior to enabling dumping of it, etc. -For that reason, Aaru includes the [device-report command](https://github.com/aaru-dps/Aaru/wiki/Reporting-physical-device-capabilities). -Using this command will guide you thru a series of questions about the device, and if it -contains removable media, for you to insert the different media you have, and create a report -of its abilities. The report will automatically be sent to our server and saved on your computer. -Please note that we do not store any personal information and when possible remove the drive -serial numbers from the report. +For that reason, Aaru includes +the [device-report command](https://github.com/aaru-dps/Aaru/wiki/Reporting-physical-device-capabilities). Using this +command will guide you thru a series of questions about the device, and if it contains removable media, for you to +insert the different media you have, and create a report of its abilities. The report will automatically be sent to our +server and saved on your computer. Please note that we do not store any personal information and when possible remove +the drive serial numbers from the report. -If you have a drive attached to a computer that you cannot run the full Aaru on it -but can compile a C89 application, you can use [AaruRemote](https://github.com/aaru-dps/aaruremote) +If you have a drive attached to a computer that you cannot run the full Aaru on it but can compile a C89 application, +you can use [AaruRemote](https://github.com/aaru-dps/aaruremote) and an ethernet connection between that machine and a machine that can run the full Aaru. ### Reporting Bugs -This section guides you through submitting a bug report for Aaru. Following these guidelines -helps maintainers and the community understand your report :pencil:, reproduce the -behavior :computer: :computer:, and find related reports :mag_right:. +This section guides you through submitting a bug report for Aaru. Following these guidelines helps maintainers and the +community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports : +mag_right:. -Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you -might find out that you don't need to create one. When you are creating a bug report, please +Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you +don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out -[the required template](.github/ISSUE_TEMPLATE.md), the information it asks for helps us resolve -issues faster. +[the required template](.github/ISSUE_TEMPLATE.md), the information it asks for helps us resolve issues faster. -> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're -experiencing, open a new issue and include a link to the original issue in the body of your -new one. +> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. #### Before Submitting A Bug Report -* **Check the [wiki](https://github.com/aaru-dps/Aaru/wiki)** for a list of common - questions and problems. +* **Check the [wiki](https://github.com/aaru-dps/Aaru/wiki)** for a list of common questions and problems. * **Determine [which module the problem should be reported in](#aaru-and-modules)**. * **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Aclaunia)** - to see if the problem has already been reported. If it has **and the issue is still open**, - add a comment to the existing issue instead of opening a new one. + to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the + existing issue instead of opening a new one. #### How Do I Submit A (Good) Bug Report? -Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After -you've determined [which module](#aaru-and-modules) your bug is related to, -create an issue on that repository and provide the following information by filling in +Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've +determined [which module](#aaru-and-modules) your bug is related to, create an issue on that repository and provide the +following information by filling in [the template](.github/ISSUE_TEMPLATE.md). Explain the problem and include additional details to help maintainers reproduce the problem: * **Use a clear and descriptive title** for the issue to identify the problem. -* **Describe the exact steps which reproduce the problem** in as many details as possible. - For example, start by explaining how you started Aaru, e.g. which command exactly - you used in the terminal. Also note that some device commands requires you to have - administrative privileges, be in a specific group, or be the root user, so try it again with - escalated privileges. -* **Provide specific examples to demonstrate the steps**. Include links to media images, - reports of the devices, or the output of using [Aaru.Tests.Devices](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Tests.Devices). -* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. +* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by + explaining how you started Aaru, e.g. which command exactly you used in the terminal. Also note that some device + commands requires you to have administrative privileges, be in a specific group, or be the root user, so try it again + with escalated privileges. +* **Provide specific examples to demonstrate the steps**. Include links to media images, reports of the devices, or the + output of using [Aaru.Tests.Devices](https://github.com/aaru-dps/Aaru/tree/master/Aaru.Tests.Devices). +* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that + behavior. * **Explain which behavior you expected to see instead and why.** * **Include a copy of the output in the terminal** enabling both verbose, using the `-v` command line parameter, and debug, using the `-d` command line parameter, outputs. -* **If you're reporting that Aaru crashed**, try doing the same with the debug - version and include a crash report with a stack trace. Include the crash report in the issue - in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a - [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), - or put it in a [gist](https://gist.github.com/) and provide link to that gist. -* **If the problem wasn't triggered by a specific action**, describe what you were doing - before the problem happened and share more information using the guidelines below. +* **If you're reporting that Aaru crashed**, try doing the same with the debug version and include a crash report with a + stack trace. Include the crash report in the issue in + a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a + [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), or put it in + a [gist](https://gist.github.com/) and provide link to that gist. +* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and + share more information using the guidelines below. Include details about your configuration and environment: * **Which version of Aaru are you using?** * **What's the name and version of the OS you're using**? -* **Are you running Aaru in a virtual machine?** If so, which VM software are you - using and which operating systems and versions are used for the host and the guest? -* **Are you trying to execute a device command?** If so, who manufactured the device, which - model is it, and how is it connected to the computer? +* **Are you running Aaru in a virtual machine?** If so, which VM software are you using and which operating systems and + versions are used for the host and the guest? +* **Are you trying to execute a device command?** If so, who manufactured the device, which model is it, and how is it + connected to the computer? ### Suggesting Enhancements -This section guides you through submitting an enhancement suggestion for Aaru, including -completely new features and minor improvements to existing functionality. Following these -guidelines helps maintainers and the community understand your suggestion :pencil: and find -related suggestions :mag_right:. +This section guides you through submitting an enhancement suggestion for Aaru, including completely new features and +minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand +your suggestion :pencil: and find related suggestions :mag_right:. -Before creating enhancement suggestions, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). -Fill in [the template](.github/ISSUE_TEMPLATE.md), including the steps that you imagine you would -take if the feature you're requesting existed. +Before creating enhancement suggestions, +please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill +in [the template](.github/ISSUE_TEMPLATE.md), including the steps that you imagine you would take if the feature you're +requesting existed. #### How Do I Submit A (Good) Enhancement Suggestion? -Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). -After you've determined [which module](#aaru-and-modules) your enhancement suggestion -is related to, create an issue on that repository and provide the following information: +Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've +determined [which module](#aaru-and-modules) your enhancement suggestion is related to, create an issue on that +repository and provide the following information: * **Use a clear and descriptive title** for the issue to identify the suggestion. -* **Provide a step-by-step description of the suggested enhancement** in as many details as - possible. -* **Provide specific examples to demonstrate the steps**. If the feature is about a media image, - filesystem, partitioning scheme, or filter, please include as many test files as possible, - and if applicable which software created them. +* **Provide a step-by-step description of the suggested enhancement** in as many details as possible. +* **Provide specific examples to demonstrate the steps**. If the feature is about a media image, filesystem, + partitioning scheme, or filter, please include as many test files as possible, and if applicable which software + created them. * **Describe the current behavior** and **explain which behavior you expected to see instead** and why. * **List some other applications where this enhancement exists.** * **Specify which version of Aaru you're using.** @@ -231,43 +218,46 @@ Unsure where to begin contributing to Aaru? You can start by looking through the * [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two. * [Help wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues. -Both issue lists are sorted by total number of comments. While not perfect, number of -comments is a reasonable proxy for impact a given change will have. +Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for +impact a given change will have. If you want to read about using Aaru, the [wiki](https://github.com/aaru-dps/Aaru/wiki) is available. -Do not modify the interfaces. If you need or want to, comment in an issue how and why you -want to change it and we'll discuss it. Same applies for creating new interfaces. +Do not modify the interfaces. If you need or want to, comment in an issue how and why you want to change it and we'll +discuss it. Same applies for creating new interfaces. -Aaru uses C# 7 language features (inline declaration, Tuples, etc.) so it can only -be compiled with [VisualStudio](http://www.visualstudio.com) 2017 or higher, [Xamarin Studio](https://www.xamarin.com/download) -7 or higher, [MonoDevelop](http://www.monodevelop.com) 7 or higher, or [JetBrains Rider](https://www.jetbrains.com/rider/) 2017.2 or higher. +Aaru uses C# 7 language features (inline declaration, Tuples, etc.) so it can only be compiled +with [VisualStudio](http://www.visualstudio.com) 2017 or higher, [Xamarin Studio](https://www.xamarin.com/download) +7 or higher, [MonoDevelop](http://www.monodevelop.com) 7 or higher, +or [JetBrains Rider](https://www.jetbrains.com/rider/) 2017.2 or higher. ### Pull Requests * Fill in [the required template](.github/PULL_REQUEST_TEMPLATE.md) * Do not include issue numbers in the PR title * Follow the [code styleguide](#code-styleguide). -* Include test files as applicable, that do not have software under copyright inside them, - if possible. +* Include test files as applicable, that do not have software under copyright inside them, if possible. * Document new code based using XML documentation wherever possible. * DO NOT end files with a newline. -* Avoid platform-dependent code, unless absolutely needed. Any call to a part of the - .NET framework that doesn't start with `System.` is probably platform-dependent. +* Avoid platform-dependent code, unless absolutely needed. Any call to a part of the .NET framework that doesn't start + with `System.` is probably platform-dependent. * Do not call libraries external to .NET. Only Interop calls to the operating system kernel - (that is `KERNEL32.DLL` in Windows and `libc` in others) will be accepted. If you need to - talk with a USB devices your pull request must implement calls both to `WinUsb` and `libusb`. + (that is `KERNEL32.DLL` in Windows and `libc` in others) will be accepted. If you need to talk with a USB devices your + pull request must implement calls both to `WinUsb` and `libusb`. ### Patronizing + If you want to donate money you can become a patron at https://www.patreon.com/claunia ### Donating + You may donate us one of the [devices we need](NEEDED.md). ### Needed information -If you have test images, imaging applications that generate formats we do not support, or -documentation about media dump formats, filesystems or partitioning schemes we do not -support, you can provide us with that information to add support for them. + +If you have test images, imaging applications that generate formats we do not support, or documentation about media dump +formats, filesystems or partitioning schemes we do not support, you can provide us with that information to add support +for them. ## Styleguides @@ -289,8 +279,7 @@ support, you can provide us with that information to add support for them. - Do not use `var` ever. - `else`, `while`, `catch` and `finally` should be on a new line. - If you know C apply a simple rule: Be as C as and as less C# or C++ as possible. -- If you will only store variables, use a struct. If you need it to be nullable, use a - nullable struct if applicable. +- If you will only store variables, use a struct. If you need it to be nullable, use a nullable struct if applicable. - Indent statements and cases. - Indent using 4 spaces (soft tab). - Instace and static fields should be lowerCamelCase. @@ -298,8 +287,7 @@ support, you can provide us with that information to add support for them. - Separate attributes. - Use 120 columns margins. - Use built-in keywords: `uint` instead of `UInt32`. -- Use expression bodies only for properties, indexes and events. For the rest use block - bodies. +- Use expression bodies only for properties, indexes and events. For the rest use block bodies. - Use implicit modifiers. - Use inline variable declaration. - Use struct implicit constructor. diff --git a/Aaru.Server/docs/ISSUE_TEMPLATE.md b/Aaru.Server/docs/ISSUE_TEMPLATE.md index 4b966bf0..0490f034 100644 --- a/Aaru.Server/docs/ISSUE_TEMPLATE.md +++ b/Aaru.Server/docs/ISSUE_TEMPLATE.md @@ -4,6 +4,7 @@ * [ ] Can you reproduce the problem in the debug version? ### Check and fill as appropriate: + * [ ] I was running Aaru under Windows [version here]... * [ ] I was running Aaru under Linux [version here]... * [ ] I was running Aaru under FreeBSD [version here]... @@ -23,9 +24,11 @@ `Aaru [command] [parameters]` ### Expected behavior: + [What you expected to happen] ### Actual behavior: + [What actually happened] ### If command was expected to work with a device fill this out: @@ -42,8 +45,9 @@ * [ ] PCMCIA * [ ] SecureDigital * [ ] MultiMediaCard - + ### Output of command execution with debug output enabled + ``` Paste the whole output of the executed command when you append '-d' to your command line parameters here ``` \ No newline at end of file diff --git a/Aaru.Server/docs/NEEDED.md b/Aaru.Server/docs/NEEDED.md index 28736cbd..89e0ac3d 100644 --- a/Aaru.Server/docs/NEEDED.md +++ b/Aaru.Server/docs/NEEDED.md @@ -1,16 +1,16 @@ -This is a list of hardware, software, and general information needed to expand and better support various unique hardware and -software configurations for Aaru. We accept donation of this hardware, or loans: paying for shipping is greatly appreciated, -but can make other arrangements depending on cost. For media, we do accept loans, but please be aware that due to it’s age, there is -no guarantee it will still be working after it is returned and thus donations are preferred. +This is a list of hardware, software, and general information needed to expand and better support various unique +hardware and software configurations for Aaru. We accept donation of this hardware, or loans: paying for shipping is +greatly appreciated, but can make other arrangements depending on cost. For media, we do accept loans, but please be +aware that due to it’s age, there is no guarantee it will still be working after it is returned and thus donations are +preferred. Drives ====== -This is a list of drives. The reason we need these drives is because it is the only way to add enhanced support for them (e.g. media -detection, ECC support, raw dumping, etc.). Also some drives depart from the specifications and need special workarounds. If a drive is -listed here, but the media it uses is not listed below, we already have media for it. Drives are preferred in ATA/ATAPI, SCSI, USB or -FireWire buses. Parallel port drives require a larger amount of work, and there is no guarantee it can work, at all, with other drives. If in -doubt, please contact us. - +This is a list of drives. The reason we need these drives is because it is the only way to add enhanced support for +them (e.g. media detection, ECC support, raw dumping, etc.). Also some drives depart from the specifications and need +special workarounds. If a drive is listed here, but the media it uses is not listed below, we already have media for it. +Drives are preferred in ATA/ATAPI, SCSI, USB or FireWire buses. Parallel port drives require a larger amount of work, +and there is no guarantee it can work, at all, with other drives. If in doubt, please contact us. - 5.25" magneto-optical (preferibly the 9.6Gb supporting one) - 8" shugart floppy drive (preferibly the 240VAC one) @@ -43,7 +43,9 @@ doubt, please contact us. Media ===== -This is the media for the drives listed above, or media for drives we do have, but lack and thus cannot test the actual hardware. +This is the media for the drives listed above, or media for drives we do have, but lack and thus cannot test the actual +hardware. + - 5.25" magneto-optical media: 128MiB - ADR tapes - AIT tapes @@ -72,9 +74,8 @@ This is the media for the drives listed above, or media for drives we do have, b Software ================== -This is a list of software whose physical media has some characteristics that needs -to be investigated to allow correct dumping of such characteristics. Usually those -are copy protections. +This is a list of software whose physical media has some characteristics that needs to be investigated to allow correct +dumping of such characteristics. Usually those are copy protections. - CD-i Ready - Accelerator diff --git a/Aaru.Server/docs/PULL_REQUEST_TEMPLATE.md b/Aaru.Server/docs/PULL_REQUEST_TEMPLATE.md index 8887e634..02daa28b 100644 --- a/Aaru.Server/docs/PULL_REQUEST_TEMPLATE.md +++ b/Aaru.Server/docs/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,7 @@ ## Types of changes + + - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] New filesystem, test images in [url] diff --git a/Aaru.Server/docs/README.md b/Aaru.Server/docs/README.md index 5c048dd7..4bba3c5a 100644 --- a/Aaru.Server/docs/README.md +++ b/Aaru.Server/docs/README.md @@ -11,16 +11,15 @@ Copyright © 2011-2021 Natalia Portillo You can see statistics and device reports [here](https://www.aaru.app/Stats) -Aaru is a fully featured media dump management solution. You usually know media dumps -as disc images, disk images, tape images, etc. +Aaru is a fully featured media dump management solution. You usually know media dumps as disc images, disk images, tape +images, etc. -With Aaru you can identify a media dump, extract files from it (for supported -filesystems), compare two of them, create them from real media using the appropriate drive, -create a sidecar metadata with information about the media dump, and a lot of other features -that commonly would require you to use separate applications. +With Aaru you can identify a media dump, extract files from it (for supported filesystems), compare two of them, create +them from real media using the appropriate drive, create a sidecar metadata with information about the media dump, and a +lot of other features that commonly would require you to use separate applications. -To see last changes, check the [changelog](Changelog.md). -To see list of pending things to do, check the [list of issues](https://github.com/aaru-dps/Aaru/issues). +To see last changes, check the [changelog](Changelog.md). To see list of pending things to do, check +the [list of issues](https://github.com/aaru-dps/Aaru/issues). If you want to contribute in any way please read the [contributing guide](CONTRIBUTING.md). @@ -29,8 +28,8 @@ Stable releases in [Github](https://github.com/aaru-dps/Aaru/releases). System requirements =================== -Aaru is created using .NET Core 3.1 and can be compiled with all the major IDEs. -To run it you require to use one of the stable releases, or build it yourself. +Aaru is created using .NET Core 3.1 and can be compiled with all the major IDEs. To run it you require to use one of the +stable releases, or build it yourself. Usage ===== @@ -43,7 +42,9 @@ Or read the [documentation](https://github.com/aaru-dps/Aaru.Documentation/blob/ Features ======== -* Identifies a disk image getting information about the disk itself and shows information about partitions and filesystems inside them + +* Identifies a disk image getting information about the disk itself and shows information about partitions and + filesystems inside them * Can checksum the disks (and if optical disc, separate tracks) user-data (tags and metadata coming soon) * Can compare two disk images, even different formats, for different sectors and/or metadata * Can list and extract contents from supported filesystems @@ -51,17 +52,20 @@ Features * Can read several known sector by sector formats with variable bytes per sector. * Can read standard sector by sector copies for optical and magnetic discs with constant bytes per sector. * Can verify sectors or disk images if supported by the underlying format -* Can dump media from ATA, ATAPI, SCSI, USB, FireWire and SDHCI drives (magnetic disks, optical discs, magnetoptical disks, flash devices, memory cards and tapes) to several supported image formats. +* Can dump media from ATA, ATAPI, SCSI, USB, FireWire and SDHCI drives (magnetic disks, optical discs, magnetoptical + disks, flash devices, memory cards and tapes) to several supported image formats. * Can convert between image formats. * Includes an open-source archival image format with compression and deduplication. * Can create standard open XML metadata from existing images. * Can measure readability and speed of media (same that can be dumped, MHDD style) * Has an online database with drive capabilities, and can report the capabilities of any drive. -* Works on any operating system and architecture where .NET Core is supported (drive access requires Windows, Linux or FreeBSD). +* Works on any operating system and architecture where .NET Core is supported (drive access requires Windows, Linux or + FreeBSD). * Has a graphical interface (work in progress) Supported disk image formats (read-only) ======================================== + * Apple Disk Archival/Retrieval Tool (DART) * Apple II nibble images (NIB) * BlindWrite 4 TOC files (.BWT/.BWI/.BWS) @@ -84,6 +88,7 @@ Supported disk image formats (read-only) Supported disk image formats (read and write) ============================================= + * Alcohol 120% Media Descriptor Structure (.MDS/.MDF) * Anex86 disk images (.FDI for floppies, .HDI for hard disks) * Any 512 bytes/sector disk image format (sector by sector copy, aka raw) @@ -121,6 +126,7 @@ Supported disk image formats (read and write) Supported partitioning schemes ============================== + * Acorn Linux and RISCiX partitions * ACT Apricot partitions * Amiga Rigid Disk Block (RDB) @@ -148,6 +154,7 @@ Supported partitioning schemes Supported file systems for read-only operations =============================================== + * 3DO Opera file system * Apple DOS file system * Apple Lisa file system @@ -164,6 +171,7 @@ Supported file systems for read-only operations Supported file systems for identification and information only ============================================================== + * Acorn Advanced Disc Filing System * Alexander Osipov DOS (AO-DOS for Electronika BK-0011) file system * Amiga Fast File System v2, untested @@ -229,6 +237,7 @@ Supported file systems for identification and information only Supported checksums =================== + * Adler-32 * CRC-16 * CRC-32 @@ -242,6 +251,7 @@ Supported checksums Supported filters ================= + * Apple PCExchange (FINDER.DAT & RESOURCE.FRK) * AppleDouble * AppleSingle @@ -254,11 +264,11 @@ Supported filters Partially supported disk image formats ====================================== These disk image formats cannot be read, but their contents can be checksummed on sidecar creation + * DiscFerret * KryoFlux STREAM * SuperCardPro - License ======= [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fclaunia%2FDiscImageChef.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fclaunia%2FDiscImageChef?ref=badge_large) diff --git a/Aaru.Server/package.json b/Aaru.Server/package.json index b0b92c8d..d6ee5316 100644 --- a/Aaru.Server/package.json +++ b/Aaru.Server/package.json @@ -1,12 +1,12 @@ { - "name": "Aaru.Server", - "version": "4.5.99.1663", - "description": "Server component for Aaru Data Preservation Suite", - "private": true, - "author": "Natalia Portillo ", - "homepage": "https://www.aaru.app", - "license": "LGPL", - "repository": "github:aaru-dps/Aaru.Server", + "name" : "Aaru.Server", + "version" : "4.5.99.1663", + "description" : "Server component for Aaru Data Preservation Suite", + "private" : true, + "author" : "Natalia Portillo ", + "homepage" : "https://www.aaru.app", + "license" : "LGPL", + "repository" : "github:aaru-dps/Aaru.Server", "dependencies": { "bootstrap": "^4.3.1" } diff --git a/Aaru.Server/wwwroot b/Aaru.Server/wwwroot index a4703b65..7f4c5d8f 160000 --- a/Aaru.Server/wwwroot +++ b/Aaru.Server/wwwroot @@ -1 +1 @@ -Subproject commit a4703b6594b2195a8daed246f68081e1ae65b708 +Subproject commit 7f4c5d8ff8b792ae383524009d9756fb674ab856