private bool UpdateConfigStats(RPCMeterConfig config)
        {
            int methodCount = config.MethodCount;

            for (int i = 0; i < methodCount; i++)
            {
                this.UpdateMethodStats(config.Method[i]);
            }
            RPCConnectionMetering.Stats stats = this.m_data.Stats;
            this.m_log.LogDebug("Config Stats:");
            this.m_log.LogDebug("  MethodCount={0}", new object[] { stats.MethodCount });
            this.m_log.LogDebug("  ServiceNameCount={0}", new object[] { stats.ServiceNameCount });
            this.m_log.LogDebug("  MethodNameCount={0}", new object[] { stats.MethodNameCount });
            this.m_log.LogDebug("  FixedCalledCostCount={0}", new object[] { stats.FixedCalledCostCount });
            this.m_log.LogDebug("  FixedPacketSizeCount={0}", new object[] { stats.FixedPacketSizeCount });
            this.m_log.LogDebug("  VariableMultiplierCount={0}", new object[] { stats.VariableMultiplierCount });
            this.m_log.LogDebug("  MultiplierCount={0}", new object[] { stats.MultiplierCount });
            this.m_log.LogDebug("  RateLimitCountCount={0}", new object[] { stats.RateLimitCountCount });
            this.m_log.LogDebug("  RateLimitSecondsCount={0}", new object[] { stats.RateLimitSecondsCount });
            this.m_log.LogDebug("  MaxPacketSizeCount={0}", new object[] { stats.MaxPacketSizeCount });
            this.m_log.LogDebug("  MaxEncodedSizeCount={0}", new object[] { stats.MaxEncodedSizeCount });
            this.m_log.LogDebug("  TimeoutCount={0}", new object[] { stats.TimeoutCount });
            this.m_log.LogDebug("  AggregatedRateLimitCountCount={0}", new object[] { stats.AggregatedRateLimitCountCount });
            return(true);
        }
 private void UpdateMethodStats(RPCMethodConfig method)
 {
     RPCConnectionMetering.Stats stats = this.m_data.Stats;
     stats.MethodCount = stats.MethodCount + 1;
     if (method.HasServiceName)
     {
         RPCConnectionMetering.Stats serviceNameCount = this.m_data.Stats;
         serviceNameCount.ServiceNameCount = serviceNameCount.ServiceNameCount + 1;
     }
     if (method.HasMethodName)
     {
         RPCConnectionMetering.Stats methodNameCount = this.m_data.Stats;
         methodNameCount.MethodNameCount = methodNameCount.MethodNameCount + 1;
     }
     if (method.HasFixedCallCost)
     {
         RPCConnectionMetering.Stats fixedCalledCostCount = this.m_data.Stats;
         fixedCalledCostCount.FixedCalledCostCount = fixedCalledCostCount.FixedCalledCostCount + 1;
     }
     if (method.HasFixedPacketSize)
     {
         RPCConnectionMetering.Stats fixedPacketSizeCount = this.m_data.Stats;
         fixedPacketSizeCount.FixedPacketSizeCount = fixedPacketSizeCount.FixedPacketSizeCount + 1;
     }
     if (method.HasVariableMultiplier)
     {
         RPCConnectionMetering.Stats variableMultiplierCount = this.m_data.Stats;
         variableMultiplierCount.VariableMultiplierCount = variableMultiplierCount.VariableMultiplierCount + 1;
     }
     if (method.HasMultiplier)
     {
         RPCConnectionMetering.Stats multiplierCount = this.m_data.Stats;
         multiplierCount.MultiplierCount = multiplierCount.MultiplierCount + 1;
     }
     if (method.HasRateLimitCount)
     {
         RPCConnectionMetering.Stats rateLimitCountCount = this.m_data.Stats;
         rateLimitCountCount.RateLimitCountCount = rateLimitCountCount.RateLimitCountCount + 1;
         RPCConnectionMetering.Stats aggregatedRateLimitCountCount = this.m_data.Stats;
         aggregatedRateLimitCountCount.AggregatedRateLimitCountCount = aggregatedRateLimitCountCount.AggregatedRateLimitCountCount + method.RateLimitCount;
     }
     if (method.HasRateLimitSeconds)
     {
         RPCConnectionMetering.Stats rateLimitSecondsCount = this.m_data.Stats;
         rateLimitSecondsCount.RateLimitSecondsCount = rateLimitSecondsCount.RateLimitSecondsCount + 1;
     }
     if (method.HasMaxPacketSize)
     {
         RPCConnectionMetering.Stats maxPacketSizeCount = this.m_data.Stats;
         maxPacketSizeCount.MaxPacketSizeCount = maxPacketSizeCount.MaxPacketSizeCount + 1;
     }
     if (method.HasMaxEncodedSize)
     {
         RPCConnectionMetering.Stats maxEncodedSizeCount = this.m_data.Stats;
         maxEncodedSizeCount.MaxEncodedSizeCount = maxEncodedSizeCount.MaxEncodedSizeCount + 1;
     }
     if (method.HasTimeout)
     {
         RPCConnectionMetering.Stats timeoutCount = this.m_data.Stats;
         timeoutCount.TimeoutCount = timeoutCount.TimeoutCount + 1;
     }
 }