public void Dispose()
 {
     if (this.main != null)
     {
         this.main.Dispose();
         this.main = null;
     }
 }
        /// <summary>
        /// The first method called when the IFrameworkView is being created.
        /// Use this method to subscribe for Windows shell events and to initialize your app.
        /// </summary>
        public void Initialize(CoreApplicationView applicationView)
        {
            applicationView.Activated += this.OnViewActivated;

            // Register event handlers for app lifecycle.
            CoreApplication.Suspending += this.OnSuspending;
            CoreApplication.Resuming   += this.OnResuming;

            this.main = new MixedRealityApplication();
        }