共用方式為


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>

如果 為 Successfalse ,則包含在擲回 InvalidOperationException 的 中 SearchedLocations

傳回

如果 Success 為 ,則 ViewEngineResulttrue

例外狀況

如果 Successfalse ,則擲回 。

適用於