Beispiel #1
0
 private static RuleAction.ForwardActionBase.ActionRecipient[] GetRecipients(StoreSession session, ExTimeZone timeZone, IList <AdrEntry> adrEntries)
 {
     Util.ThrowOnNullArgument(adrEntries, "adrEntries");
     RuleAction.ForwardActionBase.ActionRecipient[] array = new RuleAction.ForwardActionBase.ActionRecipient[adrEntries.Count];
     for (int i = 0; i < array.Length; i++)
     {
         array[i] = RuleActionConverter.GetRecipient(session, timeZone, adrEntries[i]);
     }
     return(array);
 }
Beispiel #2
0
        private static AdrEntry GetAdrEntry(StoreSession session, ExTimeZone timeZone, RuleAction.ForwardActionBase.ActionRecipient recipient)
        {
            Util.ThrowOnNullArgument(recipient, "recipient");
            ICollection <PropTag> collection = PropertyTagCache.Cache.PropTagsFromPropertyDefinitions(session.Mailbox.MapiStore, session, recipient.PropertyDefinitions);

            PropValue[] array = new PropValue[recipient.PropertyDefinitions.Count];
            int         num   = 0;

            foreach (PropTag propTag in collection)
            {
                array[num] = MapiPropertyBag.GetPropValueFromValue(session, timeZone, propTag, recipient.PropertyValues[num]);
                num++;
            }
            return(new AdrEntry(array));
        }