0
0
mirror of https://github.com/sp-tarkov/loot-dump-processor.git synced 2025-02-13 05:30:44 -05:00

11 Commits

Author SHA1 Message Date
BlueXTX
f2fd256aac
Get rid of static and use dependency injection instead (#8)
* Improved thread safety and async processing in dump processor components

* Removed unused _processedDumps field and simplified variable scope in QueuePipeline

* Refactored service registration into dedicated extension methods

* Added configuration binding and environment variables support

* Refactored collector initialization to use dependency injection

* Refactored data storage to use dependency injection

* Refactored configuration models to use records and added validation

* Refactored static loot configuration to use dependency injection

The changes include:
- Moved static weapon IDs and forced items from LootDumpProcessorContext to ForcedStatic record
- Added ForcedStatic configuration injection in StaticLootProcessor and StaticContainerProcessor
- Improved immutability by using read-only collections in ForcedStatic model
- Simplified LootDumpProcessorContext by removing unused methods

* Refactored configuration access to use dependency injection consistently

* Fixed ForcedStatic configuration

* Refactored forced items configuration to use async provider pattern

The changes introduce a new `IForcedItemsProvider` abstraction to handle loading and caching of forced static and loose loot configurations. This improves the code by:

1. Making configuration loading asynchronous
2. Implementing caching of loaded configurations
3. Centralizing forced items configuration access
4. Removing direct file system dependencies from processors
5. Improving testability through dependency injection

The change also updates related processors and interfaces to use async/await pattern consistently.

* Refactored loose loot processor to use async forced items provider

* Reorganized processor and service components into dedicated namespaces
2025-01-13 17:05:36 +00:00
9e9933bd32 Refactored key generation and improved type safety across storage components 2025-01-11 11:50:02 +03:00
02802ddc10 Refactored storage layer to improve thread safety and code consistency 2025-01-11 11:26:11 +03:00
50e290d491 Removed 7z preprocessing functionality and simplified file processing 2025-01-11 11:14:08 +03:00
465ad95cb5 Refactored code to use System.Text.Json and improved code style
The changes include:
- Replaced Newtonsoft.Json with System.Text.Json for serialization
- Removed redundant JsonProperty attributes and simplified model classes
- Converted static fields to constants where appropriate
- Improved code formatting and readability
- Simplified method bodies and expressions
- Removed unused imports and cleaned up namespaces
2025-01-11 10:52:23 +03:00
f31199076b Removed unused imports across configuration models and Program.cs 2025-01-11 09:19:15 +03:00
762c7ac73a Added performance monitoring and improved service registration organization 2025-01-11 09:18:45 +03:00
047372b6dc Refactored dependency injection and logging infrastructure
The changes include:
- Replaced custom logging with Microsoft.Extensions.Logging
- Added TarkovItemsProvider and ComposedKeyGenerator services
- Simplified configuration models by removing redundant options
- Improved dependency injection in processors and readers
- Removed unused factory methods and simplified service registration
2025-01-11 09:12:45 +03:00
65b49defc9 Refactored loose loot processor to use dependency injection 2025-01-11 07:04:53 +03:00
9be5d6e342 Refactored processors to use dependency injection and improved immutability 2025-01-11 06:54:59 +03:00
8cc4340340 Added source solution folder to organize project structure 2025-01-10 20:46:10 +03:00