示例#1
0
        private IEnumerable<int> SumMap(JsonMap obj)
        {
            if(MapHasRed(obj))
            {
                yield return 0;
                yield break;
            }

            foreach(var property in obj.Properties)
            {
                foreach (var inner in CreateIntegerStreamWithoutRedMaps(property.Value))
                {
                    yield return inner;
                }
            }
        }
示例#2
0
        private bool MapHasRed(JsonMap map)
        {
            foreach(var property in map.Properties)
            {
                if(jsonStringRed.Equals(property.Value))
                {
                    return true;
                }
            }

            return false;
        }