public int Compare(AclEntry entry1, AclEntry entry2) { return(ComparisonChain.Start().Compare(entry1.GetScope(), entry2.GetScope(), Ordering .Explicit(AclEntryScope.Access, AclEntryScope.Default)).Compare(entry1.GetType() , entry2.GetType(), Ordering.Explicit(AclEntryType.User, AclEntryType.Group, AclEntryType .Mask, AclEntryType.Other)).Compare(entry1.GetName(), entry2.GetName(), Ordering .Natural().NullsFirst()).Result()); }