HandCoded.FpML.Validation.FpMLRuleSet.IsSameCurrency C# (CSharp) Method

IsSameCurrency() protected static method

Determine if two XmlElement structures containing currency instances have the same currency codes belonging to the same currency code scheme.
protected static IsSameCurrency ( XmlElement ccy1, XmlElement ccy2 ) : bool
ccy1 System.Xml.XmlElement The first currency .
ccy2 System.Xml.XmlElement The second currency .
return bool
        protected static bool IsSameCurrency(XmlElement ccy1, XmlElement ccy2)
        {
            string		uri1	= DOM.GetAttribute (ccy1, "currencyScheme");
            string		uri2	= DOM.GetAttribute (ccy2, "currencyScheme");

            if ((uri1 != null) && (uri2 != null) && uri1.Equals (uri2))
                return (Equal (ccy1, ccy2));

            return (false);
        }