Example #1
0
        /// <summary>
        /// Gets the contribution.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns>The contribution.</returns>
        public double GetContribution(IHasGroup item)
        {
            Conversation conversation = item as Conversation;

            if (conversation != null)
            {
                return(conversation.Contributors.Any(p => p.IsMe) ? 1 : 0);
            }

            return(0);
        }
Example #2
0
        /// <summary>
        /// Determines whether the specified item is owner.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns>
        ///   <c>true</c> if the specified item is owner; otherwise, <c>false</c>.
        /// </returns>
        private static bool IsOwner(IHasGroup item)
        {
            Conversation conversation = item as Conversation;

            return(conversation != null && conversation.From.IsMe);
        }