Beispiel #1
0
 public XmlNode GetNode(string strLanguage)
 {
     if (_objCachedMyXmlNode == null || strLanguage != _strCachedXmlNodeLanguage || GlobalOptions.LiveCustomData)
     {
         _objCachedMyXmlNode       = _objParent?.GetNode(strLanguage)?.SelectSingleNode("specs/spec[text() = \"" + Name + "\"]");
         _strCachedXmlNodeLanguage = strLanguage;
     }
     return(_objCachedMyXmlNode);
 }
 public XmlNode GetNode(string strLanguage)
 {
     if (_objCachedMyXmlNode == null || strLanguage != _strCachedXmlNodeLanguage || GlobalOptions.LiveCustomData)
     {
         _objCachedMyXmlNode       = Parent?.GetNode(strLanguage)?.SelectSingleNode("specs/spec[. = " + Name.CleanXPath() + "]");
         _strCachedXmlNodeLanguage = strLanguage;
     }
     return(_objCachedMyXmlNode);
 }
Beispiel #3
0
 public async Task <XmlNode> GetNodeCoreAsync(bool blnSync, string strLanguage)
 {
     if (_objCachedMyXmlNode != null && strLanguage == _strCachedXmlNodeLanguage &&
         !GlobalSettings.LiveCustomData)
     {
         return(_objCachedMyXmlNode);
     }
     if (Parent == null)
     {
         _objCachedMyXmlNode = null;
     }
     else
     {
         _objCachedMyXmlNode = (blnSync
                                // ReSharper disable once MethodHasAsyncOverload
                 ? Parent.GetNode(strLanguage)
                 : await Parent.GetNodeAsync(strLanguage))
                               ?.SelectSingleNode("specs/spec[. = " + Name.CleanXPath() + ']');
     }
     _strCachedXmlNodeLanguage = strLanguage;
     return(_objCachedMyXmlNode);
 }