Пример #1
0
    public Boolean TryGetNext(out T head, out ImmutableArrayIterator <T> tail)
    {
        ImmutableArray <T> array = _array;
        Int32 index = _index;

        if (array.IsDefault || (index >= array.Length))
        {
            head = default !;
        private static IEnumerable <XmlNodeSyntax> ExceptionDocumentation(DocumentOptionSet options, ImmutableArray <String> exceptions)
        {
            ImmutableArrayIterator <String> iterator = new ImmutableArrayIterator <String>(exceptions);

            if (iterator.TryGetNext(out String exception, out iterator))
            {
                String newLine = options.GetOption(FormattingOptions.NewLine);

                yield return(XmlExceptionElement(TypeCref(TypeName(exception)))
                             .WithLeadingTrivia(DocumentationCommentExterior("/// ")));

                while (iterator.TryGetNext(out exception, out iterator))
                {
                    yield return(XmlNewLine(newLine, continueXmlDocumentationComment: true));

                    yield return(XmlExceptionElement(TypeCref(TypeName(exception))));
                }

                yield return(XmlNewLine(newLine, continueXmlDocumentationComment: false));
            }
        }