public IStore AddFileStore(string path) { using (ComRelease com = new ComRelease()) { NSOutlook.NameSpace session = com.Add(_item.Session); // Add the store session.AddStore(path); // And fetch it and wrap return(Mapping.Wrap(_item[_item.Count])); } }
public bool TrySetStore(string storeDescriptor) { if (string.IsNullOrWhiteSpace(storeDescriptor)) { m_store = m_session.GetStores().FirstOrDefault(); } else { if (m_session.TryGetStore(storeDescriptor, out m_store) == false) { m_session.AddStore(storeDescriptor); m_removeStore = m_session.TryGetStore(storeDescriptor, out m_store); } } return(m_store != null); }