Esempio n. 1
0
        public int CompareTo(CatalogKey other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            if (NodeId != other.NodeId)
            {
                return(NodeId < other.NodeId ? -1 : 1);
            }

            return(HfsPlusUtilities.FastUnicodeCompare(Name, other.Name));
        }
Esempio n. 2
0
        public int CompareTo(AttributeKey other)
        {
            if (other == null)
            {
                throw new ArgumentNullException("other");
            }

            if (_fileId != other._fileId)
            {
                return(_fileId < other._fileId ? -1 : 1);
            }

            return(HfsPlusUtilities.FastUnicodeCompare(_name, other._name));
        }
Esempio n. 3
0
        public override int CompareTo(BTreeKey other)
        {
            var attributeKey = other as AttributeKey;

            if (attributeKey == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            if (this.FileId != attributeKey.FileId)
            {
                return(this.FileId < attributeKey.FileId ? -1 : 1);
            }

            return(HfsPlusUtilities.FastUnicodeCompare(this.Name, attributeKey.Name));
        }