This documentation is archived and is not being maintained.

PolicyUnit Structure

Represents a size measurement in a log store policy.

Namespace:  System.IO.Log
Assembly:  System.IO.Log (in System.IO.Log.dll)

public value class PolicyUnit

The PolicyUnit type exposes the following members.

  NameDescription
Public methodPolicyUnitInitializes a new instance of the PolicyUnit structure with the specified value and type.
Top

  NameDescription
Public propertyTypeGets the unit type of the PolicyUnit.
Public propertyValueGets the value of the PolicyUnit.
Top

  NameDescription
Public methodEqualsIndicates whether this instance and a specified object are equal. (Overrides ValueType::Equals(Object).)
Public methodStatic memberExtentsCreates a PolicyUnit of type Extents from the specified number.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeProvides a unique hash code for this object. (Overrides ValueType::GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberPercentageCreates a PolicyUnit of type Percentage from the specified number.
Public methodToStringReturns a string representation of this object. (Overrides ValueType::ToString().)
Top

  NameDescription
Public operatorStatic memberEqualityCompares two PolicyUnit instances to determine whether they are equal.
Public operatorStatic memberInequalityCompares two PolicyUnit instances to determine whether they are not equal.
Top

The PolicyUnit structure represents a size measurement in a log store policy. The PolicyUnitType enumeration lists the units of measurement that can be represented.

You can use the Value property to determine the size of the measurement. To determine the unit of measurement, use the Type property. You can convert other data types to a PolicyUnit by using the Percentage and Extents methods.

This example shows how to use the LogPolicy class and PolicyUnit structure to set policy for a log record sequence.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: