Example #1
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            GoogleCalendar other = obj as GoogleCalendar;

            if (other == null)
            {
                throw new ArgumentException(string.Format("Cannot compare {0} with {1}", GetType().ToString(), obj.GetType().ToString()));
            }
            return(CompareTo(this, other));
        }
Example #2
0
        internal static int CompareTo(GoogleCalendar left, GoogleCalendar 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));
        }
Example #3
0
 internal static bool Equals(GoogleCalendar left, GoogleCalendar right)
 {
     return((right._folderName == left._folderName) &&
            (right._folderID == left._folderID) &&
            (right._isDefaultFolder == left._isDefaultFolder));
 }