Example #1
0
        private void RefreshVirtualDirectories()
        {
            this.SelectedVirtualDirectory = null;

            if (SelectedWebSite == null)
            {
                this.VirtualDirectories = new IVirtualDirectory[0];
            }
            else
            {
                this.VirtualDirectories = SelectedWebSite.GetApps()
                                          .SelectMany(webApp => webApp.GetVirtualDirectories())
                                          .Where(virtualDir => IsNdlVirtualDir(virtualDir))
                                          .OrderBy(vd => vd.Name).ToArray();
                if (this.VirtualDirectories.Length == 1)
                {
                    this.SelectedVirtualDirectory = this.VirtualDirectories[0];
                }
                else
                {
                    this.SelectedVirtualDirectory = null;
                }
            }
        }