예제 #1
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            OutlookFolder other = obj as OutlookFolder;

            if (other == null)
            {
                throw new ArgumentException(string.Format("Cannot compare {0} with {1}", GetType().ToString(), obj.GetType().ToString()));
            }
            return(CompareTo(this, other));
        }
예제 #2
0
        internal static int CompareTo(OutlookFolder left, OutlookFolder right)
        {
            int _folderNameComparison = left._folderName.CompareTo(right._folderName);

            if (_folderNameComparison != 0)
            {
                return(_folderNameComparison);
            }

            int _folderIDComparison = left._folderID.CompareTo(right._folderID);

            if (_folderIDComparison != 0)
            {
                return(_folderIDComparison);
            }

            return(left._isDefaultFolder.CompareTo(right._isDefaultFolder));
        }
예제 #3
0
 internal static bool Equals(OutlookFolder left, OutlookFolder right)
 {
     return((right._folderName == left._folderName) &&
            (right._folderID == left._folderID) &&
            (right._isDefaultFolder == left._isDefaultFolder));
 }