internal static ExternalAudience GetUserPolicy(IExchangePrincipal mailboxOwner)
        {
            if (mailboxOwner == null)
            {
                throw new ArgumentNullException("mailboxOwner");
            }
            ExternalAudience result = ExternalAudience.All;

            try
            {
                result = UserOofSettingsStorage.GetUserPolicy(mailboxOwner);
            }
            catch (ADPossibleOperationException arg)
            {
                UserOofSettings.Tracer.TraceError <string, ADPossibleOperationException>(0L, "Mailbox:{0}: Exception while getting user policy, exception = {1}.", mailboxOwner.MailboxInfo.DisplayName, arg);
            }
            catch (MailStorageNotFoundException arg2)
            {
                UserOofSettings.Tracer.TraceError <string, MailStorageNotFoundException>(0L, "Mailbox:{0}: Exception while getting user policy, exception = {1}.", mailboxOwner.MailboxInfo.DisplayName, arg2);
            }
            return(result);
        }
Exemple #2
0
        private string Write4_ExternalAudience(ExternalAudience v)
        {
            string result;

            switch (v)
            {
            case ExternalAudience.None:
                result = "None";
                break;

            case ExternalAudience.Known:
                result = "Known";
                break;

            case ExternalAudience.All:
                result = "All";
                break;

            default:
                throw base.CreateInvalidEnumValueException(((long)v).ToString(CultureInfo.InvariantCulture), "Microsoft.Exchange.InfoWorker.Common.OOF.ExternalAudience");
            }
            return(result);
        }