-
-
Save jasondown/817dcb981a80b3a04325555785ea592c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ObjectDependencyManager | |
{ | |
private readonly NavObjectNodeFactory _navObjectNodeFactory; | |
private readonly List<NavObjectNode> _navObjectsToCompile; | |
public ObjectDependencyManager(NavObjectNodeFactory navObjectNodeFactory) | |
{ | |
_navObjectNodeFactory = navObjectNodeFactory; | |
_navObjectsToCompile = new List<NavObjectNode>(); | |
} | |
public NavObjectNode GetNavObject(int type, int id) | |
{ | |
return _navObjectNodeFactory.GetNavObjectNode(type, id); | |
} | |
public void AddNavObjectToCompile(NavObjectNode navObject) | |
{ | |
_navObjectsToCompile.Add(navObject); | |
} | |
public IEnumerable<NavObjectNode> SortedCompileList | |
{ | |
get | |
{ | |
var sorted = _navObjectsToCompile.Sort(n => n.ComposedOf); | |
return sorted.Where(_navObjectsToCompile.Contains); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment