Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/10 16:30:27 (14 years ago)
Author:
mkommend
Message:

overloaded GetViewTypes in MainFormManager(ticket #902)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs

    r2810 r2992  
    8383      }
    8484      return viewTypes.Where(t => t != null);
     85    }
     86
     87    public static IEnumerable<Type> GetViewTypes(Type contentType, bool returnOnlyMostSpecificViewTypes) {
     88      List<Type> viewTypes = new List<Type>(GetViewTypes(contentType));
     89      if (returnOnlyMostSpecificViewTypes) {
     90        foreach (Type viewType in viewTypes.ToList()) {
     91          if(viewTypes.Any(t => t.IsSubclassOf(viewType)))
     92            viewTypes.Remove(viewType);
     93        }
     94      }
     95      return viewTypes;
    8596    }
    8697
Note: See TracChangeset for help on using the changeset viewer.