Esempio n. 1
0
 public IRecipient ResolveRecipient(string name)
 {
     using (ComRelease com = new ComRelease())
     {
         NSOutlook.NameSpace session = com.Add(_app.Session);
         // Add recipient, unlock after Resolve (which might throw) to wrap
         NSOutlook.Recipient recipient = com.Add(session.CreateRecipient(name));
         if (recipient == null)
         {
             return(null);
         }
         IRecipient wrapped = Mapping.Wrap(com.Remove(recipient));
         wrapped.Resolve();
         return(wrapped);
     }
 }