Esempio n. 1
0
        static void ParseRulesProvider(NestingRulesProvider provider, NestingRuleKind kind, JObject jobj)
        {
            if (jobj == null)
            {
                // Fallback to create an empty rule for this NestingRuleKind
                provider.AddRule(kind, NestingRule.AllFilesWildcard, Array.Empty <string> ());
                return;
            }

            foreach (var prop in jobj.Properties())
            {
                if (prop.Value.Type == JTokenType.Array)
                {
                    provider.AddRule(kind, prop.Name, (prop.Value as JArray).Select(x => x.Value <string> ()));
                }
            }
        }