WKFramework

WKFramework is a small framework written in C#. For now only settings, navigation and some utils are available.

Settings

Key-value settings, where any object can be used as a key or value. For now there are two classes available, one to store settings in a file and another to store them in database:

  • FileSettings
  • MsSqlServerSettings

Both classes are configurable (you can pass your own serializer, set data type in database etc.). You can also easily attach MsSqlServerSettings to any existing database or create a new one using this class.

Writing to settings:

Reading from settings:

You can mark properties with [NonSerializedProperty] to avoid serializing them while using WriteProperties or WriteStaticProperties.

Navigation (for WPF)

Simple service to help with navigation in ViewModel-First approach. It provides a fluent interface to show and setup windows. They are automatically localized using reflection, so the only thing you need to do is to stick to the naming convention: NameViewModel and NameView.

Example:

Utils

For now there are only two serializers: BinarySerializer and GZipSerializer. Both can be used with Settings. There is also an extension which performs a deep copy of an object (but it has to be marked as [Serializable]).