Example #1
0
        private static ISettingsNode Nest(ISettingsNode node, params string[] scopes)
        {
            var baseSource    = new ConstantSource(node);
            var nestingSource = new NestingSource(baseSource, scopes);

            return(nestingSource.Observe().WaitFirstValue(TimeSpan.FromSeconds(5)).settings);
        }
Example #2
0
        private string Transform(string value)
        {
            var valueNode  = new ValueNode("value", value);
            var arrayNode  = new ArrayNode("array", new [] { valueNode });
            var objectNode = new ObjectNode("object", new [] { arrayNode });

            var source = new ConstantSource(objectNode).Substitute(substitutions.ToArray());

            return(source.Observe().WaitFirstValue(5.Seconds()).settings?["array"]?.Children.Single()?.Value);
        }