Example #1
0
        public IHttpActionResult GetShortestPath([FromUri] int userId)
        {
            var userName = JwtManager.GetUserNameFromToken(
                Request.Headers.Authorization.Parameter);
            var thisUser      = UnitOfWork.UserRepository.GetByName(userName);
            var friendshipWay = new ShortestPathService().
                                FriendshipWay(thisUser.Id, userId);
            var users = OnlineWorker.MarkIfOnline(friendshipWay);

            return(Ok(users));
        }
Example #2
0
 public ConversationPathService(EdgeService edgeService, VerticeService verticeService, ShortestPathService shortestPathService)
 {
     _edgeService         = edgeService;
     _verticeService      = verticeService;
     _shortestPathService = shortestPathService;
 }
 public ConversationPathService()
 {
     edgeService         = new EdgeService();
     verticeService      = new VerticeService();
     shortestPathService = new ShortestPathService();
 }