Click or drag to resize

IVersionableItemAsyncPutUnderVersionControlAsync Method

IT Hit WebDAV Classes Reference
Puts or removes current item from version control.

Namespace:  ITHit.WebDAV.Server.DeltaV
Assembly:  ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax
Task PutUnderVersionControlAsync(
	bool enable
)

Task PutUnderVersionControlAsync(
	bool enable
)

Parameters

enable
Type: SystemBoolean

[Missing <param name="enable"/> documentation for "M:ITHit.WebDAV.Server.DeltaV.IVersionableItemAsync.PutUnderVersionControlAsync(System.Boolean)"]

Return Value

Type: Task
.
Exceptions
ExceptionCondition
LockedExceptionThis item was locked. Client did not provide the lock token.
NeedPrivilegesExceptionThe user doesn't have enough privileges.
InsufficientStorageExceptionQuota limit is reached.
MultistatusExceptionErrors has occurred during processing of the subtree.
DavExceptionIn other cases.
Remarks

By default items in the repository are not under version control. When item is being put under version control engine calls PutUnderVersionControlAsync(Boolean) method passing true as a parameter. In your PutUnderVersionControlAsync(Boolean) implementation you must create a new version. The content and properties of the new version must be copied from this item. After the call to PutUnderVersionControlAsync(Boolean)VersionHistory property must point to the object implementing IHistoryAsync interface that will contain single version. The IsCheckedOut property must return false;

If item is under version control it mast always have at last one version in its versions list.

If AutoPutUnderVersionControl is true and item is not under version control prior to any item content or properties update PutUnderVersionControlAsync(Boolean) will be called.

When item is being removed from version control engine calls PutUnderVersionControlAsync(Boolean) method passing false as a parameter. In your implementation you will usually delete all versions. VersionHistory property must return null after this call.

See Also