Exemple #1
0
        public List <ReplicationCheckOutputObject> GetCheckOutputObjects()
        {
            int totalNumberOfRecords = this.TotalNumberOfRecords;
            List <ReplicationCheckOutputObject> list = new List <ReplicationCheckOutputObject>(totalNumberOfRecords);

            foreach (MessageInfo messageInfo in this.m_FailedMessages)
            {
                ReplicationCheckOutputObject replicationCheckOutputObject = new ReplicationCheckOutputObject(this.m_check);
                replicationCheckOutputObject.Update(messageInfo.InstanceIdentity, new ReplicationCheckResult(ReplicationCheckResultEnum.Failed), messageInfo.Message, messageInfo.DbFailureEventId);
                list.Add(replicationCheckOutputObject);
            }
            foreach (MessageInfo messageInfo2 in this.m_WarningMessages)
            {
                ReplicationCheckOutputObject replicationCheckOutputObject = new ReplicationCheckOutputObject(this.m_check);
                replicationCheckOutputObject.Update(messageInfo2.InstanceIdentity, new ReplicationCheckResult(ReplicationCheckResultEnum.Warning), messageInfo2.Message, messageInfo2.DbFailureEventId);
                list.Add(replicationCheckOutputObject);
            }
            foreach (MessageInfo messageInfo3 in this.m_PassedMessages)
            {
                ReplicationCheckOutputObject replicationCheckOutputObject = new ReplicationCheckOutputObject(this.m_check);
                replicationCheckOutputObject.Update(messageInfo3.InstanceIdentity, new ReplicationCheckResult(ReplicationCheckResultEnum.Passed), string.Empty, null);
                list.Add(replicationCheckOutputObject);
            }
            return(list);
        }
 private void WriteCheckResults(MultiReplicationCheck multiChecks)
 {
     if (this.OutputObjects.ToBool())
     {
         using (List <ReplicationCheckOutputObject> .Enumerator enumerator = multiChecks.GetAllOutputObjects().GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 ReplicationCheckOutputObject sendToPipeline = enumerator.Current;
                 base.WriteObject(sendToPipeline);
             }
             return;
         }
     }
     foreach (ReplicationCheckOutcome sendToPipeline2 in multiChecks.GetAllOutcomes())
     {
         base.WriteObject(sendToPipeline2);
     }
 }