Show / Hide Table of Contents

Class StorageCapacity

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.

Inheritance
Object
MultipleTable
StorageCapacity
BitStorageCapacity
ByteStorageCapacity
Implements
IEquatable<IUnit>
Inherited Members
MultipleTable.Unit
MultipleTable.Equals(IUnit)
MultipleTable.Equals(Object)
MultipleTable.GetHashCode()
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public abstract class StorageCapacity : MultipleTable, IEquatable<IUnit>

Constructors

| Improve this Doc View Source

StorageCapacity(IPrefixUnit, Action<StorageCapacityOptions>)

Initializes a new instance of the StorageCapacity class.

Declaration
protected StorageCapacity(IPrefixUnit unit, Action<StorageCapacityOptions> setup = null)
Parameters
Type Name Description
IPrefixUnit unit

The instance of an object that implements the IPrefixUnit interface.

Action<StorageCapacityOptions> setup

The StorageCapacityOptions which may be configured.

Exceptions
Type Condition
ArgumentNullException

unit cannot be null.

Properties

| Improve this Doc View Source

Gibi

Gets the binary-multiple prefix gibi (Gi).

Declaration
public IPrefixUnit Gibi { get; }
Property Value
Type Description
IPrefixUnit

The binary-multiple prefix gibi (Gi).

| Improve this Doc View Source

Giga

Gets the metric-multiple prefix giga (G).

Declaration
public IPrefixUnit Giga { get; }
Property Value
Type Description
IPrefixUnit

The metric-multiple prefix giga (G).

| Improve this Doc View Source

Kibi

Gets the binary-multiple prefix kibi (Ki).

Declaration
public IPrefixUnit Kibi { get; }
Property Value
Type Description
IPrefixUnit

The binary-multiple prefix kibi (Ki).

| Improve this Doc View Source

Kilo

Gets the metric-multiple prefix kilo (k).

Declaration
public IPrefixUnit Kilo { get; }
Property Value
Type Description
IPrefixUnit

The metric-multiple prefix kilo (k).

| Improve this Doc View Source

Mebi

Gets the binary-multiple prefix mebi (Mi).

Declaration
public IPrefixUnit Mebi { get; }
Property Value
Type Description
IPrefixUnit

The binary-multiple prefix mebi (Mi).

| Improve this Doc View Source

Mega

Gets the metric-multiple prefix mega (M).

Declaration
public IPrefixUnit Mega { get; }
Property Value
Type Description
IPrefixUnit

The metric-multiple prefix mega (M).

| Improve this Doc View Source

Pebi

Gets the binary-multiple prefix pebi (Pi).

Declaration
public IPrefixUnit Pebi { get; }
Property Value
Type Description
IPrefixUnit

The binary-multiple prefix pebi (Pi).

| Improve this Doc View Source

Peta

Gets the metric-multiple prefix peta (P).

Declaration
public IPrefixUnit Peta { get; }
Property Value
Type Description
IPrefixUnit

The metric-multiple prefix peta (P).

| Improve this Doc View Source

Tebi

Gets the binary-multiple prefix tebi (Ti).

Declaration
public IPrefixUnit Tebi { get; }
Property Value
Type Description
IPrefixUnit

The binary-multiple prefix tebi (Ti).

| Improve this Doc View Source

Tera

Gets the metric-multiple prefix tera (T).

Declaration
public IPrefixUnit Tera { get; }
Property Value
Type Description
IPrefixUnit

The metric-multiple prefix tera (T).

Methods

| Improve this Doc View Source

ToAggregateString(Boolean, Boolean, Boolean)

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

Declaration
public string ToAggregateString(bool includePowerOfTwoGroup = true, bool includePowerOfTenGroup = true, bool includeUnit = true)
Parameters
Type Name Description
Boolean includePowerOfTwoGroup

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

Boolean includePowerOfTenGroup

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

Boolean includeUnit

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

Returns
Type Description
String

System.String.

| Improve this Doc View Source

ToString()

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

Declaration
public override string ToString()
Returns
Type Description
String

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

Overrides
MultipleTable.ToString()
Remarks

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

Implements

System.IEquatable<T>

See Also

MultipleTable
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX