Here are the examples of the csharp api class Adxstudio.Xrm.Issues.IssueDataAdapter.TryAssertCommentModerationPermission(Microsoft.Xrm.Sdk.Client.OrganizationServiceContext) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
Project: xRM-Portals-Community-Edition
Source File: IssueDataAdapter.cs
Source File: IssueDataAdapter.cs
public virtual IEnumerable<IComment> SelectComments(int startRowIndex, int maximumRows = -1) { var comments = new List<Comment>(); if (!FeatureCheckHelper.IsFeatureEnabled(FeatureNames.Feedback) || maximumRows == 0) { return comments; } var includeUnapprovedComments = TryAssertCommentModerationPermission(Dependencies.GetServiceContext()); var query = Cms.OrganizationServiceContextExtensions.SelectCommentsByPage( Cms.OrganizationServiceContextExtensions.GetPageInfo(startRowIndex, maximumRows), Issue.Id, includeUnapprovedComments); var commentsEntitiesResult = Dependencies.GetServiceContext().RetrieveMultiple(query); comments.AddRange( commentsEntitiesResult.Entities.Select( commentEntity => new Comment(commentEntity, new Lazy<ApplicationPath>(() => Dependencies.GetEditPath(commentEntity.ToEntityReference()), LazyThreadSafetyMode.None), new Lazy<ApplicationPath>(() => Dependencies.GetDeletePath(commentEntity.ToEntityReference()), LazyThreadSafetyMode.None), new Lazy<bool>(() => includeUnapprovedComments, LazyThreadSafetyMode.None)))); return comments; }
0
2. Example
Project: xRM-Portals-Community-Edition
Source File: IssueDataAdapter.cs
Source File: IssueDataAdapter.cs
public virtual int SelectCommentCount() { var serviceContext = Dependencies.GetServiceContext(); var includeUnapprovedComments = TryAssertCommentModerationPermission(serviceContext); return serviceContext.FetchCount("feedback", "feedbackid", addCondition => { addCondition("regardingobjectid", "eq", Issue.Id.ToString()); if (!includeUnapprovedComments) { addCondition("adx_approved", "eq", "true"); } }); }