Exemplo n.º 1
0
        internal static Referenced <T> Acquire(T value)
        {
            Referenced <T> referenced = new Referenced <T>(value);

            referenced.AddRef();
            return(referenced);
        }
Exemplo n.º 2
0
 internal StreamLogItem(Referenced <MailboxSession> mailboxSession, StoreId messageId, StoreId folderId, string subject, string attachmentName)
 {
     if (mailboxSession == null || mailboxSession.Value == null)
     {
         throw new ArgumentNullException("mailboxSession");
     }
     if (folderId == null)
     {
         throw new ArgumentNullException("folderId");
     }
     if (messageId == null)
     {
         this.messageItem         = MessageItem.Create(mailboxSession, folderId);
         this.messageItem.IsDraft = false;
     }
     else
     {
         this.messageItem = MessageItem.Bind(mailboxSession, messageId, null);
     }
     this.messageItem.Subject   = subject;
     this.messageItem.ClassName = "IPM.Note.Microsoft.Exchange.Search.Log";
     this.attachmentName        = attachmentName;
     this.mailboxSession        = mailboxSession.Reacquire();
 }