FromXml() public static method

public static FromXml ( XmlElement node ) : SharedDirectoryMapperConfig
node System.Xml.XmlElement
return SharedDirectoryMapperConfig
Exemplo n.º 1
0
        public override void Configure(ServiceDescriptor descriptor, XmlNode node)
        {
            XmlNodeList?mapNodes = XmlHelper.SingleNode(node, "mapping", false) !.SelectNodes("map");

            if (mapNodes != null)
            {
                for (int i = 0; i < mapNodes.Count; i++)
                {
                    if (mapNodes[i] is XmlElement mapElement)
                    {
                        var config = SharedDirectoryMapperConfig.FromXml(mapElement);
                        _entries.Add(config);
                    }
                }
            }
        }
        public override void Configure(ServiceDescriptor descriptor, XmlNode node)
        {
            var nodes = XmlHelper.SingleNode(node, "mapping", false).SelectNodes("map");

            if (nodes != null)
            {
                foreach (XmlNode mapNode in nodes)
                {
                    var mapElement = mapNode as XmlElement;
                    if (mapElement != null)
                    {
                        var config = SharedDirectoryMapperConfig.FromXml(mapElement);
                        _entries.Add(config);
                    }
                }
            }
        }