Ejemplo n.º 1
0
        // Token: 0x06000322 RID: 802 RVA: 0x0000D854 File Offset: 0x0000BA54
        public static void LogEvent(this ExEventLog.EventTuple tuple, string periodicKey, out bool fEventSuppressed, params object[] messageArgs)
        {
            SharedDiag.EventLog.LogEvent(tuple, periodicKey, out fEventSuppressed, messageArgs);
            if (!fEventSuppressed)
            {
                string text = tuple.EventLogToString(messageArgs);
                if (!string.IsNullOrEmpty(text))
                {
                    string text2 = string.Empty;
                    if (messageArgs.Length > 0)
                    {
                        text2 = string.Join(",\n", messageArgs);
                    }
                    EventLogEntryType  entryType = tuple.EntryType;
                    ReplayCrimsonEvent replayCrimsonEvent;
                    switch (entryType)
                    {
                    case EventLogEntryType.Error:
                        goto IL_7C;

                    case EventLogEntryType.Warning:
                        replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorWarning;
                        goto IL_8A;

                    case (EventLogEntryType)3:
                        goto IL_84;

                    case EventLogEntryType.Information:
                        break;

                    default:
                        if (entryType != EventLogEntryType.SuccessAudit)
                        {
                            if (entryType != EventLogEntryType.FailureAudit)
                            {
                                goto IL_84;
                            }
                            goto IL_7C;
                        }
                        break;
                    }
                    replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorInformational;
                    goto IL_8A;
IL_7C:
                    replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorError;
                    goto IL_8A;
IL_84:
                    replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorInformational;
IL_8A:
                    replayCrimsonEvent.LogGeneric(new object[]
                    {
                        SharedDiag.GetEventViewerEventId(tuple),
                        text,
                        text2
                    });
                }
            }
        }
Ejemplo n.º 2
0
        // Token: 0x06000324 RID: 804 RVA: 0x0000D92C File Offset: 0x0000BB2C
        internal static string EventLogToString(this ExEventLog.EventTuple eventTuple, out int gle, params object[] arguments)
        {
            string result = null;

            if (SharedDiag.s_clusmsgFullPath == null)
            {
                SharedDiag.s_clusmsgFullPath = Path.Combine(SharedDiag.GetFolderPathOfExchangeBinaries(), "clusmsg.dll");
            }
            if (!SharedDiag.FormatMessageFromModule(SharedDiag.s_clusmsgFullPath, eventTuple.EventId, out result, out gle, arguments))
            {
                return(null);
            }
            return(result);
        }
Ejemplo n.º 3
0
 internal AmServerName(string serverName, bool throwOnFqdnError)
 {
     if (!string.IsNullOrEmpty(serverName))
     {
         int num = serverName.IndexOf(".");
         if (num == -1)
         {
             string fqdn = AmServerNameCache.Instance.GetFqdn(serverName, throwOnFqdnError);
             num = fqdn.IndexOf(".");
             SharedDiag.RetailAssert(num != -1, "fqdn resolution should have thrown", new object[0]);
             serverName = fqdn;
         }
         string netbiosName = serverName.Substring(0, num);
         int    num2        = num + 1;
         string dnsSuffix   = serverName.Substring(num2, serverName.Length - num2);
         this.Initialize(netbiosName, dnsSuffix, serverName);
         return;
     }
     this.Initialize(string.Empty, string.Empty, null);
 }
Ejemplo n.º 4
0
        // Token: 0x06000328 RID: 808 RVA: 0x0000DA08 File Offset: 0x0000BC08
        internal static bool FormatMessageFromModule(string moduleName, uint msgId, out string msg, params object[] arguments)
        {
            int num;

            return(SharedDiag.FormatMessageFromModule(moduleName, msgId, out msg, out num, arguments));
        }