예제 #1
0
        /// <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="conventions">The user-specified conventions to use.</param>
        internal ConventionalODataEntityMetadataBuilder(UriResolver resolver, string entitySetName, IEdmStructuredValue entityInstance, DataServiceUrlConventions conventions)
        {
            Util.CheckArgumentNullAndEmpty(entitySetName, "entitySetName");
            Util.CheckArgumentNull(entityInstance, "entityInstance");
            Util.CheckArgumentNull(conventions, "conventions");
            this.entitySetName  = entitySetName;
            this.entityInstance = entityInstance;

            this.uriBuilder = new ConventionalODataUriBuilder(resolver, conventions);
            this.baseUri    = resolver.BaseUriOrNull;
        }
        /// <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="conventions">The user-specified conventions to use.</param>
        internal ConventionalODataEntityMetadataBuilder(UriResolver resolver, string entitySetName, IEdmStructuredValue entityInstance, DataServiceUrlConventions conventions)
        {
            Util.CheckArgumentNullAndEmpty(entitySetName, "entitySetName");
            Util.CheckArgumentNull(entityInstance, "entityInstance");
            Util.CheckArgumentNull(conventions, "conventions");
            this.entitySetName = entitySetName;
            this.entityInstance = entityInstance;

            this.uriBuilder = new ConventionalODataUriBuilder(resolver, conventions);
            this.baseUri = resolver.BaseUriOrNull;
        }