Subsection() private method

private Subsection ( [ name ) : IEnumerable
name [
return IEnumerable
Esempio n. 1
0
        private static void ResolveArguments([NotNull] ApiNode details, [NotNull] IReadOnlyList <Argument> arguments, string[] argumentNames)
        {
            for (var i = 0; i < arguments.Count && i < argumentNames.Length; i++)
            {
                if (!string.IsNullOrEmpty(argumentNames[i]))
                {
                    arguments[i].Name = argumentNames[i];
                }
            }

            var parameters = details.Subsection("Parameters").ToArray();

            if (Enumerable.Any(parameters))
            {
                ParseMessageParameters(arguments, parameters);
            }
        }
Esempio n. 2
0
        private static void ResolveArguments([NotNull] string message, [NotNull] ApiNode details,
                                             [NotNull] IReadOnlyList <Argument> arguments, [NotNull] ref ApiType type)
        {
            var parameters = details.Subsection("Parameters").ToArray();

            if (parameters.Any())
            {
                ParseMessageParameters(arguments, parameters);
                return;
            }

            var example = PickExample(details);

            if (example == null)
            {
                return;
            }

            ParseMessageExample(message, arguments, example, ref type);
        }