private IEnumerable <EventSourceDefinition> GetAllEventSourceDefinitionsFromParameters() { if (!string.IsNullOrWhiteSpace(ProviderName)) { yield return(EventSourceDefinition.Parse(ProviderName, Keywords, TraceLevel, Ids, ProcessIds, ProcessNames)); } if (EventSources != null) { foreach (var eventSource in EventSources) { yield return(eventSource); } } }
protected override void ProcessRecord() { var eventSourceDefinition = EventSourceDefinition.Parse(ProviderName, Keywords, TraceLevel, Ids, ProcessIds, ProcessNames); WriteObject(eventSourceDefinition); }