public static AssetMeasureType Create(AssetMeasureEnum assetMeasure) { var assetMeasureType = new AssetMeasureType { Value = assetMeasure.ToString() }; return(assetMeasureType); }
public static BasicQuotation Create(AssetMeasureEnum measureType, PriceQuoteUnitsEnum priceUnits, string sideAsString) { ParseQuotationSideEnum(sideAsString, out var sideSpecified, out var side); return(new BasicQuotation { valueSpecified = false, measureType = AssetMeasureTypeHelper.Create(measureType), quoteUnits = PriceQuoteUnitsHelper.Create(priceUnits), sideSpecified = sideSpecified, side = side }); }
public static AssetMeasureType Parse(string measureTypeAsString) { // ensures value is valid enum string AssetMeasureEnum assetMeasureEnum = AssetMeasureEnum.Undefined; if (measureTypeAsString != null) { assetMeasureEnum = AssetMeasureScheme.ParseEnumString(measureTypeAsString); } AssetMeasureType assetMeasureType = Create(assetMeasureEnum); return(assetMeasureType); }
public static BasicQuotation Create(decimal value, AssetMeasureEnum assetMeasureEnum, PriceQuoteUnitsEnum priceQuoteUnitsEnum) { return(new BasicQuotation { valueSpecified = true, value = value, measureType = new AssetMeasureType { Value = AssetMeasureScheme.GetEnumString(assetMeasureEnum) }, quoteUnits = new PriceQuoteUnits { Value = PriceQuoteUnitsScheme.GetEnumString(priceQuoteUnitsEnum) } }); }