System.CodeDom.Compiler.HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute C# (CSharp) Method

GetAndRemoveRequiredNonEmptyStringAttribute() static private method

static private GetAndRemoveRequiredNonEmptyStringAttribute ( XmlNode node, string attrib, string &val ) : XmlNode
node System.Xml.XmlNode
attrib string
val string
return System.Xml.XmlNode
        internal static XmlNode GetAndRemoveRequiredNonEmptyStringAttribute(XmlNode node, string attrib, ref string val) {
            return GetAndRemoveNonEmptyStringAttributeInternal(node, attrib, true /*fRequired*/, ref val);
        }

Usage Example

            private static IDictionary <string, string> GetProviderOptions(XmlNode compilerNode)
            {
                Dictionary <string, string> res = new Dictionary <string, string>();

                foreach (XmlNode child in compilerNode)
                {
                    if (child.Name != "providerOption")
                    {
                        HandlerBase.ThrowUnrecognizedElement(child);
                    }

                    string name = null, value = null;
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "name", ref name);
                    HandlerBase.GetAndRemoveRequiredNonEmptyStringAttribute(child, "value", ref value);
                    HandlerBase.CheckForUnrecognizedAttributes(child);
                    HandlerBase.CheckForChildNodes(child);

                    res[name] = value;
                }

                return(res);
            }
All Usage Examples Of System.CodeDom.Compiler.HandlerBase::GetAndRemoveRequiredNonEmptyStringAttribute