Exemple #1
0
        public DocumentTarget NewDocumentTarget()
        {
            if (Document == null || Parent == null)
            {
                throw new InvalidOperationException();
            }
            Uri collUrl    = DestinationUrl.GetParent();
            var collTarget = CollectionTarget.NewInstance(collUrl, Parent, _targetActions);

            return(new DocumentTarget(collTarget, DestinationUrl, Document, _targetActions));
        }
Exemple #2
0
        public MissingTarget NewMissingTarget()
        {
            if (Parent == null)
            {
                throw new InvalidOperationException();
            }
            Uri collUrl    = DestinationUrl.GetParent();
            var collTarget = CollectionTarget.NewInstance(collUrl, Parent, _targetActions);

            return(new MissingTarget(DestinationUrl, Name, collTarget, _targetActions));
        }
Exemple #3
0
        public CollectionTarget NewCollectionTarget()
        {
            if (Collection == null)
            {
                throw new InvalidOperationException();
            }
            Uri collUrl    = DestinationUrl.GetParent();
            var collTarget = Parent == null ? null : CollectionTarget.NewInstance(collUrl, Parent, _targetActions);

            return(new CollectionTarget(DestinationUrl, collTarget, Collection, false, _targetActions));
        }