Пример #1
0
        internal LocalizedString ToLocalizedString()
        {
            switch (this.Kind)
            {
            case BadItemKind.MissingItem:
                return(MrsStrings.BadItemMissingItem(this.MessageClass, this.Subject, this.FolderName));

            case BadItemKind.LargeItem:
            {
                int num = this.MessageSize ?? 0;
                return(MrsStrings.BadItemLarge(this.MessageClass, this.Subject, new ByteQuantifiedSize((ulong)((long)num)).ToString(), this.FolderName));
            }

            case BadItemKind.CorruptSearchFolderCriteria:
                return(MrsStrings.BadItemSearchFolder(this.FolderName));

            case BadItemKind.CorruptFolderACL:
                return(MrsStrings.BadItemFolderACL(this.FolderName));

            case BadItemKind.CorruptFolderRule:
                return(MrsStrings.BadItemFolderRule(this.FolderName));

            case BadItemKind.MissingFolder:
                return(MrsStrings.BadItemMissingFolder(this.FolderName));

            case BadItemKind.MisplacedFolder:
                return(MrsStrings.BadItemMisplacedFolder(this.FolderName));

            case BadItemKind.CorruptFolderProperty:
                return(MrsStrings.BadItemFolderProperty(this.FolderName));

            case BadItemKind.CorruptMailboxSetting:
                return(MrsStrings.BadItemCorruptMailboxSetting(this.MessageClass));

            case BadItemKind.FolderPropertyMismatch:
                return(MrsStrings.BadItemFolderPropertyMismatch(this.folderName, this.RawFailure.ToString()));
            }
            return(MrsStrings.BadItemCorrupt(this.MessageClass, this.Subject, this.FolderName));
        }