public IVertex GetVertex(Direction direction) { if (direction == Direction.In) { return(_inVertex); } if (direction == Direction.Out) { return(_outVertex); } throw ExceptionFactory.BothIsNotSupported(); }