configureawait

    2熱度

    3回答

    我有,我想在Visual Studio 2015年 基本上來搜索特定的模式,我想搜索包含await線,但在聲明的末尾缺少ConfigureAwait 。 我有一些模式,在正則表達式測試人員如regex101.com工作,但我不能讓這些模式在Visual Studio中的搜索工作。 (例如模式(?s)^(.)*(await)((?!ConfigureAwait).)*(.)?(;)) 我做錯了嗎?

    3熱度

    1回答

    我已經寫在下面的方式萬噸代碼: public string SomeSyncOperation(int someArg) { // sync code SomeAsyncOperation(someArg, someOtherArg).ConfigureAwait(false).GetAwaiter().GetResult() // sync code };