public static void UpdateFilter(ref ActivityFilter filterList, EventSource source, int perEventSourceSessionId, string startEvents) { ActivityFilter.DisableFilter(ref filterList, source); if (string.IsNullOrEmpty(startEvents)) { return; } string str1 = startEvents; char[] chArray = new char[1] { ' ' }; foreach (string str2 in str1.Split(chArray)) { int result1 = 1; int result2 = -1; int length = str2.IndexOf(':'); if (length < 0) { source.ReportOutOfBandMessage("ERROR: Invalid ActivitySamplingStartEvent specification: " + str2, false); } else { string s = str2.Substring(length + 1); if (!int.TryParse(s, out result1)) { source.ReportOutOfBandMessage("ERROR: Invalid sampling frequency specification: " + s, false); } else { string str3 = str2.Substring(0, length); if (!int.TryParse(str3, out result2)) { result2 = -1; for (int index = 0; index < source.m_eventData.Length; ++index) { EventSource.EventMetadata[] eventMetadataArray = source.m_eventData; if (eventMetadataArray[index].Name != null && eventMetadataArray[index].Name.Length == str3.Length && string.Compare(eventMetadataArray[index].Name, str3, StringComparison.OrdinalIgnoreCase) == 0) { result2 = eventMetadataArray[index].Descriptor.EventId; break; } } } if (result2 < 0 || result2 >= source.m_eventData.Length) { source.ReportOutOfBandMessage("ERROR: Invalid eventId specification: " + str3, false); } else { ActivityFilter.EnableFilter(ref filterList, source, perEventSourceSessionId, result2, result1); } } } } }
// Token: 0x0600342C RID: 13356 RVA: 0x000C9DD0 File Offset: 0x000C7FD0 public static void UpdateFilter(ref ActivityFilter filterList, EventSource source, int perEventSourceSessionId, string startEvents) { ActivityFilter.DisableFilter(ref filterList, source); if (!string.IsNullOrEmpty(startEvents)) { foreach (string text in startEvents.Split(new char[] { ' ' })) { int samplingFreq = 1; int num = -1; int num2 = text.IndexOf(':'); if (num2 < 0) { source.ReportOutOfBandMessage("ERROR: Invalid ActivitySamplingStartEvent specification: " + text, false); } else { string text2 = text.Substring(num2 + 1); if (!int.TryParse(text2, out samplingFreq)) { source.ReportOutOfBandMessage("ERROR: Invalid sampling frequency specification: " + text2, false); } else { text = text.Substring(0, num2); if (!int.TryParse(text, out num)) { num = -1; for (int j = 0; j < source.m_eventData.Length; j++) { EventSource.EventMetadata[] eventData = source.m_eventData; if (eventData[j].Name != null && eventData[j].Name.Length == text.Length && string.Compare(eventData[j].Name, text, StringComparison.OrdinalIgnoreCase) == 0) { num = eventData[j].Descriptor.EventId; break; } } } if (num < 0 || num >= source.m_eventData.Length) { source.ReportOutOfBandMessage("ERROR: Invalid eventId specification: " + text, false); } else { ActivityFilter.EnableFilter(ref filterList, source, perEventSourceSessionId, num, samplingFreq); } } } } } }