Exemplo n.º 1
0
 private static IRateLimitingConfig GetRateLimitingConfig(IConfigData configData)
 {
     return(new RateLimitingConfig
     {
         ConnectionsPerSecond = configData.GetInt(CONNECTIONS_FREQUENCY_LIMIT_KEY, 50),
         RegistryOperationsPerMinute = configData.GetInt(REGISTRYOPS_FREQUENCY_LIMIT_KEY, 50),
         DeviceMessagesPerSecond = configData.GetInt(DEVICE_MESSAGES_FREQUENCY_LIMIT_KEY, 50),
         DeviceMessagesPerDay = configData.GetLong(DEVICE_MESSAGES_DAILY_LIMIT_KEY, 8000),
         TwinReadsPerSecond = configData.GetInt(TWIN_READS_FREQUENCY_LIMIT_KEY, 5),
         TwinWritesPerSecond = configData.GetInt(TWIN_WRITES_FREQUENCY_LIMIT_KEY, 5)
     });
 }