Examples of UWP Framework Use

As the framework implements the IDisposable interface, it is recommended to use the "using" keyword for requests.

That is why, first of all, determine a static file containing the HyperHiveState object that encapsulates framework settings.

public static HyperHiveState State = new HyperHiveState("server address", "desktop", "environment", "project", "app", 10, 10);

Then send this object to the HyperHive class constructor on all calls.

Authorization:

using (var hive = new HyperHive(State))
{
    var result = await hive.AuthApi.AuthAsync(userName, userPass, null);
}

Execute request to local database:

using (var hive = new HyperHive(State))
{
    var result = await hive.DatabaseApi.ExecuteQueryForResourceAsync("Path to local database", query);
}

Create or open local encrypted database:

using (var hive = new HyperHive(State))
{
    return hive.DatabaseApi.OpenDatabase(("Path to local database", key);
}

Enable and set logging level:

using (var hive = new HyperHive(State))
            {
                hive.LoggingApi.SetLogFileName("Path to logs database file", key);
                hive.LoggingApi.SetLogLevel(6);
            }

See also:

UWP Framework | Initializing and Setting Up UWP Framework | Describing UWP Framework Methods | Calling UWP Framework Methods