Share via


IEntityToType.TryMapToTimeSpan Method

Definition

Try to map LUIS EntityRecommendation instances to a TimeSpan, relative to now.

public bool TryMapToTimeSpan (DateTime now, System.Collections.Generic.IEnumerable<Microsoft.Bot.Builder.Luis.Models.EntityRecommendation> entities, out TimeSpan span);
abstract member TryMapToTimeSpan : DateTime * seq<Microsoft.Bot.Builder.Luis.Models.EntityRecommendation> * TimeSpan -> bool
Public Function TryMapToTimeSpan (now As DateTime, entities As IEnumerable(Of EntityRecommendation), ByRef span As TimeSpan) As Boolean

Parameters

now
DateTime

The now reference DateTime.

entities
IEnumerable<EntityRecommendation>

A list of possibly-relevant EntityRecommendation instances.

span
TimeSpan

The output TimeSpan.

Returns

True if the mapping may have been successful, false otherwise.

Applies to