HostFileChangeMonitor.UniqueId Property

Definition

Gets an identifier for the HostFileChangeMonitor instance that is based on the set of monitored directories and file paths.

public override string UniqueId { get; }

Property Value

An identifier for the change monitor.

Remarks

The string that makes up the UniqueId property value is constructed from the following parts:

  • A file or directory path.

  • The most recent write time in UTC time, measured as ticks but represented as a hexadecimal string.

  • The file size, represented as a hexadecimal string.

If a file change monitor is monitoring multiple paths, the information returned by this property is concatenated into a single string for all the monitored directories and file paths.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)