Exemplo n.º 1
0
        protected void Redirect([NotNull] ObjectDataset objectDataset)
        {
            Assert.ArgumentNotNull(objectDataset, nameof(objectDataset));

            _objectDataset.RemoveAssociationEnd(this);

            _objectDataset = objectDataset;
            _objectDataset.AddAssociationEnd(this);

            _name = GetEndName(Association, objectDataset);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AssociationEnd"/> class.
        /// </summary>
        /// <param name="association">The association.</param>
        /// <param name="objectDataset">The object dataset.</param>
        /// <param name="documentAssociationEdit"></param>
        protected AssociationEnd([NotNull] Association association,
                                 [NotNull] ObjectDataset objectDataset,
                                 bool documentAssociationEdit)
        {
            Assert.ArgumentNotNull(association, nameof(association));
            Assert.ArgumentNotNull(objectDataset, nameof(objectDataset));

            _association     = association;
            _end1Association = null;
            _end2Association = null;

            _objectDataset           = objectDataset;
            _documentAssociationEdit = documentAssociationEdit;

            // TODO: revise
            _objectDataset.AddAssociationEnd(this);

            _name = GetEndName(association, objectDataset);
        }