Exemplo n.º 1
0
        public void HasEditLink_RoundTrips()
        {
            // Arrange
            SelfLinkBuilder <Uri> editLinkBuilder = new SelfLinkBuilder <Uri>((ctxt) => null, followsConventions: true);

            // Act
            _entityset.HasEditLink(editLinkBuilder);

            // Assert
            Assert.Equal(editLinkBuilder, _entityset.GetEditLink());
        }
        /// <summary>
        /// Constructs an instance of an <see cref="EntitySetLinkBuilderAnnotation" /> from an <see cref="EntitySetConfiguration" />.
        /// </summary>
        public EntitySetLinkBuilderAnnotation(EntitySetConfiguration entitySet)
        {
            if (entitySet == null)
            {
                throw Error.ArgumentNull("entitySet");
            }

            _entitySetName       = entitySet.Name;
            _feedSelfLinkBuilder = entitySet.GetFeedSelfLink();
            _idLinkBuilder       = entitySet.GetIdLink();
            _editLinkBuilder     = entitySet.GetEditLink();
            _readLinkBuilder     = entitySet.GetReadLink();
        }
        /// <summary>
        /// Constructs an instance of an <see cref="EntitySetLinkBuilderAnnotation" /> from an <see cref="EntitySetConfiguration" />.
        /// </summary>
        public EntitySetLinkBuilderAnnotation(EntitySetConfiguration entitySet)
        {
            if (entitySet == null)
            {
                throw Error.ArgumentNull("entitySet");
            }

            _entitySetName = entitySet.Name;
            _feedSelfLinkBuilder = entitySet.GetFeedSelfLink();
            _idLinkBuilder = entitySet.GetIdLink();
            _editLinkBuilder = entitySet.GetEditLink();
            _readLinkBuilder = entitySet.GetReadLink();
        }
        public EntitySetLinkBuilderAnnotation(EntitySetConfiguration entitySet)
        {
            if (entitySet == null)
            {
                throw Error.ArgumentNull("entitySet");
            }

            _entitySet = entitySet;
            _feedSelfLinkBuilder = entitySet.GetFeedSelfLink();
            _idLinkBuilder = entitySet.GetIdLink();

            _editLinkBuilder = entitySet.GetEditLink();
            _readLinkBuilder = entitySet.GetReadLink();
            _navigationPropertyLinkBuilderLookup = new Dictionary<IEdmNavigationProperty, NavigationLinkBuilder>();
        }
        public EntitySetLinkBuilderAnnotation(EntitySetConfiguration entitySet)
        {
            if (entitySet == null)
            {
                throw Error.ArgumentNull("entitySet");
            }

            _entitySet           = entitySet;
            _feedSelfLinkBuilder = entitySet.GetFeedSelfLink();
            _idLinkBuilder       = entitySet.GetIdLink();

            _editLinkBuilder = entitySet.GetEditLink();
            _readLinkBuilder = entitySet.GetReadLink();
            _navigationPropertyLinkBuilderLookup = new Dictionary <IEdmNavigationProperty, NavigationLinkBuilder>();
        }