Commit cb08c94
authored
Refactor project structure and fix small code issues (#45)
* chore(deps): update NuGet package versions in `Directory.Packages.props`
- Bumped `CreativeCoders.*` packages to version `6.7.2`.
- Updated `Spectre.Console` to version `0.55.2`.
- Reformatted the file for consistency.
* refactor(core): reorganize `CreativeCoders.HomeMatic` namespaces and extract XML-RPC-specific functionality
- Moved XML-RPC types and related imports from `CreativeCoders.HomeMatic.Core` to a dedicated `CreativeCoders.HomeMatic.XmlRpc` namespace.
- Adjusted project references and imports for consistency across files.
- Introduced new utility `CcuDeviceKindExtensions` to map device kinds to corresponding RPC ports.
- Updated unit tests to reflect namespace changes and ensure compatibility.
* chore(project): fix inconsistent formatting in package references in `JsonRpc.csproj`
* refactor(core): remove unused XML-RPC entities and enhance documentation
- Removed obsolete classes: `CcuDeviceKindExtensions`, `HomeMaticDeviceSystems`, and `XmlRpcEndpoint`.
- Added XML documentation to interfaces, enums, and exception classes across `CreativeCoders.HomeMatic.Core` and `CreativeCoders.HomeMatic.XmlRpc`.
- Updated unit tests to reflect the removal of deprecated types and adjusted existing tests for consistency.
* refactor(homeMatic): simplify `CcuDeviceBuilder` and make `ParamSetKey` static
- Removed commented-out legacy code from `CcuDeviceBuilder`.
- Updated `ParamSetKey` class to be static for improved clarity and usage.
* refactor(core, xmlrpc): rename enums and properties for consistency
- Renamed `RxMode` to `RxModes` across codebase to align with naming conventions.
- Refactored `ParameterFlags` to `ParameterUiAttributes`.
- Updated related tests and XML-RPC mappings to reflect the changes.
- Included suppressions for improved static analysis compatibility in `CcuDeviceBuilder`.
* feat(homeMatic): add `CcuRoutingTable` for efficient device-to-client mapping
- Introduced `CcuRoutingTable` as a thread-safe implementation of `ICcuRoutingTable` using `ConcurrentDictionary`.
- Updated `MultiCcuClient` to leverage routing table for optimized client resolution and per-device operations.
- Added tests for `CcuRoutingTable` and `MultiCcuClient` to validate new routing logic and caching behavior.
* feat(tests): add comprehensive unit tests for HomeMatic components
- Added new test classes: `CcuDeviceBaseTests`, `CcuDeviceTests`, `CompleteCcuDeviceBuilderTests`, `MultiCcuClientFactoryTests`, and `XmlRpcApiConnectionTests`.
- Increased code coverage for device parameter mapping, factory chaining, and error handling.
- Refactored existing tests to ensure consistency with updated namespaces and conventions.
* feat(exporting): add support for `ParamValueNameWhitelist` in device exports
- Introduced `ParamValueNameWhitelist` in `DeviceExportOptions` to filter exported parameter values by name.
- Updated `DeviceExporter` to apply name-based filtering in addition to param set filtering.
- Enhanced CLI command with whitelist integration and added tests for comprehensive coverage.
* feat(tests): add builders for creating fake HomeMatic devices and channels
- Introduced `CompleteCcuDeviceFakeBuilder` and `CompleteCcuDeviceChannelFakeBuilder` for streamlined test data creation.
- Added `ParamSetValuesBuilder` to simplify parameter set construction.
- Updated test suite to replace manual fake creation with new builders.
- Refactored tests for `DeviceExporter` and `DeviceExportOptions` for improved readability and maintainability.
* feat(core): enhance XML documentation for HomeMatic components
- Added detailed XML comments to classes, interfaces, and methods across the `CreativeCoders.HomeMatic` and `CreativeCoders.HomeMatic.Exporting` namespaces.
- Improved codebase maintainability and tooling support with structured summaries, parameter descriptions, and examples.
* refactor: clean up namespaces and enhance XML documentation
- Removed unused namespaces across multiple files.
- Suppressed warnings for Inheritdoc usage in exception and class summaries.
- Applied `inheritdoc` annotations for consistent XML documentation.
- Refactored redundant lambda usage and adjusted collection initialization syntax.
* refactor: improve type and collection definitions, add annotations
- Updated return type in `BuildParamSetExportData` from `IEnumerable` to an array for consistency.
- Applied `[PublicAPI]` annotations to interfaces, classes, and extensions for improved tooling support.
- Simplified `CcuDevice` and `ParamSetValuesWithDescriptions` initialization expressions.
- Adjusted `.gitignore` and `.editorconfig` with new entries for project customization.
* refactor(core, cli): apply `[PublicAPI]` and suppressions, enhance type safety
- Added `[PublicAPI]` annotations to interfaces and classes for improved tooling and API usability.
- Applied `[SuppressMessage]` attributes for static analysis in methods and converters.
- Improved type safety with `in` keyword and adapted property initializations in multiple constructors.
- Streamlined collection initialization syntax and adjusted method signatures for consistency.
* chore(tools): add `.editorconfig` with `configure_await_analysis_mode` disabled for C# and VB files1 parent 6499633 commit cb08c94
129 files changed
Lines changed: 3800 additions & 978 deletions
File tree
- build
- source
- CreativeCoders.HomeMatic.Core
- Devices
- Exceptions
- Parameters
- CreativeCoders.HomeMatic.JsonRpc
- Models
- CreativeCoders.HomeMatic.XmlRpc
- Client
- Converters
- Devices
- Exceptions
- Parameters
- Server
- CreativeCoders.HomeMatic
- Exporting
- Tools
- Cli
- CreativeCoders.HomeMatic.Tools.Cli.Base
- Commanding
- Connections
- CreativeCoders.HomeMatic.Tools.Cli.Commands/Device/Export
- tests/CreativeCoders.HomeMatic.Tests
- Exporting
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
10 | 22 | | |
11 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
12 | 28 | | |
13 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
14 | 34 | | |
15 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
16 | 42 | | |
17 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
18 | 48 | | |
19 | 49 | | |
20 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
10 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
11 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
12 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
13 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
14 | 44 | | |
15 | | - | |
| 45 | + | |
This file was deleted.
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
0 commit comments