Skip to content

0cc72e10 a321 398e 16ab 932f2862f9ba

Axel Kesseler edited this page Oct 3, 2019 · 2 revisions

CapacityEntity Class

Capacity entity provides functionality to calculate and format capacity strings.

Inheritance Hierarchy

System.Object
  Plexdata.Converters.Entities.CapacityEntity
Namespace: Plexdata.Converters.Entities
Assembly: Plexdata.CapacityConverter (in Plexdata.CapacityConverter.dll) Version: 1.0.1

Syntax

C#

public class CapacityEntity

The CapacityEntity type exposes the following members.

Constructors

 

Name Description
Public method CapacityEntity Standard constructor with initial arguments.
  Back to Top

Properties

 

Name Description
Public property Unit1 Gets the first unit to be appended at results.
Public property Unit2 Gets the alternative unit to be appended at results.
Public property Value Gets the value to be used as divisor for result calculations.
  Back to Top

Methods

 

Name Description
Private method AdjustDecimalDigits Adjusts the number of decimal digits.
Public method Calculate(Decimal) Calculates the result by using the default number of decimal digits.
Public method Calculate(Decimal, Int32) Calculates the result by using provided number of decimal digits.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Format(Decimal) Formats provided value according to current settings.
Public method Format(Decimal, Boolean) Formats provided value according to current settings.
Public method Format(Decimal, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, Int32) Formats provided value according to current settings.
Public method Format(Decimal, String) Formats provided value according to current settings.
Public method Format(Decimal, Boolean, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, Boolean, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, Int32, Boolean) Formats provided value according to current settings.
Public method Format(Decimal, Int32, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, Int32, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Boolean) Formats provided value according to current settings.
Public method Format(Decimal, String, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32) Formats provided value according to current settings.
Public method Format(Decimal, Boolean, Boolean, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, Int32, Boolean, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, Int32, Boolean, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Boolean, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Boolean, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32, Boolean) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, Int32, Boolean, Boolean, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32, Boolean, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32, Boolean, NumberFormatInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32, Boolean, Boolean, CultureInfo) Formats provided value according to current settings.
Public method Format(Decimal, String, Int32, Boolean, Boolean, NumberFormatInfo) Formats provided value according to current settings.
Private method GetCalculate Returns the default calculation behaviour.
Private method GetCulture Returns the default culture.
Private method GetDecimals Returns the default number of decimal digits.
Private method GetFormatter() Returns the default number formatter.
Private method GetFormatter(CultureInfo) Returns the number formatter based on provided culture.
Private method GetFormatter(CultureInfo, Int32) Returns the number formatter based on provided culture.
Private method GetFormatter(NumberFormatInfo, Int32) Returns a clone of provided formatter and adjusts its number of decimal digits accordingly.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Private method GetIntercept Returns the default intercept behaviour.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Private method GetUnit() Returns the default unit.
Private method GetUnit(String) Returns a valid unit to be used.
Public method IsEqual Determines whether provided unit is equal to one of the assigned units.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string representation of current instance. (Overrides Object.ToString().)
  Back to Top

Remarks

This class provides extended functionalities to calculate and format capacity strings. Such a capacity string consists of a number (automatically calculated or as is) followed by one of the pre-defined units or a user defined unit.

See Also

Reference

Plexdata.Converters.Entities Namespace

Clone this wiki locally