private RootAccess(ApplicationConfig applicationConfig) { AddDisposable(ApplicationModeAccess = new ApplicationModeAccess(applicationConfig)); AddDisposable(LessonAccess = new LessonAccess(applicationConfig.RootFolder)); AddDisposable(ARLessonAccess = new ARLessonAccess()); AddDisposable(DeviceARRequirementsAccess = new DeviceARRequirementsAccess()); AddDisposable(CameraAccess = new CameraAccess()); s_Instance = this; }
public MainPage() { this.InitializeComponent(); var optionsTask = OptionsHelper.LoadAsync(); optionsTask.Wait(2000); this.ConfigOptions = optionsTask.Result; var storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder; this.Log.Loggers.Add(new FileLogger(storageFolder.Path, "logs.txt")); Application.Current.Resuming += Application_Resuming; Application.Current.Suspending += Application_Suspending; Application.Current.UnhandledException += Current_UnhandledException; this.CameraAccess = new CameraAccess(this.Log); this.Log.Info(() => "App Started", (c) => c.AddVariable("LoggersAdded", this.Log.Loggers.Count().ToString()).AddVariable("TestKey", "TestValue")); }