C# Class Open.Core.Common.EnumExtensions

Afficher le fichier Open project: philcockfield/Open.TestHarness.SL

Méthodes publiques

Méthode Description
ConvertTo ( this sourceUnit, FileSizeUnit targetUnit, double value ) : double

Converts a file-size in the give unit to a different unit.

IsHorizontal ( this direction ) : bool

Gets whether the direction is horizontal.

IsVertical ( this direction ) : bool

Gets whether the direction is vertical.

ToBytes ( this unit, double value ) : double

Converts the given value to types.

ToString ( this unit, bool abbreviate ) : string

Converts the unit to it's display name.

ToString ( this unit, double value ) : string

Converts the unit to it's pluralized display name (the display name is long form, not abbreviated).

ToThickness ( this edges, int thickness = 1 ) : System.Windows.Thickness

Converts the given collection of edges to a thickness.

ToVisibility ( this isVisible ) : Visibility

Converts a boolean into a corresponding Visible or Collapsed value.

Method Details

ConvertTo() public static méthode

Converts a file-size in the give unit to a different unit.
public static ConvertTo ( this sourceUnit, FileSizeUnit targetUnit, double value ) : double
sourceUnit this The source unit the 'value' is currently in.
targetUnit FileSizeUnit The unit to convert to.
value double The file-size value to convert.
Résultat double

IsHorizontal() public static méthode

Gets whether the direction is horizontal.
public static IsHorizontal ( this direction ) : bool
direction this The value to examine.
Résultat bool

IsVertical() public static méthode

Gets whether the direction is vertical.
public static IsVertical ( this direction ) : bool
direction this The value to examine.
Résultat bool

ToBytes() public static méthode

Converts the given value to types.
public static ToBytes ( this unit, double value ) : double
unit this The unit the value is currently in.
value double The value to convert.
Résultat double

ToString() public static méthode

Converts the unit to it's display name.
public static ToString ( this unit, bool abbreviate ) : string
unit this The unit to convert.
abbreviate bool Flag indicating if the name should be abbreivated (eg. "KB") or not (eg. "Kilobyte").
Résultat string

ToString() public static méthode

Converts the unit to it's pluralized display name (the display name is long form, not abbreviated).
public static ToString ( this unit, double value ) : string
unit this The unit to convert.
value double The file size value.
Résultat string

ToThickness() public static méthode

Converts the given collection of edges to a thickness.
public static ToThickness ( this edges, int thickness = 1 ) : System.Windows.Thickness
edges this The collection of edges to include in the return Thickness.
thickness int The pixel width/height of the edges.
Résultat System.Windows.Thickness

ToVisibility() public static méthode

Converts a boolean into a corresponding Visible or Collapsed value.
public static ToVisibility ( this isVisible ) : Visibility
isVisible this The boolean to convert.
Résultat Visibility