コード例 #1
0
        private bool ShouldInstrument(OperationDescription op)
        {
            OperationTelemetryAttribute behavior = null;

            behavior = op.OperationBehaviors
                       .OfType <OperationTelemetryAttribute>()
                       .FirstOrDefault();
            return(behavior != null);
        }
コード例 #2
0
        private bool ShouldInstrument(OperationDescription op)
        {
            OperationTelemetryAttribute behavior = null;

#if NET40
            behavior = op.Behaviors.Find <OperationTelemetryAttribute>();
#else
            behavior = op.OperationBehaviors
                       .OfType <OperationTelemetryAttribute>()
                       .FirstOrDefault();
#endif // NET40
            return(behavior != null);
        }