Ejemplo n.º 1
0
        private DateRangeBlogDataAdapter(EntityReference blog, DateTime min, DateTime max, IDataAdapterDependencies dependencies, BlogSecurityInfo security)
        {
            if (blog == null)
            {
                throw new ArgumentNullException("blog");
            }
            if (dependencies == null)
            {
                throw new ArgumentNullException("dependencies");
            }
            if (security == null)
            {
                throw new ArgumentNullException("security");
            }

            if (blog.LogicalName != "adx_blog")
            {
                throw new ArgumentException(string.Format("Value must have logical name {0}.", blog.LogicalName), "blog");
            }

            Blog         = blog;
            Dependencies = dependencies;
            Security     = security;
            Min          = min;
            Max          = max;

            _dataAdapter = new BlogDataAdapter(blog, dependencies);
        }
        private AuthorBlogDataAdapter(EntityReference blog, Guid authorId, IDataAdapterDependencies dependencies, BlogSecurityInfo security)
        {
            if (blog == null)
            {
                throw new ArgumentNullException("blog");
            }
            if (dependencies == null)
            {
                throw new ArgumentNullException("dependencies");
            }
            if (security == null)
            {
                throw new ArgumentNullException("security");
            }

            if (blog.LogicalName != "adx_blog")
            {
                throw new ArgumentException(string.Format("Value must have logical name {0}.", blog.LogicalName), "blog");
            }

            Blog         = blog;
            AuthorId     = authorId;
            Dependencies = dependencies;
            Security     = security;

            _dataAdapter = new BlogDataAdapter(blog, dependencies);
        }
Ejemplo n.º 3
0
        private BlogPostDataAdapter(EntityReference blogPost, IDataAdapterDependencies dependencies, BlogSecurityInfo security) : base(blogPost, dependencies)
        {
            if (blogPost == null)
            {
                throw new ArgumentNullException("blogPost");
            }
            if (dependencies == null)
            {
                throw new ArgumentNullException("dependencies");
            }
            if (security == null)
            {
                throw new ArgumentNullException("security");
            }

            if (blogPost.LogicalName != "adx_blogpost")
            {
                throw new ArgumentException(string.Format("Value must have logical name {0}.", blogPost.LogicalName), "blogPost");
            }

            BlogPostReference = blogPost;
            BlogDependencies  = dependencies;
            Security          = security;
        }