Esempio n. 1
0
        public override GraphChangeStatus DeleteComment(CommentID commentId)
        {
            var pair = HostSet.AssignHost(commentId.G_Volume);

            return(Contracts.ServiceClientHub
                   .CallWithRetry <IGraphCommentSystemClient, GraphChangeStatus>(
                       commentSystem => commentSystem.DeleteComment(commentId),
                       pair.Select(host => host.RegionPath)
                       ));
        }
Esempio n. 2
0
        public override IEnumerable <Complaint> FetchComplaints(CommentID commentId)
        {
            var pair = HostSet.AssignHost(commentId.G_Volume);

            return(Contracts.ServiceClientHub
                   .CallWithRetry <IGraphCommentSystemClient, IEnumerable <Complaint> >(
                       commentSystem => commentSystem.FetchComplaints(commentId),
                       pair.Select(host => host.RegionPath)
                       ));
        }
Esempio n. 3
0
        public override GraphChangeStatus Update(CommentID ratingId, RatingValue value, string content, byte[] data)
        {
            var pair = HostSet.AssignHost(ratingId.G_Volume);

            return(Contracts.ServiceClientHub
                   .CallWithRetry <IGraphCommentSystemClient, GraphChangeStatus>(
                       commentSystem => commentSystem.Update(ratingId, value, content, data),
                       pair.Select(host => host.RegionPath)
                       ));
        }
Esempio n. 4
0
        public override GraphChangeStatus Complain(CommentID commentId, GDID gAuthorNode, string kind, string message)
        {
            var pair = HostSet.AssignHost(commentId.G_Volume);

            return(Contracts.ServiceClientHub
                   .CallWithRetry <IGraphCommentSystemClient, GraphChangeStatus>(
                       commentSystem => commentSystem.Complain(commentId, gAuthorNode, kind, message),
                       pair.Select(host => host.RegionPath)
                       ));
        }
Esempio n. 5
0
        public override Comment Respond(GDID gAuthorNode, CommentID parent, string content, byte[] data)
        {
            var pair = HostSet.AssignHost(parent.G_Volume);

            return(Contracts.ServiceClientHub
                   .CallWithRetry <IGraphCommentSystemClient, Comment>(
                       commentSystem => commentSystem.Respond(gAuthorNode, parent, content, data),
                       pair.Select(host => host.RegionPath)
                       ));
        }
Esempio n. 6
0
        public override GraphChangeStatus Like(CommentID commentId, int deltaLike, int deltaDislike)
        {
            var pair = HostSet.AssignHost(commentId.G_Volume);

            return(Contracts.ServiceClientHub
                   .CallWithRetry <IGraphCommentSystemClient, GraphChangeStatus>(
                       commentSystem => commentSystem.Like(commentId, deltaLike, deltaDislike),
                       pair.Select(host => host.RegionPath)
                       ));
        }
Esempio n. 7
0
 public Complaint(CommentID commentID,
                  GDID gComplaint,
                  GraphNode authorNode,
                  string kind,
                  string message,
                  DateTime createDate,
                  bool inUse)
 {
     CommentID   = commentID;
     GDID        = gComplaint;
     AuthorNode  = authorNode;
     Kind        = kind;
     Message     = message;
     Create_Date = createDate;
     In_Use      = inUse;
 }
