Esempio n. 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;
        }
Esempio n. 2
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;
        }