/// <summary>
        /// Build a ResourceLocation based on the endpoint, the name of a collection and a resource id
        /// </summary>
        /// <param name="baseUri"></param>
        /// <param name="collectionName"></param>
        /// <param name="id">The id, without '@'</param>
        /// <returns></returns>
        public static ResourceLocation Build(Uri baseUri, string collectionName, string id)
        {
            if (String.IsNullOrEmpty(id))
            {
                throw new ArgumentException("id must not be empty", "id");
            }

            var result = ResourceLocation.Build(baseUri, collectionName);

            result.Id = id;

            return(result);
        }
        /// <summary>
        /// Build a new ResourceLocation based on the endpoint, name of the collection, the id and version.
        /// </summary>
        /// <param name="collectionName"></param>
        /// <param name="id"></param>
        /// <param name="versionId"></param>
        /// <returns></returns>
        public static ResourceLocation Build(Uri baseUri, string collectionName, string id, string versionId)
        {
            if (String.IsNullOrEmpty(versionId))
            {
                throw new ArgumentException("versionId must not be empty", "versionId");
            }

            var result = ResourceLocation.Build(baseUri, collectionName, id);

            result.VersionId = versionId;
            var x = result.ToString();

            return(result);
        }
 public static Uri BuildResourceIdPath(string collection, string id, string version)
 {
     return(ResourceLocation.Build(LOCALHOST, collection, id, version).OperationPath);
 }