/// <summary> /// Initializes a new instance of the <see cref="RemoteDocumentTarget"/> class. /// </summary> /// <param name="parent">The parent collection</param> /// <param name="name">The name of the remote document</param> /// <param name="destinationUrl">The destination URL</param> /// <param name="targetActions">The target actions implementation to use</param> public RemoteDocumentTarget(RemoteCollectionTarget parent, string name, Uri destinationUrl, IRemoteTargetActions targetActions) { _targetActions = targetActions; Parent = parent; Name = name; DestinationUrl = destinationUrl; }
/// <summary> /// Initializes a new instance of the <see cref="RemoteMissingTarget"/> class. /// </summary> /// <param name="parent">The parent collection</param> /// <param name="destinationUrl">The destination URL</param> /// <param name="name">The name of the missing remote targe</param> /// <param name="targetActions">The target actions implementation to use</param> public RemoteMissingTarget([NotNull] RemoteCollectionTarget parent, [NotNull] Uri destinationUrl, [NotNull] string name, [NotNull] IRemoteTargetActions targetActions) { _targetActions = targetActions; Parent = parent; Name = name; DestinationUrl = destinationUrl; }
private async Task <Engines.CollectionActionResult> RemoteExecuteAsync( IRemoteTargetActions handler, Uri sourceUrl, SelectionResult sourceSelectionResult, Uri targetUrl, DepthHeader depth, bool overwrite, CancellationToken cancellationToken) { Debug.Assert(sourceSelectionResult.Collection != null, "sourceSelectionResult.Collection != null"); var parentCollectionUrl = targetUrl.GetParent(); var engine = new RecursiveExecutionEngine <RemoteCollectionTarget, RemoteDocumentTarget, RemoteMissingTarget>( handler, overwrite, Logger); var targetName = targetUrl.GetName(); var parentName = parentCollectionUrl.GetName(); var parentCollection = new RemoteCollectionTarget(null, parentName, parentCollectionUrl, false, handler); var targetItem = await handler.GetAsync(parentCollection, targetName, cancellationToken); return(await ExecuteAsync( engine, sourceUrl, sourceSelectionResult, parentCollection, targetItem, depth, cancellationToken) ); }
/// <summary> /// Initializes a new instance of the <see cref="RemoteCollectionTarget"/> class. /// </summary> /// <param name="parent">The parent collection</param> /// <param name="name">The name of the remote collection</param> /// <param name="destinationUrl">The destination URL</param> /// <param name="created">Was the collection created by the <see cref="RecursiveExecutionEngine{TCollection,TDocument,TMissing}"/></param> /// <param name="targetActions">The target actions implementation to use</param> public RemoteCollectionTarget([CanBeNull] RemoteCollectionTarget parent, [NotNull] string name, [NotNull] Uri destinationUrl, bool created, [NotNull] IRemoteTargetActions targetActions) { _parent = parent; _targetActions = targetActions; Name = name; DestinationUrl = destinationUrl; Created = created; }
/// <summary> /// Initializes a new instance of the <see cref="RemoteCollectionTarget"/> class. /// </summary> /// <param name="parent">The parent collection</param> /// <param name="name">The name of the remote collection</param> /// <param name="destinationUrl">The destination URL</param> /// <param name="created">Was the collection created by the <see cref="RecursiveExecutionEngine{TCollection,TDocument,TMissing}"/></param> /// <param name="targetActions">The target actions implementation to use</param> public RemoteCollectionTarget(RemoteCollectionTarget parent, string name, Uri destinationUrl, bool created, IRemoteTargetActions targetActions) { _parent = parent; _targetActions = targetActions; Name = name; DestinationUrl = destinationUrl; Created = created; }