Exemplo n.º 1
0
        public IEnumerable <QuarantinedMessageDetail> GetQuarantinedMessageDetails(Guid organizationalUnitRoot, Guid exMessageId, Guid?eventId = null, string recipientAddress = null)
        {
            QueryFilter filter = QueryFilter.AndTogether(new QueryFilter[]
            {
                MessageTraceSession.BuildQueryFilter(organizationalUnitRoot, exMessageId),
                new ComparisonFilter(ComparisonOperator.Equal, QuarantinedMessageCommonSchema.EventIdProperty, eventId),
                new ComparisonFilter(ComparisonOperator.Equal, QuarantinedMessageCommonSchema.RecipientAddressProperty, recipientAddress)
            });

            IConfigurable[] source = this.DataProvider.Find <QuarantinedMessageDetail>(filter, null, false, null);
            return(source.Cast <QuarantinedMessageDetail>());
        }
Exemplo n.º 2
0
        public MessageTrace[] FindPagedTrace(Guid organizationalUnitRoot, DateTime start, DateTime end, string fromEmailPrefix = null, string fromEmailDomain = null, string toEmailPrefix = null, string toEmailDomain = null, string clientMessageId = null, int rowIndex = 0, int rowCount = -1)
        {
            QueryFilter filter = MessageTraceSession.BuildQueryFilter(organizationalUnitRoot, start, end, fromEmailDomain, fromEmailPrefix, toEmailDomain, toEmailPrefix, clientMessageId);

            IConfigurable[] array  = this.DataProvider.Find <MessageTrace>(filter, null, false, null);
            MessageTrace[]  array2 = new MessageTrace[array.Length];
            for (int i = 0; i < array.Length; i++)
            {
                array2[i] = (MessageTrace)array[i];
            }
            return(array2);
        }
Exemplo n.º 3
0
        public MessageTrace Read(Guid organizationalUnitRoot, Guid exMessageId)
        {
            if (exMessageId == Guid.Empty)
            {
                throw new ArgumentNullException("exMessageId");
            }
            MessageTraceDataSet messageTraceDataSet = (MessageTraceDataSet)this.DataProvider.Find <MessageTraceDataSet>(MessageTraceSession.BuildQueryFilter(organizationalUnitRoot, exMessageId), null, false, null).FirstOrDefault <IConfigurable>();

            if (messageTraceDataSet == null)
            {
                return(null);
            }
            return(messageTraceDataSet.ConvertToMessageTraceObject());
        }