Compare commits
10 Commits
f3f78b1d90
...
6b5a187fe7
Author | SHA1 | Date | |
---|---|---|---|
6b5a187fe7 | |||
255ccf4280 | |||
c32489b040 | |||
c1d2b619ee | |||
e68df9c672 | |||
118fc26314 | |||
a3d769222a | |||
1a152fafe0 | |||
c7884587bb | |||
fe1c4762d2 |
17
.gitignore
vendored
17
.gitignore
vendored
@ -331,8 +331,15 @@ ASALocalRun/
|
||||
##
|
||||
## Visual Studio Code
|
||||
##
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
**/.vscode/*
|
||||
!**/.vscode/extensions.json
|
||||
!**/.vscode/format-report.json
|
||||
!**/.vscode/launch.json
|
||||
!**/.vscode/settings.json
|
||||
!**/.vscode/tasks.json
|
||||
!**/.vscode/mklink.md
|
||||
|
||||
*.lnk
|
||||
|
||||
.kanbn
|
||||
Adaptation/.kanbn
|
||||
|
55
.vscode/settings.json
vendored
Normal file
55
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"files.eol": "\n",
|
||||
"[markdown]": {
|
||||
"editor.wordWrap": "off"
|
||||
},
|
||||
"cSpell.words": [
|
||||
"PDSF",
|
||||
"Syncthing"
|
||||
],
|
||||
"files.exclude": {
|
||||
"**/node_modules": true
|
||||
},
|
||||
"files.watcherExclude": {
|
||||
"**/node_modules": true
|
||||
},
|
||||
"foam.files.ignore": [
|
||||
".foam/**/*",
|
||||
".stfolder/**/*",
|
||||
"**/_layouts/**/*",
|
||||
"**/_site/**/*",
|
||||
"**/.vscode/**/*",
|
||||
"**/node_modules/**/*"
|
||||
],
|
||||
"kanbn.showBurndownButton": false,
|
||||
"kanbn.showSprintButton": false,
|
||||
"foam.links.hover.enable": false,
|
||||
"foam.placeholders.exclude": [
|
||||
".kanbn/Archive/**/*"
|
||||
],
|
||||
"foam.orphans.exclude": [
|
||||
".journal/**/*"
|
||||
],
|
||||
"foam.graph.style": {
|
||||
"background": "#202020",
|
||||
"node": {
|
||||
"wired": "green",
|
||||
"wireless": "orange",
|
||||
"person": "white",
|
||||
"topic": "#bc2a3c",
|
||||
"kanbn": "#ff7b00",
|
||||
"basic-note": "#773b93",
|
||||
"daily-note": "#ff9d00",
|
||||
"note": "#f2cb1d",
|
||||
"placeholder": "#ff9d00",
|
||||
"tag": "#0494c1",
|
||||
"bug": "#bc2a3c",
|
||||
"epic": "#ff7b00",
|
||||
"feature": "#773b93",
|
||||
"issue": "#ff9d00",
|
||||
"task": "#f2cb1d",
|
||||
"test-case": "#ff9d00",
|
||||
"user-story": "#0494c1"
|
||||
}
|
||||
}
|
||||
}
|
12
Adaptation/.config/dotnet-tools.json
Normal file
12
Adaptation/.config/dotnet-tools.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-reportgenerator-globaltool": {
|
||||
"version": "5.1.15",
|
||||
"commands": [
|
||||
"reportgenerator"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,137 +1,26 @@
|
||||
# Remove the line below if you want to inherit .editorconfig settings from higher directories
|
||||
root = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
|
||||
#### Core EditorConfig Options ####
|
||||
|
||||
# Indentation and spacing
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
tab_width = 4
|
||||
|
||||
# New line preferences
|
||||
[*.md]
|
||||
end_of_line = crlf
|
||||
insert_final_newline = false
|
||||
|
||||
#### .NET Coding Conventions ####
|
||||
|
||||
# Organize usings
|
||||
dotnet_separate_import_directive_groups = false
|
||||
dotnet_sort_system_directives_first = false
|
||||
file_header_template = unset
|
||||
|
||||
# this. and Me. preferences
|
||||
dotnet_style_qualification_for_event = false:error
|
||||
dotnet_style_qualification_for_field = false
|
||||
dotnet_style_qualification_for_method = false:error
|
||||
dotnet_style_qualification_for_property = false:error
|
||||
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||
dotnet_style_predefined_type_for_member_access = true
|
||||
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_coalesce_expression = true
|
||||
dotnet_style_collection_initializer = true:warning
|
||||
dotnet_style_explicit_tuple_names = true:warning
|
||||
dotnet_style_namespace_match_folder = true
|
||||
dotnet_style_null_propagation = true:warning
|
||||
dotnet_style_object_initializer = true:warning
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
dotnet_style_prefer_auto_properties = true:warning
|
||||
dotnet_style_prefer_compound_assignment = true:warning
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = false
|
||||
dotnet_style_prefer_conditional_expression_over_return = false
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
|
||||
dotnet_style_prefer_inferred_tuple_names = true:warning
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true:warning
|
||||
dotnet_style_prefer_simplified_interpolation = true
|
||||
|
||||
# Field preferences
|
||||
dotnet_style_readonly_field = true:warning
|
||||
|
||||
# Parameter preferences
|
||||
dotnet_code_quality_unused_parameters = all
|
||||
|
||||
# Suppression preferences
|
||||
dotnet_remove_unnecessary_suppression_exclusions = 0
|
||||
|
||||
# New line preferences
|
||||
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
|
||||
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||
|
||||
#### C# Coding Conventions ####
|
||||
|
||||
# var preferences
|
||||
csharp_style_var_elsewhere = false:warning
|
||||
csharp_style_var_for_built_in_types = false:warning
|
||||
csharp_style_var_when_type_is_apparent = false:warning
|
||||
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_accessors = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_constructors = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_indexers = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_lambdas = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_local_functions = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_methods = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_operators = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_properties = when_on_single_line:warning
|
||||
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:warning
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
|
||||
csharp_style_prefer_not_pattern = true:warning
|
||||
csharp_style_prefer_pattern_matching = true:warning
|
||||
csharp_style_prefer_switch_expression = true:warning
|
||||
|
||||
# Null-checking preferences
|
||||
csharp_style_conditional_delegate_call = true
|
||||
|
||||
# Modifier preferences
|
||||
csharp_prefer_static_local_function = true:warning
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
|
||||
|
||||
# Code-block preferences
|
||||
csharp_prefer_braces = false
|
||||
csharp_prefer_simple_using_statement = true:warning
|
||||
csharp_style_namespace_declarations = file_scoped:warning
|
||||
|
||||
# Expression-level preferences
|
||||
csharp_prefer_simple_default_expression = true:warning
|
||||
csharp_style_deconstructed_variable_declaration = false
|
||||
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
|
||||
csharp_style_inlined_variable_declaration = false
|
||||
csharp_style_pattern_local_over_anonymous_function = true:warning
|
||||
csharp_style_prefer_index_operator = false:warning
|
||||
csharp_style_prefer_null_check_over_type_check = true
|
||||
csharp_style_prefer_range_operator = false:warning
|
||||
csharp_style_throw_expression = true
|
||||
csharp_style_unused_value_assignment_preference = discard_variable:warning
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
|
||||
|
||||
# 'using' directive preferences
|
||||
csharp_using_directive_placement = outside_namespace
|
||||
|
||||
# New line preferences
|
||||
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||
|
||||
#### C# Formatting Rules ####
|
||||
|
||||
# New line preferences
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
root = true
|
||||
tab_width = 2
|
||||
[*.csproj]
|
||||
end_of_line = crlf
|
||||
file_header_template = unset
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
root = true
|
||||
tab_width = 2
|
||||
[*.cs]
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_case_contents_when_block = true
|
||||
csharp_indent_labels = one_less_than_current
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_finally = true
|
||||
@ -139,16 +28,13 @@ csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
|
||||
# Indentation preferences
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_case_contents_when_block = true
|
||||
csharp_indent_labels = one_less_than_current
|
||||
csharp_indent_switch_labels = true
|
||||
|
||||
# Space preferences
|
||||
csharp_prefer_braces = false
|
||||
csharp_prefer_simple_default_expression = true:warning
|
||||
csharp_prefer_simple_using_statement = true:warning
|
||||
csharp_prefer_static_local_function = true:warning
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_preserve_single_line_statements = false
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_after_comma = true
|
||||
@ -171,166 +57,225 @@ csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_preserve_single_line_statements = false
|
||||
|
||||
#### Naming styles ####
|
||||
|
||||
# Naming rules
|
||||
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.severity = warning
|
||||
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.symbols = private_or_internal_field
|
||||
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||
|
||||
dotnet_naming_rule.enum_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.enum_should_be_pascal_case.symbols = enum
|
||||
dotnet_naming_rule.enum_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.severity = warning
|
||||
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.symbols = public_or_protected_field
|
||||
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||
|
||||
dotnet_naming_rule.class_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.class_should_be_pascal_case.symbols = class
|
||||
dotnet_naming_rule.class_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.method_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.method_should_be_pascal_case.symbols = method
|
||||
dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.severity = warning
|
||||
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.symbols = private_or_internal_static_field
|
||||
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||
|
||||
dotnet_naming_rule.static_field_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.static_field_should_be_pascal_case.symbols = static_field
|
||||
dotnet_naming_rule.static_field_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.property_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.property_should_be_pascal_case.symbols = property
|
||||
dotnet_naming_rule.property_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.static_method_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.static_method_should_be_pascal_case.symbols = static_method
|
||||
dotnet_naming_rule.static_method_should_be_pascal_case.style = pascal_case
|
||||
|
||||
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||
csharp_style_conditional_delegate_call = true
|
||||
csharp_style_deconstructed_variable_declaration = false
|
||||
csharp_style_expression_bodied_accessors = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_constructors = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_indexers = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_lambdas = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_local_functions = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_methods = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_operators = when_on_single_line:warning
|
||||
csharp_style_expression_bodied_properties = when_on_single_line:warning
|
||||
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
|
||||
csharp_style_inlined_variable_declaration = false
|
||||
csharp_style_namespace_declarations = file_scoped:warning
|
||||
csharp_style_pattern_local_over_anonymous_function = true:warning
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:warning
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
|
||||
csharp_style_prefer_index_operator = false:warning
|
||||
csharp_style_prefer_not_pattern = true:warning
|
||||
csharp_style_prefer_null_check_over_type_check = true
|
||||
csharp_style_prefer_pattern_matching = true:warning
|
||||
csharp_style_prefer_range_operator = false:warning
|
||||
csharp_style_prefer_switch_expression = true:warning
|
||||
csharp_style_throw_expression = true
|
||||
csharp_style_unused_value_assignment_preference = discard_variable:warning
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
|
||||
csharp_style_var_elsewhere = false:warning
|
||||
csharp_style_var_for_built_in_types = false:warning
|
||||
csharp_style_var_when_type_is_apparent = false:warning
|
||||
csharp_using_directive_placement = outside_namespace
|
||||
dotnet_code_quality_unused_parameters = all
|
||||
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
|
||||
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
||||
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
|
||||
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
|
||||
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
|
||||
dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
|
||||
dotnet_diagnostic.CA1854.severity = warning # CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup
|
||||
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
|
||||
dotnet_diagnostic.CA1861.severity = none # CA1861: Prefer 'static readonly' fields over constant array arguments
|
||||
dotnet_diagnostic.CA1862.severity = none # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
|
||||
dotnet_diagnostic.CA1864.severity = none # CA1864: To avoid double lookup, call 'TryAdd' instead of calling 'Add' with a 'ContainsKey' guard
|
||||
dotnet_diagnostic.CA1866.severity = none # CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char
|
||||
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
|
||||
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
|
||||
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
||||
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
|
||||
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
||||
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
||||
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
||||
dotnet_diagnostic.IDE0200.severity = warning # IDE0200: Lambda expression can be removed
|
||||
dotnet_diagnostic.IDE0270.severity = none # IDE0270: Null check can be simplified
|
||||
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
|
||||
dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
|
||||
dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
|
||||
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
|
||||
dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation
|
||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
|
||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.private_method_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.private_method_should_be_pascal_case.symbols = private_method
|
||||
dotnet_naming_rule.private_method_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.event_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.event_should_be_pascal_case.symbols = event
|
||||
dotnet_naming_rule.event_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
|
||||
dotnet_naming_rule.class_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.class_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.class_should_be_pascal_case.symbols = class
|
||||
dotnet_naming_rule.delegate_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.delegate_should_be_pascal_case.symbols = delegate
|
||||
dotnet_naming_rule.delegate_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.struct_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.struct_should_be_pascal_case.symbols = struct
|
||||
dotnet_naming_rule.struct_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.delegate_should_be_pascal_case.symbols = delegate
|
||||
dotnet_naming_rule.enum_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.enum_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.enum_should_be_pascal_case.symbols = enum
|
||||
dotnet_naming_rule.event_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.event_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.event_should_be_pascal_case.symbols = event
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.method_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.method_should_be_pascal_case.symbols = method
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Symbol specifications
|
||||
|
||||
dotnet_naming_symbols.class.applicable_kinds = class
|
||||
dotnet_naming_symbols.class.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.class.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.struct.applicable_kinds = struct
|
||||
dotnet_naming_symbols.struct.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.struct.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.enum.applicable_kinds = enum
|
||||
dotnet_naming_symbols.enum.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.enum.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.delegate.applicable_kinds = delegate
|
||||
dotnet_naming_symbols.delegate.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.delegate.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.event.applicable_kinds = event
|
||||
dotnet_naming_symbols.event.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.event.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.method.applicable_kinds = method
|
||||
dotnet_naming_symbols.method.applicable_accessibilities = public
|
||||
dotnet_naming_symbols.method.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.private_method.applicable_kinds = method
|
||||
dotnet_naming_symbols.private_method.applicable_accessibilities = private
|
||||
dotnet_naming_symbols.private_method.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.abstract_method.applicable_kinds = method
|
||||
dotnet_naming_symbols.abstract_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.abstract_method.required_modifiers = abstract
|
||||
|
||||
dotnet_naming_symbols.static_method.applicable_kinds = method
|
||||
dotnet_naming_symbols.static_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.static_method.required_modifiers = static
|
||||
|
||||
dotnet_naming_symbols.property.applicable_kinds = property
|
||||
dotnet_naming_symbols.property.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.property.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.public_or_protected_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.public_or_protected_field.applicable_accessibilities = public, protected
|
||||
dotnet_naming_symbols.public_or_protected_field.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.static_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.static_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.static_field.required_modifiers = static
|
||||
|
||||
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
|
||||
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.private_or_internal_static_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_or_internal_static_field.applicable_accessibilities = internal, private, private_protected
|
||||
dotnet_naming_symbols.private_or_internal_static_field.required_modifiers = static
|
||||
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
|
||||
# Naming styles
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||
dotnet_naming_rule.private_method_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.private_method_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.private_method_should_be_pascal_case.symbols = private_method
|
||||
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.severity = warning
|
||||
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.symbols = private_or_internal_field
|
||||
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.severity = warning
|
||||
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.symbols = private_or_internal_static_field
|
||||
dotnet_naming_rule.property_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.property_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.property_should_be_pascal_case.symbols = property
|
||||
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.severity = warning
|
||||
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.symbols = public_or_protected_field
|
||||
dotnet_naming_rule.static_field_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.static_field_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.static_field_should_be_pascal_case.symbols = static_field
|
||||
dotnet_naming_rule.static_method_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.static_method_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.static_method_should_be_pascal_case.symbols = static_method
|
||||
dotnet_naming_rule.struct_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.struct_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.struct_should_be_pascal_case.symbols = struct
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||
dotnet_naming_style.begins_with_i.required_suffix =
|
||||
dotnet_naming_style.begins_with_i.word_separator =
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.private_of_internal_field.capitalization = pascal_case
|
||||
dotnet_naming_style.private_of_internal_field.required_prefix = _
|
||||
dotnet_naming_style.private_of_internal_field.required_suffix =
|
||||
dotnet_naming_style.private_of_internal_field.word_separator =
|
||||
dotnet_naming_style.private_of_internal_field.capitalization = pascal_case
|
||||
dotnet_naming_symbols.abstract_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.abstract_method.applicable_kinds = method
|
||||
dotnet_naming_symbols.abstract_method.required_modifiers = abstract
|
||||
dotnet_naming_symbols.class.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.class.applicable_kinds = class
|
||||
dotnet_naming_symbols.class.required_modifiers =
|
||||
dotnet_naming_symbols.delegate.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.delegate.applicable_kinds = delegate
|
||||
dotnet_naming_symbols.delegate.required_modifiers =
|
||||
dotnet_naming_symbols.enum.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.enum.applicable_kinds = enum
|
||||
dotnet_naming_symbols.enum.required_modifiers =
|
||||
dotnet_naming_symbols.event.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.event.applicable_kinds = event
|
||||
dotnet_naming_symbols.event.required_modifiers =
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
dotnet_naming_symbols.method.applicable_accessibilities = public
|
||||
dotnet_naming_symbols.method.applicable_kinds = method
|
||||
dotnet_naming_symbols.method.required_modifiers =
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
dotnet_naming_symbols.private_method.applicable_accessibilities = private
|
||||
dotnet_naming_symbols.private_method.applicable_kinds = method
|
||||
dotnet_naming_symbols.private_method.required_modifiers =
|
||||
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
|
||||
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
|
||||
dotnet_naming_symbols.private_or_internal_static_field.applicable_accessibilities = internal, private, private_protected
|
||||
dotnet_naming_symbols.private_or_internal_static_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_or_internal_static_field.required_modifiers = static
|
||||
dotnet_naming_symbols.property.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.property.applicable_kinds = property
|
||||
dotnet_naming_symbols.property.required_modifiers =
|
||||
dotnet_naming_symbols.public_or_protected_field.applicable_accessibilities = public, protected
|
||||
dotnet_naming_symbols.public_or_protected_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.public_or_protected_field.required_modifiers =
|
||||
dotnet_naming_symbols.static_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.static_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.static_field.required_modifiers = static
|
||||
dotnet_naming_symbols.static_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.static_method.applicable_kinds = method
|
||||
dotnet_naming_symbols.static_method.required_modifiers = static
|
||||
dotnet_naming_symbols.struct.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.struct.applicable_kinds = struct
|
||||
dotnet_naming_symbols.struct.required_modifiers =
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
dotnet_remove_unnecessary_suppression_exclusions = 0
|
||||
dotnet_separate_import_directive_groups = false
|
||||
dotnet_sort_system_directives_first = false
|
||||
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
|
||||
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||
dotnet_style_coalesce_expression = true
|
||||
dotnet_style_collection_initializer = true:warning
|
||||
dotnet_style_explicit_tuple_names = true:warning
|
||||
dotnet_style_namespace_match_folder = true
|
||||
dotnet_style_null_propagation = true:warning
|
||||
dotnet_style_object_initializer = true:warning
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||
dotnet_style_predefined_type_for_member_access = true:warning
|
||||
dotnet_style_prefer_auto_properties = true:warning
|
||||
dotnet_style_prefer_compound_assignment = true:warning
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = false
|
||||
dotnet_style_prefer_conditional_expression_over_return = false
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
|
||||
dotnet_style_prefer_inferred_tuple_names = true:warning
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true:warning
|
||||
dotnet_style_prefer_simplified_interpolation = true
|
||||
dotnet_style_qualification_for_event = false:error
|
||||
dotnet_style_qualification_for_field = false
|
||||
dotnet_style_qualification_for_method = false:error
|
||||
dotnet_style_qualification_for_property = false:error
|
||||
dotnet_style_readonly_field = true:warning
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||
end_of_line = crlf
|
||||
file_header_template = unset
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
root = true
|
||||
tab_width = 4
|
||||
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822
|
||||
# https://github.com/dotnet/aspnetcore/blob/main/.editorconfig
|
||||
# https://github.com/dotnet/project-system/blob/main/.editorconfig
|
2
Adaptation/.vscode/launch.json
vendored
2
Adaptation/.vscode/launch.json
vendored
@ -4,7 +4,7 @@
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": 20908
|
||||
"processId": 8084
|
||||
}
|
||||
]
|
||||
}
|
||||
|
5
Adaptation/.vscode/mklink.md
vendored
Normal file
5
Adaptation/.vscode/mklink.md
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# mklink
|
||||
|
||||
```bash
|
||||
mklink /J "T:\DEP08SIHTRPLC\06_SourceCode\DEP08SIHTRPLC\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\DEP08SIHTRPLC"
|
||||
```
|
10
Adaptation/.vscode/settings.json
vendored
10
Adaptation/.vscode/settings.json
vendored
@ -1,4 +1,7 @@
|
||||
{
|
||||
"[markdown]": {
|
||||
"editor.wordWrap": "off"
|
||||
},
|
||||
"cSpell.words": [
|
||||
"Analyte",
|
||||
"CICN",
|
||||
@ -52,6 +55,7 @@
|
||||
"XRDXRR",
|
||||
"XRDXY"
|
||||
],
|
||||
"coverage-gutters.coverageBaseDir": "../../../../DEP08SIASM/05_TestResults/TestResults/**",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#7ea1d9",
|
||||
"activityBar.activeBorder": "#f8e6ed",
|
||||
@ -69,7 +73,9 @@
|
||||
"titleBar.activeBackground": "#5684ce",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#5684ce99",
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
"titleBar.inactiveForeground": "#e7e7e799",
|
||||
"commandCenter.border": "#e7e7e799"
|
||||
},
|
||||
"peacock.color": "#5684ce"
|
||||
"peacock.color": "#5684ce",
|
||||
"cSpell.enabled": false
|
||||
}
|
104
Adaptation/.vscode/tasks.json
vendored
Normal file
104
Adaptation/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "Test-Debug",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"test",
|
||||
"-c",
|
||||
"Debug"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "Test-Release",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"test",
|
||||
"-c",
|
||||
"Release"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "Format",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"format",
|
||||
"--report",
|
||||
".vscode",
|
||||
"--verbosity",
|
||||
"detailed",
|
||||
"--severity",
|
||||
"warn"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "Nuget Clear",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"nuget",
|
||||
"locals",
|
||||
"all",
|
||||
"--clear"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "MSBuild for EAF Deployment Packages",
|
||||
"command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"/target:Build",
|
||||
"/restore:True",
|
||||
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
|
||||
"/detailedsummary",
|
||||
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
||||
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
|
||||
"../DEP08SIASM.csproj"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "File-Folder-Helper AOT s M .Kanbn Tasks",
|
||||
"type": "shell",
|
||||
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M T:/DEP08SIASM/06_SourceCode/DEP08SIASM/Adaptation -s T:/DEP08SIASM/06_SourceCode/DEP08SIASM/Adaptation/.kanbn/tasks",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Kanbn Console",
|
||||
"type": "npm",
|
||||
"script": "kanbn.board",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Kanbn Write Boad",
|
||||
"type": "shell",
|
||||
"command": "& kanbn board -j | L:/Git/kanbn2md/kanbn2md.exe >.kanbn/board.md",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Kanbn Write json",
|
||||
"type": "npm",
|
||||
"script": "kanbn.board.json",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
1
Adaptation/DEP08SIASM-Development.yml
Normal file
1
Adaptation/DEP08SIASM-Development.yml
Normal file
@ -0,0 +1 @@
|
||||
ECHO is on.
|
@ -6,24 +6,15 @@
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Nullable>disable</Nullable>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PackageId>Infineon.Mesa.EAF.DEP08SIASM</PackageId>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
<Version>6.0.0.0</Version>
|
||||
<Authors>Mike Phares</Authors>
|
||||
<Company>Phares</Company>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<VSTestLogger>trx</VSTestLogger>
|
||||
<VSTestCollect>XPlat Code Coverage</VSTestCollect>
|
||||
<VSTestResultsDirectory>../../../../DEP08SIASM/05_TestResults/TestResults</VSTestResultsDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@ -41,47 +32,11 @@
|
||||
<DefineConstants>Linux</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="6.0.0" />
|
||||
<RuntimeHostConfigurationOption Include="AssemblyName" Value="DEP08SIASM" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
||||
<PackageReference Include="System.Data.OleDb" Version="6.0.0" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.1" />
|
||||
<PackageReference Include="FFMpegCore" Version="4.7.0" />
|
||||
<PackageReference Include="Infineon.Monitoring.MonA" Version="2.0.0" />
|
||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
||||
<PackageReference Include="Instances" Version="1.6.1" />
|
||||
<PackageReference Include="RoboSharp" Version="1.2.5" />
|
||||
<PackageReference Include="Tesseract" Version="4.1.1" />
|
||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2" />
|
||||
<PackageReference Include="FFMpegCore" Version="5.1.0" />
|
||||
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
@ -89,6 +44,41 @@
|
||||
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="Instances" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
|
||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="RoboSharp" Version="1.5.1" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
|
||||
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.5" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.3" />
|
||||
<PackageReference Include="Tesseract" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" />
|
||||
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="appsettings.json">
|
||||
|
1
Adaptation/DEP08SIASM.yml
Normal file
1
Adaptation/DEP08SIASM.yml
Normal file
@ -0,0 +1 @@
|
||||
ECHO is on.
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||
|
||||
[System.Runtime.Serialization.DataContractAttribute(IsReference = true)]
|
||||
[System.Runtime.Serialization.DataContract(IsReference = true)]
|
||||
public class ModelObjectParameterDefinition : IConfigurationObject
|
||||
{
|
||||
|
||||
@ -12,15 +12,15 @@ public class ModelObjectParameterDefinition : IConfigurationObject
|
||||
public ModelObjectParameterDefinition(string name, ModelObjectParameterType valueType, object defaultValue) { }
|
||||
public ModelObjectParameterDefinition(string name, Type enumType, object defaultValue) { }
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long Id { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual string Name { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual string Value { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual ModelObjectParameterType ValueType { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual string EnumType { get; set; }
|
||||
|
||||
public virtual ModelObjectParameterDefinition Clone() => null;
|
||||
|
@ -3,41 +3,41 @@ using System;
|
||||
|
||||
namespace Adaptation.Eaf.Management.ConfigurationData.Semiconductor.CellInstances;
|
||||
|
||||
[System.Runtime.Serialization.DataContractAttribute]
|
||||
[System.Runtime.Serialization.DataContract]
|
||||
public class SecsConnectionConfiguration
|
||||
{
|
||||
public SecsConnectionConfiguration() { }
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T6HsmsControlMessage { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T5ConnectionSeperation { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T4InterBlock { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T3MessageReply { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T2Protocol { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T1InterCharacter { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual SerialBaudRate? BaudRate { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual SecsTransportType? PortType { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? Port { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan LinkTestTimer { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual string Host { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? DeviceId { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual HsmsSessionMode? SessionMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual HsmsConnectionMode? ConnectionMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T7ConnectionIdle { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual TimeSpan T8NetworkIntercharacter { get; set; }
|
||||
}
|
@ -9,31 +9,16 @@ namespace Adaptation.FileHandlers;
|
||||
public class CellInstanceConnectionName
|
||||
{
|
||||
|
||||
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
||||
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, int? connectionCount)
|
||||
{
|
||||
IFileRead result;
|
||||
bool isDuplicator = cellInstanceConnectionName.StartsWith(cellInstanceName);
|
||||
if (isDuplicator)
|
||||
IFileRead result = cellInstanceConnectionName switch
|
||||
{
|
||||
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
||||
int hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length;
|
||||
result = hyphens switch
|
||||
{
|
||||
(int)DEP08SIASM.Hyphen.IsArchive => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||
(int)DEP08SIASM.Hyphen.IsDummy => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||
(int)DEP08SIASM.Hyphen.IsXToArchive => new ToArchive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||
_ => new DEP08SIASM.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cellInstanceConnectionName switch
|
||||
{
|
||||
nameof(DownloadJpegFile) => new DownloadJpegFile.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(jpeg) => new jpeg.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||
_ => throw new Exception(),
|
||||
};
|
||||
}
|
||||
nameof(DownloadJpegFile) => new DownloadJpegFile.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(jpeg) => new jpeg.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(MonitorApplication) => new MonitorApplication.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,261 +0,0 @@
|
||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Deposition;
|
||||
using Adaptation.Shared.Duplicator;
|
||||
using Adaptation.Shared.Methods;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
|
||||
namespace Adaptation.FileHandlers.DEP08SIASM;
|
||||
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
private readonly bool _IsXToAPC;
|
||||
private readonly bool _IsXToIQSSi;
|
||||
private readonly string _MemoryPath;
|
||||
private readonly HttpClient _HttpClient;
|
||||
private readonly bool _IsXToOpenInsight;
|
||||
private readonly bool _IsXToOpenInsightMetrologyViewer;
|
||||
private readonly Dictionary<string, string> _CellNames;
|
||||
private readonly bool _IsXToOpenInsightMetrologyViewerAttachments;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
{
|
||||
_MinFileLength = 10;
|
||||
_NullData = string.Empty;
|
||||
_Logistics = new Logistics(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_IsXToAPC = _Hyphens == (int)Hyphen.IsXToAPC;
|
||||
_CellNames = new Dictionary<string, string>();
|
||||
_IsXToIQSSi = _Hyphens == (int)Hyphen.IsXToIQSSi;
|
||||
_IsXToOpenInsight = _Hyphens == (int)Hyphen.IsXToOpenInsight;
|
||||
_IsXToOpenInsightMetrologyViewer = _Hyphens == (int)Hyphen.IsXToOpenInsightMetrologyViewer;
|
||||
_MemoryPath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory");
|
||||
_IsXToOpenInsightMetrologyViewerAttachments = _Hyphens == (int)Hyphen.IsXToOpenInsightMetrologyViewerAttachments;
|
||||
ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Path");
|
||||
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection)
|
||||
_CellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1], modelObjectParameterDefinition.Value);
|
||||
if (_IsXToOpenInsight)
|
||||
{
|
||||
_HttpClient = new();
|
||||
string openInsightCommonGatewayInterfaceReactorStatesStatus = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.CommonGatewayInterface.ReactorStates.Status");
|
||||
_HttpClient.BaseAddress = new(openInsightCommonGatewayInterfaceReactorStatesStatus);
|
||||
}
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
|
||||
string IFileRead.GetEventDescription()
|
||||
{
|
||||
string result = _Description.GetEventDescription();
|
||||
return result;
|
||||
}
|
||||
|
||||
List<string> IFileRead.GetHeaderNames()
|
||||
{
|
||||
List<string> results = _Description.GetHeaderNames();
|
||||
return results;
|
||||
}
|
||||
|
||||
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||
{
|
||||
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||
return results;
|
||||
}
|
||||
|
||||
JsonProperty[] IFileRead.GetDefault()
|
||||
{
|
||||
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||
return results;
|
||||
}
|
||||
|
||||
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||
{
|
||||
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||
return results;
|
||||
}
|
||||
|
||||
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||
{
|
||||
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||
return results;
|
||||
}
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
if (string.IsNullOrEmpty(eventName))
|
||||
throw new Exception();
|
||||
_ReportFullPath = reportFullPath;
|
||||
DateTime dateTime = DateTime.Now;
|
||||
results = GetExtractResult(reportFullPath, dateTime);
|
||||
if (results.Item3 is null)
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
||||
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||
WritePDSF(this, results.Item3);
|
||||
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||
return results;
|
||||
}
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
List<string> headerNames = _Description.GetHeaderNames();
|
||||
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
|
||||
results = ReExtract(this, headerNames, keyValuePairs);
|
||||
return results;
|
||||
}
|
||||
|
||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
||||
{
|
||||
if (_Description is not Description)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
protected static List<jpeg.Description> GetDescriptions(JsonElement[] jsonElements)
|
||||
{
|
||||
List<jpeg.Description> results = new();
|
||||
jpeg.Description description;
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
{
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
throw new Exception();
|
||||
description = JsonSerializer.Deserialize<jpeg.Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
results.Add(description);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
string duplicateDirectory;
|
||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||
List<jpeg.Description> descriptions = GetDescriptions(jsonElements);
|
||||
Tuple<Test[], Dictionary<Test, List<Shared.Properties.IDescription>>> tuple = GetTuple(this, from l in descriptions select (Shared.Properties.IDescription)l, extra: false);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tuple.Item1, jsonElements, new List<FileInfo>());
|
||||
bool isDummyRun = _DummyRuns.Any() && _DummyRuns.ContainsKey(_Logistics.JobID) && _DummyRuns[_Logistics.JobID].Any() && (from l in _DummyRuns[_Logistics.JobID] where l == _Logistics.Sequence select 1).Any();
|
||||
if (isDummyRun)
|
||||
{
|
||||
try
|
||||
{ File.SetLastWriteTime(reportFullPath, dateTime); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
||||
if (_IsXToIQSSi)
|
||||
duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\All");
|
||||
else if (!_IsXToOpenInsight)
|
||||
duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", segments[0]);
|
||||
else
|
||||
duplicateDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\Data");
|
||||
if (segments.Length > 2)
|
||||
duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]);
|
||||
if (!Directory.Exists(duplicateDirectory))
|
||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||
if (isDummyRun || _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
{
|
||||
if (!Directory.Exists(duplicateDirectory))
|
||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||
string successDirectory;
|
||||
if (!_IsXToAPC)
|
||||
successDirectory = string.Empty;
|
||||
else
|
||||
{
|
||||
successDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\ViewerPath");
|
||||
if (!Directory.Exists(successDirectory))
|
||||
_ = Directory.CreateDirectory(successDirectory);
|
||||
}
|
||||
List<Tuple<Shared.Properties.IScopeInfo, string>> tuples = new();
|
||||
string duplicateFile = string.Concat(duplicateDirectory, @"\", Path.GetFileName(reportFullPath));
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd"));
|
||||
string logisticsSequenceMemoryDirectory = string.Concat(_MemoryPath, @"\", _EquipmentType, @"\Source\", weekDirectory, @"\", _Logistics.Sequence);
|
||||
if (!Directory.Exists(logisticsSequenceMemoryDirectory))
|
||||
_ = Directory.CreateDirectory(logisticsSequenceMemoryDirectory);
|
||||
if (_IsXToAPC)
|
||||
{
|
||||
if (!isDummyRun && _IsEAFHosted)
|
||||
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_IsXToOpenInsightMetrologyViewer)
|
||||
_Log.Debug("Not sure if this data should post to OI Metrology Viewer?");
|
||||
else if (!_IsXToOpenInsight)
|
||||
throw new Exception($"Only {nameof(_IsXToOpenInsight)} is codded!");
|
||||
else if (_IsXToOpenInsight)
|
||||
{
|
||||
if (_HttpClient is null)
|
||||
throw new Exception($"{nameof(_HttpClient)} is null!");
|
||||
if (!isDummyRun && _IsEAFHosted)
|
||||
ProcessData.PutOpenInsightCommonGatewayInterfaceReactorStatesStatus(this, _Logistics, _HttpClient, descriptions, logisticsSequenceMemoryDirectory);
|
||||
}
|
||||
else
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
if (_IsXToOpenInsightMetrologyViewerAttachments)
|
||||
{
|
||||
string destinationDirectory;
|
||||
//string destinationDirectory = WriteScopeInfo(_ProgressPath, _Logistics, dateTime, duplicateDirectory, tuples);
|
||||
FileInfo fileInfo = new(reportFullPath);
|
||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||
File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
|
||||
string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID);
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
string[] matchDirectories;
|
||||
if (!_IsEAFHosted)
|
||||
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) };
|
||||
else
|
||||
matchDirectories = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly);
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
destinationDirectory = matchDirectories[0];
|
||||
if (isDummyRun)
|
||||
Shared0607(reportFullPath, duplicateDirectory, logisticsSequence, destinationDirectory);
|
||||
else
|
||||
{
|
||||
var wsRequest = new { _Logistics, descriptions };
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||
string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
||||
if (_IsEAFHosted)
|
||||
Shared1277(reportFullPath, destinationDirectory, logisticsSequence, jobIdDirectory, json);
|
||||
else
|
||||
{
|
||||
string jsonFileName = Path.ChangeExtension(reportFullPath, ".json");
|
||||
string historicalText = File.ReadAllText(jsonFileName);
|
||||
if (json != historicalText)
|
||||
throw new Exception("File doesn't match historical!");
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
namespace Adaptation.FileHandlers.DEP08SIASM;
|
||||
|
||||
public enum Hyphen
|
||||
{
|
||||
IsXToOpenInsightMetrologyViewer,
|
||||
IsXToIQSSi,
|
||||
IsXToOpenInsight,
|
||||
IsXToOpenInsightMetrologyViewerAttachments,
|
||||
IsXToAPC,
|
||||
IsXToSPaCe,
|
||||
IsXToArchive,
|
||||
IsArchive,
|
||||
IsDummy,
|
||||
IsNaEDA
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Properties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation.FileHandlers.DEP08SIASM;
|
||||
|
||||
public class ProcessData
|
||||
{
|
||||
|
||||
internal static List<Tuple<int, Enum, string>> HyphenTuples => new()
|
||||
{
|
||||
new Tuple<int, Enum, string>(0, Hyphen.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"),
|
||||
new Tuple<int, Enum, string>(15, Hyphen.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"),
|
||||
new Tuple<int, Enum, string>(-361, Hyphen.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"),
|
||||
new Tuple<int, Enum, string>(362, Hyphen.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"),
|
||||
new Tuple<int, Enum, string>(-363, Hyphen.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"),
|
||||
new Tuple<int, Enum, string>(-3604, Hyphen.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"),
|
||||
new Tuple<int, Enum, string>(-365, Hyphen.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"),
|
||||
new Tuple<int, Enum, string>(1806, Hyphen.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"),
|
||||
new Tuple<int, Enum, string>(367, Hyphen.IsArchive, @"\EC_Characterization_Si\Processed")
|
||||
// new Tuple<int, Enum, string>(1808, Hyphen.IsDummy
|
||||
};
|
||||
|
||||
internal static string GetLines(IFileRead fileRead, Logistics logistics, List<jpeg.Description> descriptions)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (fileRead is null)
|
||||
{ }
|
||||
if (logistics is null)
|
||||
{ }
|
||||
if (descriptions is null)
|
||||
{ }
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
internal static async void PutOpenInsightCommonGatewayInterfaceReactorStatesStatus(IFileRead fileRead, Logistics logistics, HttpClient httpClient, List<jpeg.Description> descriptions, string logisticsSequenceMemoryDirectory)
|
||||
{
|
||||
HttpContent httpContent = null;
|
||||
string status = descriptions[0].MID;
|
||||
string reactorNumber = logistics.MesEntity.Substring(1);
|
||||
string statusDateTime = logistics.DateTimeFromSequence.ToString("MM-dd-yyyy HH:mm:ss");
|
||||
string contentFile = Path.Combine(logisticsSequenceMemoryDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt");
|
||||
Uri uri = new($"{httpClient.BaseAddress.OriginalString}reactno={reactorNumber}&status={status}&statusdtm={statusDateTime}");
|
||||
try
|
||||
{
|
||||
HttpResponseMessage httpResponseMessage = await httpClient.PutAsync(uri, httpContent);
|
||||
if (httpResponseMessage.StatusCode is not System.Net.HttpStatusCode.OK)
|
||||
File.WriteAllText(contentFile, "Failed!");
|
||||
else
|
||||
{
|
||||
string content = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||
File.WriteAllText(contentFile, content);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.WriteAllText(contentFile, $"{ex.Message}{Environment.NewLine}{ex.StackTrace}{Environment.NewLine}{fileRead.CellInstanceConnectionName}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -8,7 +8,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
@ -21,12 +20,12 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private readonly string _FFmpegFileName;
|
||||
private readonly string _StaticFileServer;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||
{
|
||||
_MinFileLength = 10;
|
||||
_NullData = string.Empty;
|
||||
_Logistics = new Logistics(this);
|
||||
_Logistics = new(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
@ -34,9 +33,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_StaticFileServer = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".StaticFileServer"));
|
||||
string entryAssemblyLocationDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
string ffmpegFileName = Path.Combine(entryAssemblyLocationDirectory, "ffmpeg.dll");
|
||||
_FFmpegFileName = Path.Combine(entryAssemblyLocationDirectory, "ffmpeg.exe");
|
||||
string ffmpegFileName = Path.Combine(AppContext.BaseDirectory, "ffmpeg.dll");
|
||||
_FFmpegFileName = Path.Combine(AppContext.BaseDirectory, "ffmpeg.exe");
|
||||
if (File.Exists(ffmpegFileName) && !File.Exists(_FFmpegFileName))
|
||||
File.Copy(ffmpegFileName, _FFmpegFileName);
|
||||
if (!Debugger.IsAttached && fileConnectorConfiguration.PreProcessingMode != FileConnectorConfiguration.PreProcessingModeEnum.Process)
|
||||
@ -48,7 +46,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
|
||||
@ -113,16 +111,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
void IFileRead.CheckTests(Test[] tests, bool extra) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator)));
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
if (reportFullPath is null)
|
||||
{ }
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
throw new Exception(string.Concat("See ", nameof(Callback)));
|
||||
}
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) => throw new Exception(string.Concat("See ", nameof(Callback)));
|
||||
|
||||
private void DownloadJpegFileSynchronously()
|
||||
{
|
||||
@ -131,16 +120,18 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
string fileName = $"{_CellInstanceName}_{DateTime.Now.Ticks}{_FileConnectorConfiguration.TargetFileName}";
|
||||
string destFileName = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, fileName);
|
||||
string sourceFileName = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, fileName);
|
||||
Uri uri = new(string.Concat("rtsp://", _StaticFileServer, '/', _FileConnectorConfiguration.SourceDirectoryCloaking));
|
||||
if (!File.Exists(_FFmpegFileName))
|
||||
File.WriteAllText(Path.ChangeExtension(destFileName, ".err"), $"<{_FFmpegFileName}> doesn't exits!");
|
||||
else
|
||||
{
|
||||
Uri uri = new(string.Concat("rtsp://", _StaticFileServer, '/', _FileConnectorConfiguration.SourceDirectoryCloaking));
|
||||
_ = FFMpegArguments
|
||||
.FromUrlInput(uri, arg => arg.WithCustomArgument("-stimeout 3000"))
|
||||
.OutputToFile(sourceFileName)
|
||||
.ProcessSynchronously(throwOnError: false);
|
||||
File.Move(sourceFileName, destFileName);
|
||||
FFMpegArguments fFMpegArguments = FFMpegArguments.FromUrlInput(uri, arg => arg.WithCustomArgument("-timeout 1"));
|
||||
FFMpegArgumentProcessor fFMpegArgumentProcessor = fFMpegArguments.OutputToFile(sourceFileName, true, arg => arg.WithCustomArgument("-frames:v 1"));
|
||||
bool check = fFMpegArgumentProcessor.ProcessSynchronously(throwOnError: true);
|
||||
if (check)
|
||||
File.Move(sourceFileName, destFileName);
|
||||
else
|
||||
File.WriteAllText(Path.ChangeExtension(destFileName, ".err"), check.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,292 +0,0 @@
|
||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Duplicator;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Infineon.Monitoring.MonA;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
namespace Adaptation.FileHandlers.Dummy;
|
||||
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
private readonly Timer _Timer;
|
||||
private int _LastDummyRunIndex;
|
||||
private readonly string[] _CellNames;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
{
|
||||
_MinFileLength = 10;
|
||||
_NullData = string.Empty;
|
||||
_Logistics = new Logistics(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_LastDummyRunIndex = -1;
|
||||
List<string> cellNames = new();
|
||||
_Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite);
|
||||
ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Alias");
|
||||
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection)
|
||||
cellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1]);
|
||||
_CellNames = cellNames.ToArray();
|
||||
if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process)
|
||||
Callback(null);
|
||||
else
|
||||
{
|
||||
TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
||||
_ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||
}
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
|
||||
string IFileRead.GetEventDescription()
|
||||
{
|
||||
string result = _Description.GetEventDescription();
|
||||
return result;
|
||||
}
|
||||
|
||||
List<string> IFileRead.GetHeaderNames()
|
||||
{
|
||||
List<string> results = _Description.GetHeaderNames();
|
||||
return results;
|
||||
}
|
||||
|
||||
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||
{
|
||||
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||
return results;
|
||||
}
|
||||
|
||||
JsonProperty[] IFileRead.GetDefault()
|
||||
{
|
||||
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||
return results;
|
||||
}
|
||||
|
||||
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||
{
|
||||
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||
return results;
|
||||
}
|
||||
|
||||
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||
{
|
||||
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||
return results;
|
||||
}
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName) => throw new Exception(string.Concat("See ", nameof(CallbackFileExists)));
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract() => throw new Exception(string.Concat("See ", nameof(CallbackFileExists)));
|
||||
|
||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
||||
{
|
||||
if (_Description is not Description)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
private void CallbackInProcessCleared(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, string inProcessDirectory, long sequence, bool warning)
|
||||
{
|
||||
const string site = "sjc";
|
||||
string stateName = string.Concat("Dummy_", _EventName);
|
||||
const string monInURL = "http://moninhttp.sjc.infineon.com/input/text";
|
||||
MonIn monIn = MonIn.GetInstance(monInURL);
|
||||
try
|
||||
{
|
||||
if (warning)
|
||||
{
|
||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() });
|
||||
_ = monIn.SendStatus(site, monARessource, stateName, State.Warning);
|
||||
for (int i = 1; i < 12; i++)
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory);
|
||||
string[] files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
if (files.Length > 250)
|
||||
throw new Exception("Safety net!");
|
||||
foreach (string file in files)
|
||||
File.SetLastWriteTime(file, new DateTime(sequence));
|
||||
if (!_FileConnectorConfiguration.IncludeSubDirectories.Value)
|
||||
{
|
||||
foreach (string file in files)
|
||||
File.Move(file, Path.Combine(targetFileLocation, Path.GetFileName(file)));
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||
foreach (string directory in directories)
|
||||
_ = Directory.CreateDirectory(string.Concat(targetFileLocation, directory.Substring(inProcessDirectory.Length)));
|
||||
foreach (string file in files)
|
||||
File.Move(file, string.Concat(targetFileLocation, file.Substring(inProcessDirectory.Length)));
|
||||
}
|
||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() });
|
||||
_ = monIn.SendStatus(site, monARessource, stateName, State.Ok);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||
try
|
||||
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||
catch (Exception) { }
|
||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace });
|
||||
_ = monIn.SendStatus(site, monARessource, stateName, State.Critical);
|
||||
}
|
||||
}
|
||||
|
||||
private void CallbackFileExists(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, long sequence)
|
||||
{
|
||||
string[] files;
|
||||
bool warning = false;
|
||||
if (!_DummyRuns.ContainsKey(monARessource))
|
||||
_DummyRuns.Add(monARessource, new List<long>());
|
||||
if (!_DummyRuns[monARessource].Contains(sequence))
|
||||
_DummyRuns[monARessource].Add(sequence);
|
||||
File.AppendAllLines(traceDummyFile, new string[] { sourceArchiveFile });
|
||||
string inProcessDirectory = Path.Combine(_ProgressPath, "Dummy In-Process", sequence.ToString());
|
||||
if (!Directory.Exists(inProcessDirectory))
|
||||
_ = Directory.CreateDirectory(inProcessDirectory);
|
||||
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||
if (files.Any())
|
||||
{
|
||||
if (files.Length > 250)
|
||||
throw new Exception("Safety net!");
|
||||
try
|
||||
{
|
||||
foreach (string file in files)
|
||||
File.Delete(file);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
if (_FileConnectorConfiguration.IncludeSubDirectories.Value)
|
||||
files = Directory.GetFiles(targetFileLocation, "*", SearchOption.AllDirectories);
|
||||
else
|
||||
files = Directory.GetFiles(targetFileLocation, "*", SearchOption.TopDirectoryOnly);
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (new FileInfo(file).LastWriteTime.Ticks == sequence)
|
||||
{
|
||||
warning = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
CallbackInProcessCleared(sourceArchiveFile, traceDummyFile, targetFileLocation, monARessource, inProcessDirectory, sequence, warning);
|
||||
}
|
||||
|
||||
private string GetCellName(string pathSegment)
|
||||
{
|
||||
string result = string.Empty;
|
||||
foreach (string cellName in _CellNames)
|
||||
{
|
||||
if (pathSegment.ToLower().Contains(cellName.ToLower()))
|
||||
{
|
||||
result = cellName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
int count;
|
||||
List<(string CellName, int Count)> cellNames = new();
|
||||
foreach (string cellName in _CellNames)
|
||||
{
|
||||
count = 0;
|
||||
foreach (char @char in cellName.ToLower())
|
||||
count += pathSegment.Length - pathSegment.ToLower().Replace(@char.ToString(), string.Empty).Length;
|
||||
cellNames.Add(new(cellName, count));
|
||||
}
|
||||
result = (from l in cellNames orderby l.CellName.Length, l.Count descending select l.CellName).First();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void Callback(object state)
|
||||
{
|
||||
try
|
||||
{
|
||||
string sourceParentDirectory;
|
||||
string targetParentDirectory;
|
||||
DateTime dateTime = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.SourceFileLocation)))
|
||||
sourceParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation);
|
||||
else
|
||||
sourceParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation));
|
||||
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.TargetFileLocation)))
|
||||
targetParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation);
|
||||
else
|
||||
targetParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation));
|
||||
if (sourceParentDirectory != targetParentDirectory)
|
||||
throw new Exception("Target and source must have the same parent for Si Dummy FileConnectorConfiguration!");
|
||||
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
|
||||
if (!_IsEAFHosted || check)
|
||||
{
|
||||
string monARessource;
|
||||
string sourceFileFilter;
|
||||
string sourceArchiveFile;
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string traceDummyDirectory = Path.Combine(Path.GetPathRoot(_TracePath), "TracesDummy", _CellInstanceName, "Source", $"{dateTime:yyyy}___Week_{weekOfYear}");
|
||||
if (!Directory.Exists(traceDummyDirectory))
|
||||
_ = Directory.CreateDirectory(traceDummyDirectory);
|
||||
string traceDummyFile = Path.Combine(traceDummyDirectory, $"{dateTime.Ticks} - {_CellInstanceName}.txt");
|
||||
File.AppendAllText(traceDummyFile, string.Empty);
|
||||
for (int i = 0; i < _FileConnectorConfiguration.SourceFileFilters.Count; i++)
|
||||
{
|
||||
_LastDummyRunIndex += 1;
|
||||
if (_LastDummyRunIndex >= _FileConnectorConfiguration.SourceFileFilters.Count)
|
||||
_LastDummyRunIndex = 0;
|
||||
sourceFileFilter = _FileConnectorConfiguration.SourceFileFilters[_LastDummyRunIndex];
|
||||
sourceArchiveFile = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, sourceFileFilter);
|
||||
if (File.Exists(sourceArchiveFile))
|
||||
{
|
||||
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
||||
throw new Exception("Invalid file name for source archive file!");
|
||||
monARessource = GetCellName(sourceArchiveFile);
|
||||
if (string.IsNullOrEmpty(monARessource))
|
||||
throw new Exception("Could not determine which cell archive file is associated with!");
|
||||
if (_IsEAFHosted)
|
||||
CallbackFileExists(sourceArchiveFile, traceDummyFile, _FileConnectorConfiguration.TargetFileLocation, monARessource, sequence);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||
try
|
||||
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
try
|
||||
{
|
||||
TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
||||
_ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||
try
|
||||
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,28 +3,35 @@ using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Duplicator;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Infineon.Monitoring.MonA;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.FileHandlers.ToArchive;
|
||||
namespace Adaptation.FileHandlers.MonitorApplication;
|
||||
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
private readonly string _MonitorApplicationSite;
|
||||
private readonly string _MonitorApplicationResource;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||
{
|
||||
_MinFileLength = 10;
|
||||
_NullData = string.Empty;
|
||||
_Logistics = new Logistics(this);
|
||||
_Logistics = new(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_MonitorApplicationSite = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "MonitorApplication.Site");
|
||||
_MonitorApplicationResource = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "MonitorApplication.Resource");
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||
@ -36,7 +43,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||
}
|
||||
Move(extractResults, exception);
|
||||
Move(extractResults);
|
||||
}
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
@ -102,20 +109,31 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
||||
private void SendData(DateTime dateTime, List<jpeg.Description> descriptions)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (_Description is not Description)
|
||||
if (dateTime == DateTime.MinValue)
|
||||
throw new Exception();
|
||||
MonIn monIn = MonIn.GetInstance();
|
||||
int value = int.TryParse(descriptions[0].Lot, out int check) ? check : 0;
|
||||
string performanceName = string.Concat(_MonitorApplicationResource, "_", _Logistics.MesEntity);
|
||||
_ = monIn.SendPerformanceMessage(_MonitorApplicationSite, _MonitorApplicationResource, performanceName, value: value, description: string.Empty);
|
||||
if (string.IsNullOrEmpty(_MonitorApplicationResource)) // Never!
|
||||
_ = monIn.SendStatus(_MonitorApplicationSite, _MonitorApplicationResource, "Heartbeat", State.Unknown);
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||
List<jpeg.Description> descriptions = jpeg.ProcessData.GetDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
SendData(dateTime, descriptions);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
@ -0,0 +1,38 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Adaptation.FileHandlers.OpenInsight;
|
||||
|
||||
public class CommonGatewayInterface
|
||||
{
|
||||
|
||||
internal static async void PutReactorStatesStatus(IFileRead fileRead, Logistics logistics, HttpClient httpClient, List<jpeg.Description> descriptions, string logisticsSequenceMemoryDirectory)
|
||||
{
|
||||
HttpContent httpContent = null;
|
||||
string status = descriptions[0].MID;
|
||||
string reactorNumber = logistics.MesEntity.Substring(1);
|
||||
string statusDateTime = logistics.DateTimeFromSequence.ToString("MM-dd-yyyy HH:mm:ss");
|
||||
string contentFile = Path.Combine(logisticsSequenceMemoryDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt");
|
||||
Uri uri = new($"{httpClient.BaseAddress.OriginalString}reactno={reactorNumber}&status={status}&statusdtm={statusDateTime}");
|
||||
try
|
||||
{
|
||||
HttpResponseMessage httpResponseMessage = await httpClient.PutAsync(uri, httpContent);
|
||||
if (httpResponseMessage.StatusCode is not System.Net.HttpStatusCode.OK)
|
||||
File.WriteAllText(contentFile, "Failed!");
|
||||
else
|
||||
{
|
||||
string content = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||
File.WriteAllText(contentFile, content);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.WriteAllText(contentFile, $"{ex.Message}{Environment.NewLine}{ex.StackTrace}{Environment.NewLine}{fileRead.CellInstanceConnectionName}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -8,28 +8,46 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.FileHandlers.Archive;
|
||||
namespace Adaptation.FileHandlers.OpenInsight;
|
||||
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
private readonly string _MemoryPath;
|
||||
private readonly HttpClient _HttpClient;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||
{
|
||||
_MinFileLength = 10;
|
||||
_NullData = string.Empty;
|
||||
_Logistics = new Logistics(this);
|
||||
_Logistics = new(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_MemoryPath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory");
|
||||
_HttpClient = new();
|
||||
string openInsightCommonGatewayInterfaceReactorStatesStatus = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.CommonGatewayInterface.ReactorStates.Status");
|
||||
_HttpClient.BaseAddress = new(openInsightCommonGatewayInterfaceReactorStatesStatus);
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||
{
|
||||
bool isErrorFile = exception is not null;
|
||||
if (!isErrorFile && !string.IsNullOrEmpty(_Logistics.ReportFullPath))
|
||||
{
|
||||
FileInfo fileInfo = new(_Logistics.ReportFullPath);
|
||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||
}
|
||||
Move(extractResults);
|
||||
}
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
|
||||
@ -94,32 +112,19 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
||||
{
|
||||
if (_Description is not Description)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
private void MoveArchive(DateTime dateTime)
|
||||
private void SendData(DateTime dateTime, List<jpeg.Description> descriptions)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||
throw new Exception();
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd"));
|
||||
string jobIdDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", _Logistics.JobID);
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
//string destinationArchiveDirectory = string.Concat(jobIdDirectory, @"\!Archive\", weekDirectory);
|
||||
string destinationArchiveDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\Archive\", _Logistics.JobID, @"\", weekDirectory);
|
||||
if (!Directory.Exists(destinationArchiveDirectory))
|
||||
_ = Directory.CreateDirectory(destinationArchiveDirectory);
|
||||
string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() };
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
||||
destinationArchiveDirectory = string.Concat(destinationArchiveDirectory, @"\", Path.GetFileName(sourceDirectory));
|
||||
Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||
string logisticsSequenceMemoryDirectory = Path.Combine(_MemoryPath, _EquipmentType, "Source", weekDirectory, _Logistics.Sequence.ToString());
|
||||
if (!Directory.Exists(logisticsSequenceMemoryDirectory))
|
||||
_ = Directory.CreateDirectory(logisticsSequenceMemoryDirectory);
|
||||
if (_HttpClient is null)
|
||||
throw new Exception($"{nameof(_HttpClient)} is null!");
|
||||
CommonGatewayInterface.PutReactorStatesStatus(this, _Logistics, _HttpClient, descriptions, logisticsSequenceMemoryDirectory);
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
@ -129,10 +134,11 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||
Tuple<Test[], Dictionary<Test, List<Shared.Properties.IDescription>>> tuple = GetTuple(this, descriptions, extra: false);
|
||||
MoveArchive(dateTime);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tuple.Item1, jsonElements, new List<FileInfo>());
|
||||
List<jpeg.Description> descriptions = jpeg.ProcessData.GetDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
SendData(dateTime, descriptions);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
@ -35,6 +35,8 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
public int TotalDelta { get; set; }
|
||||
public string ClosestMatchFileName { get; set; }
|
||||
|
||||
public string RDS { get; set; }
|
||||
|
||||
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
||||
|
||||
List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics)
|
||||
@ -136,7 +138,7 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
{
|
||||
List<IDescription> results = new();
|
||||
|
||||
if (iProcessData is null || !iProcessData.Details.Any() || iProcessData is not ProcessData processData)
|
||||
if (iProcessData is null || iProcessData.Details.Count == 0 || iProcessData is not ProcessData processData)
|
||||
results.Add(GetDefault(fileRead, logistics));
|
||||
else
|
||||
{
|
||||
@ -222,4 +224,6 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
||||
|
||||
}
|
@ -7,7 +7,6 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@ -16,24 +15,28 @@ namespace Adaptation.FileHandlers.jpeg;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
private long? _TickOffset;
|
||||
protected long _LastChange;
|
||||
protected string _LastText;
|
||||
protected readonly int _EndX;
|
||||
protected readonly int _EndY;
|
||||
protected readonly Size _Size;
|
||||
protected readonly int _StartX;
|
||||
protected readonly int _StartY;
|
||||
protected readonly int _OffSetX;
|
||||
protected readonly int _OffSetY;
|
||||
protected string _TessDataDirectory;
|
||||
protected List<int> _PreviousTotalDeltaCollection;
|
||||
protected readonly Dictionary<string, string> _Reactors;
|
||||
protected readonly List<(string, Color[])> _ColorCollections;
|
||||
protected readonly List<Tuple<string, Color[]>> _ColorCollections;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||
{
|
||||
_MinFileLength = 36790;
|
||||
_NullData = string.Empty;
|
||||
_LastText = string.Empty;
|
||||
_Logistics = new Logistics(this);
|
||||
_Logistics = new(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
@ -42,33 +45,27 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_LastChange = DateTime.Now.AddDays(-1).Ticks;
|
||||
_Reactors = new Dictionary<string, string>();
|
||||
string reactor = string.Concat("Reactor.", cellInstanceName);
|
||||
ModelObjectParameterDefinition[] reactors = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Reactor.");
|
||||
reactors = (from l in reactors where l.Name.EndsWith(".FilePrefix") select l).ToArray();
|
||||
if (!reactors.Any())
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in reactors)
|
||||
_Reactors.Add(modelObjectParameterDefinition.Name.Split('.')[1], modelObjectParameterDefinition.Value);
|
||||
string entryAssemblyLocationDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
string x86 = Path.Combine(entryAssemblyLocationDirectory, "x86");
|
||||
string alias = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias"));
|
||||
_Reactors.Add(alias, alias);
|
||||
string x86 = Path.Combine(AppContext.BaseDirectory, "x86");
|
||||
if (!Directory.Exists(x86))
|
||||
_ = Directory.CreateDirectory(x86);
|
||||
_TessDataDirectory = Path.Combine(entryAssemblyLocationDirectory, "tessdata");
|
||||
_TessDataDirectory = Path.Combine(AppContext.BaseDirectory, "tessdata");
|
||||
if (!Directory.Exists(_TessDataDirectory))
|
||||
_ = Directory.CreateDirectory(_TessDataDirectory);
|
||||
string pdfttfSource = Path.Combine(entryAssemblyLocationDirectory, "pdf.ttf");
|
||||
string pdfttfSource = Path.Combine(AppContext.BaseDirectory, "pdf.ttf");
|
||||
string pdfttfDestination = Path.Combine(_TessDataDirectory, Path.GetFileName(pdfttfSource));
|
||||
if (File.Exists(pdfttfSource) && !File.Exists(pdfttfDestination))
|
||||
File.Copy(pdfttfSource, pdfttfDestination);
|
||||
string tesseract41dllSource = Path.Combine(entryAssemblyLocationDirectory, "tesseract41.dll");
|
||||
string tesseract41dllSource = Path.Combine(AppContext.BaseDirectory, "tesseract41.dll");
|
||||
string tesseract41dllDestination = Path.Combine(x86, Path.GetFileName(tesseract41dllSource));
|
||||
if (File.Exists(tesseract41dllSource) && !File.Exists(tesseract41dllDestination))
|
||||
File.Copy(tesseract41dllSource, tesseract41dllDestination);
|
||||
string engtraineddataSource = Path.Combine(entryAssemblyLocationDirectory, "eng.traineddata");
|
||||
string engtraineddataSource = Path.Combine(AppContext.BaseDirectory, "eng.traineddata");
|
||||
string engtraineddataDestination = Path.Combine(_TessDataDirectory, Path.GetFileName(engtraineddataSource));
|
||||
if (File.Exists(engtraineddataSource) && !File.Exists(engtraineddataDestination))
|
||||
File.Copy(engtraineddataSource, engtraineddataDestination);
|
||||
string leptonica1800dllSource = Path.Combine(entryAssemblyLocationDirectory, "leptonica-1.80.0.dll");
|
||||
string leptonica1800dllSource = Path.Combine(AppContext.BaseDirectory, "leptonica-1.80.0.dll");
|
||||
string leptonica1800dllDestination = Path.Combine(x86, Path.GetFileName(leptonica1800dllSource));
|
||||
if (File.Exists(leptonica1800dllSource) && !File.Exists(leptonica1800dllDestination))
|
||||
File.Copy(leptonica1800dllSource, leptonica1800dllDestination);
|
||||
@ -81,12 +78,19 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
_StartY = int.Parse(startY);
|
||||
_EndX = int.Parse(endX);
|
||||
_EndY = int.Parse(endY);
|
||||
_ColorCollections = new();
|
||||
_PreviousTotalDeltaCollection = new();
|
||||
(_OffSetX, _OffSetY) = ProcessData.GetOffSet(_FileConnectorConfiguration.SourceDirectoryCloaking);
|
||||
string masterImageDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory.Master.Images");
|
||||
_ColorCollections = ProcessData.GetColorCollections(_StartX, _StartY, _EndX, _EndY, masterImageDirectory);
|
||||
List<(string File, Size Size, Color[] Colors)> colorCollections = ProcessData.GetColorCollections(_StartX, _StartY, _EndX, _EndY, _OffSetX, _OffSetY, cellInstanceName, masterImageDirectory);
|
||||
int[] distinctSizes = (from l in colorCollections select l.Size.Width * l.Size.Height).Distinct().ToArray();
|
||||
if (distinctSizes.Length != 1)
|
||||
throw new Exception($"All Master Images must be the same size{Environment.NewLine}{string.Join(Environment.NewLine, distinctSizes)}");
|
||||
_Size = colorCollections[0].Size;
|
||||
_ColorCollections.AddRange(from l in colorCollections select new Tuple<string, Color[]>(l.File, l.Colors));
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
|
||||
@ -151,26 +155,28 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
void IFileRead.CheckTests(Test[] tests, bool extra) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator)));
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
|
||||
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
if (reportFullPath.Length < _MinFileLength)
|
||||
results.Item4.Add(new FileInfo(reportFullPath));
|
||||
if (_Logistics.FileInfo.Length < _MinFileLength)
|
||||
results.Item4.Add(_Logistics.FileInfo);
|
||||
else
|
||||
{
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _StartX, _StartY, _EndX, _EndY, _ColorCollections);
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _StartX, _StartY, _EndX, _EndY, _OffSetX, _OffSetY, _Size, _ColorCollections);
|
||||
if (iProcessData is not ProcessData processData)
|
||||
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
||||
string mid = processData.Text;
|
||||
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
_Logistics.MID = mid;
|
||||
string lastText = Regex.Replace(_LastText, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
string text = Regex.Replace(processData.Text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
if (string.IsNullOrEmpty(lastText))
|
||||
lastText = "_";
|
||||
string mid = string.Concat(lastText, '-', text);
|
||||
SetFileParameterLotID(mid);
|
||||
_Logistics.ProcessJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors);
|
||||
if (!iProcessData.Details.Any())
|
||||
string processJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors);
|
||||
_Logistics.Update(mid, processJobID);
|
||||
if (iProcessData.Details.Count == 0)
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
if (processData.Text == _LastText && _LastChange > DateTime.Now.AddMinutes(-30).Ticks)
|
||||
File.Delete(reportFullPath);
|
||||
@ -186,7 +192,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
double deviation = standardDeviation * 3;
|
||||
double upper = average + deviation;
|
||||
double lower = average - deviation;
|
||||
var dynamic = new { _Logistics.DateTimeFromSequence.Ticks, average, sum, standardDeviation, upper, lower, processData.TotalDelta, processData.Text, _PreviousTotalDeltaCollection.Count };
|
||||
var dynamic = new { _Logistics.Sequence, average, sum, standardDeviation, upper, lower, processData.TotalDelta, processData.Text, _PreviousTotalDeltaCollection.Count };
|
||||
string message = JsonSerializer.Serialize(dynamic, new JsonSerializerOptions { WriteIndented = true });
|
||||
_Log.Debug(message);
|
||||
if (processData.TotalDelta > upper || processData.TotalDelta < lower)
|
||||
|
@ -7,7 +7,10 @@ using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Tesseract;
|
||||
|
||||
namespace Adaptation.FileHandlers.jpeg;
|
||||
|
||||
@ -29,16 +32,32 @@ public class ProcessData : IProcessData
|
||||
|
||||
List<object> Shared.Properties.IProcessData.Details => _Details;
|
||||
|
||||
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, List<(string, Color[])> colorCollections)
|
||||
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, Size size, List<Tuple<string, Color[]>> colorCollections)
|
||||
{
|
||||
if (logistics is null)
|
||||
{ }
|
||||
JobID = logistics.JobID;
|
||||
fileInfoCollection.Clear();
|
||||
_Details = new List<object>();
|
||||
MesEntity = logistics.MesEntity;
|
||||
_Log = LogManager.GetLogger(typeof(ProcessData));
|
||||
Parse(fileRead, fileInfoCollection, startX, startY, endX, endY, colorCollections);
|
||||
Parse(fileRead, fileInfoCollection, startX, startY, endX, endY, offSetX, offSetY, size, colorCollections);
|
||||
}
|
||||
|
||||
internal static (int, int) GetOffSet(string sourceDirectoryCloaking)
|
||||
{
|
||||
int offSetX;
|
||||
int offSetY;
|
||||
string[] offset = sourceDirectoryCloaking.Split('x');
|
||||
if (offset.Length != 2 || !int.TryParse(offset[0], out int x) || !int.TryParse(offset[1], out int y))
|
||||
{
|
||||
offSetX = 0;
|
||||
offSetY = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
offSetX = x;
|
||||
offSetY = y;
|
||||
}
|
||||
return new(offSetX, offSetY);
|
||||
}
|
||||
|
||||
private static string Get(string value, bool useSplitForMID)
|
||||
@ -104,22 +123,26 @@ public class ProcessData : IProcessData
|
||||
#nullable enable
|
||||
#pragma warning disable CA1416
|
||||
|
||||
private static Color[] Get(string reportFullPath, int startX, int startY, int endX, int endY)
|
||||
private static (Size, Color[]) Get(string reportFullPath, int startX, int startY, int endX, int endY, int offSetX, int offSetY)
|
||||
{
|
||||
Color color;
|
||||
List<Color> colors = new();
|
||||
int startXValue = startX + offSetX;
|
||||
int startYValue = startY + offSetY;
|
||||
int endXValue = endX + offSetX;
|
||||
int endYValue = endY + offSetY;
|
||||
using Bitmap? bitmap = Image.FromFile(reportFullPath) as Bitmap;
|
||||
if (bitmap is null)
|
||||
throw new Exception($"Couldn't load image from <{reportFullPath}>");
|
||||
for (int x = startX; x < endX; x++)
|
||||
for (int x = startXValue; x < endXValue; x++)
|
||||
{
|
||||
for (int y = startY; y < endY; y++)
|
||||
for (int y = startYValue; y < endYValue; y++)
|
||||
{
|
||||
color = bitmap.GetPixel(x, y);
|
||||
colors.Add(color);
|
||||
}
|
||||
}
|
||||
return colors.ToArray();
|
||||
return new(bitmap.Size, colors.ToArray());
|
||||
}
|
||||
|
||||
private static System.Drawing.Imaging.ImageFormat Get(string extension)
|
||||
@ -137,24 +160,30 @@ public class ProcessData : IProcessData
|
||||
return imageFormat;
|
||||
}
|
||||
|
||||
private static (Color[], int, int) Get(IFileRead fileRead, List<FileInfo> fileInfoCollection, string extension, int startX, int startY, int endX, int endY)
|
||||
private static (Color[], int, int) Get(IFileRead fileRead, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, string extension, Size size)
|
||||
{
|
||||
Color color;
|
||||
List<Color> colors = new();
|
||||
MemoryStream memoryStream = new();
|
||||
Bitmap selectedBitmap = new(endX - startX, endY - startY);
|
||||
int startXValue = startX + offSetX;
|
||||
int startYValue = startY + offSetY;
|
||||
int endXValue = endX + offSetX;
|
||||
int endYValue = endY + offSetY;
|
||||
Bitmap selectedBitmap = new(endXValue - startXValue, endYValue - startYValue);
|
||||
System.Drawing.Imaging.ImageFormat imageFormat = Get(extension);
|
||||
using Bitmap? bitmap = Image.FromFile(fileRead.ReportFullPath) as Bitmap;
|
||||
string saveFileName = Path.ChangeExtension(fileRead.ReportFullPath, extension);
|
||||
if (bitmap is null)
|
||||
throw new Exception($"Couldn't load image from <{fileRead.ReportFullPath}>");
|
||||
for (int x = startX; x < endX; x++)
|
||||
if (!size.Equals(bitmap.Size))
|
||||
throw new Exception("Source size doesn't match master image size <http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097>");
|
||||
for (int x = startXValue; x < endXValue; x++)
|
||||
{
|
||||
for (int y = startY; y < endY; y++)
|
||||
for (int y = startYValue; y < endYValue; y++)
|
||||
{
|
||||
color = bitmap.GetPixel(x, y);
|
||||
colors.Add(color);
|
||||
selectedBitmap.SetPixel(x - startX, y - startY, color);
|
||||
selectedBitmap.SetPixel(x - startXValue, y - startYValue, color);
|
||||
}
|
||||
}
|
||||
selectedBitmap.Save(memoryStream, imageFormat);
|
||||
@ -163,7 +192,7 @@ public class ProcessData : IProcessData
|
||||
fileInfoCollection.Add(new FileInfo(saveFileName));
|
||||
SaveToFile(extension, saveFileName, memoryStream);
|
||||
}
|
||||
return new(colors.ToArray(), endX - startX, endY - startY);
|
||||
return new(colors.ToArray(), endXValue - startXValue, endYValue - startYValue);
|
||||
}
|
||||
|
||||
private static string Get(IFileRead fileRead, string extension, string extra)
|
||||
@ -209,16 +238,24 @@ public class ProcessData : IProcessData
|
||||
File.WriteAllLines(textFileName, lines);
|
||||
}
|
||||
|
||||
internal static List<(string, Color[])> GetColorCollections(int startX, int startY, int endX, int endY, string masterImageDirectory)
|
||||
internal static List<(string, Size, Color[])> GetColorCollections(int startX, int startY, int endX, int endY, int offSetX, int offSetY, string cellInstanceName, string masterImageDirectory)
|
||||
{
|
||||
List<(string, Color[])> results = new();
|
||||
List<(string, Size, Color[])> results = new();
|
||||
(Size Size, Color[] Colors) result;
|
||||
string fileName;
|
||||
string[] files = Directory.GetFiles(masterImageDirectory, "*.jpeg", SearchOption.TopDirectoryOnly);
|
||||
foreach (string file in files)
|
||||
results.Add(new(file, Get(file, startX, startY, endX, endY)));
|
||||
{
|
||||
fileName = Path.GetFileName(file);
|
||||
if (!fileName.StartsWith(cellInstanceName))
|
||||
continue;
|
||||
result = Get(file, startX, startY, endX, endY, offSetX, offSetY);
|
||||
results.Add(new(file, result.Size, result.Colors));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private void Parse(IFileRead fileRead, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, List<(string, Color[])> colorCollections)
|
||||
private void Parse(IFileRead fileRead, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, Size size, List<Tuple<string, Color[]>> colorCollections)
|
||||
{
|
||||
Red = 0;
|
||||
Green = 0;
|
||||
@ -228,7 +265,7 @@ public class ProcessData : IProcessData
|
||||
const int thresHold = 70;
|
||||
const string extension = ".tiff";
|
||||
List<(string File, int TotalDelta)> totalDeltaCollection = new();
|
||||
(Color[] sourceColors, int width, int height) = Get(fileRead, fileInfoCollection, extension, startX, startY, endX, endY);
|
||||
(Color[] sourceColors, int width, int height) = Get(fileRead, fileInfoCollection, startX, startY, endX, endY, offSetX, offSetY, extension, size);
|
||||
foreach ((string file, Color[] colors) in colorCollections)
|
||||
{
|
||||
totalDelta = 0;
|
||||
@ -274,4 +311,176 @@ public class ProcessData : IProcessData
|
||||
_Details.Add(Text);
|
||||
}
|
||||
|
||||
#nullable enable
|
||||
|
||||
internal static List<Description> GetDescriptions(JsonElement[] jsonElements)
|
||||
{
|
||||
List<Description> results = new();
|
||||
Description? description;
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
{
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
throw new Exception();
|
||||
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
if (description is null)
|
||||
continue;
|
||||
results.Add(description);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
#pragma warning disable CA1416
|
||||
|
||||
private static MemoryStream GetMemoryStream(System.Drawing.Imaging.ImageFormat imageFormat, Bitmap bitmap, int startX, int startY, int endX, int endY, int offSetX, int offSetY)
|
||||
{
|
||||
Color color;
|
||||
int negitiveGrayScale;
|
||||
MemoryStream result = new();
|
||||
int startXValue = startX + offSetX;
|
||||
int startYValue = startY + offSetY;
|
||||
int endXValue = endX + offSetX;
|
||||
int endYValue = endY + offSetY;
|
||||
using Bitmap selectedBitmap = new(endXValue - startXValue, endYValue - startYValue);
|
||||
for (int x = startXValue; x < endXValue; x++)
|
||||
{
|
||||
for (int y = startYValue; y < endYValue; y++)
|
||||
{
|
||||
color = bitmap.GetPixel(x, y);
|
||||
negitiveGrayScale = 255 - (int)((color.R * 0.3) + (color.G * 0.59) + (color.B * 0.11));
|
||||
if (negitiveGrayScale < 162)
|
||||
selectedBitmap.SetPixel(x - startXValue, y - startYValue, Color.FromArgb(color.A, 0, 0, 0));
|
||||
else
|
||||
selectedBitmap.SetPixel(x - startXValue, y - startYValue, Color.FromArgb(color.A, 255, 255, 255));
|
||||
}
|
||||
}
|
||||
selectedBitmap.Save(result, imageFormat);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static List<MemoryStream> GetMemoryStreams(string reportFullPath, string extension)
|
||||
{
|
||||
List<MemoryStream> results = new();
|
||||
System.Drawing.Imaging.ImageFormat imageFormat = Get(extension);
|
||||
using Bitmap? bitmap = Image.FromFile(reportFullPath) as Bitmap;
|
||||
if (bitmap is null)
|
||||
throw new Exception($"Couldn't load image from <{reportFullPath}>");
|
||||
results.Add(GetMemoryStream(imageFormat, bitmap, 6, 130, 791, 953, 0, 0));
|
||||
results.Add(GetMemoryStream(imageFormat, bitmap, 48, 795, 359, 869, 0, 0));
|
||||
results.Add(GetMemoryStream(imageFormat, bitmap, 376, 814, 430, 832, 0, 0));
|
||||
results.Add(GetMemoryStream(imageFormat, bitmap, 373, 793, 433, 874, 0, 0));
|
||||
return results;
|
||||
}
|
||||
|
||||
public static List<(float, string, List<string>)> Parse(string reportFullPath)
|
||||
{
|
||||
List<(float, string, List<string>)> results = new();
|
||||
string text;
|
||||
float pageMeanConfidence;
|
||||
MemoryStream memoryStream;
|
||||
List<string> blocks = new();
|
||||
const string extension = ".tiff";
|
||||
StringBuilder stringBuilder = new();
|
||||
using TesseractEngine engine = new(string.Empty, "eng", EngineMode.Default);
|
||||
List<MemoryStream> memoryStreams = GetMemoryStreams(reportFullPath, extension);
|
||||
for (int i = 0; i < memoryStreams.Count; i++)
|
||||
{
|
||||
_ = stringBuilder.Clear();
|
||||
memoryStream = memoryStreams[i];
|
||||
using Pix img = Pix.LoadFromMemory(memoryStream.GetBuffer());
|
||||
using Page page = engine.Process(img);
|
||||
text = page.GetText();
|
||||
pageMeanConfidence = page.GetMeanConfidence();
|
||||
using ResultIterator iter = page.GetIterator();
|
||||
iter.Begin();
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
_ = stringBuilder.Append(iter.GetText(PageIteratorLevel.Word)).Append(' ');
|
||||
if (iter.IsAtFinalOf(PageIteratorLevel.TextLine, PageIteratorLevel.Word) && stringBuilder.Length > 0)
|
||||
{
|
||||
blocks.Add(stringBuilder.ToString());
|
||||
_ = stringBuilder.Clear();
|
||||
}
|
||||
} while (iter.Next(PageIteratorLevel.TextLine, PageIteratorLevel.Word));
|
||||
if (iter.IsAtFinalOf(PageIteratorLevel.Para, PageIteratorLevel.TextLine))
|
||||
_ = stringBuilder.AppendLine();
|
||||
} while (iter.Next(PageIteratorLevel.Para, PageIteratorLevel.TextLine));
|
||||
} while (iter.Next(PageIteratorLevel.Block, PageIteratorLevel.Para));
|
||||
} while (iter.Next(PageIteratorLevel.Block));
|
||||
if (stringBuilder.Length > 0)
|
||||
blocks.Add(stringBuilder.ToString());
|
||||
results.Add(new(pageMeanConfidence, text, blocks));
|
||||
// if (!fileRead.IsEAFHosted)
|
||||
// {
|
||||
// fileInfoCollection.Add(new FileInfo(saveFileName));
|
||||
SaveToFile(extension, $"{reportFullPath}{i}{extension}", memoryStream);
|
||||
// }
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
#pragma warning restore CA1416
|
||||
|
||||
public static (float, string, List<string>) Parse(string reportFullPath, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY)
|
||||
{
|
||||
(float, string, List<string>) result;
|
||||
List<string> blocks = new();
|
||||
StringBuilder stringBuilder = new();
|
||||
using TesseractEngine engine = new(string.Empty, "eng", EngineMode.Default);
|
||||
using Pix img = Pix.LoadFromFile(reportFullPath);
|
||||
using Page page = engine.Process(img);
|
||||
string text = page.GetText();
|
||||
float pageMeanConfidence = page.GetMeanConfidence();
|
||||
using ResultIterator iter = page.GetIterator();
|
||||
iter.Begin();
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
_ = stringBuilder.Append(iter.GetText(PageIteratorLevel.Word)).Append(' ');
|
||||
if (iter.IsAtFinalOf(PageIteratorLevel.TextLine, PageIteratorLevel.Word) && stringBuilder.Length > 0)
|
||||
{
|
||||
blocks.Add(stringBuilder.ToString());
|
||||
_ = stringBuilder.Clear();
|
||||
}
|
||||
} while (iter.Next(PageIteratorLevel.TextLine, PageIteratorLevel.Word));
|
||||
if (iter.IsAtFinalOf(PageIteratorLevel.Para, PageIteratorLevel.TextLine))
|
||||
_ = stringBuilder.AppendLine();
|
||||
} while (iter.Next(PageIteratorLevel.Para, PageIteratorLevel.TextLine));
|
||||
} while (iter.Next(PageIteratorLevel.Block, PageIteratorLevel.Para));
|
||||
} while (iter.Next(PageIteratorLevel.Block));
|
||||
if (stringBuilder.Length > 0)
|
||||
blocks.Add(stringBuilder.ToString());
|
||||
result = new(pageMeanConfidence, text, blocks);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void Parse(IFileRead fileRead, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY)
|
||||
{
|
||||
(float pageMeanConfidence, string text, List<string> blocks) = Parse(fileRead.ReportFullPath, fileInfoCollection, startX, startY, endX, endY, offSetX, offSetY);
|
||||
_Log.Debug(string.Format("Mean confidence: {0}", pageMeanConfidence));
|
||||
_Log.Debug(string.Format("Text (GetText): \r\n{0}", text));
|
||||
_Log.Debug("Text (iterator):");
|
||||
if (blocks.Count == 0)
|
||||
_Details.Add(text);
|
||||
else
|
||||
{
|
||||
blocks = (from l in blocks where l.Split(':').Length == 3 select l).ToList();
|
||||
if (blocks.Count == 0)
|
||||
_Details.Add(text);
|
||||
else
|
||||
_Details.Add(blocks[0]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
namespace Adaptation.Ifx.Eaf.Common.Configuration;
|
||||
|
||||
[System.Runtime.Serialization.DataContractAttribute]
|
||||
[System.Runtime.Serialization.DataContract]
|
||||
public class ConnectionSetting
|
||||
{
|
||||
|
||||
@ -8,9 +8,9 @@ public class ConnectionSetting
|
||||
|
||||
public ConnectionSetting(string name, string value) { }
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string Name { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string Value { get; set; }
|
||||
|
||||
}
|
@ -4,85 +4,85 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
|
||||
[System.Runtime.Serialization.DataContractAttribute]
|
||||
[System.Runtime.Serialization.DataContract]
|
||||
public class FileConnectorConfiguration
|
||||
{
|
||||
public const ulong IDLE_EVENT_WAIT_TIME_DEFAULT = 360;
|
||||
public const ulong FILE_HANDLE_TIMEOUT_DEFAULT = 15;
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? TriggerOnChanged { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? PostProcessingRetries { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? CopySourceFolderStructure { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public IfPostProcessingFailsEnum? IfPostProcessingFailsAction { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string AlternateTargetFolder { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? FileHandleTimeout { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public bool? DeleteEmptySourceSubFolders { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? IdleEventWaitTimeInSeconds { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string FileAgeThreshold { get; set; }
|
||||
public bool? FolderAgeCheckIndividualSubFolders { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual ZipModeEnum? ZipMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public FileAgeFilterEnum? FileAgeFilterMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ZipTargetFileName { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ZipErrorTargetFileName { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? ZipFileSubFolderLevel { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string DefaultPlaceHolderValue { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public bool? UseZip64Mode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public List<ConnectionSetting> ConnectionSettings { get; set; }
|
||||
public string SourceDirectoryCloaking { get; set; }
|
||||
public string FolderAgeThreshold { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? FileScanningIntervalInSeconds { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? TriggerOnCreated { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? ZipFileTime { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string SourceFileLocation { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string SourceFileFilter { get; set; }
|
||||
public List<string> SourceFileFilters { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual bool? IncludeSubDirectories { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual FileScanningOptionEnum? FileScanningOption { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string TargetFileLocation { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ErrorTargetFileLocation { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string TargetFileName { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? FileHandleWaitTime { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public IfFileExistEnum? IfFileExistAction { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public long? ConnectionRetryInterval { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public PreProcessingModeEnum? PreProcessingMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public PostProcessingModeEnum? PostProcessingMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public PostProcessingModeEnum? ErrorPostProcessingMode { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public virtual long? ZipFileAmount { get; set; }
|
||||
[System.Runtime.Serialization.DataMemberAttribute]
|
||||
[System.Runtime.Serialization.DataMember]
|
||||
public string ErrorTargetFileName { get; set; }
|
||||
|
||||
public void Initialize() => throw new NotImplementedException();
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription;
|
||||
|
20
Adaptation/Infineon/Monitoring/MonA/ExtWebClient.cs
Normal file
20
Adaptation/Infineon/Monitoring/MonA/ExtWebClient.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
namespace Infineon.Monitoring.MonA;
|
||||
|
||||
#nullable disable
|
||||
#pragma warning disable SYSLIB0014
|
||||
|
||||
public class ExtWebClient : WebClient
|
||||
{
|
||||
protected override WebRequest GetWebRequest(Uri address)
|
||||
{
|
||||
WebRequest webRequest = base.GetWebRequest(address);
|
||||
if (webRequest != null)
|
||||
webRequest.PreAuthenticate = PreAuthenticate;
|
||||
return webRequest;
|
||||
}
|
||||
|
||||
public bool PreAuthenticate { get; set; }
|
||||
}
|
167
Adaptation/Infineon/Monitoring/MonA/IMonIn.cs
Normal file
167
Adaptation/Infineon/Monitoring/MonA/IMonIn.cs
Normal file
@ -0,0 +1,167 @@
|
||||
using System;
|
||||
|
||||
namespace Infineon.Monitoring.MonA;
|
||||
|
||||
public interface IMonIn
|
||||
{
|
||||
string SendStatus(string site, string resource, string stateName, State state);
|
||||
|
||||
string SendStatus(
|
||||
string site,
|
||||
DateTime timeStamp,
|
||||
string resource,
|
||||
string stateName,
|
||||
State state);
|
||||
|
||||
string SendStatus(
|
||||
string site,
|
||||
string resource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description);
|
||||
|
||||
string SendStatus(
|
||||
string site,
|
||||
DateTime timeStamp,
|
||||
string resource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description);
|
||||
|
||||
string SendStatus(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state);
|
||||
|
||||
string SendStatus(
|
||||
string site,
|
||||
DateTime timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state);
|
||||
|
||||
string SendStatus(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description);
|
||||
|
||||
string SendStatus(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
int? interval);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
DateTime? timeStamp,
|
||||
string performanceName,
|
||||
double value,
|
||||
string unit);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string unit,
|
||||
int? interval);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
int? interval);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string unit);
|
||||
|
||||
string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description,
|
||||
string unit,
|
||||
int? interval);
|
||||
}
|
283
Adaptation/Infineon/Monitoring/MonA/MonIn.cs
Normal file
283
Adaptation/Infineon/Monitoring/MonA/MonIn.cs
Normal file
@ -0,0 +1,283 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace Infineon.Monitoring.MonA;
|
||||
|
||||
public class MonIn : IMonIn, IDisposable
|
||||
{
|
||||
private static readonly DateTime _Utc1970DateTime = new(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
public const string MonInUrl = "http://moninhttp.{0}.infineon.com/input/text";
|
||||
private static readonly Dictionary<string, MonIn> _Instances = new();
|
||||
private readonly ExtWebClient _WebClient;
|
||||
private readonly string _MonInUrl;
|
||||
private static CultureInfo _CultureInfo;
|
||||
|
||||
public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text")
|
||||
{
|
||||
MonIn instance;
|
||||
lock (_Instances)
|
||||
{
|
||||
if (_Instances.TryGetValue(url, out instance))
|
||||
{
|
||||
instance = new MonIn(url);
|
||||
_Instances.Add(url, instance);
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private MonIn(string url)
|
||||
{
|
||||
_WebClient = new ExtWebClient();
|
||||
_WebClient.Headers[HttpRequestHeader.ContentType] = "application/text";
|
||||
_WebClient.Encoding = Encoding.UTF8;
|
||||
_CultureInfo = new CultureInfo("en-US");
|
||||
_MonInUrl = url;
|
||||
}
|
||||
|
||||
public void SetBasicAuthentication(string username, string password)
|
||||
{
|
||||
_WebClient.PreAuthenticate = true;
|
||||
_WebClient.Headers[HttpRequestHeader.Authorization] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password));
|
||||
}
|
||||
|
||||
public string SendStatus(string site, string resource, string stateName, State state) => SendStatus(site, new DateTime?(), resource, string.Empty, stateName, state, string.Empty);
|
||||
|
||||
public string SendStatus(
|
||||
string site,
|
||||
DateTime timeStamp,
|
||||
string resource,
|
||||
string stateName,
|
||||
State state) => SendStatus(site, new DateTime?(timeStamp), resource, string.Empty, stateName, state, string.Empty);
|
||||
|
||||
public string SendStatus(
|
||||
string site,
|
||||
string resource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description) => SendStatus(site, new DateTime?(), resource, string.Empty, stateName, state, description);
|
||||
|
||||
public string SendStatus(
|
||||
string site,
|
||||
DateTime timeStamp,
|
||||
string resource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description) => SendStatus(site, new DateTime?(timeStamp), resource, string.Empty, stateName, state, description);
|
||||
|
||||
public string SendStatus(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state) => SendStatus(site, new DateTime?(), resource, subresource, stateName, state, string.Empty);
|
||||
|
||||
public string SendStatus(
|
||||
string site,
|
||||
DateTime timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state) => SendStatus(site, new DateTime?(timeStamp), resource, subresource, stateName, state, string.Empty);
|
||||
|
||||
public string SendStatus(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description) => SendStatus(site, new DateTime?(), resource, subresource, stateName, state, description);
|
||||
|
||||
public string SendStatus(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
State state,
|
||||
string description)
|
||||
{
|
||||
string statusMessage = CreateStatusMessage(site, timeStamp, resource, subresource, stateName, state.ToString(), description);
|
||||
lock (_WebClient)
|
||||
return _WebClient.UploadString(string.Format(_MonInUrl, site), statusMessage);
|
||||
}
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value) => SendPerformanceMessage(site, new DateTime?(), resource, string.Empty, performanceName, value, string.Empty, string.Empty, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, string.Empty, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description) => SendPerformanceMessage(site, new DateTime?(), resource, string.Empty, performanceName, value, description, string.Empty, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, description, string.Empty, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
int? interval) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, string.Empty, interval);
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
DateTime? timeStamp,
|
||||
string performanceName,
|
||||
double value,
|
||||
string unit) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, unit, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string unit,
|
||||
int? interval) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, unit, interval);
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value) => SendPerformanceMessage(site, new DateTime?(), resource, subresource, performanceName, value, string.Empty, string.Empty, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value) => SendPerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, string.Empty, string.Empty, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description) => SendPerformanceMessage(site, new DateTime?(), resource, subresource, performanceName, value, description, string.Empty, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
int? interval) => SendPerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, string.Empty, string.Empty, interval);
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string unit) => SendPerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, string.Empty, unit, new int?());
|
||||
|
||||
public string SendPerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description,
|
||||
string unit,
|
||||
int? interval)
|
||||
{
|
||||
string performanceMessage = CreatePerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, description, unit, interval);
|
||||
lock (_WebClient)
|
||||
return _WebClient.UploadString(string.Format(_MonInUrl, site), performanceMessage);
|
||||
}
|
||||
|
||||
private static string CreateStatusMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string stateName,
|
||||
string state,
|
||||
string description)
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
if (string.IsNullOrEmpty(subresource))
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||
else
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
private static string CreatePerformanceMessage(
|
||||
string site,
|
||||
DateTime? timeStamp,
|
||||
string resource,
|
||||
string subresource,
|
||||
string performanceName,
|
||||
double value,
|
||||
string description,
|
||||
string unit,
|
||||
int? interval)
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
if (string.IsNullOrEmpty(subresource))
|
||||
{
|
||||
if (unit.Equals(string.Empty) && !interval.HasValue)
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||
else
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim());
|
||||
}
|
||||
else if (unit.Equals(string.Empty) && !interval.HasValue)
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||
else
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim());
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
private static string GetDateTimeNowAsPosix(DateTime timeStamp)
|
||||
{
|
||||
if (timeStamp > DateTime.Now)
|
||||
timeStamp = DateTime.Now;
|
||||
return ((int)timeStamp.ToUniversalTime().Subtract(_Utc1970DateTime).TotalSeconds).ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
KeyValuePair<string, MonIn> keyValuePair = new();
|
||||
foreach (KeyValuePair<string, MonIn> instance in _Instances)
|
||||
{
|
||||
if (instance.Value == this)
|
||||
{
|
||||
keyValuePair = instance;
|
||||
break;
|
||||
}
|
||||
}
|
||||
_ = _Instances.Remove(keyValuePair.Key);
|
||||
_WebClient?.Dispose();
|
||||
}
|
||||
|
||||
}
|
11
Adaptation/Infineon/Monitoring/MonA/State.cs
Normal file
11
Adaptation/Infineon/Monitoring/MonA/State.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Infineon.Monitoring.MonA;
|
||||
|
||||
public enum State
|
||||
{
|
||||
Up,
|
||||
Ok,
|
||||
Warning,
|
||||
Critical,
|
||||
Down,
|
||||
Unknown,
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
using Adaptation.Shared.Properties;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Adaptation.Shared.Deposition;
|
||||
|
||||
public class ScopeInfo : IScopeInfo
|
||||
{
|
||||
|
||||
public Enum Enum { get; private set; }
|
||||
public Test Test { get; private set; }
|
||||
public string HTML { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
public int TestValue { get; private set; }
|
||||
public string Header { get; private set; }
|
||||
public string FileName { get; private set; }
|
||||
public string QueryFilter { get; private set; }
|
||||
public string FileNameWithoutExtension { get; private set; }
|
||||
|
||||
public ScopeInfo(IFileRead fileRead, Test test, string extra)
|
||||
{
|
||||
Enum = test;
|
||||
Test = test;
|
||||
HTML = string.Empty;
|
||||
Title = string.Empty;
|
||||
TestValue = (int)test;
|
||||
Header = string.Empty;
|
||||
QueryFilter = string.Empty;
|
||||
FileName = Path.GetFileName(fileRead.ReportFullPath);
|
||||
FileNameWithoutExtension = extra;
|
||||
}
|
||||
|
||||
}
|
@ -6,12 +6,13 @@ using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Duplicator;
|
||||
|
||||
public class Description : IDescription, Shared.Properties.IDescription
|
||||
public class Description : IDescription, Properties.IDescription
|
||||
{
|
||||
|
||||
public int Test { get; set; }
|
||||
public int Count { get; set; }
|
||||
public int Index { get; set; }
|
||||
public string RDS { get; set; }
|
||||
//
|
||||
public string EventName { get; set; }
|
||||
public string NullData { get; set; }
|
||||
@ -109,6 +110,42 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
|
||||
{
|
||||
List<IDescription> results = new();
|
||||
if (iProcessData is null || iProcessData.Details.Count == 0)
|
||||
results.Add(GetDefault(fileRead, logistics));
|
||||
else
|
||||
{
|
||||
string nullData;
|
||||
Description description;
|
||||
object configDataNullData = fileRead.NullData;
|
||||
if (configDataNullData is null)
|
||||
nullData = string.Empty;
|
||||
else
|
||||
nullData = configDataNullData.ToString();
|
||||
for (int i = 0; i < iProcessData.Details.Count; i++)
|
||||
{
|
||||
if (iProcessData.Details[i] is null)
|
||||
continue;
|
||||
description = new Description
|
||||
{
|
||||
Test = (int)tests[i],
|
||||
Count = tests.Count,
|
||||
Index = i,
|
||||
//
|
||||
EventName = fileRead.EventName,
|
||||
NullData = nullData,
|
||||
JobID = fileRead.CellInstanceName,
|
||||
Sequence = logistics.Sequence.ToString(),
|
||||
MesEntity = logistics.MesEntity,
|
||||
ReportFullPath = logistics.ReportFullPath,
|
||||
ProcessJobID = logistics.ProcessJobID,
|
||||
MID = logistics.MID,
|
||||
//
|
||||
Date = DateTime.Now.ToString(GetDateFormat()),
|
||||
RDS = string.Empty,
|
||||
};
|
||||
results.Add(description);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
@ -139,4 +176,6 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
||||
|
||||
}
|
@ -33,8 +33,6 @@ public class FileRead : Properties.IFileRead
|
||||
protected readonly bool _IsDuplicator;
|
||||
protected readonly Calendar _Calendar;
|
||||
protected readonly bool _IsSourceTimer;
|
||||
protected readonly string _VillachPath;
|
||||
protected readonly string _ProgressPath;
|
||||
protected readonly string _EquipmentType;
|
||||
protected readonly long _BreakAfterSeconds;
|
||||
protected readonly string _ExceptionSubject;
|
||||
@ -46,6 +44,7 @@ public class FileRead : Properties.IFileRead
|
||||
protected readonly string _CellInstanceConnectionNameBase;
|
||||
protected readonly Dictionary<string, List<long>> _DummyRuns;
|
||||
protected readonly Dictionary<string, string> _FileParameter;
|
||||
protected readonly Dictionary<long, List<string>> _StaticRuns;
|
||||
protected readonly string _ParameterizedModelObjectDefinitionType;
|
||||
protected readonly FileConnectorConfiguration _FileConnectorConfiguration;
|
||||
protected readonly IList<ModelObjectParameterDefinition> _ModelObjectParameterDefinitions;
|
||||
@ -55,6 +54,7 @@ public class FileRead : Properties.IFileRead
|
||||
string Properties.IFileRead.EventName => _EventName;
|
||||
string Properties.IFileRead.MesEntity => _MesEntity;
|
||||
bool Properties.IFileRead.IsEAFHosted => _IsEAFHosted;
|
||||
bool Properties.IFileRead.IsDuplicator => _IsDuplicator;
|
||||
string Properties.IFileRead.EquipmentType => _EquipmentType;
|
||||
string Properties.IFileRead.ReportFullPath => _ReportFullPath;
|
||||
string Properties.IFileRead.CellInstanceName => _CellInstanceName;
|
||||
@ -63,12 +63,13 @@ public class FileRead : Properties.IFileRead
|
||||
string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName;
|
||||
string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType;
|
||||
|
||||
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
||||
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
||||
{
|
||||
_SMTP = smtp;
|
||||
_IsEvent = isEvent;
|
||||
_DummyRuns = dummyRuns;
|
||||
_LastTicksDuration = 0;
|
||||
_StaticRuns = staticRuns;
|
||||
_IsEAFHosted = isEAFHosted;
|
||||
_Description = description;
|
||||
_FileParameter = fileParameter;
|
||||
@ -84,6 +85,7 @@ public class FileRead : Properties.IFileRead
|
||||
_IsSourceTimer = fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt");
|
||||
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
||||
_Hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length;
|
||||
_TracePath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Trace");
|
||||
_ExceptionSubject = string.Concat("Exception:", _CellInstanceConnectionName, _FileConnectorConfiguration?.SourceDirectoryCloaking);
|
||||
string suffix;
|
||||
string[] segments = _ParameterizedModelObjectDefinitionType.Split('.');
|
||||
@ -104,23 +106,17 @@ public class FileRead : Properties.IFileRead
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
||||
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent && connectionCount > 1)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
// if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
||||
// throw new Exception(cellInstanceConnectionName);
|
||||
// if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
||||
// throw new Exception(cellInstanceConnectionName);
|
||||
}
|
||||
ModelObjectParameterDefinition[] paths = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Path.");
|
||||
if (paths.Length < 3)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (isDuplicator)
|
||||
_MesEntity = string.Empty;
|
||||
else
|
||||
_MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias"));
|
||||
_TracePath = (from l in paths where l.Name.EndsWith("Trace") select l.Value).FirstOrDefault();
|
||||
_VillachPath = (from l in paths where l.Name.EndsWith("Villach") select l.Value).FirstOrDefault();
|
||||
_ProgressPath = (from l in paths where l.Name.EndsWith("Progress") select l.Value).FirstOrDefault();
|
||||
_EventName = eventName;
|
||||
_EventNameFileRead = eventNameFileRead;
|
||||
_EquipmentType = parameterizedModelObjectDefinitionTypeAppended;
|
||||
@ -130,9 +126,11 @@ public class FileRead : Properties.IFileRead
|
||||
else
|
||||
{
|
||||
if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.TimeBased)
|
||||
breakAfterSeconds = 360;
|
||||
else
|
||||
breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileHandleTimeout.Value);
|
||||
else if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.FileWatcher)
|
||||
breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value);
|
||||
else
|
||||
throw new Exception();
|
||||
}
|
||||
_BreakAfterSeconds = breakAfterSeconds;
|
||||
UpdateLastTicksDuration(breakAfterSeconds * 10000000);
|
||||
@ -142,13 +140,13 @@ public class FileRead : Properties.IFileRead
|
||||
throw new Exception("_Configuration is empty?");
|
||||
if (_FileConnectorConfiguration.TargetFileLocation.Contains('%') || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains('%'))
|
||||
throw new Exception("_Configuration is incorrect for a duplicator!");
|
||||
if (_FileConnectorConfiguration is not null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking))
|
||||
throw new Exception("SourceDirectoryCloaking is empty?");
|
||||
if (!_FileConnectorConfiguration.SourceDirectoryCloaking.StartsWith("~"))
|
||||
throw new Exception("SourceDirectoryCloaking is incorrect for a duplicator!");
|
||||
}
|
||||
// if (_FileConnectorConfiguration is not null)
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking))
|
||||
// throw new Exception("SourceDirectoryCloaking is empty?");
|
||||
// if (!_FileConnectorConfiguration.SourceDirectoryCloaking.StartsWith("~"))
|
||||
// throw new Exception("SourceDirectoryCloaking is incorrect for a duplicator!");
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +163,7 @@ public class FileRead : Properties.IFileRead
|
||||
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix)
|
||||
{
|
||||
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray();
|
||||
if (!results.Any())
|
||||
if (results.Length == 0)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
return results;
|
||||
}
|
||||
@ -173,7 +171,7 @@ public class FileRead : Properties.IFileRead
|
||||
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix)
|
||||
{
|
||||
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray();
|
||||
if (!results.Any())
|
||||
if (results.Length == 0)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
return results;
|
||||
}
|
||||
@ -183,6 +181,7 @@ public class FileRead : Properties.IFileRead
|
||||
if (ticksDuration < 50000000)
|
||||
ticksDuration = 50000000;
|
||||
_LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667);
|
||||
_Log.Info($"{new TimeSpan(ticksDuration).TotalMilliseconds} TotalMillisecond(s) to process {Environment.NewLine}{_CellInstanceConnectionName}{Environment.NewLine}<{_ReportFullPath}>");
|
||||
}
|
||||
|
||||
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
||||
@ -204,7 +203,7 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
lock (threadExceptions)
|
||||
{
|
||||
if (threadExceptions.Any())
|
||||
if (threadExceptions.Count != 0)
|
||||
{
|
||||
foreach (Exception item in threadExceptions)
|
||||
_Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace));
|
||||
@ -216,35 +215,16 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
protected void CreateProgressDirectory(string[] exceptionLines)
|
||||
private void WriteAllLines(string to, string[] exceptionLines)
|
||||
{
|
||||
string progressDirectory;
|
||||
StringBuilder stringBuilder = new();
|
||||
if (_Hyphens == 0)
|
||||
progressDirectory = Path.Combine(_ProgressPath, _CellInstanceConnectionName);
|
||||
else
|
||||
string fileName = string.Concat(to, @"\readme.txt");
|
||||
try
|
||||
{
|
||||
_ = stringBuilder.Clear();
|
||||
for (int i = 0; i < _Hyphens; i++)
|
||||
{
|
||||
if (i > 0 && (i % 2) == 0)
|
||||
_ = stringBuilder.Append(' ');
|
||||
_ = stringBuilder.Append('-');
|
||||
}
|
||||
progressDirectory = string.Concat(_ProgressPath, @"\", (_Hyphens + 1).ToString().PadLeft(2, '0'), " ", stringBuilder).Trim();
|
||||
}
|
||||
DateTime dateTime = DateTime.Now;
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
progressDirectory = string.Concat(progressDirectory, @"\", dateTime.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence);
|
||||
if (!Directory.Exists(progressDirectory))
|
||||
_ = Directory.CreateDirectory(progressDirectory);
|
||||
if (exceptionLines is not null)
|
||||
{
|
||||
string fileName = string.Concat(progressDirectory, @"\readme.txt");
|
||||
try
|
||||
{ File.WriteAllLines(fileName, exceptionLines); }
|
||||
catch (Exception) { }
|
||||
if (!Directory.Exists(to))
|
||||
_ = Directory.CreateDirectory(to);
|
||||
File.WriteAllLines(fileName, exceptionLines);
|
||||
}
|
||||
catch (Exception ex) { _Log.Error(ex.Message); }
|
||||
}
|
||||
|
||||
protected string[] Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||
@ -258,9 +238,10 @@ public class FileRead : Properties.IFileRead
|
||||
else
|
||||
{
|
||||
results = new string[] { _Logistics.Sequence.ToString(), _Logistics.ReportFullPath, from, resolvedFileLocation, to, string.Empty, string.Empty, exception.Message, string.Empty, string.Empty, exception.StackTrace };
|
||||
Shared0449(to, results);
|
||||
if (!_IsDuplicator)
|
||||
WriteAllLines(to, results);
|
||||
}
|
||||
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any())
|
||||
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Count != 0)
|
||||
{
|
||||
string itemFile;
|
||||
List<string> directories = new();
|
||||
@ -279,82 +260,25 @@ public class FileRead : Properties.IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
protected static IEnumerable<string> GetDirectoriesRecursively(string path, string directoryNameSegment = null)
|
||||
{
|
||||
Queue<string> queue = new();
|
||||
queue.Enqueue(path);
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
path = queue.Dequeue();
|
||||
foreach (string subDirectory in Directory.GetDirectories(path))
|
||||
{
|
||||
queue.Enqueue(subDirectory);
|
||||
if (string.IsNullOrEmpty(directoryNameSegment) || Path.GetFileName(subDirectory).Contains(directoryNameSegment))
|
||||
yield return subDirectory;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string GetProcessedDirectory(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory)
|
||||
{
|
||||
string result = duplicateDirectory;
|
||||
string logisticsSequence = logistics.Sequence.ToString();
|
||||
string[] matchDirectories;
|
||||
if (!_IsEAFHosted)
|
||||
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(logistics.ReportFullPath)) };
|
||||
else
|
||||
matchDirectories = new string[] { GetDirectoriesRecursively(Path.GetDirectoryName(progressPath), logisticsSequence).FirstOrDefault() };
|
||||
if (matchDirectories.Length == 0 || string.IsNullOrEmpty(matchDirectories[0]))
|
||||
matchDirectories = Directory.GetDirectories(duplicateDirectory, string.Concat('*', logisticsSequence, '*'), SearchOption.AllDirectories);
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
if (!matchDirectories[0].Contains("_processed"))
|
||||
{
|
||||
result = string.Concat(matchDirectories[0].Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), dateTime.Ticks - logistics.Sequence, "_processed");
|
||||
Directory.Move(matchDirectories[0], result);
|
||||
result = string.Concat(result, @"\", logistics.Sequence);
|
||||
if (!Directory.Exists(result))
|
||||
_ = Directory.CreateDirectory(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
protected string WriteScopeInfo(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
||||
{
|
||||
string result = GetProcessedDirectory(progressPath, logistics, dateTime, duplicateDirectory);
|
||||
string tupleFile;
|
||||
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
||||
string duplicateFile = string.Concat(result, @"\", fileName, ".pdsf");
|
||||
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
||||
{
|
||||
if (tuple.Item1.FileName.StartsWith(@"\"))
|
||||
tupleFile = tuple.Item1.FileName;
|
||||
else
|
||||
tupleFile = string.Concat(result, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
||||
File.WriteAllText(tupleFile, tuple.Item2);
|
||||
}
|
||||
File.Copy(logistics.ReportFullPath, duplicateFile, overwrite: true);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected static string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory)
|
||||
protected static string GetTupleFile<T>(Logistics logistics, List<T> descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory, string duplicateFile) where T : Properties.IDescription
|
||||
{
|
||||
string result;
|
||||
string rds;
|
||||
string fileName;
|
||||
string dateValue;
|
||||
string datePlaceholder;
|
||||
string[] segments = logistics.MID.Split('-');
|
||||
if (segments.Length < 2)
|
||||
rds = "%RDS%";
|
||||
string rdsPlaceholder = "%RDS%";
|
||||
string mesEntityPlaceholder = "%MesEntity%";
|
||||
if (descriptions.Count == 0 || string.IsNullOrEmpty(descriptions[0].RDS))
|
||||
rds = logistics.MID;
|
||||
else
|
||||
rds = segments[1];
|
||||
segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
rds = descriptions[0].RDS;
|
||||
string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (segments.Length == 0)
|
||||
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace("%RDS%", rds));
|
||||
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity));
|
||||
else
|
||||
{
|
||||
datePlaceholder = "%DateTime%";
|
||||
segments = segments[1].Split('%');
|
||||
string datePlaceholder = "%DateTime%";
|
||||
dateValue = logistics.DateTimeFromSequence.ToString(segments[0]);
|
||||
foreach (string segment in scopeInfo.FileName.Split('%'))
|
||||
{
|
||||
@ -362,47 +286,54 @@ public class FileRead : Properties.IFileRead
|
||||
continue;
|
||||
datePlaceholder = string.Concat('%', segment, '%');
|
||||
}
|
||||
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace("%RDS%", rds).Replace(datePlaceholder, dateValue));
|
||||
fileName = scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue);
|
||||
if (!duplicateFile.Contains("Viewer"))
|
||||
result = Path.Combine(duplicateDirectory, fileName);
|
||||
else
|
||||
result = Path.Combine(duplicateDirectory, $"Viewer_{fileName}");
|
||||
}
|
||||
if (result.Contains('%'))
|
||||
throw new Exception("Placeholder exists!");
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, string successDirectory, string duplicateDirectory, string duplicateFile, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
||||
protected void WaitForFileConsumption<T>(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, List<T> descriptions, string successDirectory, string duplicateDirectory, string duplicateFile, List<(Properties.IScopeInfo, string)> collection) where T : Properties.IDescription
|
||||
{
|
||||
bool check;
|
||||
long preWait;
|
||||
string tupleFile;
|
||||
List<int> consumedFileIndices = new();
|
||||
string tupleFileName = string.Empty;
|
||||
List<string> duplicateFiles = new();
|
||||
bool moreThanAnHour = (_BreakAfterSeconds > 3600);
|
||||
StringBuilder stringBuilder = new();
|
||||
List<int> consumedFileIndices = new();
|
||||
bool moreThanAnHour = _BreakAfterSeconds > 3600;
|
||||
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
||||
if (moreThanAnHour)
|
||||
preWait = dateTime.AddSeconds(30).Ticks;
|
||||
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
|
||||
preWait = dateTime.AddMilliseconds(1234).Ticks;
|
||||
else
|
||||
preWait = dateTime.AddTicks(_LastTicksDuration).Ticks;
|
||||
if (!tuples.Any())
|
||||
preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||
if (collection.Count == 0)
|
||||
duplicateFiles.Add(duplicateFile);
|
||||
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
||||
string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath));
|
||||
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
||||
foreach ((Properties.IScopeInfo scopeInfo, string text) in collection)
|
||||
{
|
||||
if (tuple.Item1.FileName.StartsWith(@"\"))
|
||||
tupleFile = tuple.Item1.FileName;
|
||||
else if (!tuple.Item1.FileName.Contains('%'))
|
||||
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
||||
if (scopeInfo.FileName.StartsWith(@"\"))
|
||||
tupleFile = scopeInfo.FileName;
|
||||
else if (!scopeInfo.FileName.Contains('%'))
|
||||
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc");
|
||||
else
|
||||
tupleFile = GetTupleFile(logistics, tuple.Item1, duplicateDirectory);
|
||||
tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory, duplicateFile);
|
||||
tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0];
|
||||
duplicateFiles.Add(tupleFile);
|
||||
File.WriteAllText(tupleFile, tuple.Item2);
|
||||
if (_IsEAFHosted)
|
||||
File.WriteAllText(tupleFile, text);
|
||||
}
|
||||
for (short i = 0; i < short.MaxValue; i++)
|
||||
{
|
||||
if (DateTime.Now.Ticks > preWait)
|
||||
break;
|
||||
Thread.Sleep(500);
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
if (!moreThanAnHour)
|
||||
{
|
||||
@ -410,14 +341,24 @@ public class FileRead : Properties.IFileRead
|
||||
{
|
||||
try
|
||||
{
|
||||
check = (string.IsNullOrEmpty(successDirectory) || File.Exists(successFile));
|
||||
check = string.IsNullOrEmpty(successDirectory) || File.Exists(successFile);
|
||||
if (check)
|
||||
{
|
||||
consumedFileIndices.Clear();
|
||||
for (int i = 0; i < duplicateFiles.Count; i++)
|
||||
{
|
||||
if (!File.Exists(duplicateFiles[i]))
|
||||
consumedFileIndices.Add(i);
|
||||
{
|
||||
if (string.IsNullOrEmpty(tupleFileName))
|
||||
consumedFileIndices.Add(i);
|
||||
else if (duplicateFiles.All(l => Path.GetFileNameWithoutExtension(l).Split('.')[0] == tupleFileName))
|
||||
{
|
||||
for (int j = 0; j < duplicateFiles.Count; j++)
|
||||
consumedFileIndices.Add(j);
|
||||
}
|
||||
else
|
||||
consumedFileIndices.Add(i);
|
||||
}
|
||||
}
|
||||
if (consumedFileIndices.Count == duplicateFiles.Count)
|
||||
break;
|
||||
@ -438,7 +379,7 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
throw new Exception(string.Concat("After {", _BreakAfterSeconds, "} seconds, right side of {", sourceDirectoryCloaking, "} didn't consume file(s) ", stringBuilder));
|
||||
}
|
||||
Thread.Sleep(500);
|
||||
Thread.Sleep(250);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -481,10 +422,12 @@ public class FileRead : Properties.IFileRead
|
||||
protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
|
||||
{
|
||||
string directory;
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
|
||||
directory = Path.Combine(_VillachPath, _EquipmentType, "Target");
|
||||
directory = Path.Combine(_TracePath, _EquipmentType, "Target", weekDirectory, _CellInstanceName, _CellInstanceConnectionName);
|
||||
else
|
||||
directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName);
|
||||
directory = Path.Combine(_TracePath, _EquipmentType, "Source", weekDirectory, _CellInstanceName, _CellInstanceConnectionName);
|
||||
if (!Directory.Exists(directory))
|
||||
_ = Directory.CreateDirectory(directory);
|
||||
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
|
||||
@ -498,14 +441,8 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
protected void Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||
protected void Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults)
|
||||
{
|
||||
bool isErrorFile = exception is not null;
|
||||
if (!isErrorFile && _IsDuplicator)
|
||||
{
|
||||
if (_IsEAFHosted && !string.IsNullOrEmpty(_ProgressPath))
|
||||
CreateProgressDirectory(exceptionLines: null);
|
||||
}
|
||||
if (!_IsEAFHosted)
|
||||
{
|
||||
string to;
|
||||
@ -525,6 +462,7 @@ public class FileRead : Properties.IFileRead
|
||||
protected void TriggerEvents(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, List<string> headerNames, Dictionary<string, string> keyValuePairs)
|
||||
{
|
||||
object value;
|
||||
string segments;
|
||||
string description;
|
||||
List<object[]> list;
|
||||
for (int i = 0; i < extractResults.Item3.Length; i++)
|
||||
@ -532,10 +470,10 @@ public class FileRead : Properties.IFileRead
|
||||
_Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length));
|
||||
foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject())
|
||||
{
|
||||
if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.ContainsKey(jsonProperty.Name))
|
||||
if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.TryGetValue(jsonProperty.Name, out segments))
|
||||
description = string.Empty;
|
||||
else
|
||||
description = keyValuePairs[jsonProperty.Name].Split('|')[0];
|
||||
description = segments.Split('|')[0];
|
||||
if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name))
|
||||
value = jsonProperty.Value.ToString();
|
||||
else
|
||||
@ -567,10 +505,10 @@ public class FileRead : Properties.IFileRead
|
||||
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories);
|
||||
else
|
||||
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly);
|
||||
if (matches.Any())
|
||||
if (matches.Length != 0)
|
||||
break;
|
||||
}
|
||||
if (matches is null || !matches.Any())
|
||||
if (matches is null || matches.Length == 0)
|
||||
results = null;
|
||||
else
|
||||
{
|
||||
@ -583,20 +521,6 @@ public class FileRead : Properties.IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
protected static Dictionary<Test, List<Properties.IDescription>> GetKeyValuePairs(List<Properties.IDescription> descriptions)
|
||||
{
|
||||
Dictionary<Test, List<Properties.IDescription>> results = new();
|
||||
Test testKey;
|
||||
for (int i = 0; i < descriptions.Count; i++)
|
||||
{
|
||||
testKey = (Test)descriptions[i].Test;
|
||||
if (!results.ContainsKey(testKey))
|
||||
results.Add(testKey, new List<Properties.IDescription>());
|
||||
results[testKey].Add(descriptions[i]);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
protected static List<Properties.IDescription> GetDuplicatorDescriptions(JsonElement[] jsonElements)
|
||||
{
|
||||
List<Properties.IDescription> results = new();
|
||||
@ -612,34 +536,7 @@ public class FileRead : Properties.IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
protected static Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> GetTuple(IFileRead fileRead, IEnumerable<Properties.IDescription> descriptions, bool extra = false)
|
||||
{
|
||||
Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> result;
|
||||
Dictionary<Test, List<Properties.IDescription>> keyValuePairs = GetKeyValuePairs(descriptions.ToList());
|
||||
Test[] tests = (from l in keyValuePairs select l.Key).ToArray();
|
||||
fileRead.CheckTests(tests, extra);
|
||||
result = new Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>>(tests, keyValuePairs);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void Shared0449(string to, string[] exceptionLines)
|
||||
{
|
||||
if (_IsDuplicator)
|
||||
CreateProgressDirectory(exceptionLines: null);
|
||||
else
|
||||
{
|
||||
string fileName = string.Concat(to, @"\readme.txt");
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(to))
|
||||
_ = Directory.CreateDirectory(to);
|
||||
File.WriteAllLines(fileName, exceptionLines);
|
||||
}
|
||||
catch (Exception ex) { _Log.Error(ex.Message); }
|
||||
}
|
||||
}
|
||||
|
||||
protected void Shared1880(string itemFile, List<string> directories, FileInfo sourceFile, bool isErrorFile)
|
||||
private void Shared1880(string itemFile, List<string> directories, FileInfo sourceFile, bool isErrorFile)
|
||||
{
|
||||
string itemDirectory;
|
||||
directories.Add(Path.GetDirectoryName(sourceFile.FullName));
|
||||
@ -674,16 +571,99 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
protected void Shared1811(string to, FileInfo sourceFile)
|
||||
internal static List<string> GetDirectoryNames(string directory)
|
||||
{
|
||||
#nullable enable
|
||||
List<string> results = new();
|
||||
string? fileName;
|
||||
string? checkDirectory = directory;
|
||||
string? pathRoot = Path.GetPathRoot(directory);
|
||||
string extension = Path.GetExtension(directory);
|
||||
if (string.IsNullOrEmpty(pathRoot))
|
||||
throw new NullReferenceException(nameof(pathRoot));
|
||||
if (Directory.Exists(directory))
|
||||
{
|
||||
fileName = Path.GetFileName(directory);
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
results.Add(fileName);
|
||||
}
|
||||
else if ((string.IsNullOrEmpty(extension) || extension.Length > 3) && !File.Exists(directory))
|
||||
{
|
||||
fileName = Path.GetFileName(directory);
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
results.Add(fileName);
|
||||
}
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == pathRoot)
|
||||
break;
|
||||
fileName = Path.GetFileName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
continue;
|
||||
results.Add(fileName);
|
||||
}
|
||||
results.Add(pathRoot);
|
||||
results.Reverse();
|
||||
return results;
|
||||
#nullable disable
|
||||
}
|
||||
|
||||
private string GetJobIdDirectory(string path)
|
||||
{
|
||||
string result;
|
||||
List<string> directoryNames = GetDirectoryNames(path);
|
||||
if (!directoryNames.Contains(_Logistics.JobID))
|
||||
result = Path.GetDirectoryName(path);
|
||||
else
|
||||
{
|
||||
result = string.Empty;
|
||||
foreach (string directoryName in directoryNames)
|
||||
{
|
||||
result = Path.Combine(result, directoryName);
|
||||
if (directoryName == _Logistics.JobID)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void DeleteEmptyTopDirectories(string rootDirectory)
|
||||
{
|
||||
if (Directory.Exists(rootDirectory))
|
||||
{
|
||||
string[] files;
|
||||
string[] directories;
|
||||
string[] subDirectories = Directory.GetDirectories(rootDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
foreach (string subDirectory in subDirectories)
|
||||
{
|
||||
files = Directory.GetFiles(subDirectory, "*", SearchOption.AllDirectories);
|
||||
if (files.Length > 0)
|
||||
continue;
|
||||
directories = Directory.GetDirectories(subDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
if (directories.Length > 0)
|
||||
continue;
|
||||
try
|
||||
{ Directory.Delete(subDirectory); }
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
new DirectoryInfo(subDirectory).Attributes = FileAttributes.Normal;
|
||||
Directory.Delete(subDirectory);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Shared1811(string to, FileInfo sourceFile)
|
||||
{
|
||||
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
|
||||
{
|
||||
string directoryName = Path.GetFileName(to);
|
||||
string jobIdDirectory = Path.GetDirectoryName(to);
|
||||
string jobIdDirectory = GetJobIdDirectory(to);
|
||||
DateTime dateTime = DateTime.Now.AddMinutes(-15);
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd"));
|
||||
string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName);
|
||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||
string destinationDirectory = Path.Combine(jobIdDirectory, "_ Ignore 100 bytes", weekDirectory, directoryName);
|
||||
if (!Directory.Exists(destinationDirectory))
|
||||
_ = Directory.CreateDirectory(destinationDirectory);
|
||||
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
|
||||
@ -694,13 +674,13 @@ public class FileRead : Properties.IFileRead
|
||||
{
|
||||
if (!checkDirectory.Contains('_'))
|
||||
continue;
|
||||
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
|
||||
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
|
||||
continue;
|
||||
if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
|
||||
if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
|
||||
continue;
|
||||
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Any())
|
||||
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
|
||||
continue;
|
||||
if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Any())
|
||||
if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
|
||||
continue;
|
||||
if (new DirectoryInfo(checkDirectory).CreationTime > dateTime)
|
||||
continue;
|
||||
@ -708,25 +688,26 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
}
|
||||
catch (Exception) { throw; }
|
||||
DeleteEmptyTopDirectories(jobIdDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
protected void Shared0231(List<string> directories)
|
||||
private void Shared0231(List<string> directories)
|
||||
{
|
||||
if (_FileConnectorConfiguration.PostProcessingMode != FileConnectorConfiguration.PostProcessingModeEnum.Copy)
|
||||
{
|
||||
foreach (string directory in (from l in directories orderby l.Split('\\').Length descending select l).Distinct())
|
||||
{
|
||||
if (Directory.Exists(directory) && !Directory.GetFiles(directory).Any())
|
||||
if (Directory.Exists(directory) && Directory.GetFiles(directory).Length == 0)
|
||||
Directory.Delete(directory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Shared0413(DateTime dateTime, bool isDummyRun, string successDirectory, string duplicateDirectory, List<Tuple<Properties.IScopeInfo, string>> tuples, string duplicateFile)
|
||||
protected void WaitForFileConsumption<T>(DateTime dateTime, List<T> descriptions, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> collection, string duplicateFile) where T : Properties.IDescription
|
||||
{
|
||||
if (!isDummyRun && _IsEAFHosted)
|
||||
WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, successDirectory, duplicateDirectory, duplicateFile, tuples);
|
||||
WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, descriptions, successDirectory, duplicateDirectory, duplicateFile, collection);
|
||||
else
|
||||
{
|
||||
long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks;
|
||||
@ -739,75 +720,50 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
protected static void Shared0607(string reportFullPath, string duplicateDirectory, string logisticsSequence, string destinationDirectory)
|
||||
internal static string GetJobIdParentDirectory(string directory)
|
||||
{
|
||||
if (destinationDirectory == duplicateDirectory)
|
||||
throw new Exception("Check Target File Folder for %LotIDWithLogisticsSequence%_in process on CI (not Duplicator)");
|
||||
if (destinationDirectory.EndsWith(logisticsSequence))
|
||||
destinationDirectory = Path.GetDirectoryName(destinationDirectory);
|
||||
string[] deleteFiles = Directory.GetFiles(destinationDirectory, "*", SearchOption.AllDirectories);
|
||||
if (deleteFiles.Length > 250)
|
||||
throw new Exception("Safety net!");
|
||||
foreach (string file in deleteFiles)
|
||||
File.Delete(file);
|
||||
Directory.Delete(destinationDirectory, recursive: true);
|
||||
File.Delete(reportFullPath);
|
||||
string result;
|
||||
if (!string.IsNullOrEmpty(Path.GetFileName(directory)))
|
||||
result = Path.GetFullPath(GetParentParent(directory));
|
||||
else
|
||||
result = Path.GetFullPath(GetParentParent(Path.GetDirectoryName(directory)));
|
||||
if (!Directory.Exists(result))
|
||||
_ = Directory.CreateDirectory(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected string[] Shared1567(string reportFullPath, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
||||
internal string[] GetInProcessDirectory(string jobIdDirectory)
|
||||
{
|
||||
string[] results;
|
||||
string historicalText;
|
||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||
string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID);
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
string[] matchDirectories;
|
||||
if (!_IsEAFHosted)
|
||||
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) };
|
||||
results = new string[] { jobIdDirectory };
|
||||
else
|
||||
matchDirectories = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly);
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
string fileName = Path.GetFileNameWithoutExtension(reportFullPath);
|
||||
string sequenceDirectory = string.Concat(matchDirectories[0], @"\", logisticsSequence);
|
||||
if (!Directory.Exists(sequenceDirectory))
|
||||
_ = Directory.CreateDirectory(sequenceDirectory);
|
||||
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
||||
{
|
||||
fileName = string.Concat(sequenceDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
||||
if (_IsEAFHosted)
|
||||
File.WriteAllText(fileName, tuple.Item2);
|
||||
else
|
||||
{
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
historicalText = File.ReadAllText(fileName);
|
||||
if (tuple.Item2 != historicalText)
|
||||
throw new Exception("File doesn't match historical!");
|
||||
}
|
||||
}
|
||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||
results = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly);
|
||||
}
|
||||
results = matchDirectories;
|
||||
if ((results is null) || results.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
return results;
|
||||
}
|
||||
|
||||
protected void Shared1277(string reportFullPath, string destinationDirectory, string logisticsSequence, string jobIdDirectory, string json)
|
||||
internal static string GetFileNameAfterUnderscoreSplit(string reportFullPath)
|
||||
{
|
||||
string ecCharacterizationSi = Path.GetDirectoryName(Path.GetDirectoryName(jobIdDirectory));
|
||||
string destinationJobIdDirectory = string.Concat(ecCharacterizationSi, @"\Processed\", _Logistics.JobID);
|
||||
if (!Directory.Exists(destinationJobIdDirectory))
|
||||
_ = Directory.CreateDirectory(destinationJobIdDirectory);
|
||||
destinationJobIdDirectory = string.Concat(destinationJobIdDirectory, @"\", Path.GetFileName(destinationDirectory).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), DateTime.Now.Ticks - _Logistics.Sequence);
|
||||
string sequenceDirectory = string.Concat(destinationJobIdDirectory, @"\", logisticsSequence);
|
||||
string jsonFileName = string.Concat(sequenceDirectory, @"\", Path.GetFileNameWithoutExtension(reportFullPath), ".json");
|
||||
Directory.Move(destinationDirectory, destinationJobIdDirectory);
|
||||
if (!Directory.Exists(sequenceDirectory))
|
||||
_ = Directory.CreateDirectory(sequenceDirectory);
|
||||
File.Copy(reportFullPath, string.Concat(sequenceDirectory, @"\", Path.GetFileName(reportFullPath)), overwrite: true);
|
||||
File.WriteAllText(jsonFileName, json);
|
||||
string result;
|
||||
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
||||
if (segments.Length <= 2)
|
||||
result = segments[0];
|
||||
else
|
||||
result = string.Concat(segments[0], segments[2]);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string GetParentParent(string value)
|
||||
{
|
||||
string result = Path.GetDirectoryName(Path.GetDirectoryName(value));
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 2022-02-14 -> Shared - FileRead
|
||||
// 2022-06-08 -> Shared - FileRead
|
@ -9,55 +9,67 @@ namespace Adaptation.Shared;
|
||||
public class Logistics : ILogistics
|
||||
{
|
||||
|
||||
public object NullData { get; private set; }
|
||||
public string JobID { get; private set; } //CellName
|
||||
public long Sequence { get; private set; } //Ticks
|
||||
public DateTime DateTimeFromSequence { get; private set; }
|
||||
public double TotalSecondsSinceLastWriteTimeFromSequence { get; private set; }
|
||||
public string MesEntity { get; private set; } //SPC
|
||||
public string ReportFullPath { get; private set; } //Extract file
|
||||
public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics)
|
||||
public string MID { get; set; } //Lot & Pocket || Lot
|
||||
public List<string> Tags { get; set; }
|
||||
public List<string> Logistics1 { get; set; }
|
||||
public List<Logistics2> Logistics2 { get; set; }
|
||||
protected readonly DateTime _DateTimeFromSequence;
|
||||
protected readonly FileInfo _FileInfo;
|
||||
protected readonly string _JobID;
|
||||
protected readonly List<string> _Logistics1;
|
||||
protected readonly List<Logistics2> _Logistics2;
|
||||
protected string _MID;
|
||||
protected readonly string _MesEntity;
|
||||
protected readonly object _NullData;
|
||||
protected string _ProcessJobID;
|
||||
protected readonly string _ReportFullPath;
|
||||
protected readonly long _Sequence;
|
||||
protected readonly double _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||
|
||||
public DateTime DateTimeFromSequence => _DateTimeFromSequence;
|
||||
public FileInfo FileInfo => _FileInfo;
|
||||
public string JobID => _JobID;
|
||||
public List<string> Logistics1 => _Logistics1;
|
||||
public List<Logistics2> Logistics2 => _Logistics2;
|
||||
public string MID => _MID;
|
||||
public string MesEntity => _MesEntity;
|
||||
public object NullData => _NullData;
|
||||
public string ProcessJobID => _ProcessJobID;
|
||||
public string ReportFullPath => _ReportFullPath;
|
||||
public long Sequence => _Sequence;
|
||||
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||
|
||||
public Logistics(IFileRead fileRead)
|
||||
{
|
||||
DateTime dateTime = DateTime.Now;
|
||||
NullData = null;
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
JobID = fileRead.CellInstanceName;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
MesEntity = DefaultMesEntity(dateTime);
|
||||
ReportFullPath = string.Empty;
|
||||
ProcessJobID = nameof(ProcessJobID);
|
||||
MID = nameof(MID);
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_NullData = null;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_JobID = fileRead.CellInstanceName;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
_MesEntity = DefaultMesEntity(dateTime);
|
||||
_ReportFullPath = string.Empty;
|
||||
_ProcessJobID = nameof(ProcessJobID);
|
||||
_MID = nameof(MID);
|
||||
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
}
|
||||
|
||||
public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null)
|
||||
public Logistics(IFileRead fileRead, long tickOffset, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileRead.CellInstanceName))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(fileRead.MesEntity))
|
||||
throw new Exception();
|
||||
NullData = fileRead.NullData;
|
||||
FileInfo fileInfo = new(reportFullPath);
|
||||
DateTime dateTime = fileInfo.LastWriteTime;
|
||||
if (fileInfoLength.HasValue && fileInfo.Length < fileInfoLength.Value)
|
||||
_NullData = fileRead.NullData;
|
||||
_FileInfo = new(reportFullPath);
|
||||
DateTime dateTime = new(_FileInfo.LastWriteTime.Ticks + tickOffset);
|
||||
if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value)
|
||||
dateTime = dateTime.AddTicks(-1);
|
||||
JobID = fileRead.CellInstanceName;
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
MesEntity = fileRead.MesEntity;
|
||||
ReportFullPath = fileInfo.FullName;
|
||||
ProcessJobID = nameof(ProcessJobID);
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.FullName);
|
||||
_JobID = fileRead.CellInstanceName;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
_MesEntity = fileRead.MesEntity;
|
||||
_ReportFullPath = _FileInfo.FullName;
|
||||
_ProcessJobID = nameof(ProcessJobID);
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(_FileInfo.FullName);
|
||||
if (useSplitForMID)
|
||||
{
|
||||
if (fileNameWithoutExtension.IndexOf(".") > -1)
|
||||
@ -67,10 +79,9 @@ public class Logistics : ILogistics
|
||||
if (fileNameWithoutExtension.IndexOf("-") > -1)
|
||||
fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim();
|
||||
}
|
||||
MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
||||
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
}
|
||||
|
||||
public Logistics(string reportFullPath, string logistics)
|
||||
@ -78,57 +89,57 @@ public class Logistics : ILogistics
|
||||
string key;
|
||||
DateTime dateTime;
|
||||
string[] segments;
|
||||
Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
||||
_FileInfo = new(reportFullPath);
|
||||
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
||||
{
|
||||
NullData = null;
|
||||
JobID = "null";
|
||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
MesEntity = DefaultMesEntity(dateTime);
|
||||
ReportFullPath = reportFullPath;
|
||||
ProcessJobID = "R##";
|
||||
MID = "null";
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_NullData = null;
|
||||
_JobID = "null";
|
||||
dateTime = _FileInfo.LastWriteTime;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
_MesEntity = DefaultMesEntity(dateTime);
|
||||
_ReportFullPath = reportFullPath;
|
||||
_ProcessJobID = "R##";
|
||||
_MID = "null";
|
||||
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
}
|
||||
else
|
||||
{
|
||||
string logistics1Line1 = Logistics1[0];
|
||||
key = "NULL_DATA=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
NullData = null;
|
||||
_NullData = null;
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
NullData = segments[1].Split(';')[0];
|
||||
_NullData = segments[1].Split(';')[0];
|
||||
}
|
||||
key = "JOBID=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
JobID = "null";
|
||||
_JobID = "null";
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
JobID = segments[1].Split(';')[0];
|
||||
_JobID = segments[1].Split(';')[0];
|
||||
}
|
||||
key = "SEQUENCE=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
dateTime = _FileInfo.LastWriteTime;
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (!long.TryParse(segments[1].Split(';')[0].Split('.')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks)
|
||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
dateTime = _FileInfo.LastWriteTime;
|
||||
else
|
||||
dateTime = new DateTime(sequence);
|
||||
}
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
DateTime lastWriteTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
DateTime lastWriteTime = _FileInfo.LastWriteTime;
|
||||
if (TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
||||
{
|
||||
if (lastWriteTime != dateTime)
|
||||
@ -138,33 +149,32 @@ public class Logistics : ILogistics
|
||||
}
|
||||
key = "MES_ENTITY=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
MesEntity = DefaultMesEntity(dateTime);
|
||||
_MesEntity = DefaultMesEntity(dateTime);
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
MesEntity = segments[1].Split(';')[0];
|
||||
_MesEntity = segments[1].Split(';')[0];
|
||||
}
|
||||
ReportFullPath = reportFullPath;
|
||||
_ReportFullPath = reportFullPath;
|
||||
key = "PROCESS_JOBID=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
ProcessJobID = "R##";
|
||||
_ProcessJobID = "R##";
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
ProcessJobID = segments[1].Split(';')[0];
|
||||
_ProcessJobID = segments[1].Split(';')[0];
|
||||
}
|
||||
key = "MID=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
MID = "null";
|
||||
_MID = "null";
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
MID = segments[1].Split(';')[0];
|
||||
_MID = segments[1].Split(';')[0];
|
||||
}
|
||||
}
|
||||
Logistics2 logistics2;
|
||||
Tags = new List<string>();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
for (int i = 1; i < Logistics1.Count; i++)
|
||||
{
|
||||
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
||||
@ -180,29 +190,12 @@ public class Logistics : ILogistics
|
||||
}
|
||||
}
|
||||
|
||||
public Logistics ShallowCopy() => (Logistics)MemberwiseClone();
|
||||
|
||||
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
||||
|
||||
internal string GetLotViaMostCommonMethod() => MID.Substring(0, MID.Length - 2);
|
||||
|
||||
internal string GetPocketNumberViaMostCommonMethod() => MID.Substring(MID.Length - 2);
|
||||
|
||||
internal void Update(string dateTime, string processJobID, string mid)
|
||||
internal void Update(string mid, string processJobID)
|
||||
{
|
||||
if (!DateTime.TryParse(dateTime, out DateTime dateTimeCasted))
|
||||
dateTimeCasted = DateTime.Now;
|
||||
NullData = null;
|
||||
//JobID = Description.GetCellName();
|
||||
Sequence = dateTimeCasted.Ticks;
|
||||
DateTimeFromSequence = dateTimeCasted;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTimeCasted).TotalSeconds;
|
||||
//MesEntity = DefaultMesEntity(dateTime);
|
||||
//ReportFullPath = string.Empty;
|
||||
ProcessJobID = processJobID;
|
||||
MID = mid;
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_MID = mid;
|
||||
_ProcessJobID = processJobID;
|
||||
}
|
||||
|
||||
}
|
@ -12,7 +12,6 @@ public interface IFileRead : Properties.IFileRead
|
||||
JsonProperty[] GetDefault();
|
||||
string GetEventDescription();
|
||||
List<string> GetHeaderNames();
|
||||
void CheckTests(Test[] tests, bool extra);
|
||||
Dictionary<string, string> GetDisplayNamesJsonElement();
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> ReExtract();
|
||||
List<IDescription> GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData);
|
||||
|
300
Adaptation/Shared/Metrology/ScopeInfo.cs
Normal file
300
Adaptation/Shared/Metrology/ScopeInfo.cs
Normal file
@ -0,0 +1,300 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public class ScopeInfo : Properties.IScopeInfo
|
||||
{
|
||||
|
||||
public Test Test { get; private set; }
|
||||
public Enum Enum { get; private set; }
|
||||
public string HTML { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
public string FileName { get; private set; }
|
||||
public int TestValue { get; private set; }
|
||||
public string Header { get; private set; }
|
||||
public string QueryFilter { get; private set; }
|
||||
public string FileNameWithoutExtension { get; private set; }
|
||||
|
||||
public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "", string extraExtension = "")
|
||||
{
|
||||
Enum = test;
|
||||
Test = test;
|
||||
HTML = html;
|
||||
Title = title;
|
||||
FileName = fileName;
|
||||
TestValue = (int)test;
|
||||
Header = string.Empty;
|
||||
QueryFilter = queryFilter;
|
||||
FileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName);
|
||||
}
|
||||
|
||||
public ScopeInfo(Test test)
|
||||
{
|
||||
Enum = test;
|
||||
Test = test;
|
||||
TestValue = (int)test;
|
||||
switch (Test)
|
||||
{
|
||||
case Test.AFMRoughness:
|
||||
FileNameWithoutExtension = "afm_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "AFM Roughness";
|
||||
Title = "AFM";
|
||||
HTML = @"GaN Epi Data\10 - afm.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageCenter:
|
||||
FileNameWithoutExtension = "bv_iqs_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage";
|
||||
Title = "Breakdown Voltage-Center";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageEdge:
|
||||
FileNameWithoutExtension = "bv_iqs_01_Edge";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage - Edge";
|
||||
Title = "Breakdown Voltage-Edge";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageMiddle8in:
|
||||
FileNameWithoutExtension = "bv_iqs_01_Middle";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage - Middle";
|
||||
Title = "Breakdown Voltage-Middle (8 in)";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.CV:
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV";
|
||||
HTML = @"GaN Epi Data\05 - cv.html";
|
||||
break;
|
||||
case Test.MonthlyCV:
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV Monthly Verification";
|
||||
HTML = @"Metrology\07 - cv_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyCV:
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV Weekly Verification";
|
||||
HTML = @"Metrology\16 - cv_verif_weekly.html";
|
||||
break;
|
||||
case Test.CandelaKlarfDC:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count";
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaLaser:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;Pits;Tool ID;Defect Count";
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaVerify:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Concat("LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;RunID;Reactor;", "Slip Lines;Cracks;Epi Def;Haze Spot;Small LPD;Medium LPD;Large LPD;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count");
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaPSL:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "102-83nm";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaProdU:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "SPE verification";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.Denton:
|
||||
FileNameWithoutExtension = "denton_iqs_01";
|
||||
Header = "Tool;fDate;Run;Recipe;Operator;Name;Value";
|
||||
QueryFilter = "Denton_Voltage_AVG";
|
||||
Title = "Denton Data";
|
||||
HTML = @"Support Process\03 - ebeam02_denton_v1.html";
|
||||
break;
|
||||
case Test.Hall:
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Data";
|
||||
HTML = @"GaN Epi Data\04 - hall.html";
|
||||
break;
|
||||
case Test.MonthlyHall:
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Monthly Verification";
|
||||
HTML = @"Metrology\06 - hall_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyHall:
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Weekly Verification";
|
||||
HTML = @"Metrology\15 - hall_verif_weekly.html";
|
||||
break;
|
||||
case Test.Lehighton:
|
||||
FileNameWithoutExtension = "lei_iqs_01";
|
||||
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||
QueryFilter = "LEI RS Average value";
|
||||
Title = "Lehighton";
|
||||
HTML = @"GaN Epi Data\13 - lehighton.html";
|
||||
break;
|
||||
case Test.VerificationLehighton:
|
||||
FileNameWithoutExtension = "___";
|
||||
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||
QueryFilter = "___";
|
||||
Title = "LEI Weekly Verification 2 Ohm cm";
|
||||
HTML = @"Metrology\14 - lei_verif_weekly.html.html";
|
||||
break;
|
||||
case Test.Microscope:
|
||||
FileNameWithoutExtension = string.Empty;
|
||||
Header = string.Empty;
|
||||
QueryFilter = "Microscope Center 5x";
|
||||
Title = "Total Microscope Defects";
|
||||
HTML = string.Empty;
|
||||
break;
|
||||
case Test.RPMXY:
|
||||
FileNameWithoutExtension = "RPM_Data";
|
||||
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||
Title = "RPM XY Data ***&*** View Data";
|
||||
HTML = @"GaN Epi Data\09 - rpm --- 08 - photoluminescence.html";
|
||||
break;
|
||||
case Test.RPMAverage:
|
||||
FileNameWithoutExtension = "RPMdata-short";
|
||||
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||
QueryFilter = "Epi Thickness Mean";
|
||||
Title = "RPM Average Data";
|
||||
HTML = @"GaN Epi Data\09 - rpm.html";
|
||||
break;
|
||||
case Test.RPMPLRatio:
|
||||
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||
QueryFilter = "PL Ratio";
|
||||
Title = "Photoluminescence: PL Ratio";
|
||||
HTML = @"GaN Epi Data\08 - photoluminescence.html";
|
||||
break;
|
||||
case Test.DailyRPMXY:
|
||||
FileNameWithoutExtension = "RPM_Data";
|
||||
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||
Title = "";
|
||||
HTML = @"Metrology\?";
|
||||
break;
|
||||
case Test.DailyRPMAverage:
|
||||
FileNameWithoutExtension = "RPMdata-short";
|
||||
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||
QueryFilter = "Epi Thickness Mean";
|
||||
Title = "";
|
||||
HTML = @"Metrology\?";
|
||||
break;
|
||||
case Test.DailyRPMPLRatio:
|
||||
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||
QueryFilter = "PL Ratio";
|
||||
Title = "RPM Daily Verification";
|
||||
HTML = @"Metrology\17 - rpm_verif_daily.html";
|
||||
break;
|
||||
case Test.VerificationRPM:
|
||||
FileNameWithoutExtension = "PhotoLuminescence_Ver";
|
||||
Header = "Part;Process;Date;Test;Value";
|
||||
QueryFilter = "PL Edge Wavelength";
|
||||
Title = "PL Daily Verification - [PL Edge Wavelength]";
|
||||
HTML = @"Metrology\18 - photoluminescence_verif_daily.html";
|
||||
break;
|
||||
case Test.Photoreflectance:
|
||||
FileNameWithoutExtension = "photoreflect_iqs_01";
|
||||
Header = "Lot;Date;Part;Reactor;Scribe;Pocket;Tool;Point;WaferPosition_PR;PR_Peak";
|
||||
QueryFilter = "PR Barrier Composition";
|
||||
Title = "Photoreflectance 6 in, Photoreflectance 8 in";
|
||||
HTML = @"GaN Epi Data\07 - photoreflectance.html";
|
||||
break;
|
||||
case Test.UV:
|
||||
FileNameWithoutExtension = "uv_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "UV Broken";
|
||||
Title = "UV";
|
||||
HTML = @"GaN Epi Data\15 - uv 2.1.html";
|
||||
break;
|
||||
case Test.VpdIcpmsAnalyte:
|
||||
FileNameWithoutExtension = "VPD_iqs_01";
|
||||
Header = "Reactor;RunID;RunDate;PartNumber;PocketNumber;WaferScribe;Analyte;Value";
|
||||
QueryFilter = "Mg";
|
||||
Title = "VpdIcpmsAnalyteData";
|
||||
HTML = @"";
|
||||
break;
|
||||
case Test.WarpAndBow:
|
||||
FileNameWithoutExtension = "warp_iqs_01";
|
||||
Header = "fDate;fRecipeName;fProductId;g4Scribe;warp;bow;tool;Reactor;Pocket ID;bow_range;BowX;BowY;CenterBow";
|
||||
QueryFilter = "BowCenter";
|
||||
Title = "Warp and Bow";
|
||||
HTML = @"GaN Epi Data\14 - warp.html";
|
||||
break;
|
||||
case Test.VerificationWarpAndBow:
|
||||
FileNameWithoutExtension = "warp_ver_iqs_01";
|
||||
Header = "Part;Process;Date;WaferScribe;totWarp;bow";
|
||||
QueryFilter = "Bow Calibration";
|
||||
Title = "6 Inch Warp/Bow Daily Verification, 8 Inch Warp/Bow Daily Verification";
|
||||
HTML = @"Metrology\19 - warp_cal_daily.html";
|
||||
break;
|
||||
case Test.XRDXY:
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||
QueryFilter = "SL Period";
|
||||
Title = "XRD XY Raw Data Viewer";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
case Test.XRDWeightedAverage:
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01_WtAVG";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;Name;Value;Group";
|
||||
//QueryFilter = "Al% Barrier WTAVG";
|
||||
QueryFilter = "SL Period WTAVG";
|
||||
Title = "XRD Weighted Average Data";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
case Test.MonthlyXRD:
|
||||
FileNameWithoutExtension = "xrd_monthly_ver_iqs_01";
|
||||
Header = "Part;Process;Date;TestName;Value";
|
||||
QueryFilter = "XRD 2-Theta Position";
|
||||
Title = "XRD Monthly Verification";
|
||||
HTML = @"Metrology\03 - xrd_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyXRD:
|
||||
FileNameWithoutExtension = "xrd_weekly_ver_iqs_01";
|
||||
Header = "Part;Process;Lot;Date;TestName;Value";
|
||||
QueryFilter = "XRD Weekly AL% Center";
|
||||
Title = "XRD Weekly Verification";
|
||||
HTML = @"Metrology\12 - xrd_verif_weekly.html";
|
||||
break;
|
||||
case Test.JVXRD:
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||
QueryFilter = "SL Period";
|
||||
Title = "XRD XY Raw Data Viewer";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
default:
|
||||
throw new Exception();
|
||||
}
|
||||
FileName = string.Concat(FileNameWithoutExtension, ".txt");
|
||||
}
|
||||
|
||||
public ScopeInfo ShallowCopy() => (ScopeInfo)MemberwiseClone();
|
||||
|
||||
}
|
30
Adaptation/Shared/Metrology/WS.Attachment.cs
Normal file
30
Adaptation/Shared/Metrology/WS.Attachment.cs
Normal file
@ -0,0 +1,30 @@
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public partial class WS
|
||||
{
|
||||
|
||||
public class Attachment
|
||||
{
|
||||
|
||||
public string SubGroupId { get; set; }
|
||||
public long HeaderId { get; set; }
|
||||
public string HeaderIdDirectory { get; set; }
|
||||
public string UniqueId { get; set; }
|
||||
public string DestinationFileName { get; set; }
|
||||
public string SourceFileName { get; set; }
|
||||
public string AttachmentId { get; set; }
|
||||
|
||||
public Attachment(string subGroupId, long headerId, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName)
|
||||
{
|
||||
SubGroupId = subGroupId;
|
||||
HeaderId = headerId;
|
||||
HeaderIdDirectory = headerIdDirectory;
|
||||
UniqueId = uniqueId;
|
||||
DestinationFileName = destinationFileName;
|
||||
SourceFileName = sourceFileName;
|
||||
AttachmentId = System.Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
27
Adaptation/Shared/Metrology/WS.Results.cs
Normal file
27
Adaptation/Shared/Metrology/WS.Results.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public partial class WS
|
||||
{
|
||||
// this class represents the response from the Inbound API endpoint
|
||||
public class Results
|
||||
{
|
||||
// true or false if data was written to the database
|
||||
public bool Success { get; set; }
|
||||
|
||||
// if true, contains ID of the Header record in the database
|
||||
public long HeaderID { get; set; }
|
||||
|
||||
// if false, this collection will contain a list of errors
|
||||
public List<string> Errors { get; set; }
|
||||
|
||||
// this collection will contain a list of warnings, they will not prevent data from being saved
|
||||
public List<string> Warnings { get; set; }
|
||||
|
||||
// this is just a helper function to make displaying the results easier
|
||||
public override string ToString() => JsonSerializer.Serialize(this, GetType());
|
||||
}
|
||||
|
||||
}
|
123
Adaptation/Shared/Metrology/WS.cs
Normal file
123
Adaptation/Shared/Metrology/WS.cs
Normal file
@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public partial class WS
|
||||
{
|
||||
|
||||
public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120)
|
||||
{
|
||||
Results results = new();
|
||||
string resultsJson = string.Empty;
|
||||
try
|
||||
{
|
||||
string json = JsonSerializer.Serialize(payload, payload.GetType());
|
||||
if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains("."))
|
||||
throw new Exception("Invalid URL");
|
||||
using (HttpClient httpClient = new())
|
||||
{
|
||||
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||
HttpRequestMessage httpRequestMessage = new()
|
||||
{
|
||||
RequestUri = new Uri(url),
|
||||
Method = HttpMethod.Post,
|
||||
Content = new StringContent(json, Encoding.UTF8, "application/json")
|
||||
};
|
||||
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
string checkDirectory = Path.Combine(directory, $"-{results.HeaderID}");
|
||||
if (!Directory.Exists(checkDirectory))
|
||||
_ = Directory.CreateDirectory(checkDirectory);
|
||||
File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json);
|
||||
}
|
||||
if (!results.Success)
|
||||
results.Errors.Add(results.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Exception exception = e;
|
||||
StringBuilder stringBuilder = new();
|
||||
while (exception is not null)
|
||||
{
|
||||
_ = stringBuilder.AppendLine(exception.Message);
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
results.Errors ??= new List<string>();
|
||||
results.Errors.Add(resultsJson);
|
||||
results.Errors.Add(stringBuilder.ToString());
|
||||
}
|
||||
return new(resultsJson, results);
|
||||
}
|
||||
|
||||
public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
|
||||
{
|
||||
using HttpClient httpClient = new();
|
||||
string json = JsonSerializer.Serialize(attachment);
|
||||
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||
StringContent httpContent = new(json, Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage httpResponseMessage = httpClient.PostAsync($"{url}/attachment", httpContent).Result;
|
||||
if (!httpResponseMessage.IsSuccessStatusCode)
|
||||
{
|
||||
string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
throw new Exception($"Attachment failed: {resultBody}");
|
||||
}
|
||||
}
|
||||
|
||||
public static void AttachFiles(string url, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null)
|
||||
{
|
||||
string directory;
|
||||
try
|
||||
{
|
||||
if (headerAttachments is not null)
|
||||
{
|
||||
foreach (Attachment attachment in headerAttachments)
|
||||
{
|
||||
directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception();
|
||||
if (!Directory.Exists(directory))
|
||||
_ = Directory.CreateDirectory(directory);
|
||||
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
|
||||
}
|
||||
}
|
||||
if (dataAttachments is not null)
|
||||
{
|
||||
foreach (Attachment attachment in dataAttachments)
|
||||
{
|
||||
directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception();
|
||||
if (!Directory.Exists(directory))
|
||||
_ = Directory.CreateDirectory(directory);
|
||||
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
|
||||
}
|
||||
}
|
||||
if (headerAttachments is not null)
|
||||
{
|
||||
foreach (Attachment attachment in headerAttachments)
|
||||
AttachFile(url, attachment);
|
||||
}
|
||||
if (dataAttachments is not null)
|
||||
{
|
||||
foreach (Attachment attachment in dataAttachments)
|
||||
AttachFile(url, attachment);
|
||||
}
|
||||
//MessageBox.Show(r.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Exception exception = e;
|
||||
StringBuilder stringBuilder = new();
|
||||
while (exception is not null)
|
||||
{
|
||||
_ = stringBuilder.AppendLine(exception.Message);
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
//MessageBox.Show(msgs.ToString(), "Exception", //MessageBoxButtons.OK, //MessageBoxIcon.Error);
|
||||
throw new Exception(stringBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -12,8 +12,6 @@ namespace Adaptation.Shared;
|
||||
public class ProcessDataStandardFormat
|
||||
{
|
||||
|
||||
public const string RecordStart = "RECORD_START";
|
||||
|
||||
public enum SearchFor
|
||||
{
|
||||
EquipmentIntegration = 1,
|
||||
@ -25,7 +23,7 @@ public class ProcessDataStandardFormat
|
||||
public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText)
|
||||
{
|
||||
string result;
|
||||
if (!jsonElements.Any())
|
||||
if (jsonElements.Length == 0)
|
||||
result = string.Empty;
|
||||
else
|
||||
{
|
||||
@ -93,8 +91,7 @@ public class ProcessDataStandardFormat
|
||||
string segment;
|
||||
List<string> body = new();
|
||||
StringBuilder logistics = new();
|
||||
if (lines is null)
|
||||
lines = File.ReadAllLines(reportFullPath);
|
||||
lines ??= File.ReadAllLines(reportFullPath);
|
||||
string[] segments;
|
||||
if (lines.Length < 7)
|
||||
segments = Array.Empty<string>();
|
||||
@ -149,7 +146,7 @@ public class ProcessDataStandardFormat
|
||||
string logistics = pdsf.Item1;
|
||||
string[] columns = pdsf.Item2;
|
||||
string[] bodyLines = pdsf.Item3;
|
||||
if (!bodyLines.Any() || !bodyLines[0].Contains('\t'))
|
||||
if (bodyLines.Length == 0 || !bodyLines[0].Contains('\t'))
|
||||
results = JsonSerializer.Deserialize<JsonElement[]>("[]");
|
||||
else
|
||||
{
|
||||
@ -214,9 +211,10 @@ public class ProcessDataStandardFormat
|
||||
public static Tuple<string, Dictionary<Test, Dictionary<string, List<string>>>> GetTestDictionary(Tuple<string, string[], string[]> pdsf)
|
||||
{
|
||||
Dictionary<Test, Dictionary<string, List<string>>> results = new();
|
||||
List<string> collection;
|
||||
string testColumn = nameof(Test);
|
||||
Dictionary<string, List<string>> keyValuePairs = GetDictionary(pdsf);
|
||||
if (!keyValuePairs.ContainsKey(testColumn))
|
||||
if (!keyValuePairs.TryGetValue(testColumn, out collection))
|
||||
throw new Exception();
|
||||
int min;
|
||||
int max;
|
||||
@ -224,9 +222,9 @@ public class ProcessDataStandardFormat
|
||||
List<string> vs;
|
||||
string columnKey;
|
||||
Dictionary<Test, List<int>> tests = new();
|
||||
for (int i = 0; i < keyValuePairs[testColumn].Count; i++)
|
||||
for (int i = 0; i < collection.Count; i++)
|
||||
{
|
||||
if (Enum.TryParse(keyValuePairs[testColumn][i], out Test test))
|
||||
if (Enum.TryParse(collection[i], out Test test))
|
||||
{
|
||||
if (!results.ContainsKey(test))
|
||||
{
|
||||
@ -278,8 +276,7 @@ public class ProcessDataStandardFormat
|
||||
public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List<string> names, Dictionary<string, List<string>> keyValuePairs, string dateFormat, string timeFormat, List<string> pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List<string> ignoreParameterNames = null)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (ignoreParameterNames is null)
|
||||
ignoreParameterNames = new List<string>();
|
||||
ignoreParameterNames ??= new List<string>();
|
||||
if (useDateTimeFromSequence && !string.IsNullOrEmpty(format))
|
||||
throw new Exception();
|
||||
else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format))
|
||||
@ -329,7 +326,7 @@ public class ProcessDataStandardFormat
|
||||
_ = line.Append(';');
|
||||
}
|
||||
}
|
||||
if (!pairedParameterNames.Any())
|
||||
if (pairedParameterNames.Count == 0)
|
||||
{
|
||||
_ = line.Remove(line.Length - 1, 1);
|
||||
_ = result.AppendLine(line.ToString());
|
||||
@ -348,8 +345,8 @@ public class ProcessDataStandardFormat
|
||||
int startsAt = 0;
|
||||
string[] segments;
|
||||
int? currentGroup = null;
|
||||
char inputSeperator = '\t';
|
||||
char outputSeperator = '\t';
|
||||
char inputSeparator = '\t';
|
||||
char outputSeparator = '\t';
|
||||
List<int> vs = new();
|
||||
List<int[]> groups = new();
|
||||
string[] lines = File.ReadAllLines(reportFullPath);
|
||||
@ -358,9 +355,8 @@ public class ProcessDataStandardFormat
|
||||
{
|
||||
if (string.IsNullOrEmpty(lines[i]))
|
||||
continue;
|
||||
segments = lines[i].Split(inputSeperator);
|
||||
if (currentGroup is null)
|
||||
currentGroup = segments.Length;
|
||||
segments = lines[i].Split(inputSeparator);
|
||||
currentGroup ??= segments.Length;
|
||||
if (segments.Length != currentGroup)
|
||||
{
|
||||
currentGroup = segments.Length;
|
||||
@ -368,20 +364,20 @@ public class ProcessDataStandardFormat
|
||||
startsAt = i;
|
||||
}
|
||||
}
|
||||
if (startsAt == lines.Length - 1 && lines[0].Split(inputSeperator).Length != currentGroup)
|
||||
if (startsAt == lines.Length - 1 && lines[0].Split(inputSeparator).Length != currentGroup)
|
||||
groups.Add(new int[] { lines.Length - 1, lines.Length - 1 });
|
||||
for (int g = 0; g < groups.Count; g++)
|
||||
{
|
||||
vs.Clear();
|
||||
group = groups[g];
|
||||
line = lines[group[0]];
|
||||
segments = line.Split(inputSeperator);
|
||||
segments = line.Split(inputSeparator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
vs.Add(segments[s].Length);
|
||||
for (int i = group[0]; i <= group[1]; i++)
|
||||
{
|
||||
line = lines[i];
|
||||
segments = line.Split(inputSeperator);
|
||||
segments = line.Split(inputSeparator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
{
|
||||
if (vs[s] < segments[s].Length)
|
||||
@ -390,16 +386,16 @@ public class ProcessDataStandardFormat
|
||||
}
|
||||
_ = stringBuilder.Clear();
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
_ = stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeperator);
|
||||
_ = stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeparator);
|
||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
results.Add(stringBuilder.ToString());
|
||||
for (int i = group[0]; i <= group[1]; i++)
|
||||
{
|
||||
line = lines[i];
|
||||
_ = stringBuilder.Clear();
|
||||
segments = line.Split(inputSeperator);
|
||||
segments = line.Split(inputSeparator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
_ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeperator);
|
||||
_ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeparator);
|
||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
results.Add(stringBuilder.ToString());
|
||||
}
|
||||
|
@ -6,5 +6,6 @@ public interface IDescription
|
||||
int Test { get; }
|
||||
int Count { get; }
|
||||
int Index { get; }
|
||||
string RDS { get; }
|
||||
|
||||
}
|
@ -7,6 +7,7 @@ public interface IFileRead
|
||||
string MesEntity { get; }
|
||||
bool IsEAFHosted { get; }
|
||||
string EventName { get; }
|
||||
bool IsDuplicator { get; }
|
||||
string EquipmentType { get; }
|
||||
string ReportFullPath { get; }
|
||||
string CellInstanceName { get; }
|
||||
|
@ -1,22 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Adaptation.Shared.Properties;
|
||||
|
||||
public interface ILogistics
|
||||
{
|
||||
|
||||
public object NullData { get; }
|
||||
public string JobID { get; } //CellName
|
||||
public long Sequence { get; } //Ticks
|
||||
public DateTime DateTimeFromSequence { get; }
|
||||
public FileInfo FileInfo { get; }
|
||||
public string JobID { get; }
|
||||
public List<string> Logistics1 { get; }
|
||||
public List<Logistics2> Logistics2 { get; }
|
||||
public string MID { get; }
|
||||
public string MesEntity { get; }
|
||||
public object NullData { get; }
|
||||
public string ProcessJobID { get; }
|
||||
public string ReportFullPath { get; }
|
||||
public long Sequence { get; }
|
||||
public double TotalSecondsSinceLastWriteTimeFromSequence { get; }
|
||||
public string MesEntity { get; } //SPC
|
||||
public string ReportFullPath { get; } //Extract file
|
||||
public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics)
|
||||
public string MID { get; set; } //Lot & Pocket || Lot
|
||||
public List<string> Tags { get; set; }
|
||||
public List<string> Logistics1 { get; set; }
|
||||
public List<Logistics2> Logistics2 { get; set; }
|
||||
|
||||
}
|
@ -14,6 +14,7 @@ public enum Test
|
||||
CandelaPSL = 38,
|
||||
CandelaVerify = 37,
|
||||
CDE = 24,
|
||||
Climatec = 54, //Largest
|
||||
CV = 3,
|
||||
DailyRPMAverage = 19,
|
||||
DailyRPMPLRatio = 20,
|
||||
@ -21,7 +22,7 @@ public enum Test
|
||||
Denton = 9,
|
||||
DiffusionLength = 45,
|
||||
GRATXTCenter = 51,
|
||||
GRATXTEdge = 52, //Largest
|
||||
GRATXTEdge = 52,
|
||||
GrowthRateXML = 50,
|
||||
Hall = 10,
|
||||
HgCV = 23,
|
||||
@ -38,6 +39,7 @@ public enum Test
|
||||
RPMPLRatio = 17,
|
||||
RPMXY = 15,
|
||||
SP1 = 8,
|
||||
SRP2100 = 53,
|
||||
Tencor = 7,
|
||||
UV = 35,
|
||||
VerificationLehighton = 14,
|
||||
|
@ -1,16 +1,13 @@
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
namespace _Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM : EAFLoggingUnitTesting
|
||||
@ -19,23 +16,23 @@ public class DEP08SIASM : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public DEP08SIASM() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public DEP08SIASM(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new DEP08SIASM(testContext);
|
||||
EAFLoggingUnitTesting ??= new DEP08SIASM(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
@ -45,100 +42,126 @@ public class DEP08SIASM : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM()
|
||||
{
|
||||
string check = "~IsXToOpenInsightMetrologyViewer";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_()
|
||||
{
|
||||
string check = "~IsXToIQSSi";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__()
|
||||
{
|
||||
string check = "~IsXToOpenInsight";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM___()
|
||||
{
|
||||
string check = "~IsXToOpenInsightMetrologyViewerAttachments";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM____()
|
||||
{
|
||||
string check = "~IsXToAPC";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____()
|
||||
{
|
||||
string check = "~IsXToSPaCe";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM______()
|
||||
{
|
||||
string check = "~IsXToArchive";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______()
|
||||
{
|
||||
string check = "~IsArchive";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM________()
|
||||
{
|
||||
string check = "~IsDummy";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,13 +1,13 @@
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Shared;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace _Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R34_EQPT : EAFLoggingUnitTesting
|
||||
@ -16,23 +16,23 @@ public class R34_EQPT : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R34_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R34_EQPT() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R34_EQPT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new R34_EQPT(testContext);
|
||||
EAFLoggingUnitTesting ??= new R34_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
@ -42,20 +42,22 @@ public class R34_EQPT : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile()
|
||||
{
|
||||
string check = ".jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,13 +1,13 @@
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Shared;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace _Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R34 : EAFLoggingUnitTesting
|
||||
@ -16,23 +16,23 @@ public class R34 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R34 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R34() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R34(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new R34(testContext);
|
||||
EAFLoggingUnitTesting ??= new R34(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
@ -42,20 +42,22 @@ public class R34 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R34__jpeg()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,13 +1,13 @@
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Shared;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace _Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R36_EQPT : EAFLoggingUnitTesting
|
||||
@ -16,23 +16,23 @@ public class R36_EQPT : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R36_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R36_EQPT() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R36_EQPT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new R36_EQPT(testContext);
|
||||
EAFLoggingUnitTesting ??= new R36_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
@ -42,20 +42,22 @@ public class R36_EQPT : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R36_EQPT__DownloadJpegFile()
|
||||
{
|
||||
string check = ".jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,13 +1,13 @@
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Shared;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace _Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R36 : EAFLoggingUnitTesting
|
||||
@ -16,23 +16,23 @@ public class R36 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R36 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R36() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R36(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new R36(testContext);
|
||||
EAFLoggingUnitTesting ??= new R36(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
@ -42,20 +42,22 @@ public class R36 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R36__jpeg()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = Helpers.Deposition.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,180 @@
|
||||
#if v2_43_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new DEP08SIASM(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__IQSSi()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__OpenInsight()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__APC()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__SPaCe()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__Processed()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__Archive()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__Dummy()
|
||||
{
|
||||
string check = "637400762024374000.zip";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
#if v2_43_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R34_EQPT : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R34_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R34_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile()
|
||||
{
|
||||
string check = ".jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
#if v2_43_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R34 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R34 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R34(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R34__jpeg()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
#if v2_43_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R36_EQPT : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R36_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R36_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R36_EQPT__DownloadJpegFile()
|
||||
{
|
||||
string check = ".jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
#if v2_43_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R36 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R36 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R36(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R36__jpeg()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,180 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new DEP08SIASM(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__IQSSi()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__OpenInsight()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__APC()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__SPaCe()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__Processed()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__Archive()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__Dummy()
|
||||
{
|
||||
string check = "637400762024374000.zip";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class R34_EQPT : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R34_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R34_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile()
|
||||
{
|
||||
string check = ".jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,65 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class R34 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R34 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static R34() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||
|
||||
public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R34(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R34__jpeg()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class R36_EQPT : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R36_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R36_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R36_EQPT__DownloadJpegFile()
|
||||
{
|
||||
string check = ".jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,65 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class R36 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static R36 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static R36() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||
|
||||
public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new R36(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R36__jpeg()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,17 +1,11 @@
|
||||
#if v2_39_2
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
namespace _Tests.Extract.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM
|
||||
@ -29,15 +23,27 @@ public class DEP08SIASM
|
||||
_DEP08SIASM = CreateSelfDescription.Staging.v2_39_2.DEP08SIASM.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM__();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__637825304581476827__Normal()
|
||||
{
|
||||
@ -47,22 +53,38 @@ public class DEP08SIASM
|
||||
string[] variables = _DEP08SIASM.AdaptationTesting.GetVariables(methodBase, check);
|
||||
IFileRead fileRead = _DEP08SIASM.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Helpers.Deposition.ReExtractComapareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM___() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM___();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM____();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM______();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______();
|
||||
|
||||
}
|
||||
#endif
|
@ -1,14 +1,7 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace _Tests.Extract.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R34_EQPT
|
||||
@ -26,10 +19,17 @@ public class R34_EQPT
|
||||
_R34_EQPT = CreateSelfDescription.Staging.v2_39_2.R34_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile();
|
||||
|
||||
}
|
||||
#endif
|
@ -1,14 +1,11 @@
|
||||
#if v2_39_2
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace _Tests.Extract.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R34
|
||||
@ -26,9 +23,15 @@ public class R34
|
||||
_R34 = CreateSelfDescription.Staging.v2_39_2.R34.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R34__jpeg() => _R34.Staging__v2_39_2__R34__jpeg();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R34__jpeg637812143477007703__Normal()
|
||||
{
|
||||
@ -38,7 +41,8 @@ public class R34
|
||||
string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check);
|
||||
IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Helpers.Deposition.ReExtractComapareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,14 +1,7 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace _Tests.Extract.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R36_EQPT
|
||||
@ -26,7 +19,11 @@ public class R36_EQPT
|
||||
_R36_EQPT = CreateSelfDescription.Staging.v2_39_2.R36_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_39_2__R36_EQPT__DownloadJpegFile();
|
||||
|
||||
}
|
||||
#endif
|
@ -1,14 +1,7 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
#if v2_39_2
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace _Tests.Extract.Staging.v2_39_2;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_39_2;
|
||||
|
||||
[TestClass]
|
||||
public class R36
|
||||
@ -26,7 +19,11 @@ public class R36
|
||||
_R36 = CreateSelfDescription.Staging.v2_39_2.R36.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_2__R36__jpeg() => _R36.Staging__v2_39_2__R36__jpeg();
|
||||
|
||||
}
|
||||
#endif
|
83
Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIASM.cs
Normal file
83
Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIASM.cs
Normal file
@ -0,0 +1,83 @@
|
||||
#if v2_43_0
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.DEP08SIASM _DEP08SIASM;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.DEP08SIASM.ClassInitialize(testContext);
|
||||
_DEP08SIASM = CreateSelfDescription.Staging.v2_43_4.DEP08SIASM.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__IQSSi();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsight();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__APC();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__SPaCe();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Processed();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Archive();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Dummy();
|
||||
|
||||
}
|
||||
#endif
|
35
Adaptation/_Tests/Extract/Staging/v2.43.0/R34-EQPT.cs
Normal file
35
Adaptation/_Tests/Extract/Staging/v2.43.0/R34-EQPT.cs
Normal file
@ -0,0 +1,35 @@
|
||||
#if v2_43_0
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R34_EQPT
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.R34_EQPT _R34_EQPT;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.R34_EQPT.ClassInitialize(testContext);
|
||||
_R34_EQPT = CreateSelfDescription.Staging.v2_43_4.R34_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_43_4__R34_EQPT__DownloadJpegFile();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_43_4__R34_EQPT__DownloadJpegFile();
|
||||
|
||||
}
|
||||
#endif
|
71
Adaptation/_Tests/Extract/Staging/v2.43.0/R34.cs
Normal file
71
Adaptation/_Tests/Extract/Staging/v2.43.0/R34.cs
Normal file
@ -0,0 +1,71 @@
|
||||
#if v2_43_0
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R34
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.R34 _R34;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.R34.ClassInitialize(testContext);
|
||||
_R34 = CreateSelfDescription.Staging.v2_43_4.R34.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R34__jpeg() => _R34.Staging__v2_43_4__R34__jpeg();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R34__jpeg638000598531758005__Normal()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
_R34.Staging__v2_43_4__R34__jpeg();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check);
|
||||
IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||
// var uri = $"http://{hostip}/set_output?input=0&output=0&venc_framerate={venc_framerate}&venc_gop={venc_gop}&venc_width={venc_width}&venc_height={venc_height}&venc_bitrate={venc_bitrate}&http_ts_uri={http_ts_uri}&http_flv_uri={http_flv_uri}&rtsp_uri={rtsp_uri}&rtmp_enable={rtmp_enable}&rtmp_uri={rtmp_uri}&rtmp_publish_uri={rtmp_publish_uri}&rtmp_publish_enable={rtmp_publish_enable}&http_ts_enable={http_ts_enable}&http_flv_enable={http_flv_enable}&rtsp_enable={rtsp_enable}&venc_profile={venc_profile}&http_hls_uri={http_hls_uri}&http_hls_enable={http_hls_enable}&venc_width_height_same_as_input={venc_width_height_same_as_input}&multicast_ip={multicast_ip}&multicast_port={multicast_port}&multicast_enable={multicast_enable}&venc_codec={venc_codec}&srt_enable={srt_enable}&srt_port={srt_port}&srt_publish_enable={srt_publish_enable}&srt_publish_uri={srt_publish_uri}&srt_key={srt_key}&srt_key_enable={srt_key_enable}&max_qp={venc_max_qp}";
|
||||
// if (venc_rc_mode == "5")
|
||||
// {
|
||||
// uri += $"&ts_muxrate={venc_bitrate};
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// uri += $"&venc_rc_mode={venc_rc_mode}&ts_muxrate=0";
|
||||
// }
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=30&venc_gop=30&venc_width=1920&venc_height=1080&venc_bitrate=2800&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307410424
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326370050
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326507855
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326566457
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326739485
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326928562
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327093005
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327167711
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327315199
|
||||
// http://10.95.154.28/set_adv?vga_auto_adjust=1
|
||||
// http://10.95.154.28/set_time?sync_time=
|
||||
// http://10.95.154.28/set_time?sync_time=1655307949&_=1655307949299
|
||||
// http://10.95.154.28/get_status?_=1655307702476
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
29
Adaptation/_Tests/Extract/Staging/v2.43.0/R36-EQPT.cs
Normal file
29
Adaptation/_Tests/Extract/Staging/v2.43.0/R36-EQPT.cs
Normal file
@ -0,0 +1,29 @@
|
||||
#if v2_43_0
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R36_EQPT
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.R36_EQPT _R36_EQPT;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.R36_EQPT.ClassInitialize(testContext);
|
||||
_R36_EQPT = CreateSelfDescription.Staging.v2_43_4.R36_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_43_4__R36_EQPT__DownloadJpegFile();
|
||||
|
||||
}
|
||||
#endif
|
29
Adaptation/_Tests/Extract/Staging/v2.43.0/R36.cs
Normal file
29
Adaptation/_Tests/Extract/Staging/v2.43.0/R36.cs
Normal file
@ -0,0 +1,29 @@
|
||||
#if v2_43_0
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class R36
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.R36 _R36;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.R36.ClassInitialize(testContext);
|
||||
_R36 = CreateSelfDescription.Staging.v2_43_4.R36.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__R36__jpeg() => _R36.Staging__v2_43_4__R36__jpeg();
|
||||
|
||||
}
|
||||
#endif
|
83
Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIASM.cs
Normal file
83
Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIASM.cs
Normal file
@ -0,0 +1,83 @@
|
||||
#if true
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_56_0.DEP08SIASM _DEP08SIASM;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_56_0.DEP08SIASM.ClassInitialize(testContext);
|
||||
_DEP08SIASM = CreateSelfDescription.Staging.v2_56_0.DEP08SIASM.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__IQSSi();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsight();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__APC();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__SPaCe();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Processed();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Archive();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Dummy();
|
||||
|
||||
}
|
||||
#endif
|
31
Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs
Normal file
31
Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs
Normal file
@ -0,0 +1,31 @@
|
||||
#if true
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class R34_EQPT
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_56_0.R34_EQPT _R34_EQPT;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_56_0.R34_EQPT.ClassInitialize(testContext);
|
||||
_R34_EQPT = CreateSelfDescription.Staging.v2_56_0.R34_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile();
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile();
|
||||
|
||||
}
|
||||
#endif
|
71
Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs
Normal file
71
Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs
Normal file
@ -0,0 +1,71 @@
|
||||
#if true
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
|
||||
|
||||
[TestClass]
|
||||
public class R34
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_56_0.R34 _R34;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_56_0.R34.ClassInitialize(testContext);
|
||||
_R34 = CreateSelfDescription.Staging.v2_56_0.R34.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R34__jpeg() => _R34.Staging__v2_56_0__R34__jpeg();
|
||||
|
||||
#if (!DEBUG)
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_56_0__R34__jpeg638000598531758005__Normal()
|
||||
{
|
||||
string check = "*.jpeg";
|
||||
_R34.Staging__v2_56_0__R34__jpeg();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check);
|
||||
IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||
// var uri = $"http://{hostip}/set_output?input=0&output=0&venc_framerate={venc_framerate}&venc_gop={venc_gop}&venc_width={venc_width}&venc_height={venc_height}&venc_bitrate={venc_bitrate}&http_ts_uri={http_ts_uri}&http_flv_uri={http_flv_uri}&rtsp_uri={rtsp_uri}&rtmp_enable={rtmp_enable}&rtmp_uri={rtmp_uri}&rtmp_publish_uri={rtmp_publish_uri}&rtmp_publish_enable={rtmp_publish_enable}&http_ts_enable={http_ts_enable}&http_flv_enable={http_flv_enable}&rtsp_enable={rtsp_enable}&venc_profile={venc_profile}&http_hls_uri={http_hls_uri}&http_hls_enable={http_hls_enable}&venc_width_height_same_as_input={venc_width_height_same_as_input}&multicast_ip={multicast_ip}&multicast_port={multicast_port}&multicast_enable={multicast_enable}&venc_codec={venc_codec}&srt_enable={srt_enable}&srt_port={srt_port}&srt_publish_enable={srt_publish_enable}&srt_publish_uri={srt_publish_uri}&srt_key={srt_key}&srt_key_enable={srt_key_enable}&max_qp={venc_max_qp}";
|
||||
// if (venc_rc_mode == "5")
|
||||
// {
|
||||
// uri += $"&ts_muxrate={venc_bitrate};
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// uri += $"&venc_rc_mode={venc_rc_mode}&ts_muxrate=0";
|
||||
// }
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=30&venc_gop=30&venc_width=1920&venc_height=1080&venc_bitrate=2800&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307410424
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326370050
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326507855
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326566457
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326739485
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326928562
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327093005
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327167711
|
||||
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327315199
|
||||
// http://10.95.154.28/set_adv?vga_auto_adjust=1
|
||||
// http://10.95.154.28/set_time?sync_time=
|
||||
// http://10.95.154.28/set_time?sync_time=1655307949&_=1655307949299
|
||||
// http://10.95.154.28/get_status?_=1655307702476
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,189 +0,0 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace _Tests.Helpers;
|
||||
|
||||
public class Deposition
|
||||
{
|
||||
|
||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string fileFullName)
|
||||
{
|
||||
Tuple<string, string[], string[]> results;
|
||||
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(fileFullName);
|
||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string searchDirectory, string searchPattern)
|
||||
{
|
||||
Tuple<string, string[], string[]> results;
|
||||
if (searchPattern.Length > 3 && !searchPattern.Contains('*') && File.Exists(searchPattern))
|
||||
results = GetLogisticsColumnsAndBody(searchPattern);
|
||||
else
|
||||
{
|
||||
string[] pdsfFiles;
|
||||
pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (!pdsfFiles.Any())
|
||||
_ = Process.Start("explorer.exe", searchDirectory);
|
||||
Assert.IsTrue(pdsfFiles.Any(), "GetFiles check");
|
||||
results = GetLogisticsColumnsAndBody(pdsfFiles[0]);
|
||||
}
|
||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(IFileRead fileRead, Logistics logistics, Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult, Tuple<string, string[], string[]> pdsf)
|
||||
{
|
||||
Tuple<string, string[], string[]> results;
|
||||
string text = ProcessDataStandardFormat.GetPDSFText(fileRead, logistics, extractResult.Item3, logisticsText: pdsf.Item1);
|
||||
string[] lines = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
|
||||
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(logistics.ReportFullPath, lines);
|
||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static string[] GetItem2(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
{
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||
string jsonOld = JsonSerializer.Serialize(pdsf.Item2, pdsf.Item2.GetType(), jsonSerializerOptions);
|
||||
string jsonNew = JsonSerializer.Serialize(pdsfNew.Item2, pdsfNew.Item2.GetType(), jsonSerializerOptions);
|
||||
return new string[] { jsonOld, jsonNew };
|
||||
}
|
||||
|
||||
internal static string[] GetItem3(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
{
|
||||
string joinOld = string.Join(Environment.NewLine, from l in pdsf.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||
string joinNew = string.Join(Environment.NewLine, from l in pdsfNew.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||
return new string[] { joinOld, joinNew };
|
||||
}
|
||||
|
||||
internal static void UpdatePassDirectory(string searchDirectory)
|
||||
{
|
||||
DateTime dateTime = DateTime.Now;
|
||||
try
|
||||
{ Directory.SetLastWriteTime(searchDirectory, dateTime); }
|
||||
catch (System.Exception) { }
|
||||
string ticksDirectory = Path.GetDirectoryName(searchDirectory);
|
||||
try
|
||||
{ Directory.SetLastWriteTime(ticksDirectory, dateTime); }
|
||||
catch (System.Exception) { }
|
||||
string[] directories = Directory.GetDirectories(searchDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
try
|
||||
{ Directory.SetLastWriteTime(directory, dateTime); }
|
||||
catch (System.Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
internal static string GetFileName(MethodBase methodBase)
|
||||
{
|
||||
string result;
|
||||
string connectionName;
|
||||
string seperator = "__";
|
||||
string connectionNameAndTicks;
|
||||
string[] segments = methodBase.Name.Split(new string[] { seperator }, StringSplitOptions.None);
|
||||
string environment = segments[0];
|
||||
string rawVersionName = segments[1];
|
||||
string equipmentTypeDirectory = segments[2];
|
||||
string ticks = DateTime.Now.Ticks.ToString();
|
||||
string comment = segments[segments.Length - 1];
|
||||
string versionName = segments[1].Replace('_', '.');
|
||||
string before = string.Concat(environment, seperator, rawVersionName, seperator, equipmentTypeDirectory, seperator);
|
||||
string after = methodBase.Name.Substring(before.Length);
|
||||
if (after.Length < ticks.Length)
|
||||
{
|
||||
connectionName = after;
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length);
|
||||
connectionName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length);
|
||||
ticks = connectionNameAndTicks.Substring(connectionName.Length);
|
||||
}
|
||||
result = Path.Combine(environment, equipmentTypeDirectory, versionName, $"{environment}__{rawVersionName}__{equipmentTypeDirectory}__{connectionName}", ticks, $"{connectionName.Replace('_', '-')}.json");
|
||||
if (result.Contains('/'))
|
||||
result = string.Concat('/', result);
|
||||
else
|
||||
result = string.Concat('\\', result);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static void CompareSaveTSV(string textFileDirectory, string[] join)
|
||||
{
|
||||
if (join[0] != join[1])
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.tsv"), join[0]);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.tsv"), join[1]);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void CompareSaveJSON(string textFileDirectory, string[] json)
|
||||
{
|
||||
if (json[0] != json[1])
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.json"), json[0]);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.json"), json[1]);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void CompareSave(string textFileDirectory, Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
{
|
||||
if (pdsf.Item1 != pdsfNew.Item1)
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.dat"), pdsf.Item1);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.dat"), pdsfNew.Item1);
|
||||
}
|
||||
}
|
||||
|
||||
internal static IFileRead GetWriteConfigurationGetFileRead(MethodBase methodBase, string check, Shared.AdaptationTesting adaptationTesting)
|
||||
{
|
||||
IFileRead result;
|
||||
string[] fileNameAndJson = adaptationTesting.GetConfiguration(methodBase);
|
||||
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||
result = adaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||
Assert.IsFalse(string.IsNullOrEmpty(result.CellInstanceConnectionName));
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string ReExtractComapareUpdatePassDirectory(string[] variables, IFileRead fileRead, Logistics logistics)
|
||||
{
|
||||
string result;
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]);
|
||||
Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
|
||||
CompareSave(variables[5], pdsf, pdsfNew);
|
||||
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
|
||||
string[] json = GetItem2(pdsf, pdsfNew);
|
||||
CompareSaveJSON(variables[5], json);
|
||||
Assert.IsTrue(json[0] == json[1], "Item2 check!");
|
||||
string[] join = GetItem3(pdsf, pdsfNew);
|
||||
CompareSaveTSV(variables[5], join);
|
||||
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
|
||||
UpdatePassDirectory(variables[2]);
|
||||
result = extractResult.Item1;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -1,164 +0,0 @@
|
||||
// using Adaptation.Shared.Deposition;
|
||||
// using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using System.Diagnostics;
|
||||
// using System.IO;
|
||||
// using System.Linq;
|
||||
// using System.Reflection;
|
||||
// using System.Runtime.InteropServices;
|
||||
// using System.Text;
|
||||
// using System.Text.Json;
|
||||
|
||||
// namespace _Tests.Helpers
|
||||
// {
|
||||
|
||||
// public class Helper
|
||||
// {
|
||||
|
||||
// public static string GetLaunchText()
|
||||
// {
|
||||
// StringBuilder result = new();
|
||||
// _ = result.
|
||||
// AppendLine("{").
|
||||
// AppendLine(" \"configurations\": [").
|
||||
// AppendLine(" {").
|
||||
// AppendLine(" \"name\": \".NET Core Attach\",").
|
||||
// AppendLine(" \"type\": \"coreclr\",").
|
||||
// AppendLine(" \"request\": \"attach\",").
|
||||
// AppendLine($" \"processId\": {System.Diagnostics.Process.GetCurrentProcess().Id}").
|
||||
// AppendLine(" }").
|
||||
// AppendLine(" ]").
|
||||
// AppendLine("}");
|
||||
// return result.ToString();
|
||||
// }
|
||||
|
||||
// public static string GetProjectDirectory()
|
||||
// {
|
||||
// string result;
|
||||
// string[] checkFiles = null;
|
||||
// Assembly assembly = Assembly.GetExecutingAssembly();
|
||||
// result = Path.GetDirectoryName(assembly.Location);
|
||||
// for (int i = 0; i < int.MaxValue; i++)
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(result))
|
||||
// break;
|
||||
// checkFiles = Directory.GetFiles(result, "*.Tests.csproj", SearchOption.TopDirectoryOnly);
|
||||
// if (checkFiles.Any())
|
||||
// break;
|
||||
// result = Path.GetDirectoryName(result);
|
||||
// }
|
||||
// if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any())
|
||||
// throw new Exception(result);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// public static string[] GetVariables(string jsonFile, string sourceDirectoryCloaking)
|
||||
// {
|
||||
// string[] results;
|
||||
// string sourceFileFilter = string.Empty;
|
||||
// string sourceFileLocation = string.Empty;
|
||||
// string projectDirectory = GetProjectDirectory();
|
||||
// string equipmentTypeDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(projectDirectory)));
|
||||
// string testResultsDirectory = Path.Combine(equipmentTypeDirectory, "05_TestResults");
|
||||
// FileInfo fileInfo = new(string.Concat(testResultsDirectory, jsonFile));
|
||||
// if (!Directory.Exists(fileInfo.Directory.FullName))
|
||||
// _ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
// if (!fileInfo.Exists)
|
||||
// _ = Process.Start("explorer.exe", fileInfo.Directory.FullName);
|
||||
// string json = File.ReadAllText(fileInfo.FullName);
|
||||
// Assert.IsTrue(json.Contains(sourceDirectoryCloaking));
|
||||
// JsonElement jsonElement = JsonSerializer.Deserialize<JsonElement>(json);
|
||||
// foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
||||
// {
|
||||
// if (jsonProperty.Name == "SourceFileLocation")
|
||||
// sourceFileLocation = jsonProperty.Value.ToString();
|
||||
// else if (jsonProperty.Name == "SourceFileFilter")
|
||||
// sourceFileFilter = jsonProperty.Value.ToString();
|
||||
// }
|
||||
// results = new string[] { jsonFile, json, sourceFileLocation, sourceFileFilter };
|
||||
|
||||
// Assert.IsFalse(string.IsNullOrEmpty(results[0]));
|
||||
// Assert.IsFalse(string.IsNullOrEmpty(results[1]));
|
||||
// Assert.IsFalse(string.IsNullOrEmpty(results[2]));
|
||||
// Assert.IsFalse(string.IsNullOrEmpty(results[3]));
|
||||
// return results;
|
||||
// }
|
||||
|
||||
// public static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string searchDirectory, string searchPattern)
|
||||
// {
|
||||
// Tuple<string, string[], string[]> results;
|
||||
// string[] pdsfFiles;
|
||||
// pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
// if (!pdsfFiles.Any())
|
||||
// _ = Process.Start("explorer.exe", searchDirectory);
|
||||
// Assert.IsTrue(pdsfFiles.Any(), "GetFiles check");
|
||||
// results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(pdsfFiles[0]);
|
||||
// Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
// Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
// Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
// return results;
|
||||
// }
|
||||
|
||||
// public static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(ConfigDataBase configDataBase, ILogic logic, Tuple<string, JsonElement?, List<FileInfo>> extractResult, Tuple<string, string[], string[]> pdsf)
|
||||
// {
|
||||
// Tuple<string, string[], string[]> results;
|
||||
// string text = ProcessDataStandardFormat.GetPDSFText(logic, configDataBase.GetEventName(), configDataBase.GetEquipmentType(), extractResult.Item2.Value, logisticsText: pdsf.Item1);
|
||||
// string[] lines = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
|
||||
// results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(logic.Logistics.ReportFullPath, lines);
|
||||
// Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
// Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
// Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
// return results;
|
||||
// }
|
||||
|
||||
// public static string[] GetItem2(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
// {
|
||||
// JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||
// string jsonOld = JsonSerializer.Serialize(pdsf.Item2, pdsf.Item2.GetType(), jsonSerializerOptions);
|
||||
// string jsonNew = JsonSerializer.Serialize(pdsfNew.Item2, pdsfNew.Item2.GetType(), jsonSerializerOptions);
|
||||
// return new string[] { jsonOld, jsonNew };
|
||||
// }
|
||||
|
||||
// public static string[] GetItem3(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
// {
|
||||
// string joinOld = string.Join(Environment.NewLine, from l in pdsf.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||
// string joinNew = string.Join(Environment.NewLine, from l in pdsfNew.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||
// return new string[] { joinOld, joinNew };
|
||||
// }
|
||||
|
||||
// public static void UpdatePassDirectory(string[] variables, MethodBase methodBase)
|
||||
// {
|
||||
// string passDirectory = Path.Combine(variables[2], methodBase.Name);
|
||||
// if (!Directory.Exists(passDirectory))
|
||||
// _ = Directory.CreateDirectory(passDirectory);
|
||||
// else
|
||||
// Directory.SetLastWriteTime(variables[2], DateTime.Now);
|
||||
// }
|
||||
|
||||
// public static string GetFileName(MethodBase methodBase)
|
||||
// {
|
||||
// string result;
|
||||
// string[] segments = methodBase.Name.Split(new string[] { "__" }, StringSplitOptions.None);
|
||||
// string environment = segments[0];
|
||||
// string rawVersionName = segments[1];
|
||||
// string equipmentTypeDirectory = segments[2];
|
||||
// string ticks = DateTime.Now.Ticks.ToString();
|
||||
// string comment = segments[segments.Length - 1];
|
||||
// string versionName = segments[1].Replace('_', '.');
|
||||
// string before = string.Concat(environment, "__", rawVersionName, "__", equipmentTypeDirectory, "__");
|
||||
// string after = methodBase.Name.Substring(before.Length);
|
||||
// string connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length);
|
||||
// string connectionName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length);
|
||||
// ticks = connectionNameAndTicks.Substring(connectionName.Length);
|
||||
// result = Path.Combine(environment, equipmentTypeDirectory, versionName, $"{environment}__{rawVersionName}__{equipmentTypeDirectory}__{connectionName}", ticks, $"{connectionName.Replace('_', '-')}.json");
|
||||
// if (result.Contains('/'))
|
||||
// result = string.Concat('/', result);
|
||||
// else
|
||||
// result = string.Concat('\\', result);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// }
|
@ -1,12 +1,13 @@
|
||||
using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.CellInstance;
|
||||
using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData;
|
||||
using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary;
|
||||
using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentType;
|
||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||
using Adaptation.Ifx.Eaf.Common.Configuration;
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Shared.PasteSpecialXml.EAF.XML.API.CellInstance;
|
||||
using Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData;
|
||||
using Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary;
|
||||
using Shared.PasteSpecialXml.EAF.XML.API.EquipmentType;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@ -20,15 +21,18 @@ using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared;
|
||||
|
||||
public class AdaptationTesting : ISMTP
|
||||
{
|
||||
|
||||
protected readonly string _DummyRoot;
|
||||
protected readonly string _Environment;
|
||||
protected readonly string _HostNameAndPort;
|
||||
protected readonly bool _HasWaitForProperty;
|
||||
protected readonly TestContext _TestContext;
|
||||
protected readonly bool _SkipEquipmentDictionary;
|
||||
protected readonly string _TestContextPropertiesAsJson;
|
||||
protected readonly Dictionary<string, CellInstanceVersion> _CellInstanceVersions;
|
||||
protected readonly Dictionary<string, EquipmentTypeVersion> _EquipmentTypeVersions;
|
||||
protected readonly Dictionary<string, string> _ParameterizedModelObjectDefinitionTypes;
|
||||
@ -37,10 +41,13 @@ public class AdaptationTesting : ISMTP
|
||||
protected readonly Dictionary<string, IList<ModelObjectParameterDefinition>> _ModelObjectParameters;
|
||||
protected readonly Dictionary<string, List<Tuple<string, string>>> _EquipmentDictionaryEventDescriptions;
|
||||
|
||||
public string DummyRoot => _DummyRoot;
|
||||
public string Environment => _Environment;
|
||||
public TestContext TestContext => _TestContext;
|
||||
public string HostNameAndPort => _HostNameAndPort;
|
||||
public bool HasWaitForProperty => _HasWaitForProperty;
|
||||
public bool SkipEquipmentDictionary => _SkipEquipmentDictionary;
|
||||
public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson;
|
||||
public Dictionary<string, CellInstanceVersion> CellInstanceVersions => _CellInstanceVersions;
|
||||
public Dictionary<string, EquipmentTypeVersion> EquipmentTypeVersions => _EquipmentTypeVersions;
|
||||
public Dictionary<string, IList<ModelObjectParameterDefinition>> ModelObjectParameters => _ModelObjectParameters;
|
||||
@ -55,17 +62,22 @@ public class AdaptationTesting : ISMTP
|
||||
|
||||
void ISMTP.SendNormalPriorityEmailMessage(string subject, string body) => throw new NotImplementedException();
|
||||
|
||||
public AdaptationTesting(TestContext testContext, bool skipEquipmentDictionary)
|
||||
public AdaptationTesting(string dummyRoot, TestContext testContext, bool skipEquipmentDictionary, string testContextPropertiesAsJson, bool hasWaitForProperty)
|
||||
{
|
||||
|
||||
string environment = GetEnvironment(testContext);
|
||||
string hostNameAndPort = GetHostNameAndPort(environment);
|
||||
_DummyRoot = dummyRoot;
|
||||
_TestContext = testContext;
|
||||
_Environment = environment;
|
||||
_HostNameAndPort = hostNameAndPort;
|
||||
_HasWaitForProperty = hasWaitForProperty;
|
||||
_SkipEquipmentDictionary = skipEquipmentDictionary;
|
||||
_TestContextPropertiesAsJson = testContextPropertiesAsJson;
|
||||
_CellInstanceVersions = new Dictionary<string, CellInstanceVersion>();
|
||||
_EquipmentTypeVersions = new Dictionary<string, EquipmentTypeVersion>();
|
||||
_EquipmentTypeVersions = new Dictionary<string, EquipmentTypeVersion>();
|
||||
_ParameterizedModelObjectDefinitionTypes = new Dictionary<string, string>();
|
||||
_ParameterizedModelObjectDefinitionTypes = new Dictionary<string, string>();
|
||||
_EquipmentDictionaryVersions = new Dictionary<string, EquipmentDictionaryVersion>();
|
||||
_FileConnectorConfigurations = new Dictionary<string, FileConnectorConfiguration>();
|
||||
@ -93,23 +105,28 @@ public class AdaptationTesting : ISMTP
|
||||
return result;
|
||||
}
|
||||
|
||||
protected string GetTestResultsDirectory()
|
||||
public static string GetTestResultsDirectory(string testContextTestResultsDirectory, bool hasWaitForProperty)
|
||||
{
|
||||
string result = string.Empty;
|
||||
string testResults = "05_TestResults";
|
||||
string checkDirectory = _TestContext.TestResultsDirectory;
|
||||
if (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults))
|
||||
throw new Exception();
|
||||
string rootDirectory = Path.GetPathRoot(checkDirectory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
string checkDirectory = testContextTestResultsDirectory;
|
||||
if (hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults)))
|
||||
throw new Exception($"A:{checkDirectory}; B:{testResults};");
|
||||
else if (!hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults)))
|
||||
result = testContextTestResultsDirectory;
|
||||
else
|
||||
{
|
||||
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory)
|
||||
break;
|
||||
if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory))
|
||||
string rootDirectory = Path.GetPathRoot(checkDirectory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
result = checkDirectory;
|
||||
break;
|
||||
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory)
|
||||
break;
|
||||
if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory))
|
||||
{
|
||||
result = checkDirectory;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(result))
|
||||
@ -117,6 +134,12 @@ public class AdaptationTesting : ISMTP
|
||||
return result;
|
||||
}
|
||||
|
||||
private string GetTestResultsDirectory(bool hasWaitForProperty)
|
||||
{
|
||||
string result = GetTestResultsDirectory(_TestContext.TestResultsDirectory, hasWaitForProperty);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected static string GetCellInstanceConnectionName(string cellInstanceConnectionName)
|
||||
{
|
||||
string result;
|
||||
@ -169,28 +192,29 @@ public class AdaptationTesting : ISMTP
|
||||
return results;
|
||||
}
|
||||
|
||||
internal string[] GetSegments(string methodBaseName)
|
||||
public static MethodBaseName GetMethodBaseName(string dummyRoot, string environment, bool hasWaitForProperty, string methodBaseName, string testResultsDirectory)
|
||||
{
|
||||
List<string> results;
|
||||
string fileFullName;
|
||||
MethodBaseName result;
|
||||
string comment;
|
||||
string[] textFiles;
|
||||
string seperator = "__";
|
||||
string fileFullName;
|
||||
string dummyDirectory;
|
||||
string withActualCICN;
|
||||
string separator = "__";
|
||||
string textFileDirectory;
|
||||
string connectionNameAndTicks;
|
||||
string cellInstanceConnectionName;
|
||||
string ticks = DateTime.Now.Ticks.ToString();
|
||||
string cellInstanceConnectionNameFromMethodBaseName;
|
||||
string testResultsDirectory = GetTestResultsDirectory();
|
||||
string[] segments = methodBaseName.Split(new string[] { seperator }, StringSplitOptions.None);
|
||||
if (segments[0] != _Environment)
|
||||
string[] segments = methodBaseName.Split(new string[] { separator }, StringSplitOptions.None);
|
||||
if (segments[0] != environment)
|
||||
throw new Exception();
|
||||
string rawVersionName = segments[1];
|
||||
string rawCellInstanceName = segments[2];
|
||||
string cellInstanceVersionName = segments[1].Replace('_', '.');
|
||||
string cellInstanceName = segments[2].Replace('_', '-').Replace("_EQPT", "-EQPT");
|
||||
string before = string.Concat(_Environment, seperator, rawVersionName, seperator, cellInstanceName, seperator);
|
||||
string before = string.Concat(environment, separator, rawVersionName, separator, cellInstanceName, separator);
|
||||
string after = methodBaseName.Substring(before.Length);
|
||||
string versionDirectory = Path.Combine(testResultsDirectory, _Environment, cellInstanceName, cellInstanceVersionName);
|
||||
string versionDirectory = Path.Combine(testResultsDirectory, environment, cellInstanceName, cellInstanceVersionName);
|
||||
if (!Directory.Exists(versionDirectory))
|
||||
_ = Directory.CreateDirectory(versionDirectory);
|
||||
comment = segments[segments.Length - 1];
|
||||
@ -220,87 +244,76 @@ public class AdaptationTesting : ISMTP
|
||||
cellInstanceConnectionNameFromMethodBaseName = after;
|
||||
}
|
||||
cellInstanceConnectionName = GetCellInstanceConnectionName(cellInstanceConnectionNameFromMethodBaseName);
|
||||
string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks);
|
||||
withActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks);
|
||||
if (hasWaitForProperty)
|
||||
dummyDirectory = string.Empty;
|
||||
else if (string.IsNullOrEmpty(ticks))
|
||||
dummyDirectory = string.Empty;
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(dummyRoot))
|
||||
throw new Exception($"{nameof(dummyRoot)} is empty!");
|
||||
if (!withActualCICN.Contains(ticks))
|
||||
throw new Exception($"{withActualCICN} doesn't contain {ticks}!");
|
||||
segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
dummyDirectory = Path.Combine(dummyRoot, cellInstanceName, ticks, string.Join(null, segments));
|
||||
if (!Directory.Exists(dummyDirectory))
|
||||
_ = Directory.CreateDirectory(dummyDirectory);
|
||||
}
|
||||
if (string.IsNullOrEmpty(ticks))
|
||||
{
|
||||
textFiles = Array.Empty<string>();
|
||||
fileFullName = Path.Combine(versionDirectory, methodBaseNameWithActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json");
|
||||
textFileDirectory = string.Empty;
|
||||
fileFullName = Path.Combine(versionDirectory, withActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json");
|
||||
}
|
||||
else
|
||||
{
|
||||
segments = methodBaseNameWithActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
string textDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1]));
|
||||
segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
textFileDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1]));
|
||||
fileFullName = Path.Combine(versionDirectory, segments[0], $"{cellInstanceConnectionNameFromMethodBaseName}.json");
|
||||
if (!Directory.Exists(textDirectory))
|
||||
}
|
||||
result = new(after, before, cellInstanceConnectionName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceName, cellInstanceVersionName, comment, dummyDirectory, fileFullName, rawCellInstanceName, rawVersionName, separator, testResultsDirectory, textFileDirectory, ticks, versionDirectory, withActualCICN);
|
||||
return result;
|
||||
}
|
||||
|
||||
private MethodBaseName GetMethodBaseName(MethodBase methodBase)
|
||||
{
|
||||
MethodBaseName result;
|
||||
string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty);
|
||||
result = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, methodBase.Name, testResultsDirectory);
|
||||
return result;
|
||||
}
|
||||
|
||||
private string[] GetTextFiles(MethodBaseName mbn)
|
||||
{
|
||||
string[] results;
|
||||
if (string.IsNullOrEmpty(mbn.TextFileDirectory))
|
||||
results = Array.Empty<string>();
|
||||
else if (!Directory.Exists(mbn.TextFileDirectory))
|
||||
{
|
||||
results = Array.Empty<string>();
|
||||
if (!_HasWaitForProperty)
|
||||
_ = Directory.CreateDirectory(mbn.TextFileDirectory);
|
||||
else
|
||||
{
|
||||
textFiles = Array.Empty<string>();
|
||||
string renameDirectory = Path.Combine(Path.GetDirectoryName(textDirectory), $"_Rename - {Path.GetFileName(textDirectory)}");
|
||||
string renameDirectory = Path.Combine(Path.GetDirectoryName(mbn.TextFileDirectory), $"_Rename - {Path.GetFileName(mbn.TextFileDirectory)}");
|
||||
_ = Directory.CreateDirectory(renameDirectory);
|
||||
_ = Process.Start("explorer.exe", renameDirectory);
|
||||
File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileFilter)}.txt"), string.Empty);
|
||||
File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileLocation)}.txt"), string.Empty);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
results = Directory.GetFiles(mbn.TextFileDirectory, "*.txt", SearchOption.TopDirectoryOnly);
|
||||
if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && results.Length == 0)
|
||||
{
|
||||
textFiles = Directory.GetFiles(textDirectory, "*.txt", SearchOption.TopDirectoryOnly);
|
||||
if (!textFiles.Any())
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textDirectory);
|
||||
File.WriteAllText(Path.Combine(textDirectory, "_ Why.why"), string.Empty);
|
||||
}
|
||||
_ = Process.Start("explorer.exe", mbn.TextFileDirectory);
|
||||
File.WriteAllText(Path.Combine(mbn.TextFileDirectory, "_ Why.why"), string.Empty);
|
||||
}
|
||||
}
|
||||
results = new List<string>
|
||||
{
|
||||
_Environment,
|
||||
rawCellInstanceName,
|
||||
cellInstanceName,
|
||||
cellInstanceVersionName,
|
||||
cellInstanceConnectionNameFromMethodBaseName,
|
||||
cellInstanceConnectionName,
|
||||
ticks,
|
||||
comment,
|
||||
fileFullName
|
||||
};
|
||||
results.AddRange(textFiles);
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
internal string[] GetSegments(MethodBase methodBase)
|
||||
{
|
||||
string[] results = GetSegments(methodBase.Name);
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static string GetEnvironment(string[] segments) => segments[0];
|
||||
|
||||
internal static string GetRawCellInstanceName(string[] segments) => segments[1];
|
||||
|
||||
internal static string GetCellInstanceName(string[] segments) => segments[2];
|
||||
|
||||
internal static string GetCellInstanceVersionName(string[] segments) => segments[3];
|
||||
|
||||
internal static string GetCellInstanceConnectionNameFromMethodBaseName(string[] segments) => segments[4];
|
||||
|
||||
internal static string GetCellInstanceConnectionName(string[] segments) => segments[5];
|
||||
|
||||
internal static string GetTicks(string[] segments) => segments[6];
|
||||
|
||||
internal static string GetComment(string[] segments) => segments[7];
|
||||
|
||||
internal static FileInfo GetFileName(string[] segments) => new(segments[8]);
|
||||
|
||||
internal static string[] GetTextFiles(string[] segments)
|
||||
{
|
||||
List<string> results = new();
|
||||
if (segments.Length > 8)
|
||||
{
|
||||
for (int i = 9; i < segments.Length; i++)
|
||||
results.Add(segments[i]);
|
||||
}
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
protected static Stream ToStream(string @this)
|
||||
{
|
||||
MemoryStream memoryStream = new();
|
||||
@ -330,7 +343,7 @@ public class AdaptationTesting : ISMTP
|
||||
return result as T;
|
||||
}
|
||||
|
||||
protected static CellInstanceVersion GetCellInstanceVersion(string url)
|
||||
public static CellInstanceVersion GetCellInstanceVersion(string url)
|
||||
{
|
||||
CellInstanceVersion result;
|
||||
byte[] byteArray;
|
||||
@ -341,7 +354,7 @@ public class AdaptationTesting : ISMTP
|
||||
{
|
||||
xml = XDocument.Load(url).ToString();
|
||||
}
|
||||
catch (System.Exception exception)
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message));
|
||||
}
|
||||
@ -360,9 +373,7 @@ public class AdaptationTesting : ISMTP
|
||||
Tuple<string, CellInstanceVersion> result;
|
||||
CellInstanceVersion cellInstanceVersion;
|
||||
string cellInstanceServiceV2 = string.Concat("http://", _HostNameAndPort, "/CellInstanceServiceV2/", cellInstanceName, "/", cellInstanceVersionName, "/configuration");
|
||||
if (_CellInstanceVersions.ContainsKey(cellInstanceServiceV2))
|
||||
cellInstanceVersion = _CellInstanceVersions[cellInstanceServiceV2];
|
||||
else
|
||||
if (!_CellInstanceVersions.TryGetValue(cellInstanceServiceV2, out cellInstanceVersion))
|
||||
{
|
||||
cellInstanceVersion = GetCellInstanceVersion(cellInstanceServiceV2);
|
||||
_CellInstanceVersions.Add(cellInstanceServiceV2, cellInstanceVersion);
|
||||
@ -388,7 +399,7 @@ public class AdaptationTesting : ISMTP
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!results.Any() || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName)))
|
||||
if (results.Count == 0 || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName)))
|
||||
throw new Exception("Match not found (check test method name matches Mango)!");
|
||||
return results;
|
||||
}
|
||||
@ -400,9 +411,8 @@ public class AdaptationTesting : ISMTP
|
||||
result = componentModelComponentsIndexes.ElementAt(0).Value;
|
||||
else
|
||||
{
|
||||
if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.ContainsKey(cellInstanceConnectionName))
|
||||
if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.TryGetValue(cellInstanceConnectionName, out result))
|
||||
throw new Exception();
|
||||
result = componentModelComponentsIndexes[cellInstanceConnectionName];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -436,7 +446,7 @@ public class AdaptationTesting : ISMTP
|
||||
AppendLine("using Adaptation.Shared.Methods;").
|
||||
AppendLine("using Microsoft.Extensions.Logging;").
|
||||
AppendLine("using Microsoft.VisualStudio.TestTools.UnitTesting;").
|
||||
AppendLine("using Shared;").
|
||||
AppendLine("using Adaptation._Tests.Shared;").
|
||||
AppendLine("using System;").
|
||||
AppendLine("using System.Collections.Generic;").
|
||||
AppendLine("using System.Diagnostics;").
|
||||
@ -445,7 +455,7 @@ public class AdaptationTesting : ISMTP
|
||||
AppendLine("using System.Text.Json;").
|
||||
AppendLine("using System.Threading;");
|
||||
_ = stringBuilder.AppendLine().
|
||||
Append("namespace _Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).AppendLine(";").
|
||||
Append("namespace Adaptation._Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).AppendLine(";").
|
||||
AppendLine().
|
||||
AppendLine("[TestClass]");
|
||||
if (i == 2)
|
||||
@ -465,6 +475,7 @@ public class AdaptationTesting : ISMTP
|
||||
AppendLine("#pragma warning disable CA2254").
|
||||
AppendLine("#pragma warning disable IDE0060").
|
||||
AppendLine().
|
||||
AppendLine("internal static string DummyRoot { get; private set; }").
|
||||
Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting { get; private set; }");
|
||||
else
|
||||
throw new Exception();
|
||||
@ -473,13 +484,15 @@ public class AdaptationTesting : ISMTP
|
||||
else if (i == 1)
|
||||
_ = stringBuilder.
|
||||
AppendLine().
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)").
|
||||
Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Dummy\";").
|
||||
AppendLine().
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)").
|
||||
AppendLine("{").
|
||||
AppendLine("if (EAFLoggingUnitTesting is null)").
|
||||
AppendLine("throw new Exception();").
|
||||
AppendLine("}").
|
||||
AppendLine().
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)").
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)").
|
||||
AppendLine("{").
|
||||
AppendLine("}").
|
||||
AppendLine();
|
||||
@ -540,22 +553,28 @@ public class AdaptationTesting : ISMTP
|
||||
if (i == 2)
|
||||
{
|
||||
_ = stringBuilder.
|
||||
AppendLine("#if true").
|
||||
AppendLine("[Ignore]").
|
||||
AppendLine("#endif").
|
||||
AppendLine("[TestMethod]").
|
||||
Append("public void ").Append(methodName).Append("() => ").Append('_').Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();").AppendLine();
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName)
|
||||
throw new Exception("Versions should match!");
|
||||
throw new Exception($"Versions should match! {componentsCellComponentCellComponent.Equipment.EquipmentType.Version} != {cellInstanceVersionName}");
|
||||
equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name;
|
||||
_ = stringBuilder.
|
||||
AppendLine("#if true").
|
||||
AppendLine("[Ignore]").
|
||||
AppendLine("#endif").
|
||||
AppendLine("[TestMethod]").
|
||||
Append("public void ").Append(methodName).AppendLine("()").
|
||||
AppendLine("{").
|
||||
Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";").
|
||||
AppendLine("MethodBase methodBase = new StackFrame().GetMethod();").
|
||||
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));").
|
||||
AppendLine("_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);").
|
||||
AppendLine("_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);").
|
||||
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));").
|
||||
AppendLine("}").
|
||||
AppendLine();
|
||||
@ -574,7 +593,7 @@ public class AdaptationTesting : ISMTP
|
||||
throw new Exception();
|
||||
_ = stringBuilder.Clear();
|
||||
}
|
||||
if (componentsCellComponentCellComponentEquipmentDictionaryNames.Any() && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy))
|
||||
if (componentsCellComponentCellComponentEquipmentDictionaryNames.Count != 0 && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy))
|
||||
{
|
||||
if (!cellInstanceVersion.CellCommunicatingRule.EndsWith(".Communicating") || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellCommunicatingRule.Split('.')[0] select true).Any())
|
||||
throw new Exception($"{methodName} - CellCommunicatingRule not correct in Mango!");
|
||||
@ -599,14 +618,10 @@ public class AdaptationTesting : ISMTP
|
||||
result = JsonSerializer.Deserialize<FileConnectorConfiguration>(json, jsonSerializerOptions);
|
||||
if (string.IsNullOrEmpty(result.SourceFileFilter))
|
||||
result.SourceFileFilter = string.Empty;
|
||||
if (result.ErrorTargetFileLocation is null)
|
||||
result.ErrorTargetFileLocation = string.Empty;
|
||||
if (result.SourceFileLocation is null)
|
||||
result.SourceFileLocation = string.Empty;
|
||||
if (result.TargetFileLocation is null)
|
||||
result.TargetFileLocation = string.Empty;
|
||||
if (result.FolderAgeCheckIndividualSubFolders is null)
|
||||
result.FolderAgeCheckIndividualSubFolders = false;
|
||||
result.ErrorTargetFileLocation ??= string.Empty;
|
||||
result.SourceFileLocation ??= string.Empty;
|
||||
result.TargetFileLocation ??= string.Empty;
|
||||
result.FolderAgeCheckIndividualSubFolders ??= false;
|
||||
result.ConnectionSettings = new List<ConnectionSetting>();
|
||||
result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList();
|
||||
if (componentsCellComponentCellComponent.Equipment?.ConnectionSettings is not null)
|
||||
@ -614,7 +629,7 @@ public class AdaptationTesting : ISMTP
|
||||
foreach (Setting setting in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting)
|
||||
result.ConnectionSettings.Add(new ConnectionSetting(null, null) { Name = setting.Name, Value = setting.Value });
|
||||
}
|
||||
IEnumerable<ConnectionSetting> sourceDirectoryCloakingCollection = (from l in result.ConnectionSettings where l.Name == sourceDirectoryCloaking select l);
|
||||
IEnumerable<ConnectionSetting> sourceDirectoryCloakingCollection = from l in result.ConnectionSettings where l.Name == sourceDirectoryCloaking select l;
|
||||
if (sourceDirectoryCloakingCollection.Any())
|
||||
result.SourceDirectoryCloaking = sourceDirectoryCloakingCollection.First().Value;
|
||||
else
|
||||
@ -630,9 +645,7 @@ public class AdaptationTesting : ISMTP
|
||||
Tuple<string, FileConnectorConfiguration> result;
|
||||
FileConnectorConfiguration fileConnectorConfiguration;
|
||||
string cellInstanceServiceV2With = string.Concat(cellInstanceVersionTuple.Item1, '/', cellInstanceConnectionName);
|
||||
if (_FileConnectorConfigurations.ContainsKey(cellInstanceServiceV2With))
|
||||
fileConnectorConfiguration = _FileConnectorConfigurations[cellInstanceServiceV2With];
|
||||
else
|
||||
if (!_FileConnectorConfigurations.TryGetValue(cellInstanceServiceV2With, out fileConnectorConfiguration))
|
||||
{
|
||||
Dictionary<string, int[]> componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
||||
int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes);
|
||||
@ -656,7 +669,7 @@ public class AdaptationTesting : ISMTP
|
||||
{
|
||||
xml = XDocument.Load(url).ToString();
|
||||
}
|
||||
catch (System.Exception exception)
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message));
|
||||
}
|
||||
@ -678,9 +691,7 @@ public class AdaptationTesting : ISMTP
|
||||
int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes);
|
||||
ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]];
|
||||
string equipmentTypeServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentTypeServiceV2/", componentsCellComponentCellComponent.Equipment.EquipmentType.Name, "/", componentsCellComponentCellComponent.Equipment.EquipmentType.Version, "/configuration");
|
||||
if (_EquipmentTypeVersions.ContainsKey(equipmentTypeServiceV2))
|
||||
equipmentTypeVersion = _EquipmentTypeVersions[equipmentTypeServiceV2];
|
||||
else
|
||||
if (!_EquipmentTypeVersions.TryGetValue(equipmentTypeServiceV2, out equipmentTypeVersion))
|
||||
{
|
||||
equipmentTypeVersion = GetEquipmentTypeVersion(equipmentTypeServiceV2);
|
||||
_EquipmentTypeVersions.Add(equipmentTypeServiceV2, equipmentTypeVersion);
|
||||
@ -745,7 +756,7 @@ public class AdaptationTesting : ISMTP
|
||||
string[] results;
|
||||
string equipmentDictionaryName;
|
||||
string equipmentDictionaryVersionName;
|
||||
if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || !equipmentTypeVersion.EventActionSequences.Any() || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any())
|
||||
if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || equipmentTypeVersion.EventActionSequences.Length == 0 || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any())
|
||||
{
|
||||
equipmentDictionaryName = string.Empty;
|
||||
equipmentDictionaryVersionName = string.Empty;
|
||||
@ -777,7 +788,7 @@ public class AdaptationTesting : ISMTP
|
||||
{
|
||||
xml = XDocument.Load(url).ToString();
|
||||
}
|
||||
catch (System.Exception exception)
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message));
|
||||
}
|
||||
@ -816,9 +827,7 @@ public class AdaptationTesting : ISMTP
|
||||
equipmentDictionaryVersion = null;
|
||||
else
|
||||
{
|
||||
if (_EquipmentDictionaryVersions.ContainsKey(equipmentDictionaryServiceV2))
|
||||
equipmentDictionaryVersion = _EquipmentDictionaryVersions[equipmentDictionaryServiceV2];
|
||||
else
|
||||
if (!_EquipmentDictionaryVersions.TryGetValue(equipmentDictionaryServiceV2, out equipmentDictionaryVersion))
|
||||
{
|
||||
equipmentDictionaryVersion = GetEquipmentDictionaryVersion(equipmentDictionaryServiceV2);
|
||||
_EquipmentDictionaryVersions.Add(equipmentDictionaryServiceV2, equipmentDictionaryVersion);
|
||||
@ -832,14 +841,15 @@ public class AdaptationTesting : ISMTP
|
||||
{
|
||||
Tuple<string, List<Tuple<string, string>>> result;
|
||||
List<Tuple<string, string>> results;
|
||||
List<Tuple<string, string>> collection;
|
||||
if (_SkipEquipmentDictionary)
|
||||
results = new List<Tuple<string, string>>();
|
||||
else if (string.IsNullOrEmpty(equipmentDictionaryVersionTuple.Item1))
|
||||
throw new Exception();
|
||||
else if (equipmentDictionaryVersionTuple?.Item4?.Events?.Event is null)
|
||||
results = new List<Tuple<string, string>>();
|
||||
else if (_EquipmentDictionaryEventDescriptions.ContainsKey(equipmentDictionaryVersionTuple.Item1))
|
||||
results = _EquipmentDictionaryEventDescriptions[equipmentDictionaryVersionTuple.Item1];
|
||||
else if (_EquipmentDictionaryEventDescriptions.TryGetValue(equipmentDictionaryVersionTuple.Item1, out collection))
|
||||
results = collection;
|
||||
else
|
||||
{
|
||||
results = new List<Tuple<string, string>>();
|
||||
@ -856,15 +866,16 @@ public class AdaptationTesting : ISMTP
|
||||
return result;
|
||||
}
|
||||
|
||||
protected Dictionary<string, object> GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, List<Tuple<string, string>> equipmentDictionaryIsAlwaysEnabledEvents)
|
||||
protected Dictionary<string, object> GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, List<Tuple<string, string>> equipmentDictionaryIsAlwaysEnabledEvents, int edaConnectionPortNumber)
|
||||
{
|
||||
Dictionary<string, object> results = new()
|
||||
{
|
||||
{ nameof(Environment), _Environment },
|
||||
{ nameof(System.Environment), _Environment },
|
||||
{ nameof(HostNameAndPort), _HostNameAndPort },
|
||||
{ nameof(cellInstanceName), cellInstanceName },
|
||||
{ nameof(equipmentTypeName), equipmentTypeName },
|
||||
{ nameof(cellInstanceVersionName), cellInstanceVersionName },
|
||||
{ nameof(edaConnectionPortNumber), edaConnectionPortNumber },
|
||||
{ nameof(equipmentDictionaryName), equipmentDictionaryName },
|
||||
{ nameof(cellInstanceConnectionName), cellInstanceConnectionName },
|
||||
{ nameof(FileConnectorConfiguration), fileConnectorConfiguration },
|
||||
@ -875,39 +886,53 @@ public class AdaptationTesting : ISMTP
|
||||
return results;
|
||||
}
|
||||
|
||||
public (string i, string v, string c, string n, int p, string f) GetCellInstanceVersionCore(string testName)
|
||||
{
|
||||
(string, string, string, string, int, string) results;
|
||||
MethodBaseName mbn = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, testName, @"D:\Tmp\Phares");
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
results = new(mbn.CellInstanceName, mbn.CellInstanceVersionName, cellInstanceVersionTuple.Item2.CellCommunicatingRule, cellInstanceVersionTuple.Item2.CellNotCommunicatingRule, cellInstanceVersionTuple.Item2.EdaConnection.PortNumber, cellInstanceVersionTuple.Item2.FrozenBy);
|
||||
return results;
|
||||
}
|
||||
|
||||
public string[] GetCSharpText(string testName)
|
||||
{
|
||||
string[] results;
|
||||
string[] segments = GetSegments(testName);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty);
|
||||
MethodBaseName mbn = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, testName, testResultsDirectory);
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||
results = GetCSharpTextB(fileInfo, cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
results = GetCSharpTextB(fileInfo, mbn.CellInstanceName, mbn.CellInstanceVersionName, cellInstanceVersionTuple.Item2);
|
||||
return results;
|
||||
}
|
||||
|
||||
public string[] GetConfiguration(MethodBase methodBase)
|
||||
{
|
||||
string[] results;
|
||||
string[] segments = GetSegments(methodBase.Name);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
MethodBaseName mbn = GetMethodBaseName(methodBase);
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName);
|
||||
if (string.IsNullOrEmpty(mbn.Ticks) && fileConnectorConfigurationTuple.Item2?.FileScanningIntervalInSeconds is not null)
|
||||
{
|
||||
string fileScanningIntervalInSecondsLine;
|
||||
string versionDirectory = Path.GetDirectoryName(fileInfo.DirectoryName);
|
||||
if (fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value < 0)
|
||||
fileScanningIntervalInSecondsLine = $"-\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:0000}\t{Path.GetFileName(fileInfo.DirectoryName)}";
|
||||
else
|
||||
fileScanningIntervalInSecondsLine = $"+\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:+0000}\t{Path.GetFileName(fileInfo.DirectoryName)}";
|
||||
File.AppendAllLines(Path.Combine(versionDirectory, "FileScanningIntervalInSeconds.txt"), new string[] { fileScanningIntervalInSecondsLine });
|
||||
}
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName);
|
||||
Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple);
|
||||
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
Tuple<string, List<Tuple<string, string>>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple);
|
||||
Dictionary<string, object> objects = GetKeyValuePairs(cellInstanceName, cellInstanceVersionName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2);
|
||||
Dictionary<string, object> objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2, cellInstanceVersionTuple.Item2.EdaConnection.PortNumber);
|
||||
string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true });
|
||||
results = new string[] { fileInfo.FullName, json };
|
||||
return results;
|
||||
@ -916,22 +941,19 @@ public class AdaptationTesting : ISMTP
|
||||
public IFileRead Get(MethodBase methodBase, string sourceFileLocation, string sourceFileFilter, bool useCyclicalForDescription)
|
||||
{
|
||||
IFileRead result;
|
||||
string[] segments = GetSegments(methodBase.Name);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
||||
MethodBaseName mbn = GetMethodBaseName(methodBase);
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
Dictionary<string, string> fileParameter = new();
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
Dictionary<string, List<long>> dummyRuns = new();
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
||||
Dictionary<long, List<string>> staticRuns = new();
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName);
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName);
|
||||
Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple);
|
||||
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
_ = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple);
|
||||
if (!string.IsNullOrEmpty(sourceFileLocation) && sourceFileLocation != fileConnectorConfigurationTuple.Item2.SourceFileLocation)
|
||||
fileConnectorConfigurationTuple.Item2.SourceFileLocation = sourceFileLocation;
|
||||
@ -940,33 +962,60 @@ public class AdaptationTesting : ISMTP
|
||||
fileConnectorConfigurationTuple.Item2.SourceFileFilter = sourceFileFilter;
|
||||
fileConnectorConfigurationTuple.Item2.SourceFileFilters = sourceFileFilter.Split('|').ToList();
|
||||
}
|
||||
result = Adaptation.FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, useCyclicalForDescription, isEAFHosted: false);
|
||||
if (_TestContext.FullyQualifiedTestClassName.Contains(nameof(Extract)))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
|
||||
{
|
||||
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
|
||||
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
|
||||
{
|
||||
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
|
||||
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.SourceFileLocation);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
|
||||
{
|
||||
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
|
||||
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.TargetFileLocation);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
|
||||
{
|
||||
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
|
||||
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
if (!ex.Message.Contains("SMB1"))
|
||||
throw;
|
||||
}
|
||||
}
|
||||
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, connectionCount: cellInstanceVersionTuple.Item2.EquipmentConnections.Length);
|
||||
return result;
|
||||
}
|
||||
|
||||
public string[] GetVariables(MethodBase methodBase, string check)
|
||||
public string[] GetVariables(MethodBase methodBase, string check, bool validatePDSF = true)
|
||||
{
|
||||
string[] results;
|
||||
string[] lines;
|
||||
string ipdsfFile;
|
||||
string textFileDirectory;
|
||||
string[] segments;
|
||||
string fileNameWithoutExtension;
|
||||
string searchPattern = "*.ipdsf";
|
||||
string methodBaseNameWithActualCICN;
|
||||
string sourceFileFilter = string.Empty;
|
||||
string sourceFileLocation = string.Empty;
|
||||
string[] segments = GetSegments(methodBase);
|
||||
string ticks = GetTicks(segments);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string[] textFiles = GetTextFiles(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string rawCellInstanceName = GetRawCellInstanceName(segments);
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
string cellInstanceConnectionNameFromMethodBaseName = GetCellInstanceConnectionNameFromMethodBaseName(segments);
|
||||
string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks);
|
||||
if (!textFiles.Any())
|
||||
textFileDirectory = string.Empty;
|
||||
else
|
||||
textFileDirectory = Path.GetDirectoryName(textFiles[0]);
|
||||
MethodBaseName mbn = GetMethodBaseName(methodBase);
|
||||
string[] textFiles = GetTextFiles(mbn);
|
||||
if (textFiles.Length == 0)
|
||||
{
|
||||
if (_HasWaitForProperty)
|
||||
throw new Exception("Set text file!");
|
||||
sourceFileLocation = mbn.DummyDirectory;
|
||||
}
|
||||
foreach (string textFile in textFiles)
|
||||
{
|
||||
lines = File.ReadAllLines(textFile);
|
||||
@ -977,18 +1026,20 @@ public class AdaptationTesting : ISMTP
|
||||
sourceFileFilter = lines[0];
|
||||
else if (fileNameWithoutExtension == nameof(FileConnectorConfiguration.SourceFileLocation))
|
||||
{
|
||||
segments = lines[0].Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, mbn.RawCellInstanceName, mbn.CellInstanceConnectionNameFromMethodBaseName, mbn.CellInstanceConnectionName, mbn.Ticks);
|
||||
segments = lines[0].Split(new string[] { mbn.Ticks }, StringSplitOptions.None);
|
||||
if (segments.Length > 2)
|
||||
throw new Exception("Ticks should only appear once in source file location!");
|
||||
if (segments.Length != 2)
|
||||
throw new Exception("Ticks missing from source file location!");
|
||||
if (segments[1].Contains(ticks))
|
||||
if (segments[1].Contains(mbn.Ticks))
|
||||
throw new Exception("From source file location path should not contain ticks!");
|
||||
if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(ticks, string.Empty)))
|
||||
if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(mbn.Ticks, string.Empty)))
|
||||
throw new Exception("Method name missing from source file location!");
|
||||
sourceFileLocation = lines[0];
|
||||
}
|
||||
}
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
if (!Directory.Exists(fileInfo.Directory.FullName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
if (!fileInfo.Exists)
|
||||
@ -1009,25 +1060,30 @@ public class AdaptationTesting : ISMTP
|
||||
fileConnectorConfiguration.SourceFileFilter = sourceFileFilter;
|
||||
if (!string.IsNullOrEmpty(sourceFileLocation))
|
||||
fileConnectorConfiguration.SourceFileLocation = sourceFileLocation;
|
||||
if (string.IsNullOrEmpty(sourceFileLocation))
|
||||
ipdsfFile = searchPattern;
|
||||
if (!validatePDSF)
|
||||
ipdsfFile = string.Empty;
|
||||
else
|
||||
{
|
||||
string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf");
|
||||
if (!Directory.Exists(ipdsfDirectory))
|
||||
if (string.IsNullOrEmpty(sourceFileLocation))
|
||||
ipdsfFile = searchPattern;
|
||||
else
|
||||
{
|
||||
string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (files.Any())
|
||||
ipdsfFile = files[0];
|
||||
else
|
||||
string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf");
|
||||
if (!Directory.Exists(ipdsfDirectory))
|
||||
ipdsfFile = searchPattern;
|
||||
else
|
||||
{
|
||||
string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (files.Length != 0)
|
||||
ipdsfFile = files[0];
|
||||
else
|
||||
ipdsfFile = searchPattern;
|
||||
}
|
||||
}
|
||||
if (ipdsfFile == searchPattern)
|
||||
throw new Exception();
|
||||
}
|
||||
if (ipdsfFile == searchPattern)
|
||||
throw new Exception();
|
||||
results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, textFileDirectory };
|
||||
results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, mbn.TextFileDirectory };
|
||||
if (string.IsNullOrEmpty(results[0]))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[1]))
|
||||
@ -1036,13 +1092,196 @@ public class AdaptationTesting : ISMTP
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[3]))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[4]))
|
||||
if (validatePDSF && string.IsNullOrEmpty(results[4]))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[5]))
|
||||
throw new Exception();
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string fileFullName)
|
||||
{
|
||||
Tuple<string, string[], string[]> results;
|
||||
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(fileFullName);
|
||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string searchDirectory, string searchPattern)
|
||||
{
|
||||
Tuple<string, string[], string[]> results;
|
||||
if (searchPattern.Length > 3 && !searchPattern.Contains('*') && File.Exists(searchPattern))
|
||||
results = GetLogisticsColumnsAndBody(searchPattern);
|
||||
else
|
||||
{
|
||||
string[] pdsfFiles;
|
||||
pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (pdsfFiles.Length == 0)
|
||||
_ = Process.Start("explorer.exe", searchDirectory);
|
||||
Assert.IsTrue(pdsfFiles.Length != 0, "GetFiles check");
|
||||
results = GetLogisticsColumnsAndBody(pdsfFiles[0]);
|
||||
}
|
||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(IFileRead fileRead, Logistics logistics, Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult, Tuple<string, string[], string[]> pdsf)
|
||||
{
|
||||
Tuple<string, string[], string[]> results;
|
||||
string text = ProcessDataStandardFormat.GetPDSFText(fileRead, logistics, extractResult.Item3, logisticsText: pdsf.Item1);
|
||||
string[] lines = text.Split(new string[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
|
||||
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(logistics.ReportFullPath, lines);
|
||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static string[] GetItem2(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
{
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||
string jsonOld = JsonSerializer.Serialize(pdsf.Item2, pdsf.Item2.GetType(), jsonSerializerOptions);
|
||||
string jsonNew = JsonSerializer.Serialize(pdsfNew.Item2, pdsfNew.Item2.GetType(), jsonSerializerOptions);
|
||||
return new string[] { jsonOld, jsonNew };
|
||||
}
|
||||
|
||||
internal static string[] GetItem3(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
{
|
||||
string joinOld = string.Join(System.Environment.NewLine, from l in pdsf.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||
string joinNew = string.Join(System.Environment.NewLine, from l in pdsfNew.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||
return new string[] { joinOld, joinNew };
|
||||
}
|
||||
|
||||
internal static void UpdatePassDirectory(string searchDirectory)
|
||||
{
|
||||
DateTime dateTime = DateTime.Now;
|
||||
try
|
||||
{ Directory.SetLastWriteTime(searchDirectory, dateTime); }
|
||||
catch (Exception) { }
|
||||
string ticksDirectory = Path.GetDirectoryName(searchDirectory);
|
||||
try
|
||||
{ Directory.SetLastWriteTime(ticksDirectory, dateTime); }
|
||||
catch (Exception) { }
|
||||
string[] directories = Directory.GetDirectories(searchDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
try
|
||||
{ Directory.SetLastWriteTime(directory, dateTime); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
internal static string GetFileName(MethodBase methodBase)
|
||||
{
|
||||
string result;
|
||||
string connectionName;
|
||||
string separator = "__";
|
||||
string connectionNameAndTicks;
|
||||
string[] segments = methodBase.Name.Split(new string[] { separator }, StringSplitOptions.None);
|
||||
string environment = segments[0];
|
||||
string rawVersionName = segments[1];
|
||||
string equipmentTypeDirectory = segments[2];
|
||||
string ticks = DateTime.Now.Ticks.ToString();
|
||||
string comment = segments[segments.Length - 1];
|
||||
string versionName = segments[1].Replace('_', '.');
|
||||
string before = string.Concat(environment, separator, rawVersionName, separator, equipmentTypeDirectory, separator);
|
||||
string after = methodBase.Name.Substring(before.Length);
|
||||
if (after.Length < ticks.Length)
|
||||
{
|
||||
connectionName = after;
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length);
|
||||
connectionName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length);
|
||||
ticks = connectionNameAndTicks.Substring(connectionName.Length);
|
||||
}
|
||||
result = Path.Combine(environment, equipmentTypeDirectory, versionName, $"{environment}__{rawVersionName}__{equipmentTypeDirectory}__{connectionName}", ticks, $"{connectionName.Replace('_', '-')}.json");
|
||||
if (result.Contains('/'))
|
||||
result = string.Concat('/', result);
|
||||
else
|
||||
result = string.Concat('\\', result);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static void CompareSaveTSV(string textFileDirectory, string[] join)
|
||||
{
|
||||
if (join[0] != join[1])
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.tsv"), join[0]);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.tsv"), join[1]);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void CompareSaveJSON(string textFileDirectory, string[] json)
|
||||
{
|
||||
if (json[0] != json[1])
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.json"), json[0]);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.json"), json[1]);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void CompareSave(string textFileDirectory, Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||
{
|
||||
if (pdsf.Item1 != pdsfNew.Item1)
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.dat"), pdsf.Item1);
|
||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.dat"), pdsfNew.Item1);
|
||||
}
|
||||
}
|
||||
|
||||
internal static IFileRead GetWriteConfigurationGetFileRead(MethodBase methodBase, string check, AdaptationTesting adaptationTesting)
|
||||
{
|
||||
IFileRead result;
|
||||
string[] fileNameAndJson = adaptationTesting.GetConfiguration(methodBase);
|
||||
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||
result = adaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||
Assert.IsFalse(string.IsNullOrEmpty(result.CellInstanceConnectionName));
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string ReExtractCompareUpdatePassDirectory(string[] variables, IFileRead fileRead, Logistics logistics, bool validatePDSF = true)
|
||||
{
|
||||
string result;
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
if (extractResult is null)
|
||||
throw new Exception($"Using pattern {variables[4]} no file was found <{variables[2]}>");
|
||||
if (!fileRead.IsDuplicator)
|
||||
{
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
if (!validatePDSF)
|
||||
_ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty<string>(), Array.Empty<string>()));
|
||||
else
|
||||
{
|
||||
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
||||
Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]);
|
||||
Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
|
||||
CompareSave(variables[5], pdsf, pdsfNew);
|
||||
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
|
||||
string[] json = GetItem2(pdsf, pdsfNew);
|
||||
CompareSaveJSON(variables[5], json);
|
||||
Assert.IsTrue(json[0] == json[1], "Item2 check!");
|
||||
string[] join = GetItem3(pdsf, pdsfNew);
|
||||
CompareSaveTSV(variables[5], join);
|
||||
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
|
||||
}
|
||||
UpdatePassDirectory(variables[2]);
|
||||
}
|
||||
result = extractResult.Item1;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
// namespace _Tests.Helpers { public class AdaptationTesting { } }
|
||||
// 2022-02-02 -> AdaptationTesting
|
||||
// namespace Adaptation._Tests.Helpers { public class AdaptationTesting { } }
|
||||
// 2022-08-05 -> AdaptationTesting
|
@ -1,7 +1,7 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared;
|
||||
|
||||
public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
@ -10,13 +10,13 @@ public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable
|
||||
|
||||
public AdaptationTesting AdaptationTesting => _AdaptationTesting;
|
||||
|
||||
public EAFLoggingUnitTesting(TestContext testContext, Type declaringType, bool skipEquipmentDictionary) :
|
||||
public EAFLoggingUnitTesting(string dummyRoot, TestContext testContext, Type declaringType, bool skipEquipmentDictionary) :
|
||||
base(testContext, declaringType)
|
||||
{
|
||||
if (testContext is null || declaringType is null)
|
||||
_AdaptationTesting = null;
|
||||
else
|
||||
_AdaptationTesting = new AdaptationTesting(testContext, skipEquipmentDictionary);
|
||||
_AdaptationTesting = new AdaptationTesting(dummyRoot, testContext, skipEquipmentDictionary, _TestContextPropertiesAsJson, _HasWaitForProperty);
|
||||
}
|
||||
|
||||
public new void Dispose()
|
||||
|
@ -2,7 +2,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared;
|
||||
|
||||
public class IsEnvironment
|
||||
{
|
||||
@ -155,11 +155,11 @@ public class IsEnvironment
|
||||
{
|
||||
string result;
|
||||
if (isEnvironment.Windows)
|
||||
result = nameof(IsEnvironment.Windows);
|
||||
result = nameof(Windows);
|
||||
else if (isEnvironment.Linux)
|
||||
result = nameof(IsEnvironment.Linux);
|
||||
result = nameof(Linux);
|
||||
else if (isEnvironment.OSX)
|
||||
result = nameof(IsEnvironment.OSX);
|
||||
result = nameof(OSX);
|
||||
else
|
||||
throw new Exception();
|
||||
return result;
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public class ConsoleLogger : ILogger
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public class ConsoleProvider : ILoggerProvider
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public class DebugLogger : ILogger
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public class DebugProvider : ILoggerProvider
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public class FeedbackLogger : ILogger
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public class FeedbackProvider : ILoggerProvider
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public interface IFeedback
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared.Log;
|
||||
|
||||
public class Log
|
||||
{
|
||||
@ -116,7 +116,7 @@ public class Log
|
||||
if (i == 1)
|
||||
result = directory;
|
||||
else
|
||||
result = string.Concat("D", directory.Substring(1));
|
||||
result = string.Concat("D", directory[1..]);
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(result))
|
||||
|
@ -1,3 +1,4 @@
|
||||
using Adaptation._Tests.Shared.Log;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
@ -5,7 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared;
|
||||
|
||||
public class LoggingUnitTesting : UnitTesting, IDisposable
|
||||
{
|
||||
@ -25,7 +26,7 @@ public class LoggingUnitTesting : UnitTesting, IDisposable
|
||||
base(testContext, declaringType)
|
||||
{
|
||||
_LoggerFactory = new LoggerFactory();
|
||||
if (testContext is null || declaringType is null)
|
||||
if (testContext is null || declaringType is null || _IsEnvironment is null)
|
||||
{
|
||||
_ConfigurationRoot = null;
|
||||
_DefaultLogLevel = null;
|
||||
@ -48,7 +49,7 @@ public class LoggingUnitTesting : UnitTesting, IDisposable
|
||||
configurationSection = _ConfigurationRoot.GetSection(section);
|
||||
if (configurationSection is null)
|
||||
logLevel = LogLevel.Debug;
|
||||
else if (!Enum.TryParse<LogLevel>(configurationSection.Value, out logLevel))
|
||||
else if (!Enum.TryParse(configurationSection.Value, out logLevel))
|
||||
logLevel = LogLevel.Debug;
|
||||
logLevels.Add(logLevel);
|
||||
}
|
||||
|
45
Adaptation/_Tests/Shared/MethodBaseName.cs
Normal file
45
Adaptation/_Tests/Shared/MethodBaseName.cs
Normal file
@ -0,0 +1,45 @@
|
||||
namespace Adaptation._Tests.Shared;
|
||||
|
||||
public class MethodBaseName
|
||||
{
|
||||
|
||||
public string After { get; private set; }
|
||||
public string Before { get; private set; }
|
||||
public string CellInstanceConnectionName { get; private set; }
|
||||
public string CellInstanceConnectionNameFromMethodBaseName { get; private set; }
|
||||
public string CellInstanceName { get; private set; }
|
||||
public string CellInstanceVersionName { get; private set; }
|
||||
public string Comment { get; private set; }
|
||||
public string DummyDirectory { get; private set; }
|
||||
public string FileFullName { get; private set; }
|
||||
public string RawCellInstanceName { get; private set; }
|
||||
public string RawVersionName { get; private set; }
|
||||
public string Separator { get; private set; }
|
||||
public string TestResultsDirectory { get; private set; }
|
||||
public string TextFileDirectory { get; private set; }
|
||||
public string Ticks { get; private set; }
|
||||
public string VersionDirectory { get; private set; }
|
||||
public string WithActualCICN { get; private set; }
|
||||
|
||||
public MethodBaseName(string after, string before, string cellInstanceConnectionName, string cellInstanceConnectionNameFromMethodBaseName, string cellInstanceName, string cellInstanceVersionName, string comment, string dummyDirectory, string fileFullName, string rawCellInstanceName, string rawVersionName, string separator, string testResultsDirectory, string textFileDirectory, string ticks, string versionDirectory, string withActualCICN)
|
||||
{
|
||||
After = after;
|
||||
Before = before;
|
||||
CellInstanceConnectionName = cellInstanceConnectionName;
|
||||
CellInstanceConnectionNameFromMethodBaseName = cellInstanceConnectionNameFromMethodBaseName;
|
||||
CellInstanceName = cellInstanceName;
|
||||
CellInstanceVersionName = cellInstanceVersionName;
|
||||
Comment = comment;
|
||||
DummyDirectory = dummyDirectory;
|
||||
FileFullName = fileFullName;
|
||||
RawCellInstanceName = rawCellInstanceName;
|
||||
RawVersionName = rawVersionName;
|
||||
Separator = separator;
|
||||
TestResultsDirectory = testResultsDirectory;
|
||||
TextFileDirectory = textFileDirectory;
|
||||
Ticks = ticks;
|
||||
VersionDirectory = versionDirectory;
|
||||
WithActualCICN = withActualCICN;
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData;
|
||||
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData;
|
||||
|
||||
[XmlRoot(ElementName = "ChildBackboneMembers", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")]
|
||||
public class ChildBackboneMembers
|
||||
|
@ -1,12 +1,14 @@
|
||||
namespace Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary;
|
||||
using System;
|
||||
|
||||
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary;
|
||||
|
||||
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization", IsNullable = false)]
|
||||
public partial class EquipmentDictionaryVersion
|
||||
{
|
||||
@ -17,7 +19,7 @@ public partial class EquipmentDictionaryVersion
|
||||
|
||||
private string createdByField;
|
||||
|
||||
private System.DateTime creationDateField;
|
||||
private DateTime creationDateField;
|
||||
|
||||
private EquipmentDictionaryVersionDataItems dataItemsField;
|
||||
|
||||
@ -29,7 +31,7 @@ public partial class EquipmentDictionaryVersion
|
||||
|
||||
private EquipmentDictionaryVersionEvents eventsField;
|
||||
|
||||
private System.DateTime freezeDateField;
|
||||
private DateTime freezeDateField;
|
||||
|
||||
private object frozenByField;
|
||||
|
||||
@ -43,7 +45,7 @@ public partial class EquipmentDictionaryVersion
|
||||
|
||||
private EquipmentDictionaryVersionReports reportsField;
|
||||
|
||||
private System.DateTime retireDateField;
|
||||
private DateTime retireDateField;
|
||||
|
||||
private object retiredByField;
|
||||
|
||||
@ -68,7 +70,7 @@ public partial class EquipmentDictionaryVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.DateTime CreationDate
|
||||
public DateTime CreationDate
|
||||
{
|
||||
get => this.creationDateField;
|
||||
set => this.creationDateField = value;
|
||||
@ -110,7 +112,7 @@ public partial class EquipmentDictionaryVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.DateTime FreezeDate
|
||||
public DateTime FreezeDate
|
||||
{
|
||||
get => this.freezeDateField;
|
||||
set => this.freezeDateField = value;
|
||||
@ -159,7 +161,7 @@ public partial class EquipmentDictionaryVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.DateTime RetireDate
|
||||
public DateTime RetireDate
|
||||
{
|
||||
get => this.retireDateField;
|
||||
set => this.retireDateField = value;
|
||||
@ -187,7 +189,7 @@ public partial class EquipmentDictionaryVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -196,9 +198,9 @@ public partial class EquipmentDictionaryVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionAlarms
|
||||
{
|
||||
@ -208,7 +210,7 @@ public partial class EquipmentDictionaryVersionAlarms
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Alarm")]
|
||||
[System.Xml.Serialization.XmlElement("Alarm")]
|
||||
public EquipmentDictionaryVersionAlarmsAlarm[] Alarm
|
||||
{
|
||||
get => this.alarmField;
|
||||
@ -216,7 +218,7 @@ public partial class EquipmentDictionaryVersionAlarms
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -225,9 +227,9 @@ public partial class EquipmentDictionaryVersionAlarms
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionAlarmsAlarm
|
||||
{
|
||||
@ -281,7 +283,7 @@ public partial class EquipmentDictionaryVersionAlarmsAlarm
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute()]
|
||||
[System.Xml.Serialization.XmlIgnore()]
|
||||
public bool IsVirtualSpecified
|
||||
{
|
||||
get => this.isVirtualFieldSpecified;
|
||||
@ -317,7 +319,7 @@ public partial class EquipmentDictionaryVersionAlarmsAlarm
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -326,9 +328,9 @@ public partial class EquipmentDictionaryVersionAlarmsAlarm
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionDataItems
|
||||
{
|
||||
@ -338,7 +340,7 @@ public partial class EquipmentDictionaryVersionDataItems
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Item")]
|
||||
[System.Xml.Serialization.XmlElement("Item")]
|
||||
public EquipmentDictionaryVersionDataItemsItem[] Item
|
||||
{
|
||||
get => this.itemField;
|
||||
@ -346,7 +348,7 @@ public partial class EquipmentDictionaryVersionDataItems
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -355,9 +357,9 @@ public partial class EquipmentDictionaryVersionDataItems
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionDataItemsItem
|
||||
{
|
||||
@ -428,7 +430,7 @@ public partial class EquipmentDictionaryVersionDataItemsItem
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -437,9 +439,9 @@ public partial class EquipmentDictionaryVersionDataItemsItem
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionEquipmentSettings
|
||||
{
|
||||
@ -449,7 +451,7 @@ public partial class EquipmentDictionaryVersionEquipmentSettings
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Setting")]
|
||||
[System.Xml.Serialization.XmlElement("Setting")]
|
||||
public EquipmentDictionaryVersionEquipmentSettingsSetting[] Setting
|
||||
{
|
||||
get => this.settingField;
|
||||
@ -457,7 +459,7 @@ public partial class EquipmentDictionaryVersionEquipmentSettings
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -466,9 +468,9 @@ public partial class EquipmentDictionaryVersionEquipmentSettings
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionEquipmentSettingsSetting
|
||||
{
|
||||
@ -490,7 +492,7 @@ public partial class EquipmentDictionaryVersionEquipmentSettingsSetting
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public object Context
|
||||
{
|
||||
get => this.contextField;
|
||||
@ -540,7 +542,7 @@ public partial class EquipmentDictionaryVersionEquipmentSettingsSetting
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -549,9 +551,9 @@ public partial class EquipmentDictionaryVersionEquipmentSettingsSetting
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionEvents
|
||||
{
|
||||
@ -561,7 +563,7 @@ public partial class EquipmentDictionaryVersionEvents
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Event")]
|
||||
[System.Xml.Serialization.XmlElement("Event")]
|
||||
public EquipmentDictionaryVersionEventsEvent[] Event
|
||||
{
|
||||
get => this.eventField;
|
||||
@ -569,7 +571,7 @@ public partial class EquipmentDictionaryVersionEvents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -578,9 +580,9 @@ public partial class EquipmentDictionaryVersionEvents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionEventsEvent
|
||||
{
|
||||
@ -651,7 +653,7 @@ public partial class EquipmentDictionaryVersionEventsEvent
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -660,9 +662,9 @@ public partial class EquipmentDictionaryVersionEventsEvent
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionEventsEventValidDataItems
|
||||
{
|
||||
@ -670,7 +672,7 @@ public partial class EquipmentDictionaryVersionEventsEventValidDataItems
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -679,9 +681,9 @@ public partial class EquipmentDictionaryVersionEventsEventValidDataItems
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypes
|
||||
{
|
||||
@ -691,7 +693,7 @@ public partial class EquipmentDictionaryVersionObjectTypes
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Type")]
|
||||
[System.Xml.Serialization.XmlElement("Type")]
|
||||
public EquipmentDictionaryVersionObjectTypesType[] Type
|
||||
{
|
||||
get => this.typeField;
|
||||
@ -699,7 +701,7 @@ public partial class EquipmentDictionaryVersionObjectTypes
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -708,9 +710,9 @@ public partial class EquipmentDictionaryVersionObjectTypes
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesType
|
||||
{
|
||||
@ -737,7 +739,7 @@ public partial class EquipmentDictionaryVersionObjectTypesType
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public object BaseType
|
||||
{
|
||||
get => this.baseTypeField;
|
||||
@ -773,7 +775,7 @@ public partial class EquipmentDictionaryVersionObjectTypesType
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -782,9 +784,9 @@ public partial class EquipmentDictionaryVersionObjectTypesType
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeAlarms
|
||||
{
|
||||
@ -792,7 +794,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeAlarms
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -801,9 +803,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeAlarms
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeDataItems
|
||||
{
|
||||
@ -813,7 +815,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItems
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Item")]
|
||||
[System.Xml.Serialization.XmlElement("Item")]
|
||||
public EquipmentDictionaryVersionObjectTypesTypeDataItemsItem[] Item
|
||||
{
|
||||
get => this.itemField;
|
||||
@ -821,7 +823,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItems
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -830,9 +832,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItems
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItem
|
||||
{
|
||||
@ -867,7 +869,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItem
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -876,9 +878,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItem
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItems
|
||||
{
|
||||
@ -888,7 +890,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquip
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Item")]
|
||||
[System.Xml.Serialization.XmlElement("Item")]
|
||||
public EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem[] Item
|
||||
{
|
||||
get => this.itemField;
|
||||
@ -896,7 +898,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquip
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -905,9 +907,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquip
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem
|
||||
{
|
||||
@ -915,7 +917,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquip
|
||||
private string refField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Ref
|
||||
{
|
||||
get => this.refField;
|
||||
@ -924,9 +926,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquip
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeEvents
|
||||
{
|
||||
@ -936,7 +938,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEvents
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Event")]
|
||||
[System.Xml.Serialization.XmlElement("Event")]
|
||||
public EquipmentDictionaryVersionObjectTypesTypeEventsEvent[] Event
|
||||
{
|
||||
get => this.eventField;
|
||||
@ -944,7 +946,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEvents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -953,9 +955,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEvents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEvent
|
||||
{
|
||||
@ -990,7 +992,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEvent
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -999,9 +1001,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEvent
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEvents
|
||||
{
|
||||
@ -1018,7 +1020,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipme
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -1027,9 +1029,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipme
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent
|
||||
{
|
||||
@ -1037,7 +1039,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipme
|
||||
private string refField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Ref
|
||||
{
|
||||
get => this.refField;
|
||||
@ -1046,9 +1048,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipme
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionObjectTypesTypeSettings
|
||||
{
|
||||
@ -1056,7 +1058,7 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeSettings
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -1065,9 +1067,9 @@ public partial class EquipmentDictionaryVersionObjectTypesTypeSettings
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionReports
|
||||
{
|
||||
@ -1077,7 +1079,7 @@ public partial class EquipmentDictionaryVersionReports
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Report")]
|
||||
[System.Xml.Serialization.XmlElement("Report")]
|
||||
public EquipmentDictionaryVersionReportsReport[] Report
|
||||
{
|
||||
get => this.reportField;
|
||||
@ -1085,7 +1087,7 @@ public partial class EquipmentDictionaryVersionReports
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -1094,9 +1096,9 @@ public partial class EquipmentDictionaryVersionReports
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionReportsReport
|
||||
{
|
||||
@ -1158,7 +1160,7 @@ public partial class EquipmentDictionaryVersionReportsReport
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -1167,9 +1169,9 @@ public partial class EquipmentDictionaryVersionReportsReport
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionReportsReportDataItems
|
||||
{
|
||||
@ -1179,7 +1181,7 @@ public partial class EquipmentDictionaryVersionReportsReportDataItems
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Item")]
|
||||
[System.Xml.Serialization.XmlElement("Item")]
|
||||
public EquipmentDictionaryVersionReportsReportDataItemsItem[] Item
|
||||
{
|
||||
get => this.itemField;
|
||||
@ -1187,7 +1189,7 @@ public partial class EquipmentDictionaryVersionReportsReportDataItems
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -1196,9 +1198,9 @@ public partial class EquipmentDictionaryVersionReportsReportDataItems
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionReportsReportDataItemsItem
|
||||
{
|
||||
@ -1206,7 +1208,7 @@ public partial class EquipmentDictionaryVersionReportsReportDataItemsItem
|
||||
private string refField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Ref
|
||||
{
|
||||
get => this.refField;
|
||||
@ -1215,9 +1217,9 @@ public partial class EquipmentDictionaryVersionReportsReportDataItemsItem
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionReportsReportLinkEvents
|
||||
{
|
||||
@ -1227,7 +1229,7 @@ public partial class EquipmentDictionaryVersionReportsReportLinkEvents
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("Event")]
|
||||
[System.Xml.Serialization.XmlElement("Event")]
|
||||
public EquipmentDictionaryVersionReportsReportLinkEventsEvent[] Event
|
||||
{
|
||||
get => this.eventField;
|
||||
@ -1235,7 +1237,7 @@ public partial class EquipmentDictionaryVersionReportsReportLinkEvents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -1244,9 +1246,9 @@ public partial class EquipmentDictionaryVersionReportsReportLinkEvents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionReportsReportLinkEventsEvent
|
||||
{
|
||||
@ -1254,7 +1256,7 @@ public partial class EquipmentDictionaryVersionReportsReportLinkEventsEvent
|
||||
private string refField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Ref
|
||||
{
|
||||
get => this.refField;
|
||||
@ -1263,9 +1265,9 @@ public partial class EquipmentDictionaryVersionReportsReportLinkEventsEvent
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionReportsReportPreLinkedEvents
|
||||
{
|
||||
@ -1273,7 +1275,7 @@ public partial class EquipmentDictionaryVersionReportsReportPreLinkedEvents
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -1282,9 +1284,9 @@ public partial class EquipmentDictionaryVersionReportsReportPreLinkedEvents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" +
|
||||
"tCharacterization")]
|
||||
public partial class EquipmentDictionaryVersionValidityMapDataItemToEvent
|
||||
{
|
||||
|
@ -1,11 +1,13 @@
|
||||
namespace Shared.PasteSpecialXml.EAF.XML.API.EquipmentType;
|
||||
using System;
|
||||
|
||||
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentType;
|
||||
|
||||
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)]
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)]
|
||||
public partial class EquipmentTypeVersion
|
||||
{
|
||||
|
||||
@ -13,13 +15,13 @@ public partial class EquipmentTypeVersion
|
||||
|
||||
private string createdByField;
|
||||
|
||||
private System.DateTime creationDateField;
|
||||
private DateTime creationDateField;
|
||||
|
||||
private object descriptionField;
|
||||
|
||||
private ExtensionsVersionExtension[] extensionsField;
|
||||
|
||||
private System.DateTime freezeDateField;
|
||||
private DateTime freezeDateField;
|
||||
|
||||
private string frozenByField;
|
||||
|
||||
@ -29,7 +31,7 @@ public partial class EquipmentTypeVersion
|
||||
|
||||
private bool isRetiredField;
|
||||
|
||||
private System.DateTime retireDateField;
|
||||
private DateTime retireDateField;
|
||||
|
||||
private object retiredByField;
|
||||
|
||||
@ -58,7 +60,7 @@ public partial class EquipmentTypeVersion
|
||||
private string i___typeField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public string CreatedBy
|
||||
{
|
||||
@ -67,16 +69,16 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public System.DateTime CreationDate
|
||||
public DateTime CreationDate
|
||||
{
|
||||
get => this.creationDateField;
|
||||
set => this.creationDateField = value;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities", IsNullable = true)]
|
||||
public object Description
|
||||
{
|
||||
@ -85,9 +87,9 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("VersionExtension", IsNullable = false)]
|
||||
[System.Xml.Serialization.XmlArrayItem("VersionExtension", IsNullable = false)]
|
||||
public ExtensionsVersionExtension[] Extensions
|
||||
{
|
||||
get => this.extensionsField;
|
||||
@ -95,16 +97,16 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public System.DateTime FreezeDate
|
||||
public DateTime FreezeDate
|
||||
{
|
||||
get => this.freezeDateField;
|
||||
set => this.freezeDateField = value;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public string FrozenBy
|
||||
{
|
||||
@ -113,7 +115,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public byte Id
|
||||
{
|
||||
@ -122,7 +124,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public bool IsFrozen
|
||||
{
|
||||
@ -131,7 +133,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public bool IsRetired
|
||||
{
|
||||
@ -140,16 +142,16 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public System.DateTime RetireDate
|
||||
public DateTime RetireDate
|
||||
{
|
||||
get => this.retireDateField;
|
||||
set => this.retireDateField = value;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities", IsNullable = true)]
|
||||
public object RetiredBy
|
||||
{
|
||||
@ -158,7 +160,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" +
|
||||
[System.Xml.Serialization.XmlArrayItem("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" +
|
||||
"nt", IsNullable = false)]
|
||||
public SelectedDeploymentPackage[] DeploymentPackages
|
||||
{
|
||||
@ -188,9 +190,9 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlArrayItem("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation", IsNullable = false)]
|
||||
public ParameterizedModelObjectDefinition[] EquipmentComponents
|
||||
{
|
||||
@ -199,9 +201,9 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlArrayItem("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation", IsNullable = false)]
|
||||
public EventActionSequenceDefinition[] EventActionSequences
|
||||
{
|
||||
@ -210,7 +212,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
public object FileCommunicatorObjectTypes
|
||||
{
|
||||
@ -219,7 +221,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
public FileConfiguration FileConfiguration
|
||||
{
|
||||
@ -228,7 +230,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
public FileHandlerObjectTypes FileHandlerObjectTypes
|
||||
{
|
||||
@ -237,9 +239,9 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlArrayItem("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation", IsNullable = false)]
|
||||
public ParameterizedModelObjectDefinition[] TransientEquipmentObjectTypes
|
||||
{
|
||||
@ -248,7 +250,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -256,7 +258,7 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute()]
|
||||
[System.Xml.Serialization.XmlAttribute()]
|
||||
public string i___type
|
||||
{
|
||||
get => this.i___typeField;
|
||||
@ -265,11 +267,11 @@ public partial class EquipmentTypeVersion
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" +
|
||||
"nt")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" +
|
||||
"nt", IsNullable = false)]
|
||||
public partial class SelectedDeploymentPackage
|
||||
{
|
||||
@ -303,9 +305,9 @@ public partial class SelectedDeploymentPackage
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
public partial class ExtensionsVersionExtension
|
||||
{
|
||||
@ -330,7 +332,7 @@ public partial class ExtensionsVersionExtension
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" +
|
||||
"s")]
|
||||
public string ClassName
|
||||
{
|
||||
@ -339,7 +341,7 @@ public partial class ExtensionsVersionExtension
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" +
|
||||
"s", IsNullable = true)]
|
||||
public object Configuration
|
||||
{
|
||||
@ -348,7 +350,7 @@ public partial class ExtensionsVersionExtension
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" +
|
||||
"s")]
|
||||
public string Name
|
||||
{
|
||||
@ -357,7 +359,7 @@ public partial class ExtensionsVersionExtension
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -365,7 +367,7 @@ public partial class ExtensionsVersionExtension
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute()]
|
||||
[System.Xml.Serialization.XmlAttribute()]
|
||||
public string i___type
|
||||
{
|
||||
get => this.i___typeField;
|
||||
@ -374,9 +376,9 @@ public partial class ExtensionsVersionExtension
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
public partial class EquipmentTypeVersionDictionaries
|
||||
{
|
||||
|
||||
@ -391,9 +393,9 @@ public partial class EquipmentTypeVersionDictionaries
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
public partial class EquipmentTypeVersionDictionariesEquipmentTypeDictionaryReference
|
||||
{
|
||||
|
||||
@ -427,7 +429,7 @@ public partial class EquipmentTypeVersionDictionariesEquipmentTypeDictionaryRefe
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -436,9 +438,9 @@ public partial class EquipmentTypeVersionDictionariesEquipmentTypeDictionaryRefe
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")]
|
||||
public partial class EquipmentTypeVersionParentType
|
||||
{
|
||||
|
||||
@ -463,7 +465,7 @@ public partial class EquipmentTypeVersionParentType
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -472,11 +474,11 @@ public partial class EquipmentTypeVersionParentType
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation", IsNullable = false)]
|
||||
public partial class ParameterizedModelObjectDefinition
|
||||
{
|
||||
@ -506,7 +508,7 @@ public partial class ParameterizedModelObjectDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("ModelObjectParameterDefinition", IsNullable = false)]
|
||||
[System.Xml.Serialization.XmlArrayItem("ModelObjectParameterDefinition", IsNullable = false)]
|
||||
public ParameterizedModelObjectDefinitionModelObjectParameterDefinition[] Parameters
|
||||
{
|
||||
get => this.parametersField;
|
||||
@ -521,7 +523,7 @@ public partial class ParameterizedModelObjectDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -530,9 +532,9 @@ public partial class ParameterizedModelObjectDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
public partial class ParameterizedModelObjectDefinitionModelObjectParameterDefinition
|
||||
{
|
||||
@ -550,7 +552,7 @@ public partial class ParameterizedModelObjectDefinitionModelObjectParameterDefin
|
||||
private string id1Field;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public string EnumType
|
||||
{
|
||||
get => this.enumTypeField;
|
||||
@ -586,7 +588,7 @@ public partial class ParameterizedModelObjectDefinitionModelObjectParameterDefin
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -595,11 +597,11 @@ public partial class ParameterizedModelObjectDefinitionModelObjectParameterDefin
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation", IsNullable = false)]
|
||||
public partial class EventActionSequenceDefinition
|
||||
{
|
||||
@ -615,7 +617,7 @@ public partial class EventActionSequenceDefinition
|
||||
private string id1Field;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("EventActionParameterDefinition", IsNullable = false)]
|
||||
[System.Xml.Serialization.XmlArrayItem("EventActionParameterDefinition", IsNullable = false)]
|
||||
public EventActionSequenceDefinitionEventActionParameterDefinition[] Actions
|
||||
{
|
||||
get => this.actionsField;
|
||||
@ -644,7 +646,7 @@ public partial class EventActionSequenceDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -653,11 +655,11 @@ public partial class EventActionSequenceDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes", IsNullable = false)]
|
||||
public class FileConfiguration
|
||||
{
|
||||
@ -665,7 +667,7 @@ public class FileConfiguration
|
||||
private string idField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id
|
||||
{
|
||||
get => this.idField;
|
||||
@ -674,11 +676,11 @@ public class FileConfiguration
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes", IsNullable = false)]
|
||||
public class FileHandlerObjectTypes
|
||||
{
|
||||
@ -686,7 +688,7 @@ public class FileHandlerObjectTypes
|
||||
private ParameterizedModelObjectDefinition parameterizedModelObjectDefinitionField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
public ParameterizedModelObjectDefinition ParameterizedModelObjectDefinition
|
||||
{
|
||||
@ -696,11 +698,11 @@ public class FileHandlerObjectTypes
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" +
|
||||
"ntities", IsNullable = false)]
|
||||
public partial class Extensions
|
||||
{
|
||||
@ -708,7 +710,7 @@ public partial class Extensions
|
||||
private ExtensionsVersionExtension[] versionExtensionField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("VersionExtension")]
|
||||
[System.Xml.Serialization.XmlElement("VersionExtension")]
|
||||
public ExtensionsVersionExtension[] VersionExtension
|
||||
{
|
||||
get => this.versionExtensionField;
|
||||
@ -717,11 +719,11 @@ public partial class Extensions
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes", IsNullable = false)]
|
||||
public partial class EquipmentComponents
|
||||
{
|
||||
@ -729,7 +731,7 @@ public partial class EquipmentComponents
|
||||
private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlElement("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition
|
||||
{
|
||||
@ -739,11 +741,11 @@ public partial class EquipmentComponents
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes", IsNullable = false)]
|
||||
public partial class EventActionSequences
|
||||
{
|
||||
@ -751,7 +753,7 @@ public partial class EventActionSequences
|
||||
private EventActionSequenceDefinition[] eventActionSequenceDefinitionField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlElement("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
public EventActionSequenceDefinition[] EventActionSequenceDefinition
|
||||
{
|
||||
@ -761,11 +763,11 @@ public partial class EventActionSequences
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes")]
|
||||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" +
|
||||
"Connector.EquipmentTypes", IsNullable = false)]
|
||||
public partial class TransientEquipmentObjectTypes
|
||||
{
|
||||
@ -773,7 +775,7 @@ public partial class TransientEquipmentObjectTypes
|
||||
private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[System.Xml.Serialization.XmlElement("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition
|
||||
{
|
||||
@ -783,9 +785,9 @@ public partial class TransientEquipmentObjectTypes
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
{
|
||||
@ -810,7 +812,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public object Name
|
||||
{
|
||||
get => this.nameField;
|
||||
@ -818,7 +820,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlArrayItemAttribute("ModelObjectParameterDefinition", IsNullable = false)]
|
||||
[System.Xml.Serialization.XmlArrayItem("ModelObjectParameterDefinition", IsNullable = false)]
|
||||
public EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition[] Parameters
|
||||
{
|
||||
get => this.parametersField;
|
||||
@ -840,7 +842,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
@ -849,9 +851,9 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.SerializableAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
[Serializable()]
|
||||
[System.ComponentModel.DesignerCategory("code")]
|
||||
[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" +
|
||||
"mation")]
|
||||
public partial class EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition
|
||||
{
|
||||
@ -879,7 +881,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
private string id1Field;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public object Category
|
||||
{
|
||||
get => this.categoryField;
|
||||
@ -887,7 +889,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public object Description
|
||||
{
|
||||
get => this.descriptionField;
|
||||
@ -895,7 +897,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public object DisplayName
|
||||
{
|
||||
get => this.displayNameField;
|
||||
@ -903,7 +905,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
|
||||
[System.Xml.Serialization.XmlElement(IsNullable = true)]
|
||||
public object EnumType
|
||||
{
|
||||
get => this.enumTypeField;
|
||||
@ -953,7 +955,7 @@ public partial class EventActionSequenceDefinitionEventActionParameterDefinition
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
[System.Xml.Serialization.XmlAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")]
|
||||
public string Id1
|
||||
{
|
||||
get => this.id1Field;
|
||||
|
@ -2,20 +2,23 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
namespace Shared;
|
||||
namespace Adaptation._Tests.Shared;
|
||||
|
||||
public class UnitTesting
|
||||
{
|
||||
|
||||
protected readonly bool _HasWaitForProperty;
|
||||
protected readonly IsEnvironment _IsEnvironment;
|
||||
protected readonly string _TestContextPropertiesAsJson;
|
||||
|
||||
public IsEnvironment IsEnvironment => _IsEnvironment;
|
||||
public bool HasWaitForProperty => _HasWaitForProperty;
|
||||
public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson;
|
||||
|
||||
public UnitTesting(TestContext testContext, Type declaringType)
|
||||
{
|
||||
@ -23,50 +26,57 @@ public class UnitTesting
|
||||
_IsEnvironment = null;
|
||||
else
|
||||
{
|
||||
string waitFor = "\"WaitFor\":";
|
||||
string projectDirectory = GetProjectDirectory(testContext);
|
||||
string json = JsonSerializer.Serialize(testContext.Properties);
|
||||
string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode");
|
||||
if (!Directory.Exists(vsCodeDirectory))
|
||||
_ = Directory.CreateDirectory(vsCodeDirectory);
|
||||
string launchText = GetLaunchText();
|
||||
File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
if (string.IsNullOrEmpty(projectDirectory))
|
||||
_IsEnvironment = null;
|
||||
else
|
||||
{
|
||||
if (!json.Contains("Debugger.IsAttached") || Debugger.IsAttached)
|
||||
break;
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
MethodBase methodBase = declaringType.GetMethod(testContext.TestName);
|
||||
if (methodBase is not null)
|
||||
{
|
||||
TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute<TestCategoryAttribute>();
|
||||
if (testCategoryAttribute is not null)
|
||||
_TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true });
|
||||
_HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor);
|
||||
string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode");
|
||||
if (!Directory.Exists(vsCodeDirectory))
|
||||
_ = Directory.CreateDirectory(vsCodeDirectory);
|
||||
string launchText = GetLaunchText();
|
||||
File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText);
|
||||
if (_HasWaitForProperty)
|
||||
{
|
||||
foreach (string testCategory in testCategoryAttribute.TestCategories)
|
||||
_IsEnvironment = new IsEnvironment(testCategory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
if (!_TestContextPropertiesAsJson.Contains($"{waitFor} \"Debugger.IsAttached\"") || Debugger.IsAttached)
|
||||
break;
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
MethodBase methodBase = declaringType.GetMethod(testContext.TestName);
|
||||
if (methodBase is not null)
|
||||
{
|
||||
TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute<TestCategoryAttribute>();
|
||||
if (testCategoryAttribute is not null)
|
||||
{
|
||||
foreach (string testCategory in testCategoryAttribute.TestCategories)
|
||||
_IsEnvironment = new IsEnvironment(testCategory);
|
||||
}
|
||||
}
|
||||
_IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached);
|
||||
}
|
||||
if (_IsEnvironment is null)
|
||||
_IsEnvironment = new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string GetProjectDirectory(TestContext testContext)
|
||||
{
|
||||
string result;
|
||||
string[] checkFiles = null;
|
||||
string[] checkFiles;
|
||||
result = Path.GetDirectoryName(testContext.DeploymentDirectory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
if (string.IsNullOrEmpty(result))
|
||||
break;
|
||||
checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly);
|
||||
if (checkFiles.Any())
|
||||
if (checkFiles.Length != 0)
|
||||
break;
|
||||
result = Path.GetDirectoryName(result);
|
||||
}
|
||||
if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any())
|
||||
throw new Exception(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
104
Adaptation/_Tests/Static/DEP08SIASM.cs
Normal file
104
Adaptation/_Tests/Static/DEP08SIASM.cs
Normal file
@ -0,0 +1,104 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static DEP08SIASM LoggingUnitTesting { get; private set; }
|
||||
|
||||
public DEP08SIASM() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public DEP08SIASM(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new DEP08SIASM(testContext);
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestDateTime()
|
||||
{
|
||||
DateTime dateTime = DateTime.Now;
|
||||
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
StringBuilder results = new();
|
||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||
{
|
||||
new("DEP08SIASM", "v2.56.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||
{
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||
}
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (!Directory.Exists(sourceDirectory))
|
||||
_ = Directory.CreateDirectory(sourceDirectory);
|
||||
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CellInstanceVersionEdaConnectionPortNumber()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (Directory.Exists(sourceDirectory))
|
||||
{
|
||||
string destinationDirectory = Path.Combine(sourceDirectory, "All");
|
||||
if (!Directory.Exists(destinationDirectory))
|
||||
_ = Directory.CreateDirectory(destinationDirectory);
|
||||
List<string> lines = new();
|
||||
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
|
||||
foreach (string file in files)
|
||||
lines.AddRange(File.ReadAllLines(file));
|
||||
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
|
||||
}
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
210
Adaptation/_Tests/Static/EAF.cs
Normal file
210
Adaptation/_Tests/Static/EAF.cs
Normal file
@ -0,0 +1,210 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class EAF : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static EAF LoggingUnitTesting { get; private set; }
|
||||
|
||||
internal static AdaptationTesting AdaptationTesting { get; private set; }
|
||||
|
||||
public EAF() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public EAF(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{ }
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
LoggingUnitTesting ??= new EAF(testContext);
|
||||
string dummyRoot = string.Empty;
|
||||
bool skipEquipmentDictionary = true;
|
||||
AdaptationTesting = new(dummyRoot, testContext, skipEquipmentDictionary, LoggingUnitTesting.TestContextPropertiesAsJson, LoggingUnitTesting.HasWaitForProperty);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
{
|
||||
string testName;
|
||||
Task<string> task;
|
||||
string[] segments;
|
||||
HttpClient httpClient = new();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string currentActiveVersionTag = "CurrentActiveVersion>";
|
||||
string managementSite = "http://mestsa07ec.infineon.com:9003/CellInstances/entity/";
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
string[] cellInstances = new string[]
|
||||
{
|
||||
"BACKLOG-EQPT",
|
||||
"BACKLOG",
|
||||
"BIORAD2-EDA",
|
||||
"BIORAD2",
|
||||
"BIORAD3-EDA",
|
||||
"BIORAD3",
|
||||
"BIORAD4-EDA",
|
||||
"BIORAD4",
|
||||
"BIORAD5-EDA",
|
||||
"BIORAD5",
|
||||
"CDE2-EDA",
|
||||
"CDE2",
|
||||
"CDE3-EDA",
|
||||
"CDE3-EQPT",
|
||||
"CDE3",
|
||||
"CDE4-EDA",
|
||||
"CDE4-EQPT",
|
||||
"CDE4",
|
||||
"CDE5-EDA",
|
||||
"CDE5-EQPT",
|
||||
"CDE5",
|
||||
"CDE6-EDA",
|
||||
"CDE6-EQPT",
|
||||
"CDE6",
|
||||
"DEP08SIASM",
|
||||
"DEP08SIHTRPLC",
|
||||
"EC",
|
||||
"HGCV1-EDA",
|
||||
"HGCV1-EQPT",
|
||||
"HGCV1",
|
||||
"HGCV2-EDA",
|
||||
"HGCV2-EQPT",
|
||||
"HGCV2",
|
||||
"HGCV3-EDA",
|
||||
"HGCV3-EQPT",
|
||||
"HGCV3",
|
||||
"MET08ANLYSDIFAAST230",
|
||||
"MET08DDUPSFS6420",
|
||||
"MET08DDUPSP1TBI",
|
||||
"MET08RESIHGCV",
|
||||
"MET08RESIMAPCDE",
|
||||
"MET08RESISRP2100",
|
||||
"MET08THFTIRQS408M",
|
||||
"MET08THFTIRSTRATUS",
|
||||
"R34-EDA",
|
||||
"R34-EQPT",
|
||||
"R34",
|
||||
"R47-PLC-EDA",
|
||||
"R47-PLC",
|
||||
"R53-EDA",
|
||||
"R53-EQPT",
|
||||
"R53",
|
||||
"R55-EDA",
|
||||
"R55-EQPT",
|
||||
"R55",
|
||||
"R70-PLC-EDA",
|
||||
"R70-PLC",
|
||||
"R72-PLC-EDA",
|
||||
"R72-PLC",
|
||||
"R73-PLC-EDA",
|
||||
"R73-PLC",
|
||||
"R74-PLC-EDA",
|
||||
"R74-PLC",
|
||||
"SP101-EDA",
|
||||
"SP101-EQPT",
|
||||
"SP101",
|
||||
"SPV01-EDA",
|
||||
"SPV01",
|
||||
"SRP-EDA",
|
||||
"SRP-EQPT",
|
||||
"SRP",
|
||||
"T21",
|
||||
"T27-EDA",
|
||||
"T27",
|
||||
"TENCOR1-EDA",
|
||||
"TENCOR1",
|
||||
"TENCOR2-EDA",
|
||||
"TENCOR2",
|
||||
"TENCOR3-EDA",
|
||||
"TENCOR3",
|
||||
};
|
||||
foreach (string cellInstance in cellInstances.OrderBy(l => l))
|
||||
{
|
||||
if (!cellInstance.Contains('-'))
|
||||
continue;
|
||||
task = httpClient.GetStringAsync($"{managementSite}{cellInstance}");
|
||||
task.Wait();
|
||||
if (task.Result is not string response)
|
||||
continue;
|
||||
segments = response.Split(currentActiveVersionTag);
|
||||
if (segments.Length < 2)
|
||||
continue;
|
||||
testName = string.Concat("Staging__v", segments[1].Split('<')[0].Replace('.', '_'), "__", cellInstance.Replace('-', '_'), "__");
|
||||
(string i, string v, string c, string n, int p, string f) = AdaptationTesting.GetCellInstanceVersionCore(testName);
|
||||
LoggingUnitTesting.Logger.LogInformation($"{p},{v},{i},{c},{n},{f}");
|
||||
}
|
||||
Assert.IsTrue(true);
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Staging - Getting configuration
|
||||
// 8500,v4.16.0,BIORAD2-EDA,,,messa010ec
|
||||
// 8501,v4.16.0,BIORAD3-EDA,,,messa010ec
|
||||
// 8510,v4.16.0,BIORAD4-EDA,,,messa010ec
|
||||
// 8511,v4.16.0,BIORAD5-EDA,,,messa010ec
|
||||
// 8520,v4.16.0,CDE2-EDA,,,messa010ec
|
||||
// 8524,v4.16.0,CDE3-EDA,,,messa010ec
|
||||
// 8526,v2.49.2,CDE3-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8524,v4.16.0,CDE4-EDA,,,messa010ec
|
||||
// 8526,v2.49.2,CDE4-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8521,v4.16.0,CDE5-EDA,,,messa010ec
|
||||
// 7589,v2.49.2,CDE5-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8522,v4.16.0,CDE6-EDA,,,messa010ec
|
||||
// 7590,v2.49.2,CDE6-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8530,v4.16.0,HGCV1-EDA,,,messa010ec
|
||||
// 8536,v2.12.3,HGCV1-EQPT,,,messa010ec
|
||||
// 8531,v4.16.0,HGCV2-EDA,,,messa010ec
|
||||
// 8537,v2.12.3,HGCV2-EQPT,,,messa010ec
|
||||
// 8532,v4.16.0,HGCV3-EDA,,,messa010ec
|
||||
// 8538,v2.12.3,HGCV3-EQPT,,,messa010ec
|
||||
// 8134,v4.16.0,R34-EDA,,,messa010ec
|
||||
// 8034,v2.43.4,R34-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
|
||||
// 553,v2.19.0,R47-PLC,,,messtec102
|
||||
// 553,v2.19.0,R47-PLC-EDA,,,messtec102
|
||||
// 8153,v4.16.0,R53-EDA,,,messa010ec
|
||||
// 8653,v2.43.4,R53-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
|
||||
// 8155,v4.16.0,R55-EDA,,,messa010ec
|
||||
// 8655,v2.43.4,R55-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
|
||||
// 8770,v2.19.0,R70-PLC,,,messtec102
|
||||
// 8770,v1.0.1,R70-PLC-EDA,,,messtec102
|
||||
// 8772,v2.19.0,R72-PLC,,,messtec102
|
||||
// 8772,v1.0.1,R72-PLC-EDA,,,messtec102
|
||||
// 8773,v2.19.0,R73-PLC,,,messtec102
|
||||
// 8773,v1.0.1,R73-PLC-EDA,,,messtec102
|
||||
// 8774,v2.19.0,R74-PLC,,,messtec102
|
||||
// 8774,v1.0.1,R74-PLC-EDA,,,messtec102
|
||||
// 8550,v4.16.0,SP101-EDA,,,messa010ec
|
||||
// 8555,v2.49.3,SP101-EQPT,MoveAllFiles.Communicating,MoveAllFiles.NotCommunicating,
|
||||
// 8569,v4.16.0,SPV01-EDA,,,messa010ec
|
||||
// 8574,v4.16.0,SRP-EDA,,,messa010ec
|
||||
// 8572,v2.49.2,SRP-EQPT,csv.Communicating,csv.NotCommunicating,mestsa06ec
|
||||
// 7627,v4.16.0,T27-EDA,,,messa010ec
|
||||
// 8540,v4.16.0,TENCOR1-EDA,,,messa010ec
|
||||
// 8541,v4.16.0,TENCOR2-EDA,,,messa010ec
|
||||
// 8542,v4.16.0,TENCOR3-EDA,,,messa010ec
|
||||
// Staging - Exit
|
||||
// Cleanup
|
131
Adaptation/_Tests/Static/jpeg.cs
Normal file
131
Adaptation/_Tests/Static/jpeg.cs
Normal file
@ -0,0 +1,131 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class JPEG : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static JPEG LoggingUnitTesting { get; private set; }
|
||||
|
||||
public JPEG() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public JPEG(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new JPEG(testContext);
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void TestDescriptor()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string fileName = "D:/Tmp/phares/R53-EQPT_638005905604624544 - Run Wafer.jpeg";
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
// (float pageMeanConfidence, string text, List<string> blocks) = FileHandlers.jpeg.ProcessData.Parse(fileName, new(), 0, 0, 0, 0, 0, 0);
|
||||
List<(float pageMeanConfidence, string text, List<string> blocks)> collection = FileHandlers.jpeg.ProcessData.Parse(fileName);
|
||||
Assert.IsTrue(collection.Count != 0);
|
||||
foreach ((float pageMeanConfidence, string text, List<string> blocks) in collection)
|
||||
{
|
||||
Assert.IsTrue(pageMeanConfidence > 0);
|
||||
Assert.IsTrue(!string.IsNullOrEmpty(text));
|
||||
Assert.IsTrue(blocks.Count != 0);
|
||||
// Normal images
|
||||
// "RECIPE:\nte end\nte a ee)\nAcne\n"
|
||||
// Grayscale
|
||||
// "RECIPE:\nEee en\nRECIPE e943\n\ncera ke\n"
|
||||
// Grayscale Inverted
|
||||
// "RECIPE:\nOT6_10PH. 60.3.0\nRECIPE e943\nASgMe\n"
|
||||
// BW
|
||||
// "RECIPE\nCTG.}0PH. 60.3.0\nRECIPE #943\nAGM e\n"
|
||||
}
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
StringBuilder results = new();
|
||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||
{
|
||||
new("R34", "v2.56.0"),
|
||||
new("R53", "v2.56.0"),
|
||||
new("R55", "v2.56.0"),
|
||||
new("R34-EQPT", "v2.56.0"),
|
||||
new("R53-EQPT", "v2.56.0"),
|
||||
new("R55-EQPT", "v2.56.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||
{
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||
}
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (!Directory.Exists(sourceDirectory))
|
||||
_ = Directory.CreateDirectory(sourceDirectory);
|
||||
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CellInstanceVersionEdaConnectionPortNumber()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (Directory.Exists(sourceDirectory))
|
||||
{
|
||||
string destinationDirectory = Path.Combine(sourceDirectory, "All");
|
||||
if (!Directory.Exists(destinationDirectory))
|
||||
_ = Directory.CreateDirectory(destinationDirectory);
|
||||
List<string> lines = new();
|
||||
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
|
||||
foreach (string file in files)
|
||||
lines.AddRange(File.ReadAllLines(file));
|
||||
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
|
||||
}
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
68
Adaptation/_Tests/Static/xml.cs
Normal file
68
Adaptation/_Tests/Static/xml.cs
Normal file
@ -0,0 +1,68 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class XML : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static XML LoggingUnitTesting { get; private set; }
|
||||
|
||||
public XML() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public XML(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{ }
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new XML(testContext);
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestXmlBuild()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
string key;
|
||||
string value;
|
||||
int counter = 500;
|
||||
StringBuilder stringBuilder = new();
|
||||
string a = "<d2p1:ModelObjectParameterDefinition z:Id=\"i";
|
||||
string c = "\"><d2p1:EnumType></d2p1:EnumType><d2p1:Id>0</d2p1:Id><d2p1:Name>CellInstance.R";
|
||||
string f = "</d2p1:Name><d2p1:Value>";
|
||||
string h = "</d2p1:Value><d2p1:ValueType>String</d2p1:ValueType></d2p1:ModelObjectParameterDefinition>";
|
||||
int[] reactors = new int[] { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 70, 72, 73, 74, 75, 77, 79 };
|
||||
foreach (int reactor in reactors)
|
||||
{
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
counter += 1;
|
||||
key = i switch { 1 => ".Alias", 2 => "-EQPT.Alias", 3 => "-EQPT.StaticFileServer", _ => throw new Exception() };
|
||||
value = i switch { 1 or 2 => $"R{reactor}", 3 => "10.95.154.##", _ => throw new Exception() };
|
||||
_ = stringBuilder.Append(a).Append(counter).Append(c).Append(reactor).Append(key).Append(f).Append(value).AppendLine(h);
|
||||
}
|
||||
}
|
||||
System.IO.File.WriteAllText(@"D:\Tmp\Phares\a.xml", stringBuilder.ToString());
|
||||
Assert.IsTrue(true);
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
@ -45,7 +45,7 @@
|
||||
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "i",
|
||||
"Share": "\\\\messdv002.na.infineon.com\\Candela",
|
||||
"User": "INFINEON\\MESGaNEAF",
|
||||
@ -59,7 +59,7 @@
|
||||
"Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "k",
|
||||
"Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization",
|
||||
"User": "INFINEON\\MESGaNEAF",
|
||||
@ -80,49 +80,49 @@
|
||||
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "n",
|
||||
"Share": "\\\\10.95.154.22\\C",
|
||||
"User": "10.95.154.22\\Aixtron",
|
||||
"Password": "DYVBOr2HJdB7KOhd/IFhLA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "o",
|
||||
"Share": "\\\\10.95.154.16\\Aixtron",
|
||||
"User": "10.95.154.16\\Aixtron",
|
||||
"Password": "DYVBOr2HJdB7KOhd/IFhLA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "p",
|
||||
"Share": "\\\\10.95.154.15\\Aixtron",
|
||||
"User": "10.95.154.15\\Aixtron",
|
||||
"Password": "DYVBOr2HJdB7KOhd/IFhLA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "q",
|
||||
"Share": "\\\\10.95.154.21\\Data",
|
||||
"User": "10.95.154.21\\XRD04Admin",
|
||||
"Password": "v1NOsEOCvbnhzKabspPcCQ=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "r",
|
||||
"Share": "\\\\10.95.154.23\\Data",
|
||||
"User": "\"10.95.154.23\\infineon us\"",
|
||||
"Password": "rzXkXdHKetDfsukhZKW0yA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "s",
|
||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
|
||||
"User": "EC\\ECMESEAF",
|
||||
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "t",
|
||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
|
||||
"User": "EC\\ECEDASvc",
|
||||
|
@ -45,7 +45,7 @@
|
||||
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "i",
|
||||
"Share": "\\\\messdv002.na.infineon.com\\Candela",
|
||||
"User": "INFINEON\\MESGaNEAF",
|
||||
@ -59,7 +59,7 @@
|
||||
"Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "k",
|
||||
"Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization",
|
||||
"User": "INFINEON\\MESGaNEAF",
|
||||
@ -80,49 +80,49 @@
|
||||
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "n",
|
||||
"Share": "\\\\10.95.154.22\\C",
|
||||
"User": "10.95.154.22\\Aixtron",
|
||||
"Password": "DYVBOr2HJdB7KOhd/IFhLA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "o",
|
||||
"Share": "\\\\10.95.154.16\\Aixtron",
|
||||
"User": "10.95.154.16\\Aixtron",
|
||||
"Password": "DYVBOr2HJdB7KOhd/IFhLA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "p",
|
||||
"Share": "\\\\10.95.154.15\\Aixtron",
|
||||
"User": "10.95.154.15\\Aixtron",
|
||||
"Password": "DYVBOr2HJdB7KOhd/IFhLA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "q",
|
||||
"Share": "\\\\10.95.154.21\\Data",
|
||||
"User": "10.95.154.21\\XRD04Admin",
|
||||
"Password": "v1NOsEOCvbnhzKabspPcCQ=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "r",
|
||||
"Share": "\\\\10.95.154.23\\Data",
|
||||
"User": "\"10.95.154.23\\infineon us\"",
|
||||
"Password": "rzXkXdHKetDfsukhZKW0yA=="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "s",
|
||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
|
||||
"User": "EC\\ECMESEAF",
|
||||
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
||||
},
|
||||
{
|
||||
"Use": true,
|
||||
"Use": false,
|
||||
"Letter": "t",
|
||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
|
||||
"User": "EC\\ECEDASvc",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user