public ICommentDataAdapter GetAdapter(IPortalContext portal, RequestContext requestContext) { switch (_entity.LogicalName) { case "adx_webpage": var pageDependencies = new PortalContextDataAdapterDependencies(portal, requestContext: requestContext); return(new WebPageDataAdapter(_entity, pageDependencies)); case "adx_blogpost": var blogDependencies = new Blogs.PortalContextDataAdapterDependencies(portal, requestContext: requestContext); return(new BlogPostDataAdapter(_entity, blogDependencies)); default: return(null); } }
public IRatingDataAdapter GetAdapter(IPortalContext portal, RequestContext requestContext) { switch (_entity.LogicalName) { case "kbarticle": case "feedback": var commentDependencies = new PortalContextDataAdapterDependencies(portal, requestContext: requestContext); return(new RatingDataAdapter(_entity, commentDependencies)); case "adx_webpage": var pageDependencies = new PortalContextDataAdapterDependencies(portal, requestContext: requestContext); return(new WebPageDataAdapter(_entity, pageDependencies)); case "adx_blogpost": var blogDependencies = new Blogs.PortalContextDataAdapterDependencies(portal, requestContext: requestContext); return(new BlogPostDataAdapter(_entity, blogDependencies)); default: throw new Exception("Currently this entity type is not supported."); } }