예제 #1
0
 protected override async Task <DatabaseTaskOutcome> RunImplementation()
 {
     if (ApplicationModel.Current.Server.Value.SelectedDatabase.Value.Statistics.Value != null &&
         ApplicationModel.Current.Server.Value.SelectedDatabase.Value.Statistics.Value.CountOfDocuments != 0)
     {
         return
             (await
              AskUser.ConfirmationWithContinuation("Override Documents?",
                                                   "There are documents in the database :" +
                                                   ApplicationModel.Current.Server.Value.SelectedDatabase.Value.Name +
                                                   "." + Environment.NewLine
                                                   + "This operation can override those documents.", ExecuteInternal,
                                                   () => TaskEx.FromResult(DatabaseTaskOutcome.Abandoned)));
     }
     return(await ExecuteInternal());
 }