Exemplo n.º 1
0
        public FaatService(IStorage storage, IFaatStatisticsWriter statistics)
        {
            _storage              = storage;
            _statistics           = statistics;
            _storage.DataChanged += StorageDataChanged;

            _systemPages.Add(Const.StatisticsPage, () =>
            {
                var sb = new StringBuilder();
                foreach (var paramName in _statistics.ParameterNames)
                {
                    sb.AppendFormat("{0,30}\t-\t{1}", paramName, _statistics.GetParameterValue(paramName));
                    sb.AppendLine();
                }
                return(StringPage.SerializeStatic("Server Statistics", sb.ToString()));
            });
        }
 public static void NumericIncrement(this IFaatStatisticsWriter writer, string parameterName)
 {
     writer.NumericSum(parameterName, 1);
 }