Exemplo n.º 1
0
        public override DynamicJsonValue ToJson()
        {
            var result = new TrafficWatchPayload();

            foreach (TrafficWatchItem item in TrafficPerDatabase)
            {
                result.Add(item);
            }

            return result.ToJsonInternal();
        }
Exemplo n.º 2
0
        public override DynamicJsonValue ToJsonWithFilter(CanAccessDatabase filter)
        {
            var result = new TrafficWatchPayload();

            foreach (TrafficWatchItem item in TrafficPerDatabase)
            {
                if (filter(item.Database, requiresWrite: false))
                {
                    result.Add(item);
                }
            }

            return result.ToJsonInternal();
        }