feat: partially reverse-engineered app structure

This commit is contained in:
Yandrik 2021-10-24 19:22:35 +02:00
parent 8897011993
commit 5f510f365c
2 changed files with 109 additions and 0 deletions

BIN
diagrams/app/structure.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

109
diagrams/app/structure.puml Normal file
View File

@ -0,0 +1,109 @@
@startuml
!theme crt-amber
class App {
Located in: App.xaml -> App.xaml.cs
--
--
..Startup..
// constructor
App(): app
CreateFileFolder(): String
InitializeLogger(): String
ParseMinLogLevel(String): LoggerConfiguration
..Launched..
// entrypoint
OnLaunch()
// internal method
CreateServices(): IServiceProvider
// run migrations
Updatedatabase(IServiceProvider): void
}
note left of App: Entrypoint
class GlobalWrapper {
Singleton
Saves global application state.
Basically a mix of a ton of
stuff with no particular order.
Less of a wrapper, and more of util
--attributes--
..status info..
+ LoginStatus: LoginStatusEnum
+ FileFolder: String
..server connection..
+ ClientTcpThread: ClientTcpThread
--operations--
..File Handling / DB Interaction..
+ AddPictureToDb(Guid, Guid, String): foto
..server connection..
+ ConectToServer(): void
+ ReconnectToServer(int): void
..callbacks..
+ DownloadCallback(DownloadCallbackArgs): void
+ PictureGeneratedCallback(ImageGenerationCallbackArgs): void
}
class Config {
Reads/Writes data using ConfigValue.Name as key
Reading undefined key returns ConfigValue.Default.
--
config values
..
}
class ConfigValues {
Represents an identifier
for a config value
also containing the default value.
Values are READONLY STATIC
--
LOG_LEVEL
LOG_RETAIN_DAYS
FILE_FOLDER
LOG_FOLDER
ASSETS_FOLDER
...
}
ConfigValues "data" -- "accessor" Config: > Reads values
class DBManager {
Singleton
Saves information (paths, ...)
of databases
--
--
setClientErrorParams(String)
setClientParams(String)
}
class CleanLocalStorageManager {
Singleton
Cleans local data if it
exceeds value in the config
--
--
// called from App
CleanStorage(): void
// computes file sizes
IsThresholdExceeded(DirectoryInfo): bool
}
DBManager .. App: initializes <
CleanLocalStorageManager .. App: triggers at startup <
App . Config: reads / writes <
App .. GlobalWrapper: sets fileFolder, connectToServer <
@enduml