public Space GetSpaceById(string spaceId)
        {
            var space = Spaces.FirstOrDefault(s => s.id == spaceId);

            if (space == null)
            {
                space = Spaces.Flatten <Space>(s => s.childSpaces).FirstOrDefault(s => s.id == spaceId);
            }

            return(space);
        }
示例#2
0
 public ConfluenceSearch(ConfluenceUpload confluenceUpload)
 {
     _confluenceUpload = confluenceUpload;
     DataContext       = this;
     InitializeComponent();
     if (ConfluenceConfig.SearchSpaceKey == null)
     {
         SpaceComboBox.SelectedItem = Spaces.FirstOrDefault();
     }
     else
     {
         foreach (var space in Spaces)
         {
             if (space.Key.Equals(ConfluenceConfig.SearchSpaceKey))
             {
                 SpaceComboBox.SelectedItem = space;
             }
         }
     }
 }