Dela via


ViewEngineResult.EnsureSuccessful(IEnumerable<String>) Method

Definition

Ensure this ViewEngineResult was successful.

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

Parameters

originalLocations
IEnumerable<String>

Additional SearchedLocations to include in the thrown InvalidOperationException if Success is false.

Returns

This ViewEngineResult if Success is true.

Exceptions

Thrown if Success is false.

Applies to