Click or drag to resize

IHistoryGetRootVersion Method

IT Hit WebDAV Classes Reference
Retrieves item's root version.

Namespace: ITHit.WebDAV.Server.DeltaV
Assembly: ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 4.5.3121.0
Syntax
IVersion GetRootVersion()

Return Value

Type: IVersion
.
Exceptions
ExceptionCondition
NeedPrivilegesExceptionThe user doesn't have enough privileges.
DavExceptionIn other cases.
Examples

The code below is part of 'WebDAVServer.DeltaV' sample provided with the SDK.

public IVersion GetRootVersion()
{
    string command = 
        @"SELECT VersionId, ItemId, VersionNumber, Name, Created, SerialNumber
          FROM Version
          WHERE ItemId = @ItemId AND VersionNumber =
                           (SELECT MIN(VersionNumber) FROM Version WHERE ItemId = @ItemId)";

    return context.ExecuteVersion(
        path.Remove(path.IndexOf('?')),
        command,
        "@ItemId", itemId).FirstOrDefault();
}
See Also