/// <summary> /// Determines whether the property can be part of an OData route. /// </summary> /// <param name="property">The property</param> /// <returns>True if the property can be part of an OData route, otherwise false.</returns> public static bool IsODataRouteSegment(this OdcmProperty property, bool isTopLevelProperty) { if (property == null) { throw new ArgumentNullException(nameof(property)); } bool result = // Make sure that this property is: // top-level isTopLevelProperty // or expandable || property.IsExpandable() // or a data stream property || property.IsStream(); return(result); }