private FeedResponse <T> CreateChangeFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage) { return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.serializerCore)); }
private FeedResponse <T> CreateChangeFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage, Documents.ResourceType resourceType) { return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.serializerCore, resourceType)); }
private FeedResponse <T> CreateChangeFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage) { using (cosmosResponseMessage.Trace.StartChild("ChangeFeed Response Serialization")) { return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.serializerCore)); } }
private FeedResponse <T> CreateQueryFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage) { if (cosmosResponseMessage is QueryResponse queryResponse) { return(QueryResponse <T> .CreateResponse <T>( cosmosQueryResponse : queryResponse, serializerCore : this.serializerCore)); } return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.serializerCore)); }
private FeedResponse <T> CreateQueryFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage, Documents.ResourceType resourceType) { QueryResponse queryResponse = cosmosResponseMessage as QueryResponse; if (queryResponse != null) { return(QueryResponse <T> .CreateResponse <T>( cosmosQueryResponse : queryResponse, serializerCore : this.serializerCore)); } return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.serializerCore, resourceType)); }
internal FeedResponse <T> CreateQueryFeedResponse <T>( ResponseMessage cosmosResponseMessage) { //Throw the exception cosmosResponseMessage.EnsureSuccessStatusCode(); QueryResponse queryResponse = cosmosResponseMessage as QueryResponse; if (queryResponse != null) { return(QueryResponse <T> .CreateResponse <T>( responseMessage : queryResponse, jsonSerializer : this.cosmosSerializer)); } return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.cosmosSerializer)); }
private FeedResponse <T> CreateQueryFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage) { if (cosmosResponseMessage is QueryResponse queryResponse) { using (cosmosResponseMessage.Trace.StartChild("Query Response Serialization")) { return(QueryResponse <T> .CreateResponse <T>( cosmosQueryResponse : queryResponse, serializerCore : this.serializerCore)); } } using (cosmosResponseMessage.Trace.StartChild("Feed Response Serialization")) { return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.serializerCore)); } }
private FeedResponse <T> CreateQueryFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage, Documents.ResourceType resourceType) { //Throw the exception cosmosResponseMessage.EnsureSuccessStatusCode(); QueryResponse queryResponse = cosmosResponseMessage as QueryResponse; if (queryResponse != null) { return(QueryResponse <T> .CreateResponse <T>( cosmosQueryResponse : queryResponse, serializerCore : this.serializerCore)); } return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, this.serializerCore, resourceType)); }
private FeedResponse <T> CreateQueryFeedResponseHelper <T>( ResponseMessage cosmosResponseMessage, bool usePropertySerializer) { //Throw the exception cosmosResponseMessage.EnsureSuccessStatusCode(); // The property serializer should be used for internal // query operations like throughput since user serializer can break the logic CosmosSerializer serializer = usePropertySerializer ? this.propertiesSerializer : this.cosmosSerializer; QueryResponse queryResponse = cosmosResponseMessage as QueryResponse; if (queryResponse != null) { return(QueryResponse <T> .CreateResponse <T>( cosmosQueryResponse : queryResponse, jsonSerializer : serializer)); } return(ReadFeedResponse <T> .CreateResponse <T>( cosmosResponseMessage, serializer)); }