public bool Equals(StackGraphKey rhs) { switch (KeyType) { case GraphKeyType.Function: return(ModuleName.Equals(rhs.ModuleName) && FunctionName.Equals(rhs.FunctionName)); case GraphKeyType.Module: return(ModuleName.Equals(rhs.ModuleName)); case GraphKeyType.Namespace: return(String.Equals(Namespace, rhs.Namespace)); case GraphKeyType.SourceFile: return(String.Equals(SourceFile, rhs.SourceFile)); case GraphKeyType.SourceFolder: return(String.Equals(SourceFolder, rhs.SourceFolder)); default: throw new InvalidDataException(); } }
public StackGraphNode(StackGraphKey key) { Key = key; Children = new StackGraphNodeCollection(key.KeyType); }