OK I now realise that I was using the call incorrectly (I included the header and footer in the text -- oops). I now have another issue though, if I include a \n in the header I get the following exception:
System.ArgumentOutOfRangeException was unhandled
Message=StartIndex cannot be less than zero.
Parameter name: startIndex
Source=mscorlib P
aramName=startIndex
StackTrace:
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.String.Substring(Int32 startIndex, Int32 length)
at #PZc.#VZc.ToString(Int32 startOffset, Int32 endOffset)
at #PZc.#SZc.GetSubstring(Int32 offset, Int32 length)
at ActiproSoftware.Text.Languages.VB.Implementation.VBOutliningSource.#wU(ITextBufferReader reader, ClassDeclaration astNode)
at ActiproSoftware.Text.Languages.VB.Implementation.VBOutliningSource.AddNodesRecursive(ITextBufferReader reader, IAstNode astNode)
at ActiproSoftware.Text.Languages.VB.Implementation.VBOutliningSource.AddNodesFromParseData(IDotNetParseData parseData)
at ActiproSoftware.Text.Languages.VB.Implementation.VBOutliner.GetOutliningSource(ITextSnapshot snapshot)
at #b3b.#a3b.GetOutliningSource(Nullable'1& updateTrigger)
at #b3b.#a3b.#0gc(Nullable'1 updateTrigger, TextSnapshotRange targetSnapshotRange, Boolean autoCollapse)
at #b3b.#a3b.#dgc(Object sender, EventArgs e)
at System.EventHandler'1.Invoke(Object sender, TEventArgs e)
at ActiproSoftware.Text.Implementation.CodeDocument.OnParseDataChanged(ParseDataPropertyChangedEventArgs e)
at ActiproSoftware.Text.Implementation.CodeDocument.set_ParseData(IParseData value)
at ActiproSoftware.Text.Implementation.CodeDocument.NotifyParseComplete(IParseRequest request, IParseData result)
at ActiproSoftware.Text.Implementation.CodeDocument.#bGc(IParseRequest request, IParseData result)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.#g.#0Yc.#nXc(IParseRequest request)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.#g.#0Yc.#56c()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart() InnerException:
This doesn't happen if I put the same character in the footer. Has anyone else experienced this?
Thanks.