Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryDataAdapter"/> class.
        /// </summary>
        /// <param name="category">Category Entity Reference</param>
        /// <param name="dependencies">Data Adapter Dependencies</param>
        public CategoryDataAdapter(EntityReference category, KnowledgeArticles.IDataAdapterDependencies dependencies)
        {
            category.ThrowOnNull("article");
            category.AssertLogicalName("knowledgearticle");
            dependencies.ThrowOnNull("dependencies");

            this.Category     = category;
            this.Dependencies = dependencies;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryAggregationDataAdapter"/> class.
        /// </summary>
        /// <param name="dependencies">Data Adapter Dependencies</param>
        public CategoryAggregationDataAdapter(KnowledgeArticles.IDataAdapterDependencies dependencies)
        {
            if (dependencies == null)
            {
                throw new ArgumentNullException("dependencies");
            }

            this.Dependencies = dependencies;
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryFactory"/> class.
        /// </summary>
        /// <param name="dependencies">Data Adapter Dependencies</param>
        public CategoryFactory(KnowledgeArticles.IDataAdapterDependencies dependencies)
        {
            dependencies.ThrowOnNull("dependencies");

            this.dependencies = dependencies;

            var request = this.dependencies.GetRequestContext();

            this.httpContext = request == null ? null : request.HttpContext;
        }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryDrop"/> class.
        /// </summary>
        /// <param name="portalLiquidContext"> Portal Liquid Context</param>
        /// <param name="dependencies">Data Adapter Dependencies</param>
        /// <param name="category">current Category</param>
        public CategoryDrop(IPortalLiquidContext portalLiquidContext, KnowledgeArticles.IDataAdapterDependencies dependencies, ICategory category)
            : base(portalLiquidContext, category.Entity)
        {
            if (dependencies == null)
            {
                throw new ArgumentNullException("dependencies");
            }
            if (category == null)
            {
                throw new ArgumentNullException("category");
            }

            this.Category = category;
        }