示例#1
0
        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();
            }
        }
示例#2
0
 public StackGraphNode(StackGraphKey key)
 {
     Key      = key;
     Children = new StackGraphNodeCollection(key.KeyType);
 }