kartierung.doc/diagrams/app/structure.puml

109 lines
2.2 KiB
Plaintext
Raw Normal View History

@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