Beispiel #1
0
        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <param name="includeEventItem">if set to <c>true</c> [include event item].</param>
        /// <param name="includeRegistrationInstance">if set to <c>true</c> [include registration instance].</param>
        /// <param name="includeGroup">if set to <c>true</c> [include group].</param>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public string ToString(bool includeEventItem, bool includeRegistrationInstance, bool includeGroup)
        {
            var parts = new List <string>();

            if (includeEventItem && EventItemOccurrence != null)
            {
                parts.Add(EventItemOccurrence.ToString());
            }

            if (includeRegistrationInstance && RegistrationInstance != null)
            {
                parts.Add(RegistrationInstance.ToString());
            }

            if (includeGroup && Group != null)
            {
                parts.Add(Group.ToString());
            }

            return(parts.AsDelimited(" - "));
        }
Beispiel #2
0
        /// <summary>
        /// Returns a <see cref="System.String" /> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String" /> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendFormat("{0} ", this.AllowOrDeny == "A" ? "Allow" : "Deny");

            if (SpecialRole != Model.SpecialRole.None)
            {
                sb.AppendFormat("{0} ", SpecialRole.ToString().SplitCase());
            }
            else if (Person != null)
            {
                sb.AppendFormat("{0} ", Person.ToString());
            }
            else if (Group != null)
            {
                sb.AppendFormat("{0} ", Group.ToString());
            }

            sb.AppendFormat("{0} Access", Action);

            return(sb.ToString());
        }
Beispiel #3
0
 /// <summary>
 /// Returns a <see cref="System.String" />  that represents this instance.
 /// </summary>
 /// <returns>
 /// A <see cref="System.String" /> that represents this instance.
 /// </returns>
 public override string ToString()
 {
     return(Group.ToString() + " at " + Location.ToString());
 }