Interface ITargetActions<TCollection, TDocument, TMissing>
The interface for target actions
Namespace:FubarDev.WebDavServer.Engines
Assembly:FubarDev.WebDavServer.dll
Syntax
public interface ITargetActions<in TCollection, TDocument, in TMissing>
where TCollection : class, ICollectionTarget<TCollection, TDocument, TMissing> where TDocument : class, IDocumentTarget<TCollection, TDocument, TMissing> where TMissing : class, IMissingTarget<TCollection, TDocument, TMissing>
Type Parameters
Name | Description |
---|---|
TCollection | The interface type for a collection target |
TDocument | The interface type for a document target |
TMissing | The interface type for a missing target |
Properties
| Improve this Doc View SourceDispatcher
Gets the WebDAV dispatcher
Declaration
IWebDavDispatcher Dispatcher { get; }
Property Value
Type | Description |
---|---|
IWebDavDispatcher |
Remarks
This is required to get all the predefined (and live) properties.
ExistingTargetBehaviour
Gets the behaviour of this implementation when a target already exists
Declaration
RecursiveTargetBehaviour ExistingTargetBehaviour { get; }
Property Value
Type | Description |
---|---|
RecursiveTargetBehaviour |
Methods
| Improve this Doc View SourceExecuteAsync(ICollection, TCollection, CancellationToken)
Do some cleanup after all child elements of the source are processed (copied or moved)
Declaration
[NotNull]
Task ExecuteAsync([NotNull] ICollection source, TCollection destination, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ICollection | source | The source collection |
TCollection | destination | The destination collection |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task | The task for async execution |
Remarks
In the case of a move operation, the source must be deleted by this implementation.
ExecuteAsync(IDocument, TDocument, CancellationToken)
Copies or moves a document to an existing target
Declaration
[NotNull]
Task<ActionResult> ExecuteAsync([NotNull] IDocument source, [NotNull] TDocument destination, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IDocument | source | The source document |
TDocument | destination | The destination document to overwrite |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<ActionResult> | The result information about this action |
Remarks
The source can only be copied to the destination when overwriting it is allowed.
ExecuteAsync(IDocument, TMissing, CancellationToken)
Copies or moves a document to a target that doesn't exist
Declaration
[NotNull]
[ItemNotNull]
Task<TDocument> ExecuteAsync([NotNull] IDocument source, [NotNull] TMissing destination, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IDocument | source | The source document |
TMissing | destination | The target where the document should be copied or moved to |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<TDocument> | The created document target |