Beispiel #1
0
    public static FormationFacade CreateFromFormation(Formation f)
    {
        if (f == null)
        {
            return(null);
        }
        FormationFacade facade = new FormationFacade();

        facade.Formation  = f.Clone <Formation>();
        facade.Conditions = new FormationConditionFacade[facade.Formation.Conditions.Length];
        for (int i = 0; i < facade.Conditions.Length; i++)
        {
            facade.Conditions[i] = FormationConditionFacade.CreateFromFormation(facade.Formation.Conditions[i]);
        }
        facade.NextLevel = FormationFacade.CreateFromFormation(facade.Formation.NextLevel);
        if (facade.NextLevel != null)
        {
            facade.NextLevel.PrevLevel = facade;
        }
        // facade.PrevLevel = FormationFacade.CreateFromFormation(facade.Formation.PrevLevel);
        return(facade);
    }