コード例 #1
0
ファイル: FilterFactory.cs プロジェクト: zmyer/service-fabric
        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);
        }
コード例 #2
0
ファイル: FilterFactory.cs プロジェクト: zmyer/service-fabric
        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);
        }
コード例 #3
0
ファイル: FilterFactory.cs プロジェクト: zmyer/service-fabric
        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);
        }
コード例 #4
0
ファイル: FilterFactory.cs プロジェクト: zmyer/service-fabric
        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);
        }