예제 #1
0
        protected bool Equals(ApiKeyDefinition other)
        {
            var baseEqual = string.Equals(Id, other.Id) && Enabled.Equals(other.Enabled) && Equals(Databases.Count, other.Databases.Count) &&
                            string.Equals(Secret, other.Secret) && string.Equals(Name, other.Name) && Equals(FileSystems.Count, other.FileSystems.Count);

            if (baseEqual == false)
            {
                return(false);
            }

            for (int i = 0; i < Databases.Count; i++)
            {
                if (Databases[i].Equals(other.Databases[i]) == false)
                {
                    return(false);
                }
            }

            for (int i = 0; i < FileSystems.Count; i++)
            {
                if (FileSystems[i].Equals(other.FileSystems[i]) == false)
                {
                    return(false);
                }
            }

            return(true);
        }
예제 #2
0
        protected bool Equals(ApiKeyDefinition other)
        {
            var baseEqual = string.Equals(Id, other.Id) && Enabled.Equals(other.Enabled) && Equals(Databases.Count, other.Databases.Count) &&
                   string.Equals(Secret, other.Secret) && string.Equals(Name, other.Name);

            if (baseEqual == false)
                return false;

            for (var i = 0; i < Databases.Count; i++)
            {
                if (Databases[i].Equals(other.Databases[i]) == false)
                    return false;
            }

            return true;
        }