internal override System.Data.Services.Client.QueryComponents QueryComponents(DataServiceProtocolVersion maxProtocolVersion) { if (this.queryComponents == null) { Type type = typeof(TElement); type = (PrimitiveType.IsKnownType(type) || WebUtil.IsCLRTypeCollection(type, maxProtocolVersion)) ? type : TypeSystem.GetElementType(type); this.queryComponents = new System.Data.Services.Client.QueryComponents(this.requestUri, Util.DataServiceVersionEmpty, type, null, null); } return(this.queryComponents); }
/// <summary>The QueryComponents associated with this request</summary> /// <param name="model">The client model.</param> /// <returns>an instance of QueryComponents.</returns> internal override QueryComponents QueryComponents(ClientEdmModel model) { if (this.queryComponents == null) { Type elementType = typeof(TElement); // for 1..* navigation properties we need the type of the entity of the collection that is being navigated to. Otherwise we use TElement. elementType = PrimitiveType.IsKnownType(elementType) || WebUtil.IsCLRTypeCollection(elementType, model) ? elementType : TypeSystem.GetElementType(elementType); this.queryComponents = new QueryComponents(this.requestUri, Util.DataServiceVersionEmpty, elementType, null, null); } return(this.queryComponents); }