Skip to content

9ea52d98 de86 61b2 6305 bc6c8c3d2883

Kim Hugener-Ohlsen edited this page May 28, 2016 · 2 revisions

MethodUnit Class

A unit for implementing units with a custom conversion to their base unit.

Inheritance Hierarchy

System.Object
  Sundew.Quantities.Engine.Units.MethodUnit
Namespace: Sundew.Quantities.Engine.Units
Assembly: Sundew.Quantities (in Sundew.Quantities.dll) Version: 1.0.2.0 (1.0.2.0)

Syntax

C#

public class MethodUnit : IUnit, IConvertToAndFromBase, 
	IEquatable<IUnit>

C#

public class MethodUnit : IUnit, IConvertToAndFromBase, 
	IEquatable<IUnit>

VB

Public Class MethodUnit
	Implements IUnit, IConvertToAndFromBase, IEquatable(Of IUnit)

VB

Public Class MethodUnit
	Implements IUnit, IConvertToAndFromBase, IEquatable(Of IUnit)

C++

public ref class MethodUnit : IUnit, 
	IConvertToAndFromBase, IEquatable<IUnit^>

C++

public ref class MethodUnit : IUnit, 
	IConvertToAndFromBase, IEquatable<IUnit^>

F#

type MethodUnit =  
    class
        interface IUnit
        interface IConvertToAndFromBase
        interface IEquatable<IUnit>
    end

F#

type MethodUnit =  
    class
        interface IUnit
        interface IConvertToAndFromBase
        interface IEquatable<IUnit>
    end

The MethodUnit type exposes the following members.

Constructors

 

Name Description
Public method MethodUnit(Func(Double, Double), Func(Double, Double), String, Expression) Initializes a new instance of the MethodUnit class.
Public method MethodUnit(Prefix, Func(Double, Double), Func(Double, Double), String, Expression) Initializes a new instance of the MethodUnit class.
  Back to Top

Properties

 

Name Description
Public property BaseUnit Gets the base unit.
Public property Notation Gets the notation.
Public property PrefixFactor Gets the prefix factor.
  Back to Top

Methods

 

Name Description
Public method Equals(Object) Determines whether the specified Object, is equal to this instance. (Overrides Object.Equals(Object).)
Public method Equals(IUnit) Indicates whether the current object is equal to another object of the same type.
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 FormatValue Formats the value.
Public method FromBase Converts the specified value from the SI base value into the unit value.
Public method GetExpression Gets the expression.
Public method GetHashCode Returns a hash code for this instance. (Overrides Object.GetHashCode().)
Public method GetNotation Gets the notation.
Public method GetNotationWithoutPrefix Gets the notation without prefix.
Public method GetPrefixedUnit Gets the prefixed unit.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToBase Converts the specified value into the unit's base value.
Public method ToString Returns a String that represents this instance. (Overrides Object.ToString().)
  Back to Top

Extension Methods

 

Name Description
Public Extension Method Exp Raises the specified LHS into the power of the RHS. (Defined by UnitExtensions.)
  Back to Top

See Also

Reference

Sundew.Quantities.Engine.Units Namespace

Clone this wiki locally