/// <summary> /// Returns the Name of the Parameter whose value should be used for the context that was defined through the Suggest attribute /// </summary> /// <param name="suggestContext">IModelElasticSearchSuggestContext instance</param> /// <returns>Name of the Parameter whose value should be used for the context that was defined through the Suggest attribute</returns> public static string Get_DefaultParameter(IModelElasticSearchSuggestContext suggestContext) { if (suggestContext != null) { var typeInfo = suggestContext.TypeInfo; if (typeInfo != null && typeInfo.Type != null) { return(ElasticSearchClient.ElasticSearchSuggestFieldContextParameter(typeInfo, suggestContext.ModelElasticSearchSuggestField.ElasticSearchSuggestField, suggestContext.Name)); } } return(null); }