ViewEngineResult.EnsureSuccessful(IEnumerable<String>) 方法

定義

確定這 ViewEngineResult 是成功的。

public:
 Microsoft::AspNetCore::Mvc::ViewEngines::ViewEngineResult ^ EnsureSuccessful(System::Collections::Generic::IEnumerable<System::String ^> ^ originalLocations);
public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult EnsureSuccessful (System.Collections.Generic.IEnumerable<string> originalLocations);
public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult EnsureSuccessful (System.Collections.Generic.IEnumerable<string>? originalLocations);
member this.EnsureSuccessful : seq<string> -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult
Public Function EnsureSuccessful (originalLocations As IEnumerable(Of String)) As ViewEngineResult

參數

originalLocations
IEnumerable<String>

SearchedLocationsInvalidOperationException Successfalse,則為所擲回的其他。

傳回

ViewEngineResult

ViewEngineResultSuccesstrue,則為。

例外狀況

如果 Successfalse,則擲回。

適用於