ฉันได้รับรหัสนี้:
private async void ContextMenuForGroupRightTapped(object sender, RightTappedRoutedEventArgs args)
{
    CheckBox ckbx = null;
    if (sender is CheckBox)
    {
        ckbx = sender as CheckBox;
    }
    if (null == ckbx)
    {
        return;
    }
    string groupName = ckbx.Content.ToString();
    var contextMenu = new PopupMenu();
    // Add a command to edit the current Group
    contextMenu.Commands.Add(new UICommand("Edit this Group", (contextMenuCmd) =>
    {
        Frame.Navigate(typeof(LocationGroupCreator), groupName);
    }));
    // Add a command to delete the current Group
    contextMenu.Commands.Add(new UICommand("Delete this Group", (contextMenuCmd) =>
    {
        SQLiteUtils slu = new SQLiteUtils();
        slu.DeleteGroupAsync(groupName); // this line raises Resharper's hackles, but appending await raises err msg. Where should the "async" be?
    }));
    // Show the context menu at the position the image was right-clicked
    await contextMenu.ShowAsync(args.GetPosition(this));
}
... การตรวจสอบของ Resharper บ่นเกี่ยวกับ " เนื่องจากการโทรนี้ยังไม่รอการดำเนินการของวิธีการปัจจุบันจะดำเนินต่อไปก่อนที่การโทรจะเสร็จสิ้นให้ลองใช้ตัวดำเนินการ 'คอย' กับผลลัพธ์ของการโทร " (บนบรรทัดที่มี แสดงความคิดเห็น)
ดังนั้นฉันจึงเตรียม "รอ" ไว้ แต่แน่นอนฉันต้องเพิ่ม "async" ที่อื่นด้วย - แต่ที่ไหน
                
                1
              
                  docs.microsoft.com/en-us/dotnet/csharp/programming-guide/...
                
                
                  
                    —
                     Samis 
                    
                  
                
              
                  @samsara: ดีฉันสงสัยว่าในที่สุดพวกเขาก็บันทึกไว้ว่าที่ไหนสักแห่งนอก C # spec IIRC ไม่มีเอกสารประกอบในขณะที่คำถามนี้ถูกถาม
                
                
                  
                    —
                    BoltClock