Exemplo n.º 1
0
        public PostVisit Make(CreatePostVisitDto model)
        {
            model.CheckArgumentIsNull(nameof(model));
            var entity = new PostVisit {
                AbseloutUrl = AppHttpContext.AbsoluteUrl,
                CreateDate  = _dateService.UtcNow(),
                IP          = AppHttpContext.IpAddress,
                OsPlatform  = AppHttpContext.OsPlatform,
                UserAgent   = AppHttpContext.UserAgent,
                PostId      = model.PostId,
                PostTitle   = model.Title,
                SessionId   = AppHttpContext.SessionId,
                UrlReferrer = AppHttpContext.UrlReferer
            };

            return(entity);
        }
Exemplo n.º 2
0
        public async Task <PostVisit> MakeAsync(CreatePostVisitDto model)
        {
            model.CheckArgumentIsNull(nameof(model));
            var entity = new PostVisit {
                AbseloutUrl = AppHttpContext.AbsoluteUrl,
                CreateDate  = _dateService.UtcNow(),
                IP          = AppHttpContext.IpAddress,
                OsPlatform  = AppHttpContext.OsPlatform,
                UserAgent   = AppHttpContext.UserAgent,
                PostId      = model.PostId,
                PostTitle   = model.Title,
                SessionId   = AppHttpContext.SessionId,
                UrlReferrer = AppHttpContext.UrlReferer
            };

            //if (_userContext.IsAuthenticated)
            //    entity.UserId = _userContext.UserId;

            return(await Task.FromResult(entity));
        }
Exemplo n.º 3
0
Arquivo: Dfs.cs Projeto: MattSi/Maze
 public Dfs(Graph g, PreVisit preVisit = null, PostVisit postVisit = null)
 {
     _graph     = g;
     _preVisit  = preVisit;
     _postVisit = postVisit;
 }