Example #1
0
        /// <summary>
        /// Parse event owner type.
        /// </summary>
        /// <param name="name">Name of the event owner type.</param>
        /// <returns><see cref="EventOwnerType"/> for the name.</returns>
        public static EventOwnerType Parse(string name)
        {
            EventOwnerType eventOwnerType = null;

            if (name == null || !EVENT_OWNER_TYPES.TryGetValue(name, out eventOwnerType))
            {
                eventOwnerType = new EventOwnerType(name);
            }

            return(eventOwnerType);
        }
Example #2
0
        /// <summary>
        /// Determines whether this instance and another specified <see cref="EventOwnerType"/> object have the same value.
        /// </summary>
        /// <param name="value">The event owner type to compare to this instance.</param>
        /// <returns>true if the value of the parameter is the same as the value of this instance; otherwise, false. If value is null, the method returns false.</returns>
        public bool Equals(EventOwnerType value)
        {
            if (Object.ReferenceEquals(value, null))
            {
                return(false);
            }

            if (Object.ReferenceEquals(this, value))
            {
                return(true);
            }

            return(this.Name == value.Name);
        }