Thuria Zitidar is a set of nuget packages that implements some of the basic plumbing that is required to create a Dotnet Core application that could be using a combination of Dependency Injection, the Akka Actor Framework, and Database Access or all of it.
- Extensions - Various extensions to just add functionality to types like DateTime, String, Type, etc
- Caching - A set of additional functionality to add structuremap functionality to any application (Bootstrapper, IOC Container wrapper, etc)
- Web API Extensions - A set of extensions and interfaces to make it easier to register and configure your Web API endpoints
The following extensions are part of the package:
- StartOfDay - Return the given date with start of day time set
- EndOfDay - Return the given date with end of day time set
- ForEach<T> - For each item in a collection, perform the given action
- IsEmpty<T> - Determine if the given collection is empty
- GetAllAsString<T> - Return a collection of string representations of all the items in a given collection
- And<T> - Concatenate the items in an array to a given collection
- RemoveSpaceAndCharacters - Remove all spaces and characters from a string. Leave only numbers.
- CamelCase - Convert a string to a camel case string
- PascalCase - Convert a string to a pascal case string
- EscapeQuotes - Escape the quotes in a string
- GetPropertyValue - Get the value of a specified property on an object
- SetPropertyValue - Set the value of property on a given object
- DoesPropertyExist - Determine if a property exists on a given object
- GetDefaultData - Retrieve the default data for a given Type
- GetValue - Get a column value from the Data Reader
- GetValue<T> - - Get a column value from the Data Reader of Type <T>
The Cache package provides caching functionality with some basic cache expiry functionality.
Example:
var thuriaCache = new ThuriaCache<string>(54000); // 15 Minutes Expiry
await thuriaCache.UpsertAsync("CacheKey", new ThuriaCacheData<string>("TestData"));
var cacheExists = await thuriaCache.ExistsAsync("CacheKey");
var returnedData = await thuriaCache.GetAsync("CacheKey");
The Web API package contains the following features:
TBD