Exemplo n.º 1
0
        /// <summary>
        /// Override of the get hash code method.
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            //Get hash code for the nullable fields.
            int hashCreationAllowanceKey = CreationAllowanceKey == null ? 0 : CreationAllowanceKey.GetHashCode();
            int hashSignalRServers       = SignalRServers == null ? 0 : SignalRServers.GetHashCode();

            //Calculate the hash code for the GPOPolicy.
            return(_id.GetHashCode() ^ hashCreationAllowanceKey ^ hashSignalRServers);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Override of the equality method.
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public bool Equals(Configurations o)
        {
            //Check whether the compared object is null.
            if (ReferenceEquals(o, null))
            {
                return(false);
            }

            //Check whether the compared object references the same data.
            if (ReferenceEquals(this, o))
            {
                return(true);
            }

            //Check whether the Configurations' properties are equal.
            return(_id.Equals(o._id) && CreationAllowanceKey.Equals(o.CreationAllowanceKey) && SignalRServers.Equals(o.SignalRServers));
        }