Dela via


ModelExplorerExtensions.GetSimpleDisplayText(ModelExplorer) Method

Definition

Gets a simple display string for the Model property of modelExplorer.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetSimpleDisplayText(Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer);
public static string GetSimpleDisplayText (this Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer);
static member GetSimpleDisplayText : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer -> string
<Extension()>
Public Function GetSimpleDisplayText (modelExplorer As ModelExplorer) As String

Parameters

modelExplorer
ModelExplorer

The ModelExplorer.

Returns

A simple display string for the model.

Remarks

The result is obtained from the following sources (the first success wins): SimpleDisplayProperty, Model converted to string (if the result is interesting), the first internal property converted to string, NullDisplayText (when the value is null). This method is not recursive in order to prevent an infinite loop.

Applies to