示例#1
0
        static public IEnumerable <Comment> GetDatasetComments(string datasetId, string parentType, string container)
        {
            var commentDS = new CommentsDataSource();

            var comments = from g in commentDS.SelectAll()
                           where g.DatasetId == datasetId && g.ParentType == parentType && container == g.PartitionKey
                           select g;

            return(CreateCommentEnumerator(comments));
        }
        public static IEnumerable<Comment> GetDatasetComments(string datasetId, string parentType, string container)
        {
            var commentDS = new CommentsDataSource();

            var comments = from g in commentDS.SelectAll()
                          where g.DatasetId == datasetId && g.ParentType == parentType && container == g.PartitionKey
                          select g;

            return CreateCommentEnumerator(comments);
        }
        public static IEnumerable<Comment> GetByParentAndUser(string parentId, string container, string parentType, string user)
        {
            CommentsDataSource comDS = new CommentsDataSource();

            var comments = from g in comDS.SelectAll()
                          where g.DatasetId == parentId && g.PartitionKey == container && g.ParentType == parentType && g.Email == user
                          select g;

            return CreateCommentEnumerator(comments);
        }
示例#4
0
        static public IEnumerable <String> GetSubscribers(string objectId, string container, string parentType, string exclude)
        {
            CommentsDataSource comDS = new CommentsDataSource();
            var results = from com in comDS.SelectAll()
                          where com.Notify == true &&
                          com.Email != "" &&
                          com.DatasetId == objectId &&
                          com.PartitionKey == container &&
                          com.ParentType == parentType &&
                          com.RowKey != exclude
                          select com;

            return(results.AsEnumerable().Select(c => c.Email).Distinct());
        }
        public static IEnumerable<String> GetSubscribers(string objectId, string container, string parentType, string exclude)
        {
            CommentsDataSource comDS = new CommentsDataSource();
            var results = from com in comDS.SelectAll()
                          where com.Notify == true
                          && com.Email != ""
                          && com.DatasetId == objectId
                          && com.PartitionKey == container
                          && com.ParentType == parentType
                          && com.RowKey != exclude
                          select com;

            return results.AsEnumerable().Select(c => c.Email).Distinct();
        }