Class Position
Factory helpers for Position<A> at the default amount type.
public static class Position
- Inheritance
-
Position
- Inherited Members
Remarks
C# has no default type arguments, so Position<DecimalAmount> would otherwise
have to be spelled out at every construction. This class carries the common case; it is
legal alongside the generic struct because the two differ in arity.
Methods
Of(long, AssetIdentifier)
Construct a position of quantity whole units of
assetIdentifier, at DefaultPrecision.
public static Position<DecimalAmount> Of(long quantity, AssetIdentifier assetIdentifier)
Parameters
quantitylongassetIdentifierAssetIdentifier
Returns
Of<A>(A, AssetIdentifier)
Construct a position of size of assetIdentifier,
keeping the amount's own precision.
public static Position<A> Of<A>(A size, AssetIdentifier assetIdentifier) where A : IFixedPointAmount<A>
Parameters
sizeAassetIdentifierAssetIdentifier
Returns
- Position<A>
Type Parameters
A