Table of Contents

Class StorageCapacity

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Provides a way to represent a table of both binary and metric prefixes that precedes a unit of measure optimized for storage capacity measurement standards.

public abstract class StorageCapacity : MultipleTable, IEquatable<IUnit>
Inheritance
Object
StorageCapacity
Implements
IEquatable<IUnit>
Derived
Inherited Members

Constructors

StorageCapacity(IPrefixUnit, Action<StorageCapacityOptions>)

Initializes a new instance of the StorageCapacity class.

protected StorageCapacity(IPrefixUnit unit, Action<StorageCapacityOptions> setup = null)

Parameters

unit IPrefixUnit

The instance of an object that implements the IPrefixUnit interface.

setup Action<StorageCapacityOptions>

The StorageCapacityOptions which may be configured.

Exceptions

System.ArgumentNullException

unit cannot be null.

Properties

Gibi

Gets the binary-multiple prefix gibi (Gi).

public IPrefixUnit Gibi { get; }

Property Value

IPrefixUnit

The binary-multiple prefix gibi (Gi).

Giga

Gets the metric-multiple prefix giga (G).

public IPrefixUnit Giga { get; }

Property Value

IPrefixUnit

The metric-multiple prefix giga (G).

Kibi

Gets the binary-multiple prefix kibi (Ki).

public IPrefixUnit Kibi { get; }

Property Value

IPrefixUnit

The binary-multiple prefix kibi (Ki).

Kilo

Gets the metric-multiple prefix kilo (k).

public IPrefixUnit Kilo { get; }

Property Value

IPrefixUnit

The metric-multiple prefix kilo (k).

Mebi

Gets the binary-multiple prefix mebi (Mi).

public IPrefixUnit Mebi { get; }

Property Value

IPrefixUnit

The binary-multiple prefix mebi (Mi).

Mega

Gets the metric-multiple prefix mega (M).

public IPrefixUnit Mega { get; }

Property Value

IPrefixUnit

The metric-multiple prefix mega (M).

Pebi

Gets the binary-multiple prefix pebi (Pi).

public IPrefixUnit Pebi { get; }

Property Value

IPrefixUnit

The binary-multiple prefix pebi (Pi).

Peta

Gets the metric-multiple prefix peta (P).

public IPrefixUnit Peta { get; }

Property Value

IPrefixUnit

The metric-multiple prefix peta (P).

Tebi

Gets the binary-multiple prefix tebi (Ti).

public IPrefixUnit Tebi { get; }

Property Value

IPrefixUnit

The binary-multiple prefix tebi (Ti).

Tera

Gets the metric-multiple prefix tera (T).

public IPrefixUnit Tera { get; }

Property Value

IPrefixUnit

The metric-multiple prefix tera (T).

Methods

ToAggregateString(Boolean, Boolean, Boolean)

Returns an aggregated System.String of all multiple prefix of this instance.

public string ToAggregateString(bool includePowerOfTwoGroup = true, bool includePowerOfTenGroup = true, bool includeUnit = true)

Parameters

includePowerOfTwoGroup Boolean

if set to true all binary-multiple prefix is included in the aggregate.

includePowerOfTenGroup Boolean

if set to true all metric-multiple prefix is included in the aggregate.

includeUnit Boolean

if set to true the base unit is included in the aggregate.

Returns

String

System.String.

ToString()

Returns a System.String that represents largest metric-multiple prefix of this instance.

public override string ToString()

Returns

String

A System.String that represents largest metric-multiple prefix of this instance.

Remarks

Evaluates the largest metric-multiple prefix that is greater or equal to 1 and returns that as either Binary or Decimal formatted.

See Also