コード例 #1
0
        public static IPushNotificationStorage Create(IMailboxSession mailboxSession, IXSOFactory xsoFactory, IOrganizationIdConvertor organizationIdConvertor)
        {
            ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
            ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
            IPushNotificationStorage pushNotificationStorage = PushNotificationStorage.Find(mailboxSession, xsoFactory);

            if (pushNotificationStorage != null)
            {
                return(pushNotificationStorage);
            }
            ArgumentValidator.ThrowIfNull("mailboxSession.MailboxOwner", mailboxSession.MailboxOwner);
            ArgumentValidator.ThrowIfNull("organizationIdConvertor", organizationIdConvertor);
            if (ExTraceGlobals.StorageNotificationSubscriptionTracer.IsTraceEnabled(TraceType.DebugTrace))
            {
                ExTraceGlobals.StorageNotificationSubscriptionTracer.TraceDebug <string>(0L, "PushNotificationStorage.Create: Creating a new Notification Subscription folder for user {0}.", (mailboxSession.MailboxOwner.ObjectId != null) ? mailboxSession.MailboxOwner.ObjectId.ToDNString() : string.Empty);
            }
            StoreObjectId folderId = mailboxSession.CreateDefaultFolder(DefaultFolderType.PushNotificationRoot);
            IFolder       folder   = xsoFactory.BindToFolder(mailboxSession, folderId);

            return(new PushNotificationStorage(folder, PushNotificationStorage.GetTenantId(mailboxSession), xsoFactory));
        }
コード例 #2
0
ファイル: XSOFactory.cs プロジェクト: YHZX2013/exchange_diff
 public IPushNotificationStorage FindPushNotificationStorage(IMailboxSession session)
 {
     return(PushNotificationStorage.Find(session, this));
 }
コード例 #3
0
 public static IPushNotificationStorage Find(IMailboxSession mailboxSession)
 {
     return(PushNotificationStorage.Find(mailboxSession, XSOFactory.Default));
 }