Ejemplo n.º 1
0
 private void Log(EventTypeEnumeration type, TestFederationTrust.TestFederationTrustEventId id, LocalizedString message)
 {
     this.events.Add(new TestFederationTrust.ResultEvent
     {
         Id      = id,
         Type    = type,
         Message = message
     });
 }
 // Token: 0x06001184 RID: 4484 RVA: 0x00035A30 File Offset: 0x00033C30
 internal MonitoringEvent(string eventSource, int eventIdentifier, EventTypeEnumeration eventType, string eventMessage, string eventInstanceName)
 {
     if (string.IsNullOrEmpty(eventSource))
     {
         throw new ArgumentNullException("eventSource");
     }
     if (string.IsNullOrEmpty(eventMessage))
     {
         throw new ArgumentNullException("eventMessage");
     }
     this.eventSource       = eventSource;
     this.eventIdentifier   = eventIdentifier;
     this.eventType         = eventType;
     this.eventMessage      = eventMessage;
     this.eventInstanceName = eventInstanceName;
 }
Ejemplo n.º 3
0
        private void ReportMomStatus(List <EdgeSubscriptionStatus> statusList)
        {
            int num = 1000;
            EventTypeEnumeration eventType     = EventTypeEnumeration.Success;
            StringBuilder        stringBuilder = null;

            foreach (EdgeSubscriptionStatus edgeSubscriptionStatus in statusList)
            {
                switch (edgeSubscriptionStatus.SyncStatus)
                {
                case ValidationStatus.NoSyncConfigured:
                    num       = 1004;
                    eventType = EventTypeEnumeration.Warning;
                    break;

                case ValidationStatus.Failed:
                    num       = 1001;
                    eventType = EventTypeEnumeration.Error;
                    break;

                case ValidationStatus.Inconclusive:
                    if (num == 1000)
                    {
                        num       = 1003;
                        eventType = EventTypeEnumeration.Information;
                    }
                    break;
                }
                if (stringBuilder == null)
                {
                    string text = edgeSubscriptionStatus.ToStringForm();
                    stringBuilder = new StringBuilder(text.Length * statusList.Count + 256);
                    stringBuilder.Append(text);
                }
                else
                {
                    stringBuilder.Append(edgeSubscriptionStatus.ToStringForm());
                }
            }
            MonitoringEvent item = new MonitoringEvent("MSExchange Monitoring EdgeSynchronization", num, eventType, stringBuilder.ToString());

            this.monitoringData.Events.Add(item);
            base.WriteObject(this.monitoringData);
        }
Ejemplo n.º 4
0
        private void ReportMomStatus(EdgeSyncRecord record)
        {
            int eventIdentifier            = 1000;
            EventTypeEnumeration eventType = EventTypeEnumeration.Success;

            switch (record.Status)
            {
            case ValidationStatus.NoSyncConfigured:
                eventIdentifier = 1005;
                eventType       = EventTypeEnumeration.Warning;
                break;

            case ValidationStatus.Warning:
                eventIdentifier = 1001;
                eventType       = EventTypeEnumeration.Warning;
                break;

            case ValidationStatus.Failed:
                eventIdentifier = 1002;
                eventType       = EventTypeEnumeration.Error;
                break;

            case ValidationStatus.Inconclusive:
                eventIdentifier = 1004;
                eventType       = EventTypeEnumeration.Information;
                break;

            case ValidationStatus.FailedUrgent:
                eventIdentifier = 1006;
                eventType       = EventTypeEnumeration.Error;
                break;
            }
            MonitoringEvent item = new MonitoringEvent(this.CmdletMonitoringEventSource, eventIdentifier, eventType, record.ToString());

            this.monitoringData.Events.Add(item);
        }
Ejemplo n.º 5
0
 public MomEventInfo(int momEventId, EventTypeEnumeration momEventType, bool shouldBeRolledUp, LocalizedString?baseEventMessage) : base(ReplicationEventType.MOM, shouldBeRolledUp, baseEventMessage)
 {
     this.m_MomEventId   = momEventId;
     this.m_MomEventType = momEventType;
 }
Ejemplo n.º 6
0
 protected void AddMonitoringEvent(int id, EventTypeEnumeration type, string message)
 {
     this.monitoringData.Events.Add(new MonitoringEvent(this.monitoringDataSource, id, type, message));
 }
Ejemplo n.º 7
0
 internal virtual void Update(CasTransactionResultEnum result, TimeSpan latency, string additionalInformation, EventTypeEnumeration eventType)
 {
     this.Result    = new CasTransactionResult(result);
     this.Latency   = latency;
     this.Error     = additionalInformation;
     this.EventType = eventType;
 }
Ejemplo n.º 8
0
 internal virtual void Update(CasTransactionResultEnum result, string additionalInformation, EventTypeEnumeration eventType)
 {
     this.Update(result, (result == CasTransactionResultEnum.Success) ? TransactionOutcomeBase.ComputeLatency(this.StartTime) : TimeSpan.FromMilliseconds(-1.0), additionalInformation, eventType);
 }
 // Token: 0x06001183 RID: 4483 RVA: 0x00035A20 File Offset: 0x00033C20
 internal MonitoringEvent(string eventSource, int eventIdentifier, EventTypeEnumeration eventType, string eventMessage) : this(eventSource, eventIdentifier, eventType, eventMessage, null)
 {
 }
        protected void AddMonitoringEvent(TestActiveDirectoryConnectivityTask.ScenarioId eventId, EventTypeEnumeration eventType, LocalizedString eventMessage)
        {
            if (this.context.MonitoringData == null)
            {
                return;
            }
            string text = eventMessage.ToString();

            if (eventType != EventTypeEnumeration.Success)
            {
                text = this.context.GetDiagnosticInfo(text);
            }
            MonitoringEvent item = new MonitoringEvent(TestActiveDirectoryConnectivityTask.CmdletMonitoringEventSource, (int)eventId, eventType, text);

            this.context.MonitoringData.Events.Add(item);
        }
Ejemplo n.º 11
0
        private void EventForNonSuccessTransactionResultList(List <MapiTransactionOutcome> transactions, int emptyListEventId, EventTypeEnumeration emptyListEventType, string emptyListEventMsg, int nonEmptyListEventId, EventTypeEnumeration nonEmptyListEventType, string nonEmptyListEventMsgPrefix)
        {
            if (transactions.Count == 0)
            {
                this.monitoringData.Events.Add(new MonitoringEvent("MSExchange Monitoring MAPIConnectivity", emptyListEventId, emptyListEventType, emptyListEventMsg));
                return;
            }
            StringBuilder stringBuilder = new StringBuilder(nonEmptyListEventMsgPrefix);

            foreach (MapiTransactionOutcome mapiTransactionOutcome in transactions)
            {
                stringBuilder.Append(Strings.MapiTransactionFailedSummary(this.wasTargetMailboxSpecified ? mapiTransactionOutcome.LongTargetString() : Strings.SystemMailboxTarget(mapiTransactionOutcome.ShortTargetString()), mapiTransactionOutcome.Error));
            }
            this.monitoringData.Events.Add(new MonitoringEvent("MSExchange Monitoring MAPIConnectivity", nonEmptyListEventId, nonEmptyListEventType, stringBuilder.ToString()));
        }