示例#1
0
        static internal void AuthorizationFailed(string operationName)
        {
            EndpointDispatcher el = GetEndpointDispatcher();

            if (null != el)
            {
                string uri = el.PerfCounterId;
                if (PerformanceCounters.Scope == PerformanceCounterScope.All)
                {
                    OperationPerformanceCountersBase counters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operationName);
                    if (null != counters)
                    {
                        counters.AuthorizationFailed();
                    }

                    EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId);
                    if (null != eCounters)
                    {
                        eCounters.AuthorizationFailed();
                    }
                }

                ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
                if (null != sCounters)
                {
                    sCounters.AuthorizationFailed();
                }
            }
        }
示例#2
0
        internal static void AuthorizationFailed(string operationName)
        {
            EndpointDispatcher endpointDispatcher = GetEndpointDispatcher();

            if (endpointDispatcher != null)
            {
                string perfCounterId = endpointDispatcher.PerfCounterId;
                if (Scope == PerformanceCounterScope.All)
                {
                    OperationPerformanceCountersBase operationPerformanceCounters = GetOperationPerformanceCounters(endpointDispatcher.PerfCounterInstanceId, operationName);
                    if (operationPerformanceCounters != null)
                    {
                        operationPerformanceCounters.AuthorizationFailed();
                    }
                    EndpointPerformanceCountersBase endpointPerformanceCounters = GetEndpointPerformanceCounters(endpointDispatcher.PerfCounterInstanceId);
                    if (endpointPerformanceCounters != null)
                    {
                        endpointPerformanceCounters.AuthorizationFailed();
                    }
                }
                ServicePerformanceCountersBase servicePerformanceCounters = GetServicePerformanceCounters(endpointDispatcher.PerfCounterInstanceId);
                if (servicePerformanceCounters != null)
                {
                    servicePerformanceCounters.AuthorizationFailed();
                }
            }
        }