public PostController(PostContainer postcontainer, ReplyContainer replycontainer, ForumContainer forumcontainer, IPostUpdateContext update) { this.Container = postcontainer; this.replyContainer = replycontainer; this.forumContainer = forumcontainer; this.postUpdate = update; }
public Task <ReplyContainer> TryParseToDatabaseQuery(string[] words) { return(Task.Run(() => { var container = new ReplyContainer(); foreach (var word in words) { var matcher = _entityMatcherProvider.TryGetEntityTypeByTag(word); if (matcher != null) { if (matcher.GetEntityType == typeof(Product)) { var commandresult = GetListOfProducts(matcher); container .DomainDataList .AddRange( commandresult .Select(x => new DisplayedObject { DisplayInformation = x.ToString(), ImageName = x.ImageName })); } if (matcher.GetEntityType == typeof(Category)) { var commandresult = GetListOfCategories(matcher); container .DomainDataList .AddRange( commandresult .Select(x => new DisplayedObject { DisplayInformation = x.ToString(), ImageName = x.ImageName })); } } } return container; })); }
public ReplyController(ReplyContainer container) { this.replyContainer = container; }