Esempio n. 8
0
        /// <summary>
        /// Comment
        /// </summary>
        /// <param name="id">ID</param>
        /// <param name="parentId">Parent comment ID</param>
        /// <param name="authorNode">Author node</param>
        /// <param name="targetNode">Target node</param>
        /// <param name="createDate">Creation Date</param>
        /// <param name="dimension">Scope of comments</param>
        /// <param name="publicationState">Publication state</param>
        /// <param name="rating">Rating (0,1,2,3,4,5)</param>
        /// <param name="message">Message</param>
        /// <param name="data">Data</param>
        /// <param name="likes">Likes count</param>
        /// <param name="dislikes">Dislikes count</param>
        /// <param name="complaintCount">Complaint count</param>
        /// <param name="responseCount">Response count</param>
        /// <param name="inUse">In use (InUse = false - comment has been deleted)</param>
        /// <param name="editable">Can be edited</param>
        public Comment(CommentID id,
                       CommentID?parentId,
                       GraphNode authorNode,
                       GraphNode targetNode,
                       DateTime createDate,
                       string dimension,

                       PublicationState publicationState,
                       RatingValue rating,
                       string message,
                       byte[] data,

                       uint likes,
                       uint dislikes,
                       uint complaintCount,
                       uint responseCount,

                       bool inUse,
                       bool editable)
        {
            ID          = id;
            ParentID    = parentId;
            AuthorNode  = authorNode;
            TargetNode  = targetNode;
            Create_Date = createDate;
            Dimension   = dimension;

            PublicationState = publicationState;
            Rating           = rating;
            Message          = message;
            Data             = data;

            Likes          = likes;
            Dislikes       = dislikes;
            ComplaintCount = complaintCount;
            ResponseCount  = responseCount;

            IsRoot   = !parentId.HasValue;
            In_Use   = inUse;
            Editable = editable;
        }
Esempio n. 9
0
 public abstract IEnumerable <Complaint> FetchComplaints(CommentID commentId);
Esempio n. 10
0
 public abstract Comment GetComment(CommentID commentId);
Esempio n. 11
0
 public abstract GraphChangeStatus Like(CommentID commentId, int deltaLike, int deltaDislike);
Esempio n. 12
0
 public abstract IEnumerable <Comment> FetchResponses(CommentID commentId);
Esempio n. 13
0
 public override GraphChangeStatus Complain(CommentID commentId, GDID gAuthorNode, string kind, string message)
 {
     return(GraphChangeStatus.NotFound);
 }
Esempio n. 14
0
 public abstract GraphChangeStatus DeleteComment(CommentID commentId);
Esempio n. 15
0
 public override GraphChangeStatus DeleteComment(CommentID commentId)
 {
     return(GraphChangeStatus.NotFound);
 }
Esempio n. 16
0
 /// <summary>
 /// Make new Comment
 /// </summary>
 internal static Comment MakeNew(CommentID commentID, CommentID?parentID, GraphNode authorNode, GraphNode targetNode, DateTime create_Date, string dimension, PublicationState publicationState, RatingValue rating, string message, byte[] data)
 {
     return(new Comment(commentID, parentID, authorNode, targetNode, create_Date, dimension, publicationState, rating, message, data, 0, 0, 0, 0, true, true));
 }
Esempio n. 17
0
 public override GraphChangeStatus Like(CommentID commentId, int deltaLike, int deltaDislike)
 {
     return(GraphChangeStatus.NotFound);
 }
Esempio n. 18
0
 public override GraphChangeStatus Update(CommentID ratingId, RatingValue value, string content, byte[] data)
 {
     return(GraphChangeStatus.NotFound);
 }
Esempio n. 19
0
 public override IEnumerable <Comment> FetchResponses(CommentID commentId)
 {
     yield break;
 }
Esempio n. 20
0
 public override IEnumerable <Complaint> FetchComplaints(CommentID commentId)
 {
     yield break;
 }
Esempio n. 21
0
 public override GraphChangeStatus Justify(CommentID commentID)
 {
     return(GraphChangeStatus.NotFound);
 }
Esempio n. 22
0
 public abstract GraphChangeStatus Complain(CommentID commentId, GDID gAuthorNode, string kind, string message);
Esempio n. 23
0
 public abstract Comment Respond(GDID gAuthorNode, CommentID parent, string content, byte[] data);
Esempio n. 24
0
 public abstract GraphChangeStatus Justify(CommentID commentId);
Esempio n. 25
0
 public abstract GraphChangeStatus Update(CommentID ratingId, RatingValue value, string content, byte[] data);
Esempio n. 26
0
 public override Comment Respond(GDID gAuthorNode, CommentID parent, string content, byte[] data)
 {
     return(default(Comment));
 }
Esempio n. 27
0
 public override Comment GetComment(CommentID commentId)
 {
     return(default(Comment));
 }