Example #1
0
        /// <summary>
        /// Gets the document URL for the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        public string GetDocumentUrl(object entity)
        {
            DocumentInfo document;

            if (DocumentsByEntity.TryGetValue(entity, out document) == false)
            {
                throw new InvalidOperationException("Could not figure out identifier for transient instance");
            }

            return(RequestExecuter.UrlFor(document.Id));
        }