/// <summary>
 /// Initializes a new instance of the <see cref="ConventionalODataEntityMetadataBuilder"/> class.
 /// </summary>
 /// <param name="baseUri">The base URI of the service.</param>
 /// <param name="entitySetName">Name of the entity set the entity belongs to.</param>
 /// <param name="entityInstance">The entity instance to build metadata for.</param>
 /// <param name="keyDelimiter">The user-specified delimiter to use.</param>
 internal ConventionalODataEntityMetadataBuilder(Uri baseUri, string entitySetName, IEdmStructuredValue entityInstance, DataServiceUrlKeyDelimiter keyDelimiter)
     : this(UriResolver.CreateFromBaseUri(baseUri, "baseUri"), entitySetName, entityInstance, keyDelimiter)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ConventionalODataEntityMetadataBuilder"/> class.
        /// </summary>
        /// <param name="resolver">The URI resolver to use.</param>
        /// <param name="entitySetName">Name of the entity set the entity belongs to.</param>
        /// <param name="entityInstance">The entity instance to build metadata for.</param>
        /// <param name="keyDelimiter">The user-specified conventions to use.</param>
        internal ConventionalODataEntityMetadataBuilder(UriResolver resolver, string entitySetName, IEdmStructuredValue entityInstance, DataServiceUrlKeyDelimiter keyDelimiter)
        {
            Util.CheckArgumentNullAndEmpty(entitySetName, "entitySetName");
            Util.CheckArgumentNull(entityInstance, "entityInstance");
            Util.CheckArgumentNull(keyDelimiter, "keyDelimiter");
            this.entitySetName  = entitySetName;
            this.entityInstance = entityInstance;

            this.uriBuilder = new ConventionalODataUriBuilder(resolver, keyDelimiter);
            this.baseUri    = resolver.BaseUriOrNull;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConventionalODataUriBuilder"/> class.
 /// </summary>
 /// <param name="resolver">The uri resolver to use.</param>
 /// <param name="urlKeyDelimiter">The key delimiter user specified.</param>
 internal ConventionalODataUriBuilder(UriResolver resolver, DataServiceUrlKeyDelimiter urlKeyDelimiter)
 {
     Debug.Assert(resolver != null, "resolver != null");
     this.resolver        = resolver;
     this.urlKeyDelimiter = urlKeyDelimiter;
 }