public FileBrowsePage() : base("File Browse") { this.Appearing += (initializeThis = new EventHandler(delegate { this.Appearing -= initializeThis; MyLogger.AddTestMethod("Create file", new Func <Task>(async() => { var fileCreator = new RestRequests.FileCreator(fileSelected.Id, "Hi", false); fileCreator.MessageAppended += (log) => { MyLogger.Log(log); }; await fileCreator.Start(); await MyLogger.Alert(fileCreator.Result); })); InitializeControls(); RegisterEvents(); })); }