Esempio n. 1
0
 static public IEnumerable <CurrencyInfo> GetCurrencies()
 {
     return(RatesDoc
            .SelectNodes("//Currency[@Published = 1]")
            .OfType <XmlNode>()
            .Select(node => new CurrencyInfo(
                        currencyId: XmlCommon.XmlAttributeNativeInt(node, "CurrencyID"),
                        currencyGuid: Guid.Parse(XmlCommon.XmlAttribute(node, "CurrencyGUID")),
                        name: XmlCommon.XmlAttribute(node, "Name"),
                        currencyCode: XmlCommon.XmlAttribute(node, "CurrencyCode"),
                        exchangeRate: XmlCommon.XmlAttributeNativeDecimal(node, "ExchangeRate"),
                        wasLiveRate: XmlCommon.XmlAttributeBool(node, "WasLiveRate"),
                        displayLocaleFormat: XmlCommon.XmlAttribute(node, "DisplayLocaleFormat"),
                        symbol: XmlCommon.XmlAttribute(node, "Symbol"),
                        extensionData: XmlCommon.XmlAttribute(node, "ExtensionData"),
                        published: XmlCommon.XmlAttributeBool(node, "Published"),
                        displayOrder: XmlCommon.XmlAttributeNativeInt(node, "DisplayOrder"),
                        displaySpec: XmlCommon.XmlAttribute(node, "DisplaySpec"),
                        lastUpdated: XmlCommon.XmlAttributeNativeDateTime(node, "LastUpdated"),
                        createdOn: XmlCommon.XmlAttributeNativeDateTime(node, "CreatedOn"),
                        updatedOn: XmlCommon.XmlAttributeNativeDateTime(node, "UpdatedOn"))));
 }