private void LogOperationAccepted(NameValueCollection uriParameterMatches, IOperation operation)
 {
     this.Logger.WriteDebug(
         "Accepted operation {0} with {1} matched parameters for uri parameter list {2}.", 
         operation.Name, 
         operation.Inputs.CountReady(), 
         uriParameterMatches.ToHtmlFormEncoding());
 }
        public Uri CreateUriFor(Uri baseAddress, object resourceKey, string uriName, NameValueCollection keyValues)
        {
            resourceKey = this.EnsureIsNotType(resourceKey);
            var template = this.FindBestMatchingTemplate(this.templates, resourceKey, uriName, keyValues);

            if (template == null)
            {
                throw new InvalidOperationException(
                    string.Format(
                        "No suitable Uri could be found for resource with key {0} with values {1}.", 
                        resourceKey, 
                        keyValues.ToHtmlFormEncoding()));
            }

            return template.BindByName(baseAddress, keyValues);
        }