/// <summary>The get dependencies.</summary>
        /// <param name="response">The response.</param>
        /// <param name="path">The path.</param>
        /// <returns>The dependencies.</returns>
        private IEnumerable <string> GetDependencies(RetrieveSingleResponse response, IEnumerable <object> path)
        {
            yield return(this.GetTag(TagSingle));

            var empty = response.Entity == null;

            if (empty)
            {
                yield return(this.GetTag("empty"));

                // recalculate the dependencies for an empty result

                foreach (var dependency in this.GetDependencies(response.Request, false, path))
                {
                    yield return(dependency);
                }
            }

            foreach (var dependency in this.GetDependenciesForObject(response.Entity, true, path))
            {
                yield return(dependency);
            }
        }
Пример #2
0
        private static object CloneResponse(RetrieveSingleResponse response)
        {
            var clone = new RetrieveSingleResponse(response.Request, CloneResponse(response.Response) as RetrieveMultipleResponse);

            return(clone);
        }