コード例 #1
0
 public async Task <EventNotification> GetEvent(NotificationTypesEnum typesEnum, int dataId)
 {
     return(await Context.EventNotifications
            .Include(notification => notification.NotificationType)
            .FirstOrDefaultAsync(
                notification => notification.DataId == dataId && notification.NotificationTypeId == (int)typesEnum));
 }
コード例 #2
0
        /// <summary>
        /// Parse the NotificationFlagsT structure.
        /// </summary>
        /// <param name="s">An stream containing NotificationFlagsT structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            ushort flag = ReadUshort();

            this.NotificationDataAvailability = (NotificationDataAvailabilityEnum)(flag & 0xf000);
            this.NotificationType             = (NotificationTypesEnum)(flag & 0x0fff);
        }
コード例 #3
0
        public async Task <object> Route(NotificationTypesEnum typesEnum, int dataId)
        {
            switch (typesEnum)
            {
            case NotificationTypesEnum.Evaluation: return(await _evaluationRepo.GetAnEvaluationWithItsVisitAsync(dataId));

            default: return(null);
            }
        }
コード例 #4
0
        /// <summary>
        /// Parse the RopRegisterNotificationRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopRegisterNotificationRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId             = (RopIdType)ReadByte();
            this.LogonId           = ReadByte();
            this.InputHandleIndex  = ReadByte();
            this.OutputHandleIndex = ReadByte();
            this.NotificationTypes = (NotificationTypesEnum)ReadUshort();
            if (this.NotificationTypes == NotificationTypesEnum.Extended)
            {
                this.Reserved = ReadByte();
            }
            this.WantWholeStore = ReadBoolean();
            if (!this.WantWholeStore)
            {
                this.FolderId = new FolderID();
                this.FolderId.Parse(s);
                this.MessageId = new MessageID();
                this.MessageId.Parse(s);
            }
        }
コード例 #5
0
        /// <summary>
        /// Parse the RopRegisterNotificationRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopRegisterNotificationRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.OutputHandleIndex = ReadByte();
            this.NotificationTypes = (NotificationTypesEnum)ReadUshort();
            if (this.NotificationTypes == NotificationTypesEnum.Extended)
            {
                this.Reserved = ReadByte();
            }
            this.WantWholeStore = ReadBoolean();
            if (!this.WantWholeStore)
            {
                this.FolderId = new FolderID();
                this.FolderId.Parse(s);
                this.MessageId = new MessageID();
                this.MessageId.Parse(s);
            }
        }
コード例 #6
0
 /// <summary>
 /// Parse the NotificationFlagsT structure.
 /// </summary>
 /// <param name="s">An stream containing NotificationFlagsT structure.</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     ushort flag = ReadUshort();
     this.NotificationDataAvailability = (NotificationDataAvailabilityEnum)(flag & 0xf000);
     this.NotificationType = (NotificationTypesEnum)(flag & 0x0fff);
 }
コード例 #7
0
 public async Task <NotificationType> Get(NotificationTypesEnum type)
 {
     return(await Context.NotificationTypes.FindAsync(type));
 }