예제 #1
0
 /// <summary>
 /// Recursive method for checking whether a layername exists
 /// </summary>
 /// <param name="layer">layer</param>
 /// <param name="name">name of style</param>
 /// <returns>True of style exists</returns>
 private bool StyleExists(Client.WmsServerLayer layer, string name)
 {
     if (layer.Style.Any(style => name == style.Name))
     {
         return(true);
     }
     return(layer.ChildLayers.Any(childlayer => StyleExists(childlayer, name)));
 }
예제 #2
0
        private bool FindLayer(Client.WmsServerLayer layer, string name, out Client.WmsServerLayer result)
        {
            result = layer;
            if (name == layer.Name)
            {
                return(true);
            }

            foreach (Client.WmsServerLayer childlayer in layer.ChildLayers)
            {
                if (FindLayer(childlayer, name, out result))
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #3
0
 /// <summary>
 /// Recursive method for checking whether a layername exists
 /// </summary>
 /// <param name="layer"></param>
 /// <param name="name"></param>
 /// <returns></returns>
 private bool LayerExists(Client.WmsServerLayer layer, string name)
 {
     return(name == layer.Name || layer.ChildLayers.Any(childlayer => LayerExists(childlayer, name)));
 }