Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/13/14 13:14:25 (10 years ago)
Author:
bburlacu
Message:

#1772: GenealogyGraph: fix serialization
GenealogyGraphNode: Avoid boxing/unboxing with the IEnumerable.Cast<T>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs

    r11262 r11459  
    5252
    5353    public new IEnumerable<IGenealogyGraphArc> InArcs {
    54       get { return base.InArcs.Cast<IGenealogyGraphArc>(); }
     54      get { return base.InArcs.Select(x => (IGenealogyGraphArc)x); }
    5555    }
    5656
    5757    public new IEnumerable<IGenealogyGraphArc> OutArcs {
    58       get { return base.OutArcs.Cast<IGenealogyGraphArc>(); }
     58      get { return base.OutArcs.Select(x => (IGenealogyGraphArc)x); }
    5959    }
    6060
     
    148148    }
    149149    public new IEnumerable<IGenealogyGraphNode<T>> Parents {
    150       get { return base.Parents.Cast<IGenealogyGraphNode<T>>(); }
     150      get { return base.Parents.Select(x => (IGenealogyGraphNode<T>)x); }
    151151    }
    152152    public new IEnumerable<IGenealogyGraphNode<T>> Children {
    153       get { return base.Children.Cast<IGenealogyGraphNode<T>>(); }
     153      get { return base.Children.Select(x => (IGenealogyGraphNode<T>)x); }
    154154    }
    155155    public new IEnumerable<IGenealogyGraphNode<T>> Ancestors {
    156       get { return base.Ancestors.Cast<IGenealogyGraphNode<T>>(); }
     156      get { return base.Ancestors.Select(x => (IGenealogyGraphNode<T>)x); }
    157157    }
    158158    public new IEnumerable<IGenealogyGraphNode<T>> Descendants {
    159       get { return base.Descendants.Cast<IGenealogyGraphNode<T>>(); }
     159      get { return base.Descendants.Select(x => (IGenealogyGraphNode<T>)x); }
    160160    }
    161161  }
Note: See TracChangeset for help on using the changeset viewer.