コード例 #1
0
        internal cMailboxSelectedProperties(cMailboxSelectedProperties pSelectedProperties, bool pSelectedForUpdate, cPermanentFlags pPermanentFlags)
        {
            if (pSelectedProperties == null)
            {
                throw new ArgumentNullException(nameof(pSelectedProperties));
            }

            mBeenSelected = true;

            if (pSelectedForUpdate)
            {
                mBeenSelectedForUpdate   = true;
                mBeenSelectedReadOnly    = pSelectedProperties.mBeenSelectedReadOnly;
                mForUpdatePermanentFlags = pPermanentFlags;
                mReadOnlyPermanentFlags  = pSelectedProperties.mReadOnlyPermanentFlags;
            }
            else
            {
                mBeenSelectedForUpdate   = pSelectedProperties.mBeenSelectedForUpdate;
                mBeenSelectedReadOnly    = true;
                mForUpdatePermanentFlags = pSelectedProperties.mForUpdatePermanentFlags;
                mReadOnlyPermanentFlags  = pPermanentFlags;
            }

            mUIDNotSticky = pSelectedProperties.mUIDNotSticky;
            mMessageFlags = pSelectedProperties.mMessageFlags;
        }
コード例 #2
0
        internal static fMailboxProperties Differences(cMailboxSelectedProperties pOld, cMailboxSelectedProperties pNew)
        {
            if (pOld == null)
            {
                throw new ArgumentNullException(nameof(pOld));
            }
            if (pNew == null)
            {
                throw new ArgumentNullException(nameof(pNew));
            }

            fMailboxProperties lProperties = 0;

            if (pOld.mBeenSelected != pNew.mBeenSelected)
            {
                lProperties |= fMailboxProperties.hasbeenselected;
            }
            if (pOld.mBeenSelectedForUpdate != pNew.mBeenSelectedForUpdate)
            {
                lProperties |= fMailboxProperties.hasbeenselectedforupdate;
            }
            if (pOld.mBeenSelectedReadOnly != pNew.mBeenSelectedReadOnly)
            {
                lProperties |= fMailboxProperties.hasbeenselectedreadonly;
            }
            if (pOld.mUIDNotSticky != pNew.mUIDNotSticky)
            {
                lProperties |= fMailboxProperties.uidnotsticky;
            }
            if (pOld.mMessageFlags != pNew.mMessageFlags)
            {
                lProperties |= fMailboxProperties.messageflags;
            }
            if (pOld.ForUpdatePermanentFlags != pNew.ForUpdatePermanentFlags)
            {
                lProperties |= fMailboxProperties.forupdatepermanentflags;
            }
            if (pOld.ReadOnlyPermanentFlags != pNew.ReadOnlyPermanentFlags)
            {
                lProperties |= fMailboxProperties.readonlypermanentflags;
            }

            return(lProperties);
        }
コード例 #3
0
        internal cMailboxSelectedProperties(cMailboxSelectedProperties pSelectedProperties, cFetchableFlags pMessageFlags)
        {
            if (pSelectedProperties == null)
            {
                throw new ArgumentNullException(nameof(pSelectedProperties));
            }
            if (pMessageFlags == null)
            {
                throw new ArgumentNullException(nameof(pMessageFlags));
            }

            mBeenSelected            = true;
            mBeenSelectedForUpdate   = pSelectedProperties.mBeenSelectedForUpdate;
            mBeenSelectedReadOnly    = pSelectedProperties.mBeenSelectedReadOnly;
            mUIDNotSticky            = pSelectedProperties.mUIDNotSticky;
            mMessageFlags            = pMessageFlags;
            mForUpdatePermanentFlags = pSelectedProperties.mForUpdatePermanentFlags;
            mReadOnlyPermanentFlags  = pSelectedProperties.mReadOnlyPermanentFlags;
        }