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); }
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)); }
public Dfs(Graph g, PreVisit preVisit = null, PostVisit postVisit = null) { _graph = g; _preVisit = preVisit; _postVisit = postVisit; }