public void ToStringTest() { var fetchXml = new FetchXmlExpression(Xml); string fetchXmlString = fetchXml.ToString(); Assert.True(!fetchXmlString.Contains(Environment.NewLine)); }
public async Task <RetrieveMultipleResponse> RetrieveMultipleAsync(FetchXmlExpression fetchXml) { string entityCollection = WebApiMetadata.GetEntitySetName(fetchXml.LogicalName); var retrieveOptions = new RetrieveOptions { FetchXml = fetchXml }; return(await RetrieveMultipleAsync(entityCollection, retrieveOptions)); }
public void ImplicitConversionTest() { var fetchXml = new FetchXmlExpression(Xml); string fetchXmlString = fetchXml; FetchXmlExpression fetchXmlExpression = fetchXmlString; Assert.True(fetchXmlExpression.LogicalName == "contact"); Assert.True(fetchXmlString.Contains("name=\"contact\"")); }
public virtual Task <EntityCollection> RetrieveMultipleAsync(FetchXmlExpression fetchXml, CancellationToken cancellationToken = default) { if (fetchXml is null) { throw new ArgumentNullException(nameof(fetchXml)); } var entityMetadata = WebApiMetadata.GetEntityMetadata(fetchXml.EntityName); var query = $"{entityMetadata.EntitySetName}?fetchXml={System.Net.WebUtility.UrlEncode(fetchXml)}"; return(ExecuteFunctionAsync <EntityCollection>(query, cancellationToken)); }
public RetrieveMultipleResponse RetrieveMultiple(FetchXmlExpression fetchXml) { return(RetrieveMultipleAsync(fetchXml).GetAwaiter().GetResult()); }
public void ParseFetchXmlTest() { var fetchXml = new FetchXmlExpression(Xml); Assert.True(fetchXml.LogicalName == "contact"); }