In my windows 8 application there is a global class where there are a few static properties like:
public class EnvironmentEx
{
public static Us
I suggest you use asynchronous lazy initialization.
public static readonly AsyncLazy AppRootFolder =
new AsyncLazy(() =>
{
return KnownFolders.DocumentsLibrary
.CreateFolderAsync("theApp", CreationCollisionOption.OpenIfExists)
.AsTask();
});
You can then await it directly:
var rootFolder = await EnvironmentEx.AppRootFolder;