Exemple #1
0
        /// <summary>
        /// Returns list of items to be used as a destination list.
        /// </summary>
        /// <returns>List of destination items.</returns>
        protected override IList GetDestinationItems()
        {
            IList destinationList = null;

            using (ResourceDataAccess dataAccess = new ResourceDataAccess(base.CreateContext()))
            {
                switch (ObjectType)
                {
                case ObjectEntityType.Tag:
                {
                    if (IsSecurityAwareControl)
                    {
                        if (AuthenticatedToken != null)
                        {
                            destinationList = dataAccess.GetScholarlyWorkItemTags(SubjectItemId, AuthenticatedToken);
                        }
                    }
                    else
                    {
                        destinationList = dataAccess.GetScholarlyWorkItemTags(SubjectItemId, null);
                    }
                    break;
                }

                case ObjectEntityType.CategoryNode:
                {
                    if (IsSecurityAwareControl)
                    {
                        if (AuthenticatedToken != null)
                        {
                            destinationList = dataAccess.GetScholarlyWorkItemCategoryNodes(SubjectItemId, AuthenticatedToken);
                        }
                    }
                    else
                    {
                        destinationList = dataAccess.GetScholarlyWorkItemCategoryNodes(SubjectItemId, null);
                    }
                    break;
                }

                default:
                    break;
                }
            }

            return(destinationList);
        }