Click or drag to resize

IContentEtag Property

IT Hit WebDAV Classes Reference
Gets entity tag - string that identifies current state of resource's content.

Namespace: ITHit.WebDAV.Server
Assembly: ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 4.5.3121.0
Syntax
string Etag { get; }

Property Value

Type: String
Remarks
More information about etags is available here: http://en.wikipedia.org/wiki/HTTP_ETag You can return here either cheksum or hash or counter which increases with every modification. This property shall return different value if content changes. Return null to indicate that server doesn't support etags.
Examples

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

public string Etag
{
    get
    {
        var serialNumber = GetStreamAndDeserialize<int>("SerialNumber", context.Logger);
        return string.Format("{0}-{1}", Modified.ToBinary(), serialNumber);
    }
}
See Also