public static ReadFilter CreateTypeAndIdFilter(ITraceStoreReader traceStoreReader, Type type, Guid eventInstanceId) { var filter = ReadFilter.CreateReadFilter(type); if (eventInstanceId != Guid.Empty && traceStoreReader.IsPropertyLevelFilteringSupported()) { filter.AddFilter(type, EventInstanceFilterName, eventInstanceId); } return(filter); }
public static ReadFilter CreatePartitionFilter(ITraceStoreReader traceStoreReader, IList <Type> types, Guid partitionId) { var filter = ReadFilter.CreateReadFilter(types); if (partitionId != Guid.Empty && traceStoreReader.IsPropertyLevelFilteringSupported()) { foreach (var oneType in types) { filter.AddFilter(oneType, PartitionFilterName, partitionId); } } return(filter); }
public static ReadFilter CreateNodeFilter(ITraceStoreReader traceStoreReader, IList <Type> types, string nodeName) { var filter = ReadFilter.CreateReadFilter(types); if (!string.IsNullOrEmpty(nodeName) && traceStoreReader.IsPropertyLevelFilteringSupported()) { foreach (var oneType in types) { filter.AddFilter(oneType, NodeFilterName, nodeName); } } return(filter); }
public static ReadFilter CreateCorrelationEventFilter(ITraceStoreReader reader, IList <Guid> eventInstances) { var type = typeof(CorrelationTraceRecord); var filter = ReadFilter.CreateReadFilter(type); if (!reader.IsPropertyLevelFilteringSupported()) { return(filter); } foreach (var oneInstance in eventInstances) { filter.AddFilter(type, CorrelationTraceRecord.RelatedFromIdPropertyName, oneInstance); filter.AddFilter(type, CorrelationTraceRecord.RelatedToIdPropertyName, oneInstance); } return(filter); }