Beispiel #1
0
        private static Type Translate(EVisualClass type)
        {
            switch (type)
            {
            case EVisualClass.SpecialAll:
            case EVisualClass.SpecialMeta:
            case EVisualClass.SpecialAdvanced:
            case EVisualClass.SpecialStatistic: return(typeof(Main.Associational.ColumnValuePair));

            case EVisualClass.Peak: return(typeof(Peak));

            case EVisualClass.Cluster: return(typeof(Cluster));

            case EVisualClass.Compound: return(typeof(Compound));

            case EVisualClass.Adduct: return(typeof(Adduct));

            case EVisualClass.Pathway: return(typeof(Pathway));

            case EVisualClass.Assignment: return(typeof(Assignment));

            case EVisualClass.Annotation: return(typeof(Annotation));

            case EVisualClass.None: return(typeof(object));      // Doesn't matter, the list will be empty. Can't be null.

            default: throw new SwitchException(type);
            }
        }
Beispiel #2
0
 /// <summary>
 /// CONSTRUCTOR
 /// </summary>
 public ContentsRequest(Core core, object owner, EVisualClass type)
 {
     this.Core       = core;
     this.Owner      = owner;
     this.Type       = type;
     this.TypeAsType = Translate(type);
 }
Beispiel #3
0
 public static ContentsRequest FindAssociations(object target, Core core, EVisualClass type)
 {
     return(FindAssociations(target, new ContentsRequest(core, target, type)));
 }
Beispiel #4
0
 public ContentsRequest FindAssociations(Core core, EVisualClass type)
 {
     return(FindAssociations(this, new ContentsRequest(core, this, type)));
 }