//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// UserRTX.NET satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Xml;

#if !WASM
namespace user_rtx { using u = user_rtx;
#else
namespace user_rtx.wasm { using u = user_rtx.wasm;
#endif

partial class XmlConfigurationBase {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="EXmlConfiguration" />
[u.strict_result]
public string StrictAttributeValueOf( XmlAttributeCollection attributes, string name )
{
   XmlAttribute? attribute = attributes[ name ];
   return attribute != null ? attribute.Value :
      throw AttributeValueNotFoundError( name );
}

//==================================================================================================

public EXmlConfiguration AttributeValueNotFoundError( string name ) =>
   CreateExceptionWithPath(u.local.T(
         RC._XML_attribute_value_is_not_found_by_name_0_attribute,
         "Значение XML-атрибута по имени не найдено: “{0}” (атрибут)." ),
         name );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // XmlConfigurationBase

} // user_rtx (.wasm)
